@@ -42,7 +42,8 @@ class _ConnectedFormState extends State<ConnectedForm> {
4242 .checkConnectivity ()
4343 .then ((value) => updateNetworkState (value));
4444
45- suscription = Connectivity ().onConnectivityChanged.listen (updateNetworkState);
45+ suscription =
46+ Connectivity ().onConnectivityChanged.listen (updateNetworkState);
4647
4748 setState (() {
4849 nautaClient = NautaClient (
@@ -132,16 +133,6 @@ class _ConnectedFormState extends State<ConnectedForm> {
132133 return Container (
133134 child: Column (
134135 children: < Widget > [
135- Padding (
136- padding: EdgeInsets .all (4.0 ),
137- child: Text (
138- 'Conectado' ,
139- style: TextStyle (
140- color: Theme .of (context).focusColor,
141- fontSize: 20 ,
142- ),
143- ),
144- ),
145136 Padding (
146137 padding: EdgeInsets .all (20 ),
147138 child: Center (
@@ -182,7 +173,7 @@ class _ConnectedFormState extends State<ConnectedForm> {
182173 color: Theme .of (context).focusColor,
183174 minWidth: MediaQuery .of (context).size.width,
184175 child: Text (
185- 'Salir ' ,
176+ 'Cerrar sesión ' ,
186177 style: TextStyle (color: Colors .white),
187178 ),
188179 onPressed: () async {
@@ -191,9 +182,13 @@ class _ConnectedFormState extends State<ConnectedForm> {
191182
192183 try {
193184 SharedPreferences prefs = await SharedPreferences .getInstance ();
194- await prefs.remove ('nauta_username' );
185+
186+ // Que primero haga logout
195187 await nautaClient.logout ();
196188
189+ // Y luego borre la sessión
190+ await prefs.remove ('nauta_username' );
191+
197192 _timer.cancel ();
198193 await pr.hide ();
199194
0 commit comments