Skip to content

Commit bfa7dfa

Browse files
committed
getFlutter web version is in progress
1 parent 3196078 commit bfa7dfa

119 files changed

Lines changed: 4692 additions & 1701 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
840 Bytes
Loading

demo_app/lib/screens/badges.dart

Lines changed: 0 additions & 770 deletions
This file was deleted.
Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_svg/flutter_svg.dart';
3+
import 'package:ui_kit/colors/gf_color.dart';
4+
import 'package:ui_kit/components/badge/gf_badge.dart';
5+
import 'package:ui_kit/components/badge/gf_button_badge.dart';
6+
import 'package:ui_kit/components/badge/gf_icon_badge.dart';
7+
import 'package:ui_kit/components/card/gf_card.dart';
8+
import 'package:ui_kit/components/header/gf_header.dart';
9+
import 'package:ui_kit/components/tabs/gf_tabs.dart';
10+
import 'package:ui_kit/components/button/gf_icon_button.dart';
11+
import 'package:ui_kit/position/gf_position.dart';
12+
import 'package:ui_kit/shape/gf_badge_shape.dart';
13+
import 'package:ui_kit/shape/gf_button_shape.dart';
14+
import 'package:ui_kit/size/gf_size.dart';
15+
import 'package:ui_kit/types/gf_heading_type.dart';
16+
import 'package:ui_kit/types/gf_type.dart';
17+
import 'package:ui_kit/components/tabs/gf_tabBarView.dart';
18+
19+
class Badges extends StatefulWidget {
20+
@override
21+
_BadgesState createState() => _BadgesState();
22+
}
23+
24+
class _BadgesState extends State<Badges> {
25+
@override
26+
Widget build(BuildContext context) {
27+
return Scaffold(
28+
appBar: AppBar(
29+
backgroundColor: getGFColor(GFColor.dark),
30+
title: Text(
31+
'Badges',
32+
style: TextStyle(fontSize: 17),
33+
),
34+
centerTitle: true,
35+
),
36+
body: ListView(
37+
children: <Widget>[
38+
Padding(
39+
padding: EdgeInsets.only(left: 15, top: 20),
40+
child: GFHeader(
41+
text: 'With Buttons',
42+
type: GFHeadingType.typo5,
43+
dividerWidth: 25,
44+
dividerColor: Color(0xFF19CA4B),
45+
),
46+
),
47+
GFCard(
48+
content: Column(
49+
children: <Widget>[
50+
SizedBox(
51+
height: 10,
52+
),
53+
Row(
54+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
55+
children: <Widget>[
56+
GFButtonBadge(
57+
counterChild: GFBadge(
58+
text: '6',
59+
shape: GFBadgeShape.pills,
60+
),
61+
onPressed: (){},
62+
text: 'Primary',
63+
),
64+
GFButtonBadge(
65+
counterChild: GFBadge(
66+
text: '6',
67+
shape: GFBadgeShape.pills,
68+
),
69+
onPressed: (){},
70+
text: 'Second',
71+
color: GFColor.secondary,
72+
),
73+
GFButtonBadge(
74+
counterChild: GFBadge(
75+
text: '6',
76+
shape: GFBadgeShape.pills,
77+
),
78+
onPressed: (){},
79+
text: 'Success',
80+
color: GFColor.success,
81+
),
82+
],
83+
),
84+
85+
SizedBox(
86+
height: 20,
87+
),
88+
Row(
89+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
90+
children: <Widget>[
91+
GFButtonBadge(
92+
counterChild: GFBadge(
93+
text: '6',
94+
shape: GFBadgeShape.pills,
95+
),
96+
onPressed: (){},
97+
text: 'Warning',
98+
color: GFColor.warning,
99+
),
100+
GFButtonBadge(
101+
counterChild: GFBadge(
102+
text: '6',
103+
shape: GFBadgeShape.pills,
104+
),
105+
onPressed: (){},
106+
text: 'Danger',
107+
color: GFColor.danger,
108+
),
109+
GFButtonBadge(
110+
counterChild: GFBadge(
111+
text: '6',
112+
shape: GFBadgeShape.pills,
113+
),
114+
onPressed: (){},
115+
text: 'Info',
116+
color: GFColor.info,
117+
),
118+
],
119+
),
120+
SizedBox(
121+
height: 20,
122+
),
123+
Row(
124+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
125+
children: <Widget>[
126+
GFButtonBadge(
127+
counterChild: GFBadge(
128+
text: '6',
129+
shape: GFBadgeShape.pills,
130+
),
131+
onPressed: (){},
132+
text: 'Light',
133+
color: GFColor.light,
134+
),
135+
GFButtonBadge(
136+
counterChild: GFBadge(
137+
text: '6',
138+
shape: GFBadgeShape.pills,
139+
),
140+
onPressed: (){},
141+
text: 'Dark',
142+
textStyle: TextStyle(color: getGFColor(GFColor.white)),
143+
144+
color: GFColor.dark,
145+
),
146+
GFButtonBadge(
147+
counterChild: GFBadge(
148+
text: '6',
149+
shape: GFBadgeShape.pills,
150+
),
151+
onPressed: (){},
152+
text: 'Link',
153+
color: GFColor.transparent,
154+
),
155+
],
156+
),
157+
SizedBox(
158+
height: 10,
159+
),
160+
],
161+
),
162+
),
163+
164+
Padding(
165+
padding: EdgeInsets.only(left: 15, top: 20),
166+
child: GFHeader(
167+
text: 'Icon with Badges',
168+
type: GFHeadingType.typo5,
169+
dividerWidth: 25,
170+
dividerColor: Color(0xFF19CA4B),
171+
),
172+
),
173+
174+
GFCard(
175+
content: Column(
176+
children: <Widget>[
177+
SizedBox(
178+
height: 20,
179+
),
180+
Row(
181+
children: <Widget>[
182+
GFIconBadge(
183+
onPressed: null,
184+
child: GFIconButton(
185+
type: GFType.transparent,
186+
onPressed: (){},
187+
icon: SvgPicture.asset('lib/assets/icons/primary.svg', color: getGFColor(GFColor.primary),)
188+
),
189+
counterChild: GFBadge(
190+
text: '12',
191+
shape: GFBadgeShape.circle,
192+
size: GFSize.small,
193+
)),
194+
GFIconBadge(
195+
onPressed: null,
196+
child: GFIconButton(
197+
type: GFType.transparent,
198+
onPressed: (){},
199+
icon: SvgPicture.asset('lib/assets/icons/secondary.svg', color: getGFColor(GFColor.secondary),)
200+
),
201+
counterChild: GFBadge(
202+
text: '12',
203+
shape: GFBadgeShape.circle,
204+
size: GFSize.small,
205+
)),
206+
GFIconBadge(
207+
onPressed: null,
208+
child: GFIconButton(
209+
type: GFType.transparent,
210+
onPressed: (){},
211+
icon: SvgPicture.asset('lib/assets/icons/success.svg', color: getGFColor(GFColor.success),)
212+
),
213+
counterChild: GFBadge(
214+
text: '12',
215+
shape: GFBadgeShape.circle,
216+
size: GFSize.small,
217+
)),
218+
GFIconBadge(
219+
onPressed: null,
220+
child: GFIconButton(
221+
type: GFType.transparent,
222+
onPressed: (){},
223+
icon: SvgPicture.asset('lib/assets/icons/warning.svg', color: getGFColor(GFColor.warning),)
224+
),
225+
counterChild: GFBadge(
226+
text: '12',
227+
shape: GFBadgeShape.circle,
228+
size: GFSize.small,
229+
)),
230+
GFIconBadge(
231+
onPressed: null,
232+
child: GFIconButton(
233+
type: GFType.transparent,
234+
onPressed: (){},
235+
icon: SvgPicture.asset('lib/assets/icons/danger.svg', color: getGFColor(GFColor.danger),)
236+
),
237+
counterChild: GFBadge(
238+
text: '12',
239+
shape: GFBadgeShape.circle,
240+
size: GFSize.small,
241+
)),
242+
],
243+
),
244+
Row(
245+
children: <Widget>[
246+
GFIconBadge(
247+
onPressed: null,
248+
child: GFIconButton(
249+
type: GFType.transparent,
250+
onPressed: (){},
251+
icon: SvgPicture.asset('lib/assets/icons/info.svg', color: getGFColor(GFColor.info),)
252+
),
253+
counterChild: GFBadge(
254+
text: '12',
255+
shape: GFBadgeShape.standard,
256+
size: GFSize.small,
257+
)),
258+
GFIconBadge(
259+
onPressed: null,
260+
child: GFIconButton(
261+
type: GFType.transparent,
262+
onPressed: (){},
263+
icon: SvgPicture.asset('lib/assets/icons/light.svg', color: getGFColor(GFColor.light),)
264+
),
265+
counterChild: GFBadge(
266+
text: '12',
267+
shape: GFBadgeShape.square,
268+
size: GFSize.small,
269+
)),
270+
GFIconBadge(
271+
onPressed: null,
272+
child: GFIconButton(
273+
type: GFType.transparent,
274+
onPressed: (){},
275+
icon: SvgPicture.asset('lib/assets/icons/dark.svg', color: getGFColor(GFColor.dark),)
276+
),
277+
counterChild: GFBadge(
278+
text: '12',
279+
shape: GFBadgeShape.pills,
280+
size: GFSize.small,
281+
)),
282+
],
283+
)
284+
],
285+
),
286+
),
287+
],
288+
),
289+
);
290+
}
291+
}

0 commit comments

Comments
 (0)