This repository was archived by the owner on Jan 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +54
-40
lines changed
Expand file tree Collapse file tree 4 files changed +54
-40
lines changed Original file line number Diff line number Diff line change @@ -40,47 +40,56 @@ class _LastAccountState extends State<LastAccount> {
4040 ),
4141 child: Column (
4242 children: < Widget > [
43- GFListTile (
44- margin: EdgeInsets .all (0 ),
45- avatar: Icon (
46- Icons .account_circle,
47- color: Theme .of (context).focusColor,
48- ),
49- title: Text (widget.user.username.split ('@' )[0 ]),
50- description: widget.user.username.contains ('.com.cu' )
51- ? Text ('Internacional' )
52- : Text ('Nacional' ),
53- icon: Row (
54- children: < Widget > [
55- IconButton (
56- icon: Icon (
57- Icons .monetization_on,
58- color: Theme .of (context).focusColor,
43+ InkWell (
44+ onTap: () {
45+ login (
46+ context,
47+ widget.user.username,
48+ widget.user.password,
49+ );
50+ },
51+ child: GFListTile (
52+ margin: EdgeInsets .all (0 ),
53+ avatar: Icon (
54+ Icons .account_circle,
55+ color: Theme .of (context).focusColor,
56+ ),
57+ title: Text (widget.user.username.split ('@' )[0 ]),
58+ description: widget.user.username.contains ('.com.cu' )
59+ ? Text ('Internacional' )
60+ : Text ('Nacional' ),
61+ icon: Row (
62+ children: < Widget > [
63+ IconButton (
64+ icon: Icon (
65+ Icons .monetization_on,
66+ color: Theme .of (context).focusColor,
67+ ),
68+ onPressed: () {
69+ credit (
70+ context,
71+ widget.user.username,
72+ widget.user.password,
73+ );
74+ },
5975 ),
60- onPressed : () {
61- credit (
62- context ,
63- widget.user.username ,
64- widget.user.password ,
65- );
66- },
67- ) ,
68- IconButton (
69- icon : Icon (
70- FontAwesomeIcons .globeAmericas,
71- color : Theme . of (context).focusColor ,
76+ IconButton (
77+ icon : Icon (
78+ FontAwesomeIcons .globeAmericas ,
79+ color : Theme . of (context).focusColor ,
80+ ) ,
81+ onPressed : () {
82+ login (
83+ context ,
84+ widget.user.username,
85+ widget.user.password,
86+ );
87+ } ,
7288 ),
73- onPressed: () {
74- login (
75- context,
76- widget.user.username,
77- widget.user.password,
78- );
79- },
80- ),
81- ],
89+ ],
90+ ),
8291 ),
83- ),
92+ )
8493 ],
8594 ),
8695 );
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class _SettingsState extends State<SettingsWidget> {
6161 ),
6262 ),
6363 SizedBox (
64- height: 48 ,
64+ height: 20 ,
6565 ),
6666 Row (
6767 mainAxisAlignment: MainAxisAlignment .spaceBetween,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'package:nauta_api/nauta_api.dart';
66import 'package:connectivity/connectivity.dart' ;
77import 'package:font_awesome_flutter/font_awesome_flutter.dart' ;
88import 'package:todo/pages/connected_page.dart' ;
9+ import 'package:shared_preferences/shared_preferences.dart' ;
910
1011class AccountPage extends StatefulWidget {
1112 _AccountPageState createState () => _AccountPageState ();
@@ -331,6 +332,10 @@ class _AccountPageState extends State<AccountPage> {
331332
332333 await pr.hide ();
333334
335+ SharedPreferences prefs = await SharedPreferences .getInstance ();
336+
337+ prefs.setString ('lastAccount' , user);
338+
334339 Navigator .push (
335340 ctx,
336341 MaterialPageRoute (
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class _SettingsPageState extends State<SettingsPage> {
9090 },
9191 ),
9292 ],
93- expandedHeight: 100 ,
93+ expandedHeight: 10 ,
9494 backgroundColor: Theme .of (context).scaffoldBackgroundColor,
9595 elevation: 0 ,
9696 pinned: true ,
You can’t perform that action at this time.
0 commit comments