@@ -39,6 +39,9 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
3939 super .dispose ();
4040 }
4141
42+ bool fav= false ;
43+ bool fav1= false ;
44+ bool fav2 = false ;
4245 @override
4346 Widget build (BuildContext context) {
4447 return Scaffold (
@@ -84,7 +87,7 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
8487 tabBarColor: getGFColor (GFColor .light),
8588 indicatorSize: TabBarIndicatorSize .tab,
8689 labelColor: getGFColor (GFColor .white),
87- unselectedLabelColor: Colors .white ,
90+ unselectedLabelColor: getGFColor ( GFColor .dark) ,
8891 indicator: BoxDecoration (
8992 color: Colors .black,
9093 border: Border (bottom: BorderSide (color: getGFColor (GFColor .success), width: 3.0 ,),),
@@ -117,12 +120,17 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
117120 title: GFListTile (
118121 title: Text (
119122 'Card Title' ,
120- style: TextStyle (color: Colors .grey),
121123 ),
122124 icon:
123125 GFIconButton (
124126 onPressed: null ,
125- icon: Icon (Icons .favorite_border),
127+ icon: GestureDetector (
128+ onTap: (){
129+ setState (() {fav = ! fav;
130+ });
131+ },
132+ child: fav? Icon (Icons .favorite, color: getGFColor (GFColor .danger),): Icon (Icons .favorite_border),
133+ ),
126134 type: GFType .transparent,
127135 ),
128136
@@ -134,8 +142,8 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
134142 buttonBar: GFButtonBar (
135143 alignment: MainAxisAlignment .start,
136144 children: < Widget > [
137- GFButton (onPressed: (){},text: 'Button ' , ),
138- GFButton (onPressed: (){},text: 'Button ' , )
145+ GFButton (onPressed: (){},text: 'Read More ' , ),
146+ GFButton (onPressed: (){},text: 'Send ' , )
139147 ],
140148 ),
141149
@@ -151,12 +159,17 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
151159 title: GFListTile (
152160 title: Text (
153161 'Card Title' ,
154- style: TextStyle (color: Colors .grey),
155162 ),
156163 icon:
157164 GFIconButton (
158165 onPressed: null ,
159- icon: Icon (Icons .favorite_border),
166+ icon: GestureDetector (
167+ onTap: (){
168+ setState (() {fav1 = ! fav1;
169+ });
170+ },
171+ child: fav1? Icon (Icons .favorite, color: getGFColor (GFColor .danger),): Icon (Icons .favorite_border),
172+ ),
160173 type: GFType .transparent,
161174 ),
162175
@@ -190,7 +203,6 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
190203 title: GFListTile (
191204 title: Text (
192205 'Card Title' ,
193- style: TextStyle (color: Colors .grey),
194206 ),
195207 showDivider: false ,
196208
@@ -202,7 +214,7 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
202214 buttonBar: GFButtonBar (
203215 alignment: MainAxisAlignment .start,
204216 children: < Widget > [
205- GFButton (onPressed: (){},text: 'Button ' , )
217+ GFButton (onPressed: (){},text: 'Share ' , )
206218 ],
207219 ),
208220
@@ -218,7 +230,6 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
218230 title: GFListTile (
219231 title: Text (
220232 'Card Title' ,
221- style: TextStyle (color: Colors .grey),
222233 ),
223234 showDivider: false ,
224235
@@ -230,8 +241,8 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
230241 buttonBar: GFButtonBar (
231242 alignment: MainAxisAlignment .start,
232243 children: < Widget > [
233- GFButton (onPressed: (){},text: 'Button ' , ),
234- GFButton (onPressed: (){},text: 'Button ' , )
244+ GFButton (onPressed: (){},text: 'View More ' , ),
245+ GFButton (onPressed: (){},text: 'Share ' , )
235246 ],
236247 ),
237248
@@ -255,16 +266,21 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
255266 backgroundImage: AssetImage ('lib/assets/images/three3.png' ),
256267 ),
257268 title: Text (
258- 'title' ,
259- style: TextStyle (color: Colors .grey),
269+ 'Card Title' ,
260270 ),
261271 subTitle: Text (
262272 'subtitle' ,
263273 style: TextStyle (color: Colors .grey),
264274 ),
265275 icon: GFIconButton (
266276 onPressed: null ,
267- icon: Icon (Icons .favorite_border),
277+ icon: GestureDetector (
278+ onTap: (){
279+ setState (() {fav2 = ! fav2;
280+ });
281+ },
282+ child: fav2? Icon (Icons .favorite, color: getGFColor (GFColor .danger),): Icon (Icons .favorite_border),
283+ ),
268284 type: GFType .transparent,
269285 ),
270286 ),
@@ -273,57 +289,9 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
273289 "Flutter Flutter is Google's mobile UI framework for crafting" ,
274290 style: TextStyle (color: Colors .grey),
275291 ),
276- // buttonBar: GFButtonBar(
277- // mainAxisSize: MainAxisSize.min,
278- // children: <Widget>[
279- // GFButton(
280- // onPressed: null,
281- // child: Text("favorite"),
282- // icon: Icon(Icons.favorite_border),
283- // type: GFType.transparent,
284- // ),
285- // GFButton(
286- // onPressed: null,
287- // child: Text("share"),
288- // icon: Icon(Icons.share),
289- // type: GFType.outline,
290- // ),
291- // ],
292- // ),
293292 ),
294293
295- // GFCard(
296- // boxFit: BoxFit.fill,
297- // colorFilter: new ColorFilter.mode(
298- // Colors.black.withOpacity(0.67), BlendMode.darken),
299- // image: Image.asset('lib/assets/images/image.png'),
300294//
301- // titlePosition: GFPosition.end,
302- // title: GFListTile(
303- // avatar: GFAvatar(
304- // backgroundImage: AssetImage('lib/assets/images/avatar3.png'),
305- // ),
306- // title: Text(
307- // 'Card Title',
308- // style: TextStyle(color: Colors.grey),
309- // ),
310- // subTitle: Text('Subtitle'),
311- //
312- // ),
313- // content: Text(
314- // "Some quick example text to build on the card",
315- // style: TextStyle(color: Colors.grey),
316- // ),
317- // buttonBar: GFButtonBar(
318- // alignment: MainAxisAlignment.start,
319- // children: <Widget>[
320- // GFButton(onPressed: (){},text: 'Button', ),
321- // GFButton(onPressed: (){},text: 'Button', )
322- // ],
323- // ),
324- //
325- // ),
326-
327295 GFCard (
328296 boxFit: BoxFit .cover,
329297 colorFilter: new ColorFilter .mode (
@@ -337,7 +305,6 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
337305 ),
338306 title: Text (
339307 'Card Title' ,
340- style: TextStyle (color: Colors .grey),
341308 ),
342309 subTitle: Text ('Subtitle' ),
343310
@@ -386,10 +353,7 @@ class _CardPageState extends State<CardPage> with SingleTickerProviderStateMixin
386353avatar: GFAvatar (
387354 backgroundImage: AssetImage ('lib/assets/images/three5.png' ),
388355),
389- title: Text (
390- 'title' ,
391- style: TextStyle (color: Colors .grey),
392- ),
356+ title: Text ('Card Title' , style: TextStyle (color: Colors .grey, fontWeight: FontWeight .w500),),
393357 subTitle: Text (
394358 'subtitle' ,
395359 style: TextStyle (color: Colors .grey),
@@ -408,8 +372,8 @@ avatar: GFAvatar(
408372 buttonBar: GFButtonBar (
409373 alignment: MainAxisAlignment .center,
410374 children: < Widget > [
411- GFButton (onPressed: (){}, text: 'Button ' ,),
412- GFButton (onPressed: (){}, text: 'Button ' ,)
375+ GFButton (onPressed: (){}, text: 'Send ' ,),
376+ GFButton (onPressed: (){}, text: 'View ' ,)
413377 ],
414378 ),
415379
@@ -422,8 +386,8 @@ imageOverlay: AssetImage('lib/assets/images/image1.png'),
422386 title: GFListTile (
423387
424388 title: Text (
425- 'title ' ,
426- style: TextStyle (color: Colors .grey),
389+ 'Card Title ' ,
390+ style: TextStyle (color: Colors .grey, fontWeight : FontWeight .w500 ),
427391 ),
428392 subTitle: Text (
429393 'subtitle' ,
0 commit comments