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 42fb527

Browse files
εΈƒε±€
1 parent 0052360 commit 42fb527

File tree

4 files changed

+198
-51
lines changed

4 files changed

+198
-51
lines changed

β€Ž.idea/workspace.xml

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

β€Žlib/components/bean/dialog_item.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,21 @@ class ListTileItem {
1919
FontWeight fontWeight;
2020
GestureTapCallback onTap;
2121
}
22+
23+
class RadioItem {
24+
RadioItem({
25+
this.padding,
26+
this.text,
27+
this.color,
28+
this.fontSize,
29+
this.fontWeight,
30+
this.onTap,
31+
});
32+
33+
EdgeInsets padding;
34+
String text;
35+
Color color;
36+
double fontSize;
37+
FontWeight fontWeight;
38+
GestureTapCallback onTap;
39+
}

β€Žlib/components/listview_dialog.dart

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ var listTileItems = [
3434
color: Colors.grey,
3535
fontSize: 16.0,
3636
),
37+
ListTileItem(
38+
onTap: () {},
39+
padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0),
40+
leading: ClipOval(
41+
child: Image.network(
42+
"https://imgavater.ui.cn/avatar/6/0/7/5/165706.png?imageMogr2/auto-orient/crop/!798x798a109a100/thumbnail/148x148",
43+
height: 50,
44+
width: 50,
45+
fit: BoxFit.cover,
46+
),
47+
),
48+
text: "user03@gmail.com",
49+
color: Colors.grey,
50+
fontSize: 16.0,
51+
),
3752
ListTileItem(
3853
onTap: () {},
3954
padding: EdgeInsets.fromLTRB(16.0, 6.0, 16.0, 6.0),
@@ -50,6 +65,72 @@ var listTileItems = [
5065
),
5166
];
5267

68+
var radioItems = [
69+
RadioItem(
70+
onTap: () {},
71+
padding: EdgeInsets.only(left: 6.0),
72+
text: "None",
73+
color: Colors.black,
74+
fontSize: 16.0,
75+
),
76+
RadioItem(
77+
onTap: () {},
78+
padding: EdgeInsets.only(left: 6.0),
79+
text: "Callisto",
80+
color: Colors.black,
81+
fontSize: 16.0,
82+
),
83+
RadioItem(
84+
onTap: () {},
85+
padding: EdgeInsets.only(left: 6.0),
86+
text: "Ganymede",
87+
color: Colors.black,
88+
fontSize: 16.0,
89+
),
90+
RadioItem(
91+
onTap: () {},
92+
padding: EdgeInsets.only(left: 6.0),
93+
text: "Luna",
94+
color: Colors.black,
95+
fontSize: 16.0,
96+
),
97+
RadioItem(
98+
onTap: () {},
99+
padding: EdgeInsets.only(left: 6.0),
100+
text: "Oberon",
101+
color: Colors.black,
102+
fontSize: 16.0,
103+
),
104+
RadioItem(
105+
onTap: () {},
106+
padding: EdgeInsets.only(left: 6.0),
107+
text: "Phobos",
108+
color: Colors.black,
109+
fontSize: 16.0,
110+
),
111+
RadioItem(
112+
onTap: () {},
113+
padding: EdgeInsets.only(left: 6.0),
114+
text: "Dione",
115+
color: Colors.black,
116+
fontSize: 16.0,
117+
),
118+
RadioItem(
119+
onTap: () {},
120+
padding: EdgeInsets.only(left: 6.0),
121+
text: "James",
122+
color: Colors.black,
123+
fontSize: 16.0,
124+
),
125+
RadioItem(
126+
onTap: () {},
127+
padding: EdgeInsets.only(left: 6.0),
128+
text: "Lina",
129+
color: Colors.black,
130+
fontSize: 16.0,
131+
),
132+
];
133+
53134
YYDialog YYListViewDialog1(BuildContext context) {
54135
return YYDialog().build(context)
55136
..width = 280
@@ -70,15 +151,17 @@ YYDialog YYListViewDialog2(BuildContext context) {
70151
..width = 280
71152
..borderRadius = 4.0
72153
..text(
73-
padding: EdgeInsets.fromLTRB(18.0, 18.0, 18.0, 12.0),
154+
padding: EdgeInsets.fromLTRB(18.0, 22.0, 18.0, 18.0),
74155
text: "Phone ringtone",
75156
color: Colors.black,
76157
fontSize: 18.0,
77158
fontWeight: FontWeight.w500,
78159
)
79160
..divider()
161+
..listViewOfRadioButton(items: radioItems, height: 370)
162+
..divider()
80163
..doubleButton(
81-
padding: EdgeInsets.only(top: 10.0),
164+
padding: EdgeInsets.only(top: 8.0, bottom:8.0),
82165
mainAxisAlignment: MainAxisAlignment.end,
83166
text1: "CANCEL",
84167
color1: Colors.deepPurpleAccent,

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /