V_Root function
Implementation
MaterialApp V_Root(
String strfrm, {
String title = "",
// ignore: non_constant_identifier_names
String cp_name = "",
String strparameter = "",
// ignore: non_constant_identifier_names
bool ShowTitleBar = true,
}) {
return MaterialApp(
title: (ShowTitleBar || title == "") ? title : null,
navigatorKey: AppNavigator.navigatorKey,
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.green),
useMaterial3: true,
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
),
home:
V_getScreen(
strfrm,
title,
cp_name,
strparameter,
hideAppBar: true,
isMainScreen: true,
) ??
const Scaffold(body: Center(child: Text('Không tìm thấy màn hình'))),
);
}