together_mobile/lib/screens/signin_signup/signup_screen.dart

41 lines
935 B
Dart
Raw Normal View History

2023-06-21 17:44:28 +08:00
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:together_mobile/common/constants.dart';
2023-06-29 17:02:09 +08:00
import 'components/signup.dart';
2023-06-21 17:44:28 +08:00
class SignupScreen extends StatefulWidget {
const SignupScreen({super.key});
@override
State<SignupScreen> createState() => _SignupScreenState();
}
class _SignupScreenState extends State<SignupScreen> {
2023-06-29 17:02:09 +08:00
String _method = 'email';
2023-06-21 17:44:28 +08:00
void chageSigninMethod() {
2023-06-29 17:02:09 +08:00
if (_method == 'email') {
2023-06-21 17:44:28 +08:00
_method = 'email';
} else {
2023-06-29 17:02:09 +08:00
_method = 'phone';
2023-06-21 17:44:28 +08:00
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: () => context.pop(),
),
2023-06-29 17:02:09 +08:00
title: const Text('账号注册'),
2023-06-21 17:44:28 +08:00
centerTitle: true,
backgroundColor: kSecondaryColor,
),
2023-06-29 17:02:09 +08:00
body: const SignupBody(),
2023-06-21 17:44:28 +08:00
);
}
}