pushToPage function
void
pushToPage({
- required BuildContext context,
- required Widget widget,
- bool pushReplaces = false,
Implementation
void pushToPage({
required BuildContext context,
required Widget widget,
bool pushReplaces = false,
}) {
if (pushReplaces) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (_) => ScreenUtilInit(
designSize: const Size(430, 932),
minTextAdapt: true,
splitScreenMode: true,
child: widget,
),
),
);
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => ScreenUtilInit(
designSize: const Size(430, 932),
minTextAdapt: true,
splitScreenMode: true,
child: widget,
),
),
);
}
}