Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0b3ce8c

Browse files
布局
1 parent 129973b commit 0b3ce8c

File tree

4 files changed

+128
-44
lines changed

4 files changed

+128
-44
lines changed

‎.idea/workspace.xml

Lines changed: 76 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎example/lib/main.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class AppHome extends StatelessWidget {
2323
children: <Widget>[
2424
showAlertDialog(context),
2525
showListTileDialog(context),
26+
showListViewDialog(context),
2627
],
2728
),
2829
),
@@ -65,6 +66,22 @@ showListTileDialog(BuildContext context) {
6566
);
6667
}
6768

69+
showListViewDialog(BuildContext context) {
70+
return Column(
71+
crossAxisAlignment: CrossAxisAlignment.start,
72+
children: <Widget>[
73+
Text("YYListViewDialog:"),
74+
Row(
75+
children: <Widget>[
76+
makeTextButton("1", () {
77+
YYListViewDialog1(context);
78+
}),
79+
],
80+
),
81+
],
82+
);
83+
}
84+
6885
Widget makeTextButton(title, Function() function) {
6986
return RaisedButton(
7087
onPressed: () {

‎lib/components/dialog.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,29 @@ YYDialog YYListTileDialog1(BuildContext context) {
107107
)
108108
..show();
109109
}
110+
111+
YYDialog YYListViewDialog1(BuildContext context) {
112+
return YYDialog().build(context)
113+
..width = 280
114+
..borderRadius = 4.0
115+
..text(
116+
padding: EdgeInsets.fromLTRB(18.0, 18.0, 18.0, 12.0),
117+
text: "Phone ringtone",
118+
color: Colors.black,
119+
fontSize: 18.0,
120+
)
121+
..divider()
122+
..doubleButton(
123+
padding: EdgeInsets.only(top: 10.0),
124+
mainAxisAlignment: MainAxisAlignment.end,
125+
text1: "CANCEL",
126+
color1: Colors.deepPurpleAccent,
127+
fontSize1: 14.0,
128+
fontWeight1: FontWeight.bold,
129+
text2: "OK",
130+
color2: Colors.deepPurpleAccent,
131+
fontSize2: 14.0,
132+
fontWeight2: FontWeight.bold,
133+
)
134+
..show();
135+
}

‎lib/flutter_custom_dialog.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ class YYDialog {
118118
);
119119
}
120120

121+
YYDialog divider({color, height}) {
122+
return this.widget(
123+
Divider(
124+
color: color ?? Colors.grey[300],
125+
height: height ?? 0.1,
126+
),
127+
);
128+
}
129+
121130
void show() {
122131
Size size = MediaQuery.of(context).size;
123132
CustomDialog(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /