AdaptivePlatformWidget constructor

const AdaptivePlatformWidget({
  1. Key? key,
  2. required Widget child,
  3. Widget? web,
  4. Widget? ios,
  5. Widget? android,
  6. Widget? macos,
  7. Widget? window,
  8. Widget? linux,
})

AdaptivePlatformWidget

This widget will render based on the current running platform

Example:

AdaptivePlatformWidget(
  child: MyMaterialApp(),
  ios: MyCupertinoApp(),
  macos: MyMacosApp(),
  web: MyWebApp(),
  window: MyWindowApp(),
)

Implementation

const AdaptivePlatformWidget({
  Key? key,
  required this.child,
  this.web,
  this.ios,
  this.android,
  this.macos,
  this.window,
  this.linux,
}) : super(key: key);