|
|
@ -130,7 +130,7 @@ class CocosWidget extends StatefulWidget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class _CocosWidgetState extends State<CocosWidget> { |
|
|
|
class _CocosWidgetState extends State<CocosWidget> { |
|
|
|
late int _CocosId; |
|
|
|
late int _cocosId; |
|
|
|
|
|
|
|
|
|
|
|
CocosWidgetController? _controller; |
|
|
|
CocosWidgetController? _controller; |
|
|
|
|
|
|
|
|
|
|
@ -139,9 +139,9 @@ class _CocosWidgetState extends State<CocosWidget> { |
|
|
|
super.initState(); |
|
|
|
super.initState(); |
|
|
|
|
|
|
|
|
|
|
|
if (!kIsWeb) { |
|
|
|
if (!kIsWeb) { |
|
|
|
_CocosId = _nextCocosCreationId++; |
|
|
|
_cocosId = _nextCocosCreationId++; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
_CocosId = 0; |
|
|
|
_cocosId = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -161,7 +161,7 @@ class _CocosWidgetState extends State<CocosWidget> { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
final Map<String, dynamic> CocosOptions = <String, dynamic>{ |
|
|
|
final Map<String, dynamic> cocosOptions = <String, dynamic>{ |
|
|
|
'fullscreen': widget.fullscreen, |
|
|
|
'fullscreen': widget.fullscreen, |
|
|
|
'uiLevel': widget.uiLevel, |
|
|
|
'uiLevel': widget.uiLevel, |
|
|
|
'hideStatus': widget.hideStatus, |
|
|
|
'hideStatus': widget.hideStatus, |
|
|
@ -175,9 +175,9 @@ class _CocosWidgetState extends State<CocosWidget> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return CocosWidgetPlatform.instance.buildViewWithTextDirection( |
|
|
|
return CocosWidgetPlatform.instance.buildViewWithTextDirection( |
|
|
|
_CocosId, |
|
|
|
_cocosId, |
|
|
|
_onPlatformViewCreated, |
|
|
|
_onPlatformViewCreated, |
|
|
|
cocosOptions: CocosOptions, |
|
|
|
cocosOptions: cocosOptions, |
|
|
|
textDirection: widget.layoutDirection ?? |
|
|
|
textDirection: widget.layoutDirection ?? |
|
|
|
Directionality.maybeOf(context) ?? |
|
|
|
Directionality.maybeOf(context) ?? |
|
|
|
TextDirection.ltr, |
|
|
|
TextDirection.ltr, |
|
|
|