From 73ea3dc7ed624d1d45a9e281fb57c1476fe642c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 21:39:33 +0300 Subject: [PATCH 1/2] Bump go_router from 14.2.3 to 14.2.6 (#103) Bumps [go_router](https://github.com/flutter/packages/tree/main/packages) from 14.2.3 to 14.2.6. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/go_router-v14.2.6/packages) --- updated-dependencies: - dependency-name: go_router dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pubspec.lock | 8 ++++---- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 0afb7f7..707b344 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -569,10 +569,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: ddc16d34b0d74cb313986918c0f0885a7ba2fc24d8fb8419de75f0015144ccfe + sha256: "48d03a1e4887b00fe622695139246e3c778ac814eeb32421467b56d23fa64034" url: "https://pub.dev" source: hosted - version: "14.2.3" + version: "14.2.6" google_fonts: dependency: "direct main" description: @@ -1358,10 +1358,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7b09498..ee3f815 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: flutter_svg: ^2.0.10+1 freezed_annotation: ^2.4.4 get_it: ^7.7.0 - go_router: ^14.2.3 + go_router: ^14.2.6 google_fonts: ^6.2.1 google_sign_in: ^6.2.1 hive: ^2.2.3 From 10e9028fa6eb45e17af160bb49b3a4ea71fe7032 Mon Sep 17 00:00:00 2001 From: Kevinhector Ngetich <47977576+kevinhectorngetich@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:37:42 +0300 Subject: [PATCH 2/2] Fix overflow issues on small devices (#104) * Fix overflow issues on small devices * Added surfaceTintColor: Colors.white to AppBar for consistency --- lib/common/widgets/personnel_widget.dart | 4 +- lib/common/widgets/social_handle.dart | 93 +++++----- lib/features/about/ui/organising_team.dart | 1 + .../about/ui/organising_team_details.dart | 2 +- .../ui/speaker_details/speaker_details.dart | 2 +- .../home/ui/speakers_list_screen.dart | 3 +- .../home/widgets/speaker_grid_tile.dart | 4 +- lib/features/home/widgets/sponsors_card.dart | 4 +- lib/features/sessions/ui/sessions_screen.dart | 165 +++++++++--------- .../ui/widgets/compact_view_card.dart | 38 ++-- pubspec.lock | 4 +- pubspec.yaml | 6 +- 12 files changed, 178 insertions(+), 148 deletions(-) diff --git a/lib/common/widgets/personnel_widget.dart b/lib/common/widgets/personnel_widget.dart index 7af86f9..fb8d6d5 100644 --- a/lib/common/widgets/personnel_widget.dart +++ b/lib/common/widgets/personnel_widget.dart @@ -42,12 +42,12 @@ class PersonnelWidget extends StatelessWidget { fit: BoxFit.cover, imageUrl: imageUrl, placeholder: (_, __) => const SizedBox( - height: 150, + height: 100, width: double.infinity, child: Center(child: CircularProgressIndicator()), ), errorWidget: (_, __, ___) => const SizedBox( - height: 150, + height: 100, width: double.infinity, child: Icon( Icons.error, diff --git a/lib/common/widgets/social_handle.dart b/lib/common/widgets/social_handle.dart index 7f17253..76ad2bc 100644 --- a/lib/common/widgets/social_handle.dart +++ b/lib/common/widgets/social_handle.dart @@ -20,51 +20,66 @@ class SocialHandleBody extends StatelessWidget { Widget build(BuildContext context) { final l10n = context.l10n; final (_, colorScheme) = Misc.getTheme(context); + final size = MediaQuery.sizeOf(context); - return Row( - children: [ - Text( - twitterUrl != null ? l10n.twitterHandle : l10n.linkedin, - style: TextStyle( - color: colorScheme.onSurface, - fontSize: 20, - ), - ), - const Spacer(), - ElevatedButton( - onPressed: () { - if (twitterUrl != null || linkedinUrl != null) { - Misc.launchURL(Uri.parse(twitterUrl ?? linkedinUrl ?? '')); - } - }, - style: ElevatedButton.styleFrom( - elevation: 0, - backgroundColor: colorScheme.surface, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - side: BorderSide( - color: colorScheme.primary, - ), + return SizedBox( + width: size.width, + child: Wrap( + spacing: 8, + crossAxisAlignment: WrapCrossAlignment.center, + alignment: WrapAlignment.spaceBetween, + children: [ + Text( + twitterUrl != null ? l10n.twitterHandle : l10n.linkedin, + style: TextStyle( + color: colorScheme.onSurface, + fontSize: 20, ), ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (twitterUrl != null) - SvgPicture.asset( - AppAssets.iconTwitter, - colorFilter: ColorFilter.mode( - colorScheme.primary, - BlendMode.srcIn, + ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 200), + child: ElevatedButton( + onPressed: () { + if (twitterUrl != null || linkedinUrl != null) { + Misc.launchURL(Uri.parse(twitterUrl ?? linkedinUrl ?? '')); + } + }, + style: ElevatedButton.styleFrom( + elevation: 0, + backgroundColor: colorScheme.surface, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + side: BorderSide( + color: colorScheme.primary, ), - height: 20, ), - const SizedBox(width: 3), - Text(name), - ], + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (twitterUrl != null) + SvgPicture.asset( + AppAssets.iconTwitter, + colorFilter: ColorFilter.mode( + colorScheme.primary, + BlendMode.srcIn, + ), + height: 20, + ), + const SizedBox(width: 3), + Flexible( + child: Text( + name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), ), - ), - ], + ], + ), ); } } diff --git a/lib/features/about/ui/organising_team.dart b/lib/features/about/ui/organising_team.dart index 490cad8..3fc2e3b 100644 --- a/lib/features/about/ui/organising_team.dart +++ b/lib/features/about/ui/organising_team.dart @@ -31,6 +31,7 @@ class _OrganisingTeamViewState extends State { crossAxisCount: 3, crossAxisSpacing: 8, mainAxisSpacing: 8, + mainAxisExtent: 150, ), itemBuilder: (context, index) => PersonnelWidget( imageUrl: individualOrganisers[index].photo, diff --git a/lib/features/about/ui/organising_team_details.dart b/lib/features/about/ui/organising_team_details.dart index 66e5583..f155162 100644 --- a/lib/features/about/ui/organising_team_details.dart +++ b/lib/features/about/ui/organising_team_details.dart @@ -36,7 +36,7 @@ class OranisingTeamMemberDetailsPage extends StatelessWidget { ), expandedHeight: 100, bottom: PreferredSize( - preferredSize: const Size.fromHeight(0), + preferredSize: const Size.fromHeight(120), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/features/home/ui/speaker_details/speaker_details.dart b/lib/features/home/ui/speaker_details/speaker_details.dart index deab3bf..7627fee 100644 --- a/lib/features/home/ui/speaker_details/speaker_details.dart +++ b/lib/features/home/ui/speaker_details/speaker_details.dart @@ -35,7 +35,7 @@ class SpeakerDetailsPage extends StatelessWidget { ), expandedHeight: 100, bottom: PreferredSize( - preferredSize: const Size.fromHeight(0), + preferredSize: const Size.fromHeight(120), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/features/home/ui/speakers_list_screen.dart b/lib/features/home/ui/speakers_list_screen.dart index 689709f..1f35383 100644 --- a/lib/features/home/ui/speakers_list_screen.dart +++ b/lib/features/home/ui/speakers_list_screen.dart @@ -25,6 +25,7 @@ class SpeakerListScreen extends StatelessWidget { l10n.speakers, style: TextStyle(color: colorScheme.onSurface), ), + surfaceTintColor: Colors.white, ), body: BlocBuilder( builder: (context, state) => state.maybeWhen( @@ -35,7 +36,7 @@ class SpeakerListScreen extends StatelessWidget { gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( mainAxisSpacing: 4, crossAxisSpacing: 4, - childAspectRatio: 9 / 14, + mainAxisExtent: 316, crossAxisCount: 2, ), itemBuilder: (context, index) => diff --git a/lib/features/home/widgets/speaker_grid_tile.dart b/lib/features/home/widgets/speaker_grid_tile.dart index 087349b..0bb32e3 100644 --- a/lib/features/home/widgets/speaker_grid_tile.dart +++ b/lib/features/home/widgets/speaker_grid_tile.dart @@ -67,7 +67,7 @@ class SpeakerGridTile extends StatelessWidget { ), textAlign: TextAlign.center, ), - const SizedBox(height: 8), + const Spacer(), Text( speaker.tagline ?? '', overflow: TextOverflow.clip, @@ -77,7 +77,7 @@ class SpeakerGridTile extends StatelessWidget { ), textAlign: TextAlign.center, ), - const SizedBox(height: 10), + const Spacer(), SizedBox( width: double.infinity, child: ElevatedButton( diff --git a/lib/features/home/widgets/sponsors_card.dart b/lib/features/home/widgets/sponsors_card.dart index 10be706..6c49308 100644 --- a/lib/features/home/widgets/sponsors_card.dart +++ b/lib/features/home/widgets/sponsors_card.dart @@ -35,8 +35,8 @@ class _SponsorsCardState extends State { color: colorScheme.secondaryContainer, ), child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - const Spacer(), Text( l10n.sponsors, style: TextStyle( @@ -45,7 +45,6 @@ class _SponsorsCardState extends State { fontSize: 18, ), ), - const Spacer(), BlocBuilder( builder: (context, state) => state.maybeWhen( loaded: (sponsors) { @@ -101,7 +100,6 @@ class _SponsorsCardState extends State { ), ), ), - const Spacer(), ], ), ); diff --git a/lib/features/sessions/ui/sessions_screen.dart b/lib/features/sessions/ui/sessions_screen.dart index cfb5efc..c598d7d 100644 --- a/lib/features/sessions/ui/sessions_screen.dart +++ b/lib/features/sessions/ui/sessions_screen.dart @@ -55,94 +55,103 @@ class _SessionsScreenState extends State headerSliverBuilder: (context, innerBoxIsScrolled) => [ SliverToBoxAdapter( child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - BlocConsumer( - listener: (context, state) { - state.mapOrNull( - loaded: (loaded) { - setState(() { - _availableTabs = loaded.groupedSessions.length; - }); - }, - ); - }, - builder: (context, state) => state.maybeWhen( - orElse: () => const Padding( - padding: EdgeInsets.symmetric(horizontal: 16), - child: CircularProgressIndicator(), - ), - loaded: (groupedSessions) => TabBar( - onTap: (value) => setState(() { - _currentTab = value; - }), - isScrollable: true, - tabAlignment: TabAlignment.start, - indicatorColor: Colors.transparent, - dividerColor: Colors.transparent, - overlayColor: - WidgetStateProperty.all(Colors.transparent), - tabs: [ - ...groupedSessions.keys.map( - (date) => DayTabView( - date: DateFormat.d().format( - DateFormat('MM/dd/yyyy').parse(date), + Flexible( + flex: 8, + child: BlocConsumer( + listener: (context, state) { + state.mapOrNull( + loaded: (loaded) { + setState(() { + _availableTabs = loaded.groupedSessions.length; + }); + }, + ); + }, + builder: (context, state) => state.maybeWhen( + orElse: () => const Padding( + padding: EdgeInsets.symmetric(horizontal: 16), + child: CircularProgressIndicator(), + ), + loaded: (groupedSessions) => TabBar( + onTap: (value) => setState(() { + _currentTab = value; + }), + isScrollable: true, + tabAlignment: TabAlignment.start, + indicatorColor: Colors.transparent, + dividerColor: Colors.transparent, + overlayColor: + WidgetStateProperty.all(Colors.transparent), + tabs: [ + ...groupedSessions.keys.map( + (date) => DayTabView( + date: DateFormat.d().format( + DateFormat('MM/dd/yyyy').parse(date), + ), + day: groupedSessions.keys + .toList() + .indexOf(date) + + 1, + isActive: _currentTab == + groupedSessions.keys + .toList() + .indexOf(date), ), - day: groupedSessions.keys - .toList() - .indexOf(date) + - 1, - isActive: _currentTab == - groupedSessions.keys.toList().indexOf(date), ), - ), - ], + ], + ), ), ), ), - const Spacer(), - Padding( - padding: const EdgeInsets.only(right: 16), - child: Column( - children: [ - Switch( - value: _isBookmarked, - onChanged: (newValue) { - setState(() { - _isBookmarked = newValue; - }); + Flexible( + flex: 2, + child: Padding( + padding: const EdgeInsets.only(right: 16), + child: Column( + children: [ + Switch( + value: _isBookmarked, + onChanged: (newValue) { + setState(() { + _isBookmarked = newValue; + }); - if (_isBookmarked) { - context - .read() - .fetchGroupedSessions( - bookmarkStatus: BookmarkStatus.bookmarked, - ); - } + if (_isBookmarked) { + context + .read() + .fetchGroupedSessions( + bookmarkStatus: + BookmarkStatus.bookmarked, + ); + } - if (!_isBookmarked) { - context - .read() - .fetchGroupedSessions(); - } - }, - trackOutlineWidth: WidgetStateProperty.all(1), - trackColor: WidgetStateProperty.all(Colors.black), - activeTrackColor: ThemeColors.orangeColor, - activeColor: ThemeColors.orangeColor, - thumbColor: WidgetStateProperty.all(Colors.white), - thumbIcon: WidgetStateProperty.all( - const Icon(Icons.star_border_rounded), + if (!_isBookmarked) { + context + .read() + .fetchGroupedSessions(); + } + }, + trackOutlineWidth: WidgetStateProperty.all(1), + trackColor: WidgetStateProperty.all(Colors.black), + activeTrackColor: ThemeColors.orangeColor, + activeColor: ThemeColors.orangeColor, + thumbColor: WidgetStateProperty.all(Colors.white), + thumbIcon: WidgetStateProperty.all( + const Icon(Icons.star_border_rounded), + ), ), - ), - Text( - l10n.mySessions, - style: const TextStyle( - fontSize: 10, - color: Colors.grey, + Text( + l10n.mySessions, + style: const TextStyle( + fontSize: 10, + color: Colors.grey, + ), ), - ), - ], + ], + ), ), ), ], diff --git a/lib/features/sessions/ui/widgets/compact_view_card.dart b/lib/features/sessions/ui/widgets/compact_view_card.dart index 9a80040..e4c1cb2 100644 --- a/lib/features/sessions/ui/widgets/compact_view_card.dart +++ b/lib/features/sessions/ui/widgets/compact_view_card.dart @@ -27,24 +27,30 @@ class CompactViewCard extends StatelessWidget { elevation: 2, color: isLightMode ? colorScheme.surface : colorScheme.secondaryContainer, child: ListTile( - leading: Column( - children: [ - Text( - DateFormat.Hm().format( - DateTime.parse('2022-01-01 ${session.startTime}'), + leading: Text.rich( + TextSpan( + children: [ + TextSpan( + text: '${DateFormat.Hm().format( + DateTime.parse( + '2022-01-01 ${session.startTime}', + ), + )}\n', + style: const TextStyle(fontSize: 18), ), - style: const TextStyle(fontSize: 18), - ), - Text( - DateTime.parse('2022-01-01 ${session.startTime}').hour > 11 - ? 'PM' - : 'AM', - style: TextStyle( - fontSize: 18, - color: colorScheme.onSurface, + TextSpan( + text: + DateTime.parse('2022-01-01 ${session.startTime}').hour > 11 + ? 'PM' + : 'AM', + style: TextStyle( + fontSize: 18, + color: colorScheme.onSurface, + ), ), - ), - ], + ], + ), + textAlign: TextAlign.center, ), title: Text( session.title, diff --git a/pubspec.lock b/pubspec.lock index 707b344..835e185 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1358,10 +1358,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ee3f815..09ebe6a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: fluttercon description: "A new Flutter project." -publish_to: 'none' -version: 1.12.07+11207 +publish_to: "none" +version: 1.12.08+11208 environment: - sdk: '>=3.5.0 <4.0.0' + sdk: ">=3.5.0 <4.0.0" dependencies: appinio_social_share: ^0.3.2