-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from coronatorid/fix-error-output
Fix error output and little bit refactoring
- Loading branch information
Showing
7 changed files
with
110 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
class LoginProvider { | ||
import 'package:flutter/widgets.dart'; | ||
|
||
class LoginProvider with ChangeNotifier { | ||
LoginProvider(this._phoneNumber); | ||
|
||
String _phoneNumber; | ||
String phoneNumber() => _phoneNumber; | ||
|
||
String phoneNumber() { | ||
return "+62" + this._phoneNumber; | ||
} | ||
String _errorString; | ||
String errorString() => _errorString; | ||
|
||
void setPhoneNumber(String phoneNumber) { | ||
this._phoneNumber = phoneNumber; | ||
this._phoneNumber = "+62" + phoneNumber; | ||
} | ||
|
||
void setErrorString(String errorString) { | ||
this._errorString = errorString; | ||
notifyListeners(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class AlertText extends StatelessWidget { | ||
final String text; | ||
|
||
AlertText(this.text); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Text( | ||
this.text, | ||
style: TextStyle( | ||
fontFamily: 'Hind', | ||
fontSize: 14, | ||
color: Colors.red, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters