dialog flutter example
showDialog(context: context, builder: (BuildContext context){
return AlertDialog(
title: Text("Success"),
content: Text("Saved successfully"),
);
});
dialog flutter example
showDialog(context: context, builder: (BuildContext context){
return AlertDialog(
title: Text("Success"),
content: Text("Saved successfully"),
);
});
dialog box with form flutter
void showDialogWithFields() {
showDialog(
context: context,
builder: (_) {
var emailController = TextEditingController();
var messageController = TextEditingController();
return AlertDialog(
title: Text('Contact Us'),
content: ListView(
shrinkWrap: true,
children: [
TextFormField(
controller: emailController,
decoration: InputDecoration(hintText: 'Email'),
),
TextFormField(
controller: messageController,
decoration: InputDecoration(hintText: 'Message'),
),
],
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text('Cancel'),
),
TextButton(
onPressed: () {
// Send them to your email maybe?
var email = emailController.text;
var message = messageController.text;
Navigator.pop(context);
},
child: Text('Send'),
),
],
);
},
);
}
get dialog flutter
static void showDialog({
required String title,
required int messageCode,
required String content,
}) {
Get.defaultDialog(
title: title + " #" + messageCode.toString(),
titleStyle: FontConstants.SFProDisplayBold(fontSize: 24,color: Colors.black),
content: Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
content,
style: FontConstants.SFProDisplayLight(fontSize: 20, color: Colors.black),
),
),
barrierDismissible: true,
radius: 5,
actions: [
RaisedButton(
onPressed: () {
Get.back();
},
child: Text(
'okay'.tr,
style:
FontConstants.SFProDisplayLight(fontSize: 22, color: ColorConstants.blueBold),
),
color: Colors.white,
),
]);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us