-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmydialoguebox.dart
43 lines (42 loc) · 1.17 KB
/
mydialoguebox.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void mydialoguebox() {
Get.defaultDialog(
title: "Getx Message",
middleText: "I'm Added!",
backgroundColor: Colors.cyan,
titleStyle: TextStyle(color: Colors.white,),
middleTextStyle: TextStyle(color: Colors.white,
fontSize: 20
),
onCancel: (){},
onConfirm: (){},
//actions: [
//OutlinedButton(onPressed: (){Get.back();}, child:Text("Cancel")),
//OutlinedButton(onPressed: (){Get.back();}, child:Text("Accept")),]
cancel: ElevatedButton(
onPressed: () {
Get.back();
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white, // Background color
),
child: Text(
"Cancel",
style: TextStyle(color: Colors.cyan), // Text color
),
),
confirm: ElevatedButton(
onPressed: () {
Get.back();
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white, // Background color
),
child: Text(
"Confirm",
style: TextStyle(color: Colors.cyan), // Text color
),
),
);
}