diff --git a/.vscode/settings.json b/.vscode/settings.json index 3072c5d..13b3274 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "cmake.configureOnOpen": false, "cSpell.words": [ "fase", + "Gandhinagar", "kowi", "linkedin", "meuzard", diff --git a/lib/404.dart b/lib/404.dart index 0d3dc1f..8ca7e43 100644 --- a/lib/404.dart +++ b/lib/404.dart @@ -18,9 +18,9 @@ class _NotFound404State extends State { Widget build(BuildContext context) { var textStyle = getValueForScreenType( context: context, - mobile: Theme.of(context).textTheme.headline4!, - tablet: Theme.of(context).textTheme.headline2, - desktop: Theme.of(context).textTheme.headline1, + mobile: Theme.of(context).textTheme.headlineMedium!, + tablet: Theme.of(context).textTheme.displayMedium, + desktop: Theme.of(context).textTheme.displayLarge, ); var padding = getValueForScreenType( @@ -67,7 +67,7 @@ class _NotFound404State extends State { S.of(context).notFoundHome, style: Theme.of(context) .textTheme - .headline6 + .titleLarge ?.copyWith(color: textColor), ), ), diff --git a/lib/about/about.dart b/lib/about/about.dart index 0deeae8..1766d84 100644 --- a/lib/about/about.dart +++ b/lib/about/about.dart @@ -26,10 +26,10 @@ class About extends StatelessWidget { @override Widget build(BuildContext context) { - return ScreenTypeLayout( - desktop: desktopView(context), - tablet: tabletView(context), - mobile: mobileView(context), + return ScreenTypeLayout.builder( + desktop: (context) => desktopView(context), + tablet: (context) => tabletView(context), + mobile: (context) => mobileView(context), ); } @@ -49,12 +49,12 @@ class About extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(S.of(context).aboutGreeting(dayTime()), - style: Theme.of(context).textTheme.headline3), + style: Theme.of(context).textTheme.displaySmall), Text(S.of(context).title + '.', - style: Theme.of(context).textTheme.headline1), + style: Theme.of(context).textTheme.displayLarge), SizedBox(height: 40), Text(S.of(context).aboutDesc, - style: Theme.of(context).textTheme.subtitle1), + style: Theme.of(context).textTheme.titleMedium), ], ), Tabs(tabData: tabData), @@ -84,16 +84,16 @@ class About extends StatelessWidget { children: [ Text( S.of(context).aboutGreeting(dayTime()), - style: Theme.of(context).textTheme.headline3, + style: Theme.of(context).textTheme.displaySmall, ), Text( S.of(context).title + '.', - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), SizedBox(height: 40), Text( S.of(context).aboutDesc, - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), ], ), @@ -121,19 +121,19 @@ class About extends StatelessWidget { FittedBox( child: Text( S.of(context).aboutGreeting(dayTime()), - style: Theme.of(context).textTheme.headline3, + style: Theme.of(context).textTheme.displaySmall, ), ), FittedBox( child: Text( S.of(context).title + '.', - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), ), SizedBox(height: 40), Text( S.of(context).aboutDesc, - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleMedium, ), ], ), diff --git a/lib/about/contact.dart b/lib/about/contact.dart index 15709f9..f8ea2a7 100644 --- a/lib/about/contact.dart +++ b/lib/about/contact.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:portfolio/components/analytics.dart'; import 'package:portfolio/utils/constants.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class Contact extends StatelessWidget { const Contact({Key? key}) : super(key: key); @@ -66,7 +66,7 @@ class Contact extends StatelessWidget { }) { return IconButton( onPressed: () { - launch(url); + launchUrlString(url); PortfolioAnalytics.log(LogType.contactClick, property: url); }, tooltip: tooltip, diff --git a/lib/blogs/blog_card.dart b/lib/blogs/blog_card.dart index c9647b0..c17dbfe 100644 --- a/lib/blogs/blog_card.dart +++ b/lib/blogs/blog_card.dart @@ -2,12 +2,12 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:portfolio/blogs/blog_data.dart'; import 'package:portfolio/components/analytics.dart'; -import 'package:portfolio/components/portfolio_card.dart'; -import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/components/card_tag.dart'; -import 'package:portfolio/style/colours.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:portfolio/components/portfolio_card.dart'; import 'package:portfolio/generated/l10n.dart'; +import 'package:portfolio/style/colors.dart'; +import 'package:portfolio/utils/constants.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class BlogCard extends StatelessWidget { const BlogCard({ @@ -21,7 +21,7 @@ class BlogCard extends StatelessWidget { Widget build(BuildContext context) { return GestureDetector( onTap: () { - launch(data.url); + launchUrlString(data.url); PortfolioAnalytics.log(LogType.cardClick, property: data.url); }, child: PortfolioCard( @@ -48,7 +48,7 @@ class BlogCard extends StatelessWidget { ), Text( data.title, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, maxLines: 1, overflow: TextOverflow.ellipsis, ), diff --git a/lib/blogs/blogs.dart b/lib/blogs/blogs.dart index 951c0ed..fdac8cf 100644 --- a/lib/blogs/blogs.dart +++ b/lib/blogs/blogs.dart @@ -9,10 +9,10 @@ class Blogs extends StatelessWidget { @override Widget build(BuildContext context) { - return ScreenTypeLayout( - desktop: desktopView(), - tablet: tabletView(), - mobile: mobileView(), + return ScreenTypeLayout.builder( + desktop: (_) => desktopView(), + tablet: (_) => tabletView(), + mobile: (_) => mobileView(), ); } diff --git a/lib/components/card_tag.dart b/lib/components/card_tag.dart index ca58951..8d3a657 100644 --- a/lib/components/card_tag.dart +++ b/lib/components/card_tag.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; class CardTag extends StatelessWidget { const CardTag({ @@ -20,7 +20,7 @@ class CardTag extends StatelessWidget { padding: EdgeInsets.all(tagSize), child: Text( tag.toUpperCase(), - style: Theme.of(context).textTheme.overline, + style: Theme.of(context).textTheme.labelSmall, ), ), ); diff --git a/lib/components/footer.dart b/lib/components/footer.dart index 55318cd..33e9b9f 100644 --- a/lib/components/footer.dart +++ b/lib/components/footer.dart @@ -1,19 +1,19 @@ import 'package:flutter/material.dart'; import 'package:portfolio/components/analytics.dart'; -import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/generated/l10n.dart'; +import 'package:portfolio/utils/constants.dart'; import 'package:responsive_builder/responsive_builder.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class Footer extends StatelessWidget { const Footer({Key? key}) : super(key: key); @override Widget build(BuildContext context) { - return ScreenTypeLayout( - desktop: desktopView(context), - tablet: tabletView(context), - mobile: mobileView(context), + return ScreenTypeLayout.builder( + desktop: (context) => desktopView(context), + tablet: (context) => tabletView(context), + mobile: (context) => mobileView(context), ); } @@ -29,7 +29,7 @@ class Footer extends StatelessWidget { S.of(context).footerPower + "."), onTap: () { - launch("https://dribbble.com/NicolasMzrd"); + launchUrlString("https://dribbble.com/NicolasMzrd"); PortfolioAnalytics.log(LogType.footerCreditClick); }, ), @@ -46,7 +46,7 @@ class Footer extends StatelessWidget { child: GestureDetector( child: Text(S.of(context).footerCredit), onTap: () { - launch("https://dribbble.com/NicolasMzrd"); + launchUrlString("https://dribbble.com/NicolasMzrd"); }, ), ), @@ -62,7 +62,7 @@ class Footer extends StatelessWidget { child: GestureDetector( child: Text(S.of(context).footerCredit), onTap: () { - launch("https://dribbble.com/NicolasMzrd"); + launchUrlString("https://dribbble.com/NicolasMzrd"); }, ), ), diff --git a/lib/experience/experience.dart b/lib/experience/experience.dart index 937800a..fd6e06b 100644 --- a/lib/experience/experience.dart +++ b/lib/experience/experience.dart @@ -9,10 +9,10 @@ class Experience extends StatelessWidget { @override Widget build(BuildContext context) { - return ScreenTypeLayout( - desktop: desktopView(), - tablet: tabletView(), - mobile: mobileView(), + return ScreenTypeLayout.builder( + desktop: (_) => desktopView(), + tablet: (_) => tabletView(), + mobile: (_) => mobileView(), ); } @@ -54,13 +54,21 @@ class Experience extends StatelessWidget { } final data = [ + ExperienceData( + organizationName: "Even Healthcare", + position: "Software Engineer", + description: + "Building an awesome product for creators all around the world.", + startYearMonth: "Aug 23", + endYearMonth: "Present", + ), ExperienceData( organizationName: "Qoohoo", - position: "Product Engineer Intern", + position: "Product Engineer", description: "Building an awesome product for creators all around the world.", startYearMonth: "Oct 21", - endYearMonth: "Present", + endYearMonth: "July 23", ), ExperienceData( organizationName: "National Informatics Centre | Govt of India", diff --git a/lib/experience/experience_card.dart b/lib/experience/experience_card.dart index d7656b2..d4c09aa 100644 --- a/lib/experience/experience_card.dart +++ b/lib/experience/experience_card.dart @@ -4,7 +4,7 @@ import 'package:portfolio/components/portfolio_card.dart'; import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/experience/experience_data.dart'; import 'package:portfolio/components/card_tag.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; class ExperienceCard extends StatelessWidget { const ExperienceCard({ @@ -35,7 +35,7 @@ class ExperienceCard extends StatelessWidget { ), Text( data.organizationName, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, maxLines: 1, overflow: TextOverflow.ellipsis, ), diff --git a/lib/homepage.dart b/lib/homepage.dart index eef0f0f..52c8adf 100644 --- a/lib/homepage.dart +++ b/lib/homepage.dart @@ -3,7 +3,7 @@ import 'package:portfolio/about/about.dart'; import 'package:portfolio/about/tabs.dart'; import 'package:portfolio/blogs/blogs.dart'; import 'package:portfolio/components/footer.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/experience/experience.dart'; import 'package:portfolio/generated/l10n.dart'; @@ -58,10 +58,10 @@ class _HomePageState extends State { return Scaffold( body: Padding( padding: const EdgeInsets.all(Constants.globalPadding), - child: ScreenTypeLayout( - desktop: desktopView(), - tablet: tabletView(context), - mobile: mobileView(context), + child: ScreenTypeLayout.builder( + desktop: (context) => desktopView(), + tablet: (context) => tabletView(context), + mobile: (context) => mobileView(context), ), ), ); @@ -120,7 +120,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabProjects, - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), @@ -131,7 +131,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabExperience, - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), @@ -142,7 +142,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabBlog, - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), @@ -181,7 +181,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabProjects.split(" ")[1], - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), @@ -199,7 +199,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabExperience.split(" ")[1], - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), @@ -217,7 +217,7 @@ class _HomePageState extends State { padding: const EdgeInsets.all(Constants.cardMargin), child: Text( S.of(context).tabBlog.split(" ")[1], - style: Theme.of(context).textTheme.headline5, + style: Theme.of(context).textTheme.headlineSmall, ), ), ), diff --git a/lib/main.dart b/lib/main.dart index 40a56ea..ab16921 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,7 +5,7 @@ import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:portfolio/firebase_options.dart'; import 'package:portfolio/generated/l10n.dart'; import 'package:portfolio/style/app_theme.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/utils/routes.dart'; import 'package:responsive_builder/responsive_builder.dart'; @@ -45,6 +45,7 @@ class MyApp extends StatelessWidget { Locale('en', ''), ], theme: ThemeData( + useMaterial3: false, scaffoldBackgroundColor: ColorPalette.background, primaryColor: ColorPalette.background, cardTheme: PortfolioTheme.cardTheme(context), diff --git a/lib/projects/project_card.dart b/lib/projects/project_card.dart index 99098d0..fbc03c5 100644 --- a/lib/projects/project_card.dart +++ b/lib/projects/project_card.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:portfolio/components/analytics.dart'; +import 'package:portfolio/components/card_tag.dart'; import 'package:portfolio/components/portfolio_card.dart'; -import 'package:portfolio/utils/constants.dart'; import 'package:portfolio/projects/project_data.dart'; -import 'package:portfolio/components/card_tag.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; +import 'package:portfolio/utils/constants.dart'; import 'package:responsive_builder/responsive_builder.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class ProjectCard extends StatelessWidget { const ProjectCard({ @@ -29,7 +29,7 @@ class ProjectCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ FaIcon( - FontAwesomeIcons.tools, + FontAwesomeIcons.screwdriverWrench, size: Constants.faIconSizeCardHeader, color: ColorPalette.dullWhite, ), @@ -42,7 +42,7 @@ class ProjectCard extends StatelessWidget { ), Text( data.title, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, maxLines: 1, overflow: TextOverflow.ellipsis, ), @@ -70,7 +70,7 @@ class ProjectCard extends StatelessWidget { constraints: BoxConstraints(minHeight: 0, minWidth: 0), splashRadius: Constants.cardIconSplash, onPressed: () { - launch(data.gitHub); + launchUrlString(data.gitHub); PortfolioAnalytics.log( LogType.cardGitHubClick, property: data.gitHub, @@ -81,7 +81,7 @@ class ProjectCard extends StatelessWidget { if (data.link.isNotEmpty) IconButton( icon: FaIcon( - FontAwesomeIcons.externalLinkAlt, + FontAwesomeIcons.upRightFromSquare, size: Constants.faIconSizeCard, color: ColorPalette.dullWhite, ), @@ -89,7 +89,7 @@ class ProjectCard extends StatelessWidget { constraints: BoxConstraints(minHeight: 0, minWidth: 0), splashRadius: Constants.cardIconSplash, onPressed: () { - launch(data.link); + launchUrlString(data.link); PortfolioAnalytics.log( LogType.cardExternalLinkClick, property: data.link, diff --git a/lib/projects/projects.dart b/lib/projects/projects.dart index 489b476..67049ed 100644 --- a/lib/projects/projects.dart +++ b/lib/projects/projects.dart @@ -9,10 +9,10 @@ class Projects extends StatelessWidget { @override Widget build(BuildContext context) { - return ScreenTypeLayout( - desktop: desktopView(), - tablet: tabletView(), - mobile: mobileView(), + return ScreenTypeLayout.builder( + desktop: (_) => desktopView(), + tablet: (_) => tabletView(), + mobile: (_) => mobileView(), ); } diff --git a/lib/style/app_theme.dart b/lib/style/app_theme.dart index db62843..f64c6a0 100644 --- a/lib/style/app_theme.dart +++ b/lib/style/app_theme.dart @@ -1,48 +1,57 @@ import 'package:flutter/material.dart'; -import 'package:portfolio/style/colours.dart'; +import 'package:portfolio/style/colors.dart'; import 'package:portfolio/utils/constants.dart'; class PortfolioTheme { static TextTheme textTheme(BuildContext context) { return TextTheme( - bodyText1: Theme.of(context) + bodyLarge: Theme.of(context) .textTheme - .bodyText1 + .bodyLarge ?.copyWith(color: ColorPalette.highlightText), - bodyText2: Theme.of(context) + bodyMedium: Theme.of(context) .textTheme - .bodyText2 + .bodyMedium ?.copyWith(color: ColorPalette.descriptionText), - button: Theme.of(context).textTheme.button?.copyWith(color: Colors.white), - headline1: Theme.of(context) + labelLarge: + Theme.of(context).textTheme.labelLarge?.copyWith(color: Colors.white), + displayLarge: Theme.of(context) .textTheme - .headline1 + .displayLarge ?.copyWith(color: Colors.white, fontSize: 84), - headline2: - Theme.of(context).textTheme.headline2?.copyWith(color: Colors.white), - headline3: - Theme.of(context).textTheme.headline3?.copyWith(color: Colors.white), - headline4: - Theme.of(context).textTheme.headline4?.copyWith(color: Colors.white), - headline5: - Theme.of(context).textTheme.headline5?.copyWith(color: Colors.white), - headline6: - Theme.of(context).textTheme.headline6?.copyWith(color: Colors.white), - caption: Theme.of(context) + displayMedium: Theme.of(context) .textTheme - .caption + .displayMedium + ?.copyWith(color: Colors.white), + displaySmall: Theme.of(context) + .textTheme + .displaySmall + ?.copyWith(color: Colors.white), + headlineMedium: Theme.of(context) + .textTheme + .headlineMedium + ?.copyWith(color: Colors.white), + headlineSmall: Theme.of(context) + .textTheme + .headlineSmall + ?.copyWith(color: Colors.white), + titleLarge: + Theme.of(context).textTheme.titleLarge?.copyWith(color: Colors.white), + bodySmall: Theme.of(context) + .textTheme + .bodySmall ?.copyWith(color: ColorPalette.dullWhite), - overline: Theme.of(context) + labelSmall: Theme.of(context) .textTheme - .overline + .labelSmall ?.copyWith(color: ColorPalette.dullWhite), - subtitle1: Theme.of(context) + titleMedium: Theme.of(context) .textTheme - .subtitle1 + .titleMedium ?.copyWith(color: ColorPalette.icon), - subtitle2: Theme.of(context) + titleSmall: Theme.of(context) .textTheme - .subtitle2 + .titleSmall ?.copyWith(color: ColorPalette.offWhiteText), ); } diff --git a/lib/style/colours.dart b/lib/style/colors.dart similarity index 100% rename from lib/style/colours.dart rename to lib/style/colors.dart diff --git a/lib/style/text_demo.dart b/lib/style/text_demo.dart index 509ac64..8a72dfc 100644 --- a/lib/style/text_demo.dart +++ b/lib/style/text_demo.dart @@ -15,31 +15,31 @@ class TextDemo extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Text("bodyText1: " + text, - style: Theme.of(context).textTheme.bodyText1), + style: Theme.of(context).textTheme.bodyLarge), Text("bodyText2: " + text, - style: Theme.of(context).textTheme.bodyText2), + style: Theme.of(context).textTheme.bodyMedium), Text("button: " + text, - style: Theme.of(context).textTheme.button), + style: Theme.of(context).textTheme.labelLarge), Text("headline1: " + text, - style: Theme.of(context).textTheme.headline1), + style: Theme.of(context).textTheme.displayLarge), Text("headline2: " + text, - style: Theme.of(context).textTheme.headline2), + style: Theme.of(context).textTheme.displayMedium), Text("headline3: " + text, - style: Theme.of(context).textTheme.headline3), + style: Theme.of(context).textTheme.displaySmall), Text("headline4: " + text, - style: Theme.of(context).textTheme.headline4), + style: Theme.of(context).textTheme.headlineMedium), Text("headline5: " + text, - style: Theme.of(context).textTheme.headline5), + style: Theme.of(context).textTheme.headlineSmall), Text("headline6: " + text, - style: Theme.of(context).textTheme.headline6), + style: Theme.of(context).textTheme.titleLarge), Text("caption: " + text, - style: Theme.of(context).textTheme.caption), + style: Theme.of(context).textTheme.bodySmall), Text("overline: " + text, - style: Theme.of(context).textTheme.overline), + style: Theme.of(context).textTheme.labelSmall), Text("subtitle1: " + text, - style: Theme.of(context).textTheme.subtitle1), + style: Theme.of(context).textTheme.titleMedium), Text("subtitle2: " + text, - style: Theme.of(context).textTheme.subtitle2), + style: Theme.of(context).textTheme.titleSmall), SizedBox(height: 50), Card( child: Padding(