DeviceSimulator constructor

DeviceSimulator({
  1. Widget? child,
  2. WidgetBuilder? builder,
  3. bool enable = true,
  4. Brightness brightness = Brightness.light,
  5. Color iOSMultitaskBarColor = Colors.grey,
  6. bool androidShowNavigationBar = true,
  7. Color androidStatusBarBackgroundColor = Colors.black26,
  8. Orientation? orientation,
  9. int initialDeviceIndex = 0,
  10. TargetPlatform initialPlatform = TargetPlatform.android,
  11. Color? backgroundColor,
  12. bool showBottomBar = true,
})

Creates a new DeviceSimulator.

Implementation

DeviceSimulator({
  Widget? child,
  WidgetBuilder? builder,
  this.enable = true,
  this.brightness = Brightness.light,
  this.iOSMultitaskBarColor = Colors.grey,
  this.androidShowNavigationBar = true,
  this.androidStatusBarBackgroundColor = Colors.black26,
  this.orientation,
  this.initialDeviceIndex = 0,
  this.initialPlatform = TargetPlatform.android,
  Color? backgroundColor,
  this.showBottomBar = true,
})  : this.backgroundColor = backgroundColor ?? Colors.grey.shade900,
      assert(child != null || builder != null) {
  this.builder = builder ?? (_) => child!;
}