@@ -30,13 +30,16 @@ 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' ;
33+ import 'package:ui_kit/components/slider/gf_items_slider.dart' ;
34+ import 'package:ui_kit/components/drawer/gf_drawer.dart' ;
3435
3536final List <String > imageList = [
3637 "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg" ,
3738 "https://cdn.pixabay.com/photo/2017/12/13/00/23/christmas-3015776_960_720.jpg" ,
3839 "https://cdn.pixabay.com/photo/2019/12/19/10/55/christmas-market-4705877_960_720.jpg" ,
39- "https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg"
40+ "https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg" ,
41+ "https://cdn.pixabay.com/photo/2019/12/22/04/18/x-mas-4711785__340.jpg" ,
42+ "https://cdn.pixabay.com/photo/2016/11/22/07/09/spruce-1848543__340.jpg"
4043];
4144
4245void main () => runApp (MyApp ());
@@ -69,18 +72,49 @@ class _MyHomePageState extends State<MyHomePage> {
6972 @override
7073 Widget build (BuildContext context) {
7174 return Scaffold (
75+ drawer: GFDrawer (
76+ child: ListView (
77+ padding: EdgeInsets .zero,
78+ children: < Widget > [
79+ UserAccountsDrawerHeader (),
80+ DrawerHeader (
81+ child: Column (
82+ children: < Widget > [
83+ Text ('Drawer Header' ),
84+ Text ('Drawer Header' ),
85+ Text ('Drawer Header' ),
86+ ],
87+ ),
88+ decoration: BoxDecoration (
89+ color: Colors .blue,
90+ ),
91+ ),
92+ ListTile (
93+ title: Text ('Item 1' ),
94+ onTap: () {
95+ },
96+ ),
97+ ListTile (
98+ title: Text ('Item 2' ),
99+ onTap: () {
100+ },
101+ ),
102+ ],
103+ ),
104+ ),
72105 backgroundColor: Colors .cyanAccent,
73106 appBar: AppBar (
74107 title: Text (widget.title),
108+
75109 ),
76110 body: SingleChildScrollView (
77111 child: Column (
78112 mainAxisAlignment: MainAxisAlignment .center,
79113 crossAxisAlignment: CrossAxisAlignment .center,
80114 children: < Widget > [
81115
82- Carousel (
83- rowCount: 2 ,
116+ GFItemsSlider (
117+ rowCount: 3 ,
84118 children: imageList.map (
85119 (url) {
86120 return Container (
@@ -99,13 +133,13 @@ class _MyHomePageState extends State<MyHomePage> {
99133 ),
100134
101135 GFSlider (
102- rowCount: 2 ,
136+ rowCount: 3 ,
103137 pagerSize: 12.0 ,
104138 activeIndicator: Colors .pink,
105139 passiveIndicator: Colors .pink.withOpacity (0.4 ),
106140 viewportFraction: 1.0 ,
107141 aspectRatio: 2.0 ,
108- autoPlay: true ,
142+ autoPlay: true ,
109143 enlargeMainPage: true ,
110144 pagination: true ,
111145 items: imageList.map (
@@ -145,73 +179,73 @@ class _MyHomePageState extends State<MyHomePage> {
145179//// ),
146180// ),
147181
148- // GFTabs(
149- // initialIndex: 0,
150- // length: 3,
151- // tabs: <Widget>[
152- // GFButton(
153- // onPressed: null,
154- // child: Text("share"),
155- // icon: Icon(Icons.share),
156- // buttonBoxShadow: true,
157- // ),
158- // Tab(
159- // icon: Icon(Icons.error),
160- // child: Text(
161- // "Orders",
162- // ),
163- // ),
164- // Tab(
165- // child: Text(
166- // "Pastry",
167- // ),
168- // ),
169- // ],
170- // tabBarView: TabBarView(
171- // children: <Widget>[
172- // Container(
173- // color: Colors.red,
174- // child: Column(
175- // mainAxisAlignment: MainAxisAlignment.center,
176- // crossAxisAlignment: CrossAxisAlignment.center,
177- // children: <Widget>[
178- // RawMaterialButton(
179- // onPressed: null,
180- // child: Text("fv"),
181- // ),
182- // FlatButton(onPressed: null, child: Text("cds")),
183- // Icon(Icons.directions_railway),
184- // GFButton(
185- // onPressed: null,
186- // child: Text("share"),
187- // icon: Icon(Icons.share),
188- // shape: GFShape.pills,
189- // type: GFType.transparent,
190- // ),
191- // ],
192- // ),
193- // ),
194- // Icon(Icons.directions_car),
195- // Icon(Icons.directions_transit),
196- // ],
197- // ),
198- // indicatorColor: Colors.teal,
199- // indicatorSize: TabBarIndicatorSize.label,
200- // labelColor: Colors.lightGreen,
201- // unselectedLabelColor: Colors.black,
202- // labelStyle: TextStyle(
203- // fontWeight: FontWeight.w500,
204- // fontSize: 13.0,
205- // color: Colors.deepOrange,
206- // fontFamily: 'OpenSansBold',
207- // ),
208- // unselectedLabelStyle: TextStyle(
209- // fontWeight: FontWeight.w500,
210- // fontSize: 13.0,
211- // color: Colors.black,
212- // fontFamily: 'OpenSansBold',
213- // ),
214- // ),
182+ GFTabs (
183+ initialIndex: 0 ,
184+ length: 3 ,
185+ tabs: < Widget > [
186+ GFButton (
187+ onPressed: null ,
188+ child: Text ("share" ),
189+ icon: Icon (Icons .share),
190+ buttonBoxShadow: true ,
191+ ),
192+ Tab (
193+ icon: Icon (Icons .error),
194+ child: Text (
195+ "Orders" ,
196+ ),
197+ ),
198+ Tab (
199+ child: Text (
200+ "Pastry" ,
201+ ),
202+ ),
203+ ],
204+ tabBarView: TabBarView (
205+ children: < Widget > [
206+ Container (
207+ color: Colors .red,
208+ child: Column (
209+ mainAxisAlignment: MainAxisAlignment .center,
210+ crossAxisAlignment: CrossAxisAlignment .center,
211+ children: < Widget > [
212+ RawMaterialButton (
213+ onPressed: null ,
214+ child: Text ("fv" ),
215+ ),
216+ FlatButton (onPressed: null , child: Text ("cds" )),
217+ Icon (Icons .directions_railway),
218+ GFButton (
219+ onPressed: null ,
220+ child: Text ("share" ),
221+ icon: Icon (Icons .share),
222+ shape: GFShape .pills,
223+ type: GFType .transparent,
224+ ),
225+ ],
226+ ),
227+ ),
228+ Icon (Icons .directions_car),
229+ Icon (Icons .directions_transit),
230+ ],
231+ ),
232+ indicatorColor: Colors .teal,
233+ indicatorSize: TabBarIndicatorSize .label,
234+ labelColor: Colors .lightGreen,
235+ unselectedLabelColor: Colors .black,
236+ labelStyle: TextStyle (
237+ fontWeight: FontWeight .w500,
238+ fontSize: 13.0 ,
239+ color: Colors .deepOrange,
240+ fontFamily: 'OpenSansBold' ,
241+ ),
242+ unselectedLabelStyle: TextStyle (
243+ fontWeight: FontWeight .w500,
244+ fontSize: 13.0 ,
245+ color: Colors .black,
246+ fontFamily: 'OpenSansBold' ,
247+ ),
248+ ),
215249
216250// GFSlider(
217251// autoPlay: true,
0 commit comments