Last active
May 8, 2018 09:45
-
-
Save rajajawahar/6991153d9e9dae775024202834b1447d to your computer and use it in GitHub Desktop.
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
void _submit() { | |
if (this.formKey.currentState.validate()) { | |
formKey.currentState.save(); | |
} | |
var employee = Employee(firstname,lastname,mobileno,emailId); | |
var dbHelper = DBHelper(); | |
dbHelper.saveEmployee(employee); | |
_showSnackBar("Data saved successfully"); | |
} | |
void _showSnackBar(String text) { | |
scaffoldKey.currentState | |
.showSnackBar(new SnackBar(content: new Text(text))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment