Skip to content

Commit fa4afd0

Browse files
controller issue fixed
1 parent 30424ec commit fa4afd0

File tree

8 files changed

+86
-59
lines changed

8 files changed

+86
-59
lines changed

lib/generated_plugin_registrant.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Generated file. Do not edit.
33
//
44

5+
// ignore_for_file: directives_ordering
56
// ignore_for_file: lines_longer_than_80_chars
67

78
import 'package:url_launcher_web/url_launcher_web.dart';

lib/screens/home_screen.dart

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import 'package:flutter/foundation.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:flutter_developer_portfolio/widgets/bottom_line_widget.dart';
4+
import 'package:flutter_developer_portfolio/widgets/email_widget.dart';
35
import 'package:particles_flutter/particles_flutter.dart';
46

57
import '../utils/common_functions.dart';
@@ -22,13 +24,11 @@ class HomeScreen extends StatefulWidget {
2224

2325
class _HomeScreenState extends State<HomeScreen> {
2426
PageController _pageController;
25-
bool _emailHover;
2627
double _appBarHeight;
2728

2829
@override
2930
void initState() {
3031
super.initState();
31-
_emailHover = false;
3232
_pageController = PageController(
3333
keepPage: true,
3434
viewportFraction: 1,
@@ -134,7 +134,7 @@ class _HomeScreenState extends State<HomeScreen> {
134134
mainAxisSize: MainAxisSize.max,
135135
children: [
136136
SocialHandles(),
137-
_bottomLine(),
137+
BottomLineWidget(),
138138
],
139139
),
140140
Expanded(
@@ -186,48 +186,7 @@ class _HomeScreenState extends State<HomeScreen> {
186186
),
187187
),
188188
),
189-
Column(
190-
mainAxisAlignment: MainAxisAlignment.end,
191-
mainAxisSize: MainAxisSize.min,
192-
children: [
193-
RotatedBox(
194-
quarterTurns: 1,
195-
child: InkWell(
196-
onTap: () {
197-
CommonFunction.openMail();
198-
},
199-
onHover: (val) {
200-
if (val) {
201-
setState(() {
202-
_emailHover = true;
203-
});
204-
} else {
205-
setState(() {
206-
_emailHover = false;
207-
});
208-
}
209-
},
210-
211-
/// todo from constants
212-
child: Text(
213-
'hiashutoshkumarsingh@gmail.com',
214-
215-
/// todo style from TextStyle
216-
style: TextStyle(
217-
fontSize: 16,
218-
fontFamily: 'FiraSans',
219-
fontWeight: FontWeight.w400,
220-
color: _emailHover ? Constants.green : Constants.slate,
221-
),
222-
),
223-
),
224-
),
225-
SizedBox(
226-
height: 16,
227-
),
228-
_bottomLine(),
229-
],
230-
),
189+
EmailWidget(),
231190
],
232191
),
233192
),
@@ -238,17 +197,6 @@ class _HomeScreenState extends State<HomeScreen> {
238197
);
239198
}
240199

241-
Widget _bottomLine() {
242-
return Padding(
243-
padding: const EdgeInsets.only(top: 16),
244-
child: Container(
245-
height: 100,
246-
width: 1,
247-
color: Constants.white,
248-
),
249-
);
250-
}
251-
252200
Widget _showcaseWidget(
253201
String title,
254202
String subtitle, {

lib/utils/common_functions.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class CommonFunction {
1111
}
1212

1313
static void openMail() {
14-
/// todo mail
1514
Uri _emailLaunchUri = Uri(
1615
scheme: 'mailto',
1716
path: 'hiashutoshkumarsingh@gmail.com',

lib/utils/constants.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ class Constants {
1717
static final String instagramUrl = 'https://www.instagram.com/hiashutoshsingh/';
1818
static final String facebookUrl = 'https://www.facebook.com/hiashutoshsingh/';
1919
static final String mediumUrl = 'https://medium.com/@hiashutosh';
20+
static final String email = 'hiashutoshkumarsingh@gmail.com';
2021
}

lib/widgets/bottom_line_widget.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_developer_portfolio/utils/constants.dart';
3+
4+
class BottomLineWidget extends StatelessWidget {
5+
@override
6+
Widget build(BuildContext context) {
7+
return Padding(
8+
padding: const EdgeInsets.only(top: 16),
9+
child: Container(
10+
height: 100,
11+
width: 1,
12+
color: Constants.white,
13+
),
14+
);
15+
}
16+
}

lib/widgets/email_widget.dart

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_developer_portfolio/utils/common_functions.dart';
3+
import 'package:flutter_developer_portfolio/utils/constants.dart';
4+
5+
import 'bottom_line_widget.dart';
6+
7+
class EmailWidget extends StatefulWidget {
8+
@override
9+
State<EmailWidget> createState() => _EmailWidgetState();
10+
}
11+
12+
class _EmailWidgetState extends State<EmailWidget> {
13+
bool _emailHover;
14+
15+
@override
16+
void initState() {
17+
super.initState();
18+
_emailHover = false;
19+
}
20+
21+
@override
22+
Widget build(BuildContext context) {
23+
return Column(
24+
mainAxisAlignment: MainAxisAlignment.end,
25+
mainAxisSize: MainAxisSize.min,
26+
children: [
27+
RotatedBox(
28+
quarterTurns: 1,
29+
child: InkWell(
30+
onTap: () {
31+
CommonFunction.openMail();
32+
},
33+
onHover: (val) {
34+
if (val) {
35+
setState(() {
36+
_emailHover = true;
37+
});
38+
} else {
39+
setState(() {
40+
_emailHover = false;
41+
});
42+
}
43+
},
44+
child: Text(
45+
Constants.email,
46+
47+
/// todo style from TextStyle
48+
style: TextStyle(
49+
fontSize: 16,
50+
fontFamily: 'FiraSans',
51+
fontWeight: FontWeight.w400,
52+
color: _emailHover ? Constants.green : Constants.slate,
53+
),
54+
),
55+
),
56+
),
57+
SizedBox(
58+
height: 16,
59+
),
60+
BottomLineWidget(),
61+
],
62+
);
63+
}
64+
}

lib/widgets/other_projects.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter/rendering.dart';
32
import 'package:flutter_developer_portfolio/utils/constants.dart';
43

54
import '../utils/common_functions.dart';

lib/widgets/social_handles.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_developer_portfolio/utils/common_functions.dart';
33
import 'package:flutter_developer_portfolio/utils/constants.dart';
4-
import 'package:flutter_svg/flutter_svg.dart';
54

65
import '../utils/constants.dart';
76
import 'social_handle_item.dart';

0 commit comments

Comments
 (0)