Skip to content
This repository was archived by the owner on Jan 5, 2021. It is now read-only.

Commit 6609f44

Browse files
author
Luis Correa
committed
1.2.1 Done
1 parent 9129a1b commit 6609f44

File tree

4 files changed

+54
-40
lines changed

4 files changed

+54
-40
lines changed

lib/components/last_account.dart

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff 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
);

lib/components/settings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

lib/pages/account_page.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:nauta_api/nauta_api.dart';
66
import 'package:connectivity/connectivity.dart';
77
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
88
import 'package:todo/pages/connected_page.dart';
9+
import 'package:shared_preferences/shared_preferences.dart';
910

1011
class 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(

lib/pages/settings_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)