(flutter) add const FlutterWebOptions
This commit is contained in:
@@ -6,12 +6,12 @@ import 'package:web/web.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class ThermionWidgetWeb extends StatelessWidget {
|
||||
|
||||
late final ThermionFlutterWebOptions options;
|
||||
final ThermionFlutterWebOptions options;
|
||||
|
||||
const ThermionWidgetWeb({super.key, ThermionFlutterWebOptions? options}) {
|
||||
this.options = options ?? ThermionFlutterWebOptions();
|
||||
}
|
||||
const ThermionWidgetWeb(
|
||||
{super.key,
|
||||
this.options =
|
||||
const ThermionFlutterWebOptions.empty()});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
import 'package:thermion_flutter_platform_interface/thermion_flutter_platform_interface.dart';
|
||||
|
||||
class ThermionFlutterWebOptions extends ThermionFlutterOptions {
|
||||
bool createCanvas;
|
||||
bool importCanvasAsWidget;
|
||||
|
||||
ThermionFlutterWebOptions({this.importCanvasAsWidget = false, this.createCanvas = true, String? uberarchivePath}) : super(uberarchivePath:uberarchivePath);
|
||||
|
||||
final bool createCanvas;
|
||||
final bool importCanvasAsWidget;
|
||||
|
||||
ThermionFlutterWebOptions(
|
||||
{this.importCanvasAsWidget = false,
|
||||
this.createCanvas = true,
|
||||
String? uberarchivePath})
|
||||
: super(uberarchivePath: uberarchivePath);
|
||||
|
||||
const ThermionFlutterWebOptions.empty(
|
||||
{this.importCanvasAsWidget = false,
|
||||
this.createCanvas = true,
|
||||
String? uberarchivePath})
|
||||
: super.empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user