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