switch from push to go calls

This commit is contained in:
Shawn 2024-01-16 17:00:40 -07:00
parent cbbd343f71
commit ea47695847
4 changed files with 5 additions and 5 deletions

View File

@ -184,6 +184,6 @@ class CollectibleFoundScreen extends StatelessWidget {
void _handleViewCollectionPressed(BuildContext context) { void _handleViewCollectionPressed(BuildContext context) {
Navigator.pop(context); Navigator.pop(context);
context.push(ScreenPaths.collection(collectible.id)); context.go(ScreenPaths.collection(collectible.id));
} }
} }

View File

@ -42,9 +42,9 @@ class _HomeMenuState extends State<HomeMenu> {
); );
} }
void _handleCollectionPressed(BuildContext context) => context.push(ScreenPaths.collection('')); void _handleCollectionPressed(BuildContext context) => context.go(ScreenPaths.collection(''));
void _handleTimelinePressed(BuildContext context) => context.push(ScreenPaths.timeline(widget.data.type)); void _handleTimelinePressed(BuildContext context) => context.go(ScreenPaths.timeline(widget.data.type));
void _handleWonderPressed(BuildContext context, WonderData data) => Navigator.pop(context, data.type); void _handleWonderPressed(BuildContext context, WonderData data) => Navigator.pop(context, data.type);

View File

@ -7,7 +7,7 @@ class _TimelineBtn extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void handleBtnPressed() => context.push(ScreenPaths.timeline(type)); void handleBtnPressed() => context.go(ScreenPaths.timeline(type));
return Padding( return Padding(
padding: EdgeInsets.symmetric(horizontal: $styles.insets.md), padding: EdgeInsets.symmetric(horizontal: $styles.insets.md),
child: SizedBox( child: SizedBox(

View File

@ -35,7 +35,7 @@ class _WonderEventsState extends State<WonderEvents> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void handleTimelineBtnPressed() => context.push(ScreenPaths.timeline(widget.type)); void handleTimelineBtnPressed() => context.go(ScreenPaths.timeline(widget.type));
// Main view content switches between 1 and 2 column layouts // Main view content switches between 1 and 2 column layouts
// On mobile, use the 2 column layout on screens close to landscape (>.85). This is primarily an optimization for foldable devices which have square-ish dimensions when opened. // On mobile, use the 2 column layout on screens close to landscape (>.85). This is primarily an optimization for foldable devices which have square-ish dimensions when opened.
final twoColumnAspect = PlatformInfo.isMobile ? .85 : 1; final twoColumnAspect = PlatformInfo.isMobile ? .85 : 1;