
Performs a comprehensive project rename from 'barcode_scanner' to 'e_scan' (or 'eScan' for user-facing labels). This update spans all relevant files, including: - Application IDs and bundle identifiers for Android, iOS, macOS, and Linux. - VS Code launch configurations. - Dart package import paths. - Project names and titles in `pubspec.yaml`, `README.md`, and platform-specific configurations (e.g., CMakeLists, Info.plist, AndroidManifest).
52 lines
1.4 KiB
Dart
52 lines
1.4 KiB
Dart
import 'dart:async';
|
|
import 'package:e_scan/pages/pages.dart';
|
|
import 'package:e_scan/router/go_secure_router_builder.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
export 'package:go_router/go_router.dart';
|
|
|
|
part 'go_router_builder.g.dart';
|
|
|
|
final appRoutes = $appRoutes;
|
|
|
|
const String _loginPage = 'LoginPage';
|
|
const String _splashPage = 'SplashPage';
|
|
const String _notFound = 'not_found';
|
|
|
|
@TypedGoRoute<SplashRoute>(path: '/$_splashPage')
|
|
class SplashRoute extends GoRouteData with _$SplashRoute {
|
|
const SplashRoute();
|
|
|
|
// @override
|
|
// String? redirect(BuildContext context, GoRouterState state) {
|
|
// final isLogged = providerContainer
|
|
// .read(loginPageModelProvider)
|
|
// .status
|
|
// .isLogged;
|
|
// if (isLogged) {
|
|
// return HomeRoute().location;
|
|
// } else {
|
|
// return LoginRoute().location;
|
|
// }
|
|
// }
|
|
|
|
@override
|
|
Widget build(BuildContext context, GoRouterState state) => SplashPage();
|
|
}
|
|
|
|
@TypedGoRoute<LoginRoute>(path: '/$_loginPage')
|
|
class LoginRoute extends GoRouteData with _$LoginRoute {
|
|
const LoginRoute();
|
|
|
|
@override
|
|
Widget build(BuildContext context, GoRouterState state) => LoginPage();
|
|
}
|
|
|
|
@TypedGoRoute<NotFoundRoute>(path: '/$_notFound')
|
|
class NotFoundRoute extends GoRouteData with _$NotFoundRoute {
|
|
const NotFoundRoute();
|
|
|
|
@override
|
|
Widget build(BuildContext context, GoRouterState state) => SizedBox();
|
|
}
|