Skip to content

Instantly share code, notes, and snippets.

@happyharis
Created May 12, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happyharis/dd6e4abc9b7dd2ae32d1bd90785564a7 to your computer and use it in GitHub Desktop.
Save happyharis/dd6e4abc9b7dd2ae32d1bd90785564a7 to your computer and use it in GitHub Desktop.
Future _showAlert(data) async{
return showDialog<Null>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return new AlertDialog(
title: new Text('Would you like to make changes?', style: new TextStyle(fontSize: 17.0)),
actions: <Widget>[
new FlatButton(
child: new Text('Edit'),
onPressed: (){
Navigator.push(context, new MaterialPageRoute(builder: (context) => new EditTodoPage(todo: data, todoID: selectedTodoId,)));
},
),
],
);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment