-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yolcura1@gmail.com
authored and
yolcura1@gmail.com
committed
Apr 17, 2020
1 parent
cd73ba7
commit 89766ba
Showing
4 changed files
with
76 additions
and
45 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
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,62 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../main.dart'; | ||
|
||
showAlertDialog(BuildContext context, var title, var description) { | ||
// set up the buttons | ||
Widget remindButton = FlatButton( | ||
child: Text("Devam"), | ||
onPressed: () { | ||
Navigator.pop(context); | ||
}, | ||
); | ||
|
||
// set up the AlertDialog | ||
AlertDialog alert = AlertDialog( | ||
title: Text( | ||
title, | ||
), | ||
content: | ||
Text(description), | ||
actions: [ | ||
remindButton, | ||
], | ||
); | ||
|
||
// show the dialog | ||
showDialog( | ||
context: context, | ||
builder: (BuildContext context) { | ||
return alert; | ||
}, | ||
); | ||
} | ||
|
||
|
||
getAlertDialog(var title, var description) { | ||
// set up the buttons | ||
Widget remindButton = FlatButton( | ||
child: Text("Devam"), | ||
onPressed: () { | ||
navigatorKey.currentState.pushNamed("/topics"); | ||
|
||
}, | ||
); | ||
|
||
// set up the AlertDialog | ||
AlertDialog alert = AlertDialog( | ||
title: Text( | ||
title, | ||
), | ||
content: | ||
Text(description), | ||
actions: [ | ||
remindButton, | ||
], | ||
); | ||
|
||
|
||
return alert; | ||
|
||
} |