Login form in flutter
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I´m create a simple login in flutter. This login connect to a API. For do this I retrieve inputs value and send to a method, but return
type '_InternalLinkedHashMap' is not a subtype of type 'Map'
This is my model
class Login
final String usuario, password;
Login(this.usuario, this.password);
factory Login.fromJson(Map<String, dynamic> json)
return Login(
usuario: json['usuario'] as String,
password: json['password'] as String,
);
And this is my main class
import 'package:flutter/material.dart';
import 'package:igota/screens/home/home_page.dart';
import 'package:igota/model/login.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class LoginPage extends StatefulWidget
static String tag = 'login-page';
@override
_LoginPageState createState() => new _LoginPageState();
class _LoginPageState extends State<LoginPage>
final _formKey = GlobalKey<FormState>();
final userValue = new TextEditingController();
final passwordValue = new TextEditingController();
@override
Widget build(BuildContext context)
final logo = Hero(
tag: 'hero',
child: CircleAvatar(
backgroundColor: Colors.transparent,
radius: 48.0,
child: Image.asset('assets/logo.png'),
),
);
final username = TextFormField(
controller: userValue,
validator: (value)
if (value.isEmpty)
return 'Introduce un nombre';
,
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration(
hintText: 'Usuario',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
final password = TextFormField(
controller: passwordValue,
validator: (value)
if (value.isEmpty)
return 'Introduce una contraseña';
,
autofocus: false,
obscureText: true,
decoration: InputDecoration(
hintText: 'Contraseña',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
Widget _buildLoginButton(BuildContext context)
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.0),
child: Material(
borderRadius: BorderRadius.circular(30.0),
child: MaterialButton(
minWidth: 200.0,
height: 42.0,
onPressed: ()
fetchPost(userValue, passwordValue);
//final snackBar = SnackBar(
// content: Text(
// 'Usuario/Contraseña incorrecto',
// textAlign: TextAlign.center,
//));
//Scaffold.of(context).showSnackBar(snackBar);
if (_formKey.currentState.validate())
Navigator.of(context).pushNamed(HomePage.tag);
,
color: Colors.blue[300],
child: Text('Entrar', style: TextStyle(color: Colors.white)),
),
),
);
final forgotLabel = FlatButton(
child: Text(
'¿Contraseña olvidada?',
style: TextStyle(color: Colors.black54),
),
onPressed: () ,
);
return Scaffold(
backgroundColor: Colors.white,
body: Builder(
builder: (context) => Center(
child: Form(
key: _formKey,
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.0, right: 24.0),
children: <Widget>[
logo,
SizedBox(height: 48.0),
username,
SizedBox(height: 8.0),
password,
SizedBox(height: 24.0),
_buildLoginButton(context),
forgotLabel
],
),
)),
),
);
//Test
Future<Login> fetchPost(user, pass) async
Map headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: "usuario": user.text, "password": pass.text,
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
So i need to return response and check if correct or incorrect to show snackbar. I don't know exactly what i'm doing right or wrong :$
dart flutter
add a comment |
I´m create a simple login in flutter. This login connect to a API. For do this I retrieve inputs value and send to a method, but return
type '_InternalLinkedHashMap' is not a subtype of type 'Map'
This is my model
class Login
final String usuario, password;
Login(this.usuario, this.password);
factory Login.fromJson(Map<String, dynamic> json)
return Login(
usuario: json['usuario'] as String,
password: json['password'] as String,
);
And this is my main class
import 'package:flutter/material.dart';
import 'package:igota/screens/home/home_page.dart';
import 'package:igota/model/login.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class LoginPage extends StatefulWidget
static String tag = 'login-page';
@override
_LoginPageState createState() => new _LoginPageState();
class _LoginPageState extends State<LoginPage>
final _formKey = GlobalKey<FormState>();
final userValue = new TextEditingController();
final passwordValue = new TextEditingController();
@override
Widget build(BuildContext context)
final logo = Hero(
tag: 'hero',
child: CircleAvatar(
backgroundColor: Colors.transparent,
radius: 48.0,
child: Image.asset('assets/logo.png'),
),
);
final username = TextFormField(
controller: userValue,
validator: (value)
if (value.isEmpty)
return 'Introduce un nombre';
,
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration(
hintText: 'Usuario',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
final password = TextFormField(
controller: passwordValue,
validator: (value)
if (value.isEmpty)
return 'Introduce una contraseña';
,
autofocus: false,
obscureText: true,
decoration: InputDecoration(
hintText: 'Contraseña',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
Widget _buildLoginButton(BuildContext context)
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.0),
child: Material(
borderRadius: BorderRadius.circular(30.0),
child: MaterialButton(
minWidth: 200.0,
height: 42.0,
onPressed: ()
fetchPost(userValue, passwordValue);
//final snackBar = SnackBar(
// content: Text(
// 'Usuario/Contraseña incorrecto',
// textAlign: TextAlign.center,
//));
//Scaffold.of(context).showSnackBar(snackBar);
if (_formKey.currentState.validate())
Navigator.of(context).pushNamed(HomePage.tag);
,
color: Colors.blue[300],
child: Text('Entrar', style: TextStyle(color: Colors.white)),
),
),
);
final forgotLabel = FlatButton(
child: Text(
'¿Contraseña olvidada?',
style: TextStyle(color: Colors.black54),
),
onPressed: () ,
);
return Scaffold(
backgroundColor: Colors.white,
body: Builder(
builder: (context) => Center(
child: Form(
key: _formKey,
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.0, right: 24.0),
children: <Widget>[
logo,
SizedBox(height: 48.0),
username,
SizedBox(height: 8.0),
password,
SizedBox(height: 24.0),
_buildLoginButton(context),
forgotLabel
],
),
)),
),
);
//Test
Future<Login> fetchPost(user, pass) async
Map headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: "usuario": user.text, "password": pass.text,
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
So i need to return response and check if correct or incorrect to show snackbar. I don't know exactly what i'm doing right or wrong :$
dart flutter
add a comment |
I´m create a simple login in flutter. This login connect to a API. For do this I retrieve inputs value and send to a method, but return
type '_InternalLinkedHashMap' is not a subtype of type 'Map'
This is my model
class Login
final String usuario, password;
Login(this.usuario, this.password);
factory Login.fromJson(Map<String, dynamic> json)
return Login(
usuario: json['usuario'] as String,
password: json['password'] as String,
);
And this is my main class
import 'package:flutter/material.dart';
import 'package:igota/screens/home/home_page.dart';
import 'package:igota/model/login.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class LoginPage extends StatefulWidget
static String tag = 'login-page';
@override
_LoginPageState createState() => new _LoginPageState();
class _LoginPageState extends State<LoginPage>
final _formKey = GlobalKey<FormState>();
final userValue = new TextEditingController();
final passwordValue = new TextEditingController();
@override
Widget build(BuildContext context)
final logo = Hero(
tag: 'hero',
child: CircleAvatar(
backgroundColor: Colors.transparent,
radius: 48.0,
child: Image.asset('assets/logo.png'),
),
);
final username = TextFormField(
controller: userValue,
validator: (value)
if (value.isEmpty)
return 'Introduce un nombre';
,
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration(
hintText: 'Usuario',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
final password = TextFormField(
controller: passwordValue,
validator: (value)
if (value.isEmpty)
return 'Introduce una contraseña';
,
autofocus: false,
obscureText: true,
decoration: InputDecoration(
hintText: 'Contraseña',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
Widget _buildLoginButton(BuildContext context)
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.0),
child: Material(
borderRadius: BorderRadius.circular(30.0),
child: MaterialButton(
minWidth: 200.0,
height: 42.0,
onPressed: ()
fetchPost(userValue, passwordValue);
//final snackBar = SnackBar(
// content: Text(
// 'Usuario/Contraseña incorrecto',
// textAlign: TextAlign.center,
//));
//Scaffold.of(context).showSnackBar(snackBar);
if (_formKey.currentState.validate())
Navigator.of(context).pushNamed(HomePage.tag);
,
color: Colors.blue[300],
child: Text('Entrar', style: TextStyle(color: Colors.white)),
),
),
);
final forgotLabel = FlatButton(
child: Text(
'¿Contraseña olvidada?',
style: TextStyle(color: Colors.black54),
),
onPressed: () ,
);
return Scaffold(
backgroundColor: Colors.white,
body: Builder(
builder: (context) => Center(
child: Form(
key: _formKey,
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.0, right: 24.0),
children: <Widget>[
logo,
SizedBox(height: 48.0),
username,
SizedBox(height: 8.0),
password,
SizedBox(height: 24.0),
_buildLoginButton(context),
forgotLabel
],
),
)),
),
);
//Test
Future<Login> fetchPost(user, pass) async
Map headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: "usuario": user.text, "password": pass.text,
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
So i need to return response and check if correct or incorrect to show snackbar. I don't know exactly what i'm doing right or wrong :$
dart flutter
I´m create a simple login in flutter. This login connect to a API. For do this I retrieve inputs value and send to a method, but return
type '_InternalLinkedHashMap' is not a subtype of type 'Map'
This is my model
class Login
final String usuario, password;
Login(this.usuario, this.password);
factory Login.fromJson(Map<String, dynamic> json)
return Login(
usuario: json['usuario'] as String,
password: json['password'] as String,
);
And this is my main class
import 'package:flutter/material.dart';
import 'package:igota/screens/home/home_page.dart';
import 'package:igota/model/login.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class LoginPage extends StatefulWidget
static String tag = 'login-page';
@override
_LoginPageState createState() => new _LoginPageState();
class _LoginPageState extends State<LoginPage>
final _formKey = GlobalKey<FormState>();
final userValue = new TextEditingController();
final passwordValue = new TextEditingController();
@override
Widget build(BuildContext context)
final logo = Hero(
tag: 'hero',
child: CircleAvatar(
backgroundColor: Colors.transparent,
radius: 48.0,
child: Image.asset('assets/logo.png'),
),
);
final username = TextFormField(
controller: userValue,
validator: (value)
if (value.isEmpty)
return 'Introduce un nombre';
,
keyboardType: TextInputType.emailAddress,
autofocus: false,
decoration: InputDecoration(
hintText: 'Usuario',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
final password = TextFormField(
controller: passwordValue,
validator: (value)
if (value.isEmpty)
return 'Introduce una contraseña';
,
autofocus: false,
obscureText: true,
decoration: InputDecoration(
hintText: 'Contraseña',
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)),
),
);
Widget _buildLoginButton(BuildContext context)
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.0),
child: Material(
borderRadius: BorderRadius.circular(30.0),
child: MaterialButton(
minWidth: 200.0,
height: 42.0,
onPressed: ()
fetchPost(userValue, passwordValue);
//final snackBar = SnackBar(
// content: Text(
// 'Usuario/Contraseña incorrecto',
// textAlign: TextAlign.center,
//));
//Scaffold.of(context).showSnackBar(snackBar);
if (_formKey.currentState.validate())
Navigator.of(context).pushNamed(HomePage.tag);
,
color: Colors.blue[300],
child: Text('Entrar', style: TextStyle(color: Colors.white)),
),
),
);
final forgotLabel = FlatButton(
child: Text(
'¿Contraseña olvidada?',
style: TextStyle(color: Colors.black54),
),
onPressed: () ,
);
return Scaffold(
backgroundColor: Colors.white,
body: Builder(
builder: (context) => Center(
child: Form(
key: _formKey,
child: ListView(
shrinkWrap: true,
padding: EdgeInsets.only(left: 24.0, right: 24.0),
children: <Widget>[
logo,
SizedBox(height: 48.0),
username,
SizedBox(height: 8.0),
password,
SizedBox(height: 24.0),
_buildLoginButton(context),
forgotLabel
],
),
)),
),
);
//Test
Future<Login> fetchPost(user, pass) async
Map headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: "usuario": user.text, "password": pass.text,
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
So i need to return response and check if correct or incorrect to show snackbar. I don't know exactly what i'm doing right or wrong :$
dart flutter
dart flutter
asked Nov 15 '18 at 16:50
El Hombre Sin NombreEl Hombre Sin Nombre
376418
376418
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You need to define the type of headers
like this:
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
EDIT: You need to use json.encode
on the body of a request with 'Content-type': 'application/json'
as well.
EDIT2:
Future<Login> fetchPost(user, pass) async
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: json.encode("usuario": user.text, "password": pass.text),
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324274%2flogin-form-in-flutter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to define the type of headers
like this:
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
EDIT: You need to use json.encode
on the body of a request with 'Content-type': 'application/json'
as well.
EDIT2:
Future<Login> fetchPost(user, pass) async
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: json.encode("usuario": user.text, "password": pass.text),
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
add a comment |
You need to define the type of headers
like this:
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
EDIT: You need to use json.encode
on the body of a request with 'Content-type': 'application/json'
as well.
EDIT2:
Future<Login> fetchPost(user, pass) async
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: json.encode("usuario": user.text, "password": pass.text),
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
add a comment |
You need to define the type of headers
like this:
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
EDIT: You need to use json.encode
on the body of a request with 'Content-type': 'application/json'
as well.
EDIT2:
Future<Login> fetchPost(user, pass) async
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: json.encode("usuario": user.text, "password": pass.text),
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
You need to define the type of headers
like this:
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
EDIT: You need to use json.encode
on the body of a request with 'Content-type': 'application/json'
as well.
EDIT2:
Future<Login> fetchPost(user, pass) async
Map<String, String> headers =
'Content-type': 'application/json',
'Accept': 'application/json',
;
final response = await http.post(
'URL',
body: json.encode("usuario": user.text, "password": pass.text),
headers: headers);
final responseJson = json.decode(response.body);
return Login.fromJson(responseJson);
edited Nov 16 '18 at 13:41
answered Nov 15 '18 at 19:18
RingilRingil
3,85321227
3,85321227
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
add a comment |
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
Doesn´t work, return 'Cannot set the body fields of a Request with content-type "application/json".
– El Hombre Sin Nombre
Nov 16 '18 at 7:32
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
@ElHombreSinNombre Well, that's a separate bug from the HashMap one. I edited my answer with regards to that.
– Ringil
Nov 16 '18 at 12:16
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
Can you put a example with code?
– El Hombre Sin Nombre
Nov 16 '18 at 12:55
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
@ElHombreSinNombre i've edited it again
– Ringil
Nov 16 '18 at 13:41
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
¿What about if login fails? ¿How can i do error handling? ¿With try catch?
– El Hombre Sin Nombre
Nov 19 '18 at 12:01
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324274%2flogin-form-in-flutter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown