Skip to content

Commit 3e3e1ac

Browse files
committed
update website
1 parent cee1bca commit 3e3e1ac

File tree

3 files changed

+185
-125
lines changed

3 files changed

+185
-125
lines changed

lib/ui/about.dart

Lines changed: 73 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:controller_widgets/routing/route_controller.dart';
22
import 'package:controller_widgets/theming/theme_controller.dart';
3-
import 'package:flutter/cupertino.dart';
3+
44
/// Made by Tejas Mehta
55
/// Made on Tuesday, August 25, 2020
66
/// File Name: about.dart
@@ -19,6 +19,7 @@ import 'package:portfolio/widgets/image_link.dart';
1919

2020
class About extends StatefulWidget {
2121
static final String route = "about";
22+
2223
///CreateState method
2324
///Sets the state of the app (rebuilt each time a UI change is needed)
2425
@override
@@ -28,19 +29,19 @@ class About extends StatefulWidget {
2829
}
2930

3031
class AboutState extends State<About> with WidgetsBindingObserver {
32+
ScrollController _controller = ScrollController();
33+
3134
///InitState method
3235
///Currently only sets a listener for any light/dark theme changes
3336
@override
3437
void initState() {
3538
super.initState();
36-
WidgetsBinding.instance.addPostFrameCallback((_){
39+
WidgetsBinding.instance.addPostFrameCallback((_) {
3740
RouteController.of(context)?.updateRoute("about");
3841
});
3942
WidgetsBinding.instance.addObserver(this);
40-
4143
}
4244

43-
4445
///Dispose method
4546
///Currently only removes the observer set in initState for the light/dark theme changes
4647
@override
@@ -68,8 +69,10 @@ class AboutState extends State<About> with WidgetsBindingObserver {
6869
@override
6970
Widget build(BuildContext context) {
7071
return Scrollbar(
72+
controller: _controller,
7173
child: SingleChildScrollView(
7274
scrollDirection: Axis.vertical,
75+
controller: _controller,
7376
child: DynamicPadding(
7477
child: Column(
7578
crossAxisAlignment: CrossAxisAlignment.start,
@@ -80,33 +83,51 @@ class AboutState extends State<About> with WidgetsBindingObserver {
8083
Padding(padding: const EdgeInsets.all(10)),
8184
makeSocialIcons(),
8285
Padding(padding: const EdgeInsets.all(5)),
83-
Text("About", style: Theme.of(context).textTheme.headline4,),
86+
Text(
87+
"About",
88+
style: Theme.of(context).textTheme.headline4,
89+
),
8490
Padding(padding: const EdgeInsets.all(5)),
85-
Text("Hello! I'm a Software Developer${makeStatement()} who loves experimenting with various new languages, technologies, and tools. "
91+
Text(
92+
"Hello! I'm a Software Developer${makeStatement()} who loves experimenting with various new languages, technologies, and tools. "
8693
"I'm currently a student at Georgia Tech looking to expand my horizon of Computer Science knowledge. Aside from development, "
8794
"I love hiking outdoors, experimenting with coffee-making and watching new TV shows and movies! If you didn't know, I'm also a huge Star Wars fan!"),
8895
Padding(padding: const EdgeInsets.all(10)),
89-
Text("Experience", style: Theme.of(context).textTheme.headline4,),
96+
Text(
97+
"Experience",
98+
style: Theme.of(context).textTheme.headline4,
99+
),
90100
Padding(padding: const EdgeInsets.all(5)),
91101
Text("Rust:"),
92-
BulletListText("About 2 years, started writing code with Rust in 2020"),
93-
BulletListText("Created an open source package for HOTP & TOTP generation and validation"),
94-
BulletListText("Re-wrote cClip's Direct Transfer implementation in Rust, improving performance nearly 10x and dropping errors 20% (threading + safety)"),
102+
BulletListText(
103+
"About 2 years, started writing code with Rust in 2020"),
104+
BulletListText(
105+
"Created an open source package for HOTP & TOTP generation and validation"),
106+
BulletListText(
107+
"Re-wrote cClip's Direct Transfer implementation in Rust, improving performance nearly 10x and dropping errors 20% (threading + safety)"),
95108
Padding(padding: const EdgeInsets.all(5)),
96109
Text("Flutter & Dart:"),
97-
BulletListText("Over 3 years, started writing code with Flutter & Dart in 2018 during Flutter's beta phase"),
98-
BulletListText("Freelance Development utilizing Flutter to build applications for various clients"),
99-
BulletListText("Experienced in complex skills such as isolate computation for encryption & efficient state management"),
110+
BulletListText(
111+
"Over 3 years, started writing code with Flutter & Dart in 2018 during Flutter's beta phase"),
112+
BulletListText(
113+
"Freelance Development utilizing Flutter to build applications for various clients"),
114+
BulletListText(
115+
"Experienced in complex skills such as isolate computation for encryption & efficient state management"),
100116
Padding(padding: const EdgeInsets.all(5)),
101117
Text("Java/Kotlin & Android:"),
102-
BulletListText("Over 5 years, where I started writing code in Java consistently in 7th grade"),
118+
BulletListText(
119+
"Over 5 years, where I started writing code in Java consistently in 7th grade"),
103120
BulletListText("Primarily Java and Android"),
104-
BulletListText("Worked with various Android apps written with Java, but have no trouble interpreting and utilizing Kotlin"),
121+
BulletListText(
122+
"Worked with various Android apps written with Java, but have no trouble interpreting and utilizing Kotlin"),
105123
Padding(padding: const EdgeInsets.all(5)),
106124
Text("Swift/Objective-C & iOS/macOS:"),
107-
BulletListText("Over 3 years, where I started taking a look at Objective-C code in various Open Source macOS apps"),
108-
BulletListText("Primarily in swift for macOS development through AppKit"),
109-
BulletListText("Wrote iOS specific features in Swift within Flutter apps"),
125+
BulletListText(
126+
"Over 3 years, where I started taking a look at Objective-C code in various Open Source macOS apps"),
127+
BulletListText(
128+
"Primarily in swift for macOS development through AppKit"),
129+
BulletListText(
130+
"Wrote iOS specific features in Swift within Flutter apps"),
110131
Padding(padding: const EdgeInsets.all(5)),
111132
createResumeViewOpen(),
112133
],
@@ -135,10 +156,13 @@ class AboutState extends State<About> with WidgetsBindingObserver {
135156
children: [
136157
ImageLink(
137158
link: "https://github.com/tmthecoder",
138-
assetUri: "assets/third_party/github_logo_${ThemeController.of(context).isDark ? "dark" : "light"}.png",
159+
assetUri:
160+
"assets/third_party/github_logo_${ThemeController.of(context).isDark ? "dark" : "light"}.png",
139161
edgeInsets: const EdgeInsets.all(10),
140162
),
141-
Padding(padding: const EdgeInsets.all(20),),
163+
Padding(
164+
padding: const EdgeInsets.all(20),
165+
),
142166
ImageLink(
143167
link: "https://www.linkedin.com/in/tmthecoder",
144168
assetUri: "assets/third_party/linkedin_logo.png",
@@ -154,38 +178,37 @@ class AboutState extends State<About> with WidgetsBindingObserver {
154178
Widget createResumeViewOpen() {
155179
String userPlatform = getUserAgent().toLowerCase();
156180
bool showSingleButton = false;
157-
if (userPlatform.contains("ipod") || userPlatform.contains("ipad") || userPlatform.contains("iphone") || userPlatform.contains("android")) {
181+
if (userPlatform.contains("ipod") ||
182+
userPlatform.contains("ipad") ||
183+
userPlatform.contains("iphone") ||
184+
userPlatform.contains("android")) {
158185
showSingleButton = true;
159186
}
160187
return RichText(
161-
text: TextSpan(
162-
children: [
163-
TextSpan(
164-
text: "Resume (",
165-
style: Theme.of(context).textTheme.bodyText2
166-
),
167-
TextSpan(
168-
text: "View",
169-
style: Theme.of(context).textTheme.bodyText2?.merge(TextStyle(color: Colors.blue)),
170-
recognizer: TapGestureRecognizer()
171-
..onTap = viewResume,
172-
),
173-
if (!showSingleButton) TextSpan(
174-
text: " / ",
175-
style: Theme.of(context).textTheme.bodyText2
176-
),
177-
if (!showSingleButton) TextSpan(
178-
text: "Download",
179-
style: Theme.of(context).textTheme.bodyText2?.merge(TextStyle(color: Colors.blue)),
180-
recognizer: TapGestureRecognizer()
181-
..onTap = downloadResume,
182-
),
188+
text: TextSpan(children: [
189+
TextSpan(
190+
text: "Resume (", style: Theme.of(context).textTheme.bodyText2),
191+
TextSpan(
192+
text: "View",
193+
style: Theme.of(context)
194+
.textTheme
195+
.bodyText2
196+
?.merge(TextStyle(color: Colors.blue)),
197+
recognizer: TapGestureRecognizer()..onTap = viewResume,
198+
),
199+
if (!showSingleButton)
200+
TextSpan(text: " / ", style: Theme.of(context).textTheme.bodyText2),
201+
if (!showSingleButton)
183202
TextSpan(
184-
text: ")",
185-
style: Theme.of(context).textTheme.bodyText2
203+
text: "Download",
204+
style: Theme.of(context)
205+
.textTheme
206+
.bodyText2
207+
?.merge(TextStyle(color: Colors.blue)),
208+
recognizer: TapGestureRecognizer()..onTap = downloadResume,
186209
),
187-
]
188-
),
210+
TextSpan(text: ")", style: Theme.of(context).textTheme.bodyText2),
211+
]),
189212
);
190213
}
191214

@@ -197,7 +220,7 @@ class AboutState extends State<About> with WidgetsBindingObserver {
197220
int getAge() {
198221
DateTime now = DateTime.now();
199222
DateTime birthday = DateTime(2003, 12, 19);
200-
return (now.difference(birthday).inDays/365).floor();
223+
return (now.difference(birthday).inDays / 365).floor();
201224
}
202225

203226
/// Method to get my level of education because I'd forget to update it
@@ -207,7 +230,7 @@ class AboutState extends State<About> with WidgetsBindingObserver {
207230
DateTime now = DateTime.now();
208231
if (now.year >= 2026 && now.month > 5) {
209232
return "";
210-
} else if (now.year >= 2022 && now.month > 5) {
233+
} else if ((now.year >= 2022 && now.month > 5) || now.year > 2022) {
211234
schoolLevel = "College";
212235
} else {
213236
schoolLevel = "High School";
@@ -252,8 +275,7 @@ class AboutState extends State<About> with WidgetsBindingObserver {
252275
ByteData fileData = await rootBundle.load("assets/resume.pdf");
253276
final blob = html.Blob([fileData], 'application/pdf');
254277
final url = html.Url.createObjectUrlFromBlob(blob);
255-
final anchor =
256-
html.document.createElement('a') as html.AnchorElement
278+
final anchor = html.document.createElement('a') as html.AnchorElement
257279
..href = url
258280
..style.display = 'none'
259281
..download = 'Mehta_Tejas-Resume.pdf';
@@ -262,5 +284,4 @@ class AboutState extends State<About> with WidgetsBindingObserver {
262284
html.document.body?.children.remove(anchor);
263285
html.Url.revokeObjectUrl(url);
264286
}
265-
266287
}

0 commit comments

Comments
 (0)