router function
Implementation
Route router(BuildContext context, Widget widget, {bool? adaptive}) {
if (adaptive == false) {
return MaterialPageRoute(builder: (context) => widget);
}
if (Platform.isIOS || Platform.isMacOS) {
return CupertinoPageRoute(builder: (context) => widget);
}
return MaterialPageRoute(builder: (context) => widget);
}