Skip to content

Commit 5b47b11

Browse files
committed
typography component added
1 parent 47b6852 commit 5b47b11

File tree

4 files changed

+124
-4
lines changed

4 files changed

+124
-4
lines changed

gf_web/lib/screens/cards/cards.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class _CardsState extends State<Cards> {
4141
boxFit: BoxFit.cover,
4242

4343
colorFilter: new ColorFilter.mode(
44-
Colors.grey.withOpacity(0.67), BlendMode.darken),
44+
Colors.black.withOpacity(0.67), BlendMode.darken),
4545
image:Image.network('https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg'),
4646
// imageOverlay: AssetImage("lib/assets/food.jpeg"),
4747
titlePosition: GFPosition.end,

gf_web/lib/screens/layout/routes.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22

33

4+
import 'package:flutter/material.dart';
45
import 'package:gf_web/screens/buttons/standard-buttons.dart';
56
import 'package:gf_web/screens/buttons/pills-buttons.dart';
67
import 'package:gf_web/screens/buttons/square-buttons.dart';
@@ -9,6 +10,8 @@ import 'package:gf_web/screens/buttons/icon-buttons.dart';
910
import 'package:gf_web/screens/buttons/social-buttons.dart';
1011
import 'package:gf_web/screens/badges/badges.dart';
1112
import 'package:gf_web/screens/cards/cards.dart';
13+
import 'package:gf_web/screens/typography/heading.dart';
14+
1215

1316

1417

@@ -28,6 +31,8 @@ final routes =
2831

2932
'/gf-badges/badges': (context) => Badges(),
3033
'/gf-cards/cards': (context) => Cards(),
34+
'/gf-typography/heading': (context) => Heading(),
35+
3136

3237

3338
// '/third': (context) => ThirdScreen(),

gf_web/lib/screens/layout/sidebar.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,15 @@ margin: EdgeInsets.only(right: 10,),
181181
SizedBox(
182182
height: 20,
183183
),
184-
Text('GF Typography', style: hintStyleTextblackdull()),
185-
SizedBox(
186-
height: 30,
184+
GestureDetector(
185+
onTap: (){
186+
Navigator.pushNamed(context, '/gf-typography/heading');
187+
},
188+
child: Text('GF Typography',style: hintStyleTextblackdull(),),
189+
190+
),
191+
SizedBox(
192+
height: 20,
187193
),
188194
Text('COMING SOON', style: hintStyleTextblack(),),
189195
SizedBox(
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:gf_web/screens/layout/layout.dart';
3+
import '../../styles/styles.dart';
4+
import 'package:ui_kit/components/button/gf_button.dart';
5+
import 'package:ui_kit/components/card/gf_card.dart';
6+
import 'package:ui_kit/colors/gf_color.dart';
7+
import 'package:ui_kit/types/gf_type.dart';
8+
import 'package:ui_kit/components/button/gf_button_bar.dart';
9+
import 'package:ui_kit/components/list_tile/gf_list_tile.dart';
10+
import 'package:ui_kit/components/avatar/gf_avatar.dart';
11+
import 'package:ui_kit/position/gf_position.dart';
12+
import 'package:ui_kit/components/button/gf_icon_button.dart';
13+
import 'package:ui_kit/components/typography/gf_typography.dart';
14+
import 'package:ui_kit/types/gf_typography_type.dart';
15+
16+
import 'package:ui_kit/components/button/gf_icon_button.dart';
17+
18+
19+
20+
class Heading extends StatefulWidget {
21+
@override
22+
_TypographyState createState() => _TypographyState();
23+
}
24+
25+
class _TypographyState extends State<Heading> {
26+
@override
27+
Widget build(BuildContext context) {
28+
return Scaffold(
29+
body: Layout(
30+
body: ListView(
31+
children: <Widget>[
32+
Text('Typography', style: hintStyleTextblackbolder(),),
33+
// SizedBox(
34+
// height: 20,
35+
// ),
36+
// Text('A card is a sheet of Material used to represent some related information, for example an album, a geographical location, a meal, contact details, etc.', style: hintStyleTextblackdull(),),
37+
// SizedBox(
38+
// height: 30,
39+
// ),
40+
// Text('Basic Card', style: hintStyleTextblackbold(),),
41+
GFCard(
42+
content: Column(
43+
crossAxisAlignment: CrossAxisAlignment.center,
44+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
45+
children: <Widget>[
46+
GFTypography(
47+
text: 'GF Header Typo1',
48+
textColor: Colors.grey,
49+
dividerColor: Colors.grey,
50+
type: GFTypographyType.typo1,
51+
backgroundImage: NetworkImage(
52+
'https://cdn.pixabay.com/photo/2019/12/25/16/49/happy-new-year-4718894_960_720.png'),
53+
),
54+
SizedBox(
55+
height: 40,
56+
),
57+
GFTypography(
58+
icon: GFAvatar(),
59+
text: 'GF Header Typo2',
60+
type: GFTypographyType.typo2,
61+
dividerColor: GFColor.primary,
62+
dividerAlignment: Alignment.center,
63+
),
64+
SizedBox(
65+
height: 40,
66+
),
67+
GFTypography(
68+
icon: Icon(Icons.insert_emoticon),
69+
text: 'GF Header Typo3',
70+
type: GFTypographyType.typo3,
71+
dividerWidth: 150,
72+
dividerColor: GFColor.warning,
73+
dividerBorderRadius: BorderRadius.all(Radius.circular(0)),
74+
),
75+
SizedBox(
76+
height: 40,
77+
),
78+
GFTypography(
79+
text: 'GF Header Typo4',
80+
type: GFTypographyType.typo4,
81+
dividerWidth: 345,
82+
icon: Image.network(
83+
'https://cdn.pixabay.com/photo/2016/12/15/03/27/cocoa-1908020_960_720.jpg',
84+
width: 50,
85+
)),
86+
SizedBox(
87+
height: 40,
88+
),
89+
GFTypography(
90+
text: 'GF Header Typo5',
91+
type: GFTypographyType.typo5,
92+
dividerColor: GFColor.alt,
93+
),
94+
SizedBox(
95+
height: 40,
96+
),
97+
GFTypography(
98+
text: 'GF Header Typo6',
99+
type: GFTypographyType.typo6,
100+
dividerWidth: 20,
101+
),
102+
],
103+
)),
104+
],
105+
),
106+
),
107+
);
108+
}
109+
}

0 commit comments

Comments
 (0)