You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
766 B
25 lines
766 B
2 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
import '../screen/home/home_screen.dart';
|
||
|
import '../screen/md_lab_mitra/md_lab_mitra_screen.dart';
|
||
|
|
||
|
const homeRoute = "/";
|
||
|
const mdLabMitraRoute = "/mdLabMitra";
|
||
|
|
||
|
class AppRoute {
|
||
|
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||
|
if (settings.name == mdLabMitraRoute) {
|
||
|
return MaterialPageRoute(
|
||
|
builder: (context) => MediaQuery(
|
||
|
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
||
|
child: const MdLabMitraScreen(),
|
||
|
));
|
||
|
}
|
||
|
return MaterialPageRoute(
|
||
|
builder: (context) => MediaQuery(
|
||
|
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
||
|
child: const HomeScreen(),
|
||
|
));
|
||
|
}
|
||
|
}
|