background.dart 1.3 KB

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