@@ -11,7 +11,6 @@ class ModeScreen extends StatelessWidget {
1111 const ModeScreen (this .username, {super .key});
1212
1313 Future <void > _setModeAndRegister (BuildContext context, String mode) async {
14- final scaffoldMessenger = ScaffoldMessenger .of (context);
1514 ScaffoldMessenger .of (context).showSnackBar (
1615 SnackBar (
1716 content: const Text (
@@ -20,9 +19,7 @@ class ModeScreen extends StatelessWidget {
2019 ),
2120 backgroundColor: Colors .white,
2221 behavior: SnackBarBehavior .floating,
23- shape: RoundedRectangleBorder (
24- borderRadius: BorderRadius .circular (20 ),
25- ),
22+ shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (20 )),
2623 duration: const Duration (seconds: 2 ),
2724 ),
2825 );
@@ -63,16 +60,14 @@ class ModeScreen extends StatelessWidget {
6360 );
6461
6562 final loginService = LoginService ();
66- await loginService.login (
67- email: email,
68- password: password,
69- );
63+ await loginService.login (email: email, password: password);
7064
7165 if (! context.mounted) return ;
72-
73- Navigator .push (
66+
67+ Navigator .pushAndRemoveUntil (
7468 context,
7569 MaterialPageRoute (builder: (context) => const FamilynameScreen ()),
70+ (route) => false ,
7671 );
7772 } catch (e) {
7873 ScaffoldMessenger .of (context).showSnackBar (
@@ -105,18 +100,19 @@ class ModeScreen extends StatelessWidget {
105100 child: Row (
106101 mainAxisAlignment: MainAxisAlignment .center,
107102 children: List .generate (
108- 5 , (index) => Container (
109- width: 58 ,
110- height: 7.5 ,
111- margin: const EdgeInsets .symmetric (horizontal: 6 ),
112- decoration: BoxDecoration (
113- color: index != 4
114- ? AppColors .ongiOrange
115- : AppColors .ongiOrange.withOpacity (0.4 ),
116- borderRadius: BorderRadius .circular (4 ),
103+ 5 ,
104+ (index) => Container (
105+ width: 58 ,
106+ height: 7.5 ,
107+ margin: const EdgeInsets .symmetric (horizontal: 6 ),
108+ decoration: BoxDecoration (
109+ color: index != 4
110+ ? AppColors .ongiOrange
111+ : AppColors .ongiOrange.withOpacity (0.4 ),
112+ borderRadius: BorderRadius .circular (4 ),
113+ ),
117114 ),
118115 ),
119- ),
120116 ),
121117 ),
122118 Padding (
@@ -206,12 +202,12 @@ class ModeScreen extends StatelessWidget {
206202 height: 1.2 ,
207203 color: AppColors .ongiOrange,
208204 ),
209- )
210- )
211- )
212- ]
205+ ),
206+ ),
207+ ),
208+ ],
213209 ),
214210 ),
215211 );
216212 }
217- }
213+ }
0 commit comments