@@ -30,6 +30,7 @@ import 'package:flutter/cupertino.dart';
3030import 'package:ui_kit/size/gf_size.dart' ;
3131import 'package:ui_kit/position/gf_position.dart' ;
3232import 'package:ui_kit/components/tabs/gf_tabs.dart' ;
33+ import 'package:ui_kit/components/slider/carousel.dart' ;
3334
3435final List <String > imageList = [
3536 "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg" ,
@@ -78,102 +79,116 @@ class _MyHomePageState extends State<MyHomePage> {
7879 crossAxisAlignment: CrossAxisAlignment .center,
7980 children: < Widget > [
8081
81- GFSlider (
82+ Carousel (
83+ rowCount: 3 ,
84+ children: [
85+ 'Item 1' ,
86+ 'Item 2' ,
87+ 'Item 3' ,
88+ 'Item 4' ,
89+ 'Item 5' ,
90+ 'Item 6' ,
91+ ].map ((String itemText) {
92+ return DefaultCarouselItem (itemText);
93+ }).toList ()
94+ ),
95+
96+ // GFSlider(
8297// pagerSize: 12.0,
8398// activeIndicator: Colors.pink,
8499// passiveIndicator: Colors.pink.withOpacity(0.4),
85- viewportFraction: 0.9 ,
86- aspectRatio: 2.0 ,
87- // autoPlay: true,
88- enlargeMainPage: true ,
89- pagination: true ,
90- items: imageList.map (
91- (url) {
92- return Container (
93- margin: EdgeInsets .all (5.0 ),
94- child: ClipRRect (
95- borderRadius: BorderRadius .all (Radius .circular (5.0 )),
96- child: Image .network (
97- url,
98- fit: BoxFit .cover,
99- width: 1000.0 ,
100- ),
101- ),
102- );
103- },
104- ).toList (),
105- onPageChanged: (index) {
106- setState (() {
107- index;
108- });
109- },
110- ),
100+ // viewportFraction: 0.9,
101+ // aspectRatio: 2.0,
102+ //// autoPlay: true,
103+ // enlargeMainPage: true,
104+ // pagination: true,
105+ // items: imageList.map(
106+ // (url) {
107+ // return Container(
108+ // margin: EdgeInsets.all(5.0),
109+ // child: ClipRRect(
110+ // borderRadius: BorderRadius.all(Radius.circular(5.0)),
111+ // child: Image.network(
112+ // url,
113+ // fit: BoxFit.cover,
114+ // width: 1000.0
115+ // ),
116+ // ),
117+ // );
118+ // },
119+ // ).toList(),
120+ // onPageChanged: (index) {
121+ // setState(() {
122+ // index;
123+ // });
124+ // },
125+ // ),
111126
112- GFButton (
113- color: Colors .orange,
114- onPressed: null ,
115- child: Text ("share" ),
116- type: GFType .outline,
117- shape: GFShape .pills,
118- // buttonBoxShadow: true,
119- // boxShadow: BoxShadow(
120- // color: Colors.pink,
121- // blurRadius: 1.5,
122- // spreadRadius: 2.0,
123- // offset: Offset.zero,
124- // ),
125- ),
127+ // GFButton(
128+ // color: Colors.orange,
129+ // onPressed: null,
130+ // child: Text("share"),
131+ // type: GFType.outline,
132+ // shape: GFShape.pills,
133+ //// buttonBoxShadow: true,
134+ //// boxShadow: BoxShadow(
135+ //// color: Colors.pink,
136+ //// blurRadius: 1.5,
137+ //// spreadRadius: 2.0,
138+ //// offset: Offset.zero,
139+ //// ),
140+ // ),
126141
127- GFTabs (
128- initialIndex: 0 ,
129- length: 3 ,
130- tabs: < Widget > [
131- GFButton (
132- onPressed: null ,
133- child: Text ("share" ),
134- icon: Icon (Icons .share),
135- buttonBoxShadow: true ,
136- ),
137- Tab (
138- icon: Icon (Icons .error),
139- child: Text (
140- "Orders" ,
141- ),
142- ),
143- Tab (
144- child: Text (
145- "Pastry" ,
146- ),
147- ),
148- ],
149- tabBarView: TabBarView (
150- children: < Widget > [
151- Container (
152- color: Colors .red,
153- child: Column (
154- mainAxisAlignment: MainAxisAlignment .center,
155- crossAxisAlignment: CrossAxisAlignment .center,
156- children: < Widget > [
157- RawMaterialButton (
158- onPressed: null ,
159- child: Text ("fv" ),
160- ),
161- FlatButton (onPressed: null , child: Text ("cds" )),
162- Icon (Icons .directions_railway),
163- GFButton (
164- onPressed: null ,
165- child: Text ("share" ),
166- icon: Icon (Icons .share),
167- shape: GFShape .pills,
168- type: GFType .transparent,
169- ),
170- ],
171- ),
172- ),
173- Icon (Icons .directions_car),
174- Icon (Icons .directions_transit),
175- ],
176- ),
142+ // GFTabs(
143+ // initialIndex: 0,
144+ // length: 3,
145+ // tabs: <Widget>[
146+ // GFButton(
147+ // onPressed: null,
148+ // child: Text("share"),
149+ // icon: Icon(Icons.share),
150+ // buttonBoxShadow: true,
151+ // ),
152+ // Tab(
153+ // icon: Icon(Icons.error),
154+ // child: Text(
155+ // "Orders",
156+ // ),
157+ // ),
158+ // Tab(
159+ // child: Text(
160+ // "Pastry",
161+ // ),
162+ // ),
163+ // ],
164+ // tabBarView: TabBarView(
165+ // children: <Widget>[
166+ // Container(
167+ // color: Colors.red,
168+ // child: Column(
169+ // mainAxisAlignment: MainAxisAlignment.center,
170+ // crossAxisAlignment: CrossAxisAlignment.center,
171+ // children: <Widget>[
172+ // RawMaterialButton(
173+ // onPressed: null,
174+ // child: Text("fv"),
175+ // ),
176+ // FlatButton(onPressed: null, child: Text("cds")),
177+ // Icon(Icons.directions_railway),
178+ // GFButton(
179+ // onPressed: null,
180+ // child: Text("share"),
181+ // icon: Icon(Icons.share),
182+ // shape: GFShape.pills,
183+ // type: GFType.transparent,
184+ // ),
185+ // ],
186+ // ),
187+ // ),
188+ // Icon(Icons.directions_car),
189+ // Icon(Icons.directions_transit),
190+ // ],
191+ // ),
177192// indicatorColor: Colors.teal,
178193// indicatorSize: TabBarIndicatorSize.label,
179194// labelColor: Colors.lightGreen,
@@ -190,7 +205,7 @@ class _MyHomePageState extends State<MyHomePage> {
190205// color: Colors.black,
191206// fontFamily: 'OpenSansBold',
192207// ),
193- ),
208+ // ),
194209
195210// GFSlider(
196211// autoPlay: true,
@@ -217,77 +232,80 @@ class _MyHomePageState extends State<MyHomePage> {
217232// });
218233// },
219234// ),
220- GFCard (
221- boxFit: BoxFit .cover,
222- colorFilter: new ColorFilter .mode (
223- Colors .black.withOpacity (0.67 ), BlendMode .darken),
224- image: Image .asset ("lib/assets/food.jpeg" ),
225- // imageOverlay: AssetImage("lib/assets/food.jpeg"),
226- titlePosition: GFPosition .end,
227- title: GFListTile (
228- avatar: GFAvatar (
229- child: Text ("tb" ),
230- ),
231- title: Text (
232- 'title' ,
233- style: TextStyle (color: Colors .grey),
234- ),
235- subTitle: Text (
236- 'subtitle' ,
237- style: TextStyle (color: Colors .grey),
238- ),
239- icon: GFIconButton (
240- onPressed: null ,
241- icon: Icon (Icons .favorite_border),
242- type: GFType .transparent,
243- ),
244- ),
245- content: Text (
246- "Flutter "
247- "Flutter is Google's mobile UI framework for crafting"
248- " high-quality native interfaces on iOS and Android in "
249- "Flutter " ,
250- style: TextStyle (color: Colors .grey),
251- ),
252- buttonBar: GFButtonBar (
253- mainAxisSize: MainAxisSize .min,
254- children: < Widget > [
255- GFButton (
256- onPressed: null ,
257- child: Text ("favorite" ),
258- icon: Icon (Icons .favorite_border),
259- type: GFType .transparent,
260- ),
261- GFButton (
262- onPressed: null ,
263- child: Text ("share" ),
264- icon: Icon (Icons .share),
265- type: GFType .outline,
266- ),
267- ],
268- ),
269- ),
270- GFButtonBar (
271- mainAxisSize: MainAxisSize .min,
272- children: < Widget > [
273- GFButton (
274- onPressed: null ,
275- child: Text ("like" ),
276- icon: Icon (Icons .favorite_border),
277- type: GFType .transparent,
278- ),
279- GFButton (
280- onPressed: null ,
281- child: Text ("comment" ),
282- ),
235+ // GFCard(
236+ // boxFit: BoxFit.cover,
237+ // colorFilter: new ColorFilter.mode(
238+ // Colors.black.withOpacity(0.67), BlendMode.darken),
239+ // image: Image.asset("lib/assets/food.jpeg"),
240+ //// imageOverlay: AssetImage("lib/assets/food.jpeg"),
241+ // titlePosition: GFPosition.end,
242+ // title: GFListTile(
243+ // avatar: GFAvatar(
244+ // child: Text("tb"),
245+ // ),
246+ // title: Text(
247+ // 'title',
248+ // style: TextStyle(color: Colors.grey),
249+ // ),
250+ // subTitle: Text(
251+ // 'subtitle',
252+ // style: TextStyle(color: Colors.grey),
253+ // ),
254+ // icon: GFIconButton(
255+ // onPressed: null,
256+ // icon: Icon(Icons.favorite_border),
257+ // type: GFType.transparent,
258+ // ),
259+ // ),
260+ // content: Text(
261+ // "Flutter "
262+ // "Flutter is Google's mobile UI framework for crafting"
263+ // " high-quality native interfaces on iOS and Android in "
264+ // "Flutter ",
265+ // style: TextStyle(color: Colors.grey),
266+ // ),
267+ // buttonBar: GFButtonBar(
268+ // mainAxisSize: MainAxisSize.min,
269+ // children: <Widget>[
270+ // GFButton(
271+ // onPressed: null,
272+ // child: Text("favorite"),
273+ // icon: Icon(Icons.favorite_border),
274+ // type: GFType.transparent,
275+ // ),
276+ // GFButton(
277+ // onPressed: null,
278+ // child: Text("share"),
279+ // icon: Icon(Icons.share),
280+ // type: GFType.outline,
281+ // ),
282+ // ],
283+ // ),
284+ // ),
285+ // GFButtonBar(
286+ // mainAxisSize: MainAxisSize.min,
287+ // children: <Widget>[
288+ // GFButton(
289+ // onPressed: null,
290+ // child: Text("like"),
291+ // icon: Icon(Icons.favorite_border),
292+ // type: GFType.transparent,
293+ // ),
294+ // GFButton(
295+ // onPressed: null,
296+ // child: Text("comment"),
297+ // ),
283298 GFButton (
284- onPressed: null ,
299+ color: Colors .teal,
300+ onPressed: (){},
285301 child: Text ("share" ),
286302 icon: Icon (Icons .share),
287303 type: GFType .outline,
288304 ),
289- ],
290- ),
305+ // ],
306+ // ),
307+
308+
291309// GFListItem(
292310// avatar: GFAvatar(
293311// child: Text("tb"),
0 commit comments