@@ -35,51 +35,53 @@ class _DashboardPageState extends NyState<DashboardPage> {
3535 elevation: 0,
3636 ),
3737 body: SafeArea(
38- child: afterLoad(child: () => Container(
39- padding: EdgeInsets.all(16),
40- decoration: BoxDecoration(
41- borderRadius: BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)),
42- color: Colors.white
43- ),
44- child: Column(
45- crossAxisAlignment: CrossAxisAlignment.center,
46- mainAxisAlignment: MainAxisAlignment.center,
47- children: [
48- Column(
49- children: [
50- Container(
51- margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
52- padding: EdgeInsets.all(15),
53- decoration: BoxDecoration(
54- color: ThemeColor.get(context).background,
55- borderRadius: BorderRadius.circular(8),
56- boxShadow: [
57- BoxShadow(
58- color: Colors.grey.shade200,
59- spreadRadius: 0.1,
60- blurRadius: 20
61- )
62- ]),
63- child: Icon(Icons.key),
64- ),
65- Text("Logged in").headingMedium(),
66- Divider(),
67- Text("Auth: \$ {_user?.email}"),
68- ],
69- ),
70- Container(
71- margin: EdgeInsets.only(top: 20),
72- width: double.infinity,
73- child: MaterialButton(
74- child: Text("Logout"), onPressed: () async {
75- event<LogoutEvent>();
76- await Auth.logout();
77- routeToInitial();
78- },),
79- )
80- ],
81- ),
82- ),)
38+ child: Container(
39+ padding: EdgeInsets.all(16),
40+ decoration: BoxDecoration(
41+ borderRadius: BorderRadius.only(topRight: Radius.circular(20),
42+ topLeft: Radius.circular(20)),
43+ color: Colors.white
44+ ),
45+ child: Column(
46+ crossAxisAlignment: CrossAxisAlignment.center,
47+ mainAxisAlignment: MainAxisAlignment.center,
48+ children: [
49+ Column(
50+ children: [
51+ Container(
52+ margin: EdgeInsets.symmetric(
53+ horizontal: 16, vertical: 16),
54+ padding: EdgeInsets.all(15),
55+ decoration: BoxDecoration(
56+ color: ThemeColor
57+ .get(context)
58+ .background,
59+ borderRadius: BorderRadius.circular(8),
60+ boxShadow: [
61+ BoxShadow(
62+ color: Colors.grey.shade200,
63+ spreadRadius: 0.1,
64+ blurRadius: 20
65+ )
66+ ]),
67+ child: Icon(Icons.key),
68+ ),
69+ Text("Logged in").headingMedium(),
70+ Divider(),
71+ Text("Auth: \$ {_user?.email}"),
72+ ],
73+ ),
74+ Container(
75+ margin: EdgeInsets.only(top: 20),
76+ width: double.infinity,
77+ child: MaterialButton(
78+ child: Text("Logout"), onPressed: () async {
79+ await event<LogoutEvent>();
80+ },),
81+ )
82+ ],
83+ ),
84+ )
8385 ),
8486 );
8587 }
0 commit comments