@@ -3,6 +3,7 @@ import 'package:flutter_book/helpers/Adapt.dart';
33import 'package:flutter_book/helpers/constants.dart' ;
44import 'package:flutter_book/widgets/Mine/ListItem.dart' ;
55import 'package:flutter_book/routers/application.dart' ;
6+ import 'package:flutter_book/containers/Login.dart' ;
67import 'package:fluro/fluro.dart' ;
78
89class SettingContent extends StatefulWidget {
@@ -91,18 +92,25 @@ class _SettingContentState extends State<SettingContent> {
9192 },
9293 );
9394 }).toList ()),
94- Container (
95- margin: EdgeInsets .only (top: Adapt .height (120.0 )),
96- padding: EdgeInsets .symmetric (vertical: Adapt .height (14.0 )),
97- width: double .infinity,
98- decoration: BoxDecoration (color: Color (AppColors .themeColorGray)),
99- child: Text (
100- "登出" ,
101- textAlign: TextAlign .center,
102- style: TextStyle (
103- color: Color (AppColors .fontColor),
104- fontSize: Adapt .px (20.0 ),
105- fontWeight: FontWeight .w400),
95+ GestureDetector (
96+ onTap: () {
97+ Navigator .of (context).pushAndRemoveUntil (
98+ MaterialPageRoute (builder: (context) => Login ()),
99+ (route) => route == null );
100+ },
101+ child: Container (
102+ margin: EdgeInsets .only (top: Adapt .height (120.0 )),
103+ padding: EdgeInsets .symmetric (vertical: Adapt .height (14.0 )),
104+ width: double .infinity,
105+ decoration: BoxDecoration (color: Color (AppColors .themeColorGray)),
106+ child: Text (
107+ "登出" ,
108+ textAlign: TextAlign .center,
109+ style: TextStyle (
110+ color: Color (AppColors .fontColor),
111+ fontSize: Adapt .px (20.0 ),
112+ fontWeight: FontWeight .w400),
113+ ),
106114 ),
107115 ),
108116 ],
0 commit comments