Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74214054
showAlertDialog.Dart
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 26, 12:28
Size
644 B
Mime Type
text/x-java
Expires
Sun, Jul 28, 12:28 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
19356598
Attached To
R10646 Orchestration
showAlertDialog.Dart
View Options
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
showAlertDialog(BuildContext context, String title, String content) {
// set up the button
Widget okButton = FlatButton(
child: Text("OK"),
onPressed: () {},
);
// set up the AlertDialog
AlertDialog alert =
AlertDialog(title: Text(title), content: Text(content), actions: <Widget>[
FlatButton(
child: Text('Ok'),
onPressed: () {
// Navigator.of(context).pop();
},
)
]);
// show the dialog
showDialog(
context: context,
builder: (BuildContext context) {
return alert;
},
);
}
Event Timeline
Log In to Comment