Skip to content

Commit e6ecad9

Browse files
author
ProgrammerHasan
committed
MsFIconButtonExample
1 parent 892deb0 commit e6ecad9

File tree

3 files changed

+178
-0
lines changed

3 files changed

+178
-0
lines changed

lib/example/msFIconButton.dart

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_components/components/ms_fIcon_button.dart';
3+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
4+
5+
class MsFIconButtonExample extends StatefulWidget {
6+
@override
7+
_MsFIconButtonExampleState createState() => _MsFIconButtonExampleState();
8+
}
9+
10+
class _MsFIconButtonExampleState extends State<MsFIconButtonExample> {
11+
@override
12+
Widget build(BuildContext context) {
13+
return Scaffold(
14+
appBar: AppBar(title: ListTile(
15+
trailing: Icon(Icons.info,color: Colors.white,),
16+
title: Text('Ms FIcon Button',
17+
style: TextStyle(
18+
fontSize: 19,
19+
fontWeight: FontWeight.w500,
20+
color: Colors.white
21+
),
22+
textAlign: TextAlign.left,
23+
),
24+
),
25+
),
26+
body: SafeArea(
27+
child: SingleChildScrollView(
28+
child: Center(
29+
child: Column(
30+
children: <Widget>[
31+
Column(
32+
mainAxisAlignment: MainAxisAlignment.center,
33+
children: <Widget>[
34+
Padding(
35+
padding: const EdgeInsets.all(16.0),
36+
child: Card(
37+
elevation: 4.0,
38+
child: InkWell(
39+
onLongPress: () async {
40+
41+
},
42+
child: Column(
43+
children: <Widget>[
44+
SizedBox(height: 8,),
45+
SizedBox(
46+
child: CircleAvatar(
47+
radius: 50.0,
48+
backgroundImage: ExactAssetImage('assets/img/programmerhasan.png'),
49+
),
50+
width: 70,
51+
height: 70,
52+
),
53+
Text(
54+
'Programmer Hasan',
55+
style: TextStyle(
56+
fontSize: 18.0,
57+
fontWeight: FontWeight.bold,
58+
),
59+
),
60+
Text('Sr. Software Developer & Programmer \nFounder & CEO at Ms IT Xpress',
61+
style: TextStyle(
62+
fontSize: 12.0,
63+
letterSpacing: 0.2,
64+
fontWeight: FontWeight.bold,
65+
),
66+
textAlign: TextAlign.center,
67+
),
68+
SizedBox(height: 4.0,),
69+
Row(
70+
mainAxisAlignment: MainAxisAlignment.center,
71+
children: [
72+
MsFIconButton(
73+
size: GFSize.SMALL,
74+
onPressed: (){
75+
76+
},
77+
icon: FaIcon(FontAwesomeIcons.globe),alignment: Alignment.center,
78+
type: GFButtonType.outline,
79+
shape: GFIconButtonShape.pills,
80+
color: Colors.teal,
81+
),
82+
SizedBox(width: 4.0,),
83+
MsFIconButton(
84+
size: GFSize.SMALL,
85+
onPressed: (){
86+
87+
},
88+
icon: FaIcon(FontAwesomeIcons.globe),alignment: Alignment.center,
89+
type: GFButtonType.outline,
90+
shape: GFIconButtonShape.pills,
91+
color: Colors.green,
92+
),
93+
SizedBox(width: 4.0,),
94+
MsFIconButton(
95+
size: GFSize.SMALL,
96+
onPressed: (){
97+
//https://facebook.com/ProgrammerHasan.s
98+
},
99+
icon: FaIcon(FontAwesomeIcons.facebook),alignment: Alignment.center,
100+
type: GFButtonType.outline,
101+
shape: GFIconButtonShape.pills,
102+
),
103+
SizedBox(width: 4.0,),
104+
MsFIconButton(
105+
size: GFSize.SMALL,
106+
onPressed: (){
107+
// https://www.youtube.com/channel/UC_yR5D8mamiA4yWs_WHK0Kw
108+
},
109+
icon: FaIcon(FontAwesomeIcons.youtube),
110+
type: GFButtonType.outline,
111+
shape: GFIconButtonShape.pills,
112+
color: Colors.red,
113+
),
114+
SizedBox(width: 4.0,),
115+
MsFIconButton(
116+
size: GFSize.SMALL,
117+
onPressed: (){
118+
//https://github.com/programmerhasan
119+
},
120+
icon: FaIcon(FontAwesomeIcons.github),
121+
type: GFButtonType.outline,
122+
shape: GFIconButtonShape.pills,
123+
color: Colors.blueGrey,
124+
),
125+
SizedBox(
126+
width: 4.0,
127+
),
128+
MsFIconButton(
129+
size: GFSize.SMALL,
130+
onPressed: (){
131+
// https://twitter.com/mehedihasan_04
132+
},
133+
icon: FaIcon(FontAwesomeIcons.twitter),
134+
type: GFButtonType.outline,
135+
shape: GFIconButtonShape.pills,
136+
color: Colors.cyan,
137+
),
138+
SizedBox(
139+
width: 4.0,
140+
),
141+
],
142+
),
143+
SizedBox(
144+
height: 1.0,
145+
),
146+
Divider(
147+
color: Colors.teal[200],
148+
thickness: 1,
149+
indent: 50.0,
150+
endIndent: 50.0,
151+
),
152+
SizedBox(
153+
height: 4.0,
154+
),
155+
],
156+
),
157+
),
158+
),
159+
),
160+
],
161+
),
162+
],
163+
),
164+
),
165+
),
166+
)
167+
);
168+
}
169+
170+
}

pubspec.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ packages:
6767
description: flutter
6868
source: sdk
6969
version: "0.0.0"
70+
font_awesome_flutter:
71+
dependency: "direct main"
72+
description:
73+
name: font_awesome_flutter
74+
url: "https://pub.dartlang.org"
75+
source: hosted
76+
version: "8.12.0"
7077
matcher:
7178
dependency: transitive
7279
description:

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
# The following adds the Cupertino Icons font to your application.
2929
# Use with the CupertinoIcons class for iOS style icons.
3030
cupertino_icons: ^1.0.2
31+
font_awesome_flutter: ^8.11.0
3132

3233
dev_dependencies:
3334
flutter_test:

0 commit comments

Comments
 (0)