register_page.dart 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_auth/models/config.dart';
  3. import 'package:flutter_auth/pages/background.dart';
  4. import 'package:flutter_auth/views/responsive.dart';
  5. /// Description: register page
  6. /// Time : 08/24/2023 Thursday
  7. /// Author : liuyuqi.gov@msn.cn
  8. class RegisterPage extends StatefulWidget {
  9. const RegisterPage({super.key});
  10. @override
  11. State<RegisterPage> createState() => _RegisterPageState();
  12. }
  13. class _RegisterPageState extends State<RegisterPage> {
  14. @override
  15. Widget build(BuildContext context) {
  16. return Background(
  17. child: SingleChildScrollView(
  18. child: Responsive(
  19. desktop: buildRegisterDesktop(),
  20. mobile: buildRegisterMobile(),
  21. ),
  22. ));
  23. }
  24. Widget buildRegisterDesktop() {
  25. return Row(
  26. children: [
  27. Expanded(child: RegisterTop()),
  28. Expanded(
  29. child: Column(
  30. mainAxisAlignment: MainAxisAlignment.center,
  31. children: [
  32. SizedBox(
  33. width: 450,
  34. child: RegisterForm(),
  35. ),
  36. SizedBox(
  37. height: defaultPadding / 2,
  38. ),
  39. // SocalSigUp()
  40. ],
  41. ))
  42. ],
  43. );
  44. }
  45. Widget buildRegisterMobile() {
  46. return Column(
  47. mainAxisAlignment: MainAxisAlignment.center,
  48. children: [
  49. RegisterTop(),
  50. Row(
  51. children: [
  52. Spacer(),
  53. Expanded(
  54. child: RegisterForm(),
  55. flex: 8,
  56. ),
  57. Spacer()
  58. ],
  59. )
  60. ],
  61. );
  62. }
  63. }
  64. class RegisterTop {
  65. }
  66. class RegisterForm {}