background.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:flowy_infra/image.dart';
  2. import 'package:flowy_infra/theme.dart';
  3. import 'package:flowy_infra_ui/widget/spacing.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:provider/provider.dart';
  6. class SignInFormContainer extends StatelessWidget {
  7. final List<Widget> children;
  8. const SignInFormContainer({
  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: size.width * 0.3,
  17. child: Column(
  18. mainAxisAlignment: MainAxisAlignment.center,
  19. children: children,
  20. ),
  21. );
  22. }
  23. }
  24. class SignInTitle extends StatelessWidget {
  25. final String title;
  26. final Size logoSize;
  27. const SignInTitle({
  28. Key? key,
  29. required this.title,
  30. required this.logoSize,
  31. }) : super(key: key);
  32. @override
  33. Widget build(BuildContext context) {
  34. final theme = context.watch<AppTheme>();
  35. return SizedBox(
  36. child: Column(
  37. mainAxisAlignment: MainAxisAlignment.center,
  38. children: [
  39. svgWidgetWithName("small_logo.svg"),
  40. const VSpace(30),
  41. Text(
  42. title,
  43. style: TextStyle(
  44. color: theme.shader1,
  45. fontWeight: FontWeight.w600,
  46. fontSize: 24,
  47. ),
  48. )
  49. ],
  50. ),
  51. );
  52. }
  53. }