DemoFluApp constructor

DemoFluApp({
  1. required String title,
  2. required AppMenuBuilder appMenuBuilder,
  3. bool resizable = false,
  4. Color widgetBackground = Colors.white,
  5. Size? maxSize,
  6. bool consoleEnabled = false,
  7. double? initialWidthWeight,
  8. double? initialHeightWeight,
})

Builds a DemoFluApp.

The widgetBackground defines the default widget background for all examples.

Implementation

DemoFluApp(
    {required this.title,
    required this.appMenuBuilder,
    this.resizable = false,
    this.widgetBackground = Colors.white,
    this.maxSize,
    this.consoleEnabled = false,
    this.initialWidthWeight,
    this.initialHeightWeight}) {
  if (initialHeightWeight != null &&
      (initialHeightWeight! < 0 || initialHeightWeight! > 1)) {
    throw ArgumentError(
        'initialHeightWeight must be a value between 0 and 1: $initialHeightWeight');
  }
  if (initialWidthWeight != null &&
      (initialWidthWeight! < 0 || initialWidthWeight! > 1)) {
    throw ArgumentError(
        'initialWidthWeight must be a value between 0 and 1: $initialWidthWeight');
  }
}