Skip to content

Commit 6060962

Browse files
committed
button outline with boxshadow fixed
1 parent e5d976c commit 6060962

3 files changed

Lines changed: 211 additions & 224 deletions

File tree

example/lib/main.dart

Lines changed: 143 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class _MyHomePageState extends State<MyHomePage> {
6767
@override
6868
Widget build(BuildContext context) {
6969
return Scaffold(
70-
backgroundColor: Colors.grey,
70+
backgroundColor: Colors.orange,
7171
appBar: AppBar(
7272
title: Text(widget.title),
7373
),
@@ -145,71 +145,79 @@ class _MyHomePageState extends State<MyHomePage> {
145145
child: Text("share"),
146146
type: GFType.outline,
147147
shape: GFShape.standard,
148+
buttonBoxShadow: true,
149+
// boxShadow: BoxShadow(
150+
// color: Colors.pink.withOpacity(0.4),
151+
// blurRadius: 1.5,
152+
// spreadRadius: 2.0,
153+
// offset: Offset.zero,
154+
// ),
148155
),
149-
//
150-
// GFTabs(
151-
// initialIndex: 0,
152-
// length: 3,
153-
// tabs: <Widget>[
154-
// GFButton(
155-
// onPressed: null,
156-
// child: Text("share"),
157-
// icon: Icon(Icons.share),
158-
// ),
159-
// Tab(
160-
// icon: Icon(Icons.error),
161-
// child: Text(
162-
// "Orders",
163-
// ),
164-
// ),
165-
// Tab(
166-
// child: Text(
167-
// "Pastry",
168-
// ),
169-
// ),
170-
// ],
171-
// tabBarView: TabBarView(
172-
// children: <Widget>[
173-
// Container(
174-
// color: Colors.red,
175-
// child: Column(
176-
// mainAxisAlignment: MainAxisAlignment.center,
177-
// crossAxisAlignment: CrossAxisAlignment.center,
178-
// children: <Widget>[
179-
// RawMaterialButton(onPressed: null, child: Text("fv"),),
180-
// FlatButton(onPressed: null, child: Text("cds")),
181-
// Icon(Icons.directions_railway),
182-
// GFButton(
183-
// onPressed: null,
184-
// child: Text("share"),
185-
// icon: Icon(Icons.share),
186-
//// shape: GFShape.pills,
187-
// type: GFType.transparent,
188-
// ),
189-
// ],
190-
// ),
191-
// ),
192-
// Icon(Icons.directions_car),
193-
// Icon(Icons.directions_transit),
194-
// ],
156+
157+
GFTabs(
158+
initialIndex: 0,
159+
length: 3,
160+
tabs: <Widget>[
161+
GFButton(
162+
onPressed: null,
163+
child: Text("share"),
164+
icon: Icon(Icons.share),
165+
buttonBoxShadow: true,
166+
),
167+
Tab(
168+
icon: Icon(Icons.error),
169+
child: Text(
170+
"Orders",
171+
),
172+
),
173+
Tab(
174+
child: Text(
175+
"Pastry",
176+
),
177+
),
178+
],
179+
tabBarView: TabBarView(
180+
children: <Widget>[
181+
Container(
182+
color: Colors.red,
183+
child: Column(
184+
mainAxisAlignment: MainAxisAlignment.center,
185+
crossAxisAlignment: CrossAxisAlignment.center,
186+
children: <Widget>[
187+
RawMaterialButton(onPressed: null, child: Text("fv"),),
188+
FlatButton(onPressed: null, child: Text("cds")),
189+
Icon(Icons.directions_railway),
190+
GFButton(
191+
onPressed: null,
192+
child: Text("share"),
193+
icon: Icon(Icons.share),
194+
shape: GFShape.pills,
195+
type: GFType.transparent,
196+
),
197+
],
198+
),
199+
),
200+
Icon(Icons.directions_car),
201+
Icon(Icons.directions_transit),
202+
],
203+
),
204+
// indicatorColor: Colors.teal,
205+
// indicatorSize: TabBarIndicatorSize.label,
206+
// labelColor: Colors.lightGreen,
207+
// unselectedLabelColor: Colors.black,
208+
// labelStyle: TextStyle(
209+
// fontWeight: FontWeight.w500,
210+
// fontSize: 13.0,
211+
// color: Colors.deepOrange,
212+
// fontFamily: 'OpenSansBold',
195213
// ),
196-
//// indicatorColor: Colors.teal,
197-
//// indicatorSize: TabBarIndicatorSize.label,
198-
//// labelColor: Colors.lightGreen,
199-
//// unselectedLabelColor: Colors.black,
200-
//// labelStyle: TextStyle(
201-
//// fontWeight: FontWeight.w500,
202-
//// fontSize: 13.0,
203-
//// color: Colors.deepOrange,
204-
//// fontFamily: 'OpenSansBold',
205-
//// ),
206-
//// unselectedLabelStyle: TextStyle(
207-
//// fontWeight: FontWeight.w500,
208-
//// fontSize: 13.0,
209-
//// color: Colors.black,
210-
//// fontFamily: 'OpenSansBold',
211-
//// ),
212-
// ),
214+
// unselectedLabelStyle: TextStyle(
215+
// fontWeight: FontWeight.w500,
216+
// fontSize: 13.0,
217+
// color: Colors.black,
218+
// fontFamily: 'OpenSansBold',
219+
// ),
220+
),
213221

214222
// GFSlider(
215223
// autoPlay: true,
@@ -236,77 +244,77 @@ class _MyHomePageState extends State<MyHomePage> {
236244
// });
237245
// },
238246
// ),
239-
// GFCard(
240-
// boxFit: BoxFit.cover,
241-
// colorFilter: new ColorFilter.mode(
242-
// Colors.black.withOpacity(0.67), BlendMode.darken),
243-
// image: Image.asset("lib/assets/food.jpeg"),
244-
//// imageOverlay: AssetImage("lib/assets/food.jpeg"),
245-
// titlePosition: GFPosition.end,
246-
// title: GFListItem(
247-
// avatar: GFAvatar(
248-
// child: Text("tb"),
249-
// ),
250-
// title: Text(
251-
// 'title',
252-
// style: TextStyle(color: Colors.grey),
253-
// ),
254-
// subTitle: Text(
255-
// 'subtitle',
256-
// style: TextStyle(color: Colors.grey),
257-
// ),
258-
// icon: GFIconButton(
259-
// onPressed: null,
260-
// icon: Icon(Icons.favorite_border),
261-
// type: GFType.transparent,
262-
// ),
263-
// ),
264-
// content: Text(
265-
// "Flutter "
266-
// "Flutter is Google's mobile UI framework for crafting"
267-
// " high-quality native interfaces on iOS and Android in "
268-
// "Flutter ",
269-
// style: TextStyle(color: Colors.grey),
270-
// ),
271-
// buttonBar: GFButtonBar(
272-
// mainAxisSize: MainAxisSize.min,
273-
// children: <Widget>[
274-
// GFButton(
275-
// onPressed: null,
276-
// child: Text("favorite"),
277-
// icon: Icon(Icons.favorite_border),
278-
// type: GFType.transparent,
279-
// ),
280-
// GFButton(
281-
// onPressed: null,
282-
// child: Text("share"),
283-
// icon: Icon(Icons.share),
284-
// type: GFType.outline,
285-
// ),
286-
// ],
287-
// ),
288-
// ),
289-
// GFButtonBar(
290-
// mainAxisSize: MainAxisSize.min,
291-
// children: <Widget>[
292-
// GFButton(
293-
// onPressed: null,
294-
// child: Text("like"),
295-
// icon: Icon(Icons.favorite_border),
296-
// type: GFType.transparent,
297-
// ),
298-
// GFButton(
299-
// onPressed: null,
300-
// child: Text("comment"),
301-
// ),
302-
// GFButton(
303-
// onPressed: null,
304-
// child: Text("share"),
305-
// icon: Icon(Icons.share),
306-
// type: GFType.outline,
307-
// ),
308-
// ],
309-
// ),
247+
GFCard(
248+
boxFit: BoxFit.cover,
249+
colorFilter: new ColorFilter.mode(
250+
Colors.black.withOpacity(0.67), BlendMode.darken),
251+
image: Image.asset("lib/assets/food.jpeg"),
252+
// imageOverlay: AssetImage("lib/assets/food.jpeg"),
253+
titlePosition: GFPosition.end,
254+
title: GFListItem(
255+
avatar: GFAvatar(
256+
child: Text("tb"),
257+
),
258+
title: Text(
259+
'title',
260+
style: TextStyle(color: Colors.grey),
261+
),
262+
subTitle: Text(
263+
'subtitle',
264+
style: TextStyle(color: Colors.grey),
265+
),
266+
icon: GFIconButton(
267+
onPressed: null,
268+
icon: Icon(Icons.favorite_border),
269+
type: GFType.transparent,
270+
),
271+
),
272+
content: Text(
273+
"Flutter "
274+
"Flutter is Google's mobile UI framework for crafting"
275+
" high-quality native interfaces on iOS and Android in "
276+
"Flutter ",
277+
style: TextStyle(color: Colors.grey),
278+
),
279+
buttonBar: GFButtonBar(
280+
mainAxisSize: MainAxisSize.min,
281+
children: <Widget>[
282+
GFButton(
283+
onPressed: null,
284+
child: Text("favorite"),
285+
icon: Icon(Icons.favorite_border),
286+
type: GFType.transparent,
287+
),
288+
GFButton(
289+
onPressed: null,
290+
child: Text("share"),
291+
icon: Icon(Icons.share),
292+
type: GFType.outline,
293+
),
294+
],
295+
),
296+
),
297+
GFButtonBar(
298+
mainAxisSize: MainAxisSize.min,
299+
children: <Widget>[
300+
GFButton(
301+
onPressed: null,
302+
child: Text("like"),
303+
icon: Icon(Icons.favorite_border),
304+
type: GFType.transparent,
305+
),
306+
GFButton(
307+
onPressed: null,
308+
child: Text("comment"),
309+
),
310+
GFButton(
311+
onPressed: null,
312+
child: Text("share"),
313+
icon: Icon(Icons.share),
314+
type: GFType.outline,
315+
),
316+
],
317+
),
310318
// GFListItem(
311319
// avatar: GFAvatar(
312320
// child: Text("tb"),

0 commit comments

Comments
 (0)