Cleanup warnings, remove some log messages on web
This commit is contained in:
parent
5d8da79941
commit
4913c2fe92
@ -16,7 +16,7 @@ mixin ThrottledSaveLoadMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> save() async {
|
Future<void> save() async {
|
||||||
debugPrint('Saving...');
|
if (!kIsWeb) debugPrint('Saving...');
|
||||||
try {
|
try {
|
||||||
await _file.save(toJson());
|
await _file.save(toJson());
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:wonders/common_libs.dart';
|
import 'package:wonders/common_libs.dart';
|
||||||
import 'package:wonders/ui/common/modals//fullscreen_video_viewer.dart';
|
import 'package:wonders/ui/common/modals//fullscreen_video_viewer.dart';
|
||||||
import 'package:wonders/ui/common/modals/fullscreen_maps_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/collection/collection_screen.dart';
|
||||||
import 'package:wonders/ui/screens/home/wonders_home_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/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/timeline/timeline_screen.dart';
|
||||||
import 'package:wonders/ui/screens/wonder_details/wonders_details_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
|
/// Shared paths / urls used across the app
|
||||||
class ScreenPaths {
|
class ScreenPaths {
|
||||||
static String splash = '/';
|
static String splash = '/';
|
||||||
@ -161,7 +161,7 @@ String? _handleRedirect(BuildContext context, GoRouterState state) {
|
|||||||
debugPrint('Redirecting from ${state.uri.path} to ${ScreenPaths.home}');
|
debugPrint('Redirecting from ${state.uri.path} to ${ScreenPaths.home}');
|
||||||
return ScreenPaths.home;
|
return ScreenPaths.home;
|
||||||
}
|
}
|
||||||
debugPrint('Navigate to: ${state.uri}');
|
if (!kIsWeb) debugPrint('Navigate to: ${state.uri}');
|
||||||
return null; // do nothing
|
return null; // do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wonders/common_libs.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/themed_text.dart';
|
||||||
import 'package:wonders/ui/common/wonderous_logo.dart';
|
import 'package:wonders/ui/common/wonderous_logo.dart';
|
||||||
|
|
||||||
class PageNotFound extends StatelessWidget {
|
class PageNotFound extends StatelessWidget {
|
||||||
const PageNotFound(String url, {super.key});
|
const PageNotFound(this.url, {super.key});
|
||||||
|
|
||||||
|
final String url;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -27,6 +30,9 @@ class PageNotFound extends StatelessWidget {
|
|||||||
'The page you are looking for does not exist.',
|
'The page you are looking for does not exist.',
|
||||||
style: $styles.text.body.copyWith(color: $styles.colors.offWhite),
|
style: $styles.text.body.copyWith(color: $styles.colors.offWhite),
|
||||||
),
|
),
|
||||||
|
if (PlatformInfo.isDesktop) ...{
|
||||||
|
LightText(child: Text('Path: $url', style: $styles.text.bodySmall)),
|
||||||
|
},
|
||||||
Gap(70),
|
Gap(70),
|
||||||
AppBtn(
|
AppBtn(
|
||||||
minimumSize: Size(200, 0),
|
minimumSize: Size(200, 0),
|
||||||
|
22
pubspec.lock
22
pubspec.lock
@ -149,10 +149,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ffi
|
name: ffi
|
||||||
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
|
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.0"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -468,18 +468,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.0"
|
version: "0.5.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.10.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -524,10 +524,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.0"
|
version: "1.8.3"
|
||||||
path_parsing:
|
path_parsing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -905,10 +905,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05"
|
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.2"
|
version: "0.3.0"
|
||||||
webview_flutter:
|
webview_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -990,5 +990,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.3.0-279.1.beta <4.0.0"
|
dart: ">=3.2.3 <4.0.0"
|
||||||
flutter: ">=3.16.6"
|
flutter: ">=3.16.6"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user