11import 'package:flutter/material.dart' ;
22
33import '../flutter_custom_dialog.dart' ;
4+ import 'dialog_item.dart' ;
45
56YYDialog YYAlertDialog1 (BuildContext context) {
67 return YYDialog ().build (context)
@@ -86,6 +87,53 @@ YYDialog YYAlertDialog3(BuildContext context) {
8687 ..show ();
8788}
8889
90+ var listTileItems = [
91+ ListTileItem (
92+ onTap: () {},
93+ padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
94+ leading: ClipOval (
95+ child: Image .network (
96+ "https://imgavater.ui.cn/avatar/3/3/4/9/1269433.jpg?imageMogr2/auto-orient/crop/!1219x1219a12a0/thumbnail/148x148" ,
97+ height: 50 ,
98+ width: 50 ,
99+ fit: BoxFit .cover,
100+ ),
101+ ),
102+ text: "user01@gmail.com" ,
103+ color: Colors .grey,
104+ fontSize: 16.0 ,
105+ ),
106+ ListTileItem (
107+ onTap: () {},
108+ padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
109+ leading: ClipOval (
110+ child: Image .network (
111+ "https://imgavater.ui.cn/avatar/1/4/7/8/958741.jpg?imageMogr2/auto-orient/crop/!563x563a377a167/thumbnail/60x60" ,
112+ height: 50 ,
113+ width: 50 ,
114+ fit: BoxFit .cover,
115+ ),
116+ ),
117+ text: "user02@gmail.com" ,
118+ color: Colors .grey,
119+ fontSize: 16.0 ,
120+ ),
121+ ListTileItem (
122+ onTap: () {},
123+ padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
124+ leading: ClipOval (
125+ child: Container (
126+ width: 50 ,
127+ height: 50 ,
128+ child: Icon (Icons .add, size: 30 , color: Colors .white),
129+ color: Colors .grey[500 ],
130+ )),
131+ text: "Add account" ,
132+ color: Colors .grey,
133+ fontSize: 16.0 ,
134+ ),
135+ ];
136+
89137YYDialog YYListTileDialog1 (BuildContext context) {
90138 return YYDialog ().build (context)
91139 ..width = 280
@@ -97,47 +145,7 @@ YYDialog YYListTileDialog1(BuildContext context) {
97145 fontSize: 18.0 ,
98146 fontWeight: FontWeight .w500,
99147 )
100- ..listTile (
101- padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
102- leading: ClipOval (
103- child: Image .network (
104- "https://imgavater.ui.cn/avatar/3/3/4/9/1269433.jpg?imageMogr2/auto-orient/crop/!1219x1219a12a0/thumbnail/148x148" ,
105- height: 50 ,
106- width: 50 ,
107- fit: BoxFit .cover,
108- ),
109- ),
110- text: "user01@gmail.com" ,
111- color: Colors .grey,
112- fontSize: 16.0 ,
113- )
114- ..listTile (
115- padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
116- leading: ClipOval (
117- child: Image .network (
118- "https://imgavater.ui.cn/avatar/1/4/7/8/958741.jpg?imageMogr2/auto-orient/crop/!563x563a377a167/thumbnail/60x60" ,
119- height: 50 ,
120- width: 50 ,
121- fit: BoxFit .cover,
122- ),
123- ),
124- text: "user02@gmail.com" ,
125- color: Colors .grey,
126- fontSize: 16.0 ,
127- )
128- ..listTile (
129- padding: EdgeInsets .fromLTRB (16.0 , 6.0 , 16.0 , 6.0 ),
130- leading: ClipOval (
131- child: Container (
132- width: 50 ,
133- height: 50 ,
134- child: Icon (Icons .add, size: 30 , color: Colors .white),
135- color: Colors .grey[500 ],
136- )),
137- text: "Add account" ,
138- color: Colors .grey,
139- fontSize: 16.0 ,
140- )
148+ ..listViewOfListTile (items: listTileItems)
141149 ..show ();
142150}
143151
0 commit comments