diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9fae8..94e516f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.5.5 + +- FIX: Fixed issue with router routing to the wrong page when the theme is toggled when navigating back from a different page. (Temporary fix for when the route is popped.) +- FIX: Fixed spacing issue in the home header banner. +- REVISED: Updated the home header banner subtitle to cycle through a list rather than just two. + ## 2.5.4 - FIX: Fixed issue with the local video player restarting when the media browser is opened or closed. diff --git a/assets/json/projects.json b/assets/json/projects.json index 45d30fd..b851cbf 100644 --- a/assets/json/projects.json +++ b/assets/json/projects.json @@ -628,9 +628,9 @@ "source": "thumbnail.webp" }, { - "type": "localVideo", + "type": "youTubeVideo", "caption": "F1 Sim Engineer Demo", - "source": "video_1.mp4" + "source": "4ROWmlwLq6M" } ], "externalLinks": [ diff --git a/lib/common/strings.dart b/lib/common/strings.dart index ba5057e..bd08071 100644 --- a/lib/common/strings.dart +++ b/lib/common/strings.dart @@ -5,11 +5,14 @@ class Strings { static const String currentLocation = 'VA, USA'; static const String lastUpdated = 'Updated AUG 2024'; + static const List headerSubtitles = [ + 'Software Engineer • Innovator • Technologist', + 'Give me a lever long enough and a fulcrum on which to place it, and I shall move the world. ~Archimedes', + 'Men for Others' + ]; + static const String appName = 'PLG Portfolio'; static const String name = 'Pablo L. Guerra'; - static const String subtitle = - 'Software Engineer • Innovator • Technologist'; - static const String motto = 'Men for Others'; static const String explore = 'Explore'; static const String expand = 'Expand'; static const String collapse = 'Collapse'; diff --git a/lib/main.dart b/lib/main.dart index 6f66074..1551d32 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'common/routing/app_router.dart'; +import 'common/routing/routes.dart'; import 'common/strings.dart'; import 'common/theming/theme_notifier.dart'; import 'models/app_state.dart'; @@ -31,6 +32,10 @@ class _PortfolioAppState extends State { // Listen to theme changes and rebuild the application. themeNotifier.addListener(() { + // ! This should be handled in AppRouter but redirect isn't being called + // ! on pop, so we're handling it here until it's fixed in GoRouter. + _appState.currentRoute = Routes.home; + setState(() {}); }); } diff --git a/lib/pages/home/widgets/header.dart b/lib/pages/home/widgets/header.dart index 200abe8..d1fcf5d 100644 --- a/lib/pages/home/widgets/header.dart +++ b/lib/pages/home/widgets/header.dart @@ -51,24 +51,25 @@ class Header extends StatelessWidget { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - DefaultTextStyle( - style: compact - ? Theme.of(context).textTheme.labelSmall! - : Theme.of(context).textTheme.titleMedium!, - textAlign: TextAlign.left, - child: AnimatedTextKit( - repeatForever: true, - pause: const Duration(milliseconds: 250), - animatedTexts: [ - RotateAnimatedText( - Strings.subtitle, - duration: const Duration(seconds: 7), - ), - RotateAnimatedText( - Strings.motto, - duration: const Duration(seconds: 7), - ), - ], + Flexible( + child: DefaultTextStyle( + style: compact + ? Theme.of(context).textTheme.labelSmall! + : Theme.of(context).textTheme.titleMedium!, + maxLines: 2, + child: AnimatedTextKit( + repeatForever: true, + pause: const Duration(milliseconds: 250), + animatedTexts: Strings.headerSubtitles.map( + (String text) { + return RotateAnimatedText( + text, + alignment: Alignment.centerLeft, + duration: const Duration(seconds: 7), + ); + }, + ).toList(), + ), ), ), SizedBox( @@ -107,6 +108,7 @@ class Header extends StatelessWidget { child: Row( children: [ _profilePicture(context), + const SizedBox(width: 12.0), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center,