mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
initial commit
This commit is contained in:
22
lib/navigation/router.dart
Normal file
22
lib/navigation/router.dart
Normal file
@ -0,0 +1,22 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/home/view/home_view.dart';
|
||||
|
||||
import 'routing_constants.dart';
|
||||
|
||||
class Router {
|
||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||
switch (settings.name) {
|
||||
case RouteConstants.homeRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const HomeView(), settings: settings);
|
||||
|
||||
// Default route, if no route this will show
|
||||
default:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => Scaffold(
|
||||
body: Center(child: Text('No route defined for ${settings.name}')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user