diff --git a/lib/logic/common/save_load_mixin.dart b/lib/logic/common/save_load_mixin.dart index affd5f25..3fe5dcd5 100644 --- a/lib/logic/common/save_load_mixin.dart +++ b/lib/logic/common/save_load_mixin.dart @@ -16,7 +16,7 @@ mixin ThrottledSaveLoadMixin { } Future save() async { - debugPrint('Saving...'); + if (!kIsWeb) debugPrint('Saving...'); try { await _file.save(toJson()); } on Exception catch (e) { diff --git a/lib/router.dart b/lib/router.dart index a940abf6..460f79ef 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -1,4 +1,5 @@ import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:wonders/common_libs.dart'; import 'package:wonders/ui/common/modals//fullscreen_video_viewer.dart'; import 'package:wonders/ui/common/modals/fullscreen_maps_viewer.dart'; @@ -7,11 +8,10 @@ import 'package:wonders/ui/screens/artifact/artifact_search/artifact_search_scre import 'package:wonders/ui/screens/collection/collection_screen.dart'; import 'package:wonders/ui/screens/home/wonders_home_screen.dart'; import 'package:wonders/ui/screens/intro/intro_screen.dart'; +import 'package:wonders/ui/screens/page_not_found/page_not_found.dart'; import 'package:wonders/ui/screens/timeline/timeline_screen.dart'; import 'package:wonders/ui/screens/wonder_details/wonders_details_screen.dart'; -import 'ui/screens/page_not_found/page_not_found.dart'; - /// Shared paths / urls used across the app class ScreenPaths { static String splash = '/'; @@ -161,7 +161,7 @@ String? _handleRedirect(BuildContext context, GoRouterState state) { debugPrint('Redirecting from ${state.uri.path} to ${ScreenPaths.home}'); return ScreenPaths.home; } - debugPrint('Navigate to: ${state.uri}'); + if (!kIsWeb) debugPrint('Navigate to: ${state.uri}'); return null; // do nothing } diff --git a/lib/styles/styles.dart b/lib/styles/styles.dart index eddef519..fff93cb0 100644 --- a/lib/styles/styles.dart +++ b/lib/styles/styles.dart @@ -155,11 +155,11 @@ class _Corners { late final double lg = 32; } -// TODO: add, @immutable when design is solidified +@immutable class _Sizes { - double get maxContentWidth1 => 800; - double get maxContentWidth2 => 600; - double get maxContentWidth3 => 500; + final double maxContentWidth1 = 800; + final double maxContentWidth2 = 600; + final double maxContentWidth3 = 500; final Size minAppSize = Size(380, 650); } diff --git a/lib/ui/common/controls/circle_buttons.dart b/lib/ui/common/controls/circle_buttons.dart index df752ed5..44dac9d1 100644 --- a/lib/ui/common/controls/circle_buttons.dart +++ b/lib/ui/common/controls/circle_buttons.dart @@ -52,7 +52,6 @@ class CircleIconBtn extends StatelessWidget { required this.semanticLabel, }) : super(key: key); - //TODO: Reduce size if design re-exports icon-images without padding static double defaultSize = 28; final AppIcons icon; diff --git a/lib/ui/common/utils/page_routes.dart b/lib/ui/common/utils/page_routes.dart index d6dc04b3..ada761f6 100644 --- a/lib/ui/common/utils/page_routes.dart +++ b/lib/ui/common/utils/page_routes.dart @@ -9,7 +9,6 @@ class PageRoutes { return CupertinoPageRoute(builder: (_) => child); } - // SB: Removed this in favor of Cupertino routes, we could restore with a `useFade` option return PageRouteBuilder( transitionDuration: duration, reverseTransitionDuration: duration, diff --git a/lib/ui/screens/collection/widgets/_collection_footer.dart b/lib/ui/screens/collection/widgets/_collection_footer.dart index fa0ddc11..58d25f71 100644 --- a/lib/ui/screens/collection/widgets/_collection_footer.dart +++ b/lib/ui/screens/collection/widgets/_collection_footer.dart @@ -10,15 +10,6 @@ class _CollectionFooter extends StatelessWidget { @override Widget build(BuildContext context) { return Stack(children: [ - // TODO SB: Maybe restore this gradient? Need to come up with alternate approach since list can now scroll horizontally - // Transform.translate( - // offset: Offset(0, -$styles.insets.xl), - // child: VtGradient( - // [$styles.colors.greyStrong.withOpacity(0), $styles.colors.greyStrong], - // const [0, 1], - // height: $styles.insets.xl, - // ), - // ), Container( padding: EdgeInsets.symmetric(horizontal: $styles.insets.md, vertical: $styles.insets.sm), color: $styles.colors.greyStrong, diff --git a/lib/ui/screens/page_not_found/page_not_found.dart b/lib/ui/screens/page_not_found/page_not_found.dart index 4440403e..801d125d 100644 --- a/lib/ui/screens/page_not_found/page_not_found.dart +++ b/lib/ui/screens/page_not_found/page_not_found.dart @@ -1,10 +1,13 @@ import 'package:flutter/material.dart'; import 'package:wonders/common_libs.dart'; +import 'package:wonders/logic/common/platform_info.dart'; import 'package:wonders/ui/common/themed_text.dart'; import 'package:wonders/ui/common/wonderous_logo.dart'; class PageNotFound extends StatelessWidget { - const PageNotFound(String url, {super.key}); + const PageNotFound(this.url, {super.key}); + + final String url; @override Widget build(BuildContext context) { @@ -27,6 +30,9 @@ class PageNotFound extends StatelessWidget { 'The page you are looking for does not exist.', style: $styles.text.body.copyWith(color: $styles.colors.offWhite), ), + if (PlatformInfo.isDesktop) ...{ + LightText(child: Text('Path: $url', style: $styles.text.bodySmall)), + }, Gap(70), AppBtn( minimumSize: Size(200, 0), diff --git a/lib/ui/wonder_illustrations/common/animated_clouds.dart b/lib/ui/wonder_illustrations/common/animated_clouds.dart index ff9c02bf..fde85876 100644 --- a/lib/ui/wonder_illustrations/common/animated_clouds.dart +++ b/lib/ui/wonder_illustrations/common/animated_clouds.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:wonders/common_libs.dart'; import 'package:wonders/ui/common/utils/context_utils.dart'; -// TODO: Clouds should fade in and out // Shows a set of clouds that animated onto stage. // When value-key is changed, a new set of clouds will animate into place and the old ones will animate out. // Uses a random seed system, to make sure we get the same set of clouds for each wonder, without actually having to hand-position them. diff --git a/pubspec.lock b/pubspec.lock index a9c6b38c..ff8de3e0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -149,10 +149,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.0" file: dependency: transitive description: @@ -468,18 +468,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.10.0" nested: dependency: transitive description: @@ -524,10 +524,10 @@ packages: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" path_parsing: dependency: transitive description: @@ -905,10 +905,10 @@ packages: dependency: transitive description: name: web - sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.3.0" webview_flutter: dependency: "direct main" description: @@ -990,5 +990,5 @@ packages: source: hosted version: "2.0.2" sdks: - dart: ">=3.3.0-279.1.beta <4.0.0" + dart: ">=3.2.3 <4.0.0" flutter: ">=3.16.6"