buildByCupertino method
build on cupertino mode (Flutter implementation)
Implementation
@override
Widget buildByCupertino(BuildContext context) {
final BaseThemeData _baseTheme = _resolveBaseTheme();
final bool _useGetX = valueOf('useGetX', useGetX);
// If GetX is enabled, use GetMaterialApp even on iOS
if (_useGetX) {
return BaseTheme(
data: _baseTheme,
child: _buildGetMaterialApp(_baseTheme),
);
}
// Otherwise use traditional CupertinoApp
return BaseTheme(
data: _baseTheme,
child: CupertinoApp(
navigatorKey: valueOf('navigatorKey', navigatorKey),
home: valueOf('home', home),
theme: _baseTheme.cupertinoTheme,
routes: valueOf('routes', routes),
initialRoute: valueOf('initialRoute', initialRoute),
onGenerateRoute: valueOf('onGenerateRoute', onGenerateRoute),
onGenerateInitialRoutes: valueOf('onGenerateInitialRoutes', onGenerateInitialRoutes),
onUnknownRoute: valueOf('onUnknownRoute', onUnknownRoute),
navigatorObservers: valueOf(
'navigatorObservers',
navigatorObservers,
),
builder: valueOf('builder', builder),
title: valueOf('title', title),
onGenerateTitle: valueOf('onGenerateTitle', onGenerateTitle),
color: valueOf('color', color),
locale: valueOf('locale', locale),
localizationsDelegates: valueOf(
'localizationsDelegates',
localizationsDelegates,
),
localeListResolutionCallback: valueOf(
'localeListResolutionCallback',
localeListResolutionCallback,
),
localeResolutionCallback: valueOf(
'localeResolutionCallback',
localeResolutionCallback,
),
supportedLocales: valueOf(
'supportedLocales',
supportedLocales,
),
showPerformanceOverlay: valueOf(
'showPerformanceOverlay',
showPerformanceOverlay,
),
checkerboardRasterCacheImages: valueOf(
'checkerboardRasterCacheImages',
checkerboardRasterCacheImages,
),
checkerboardOffscreenLayers: valueOf(
'checkerboardOffscreenLayers',
checkerboardOffscreenLayers,
),
showSemanticsDebugger: valueOf(
'showSemanticsDebugger',
showSemanticsDebugger,
),
debugShowCheckedModeBanner: valueOf(
'debugShowCheckedModeBanner',
debugShowCheckedModeBanner,
),
shortcuts: valueOf('shortcuts', shortcuts),
actions: valueOf('actions', actions),
restorationScopeId: valueOf('restorationScopeId', restorationScopeId),
scrollBehavior: valueOf('scrollBehavior', scrollBehavior),
),
);
}