Skip to content

Commit 85a4810

Browse files
Merge pull request ionicfirebaseapp#25 from Sandipkakadiya/review
Review
2 parents 14bc51c + 73e7cac commit 85a4810

23 files changed

+920
-1024
lines changed

demo_app/lib/screens/badges.dart

Lines changed: 201 additions & 272 deletions
Large diffs are not rendered by default.

demo_app/lib/screens/headers.dart

Lines changed: 61 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,99 +5,88 @@ import 'package:ui_kit/components/card/gf_card.dart';
55
import 'package:ui_kit/components/header/gf_header.dart';
66
import 'package:ui_kit/types/gf_heading_type.dart';
77

8-
import 'package:ui_kit/components/button/gf_button.dart';
9-
import 'package:ui_kit/components/header/gf_header.dart';
10-
import 'package:ui_kit/components/tabs/gf_tabs.dart';
11-
import 'package:ui_kit/components/toast/gf_floating_widget.dart';
12-
import 'package:ui_kit/components/toast/gf_toast.dart';
13-
import 'package:ui_kit/types/gf_heading_type.dart';
14-
import 'package:ui_kit/types/gf_type.dart';
15-
16-
178
class Headers extends StatefulWidget {
189
@override
1910
_HeadersState createState() => _HeadersState();
2011
}
2112

2213
class _HeadersState extends State<Headers> {
23-
2414
bool showToast = false;
2515
@override
2616
Widget build(BuildContext context) {
2717
return Scaffold(
2818
appBar: AppBar(
2919
backgroundColor: getGFColor(GFColor.dark),
30-
title: Text('Headers', style: TextStyle(fontSize: 14),),
20+
title: Text(
21+
'Headers',
22+
style: TextStyle(fontSize: 14),
23+
),
3124
),
3225
body: Container(
3326
child: Column(
3427
crossAxisAlignment: CrossAxisAlignment.center,
3528
children: <Widget>[
36-
3729
GFCard(
38-
content: Column(
39-
crossAxisAlignment: CrossAxisAlignment.center,
40-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
41-
children: <Widget>[
42-
43-
GFHeader(
44-
text: 'GF Header Typo1',
45-
type: GFHeadingType.typo1,
46-
47-
backgroundImage: NetworkImage('https://cdn.pixabay.com/photo/2019/12/25/16/49/happy-new-year-4718894_960_720.png'),
48-
),
49-
SizedBox(
50-
height: 40,
51-
),
52-
GFHeader(
53-
icon: GFAvatar(
54-
55-
),
56-
text: 'GF Header Typo2',
57-
type: GFHeadingType.typo2,
58-
dividerColor: GFColor.primary,
59-
dividerAlignment: Alignment.center,
60-
),
61-
SizedBox(
62-
height: 40,
63-
),
64-
GFHeader(
65-
icon: Icon(Icons.insert_emoticon),
66-
text: 'GF Header Typo3',
67-
type: GFHeadingType.typo3,
68-
dividerWidth: 150,
69-
dividerColor: GFColor.warning,
70-
dividerBorderRadius: BorderRadius.all(Radius.circular(0)),
71-
),
72-
SizedBox(
73-
height: 40,
74-
),
75-
GFHeader(
30+
content: Column(
31+
crossAxisAlignment: CrossAxisAlignment.center,
32+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
33+
children: <Widget>[
34+
GFHeader(
35+
text: 'GF Header Typo1',
36+
type: GFHeadingType.typo1,
37+
backgroundImage: NetworkImage(
38+
'https://cdn.pixabay.com/photo/2019/12/25/16/49/happy-new-year-4718894_960_720.png'),
39+
),
40+
SizedBox(
41+
height: 40,
42+
),
43+
GFHeader(
44+
icon: GFAvatar(),
45+
text: 'GF Header Typo2',
46+
type: GFHeadingType.typo2,
47+
dividerColor: GFColor.primary,
48+
dividerAlignment: Alignment.center,
49+
),
50+
SizedBox(
51+
height: 40,
52+
),
53+
GFHeader(
54+
icon: Icon(Icons.insert_emoticon),
55+
text: 'GF Header Typo3',
56+
type: GFHeadingType.typo3,
57+
dividerWidth: 150,
58+
dividerColor: GFColor.warning,
59+
dividerBorderRadius: BorderRadius.all(Radius.circular(0)),
60+
),
61+
SizedBox(
62+
height: 40,
63+
),
64+
GFHeader(
7665
text: 'GF Header Typo4',
7766
type: GFHeadingType.typo4,
7867
dividerWidth: 345,
79-
icon: Image.network('https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg', width: 50, )
80-
),
81-
SizedBox(
82-
height: 40,
83-
),
84-
GFHeader(
85-
text: 'GF Header Typo5',
86-
type: GFHeadingType.typo5,
87-
dividerColor: GFColor.alt,
88-
),
89-
SizedBox(
90-
height: 40,
91-
),
92-
GFHeader(
93-
text: 'GF Header Typo6',
94-
type: GFHeadingType.typo6,
95-
dividerWidth: 20,
96-
),
97-
],
98-
)
99-
),
100-
68+
icon: Image.network(
69+
'https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg',
70+
width: 50,
71+
)),
72+
SizedBox(
73+
height: 40,
74+
),
75+
GFHeader(
76+
text: 'GF Header Typo5',
77+
type: GFHeadingType.typo5,
78+
dividerColor: GFColor.alt,
79+
),
80+
SizedBox(
81+
height: 40,
82+
),
83+
GFHeader(
84+
text: 'GF Header Typo6',
85+
type: GFHeadingType.typo6,
86+
dividerWidth: 20,
87+
),
88+
],
89+
)),
10190
],
10291
),
10392
),
@@ -199,7 +188,6 @@ class _HeadersState extends State<Headers> {
199188
// )
200189
// ],
201190
// ),
202-
203191
);
204192
}
205193
}

demo_app/lib/screens/icon-button.dart

Lines changed: 43 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import 'package:ui_kit/components/card/gf_card.dart';
55
import 'package:ui_kit/components/header/gf_header.dart';
66
import 'package:ui_kit/types/gf_heading_type.dart';
77
import 'package:ui_kit/types/gf_type.dart';
8-
import 'package:ui_kit/shape/gf_button_shape.dart';
98
import 'package:ui_kit/size/gf_size.dart';
109

11-
1210
class IconButtons extends StatefulWidget {
1311
@override
1412
_IconButtonsState createState() => _IconButtonsState();
@@ -20,32 +18,35 @@ class _IconButtonsState extends State<IconButtons> {
2018
return Scaffold(
2119
appBar: AppBar(
2220
backgroundColor: getGFColor(GFColor.dark),
23-
title: Text('Icon Button', style: TextStyle(fontSize: 14),),
21+
title: Text(
22+
'Icon Button',
23+
style: TextStyle(fontSize: 14),
24+
),
2425
),
2526
body: ListView(
2627
children: <Widget>[
27-
GFCard(
28-
content: Column(
29-
children: <Widget>[
30-
GFHeader(
31-
text: 'Solid Icon Button',
32-
type: GFHeadingType.typo6,
33-
),
34-
SizedBox(
35-
height: 15.0,
36-
),
37-
Row(
38-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
28+
GFCard(
29+
content: Column(
3930
children: <Widget>[
40-
GFIconButton(
41-
onPressed: null,
42-
icon: Icon(Icons.ac_unit),
31+
GFHeader(
32+
text: 'Solid Icon Button',
33+
type: GFHeadingType.typo6,
34+
),
35+
SizedBox(
36+
height: 15.0,
37+
),
38+
Row(
39+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
40+
children: <Widget>[
41+
GFIconButton(
42+
onPressed: null,
43+
icon: Icon(Icons.ac_unit),
4344
// iconSize: 12.0,
4445

45-
type: GFType.solid,
46-
size: GFSize.large,
47-
buttonBoxShadow: true,
48-
color: GFColor.primary,
46+
type: GFType.solid,
47+
size: GFSize.large,
48+
buttonBoxShadow: true,
49+
color: GFColor.primary,
4950
// boxShadow: BoxShadow(
5051
// color: Colors.pink,
5152
// blurRadius: 2.0,
@@ -54,16 +55,16 @@ class _IconButtonsState extends State<IconButtons> {
5455
// ),
5556
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
5657
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
57-
),
58-
GFIconButton(
59-
onPressed: null,
60-
icon: Icon(Icons.ac_unit),
58+
),
59+
GFIconButton(
60+
onPressed: null,
61+
icon: Icon(Icons.ac_unit),
6162
// iconSize: 12.0,
6263

63-
type: GFType.solid,
64-
size: GFSize.medium,
64+
type: GFType.solid,
65+
size: GFSize.medium,
6566

66-
color: GFColor.warning,
67+
color: GFColor.warning,
6768
// boxShadow: BoxShadow(
6869
// color: Colors.pink,
6970
// blurRadius: 2.0,
@@ -72,16 +73,16 @@ class _IconButtonsState extends State<IconButtons> {
7273
// ),
7374
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
7475
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
75-
),
76-
GFIconButton(
77-
onPressed: null,
78-
icon: Icon(Icons.ac_unit),
76+
),
77+
GFIconButton(
78+
onPressed: null,
79+
icon: Icon(Icons.ac_unit),
7980
// iconSize: 12.0,
8081

81-
type: GFType.solid,
82-
size: GFSize.small,
83-
buttonBoxShadow: true,
84-
color: GFColor.success,
82+
type: GFType.solid,
83+
size: GFSize.small,
84+
buttonBoxShadow: true,
85+
color: GFColor.success,
8586
// boxShadow: BoxShadow(
8687
// color: Colors.pink,
8788
// blurRadius: 2.0,
@@ -90,22 +91,19 @@ class _IconButtonsState extends State<IconButtons> {
9091
// ),
9192
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
9293
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
93-
),
94-
94+
),
95+
],
96+
)
9597
],
96-
)
97-
],
98+
),
9899
),
99-
),
100-
101100
GFCard(
102101
content: Column(
103102
children: <Widget>[
104103
GFHeader(
105104
text: 'Outline Icon Button',
106105
type: GFHeadingType.typo6,
107106
),
108-
109107
SizedBox(
110108
height: 15.0,
111109
),
@@ -120,7 +118,6 @@ class _IconButtonsState extends State<IconButtons> {
120118
type: GFType.outline,
121119
size: GFSize.large,
122120

123-
124121
// boxShadow: BoxShadow(
125122
// color: Colors.pink,
126123
// blurRadius: 2.0,
@@ -135,9 +132,8 @@ class _IconButtonsState extends State<IconButtons> {
135132
icon: Icon(Icons.ac_unit),
136133
// iconSize: 12.0,
137134

138-
139135
size: GFSize.medium,
140-
type: GFType.outline,
136+
type: GFType.outline,
141137
// boxShadow: BoxShadow(
142138
// color: Colors.pink,
143139
// blurRadius: 2.0,
@@ -155,7 +151,6 @@ type: GFType.outline,
155151
type: GFType.outline,
156152
size: GFSize.small,
157153

158-
159154
// boxShadow: BoxShadow(
160155
// color: Colors.pink,
161156
// blurRadius: 2.0,
@@ -165,14 +160,11 @@ type: GFType.outline,
165160
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
166161
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
167162
),
168-
169163
],
170164
)
171165
],
172166
),
173167
),
174-
175-
176168
GFCard(
177169
content: Column(
178170
children: <Widget>[
@@ -194,7 +186,6 @@ type: GFType.outline,
194186
type: GFType.transparent,
195187
size: GFSize.large,
196188

197-
198189
// boxShadow: BoxShadow(
199190
// color: Colors.pink,
200191
// blurRadius: 2.0,
@@ -209,7 +200,6 @@ type: GFType.outline,
209200
icon: Icon(Icons.ac_unit),
210201
// iconSize: 12.0,
211202

212-
213203
size: GFSize.medium,
214204
type: GFType.transparent,
215205
// boxShadow: BoxShadow(
@@ -229,7 +219,6 @@ type: GFType.outline,
229219
type: GFType.transparent,
230220
size: GFSize.small,
231221

232-
233222
// boxShadow: BoxShadow(
234223
// color: Colors.pink,
235224
// blurRadius: 2.0,
@@ -239,7 +228,6 @@ type: GFType.outline,
239228
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
240229
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),
241230
),
242-
243231
],
244232
)
245233
],

0 commit comments

Comments
 (0)