background.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:flowy_infra_ui/widget/spacing.dart';
  2. import 'package:flutter/material.dart';
  3. class SignInFormContainer extends StatelessWidget {
  4. final List<Widget> children;
  5. const SignInFormContainer({
  6. Key? key,
  7. required this.children,
  8. }) : super(key: key);
  9. @override
  10. Widget build(BuildContext context) {
  11. final size = MediaQuery.of(context).size;
  12. return SizedBox(
  13. width: size.width * 0.3,
  14. child: Column(
  15. mainAxisAlignment: MainAxisAlignment.center,
  16. children: children,
  17. ),
  18. );
  19. }
  20. }
  21. class SignInTitle extends StatelessWidget {
  22. final String title;
  23. final Size logoSize;
  24. const SignInTitle({
  25. Key? key,
  26. required this.title,
  27. required this.logoSize,
  28. }) : super(key: key);
  29. @override
  30. Widget build(BuildContext context) {
  31. return SizedBox(
  32. child: Column(
  33. mainAxisAlignment: MainAxisAlignment.center,
  34. children: [
  35. Image(
  36. fit: BoxFit.cover,
  37. width: logoSize.width,
  38. height: logoSize.height,
  39. image: const AssetImage('assets/images/app_flowy_logo.jpg')),
  40. const VSpace(30),
  41. Text(
  42. title,
  43. style: const TextStyle(
  44. color: Colors.black,
  45. fontWeight: FontWeight.bold,
  46. fontSize: 20,
  47. ),
  48. )
  49. ],
  50. ),
  51. );
  52. }
  53. }