Skip to content

Commit

Permalink
Fixing view_wrappers to Flutter 3.7. (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
edufolly committed Mar 30, 2023
1 parent f505fcf commit dd20462
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mapbox_gl_platform_interface/lib/src/view_wrappers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TextureAndroidViewControllerWrapper

// @override
PointTransformer get pointTransformer => _controller.pointTransformer;

set pointTransformer(PointTransformer transformer) =>
_controller.pointTransformer = transformer;

Expand All @@ -57,11 +58,14 @@ class TextureAndroidViewControllerWrapper
/// size is the view's initial size in logical pixel. size can be omitted
/// if the concrete implementation doesn't require an initial size to create
/// the platform view.
Future<void> create({Size? size}) async {
Future<void> create({Size? size, Offset? position}) async {
await _controller.create();
awaitingCreation = false;
if (size != null) {
await _controller.setSize(size);
if (position != null) {
await _controller.setOffset(position);
}
}
}

Expand Down Expand Up @@ -123,6 +127,9 @@ class TextureAndroidViewControllerWrapper

// @override
int get viewId => _controller.viewId;

// @override
bool get requiresViewComposition => _controller.requiresViewComposition;
}

class AndroidViewWithWrappedController extends StatefulWidget {
Expand Down

0 comments on commit dd20462

Please sign in to comment.