Closed benneca closed 1 year ago
my guess is that this is due to the changes to the stack clippingbehavior and removal of the stack overlay parameter coupled with the clipRect and overflowbox being used in the camera itself. but as yet, I have not figured out quite how.
it's looking like the camera AndroidView will need to be changed to something like what's below for Flutter 3.0:
camera =
PlatformViewLink(
viewType: 'plugins.flutter.io/adv_camera',
surfaceFactory: (
BuildContext context,
PlatformViewController controller,
) {
return AndroidViewSurface(
controller: controller as AndroidViewController,
gestureRecognizers: gestureRecognizers ??
const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (PlatformViewCreationParams params) {
final AndroidViewController controller =
PlatformViewsService.initExpensiveAndroidView(
id: params.id,
viewType: 'plugins.flutter.io/adv_camera',
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
onFocus: () => params.onFocusChanged(true),
);
controller.addOnPlatformViewCreatedListener(
params.onPlatformViewCreated,
);
controller.addOnPlatformViewCreatedListener(
onPlatformViewCreated,
);
return controller;
},
);
However, this currently only works on the master branch and not the stable branch. it looks like they are possibly cherry-picking a fix to make this work on stable
this is resolved for android in the latest version however, there has been an issue introduced with iOS where animatedContainers clip away. trying to work out more details. will post them as I learn more.
So the issue with iOS is that an animated bottom nav that previously would slide over the camera, no longer works. I replaced the animated bottom navigation elements with a showbottommodal and this resolved the issue satisfactorily for me, closing
I have an issue with the adv_camera plugin within a stack maintaining its position in a stack with the release of flutter 3.0. This only seems to be an issue on android. below are two images, one with flutter 2.10.5 ( the adv_camera respects its position in the stack, at the bottom and the other elements are stacked and positioned on to) and the other with flutter 3.0(adv_camera does not respect its position in the stack and is also not aligned properly as you can see ii is slid up over the app bar. Has anyone else seen this issue and do you have a workaround?
![487ce36f-d853-4111-961e-55c83ecd691a](https://user-images.githubusercontent.com/40440215/168325221-65171452-04ac-477c-8a03-a88de67e3d9f.jpeg)