@@ -19,26 +19,78 @@ class YYDialog {
1919 return this ;
2020 }
2121
22+ YYDialog text ({padding, text, color, fontSize, alignment}) {
23+ return this .widget (
24+ Padding (
25+ padding: padding ?? EdgeInsets .all (0.0 ),
26+ child: Align (
27+ alignment: alignment ?? Alignment .centerLeft,
28+ child: Text (
29+ text ?? "" ,
30+ style: TextStyle (
31+ color: color ?? Colors .black,
32+ fontSize: fontSize ?? 14.0 ,
33+ ),
34+ ),
35+ ),
36+ ),
37+ );
38+ }
39+
40+ YYDialog doubleButton ({padding, text, color, fontSize}) {
41+ return this .widget (
42+ Padding (
43+ padding: padding ?? EdgeInsets .all (0.0 ),
44+ child: Row (
45+ mainAxisAlignment: MainAxisAlignment .end,
46+ children: < Widget > [
47+ FlatButton (
48+ onPressed: () {},
49+ child: Text (
50+ text ?? "" ,
51+ style: TextStyle (
52+ color: color ?? Colors .black,
53+ fontSize: fontSize ?? 14.0 ,
54+ ),
55+ ),
56+ ),
57+ FlatButton (
58+ onPressed: () {},
59+ child: Text (
60+ text ?? "" ,
61+ style: TextStyle (
62+ color: color ?? Colors .black,
63+ fontSize: fontSize ?? 14.0 ,
64+ ),
65+ ),
66+ )
67+ ],
68+ ),
69+ ),
70+ );
71+ }
72+
2273 void show () {
2374 Size size = MediaQuery .of (context).size;
2475 CustomDialog (
2576 context: context,
2677 child: Column (
78+ textDirection: TextDirection .ltr,
2779 mainAxisAlignment: mainAxisAlignment,
2880 children: < Widget > [
2981 Material (
3082 type: MaterialType .transparency,
3183 child: Container (
32- width: width,
33- height: height,
84+ width: width ?? null ,
85+ height: height ?? null ,
3486 decoration: decoration ??
3587 BoxDecoration (
3688 color: Colors .white,
3789 ),
3890 constraints: constraints ??
3991 BoxConstraints (
40- minHeight: size.height * .01 ,
41- minWidth: size.width * .01 ,
92+ minHeight: size.height * .1 ,
93+ minWidth: size.width * .1 ,
4294 ),
4395 child: Column (
4496 children: widgetList,
0 commit comments