V_MainScreen function
void
V_MainScreen(})
Implementation
void V_MainScreen(
BuildContext context,
String strfrm, {
String title = "",
// ignore: non_constant_identifier_names
String cp_name = "",
String strparameter = "",
bool showAppBar = false,
}) {
final screen = V_getScreen(
strfrm,
title,
cp_name,
strparameter,
hideAppBar: !showAppBar,
isMainScreen: true,
);
if (screen == null) {
//debugPrint('⚠️ Không tìm thấy màn hình: $strfrm');
return;
}
// Xóa toàn bộ navigation stack và chuyển sang màn hình mới
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (context) => screen),
(route) => false, // ← false = XÓA TẤT CẢ
);
}