MaterialApp(
routes: {
'/':(context)=>HomePage(),
'/meals':(context)=>MealsPage(),
'/orders':(context)=>Orders(),
},
);
MaterialApp(
initialRoute: '/loading' ,
routes: {
'/loading':(context)=> const LoadingScreen(),
'/home':(context)=> const Home(),
'/chose_location':(context)=> const ChoseLocation(),
},
));
// add
// static String routeName = '/splash';
//main.dart
routes:routes
import 'package:flutter/material.dart';
//import required file
final Map<String, WidgetBuilder> routes = {
SplashScreen.routeName:(context) => SplashScreen(),
OnBoard.routeName:(context) => OnBoard(),
HomeScreen.routeName:(context)=> HomeScreen(),
};