Open camsim99 opened 1 year ago
- [ ] Consider refactoring the
FakeAndroidCameraCameraX
classed used in the plugin Dart test for testing, since it is likely these objects used in the test can be mocked without using it.
Concerning this point, this may become easier for future wrappings with https://github.com/flutter/flutter/issues/134777, but I think a good starting point would be to follow WebView and use a proxy class like https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_android/lib/src/android_proxy.dart#L16 (which can be used to created detached or mock objects) that is passed to the WebViewController (https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_android/lib/src/android_webview_controller.dart#L31).
cc @gmackall as this is a follow up to https://github.com/flutter/packages/pull/5287#issuecomment-1789271416
As the
android_camera_camerax
plugin has been under development, there have a number of tasks that have not blocked PRs but are important technical debt to pay down. This umbrella issue covers those tasks that apply to cleaning up tests in this plugin:setUp()
method for the plugin Dart test since several of the same setup steps are involved.TestInstanceManagerHostApi
.