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
| // Type 1 - GetX style
Get.defaultDialog(
title: "Hello Dialog",
middleText: "How\ncan\ni\nwrite\ntext\nin\nhere",
textConfirm: "Confirm",
onConfirm: () {
print("confirm");
},
confirm: TextButton(
child: Text("yes"),
onPressed: () {
Get.back();
},
),
);
// Type 2 - Flutter style
Get.dialog(
Dialog(
child: Container(
height: 100,
child: Center(
child: Text("hi"),
),
),
),
);
|