Skip to content

Commit cc922d6

Browse files
committed
master pull
1 parent ecc56bf commit cc922d6

File tree

3 files changed

+92
-92
lines changed

3 files changed

+92
-92
lines changed

example/lib/main.dart

Lines changed: 91 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class _MyHomePageState extends State<MyHomePage>
140140
// leading: GFIconButton(icon: Icon(Icons.directions_bus), onPressed: (){}),
141141
title:
142142
// const Text('UI Kit'),
143-
GFSegmentTabs(
143+
GFSegmentTabs(
144144
tabController: tabController,
145145
initialIndex: 0,
146146
length: 3,
@@ -192,20 +192,12 @@ class _MyHomePageState extends State<MyHomePage>
192192
// Container(color: Colors.green),
193193
// Container(color: Colors.blue)
194194
// ]),
195-
196-
<<<<<<< HEAD
197-
SingleChildScrollView(
198-
child: Column(
199-
mainAxisAlignment: MainAxisAlignment.center,
200-
=======
201-
// SingleChildScrollView(
202-
// child:
203-
Column(
204-
mainAxisAlignment: MainAxisAlignment.start,
205-
>>>>>>> ccc97fde38d7e90bca8ef572ba85c4254a92c687
206-
crossAxisAlignment: CrossAxisAlignment.center,
207-
children: <Widget>[
208-
GFSearchBar(
195+
SingleChildScrollView(
196+
child: Column(
197+
mainAxisAlignment: MainAxisAlignment.center,
198+
crossAxisAlignment: CrossAxisAlignment.center,
199+
children: <Widget>[
200+
GFSearchBar(
209201
// searchBoxInputDecoration: InputDecoration(
210202
// enabledBorder: OutlineInputBorder(
211203
// borderSide: BorderSide(
@@ -214,83 +206,96 @@ class _MyHomePageState extends State<MyHomePage>
214206
// borderRadius: BorderRadius.circular(50)
215207
// ),
216208
// ),
217-
searchList: list,
209+
searchList: list,
218210
// hideSearchBoxWhenItemSelected: false,
219211
// overlaySearchListHeight: 100.0,
220-
searchQueryBuilder: (query, list) => list
221-
.where((item) =>
222-
item.toLowerCase().contains(query.toLowerCase()))
223-
.toList(),
224-
overlaySearchListItemBuilder: (item) => Container(
225-
padding: const EdgeInsets.all(8),
226-
child: Text(
227-
item,
228-
style: const TextStyle(fontSize: 18),
212+
searchQueryBuilder: (query, list) => list
213+
.where((item) =>
214+
item.toLowerCase().contains(query.toLowerCase()))
215+
.toList(),
216+
overlaySearchListItemBuilder: (item) => Container(
217+
padding: const EdgeInsets.all(8),
218+
child: Text(
219+
item,
220+
style: const TextStyle(fontSize: 18),
221+
),
229222
),
230-
),
231223
// noItemsFoundWidget: Container(
232224
// color: Colors.green,
233225
// child: Text("no items found..."),
234226
// ),
235-
onItemSelected: (item) {
236-
setState(() {
237-
print('ssssssss $item');
238-
});
239-
}),
227+
onItemSelected: (item) {
228+
setState(() {
229+
print('ssssssss $item');
230+
});
231+
}),
240232

241-
GFRating(
242-
value: _rating,
233+
GFRating(
234+
value: _rating,
243235
// size: 50,
244-
filledIcon: Icon(Icons.done_outline, size: 40, color: Colors.teal,),
245-
halfFilledIcon: Icon(Icons.done_all, size: 40, color: Colors.teal.withOpacity(0.75),),
246-
defaultIcon: Icon(Icons.done, size: 40, color: Colors.teal.withOpacity(0.25),),
247-
spacing: 8,
236+
filledIcon: Icon(
237+
Icons.done_outline,
238+
size: 40,
239+
color: Colors.teal,
240+
),
241+
halfFilledIcon: Icon(
242+
Icons.done_all,
243+
size: 40,
244+
color: Colors.teal.withOpacity(0.75),
245+
),
246+
defaultIcon: Icon(
247+
Icons.done,
248+
size: 40,
249+
color: Colors.teal.withOpacity(0.25),
250+
),
251+
spacing: 8,
248252
// color: Colors.teal,
249253
// borderColor: Colors.tealAccent,
250254
// allowHalfRating: false,
251-
onChanged: (value) {
252-
setState(() {
253-
_rating = value;
254-
print('user selected ${_rating}');
255-
});
256-
},
257-
),
258-
259-
GFRating(
260-
value: _userRating,
261-
filledIcon: Image.asset(
262-
'lib/assets/heart.png',
263-
height: 50,
264-
width: 50,
265-
color: Colors.amber,
266-
),
267-
halfFilledIcon: Image.asset(
268-
'lib/assets/heart_half.png',
269-
height: 50,
270-
width: 50,
271-
color: Colors.amber,
272-
),
273-
defaultIcon: Image.asset(
274-
'lib/assets/heart_border.png',
275-
height: 50,
276-
width: 50,
277-
color: Colors.amber,
278-
),
279-
spacing: 8,
280-
color: Colors.teal,
281-
borderColor: Colors.tealAccent,
282-
controller: _ratingController,
283-
textForm: true,
284-
suffixIcon: GFButton(
285-
type: GFButtonType.transparent,
286-
onPressed: () {
255+
onChanged: (value) {
287256
setState(() {
288-
_userRating = double.parse(_ratingController.text ?? '0.0');
257+
_rating = value;
258+
print('user selected $_rating');
289259
});
290260
},
291-
child: const Text('Rate'),
292261
),
293-
),
262+
263+
GFRating(
264+
value: _userRating,
265+
filledIcon: Image.asset(
266+
'lib/assets/heart.png',
267+
height: 50,
268+
width: 50,
269+
color: Colors.amber,
270+
),
271+
halfFilledIcon: Image.asset(
272+
'lib/assets/heart_half.png',
273+
height: 50,
274+
width: 50,
275+
color: Colors.amber,
276+
),
277+
defaultIcon: Image.asset(
278+
'lib/assets/heart_border.png',
279+
height: 50,
280+
width: 50,
281+
color: Colors.amber,
282+
),
283+
spacing: 8,
284+
color: Colors.teal,
285+
borderColor: Colors.tealAccent,
286+
controller: _ratingController,
287+
textForm: true,
288+
suffixIcon: GFButton(
289+
type: GFButtonType.transparent,
290+
onPressed: () {
291+
setState(() {
292+
_userRating =
293+
double.parse(_ratingController.text ?? '0.0');
294+
});
295+
},
296+
child: const Text('Rate'),
297+
),
298+
),
294299

295300
// GFCard(
296301
// content: Column(
@@ -657,12 +662,12 @@ class _MyHomePageState extends State<MyHomePage>
657662
// ],
658663
// )),
659664

660-
// Image.asset(
661-
// 'lib/assets/food.jpeg',
662-
// fit: BoxFit.cover,
663-
// color: Color(0xff0d69ff).withOpacity(1.0),
664-
// colorBlendMode: BlendMode.softLight,
665-
// ),
665+
// Image.asset(
666+
// 'lib/assets/food.jpeg',
667+
// fit: BoxFit.cover,
668+
// color: Color(0xff0d69ff).withOpacity(1.0),
669+
// colorBlendMode: BlendMode.softLight,
670+
// ),
666671

667672
// GFCard(
668673
// content: Container(
@@ -1128,7 +1133,7 @@ class _MyHomePageState extends State<MyHomePage>
11281133
//// border: Border.all(color: Colors.pink, width: 2.0),
11291134
// ),
11301135
// GFAvatar(
1131-
// radius: 20.0,
1136+
// radius: 20.0,
11321137
// maxRadius: 50,
11331138

11341139
// child: Text("de"),
@@ -1228,8 +1233,8 @@ class _MyHomePageState extends State<MyHomePage>
12281233
//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
12291234
//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
12301235
// ),
1231-
],
1232-
),
1236+
],
1237+
),
12331238
// ),
12341239
// bottomNavigationBar: GFTabBar(
12351240
// initialIndex: 0,
@@ -1277,6 +1282,6 @@ class _MyHomePageState extends State<MyHomePage>
12771282
// color: Colors.black,
12781283
// fontFamily: 'OpenSansBold',
12791284
// ),
1280-
// ),
1285+
),
12811286
);
12821287
}

lib/components/rating/gf_rating.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ class GFRating extends StatefulWidget {
8080
}
8181

8282
class _GFRatingState extends State<GFRating> {
83-
84-
8583
Widget buildRatingBar(BuildContext context, int index) {
86-
8784
Widget icon;
8885
if (index >= widget.value) {
8986
icon = widget.defaultIcon != null

lib/types/gf_loader_type.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
enum LoaderDotType {
2-
square, circle, diamond, icon
3-
}
1+
enum LoaderDotType { square, circle, diamond, icon }

0 commit comments

Comments
 (0)