background.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import 'dart:math';
  2. import 'package:flowy_infra/image.dart';
  3. import 'package:flowy_infra_ui/style_widget/text.dart';
  4. import 'package:flowy_infra_ui/widget/spacing.dart';
  5. import 'package:flutter/material.dart';
  6. class AuthFormContainer extends StatelessWidget {
  7. final List<Widget> children;
  8. const AuthFormContainer({
  9. Key? key,
  10. required this.children,
  11. }) : super(key: key);
  12. @override
  13. Widget build(BuildContext context) {
  14. final size = MediaQuery.of(context).size;
  15. return SizedBox(
  16. width: min(size.width, 340),
  17. child: Column(
  18. mainAxisAlignment: MainAxisAlignment.center,
  19. children: children,
  20. ),
  21. );
  22. }
  23. }
  24. class FlowyLogoTitle extends StatelessWidget {
  25. final String title;
  26. final Size logoSize;
  27. const FlowyLogoTitle({
  28. Key? key,
  29. required this.title,
  30. this.logoSize = const Size.square(40),
  31. }) : super(key: key);
  32. @override
  33. Widget build(BuildContext context) {
  34. return SizedBox(
  35. child: Column(
  36. mainAxisAlignment: MainAxisAlignment.center,
  37. children: [
  38. SizedBox.fromSize(
  39. size: logoSize,
  40. child: svgWidget("flowy_logo"),
  41. ),
  42. const VSpace(30),
  43. FlowyText.semibold(
  44. title,
  45. fontSize: 24,
  46. ),
  47. ],
  48. ),
  49. );
  50. }
  51. }