[video_player] Fix Android lints (#3886)

Removes lint-baseline.xml and fixes all exposed lints. Includes an update of Pigeon to the latest version, to pick up warning fixes in generated code.

Part of https://github.com/flutter/flutter/issues/88011
diff --git a/packages/video_player/video_player_android/CHANGELOG.md b/packages/video_player/video_player_android/CHANGELOG.md
index a204cb2..f374fab 100644
--- a/packages/video_player/video_player_android/CHANGELOG.md
+++ b/packages/video_player/video_player_android/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.4.7
+
+* Fixes Java warnings.
+
 ## 2.4.6
 
 * Fixes compatibility with AGP versions older than 4.2.
diff --git a/packages/video_player/video_player_android/android/build.gradle b/packages/video_player/video_player_android/android/build.gradle
index 613b8ed..aa8b8a0 100644
--- a/packages/video_player/video_player_android/android/build.gradle
+++ b/packages/video_player/video_player_android/android/build.gradle
@@ -41,7 +41,6 @@
         checkAllWarnings true
         warningsAsErrors true
         disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency'
-        baseline file("lint-baseline.xml")
     }
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/packages/video_player/video_player_android/android/lint-baseline.xml b/packages/video_player/video_player_android/android/lint-baseline.xml
deleted file mode 100644
index 4649a80..0000000
--- a/packages/video_player/video_player_android/android/lint-baseline.xml
+++ /dev/null
@@ -1,653 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="6" by="lint 7.0.1" type="baseline" client="gradle" name="AGP (7.0.1)" variant="all" version="7.0.1">
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `TextureMessage` requires synthetic accessor"
-        errorLine1="        TextureMessage pigeonReturn = new TextureMessage();"
-        errorLine2="                                      ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="53"
-            column="39"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `LoopingMessage` requires synthetic accessor"
-        errorLine1="        LoopingMessage pigeonReturn = new LoopingMessage();"
-        errorLine2="                                      ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="124"
-            column="39"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `VolumeMessage` requires synthetic accessor"
-        errorLine1="        VolumeMessage pigeonReturn = new VolumeMessage();"
-        errorLine2="                                     ~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="199"
-            column="38"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `PlaybackSpeedMessage` requires synthetic accessor"
-        errorLine1="        PlaybackSpeedMessage pigeonReturn = new PlaybackSpeedMessage();"
-        errorLine2="                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="274"
-            column="45"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `PositionMessage` requires synthetic accessor"
-        errorLine1="        PositionMessage pigeonReturn = new PositionMessage();"
-        errorLine2="                                       ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="349"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `CreateMessage` requires synthetic accessor"
-        errorLine1="        CreateMessage pigeonReturn = new CreateMessage();"
-        errorLine2="                                     ~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="475"
-            column="38"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` constructor of class `MixWithOthersMessage` requires synthetic accessor"
-        errorLine1="        MixWithOthersMessage pigeonReturn = new MixWithOthersMessage();"
-        errorLine2="                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="539"
-            column="45"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="671"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="696"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="721"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="746"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="771"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="798"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="823"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="848"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="873"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="898"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` method `wrapError` of class `Messages` requires synthetic accessor"
-        errorLine1="                  wrapped.put(&quot;error&quot;, wrapError(exception));"
-        errorLine2="                                       ~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="925"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` member of class `EndOfStreamEvent` requires synthetic accessor"
-        errorLine1="    enqueue(new EndOfStreamEvent());"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java"
-            line="31"
-            column="13"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `textureRegistry` of class `FlutterState` requires synthetic accessor"
-        errorLine1="        flutterState.textureRegistry.createSurfaceTexture();"
-        errorLine2="                     ~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="121"
-            column="22"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `binaryMessenger` of class `FlutterState` requires synthetic accessor"
-        errorLine1="            flutterState.binaryMessenger, &quot;flutter.io/videoPlayer/videoEvents&quot; + handle.id());"
-        errorLine2="                         ~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="124"
-            column="26"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `keyForAssetAndPackageName` of class `FlutterState` requires synthetic accessor"
-        errorLine1="            flutterState.keyForAssetAndPackageName.get(arg.getAsset(), arg.getPackageName());"
-        errorLine2="                         ~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="131"
-            column="26"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `keyForAsset` of class `FlutterState` requires synthetic accessor"
-        errorLine1="        assetLookupKey = flutterState.keyForAsset.get(arg.getAsset());"
-        errorLine2="                                      ~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="133"
-            column="39"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `applicationContext` of class `FlutterState` requires synthetic accessor"
-        errorLine1="              flutterState.applicationContext,"
-        errorLine2="                           ~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="137"
-            column="28"/>
-    </issue>
-
-    <issue
-        id="SyntheticAccessor"
-        message="Access to `private` field `applicationContext` of class `FlutterState` requires synthetic accessor"
-        errorLine1="              flutterState.applicationContext,"
-        errorLine2="                           ~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="149"
-            column="28"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public String[] getDefaultCipherSuites() {"
-        errorLine2="         ~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="26"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public String[] getSupportedCipherSuites() {"
-        errorLine2="         ~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="31"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket() throws IOException {"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="36"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(Socket s, String host, int port, boolean autoClose)"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="41"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(Socket s, String host, int port, boolean autoClose)"
-        errorLine2="                             ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="41"
-            column="30"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(Socket s, String host, int port, boolean autoClose)"
-        errorLine2="                                       ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="41"
-            column="40"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(String host, int port) throws IOException {"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="47"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(String host, int port) throws IOException {"
-        errorLine2="                             ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="47"
-            column="30"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(String host, int port, InetAddress localHost, int localPort)"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="52"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(String host, int port, InetAddress localHost, int localPort)"
-        errorLine2="                             ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="52"
-            column="30"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(String host, int port, InetAddress localHost, int localPort)"
-        errorLine2="                                                    ~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="52"
-            column="53"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(InetAddress host, int port) throws IOException {"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="58"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(InetAddress host, int port) throws IOException {"
-        errorLine2="                             ~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="58"
-            column="30"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)"
-        errorLine2="         ~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="63"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)"
-        errorLine2="                             ~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="63"
-            column="30"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)"
-        errorLine2="                                                            ~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java"
-            line="63"
-            column="61"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="    static MessageCodec&lt;Object> getCodec() {"
-        errorLine2="           ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="650"
-            column="12"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="    static void setup(BinaryMessenger binaryMessenger, AndroidVideoPlayerApi api) {"
-        errorLine2="                      ~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="658"
-            column="23"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="    static void setup(BinaryMessenger binaryMessenger, AndroidVideoPlayerApi api) {"
-        errorLine2="                                                       ~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/Messages.java"
-            line="658"
-            column="56"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {"
-        errorLine2="                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="54"
-            column="35"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void onAttachedToEngine(FlutterPluginBinding binding) {"
-        errorLine2="                                 ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="64"
-            column="34"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void onDetachedFromEngine(FlutterPluginBinding binding) {"
-        errorLine2="                                   ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="90"
-            column="36"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public TextureMessage create(CreateMessage arg) {"
-        errorLine2="         ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="119"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public TextureMessage create(CreateMessage arg) {"
-        errorLine2="                               ~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="119"
-            column="32"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void dispose(TextureMessage arg) {"
-        errorLine2="                      ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="163"
-            column="23"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void setLooping(LoopingMessage arg) {"
-        errorLine2="                         ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="169"
-            column="26"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void setVolume(VolumeMessage arg) {"
-        errorLine2="                        ~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="174"
-            column="25"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void setPlaybackSpeed(PlaybackSpeedMessage arg) {"
-        errorLine2="                               ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="179"
-            column="32"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void play(TextureMessage arg) {"
-        errorLine2="                   ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="184"
-            column="20"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public PositionMessage position(TextureMessage arg) {"
-        errorLine2="         ~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="189"
-            column="10"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public PositionMessage position(TextureMessage arg) {"
-        errorLine2="                                  ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="189"
-            column="35"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void seekTo(PositionMessage arg) {"
-        errorLine2="                     ~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="200"
-            column="22"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void pause(TextureMessage arg) {"
-        errorLine2="                    ~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="205"
-            column="21"/>
-    </issue>
-
-    <issue
-        id="UnknownNullness"
-        message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
-        errorLine1="  public void setMixWithOthers(MixWithOthersMessage arg) {"
-        errorLine2="                               ~~~~~~~~~~~~~~~~~~~~">
-        <location
-            file="src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java"
-            line="211"
-            column="32"/>
-    </issue>
-
-</issues>
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java
index fb6d2d4..731bb97 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/CustomSSLSocketFactory.java
@@ -13,8 +13,10 @@
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
 
+// SSLSocketFactory does not have nullability annotations.
+@SuppressWarnings("UnknownNullness")
 public class CustomSSLSocketFactory extends SSLSocketFactory {
-  private SSLSocketFactory sslSocketFactory;
+  private final SSLSocketFactory sslSocketFactory;
 
   public CustomSSLSocketFactory() throws KeyManagementException, NoSuchAlgorithmException {
     SSLContext context = SSLContext.getInstance("TLS");
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java
index 6593ebf..e0790af 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java
@@ -1,7 +1,7 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// Autogenerated from Pigeon (v2.0.1), do not edit directly.
+// Autogenerated from Pigeon (v9.2.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
 
 package io.flutter.plugins.videoplayer;
@@ -16,15 +16,47 @@
 import java.io.ByteArrayOutputStream;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Map;
 
 /** Generated class from Pigeon. */
-@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"})
+@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"})
 public class Messages {
 
+  /** Error class for passing custom error details to Flutter via a thrown PlatformException. */
+  public static class FlutterError extends RuntimeException {
+
+    /** The error code. */
+    public final String code;
+
+    /** The error details. Must be a datatype supported by the api codec. */
+    public final Object details;
+
+    public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) {
+      super(message);
+      this.code = code;
+      this.details = details;
+    }
+  }
+
+  @NonNull
+  protected static ArrayList<Object> wrapError(@NonNull Throwable exception) {
+    ArrayList<Object> errorList = new ArrayList<Object>(3);
+    if (exception instanceof FlutterError) {
+      FlutterError error = (FlutterError) exception;
+      errorList.add(error.code);
+      errorList.add(error.getMessage());
+      errorList.add(error.details);
+    } else {
+      errorList.add(exception.toString());
+      errorList.add(exception.getClass().getSimpleName());
+      errorList.add(
+          "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception));
+    }
+    return errorList;
+  }
+
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class TextureMessage {
+  public static final class TextureMessage {
     private @NonNull Long textureId;
 
     public @NonNull Long getTextureId() {
@@ -38,10 +70,11 @@
       this.textureId = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private TextureMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    TextureMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Long textureId;
 
       public @NonNull Builder setTextureId(@NonNull Long setterArg) {
@@ -57,15 +90,15 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("textureId", textureId);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(1);
+      toListResult.add(textureId);
+      return toListResult;
     }
 
-    static @NonNull TextureMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull TextureMessage fromList(@NonNull ArrayList<Object> list) {
       TextureMessage pigeonResult = new TextureMessage();
-      Object textureId = map.get("textureId");
+      Object textureId = list.get(0);
       pigeonResult.setTextureId(
           (textureId == null)
               ? null
@@ -75,7 +108,7 @@
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class LoopingMessage {
+  public static final class LoopingMessage {
     private @NonNull Long textureId;
 
     public @NonNull Long getTextureId() {
@@ -102,10 +135,11 @@
       this.isLooping = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private LoopingMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    LoopingMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Long textureId;
 
       public @NonNull Builder setTextureId(@NonNull Long setterArg) {
@@ -129,28 +163,28 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("textureId", textureId);
-      toMapResult.put("isLooping", isLooping);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(2);
+      toListResult.add(textureId);
+      toListResult.add(isLooping);
+      return toListResult;
     }
 
-    static @NonNull LoopingMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull LoopingMessage fromList(@NonNull ArrayList<Object> list) {
       LoopingMessage pigeonResult = new LoopingMessage();
-      Object textureId = map.get("textureId");
+      Object textureId = list.get(0);
       pigeonResult.setTextureId(
           (textureId == null)
               ? null
               : ((textureId instanceof Integer) ? (Integer) textureId : (Long) textureId));
-      Object isLooping = map.get("isLooping");
+      Object isLooping = list.get(1);
       pigeonResult.setIsLooping((Boolean) isLooping);
       return pigeonResult;
     }
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class VolumeMessage {
+  public static final class VolumeMessage {
     private @NonNull Long textureId;
 
     public @NonNull Long getTextureId() {
@@ -177,10 +211,11 @@
       this.volume = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private VolumeMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    VolumeMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Long textureId;
 
       public @NonNull Builder setTextureId(@NonNull Long setterArg) {
@@ -204,28 +239,28 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("textureId", textureId);
-      toMapResult.put("volume", volume);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(2);
+      toListResult.add(textureId);
+      toListResult.add(volume);
+      return toListResult;
     }
 
-    static @NonNull VolumeMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull VolumeMessage fromList(@NonNull ArrayList<Object> list) {
       VolumeMessage pigeonResult = new VolumeMessage();
-      Object textureId = map.get("textureId");
+      Object textureId = list.get(0);
       pigeonResult.setTextureId(
           (textureId == null)
               ? null
               : ((textureId instanceof Integer) ? (Integer) textureId : (Long) textureId));
-      Object volume = map.get("volume");
+      Object volume = list.get(1);
       pigeonResult.setVolume((Double) volume);
       return pigeonResult;
     }
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class PlaybackSpeedMessage {
+  public static final class PlaybackSpeedMessage {
     private @NonNull Long textureId;
 
     public @NonNull Long getTextureId() {
@@ -252,10 +287,11 @@
       this.speed = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private PlaybackSpeedMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    PlaybackSpeedMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Long textureId;
 
       public @NonNull Builder setTextureId(@NonNull Long setterArg) {
@@ -279,28 +315,28 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("textureId", textureId);
-      toMapResult.put("speed", speed);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(2);
+      toListResult.add(textureId);
+      toListResult.add(speed);
+      return toListResult;
     }
 
-    static @NonNull PlaybackSpeedMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull PlaybackSpeedMessage fromList(@NonNull ArrayList<Object> list) {
       PlaybackSpeedMessage pigeonResult = new PlaybackSpeedMessage();
-      Object textureId = map.get("textureId");
+      Object textureId = list.get(0);
       pigeonResult.setTextureId(
           (textureId == null)
               ? null
               : ((textureId instanceof Integer) ? (Integer) textureId : (Long) textureId));
-      Object speed = map.get("speed");
+      Object speed = list.get(1);
       pigeonResult.setSpeed((Double) speed);
       return pigeonResult;
     }
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class PositionMessage {
+  public static final class PositionMessage {
     private @NonNull Long textureId;
 
     public @NonNull Long getTextureId() {
@@ -327,10 +363,11 @@
       this.position = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private PositionMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    PositionMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Long textureId;
 
       public @NonNull Builder setTextureId(@NonNull Long setterArg) {
@@ -354,21 +391,21 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("textureId", textureId);
-      toMapResult.put("position", position);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(2);
+      toListResult.add(textureId);
+      toListResult.add(position);
+      return toListResult;
     }
 
-    static @NonNull PositionMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull PositionMessage fromList(@NonNull ArrayList<Object> list) {
       PositionMessage pigeonResult = new PositionMessage();
-      Object textureId = map.get("textureId");
+      Object textureId = list.get(0);
       pigeonResult.setTextureId(
           (textureId == null)
               ? null
               : ((textureId instanceof Integer) ? (Integer) textureId : (Long) textureId));
-      Object position = map.get("position");
+      Object position = list.get(1);
       pigeonResult.setPosition(
           (position == null)
               ? null
@@ -378,7 +415,7 @@
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class CreateMessage {
+  public static final class CreateMessage {
     private @Nullable String asset;
 
     public @Nullable String getAsset() {
@@ -432,10 +469,11 @@
       this.httpHeaders = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private CreateMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    CreateMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable String asset;
 
       public @NonNull Builder setAsset(@Nullable String setterArg) {
@@ -483,34 +521,34 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("asset", asset);
-      toMapResult.put("uri", uri);
-      toMapResult.put("packageName", packageName);
-      toMapResult.put("formatHint", formatHint);
-      toMapResult.put("httpHeaders", httpHeaders);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(5);
+      toListResult.add(asset);
+      toListResult.add(uri);
+      toListResult.add(packageName);
+      toListResult.add(formatHint);
+      toListResult.add(httpHeaders);
+      return toListResult;
     }
 
-    static @NonNull CreateMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull CreateMessage fromList(@NonNull ArrayList<Object> list) {
       CreateMessage pigeonResult = new CreateMessage();
-      Object asset = map.get("asset");
+      Object asset = list.get(0);
       pigeonResult.setAsset((String) asset);
-      Object uri = map.get("uri");
+      Object uri = list.get(1);
       pigeonResult.setUri((String) uri);
-      Object packageName = map.get("packageName");
+      Object packageName = list.get(2);
       pigeonResult.setPackageName((String) packageName);
-      Object formatHint = map.get("formatHint");
+      Object formatHint = list.get(3);
       pigeonResult.setFormatHint((String) formatHint);
-      Object httpHeaders = map.get("httpHeaders");
+      Object httpHeaders = list.get(4);
       pigeonResult.setHttpHeaders((Map<String, String>) httpHeaders);
       return pigeonResult;
     }
   }
 
   /** Generated class from Pigeon that represents data sent in messages. */
-  public static class MixWithOthersMessage {
+  public static final class MixWithOthersMessage {
     private @NonNull Boolean mixWithOthers;
 
     public @NonNull Boolean getMixWithOthers() {
@@ -524,10 +562,11 @@
       this.mixWithOthers = setterArg;
     }
 
-    /** Constructor is private to enforce null safety; use Builder. */
-    private MixWithOthersMessage() {}
+    /** Constructor is non-public to enforce null safety; use Builder. */
+    MixWithOthersMessage() {}
 
-    public static class Builder {
+    public static final class Builder {
+
       private @Nullable Boolean mixWithOthers;
 
       public @NonNull Builder setMixWithOthers(@NonNull Boolean setterArg) {
@@ -543,15 +582,15 @@
     }
 
     @NonNull
-    Map<String, Object> toMap() {
-      Map<String, Object> toMapResult = new HashMap<>();
-      toMapResult.put("mixWithOthers", mixWithOthers);
-      return toMapResult;
+    ArrayList<Object> toList() {
+      ArrayList<Object> toListResult = new ArrayList<Object>(1);
+      toListResult.add(mixWithOthers);
+      return toListResult;
     }
 
-    static @NonNull MixWithOthersMessage fromMap(@NonNull Map<String, Object> map) {
+    static @NonNull MixWithOthersMessage fromList(@NonNull ArrayList<Object> list) {
       MixWithOthersMessage pigeonResult = new MixWithOthersMessage();
-      Object mixWithOthers = map.get("mixWithOthers");
+      Object mixWithOthers = list.get(0);
       pigeonResult.setMixWithOthers((Boolean) mixWithOthers);
       return pigeonResult;
     }
@@ -563,57 +602,50 @@
     private AndroidVideoPlayerApiCodec() {}
 
     @Override
-    protected Object readValueOfType(byte type, ByteBuffer buffer) {
+    protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) {
       switch (type) {
         case (byte) 128:
-          return CreateMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return CreateMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 129:
-          return LoopingMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return LoopingMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 130:
-          return MixWithOthersMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return MixWithOthersMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 131:
-          return PlaybackSpeedMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return PlaybackSpeedMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 132:
-          return PositionMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return PositionMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 133:
-          return TextureMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return TextureMessage.fromList((ArrayList<Object>) readValue(buffer));
         case (byte) 134:
-          return VolumeMessage.fromMap((Map<String, Object>) readValue(buffer));
-
+          return VolumeMessage.fromList((ArrayList<Object>) readValue(buffer));
         default:
           return super.readValueOfType(type, buffer);
       }
     }
 
     @Override
-    protected void writeValue(ByteArrayOutputStream stream, Object value) {
+    protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) {
       if (value instanceof CreateMessage) {
         stream.write(128);
-        writeValue(stream, ((CreateMessage) value).toMap());
+        writeValue(stream, ((CreateMessage) value).toList());
       } else if (value instanceof LoopingMessage) {
         stream.write(129);
-        writeValue(stream, ((LoopingMessage) value).toMap());
+        writeValue(stream, ((LoopingMessage) value).toList());
       } else if (value instanceof MixWithOthersMessage) {
         stream.write(130);
-        writeValue(stream, ((MixWithOthersMessage) value).toMap());
+        writeValue(stream, ((MixWithOthersMessage) value).toList());
       } else if (value instanceof PlaybackSpeedMessage) {
         stream.write(131);
-        writeValue(stream, ((PlaybackSpeedMessage) value).toMap());
+        writeValue(stream, ((PlaybackSpeedMessage) value).toList());
       } else if (value instanceof PositionMessage) {
         stream.write(132);
-        writeValue(stream, ((PositionMessage) value).toMap());
+        writeValue(stream, ((PositionMessage) value).toList());
       } else if (value instanceof TextureMessage) {
         stream.write(133);
-        writeValue(stream, ((TextureMessage) value).toMap());
+        writeValue(stream, ((TextureMessage) value).toList());
       } else if (value instanceof VolumeMessage) {
         stream.write(134);
-        writeValue(stream, ((VolumeMessage) value).toMap());
+        writeValue(stream, ((VolumeMessage) value).toList());
       } else {
         super.writeValue(stream, value);
       }
@@ -622,6 +654,7 @@
 
   /** Generated interface from Pigeon that represents a handler of messages from Flutter. */
   public interface AndroidVideoPlayerApi {
+
     void initialize();
 
     @NonNull
@@ -647,15 +680,15 @@
     void setMixWithOthers(@NonNull MixWithOthersMessage msg);
 
     /** The codec used by AndroidVideoPlayerApi. */
-    static MessageCodec<Object> getCodec() {
+    static @NonNull MessageCodec<Object> getCodec() {
       return AndroidVideoPlayerApiCodec.INSTANCE;
     }
-
     /**
      * Sets up an instance of `AndroidVideoPlayerApi` to handle messages through the
      * `binaryMessenger`.
      */
-    static void setup(BinaryMessenger binaryMessenger, AndroidVideoPlayerApi api) {
+    static void setup(
+        @NonNull BinaryMessenger binaryMessenger, @Nullable AndroidVideoPlayerApi api) {
       {
         BasicMessageChannel<Object> channel =
             new BasicMessageChannel<>(
@@ -663,12 +696,13 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
                 try {
                   api.initialize();
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -683,17 +717,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                CreateMessage msgArg = (CreateMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  CreateMessage msgArg = (CreateMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   TextureMessage output = api.create(msgArg);
-                  wrapped.put("result", output);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, output);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -708,17 +740,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                TextureMessage msgArg = (TextureMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  TextureMessage msgArg = (TextureMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.dispose(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -733,17 +763,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                LoopingMessage msgArg = (LoopingMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  LoopingMessage msgArg = (LoopingMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.setLooping(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -758,17 +786,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                VolumeMessage msgArg = (VolumeMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  VolumeMessage msgArg = (VolumeMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.setVolume(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -785,17 +811,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                PlaybackSpeedMessage msgArg = (PlaybackSpeedMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  PlaybackSpeedMessage msgArg = (PlaybackSpeedMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.setPlaybackSpeed(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -810,17 +834,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                TextureMessage msgArg = (TextureMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  TextureMessage msgArg = (TextureMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.play(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -835,17 +857,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                TextureMessage msgArg = (TextureMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  TextureMessage msgArg = (TextureMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   PositionMessage output = api.position(msgArg);
-                  wrapped.put("result", output);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, output);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -860,17 +880,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                PositionMessage msgArg = (PositionMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  PositionMessage msgArg = (PositionMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.seekTo(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -885,17 +903,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                TextureMessage msgArg = (TextureMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  TextureMessage msgArg = (TextureMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.pause(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -912,17 +928,15 @@
         if (api != null) {
           channel.setMessageHandler(
               (message, reply) -> {
-                Map<String, Object> wrapped = new HashMap<>();
+                ArrayList<Object> wrapped = new ArrayList<Object>();
+                ArrayList<Object> args = (ArrayList<Object>) message;
+                MixWithOthersMessage msgArg = (MixWithOthersMessage) args.get(0);
                 try {
-                  ArrayList<Object> args = (ArrayList<Object>) message;
-                  MixWithOthersMessage msgArg = (MixWithOthersMessage) args.get(0);
-                  if (msgArg == null) {
-                    throw new NullPointerException("msgArg unexpectedly null.");
-                  }
                   api.setMixWithOthers(msgArg);
-                  wrapped.put("result", null);
-                } catch (Error | RuntimeException exception) {
-                  wrapped.put("error", wrapError(exception));
+                  wrapped.add(0, null);
+                } catch (Throwable exception) {
+                  ArrayList<Object> wrappedError = wrapError(exception);
+                  wrapped = wrappedError;
                 }
                 reply.reply(wrapped);
               });
@@ -932,14 +946,4 @@
       }
     }
   }
-
-  private static Map<String, Object> wrapError(Throwable exception) {
-    Map<String, Object> errorMap = new HashMap<>();
-    errorMap.put("message", exception.toString());
-    errorMap.put("code", exception.getClass().getSimpleName());
-    errorMap.put(
-        "details",
-        "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception));
-    return errorMap;
-  }
 }
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java
index 9813895..222a224 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/QueuingEventSink.java
@@ -18,7 +18,7 @@
  */
 final class QueuingEventSink implements EventChannel.EventSink {
   private EventChannel.EventSink delegate;
-  private ArrayList<Object> eventQueue = new ArrayList<>();
+  private final ArrayList<Object> eventQueue = new ArrayList<>();
   private boolean done = false;
 
   public void setDelegate(EventChannel.EventSink delegate) {
@@ -69,7 +69,7 @@
     eventQueue.clear();
   }
 
-  private static class EndOfStreamEvent {}
+  static class EndOfStreamEvent {}
 
   private static class ErrorEvent {
     String code;
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
index 4701c79..57fc103 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayer.java
@@ -83,7 +83,7 @@
     DataSource.Factory dataSourceFactory =
         new DefaultDataSource.Factory(context, httpDataSourceFactory);
 
-    MediaSource mediaSource = buildMediaSource(uri, dataSourceFactory, formatHint, context);
+    MediaSource mediaSource = buildMediaSource(uri, dataSourceFactory, formatHint);
 
     exoPlayer.setMediaSource(mediaSource);
     exoPlayer.prepare();
@@ -124,7 +124,7 @@
   }
 
   private MediaSource buildMediaSource(
-      Uri uri, DataSource.Factory mediaDataSourceFactory, String formatHint, Context context) {
+      Uri uri, DataSource.Factory mediaDataSourceFactory, String formatHint) {
     int type;
     if (formatHint == null) {
       type = Util.inferContentType(uri);
@@ -225,7 +225,7 @@
           }
 
           @Override
-          public void onPlayerError(final PlaybackException error) {
+          public void onPlayerError(@NonNull final PlaybackException error) {
             setBuffering(false);
             if (eventSink != null) {
               eventSink.error("VideoError", "Video player had error " + error, null);
diff --git a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java
index b2dfa94..c0c6027 100644
--- a/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java
+++ b/packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java
@@ -7,6 +7,7 @@
 import android.content.Context;
 import android.os.Build;
 import android.util.LongSparseArray;
+import androidx.annotation.NonNull;
 import io.flutter.FlutterInjector;
 import io.flutter.Log;
 import io.flutter.embedding.engine.plugins.FlutterPlugin;
@@ -32,7 +33,7 @@
   private static final String TAG = "VideoPlayerPlugin";
   private final LongSparseArray<VideoPlayer> videoPlayers = new LongSparseArray<>();
   private FlutterState flutterState;
-  private VideoPlayerOptions options = new VideoPlayerOptions();
+  private final VideoPlayerOptions options = new VideoPlayerOptions();
 
   /** Register this with the v2 embedding for the plugin to respond to lifecycle callbacks. */
   public VideoPlayerPlugin() {}
@@ -51,7 +52,8 @@
 
   /** Registers this with the stable v1 embedding. Will not respond to lifecycle events. */
   @SuppressWarnings("deprecation")
-  public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
+  public static void registerWith(
+      @NonNull io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
     final VideoPlayerPlugin plugin = new VideoPlayerPlugin(registrar);
     registrar.addViewDestroyListener(
         view -> {
@@ -61,7 +63,7 @@
   }
 
   @Override
-  public void onAttachedToEngine(FlutterPluginBinding binding) {
+  public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
     if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
       try {
         HttpsURLConnection.setDefaultSSLSocketFactory(new CustomSSLSocketFactory());
@@ -87,7 +89,7 @@
   }
 
   @Override
-  public void onDetachedFromEngine(FlutterPluginBinding binding) {
+  public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
     if (flutterState == null) {
       Log.wtf(TAG, "Detached from the engine before registering to it.");
     }
@@ -116,7 +118,7 @@
     disposeAllPlayers();
   }
 
-  public TextureMessage create(CreateMessage arg) {
+  public @NonNull TextureMessage create(@NonNull CreateMessage arg) {
     TextureRegistry.SurfaceTextureEntry handle =
         flutterState.textureRegistry.createSurfaceTexture();
     EventChannel eventChannel =
@@ -139,10 +141,9 @@
               handle,
               "asset:///" + assetLookupKey,
               null,
-              new HashMap<String, String>(),
+              new HashMap<>(),
               options);
     } else {
-      @SuppressWarnings("unchecked")
       Map<String, String> httpHeaders = arg.getHttpHeaders();
       player =
           new VideoPlayer(
@@ -156,37 +157,36 @@
     }
     videoPlayers.put(handle.id(), player);
 
-    TextureMessage result = new TextureMessage.Builder().setTextureId(handle.id()).build();
-    return result;
+    return new TextureMessage.Builder().setTextureId(handle.id()).build();
   }
 
-  public void dispose(TextureMessage arg) {
+  public void dispose(@NonNull TextureMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.dispose();
     videoPlayers.remove(arg.getTextureId());
   }
 
-  public void setLooping(LoopingMessage arg) {
+  public void setLooping(@NonNull LoopingMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.setLooping(arg.getIsLooping());
   }
 
-  public void setVolume(VolumeMessage arg) {
+  public void setVolume(@NonNull VolumeMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.setVolume(arg.getVolume());
   }
 
-  public void setPlaybackSpeed(PlaybackSpeedMessage arg) {
+  public void setPlaybackSpeed(@NonNull PlaybackSpeedMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.setPlaybackSpeed(arg.getSpeed());
   }
 
-  public void play(TextureMessage arg) {
+  public void play(@NonNull TextureMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.play();
   }
 
-  public PositionMessage position(TextureMessage arg) {
+  public @NonNull PositionMessage position(@NonNull TextureMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     PositionMessage result =
         new PositionMessage.Builder()
@@ -197,18 +197,18 @@
     return result;
   }
 
-  public void seekTo(PositionMessage arg) {
+  public void seekTo(@NonNull PositionMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.seekTo(arg.getPosition().intValue());
   }
 
-  public void pause(TextureMessage arg) {
+  public void pause(@NonNull TextureMessage arg) {
     VideoPlayer player = videoPlayers.get(arg.getTextureId());
     player.pause();
   }
 
   @Override
-  public void setMixWithOthers(MixWithOthersMessage arg) {
+  public void setMixWithOthers(@NonNull MixWithOthersMessage arg) {
     options.mixWithOthers = arg.getMixWithOthers();
   }
 
@@ -221,11 +221,11 @@
   }
 
   private static final class FlutterState {
-    private final Context applicationContext;
-    private final BinaryMessenger binaryMessenger;
-    private final KeyForAssetFn keyForAsset;
-    private final KeyForAssetAndPackageName keyForAssetAndPackageName;
-    private final TextureRegistry textureRegistry;
+    final Context applicationContext;
+    final BinaryMessenger binaryMessenger;
+    final KeyForAssetFn keyForAsset;
+    final KeyForAssetAndPackageName keyForAssetAndPackageName;
+    final TextureRegistry textureRegistry;
 
     FlutterState(
         Context applicationContext,
diff --git a/packages/video_player/video_player_android/lib/src/messages.g.dart b/packages/video_player/video_player_android/lib/src/messages.g.dart
index 0dadd2e..47ed6a2 100644
--- a/packages/video_player/video_player_android/lib/src/messages.g.dart
+++ b/packages/video_player/video_player_android/lib/src/messages.g.dart
@@ -1,14 +1,14 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// Autogenerated from Pigeon (v2.0.1), do not edit directly.
+// Autogenerated from Pigeon (v9.2.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
-// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name
-// @dart = 2.12
-import 'dart:async';
-import 'dart:typed_data' show Uint8List, Int32List, Int64List, Float64List;
+// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import
 
-import 'package:flutter/foundation.dart' show WriteBuffer, ReadBuffer;
+import 'dart:async';
+import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;
+
+import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
 import 'package:flutter/services.dart';
 
 class TextureMessage {
@@ -19,15 +19,15 @@
   int textureId;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['textureId'] = textureId;
-    return pigeonMap;
+    return <Object?>[
+      textureId,
+    ];
   }
 
-  static TextureMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static TextureMessage decode(Object result) {
+    result as List<Object?>;
     return TextureMessage(
-      textureId: pigeonMap['textureId']! as int,
+      textureId: result[0]! as int,
     );
   }
 }
@@ -39,20 +39,21 @@
   });
 
   int textureId;
+
   bool isLooping;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['textureId'] = textureId;
-    pigeonMap['isLooping'] = isLooping;
-    return pigeonMap;
+    return <Object?>[
+      textureId,
+      isLooping,
+    ];
   }
 
-  static LoopingMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static LoopingMessage decode(Object result) {
+    result as List<Object?>;
     return LoopingMessage(
-      textureId: pigeonMap['textureId']! as int,
-      isLooping: pigeonMap['isLooping']! as bool,
+      textureId: result[0]! as int,
+      isLooping: result[1]! as bool,
     );
   }
 }
@@ -64,20 +65,21 @@
   });
 
   int textureId;
+
   double volume;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['textureId'] = textureId;
-    pigeonMap['volume'] = volume;
-    return pigeonMap;
+    return <Object?>[
+      textureId,
+      volume,
+    ];
   }
 
-  static VolumeMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static VolumeMessage decode(Object result) {
+    result as List<Object?>;
     return VolumeMessage(
-      textureId: pigeonMap['textureId']! as int,
-      volume: pigeonMap['volume']! as double,
+      textureId: result[0]! as int,
+      volume: result[1]! as double,
     );
   }
 }
@@ -89,20 +91,21 @@
   });
 
   int textureId;
+
   double speed;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['textureId'] = textureId;
-    pigeonMap['speed'] = speed;
-    return pigeonMap;
+    return <Object?>[
+      textureId,
+      speed,
+    ];
   }
 
-  static PlaybackSpeedMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static PlaybackSpeedMessage decode(Object result) {
+    result as List<Object?>;
     return PlaybackSpeedMessage(
-      textureId: pigeonMap['textureId']! as int,
-      speed: pigeonMap['speed']! as double,
+      textureId: result[0]! as int,
+      speed: result[1]! as double,
     );
   }
 }
@@ -114,20 +117,21 @@
   });
 
   int textureId;
+
   int position;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['textureId'] = textureId;
-    pigeonMap['position'] = position;
-    return pigeonMap;
+    return <Object?>[
+      textureId,
+      position,
+    ];
   }
 
-  static PositionMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static PositionMessage decode(Object result) {
+    result as List<Object?>;
     return PositionMessage(
-      textureId: pigeonMap['textureId']! as int,
-      position: pigeonMap['position']! as int,
+      textureId: result[0]! as int,
+      position: result[1]! as int,
     );
   }
 }
@@ -142,30 +146,34 @@
   });
 
   String? asset;
+
   String? uri;
+
   String? packageName;
+
   String? formatHint;
+
   Map<String?, String?> httpHeaders;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['asset'] = asset;
-    pigeonMap['uri'] = uri;
-    pigeonMap['packageName'] = packageName;
-    pigeonMap['formatHint'] = formatHint;
-    pigeonMap['httpHeaders'] = httpHeaders;
-    return pigeonMap;
+    return <Object?>[
+      asset,
+      uri,
+      packageName,
+      formatHint,
+      httpHeaders,
+    ];
   }
 
-  static CreateMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static CreateMessage decode(Object result) {
+    result as List<Object?>;
     return CreateMessage(
-      asset: pigeonMap['asset'] as String?,
-      uri: pigeonMap['uri'] as String?,
-      packageName: pigeonMap['packageName'] as String?,
-      formatHint: pigeonMap['formatHint'] as String?,
-      httpHeaders: (pigeonMap['httpHeaders'] as Map<Object?, Object?>?)!
-          .cast<String?, String?>(),
+      asset: result[0] as String?,
+      uri: result[1] as String?,
+      packageName: result[2] as String?,
+      formatHint: result[3] as String?,
+      httpHeaders:
+          (result[4] as Map<Object?, Object?>?)!.cast<String?, String?>(),
     );
   }
 }
@@ -178,15 +186,15 @@
   bool mixWithOthers;
 
   Object encode() {
-    final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
-    pigeonMap['mixWithOthers'] = mixWithOthers;
-    return pigeonMap;
+    return <Object?>[
+      mixWithOthers,
+    ];
   }
 
-  static MixWithOthersMessage decode(Object message) {
-    final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
+  static MixWithOthersMessage decode(Object result) {
+    result as List<Object?>;
     return MixWithOthersMessage(
-      mixWithOthers: pigeonMap['mixWithOthers']! as bool,
+      mixWithOthers: result[0]! as bool,
     );
   }
 }
@@ -226,25 +234,18 @@
     switch (type) {
       case 128:
         return CreateMessage.decode(readValue(buffer)!);
-
       case 129:
         return LoopingMessage.decode(readValue(buffer)!);
-
       case 130:
         return MixWithOthersMessage.decode(readValue(buffer)!);
-
       case 131:
         return PlaybackSpeedMessage.decode(readValue(buffer)!);
-
       case 132:
         return PositionMessage.decode(readValue(buffer)!);
-
       case 133:
         return TextureMessage.decode(readValue(buffer)!);
-
       case 134:
         return VolumeMessage.decode(readValue(buffer)!);
-
       default:
         return super.readValueOfType(type, buffer);
     }
@@ -257,7 +258,6 @@
   /// BinaryMessenger will be used which routes to the host platform.
   AndroidVideoPlayerApi({BinaryMessenger? binaryMessenger})
       : _binaryMessenger = binaryMessenger;
-
   final BinaryMessenger? _binaryMessenger;
 
   static const MessageCodec<Object?> codec = _AndroidVideoPlayerApiCodec();
@@ -266,20 +266,17 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.initialize', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(null) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList = await channel.send(null) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -290,28 +287,26 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.create', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
-    } else if (replyMap['result'] == null) {
+    } else if (replyList[0] == null) {
       throw PlatformException(
         code: 'null-error',
         message: 'Host platform returned null value for non-null return value.',
       );
     } else {
-      return (replyMap['result'] as TextureMessage?)!;
+      return (replyList[0] as TextureMessage?)!;
     }
   }
 
@@ -319,20 +314,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.dispose', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -343,20 +336,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.setLooping', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -367,20 +358,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.setVolume', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -391,20 +380,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.setPlaybackSpeed', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -415,20 +402,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.play', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -439,28 +424,26 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.position', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
-    } else if (replyMap['result'] == null) {
+    } else if (replyList[0] == null) {
       throw PlatformException(
         code: 'null-error',
         message: 'Host platform returned null value for non-null return value.',
       );
     } else {
-      return (replyMap['result'] as PositionMessage?)!;
+      return (replyList[0] as PositionMessage?)!;
     }
   }
 
@@ -468,20 +451,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.seekTo', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -492,20 +473,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.pause', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
@@ -516,20 +495,18 @@
     final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
         'dev.flutter.pigeon.AndroidVideoPlayerApi.setMixWithOthers', codec,
         binaryMessenger: _binaryMessenger);
-    final Map<Object?, Object?>? replyMap =
-        await channel.send(<Object?>[arg_msg]) as Map<Object?, Object?>?;
-    if (replyMap == null) {
+    final List<Object?>? replyList =
+        await channel.send(<Object?>[arg_msg]) as List<Object?>?;
+    if (replyList == null) {
       throw PlatformException(
         code: 'channel-error',
         message: 'Unable to establish connection on channel.',
       );
-    } else if (replyMap['error'] != null) {
-      final Map<Object?, Object?> error =
-          (replyMap['error'] as Map<Object?, Object?>?)!;
+    } else if (replyList.length > 1) {
       throw PlatformException(
-        code: (error['code'] as String?)!,
-        message: error['message'] as String?,
-        details: error['details'],
+        code: replyList[0]! as String,
+        message: replyList[1] as String?,
+        details: replyList[2],
       );
     } else {
       return;
diff --git a/packages/video_player/video_player_android/pubspec.yaml b/packages/video_player/video_player_android/pubspec.yaml
index dc195b4..f67375f 100644
--- a/packages/video_player/video_player_android/pubspec.yaml
+++ b/packages/video_player/video_player_android/pubspec.yaml
@@ -2,7 +2,7 @@
 description: Android implementation of the video_player plugin.
 repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
-version: 2.4.6
+version: 2.4.7
 
 environment:
   sdk: ">=2.18.0 <4.0.0"
@@ -25,4 +25,4 @@
 dev_dependencies:
   flutter_test:
     sdk: flutter
-  pigeon: ^2.0.1
+  pigeon: ^9.2.5
diff --git a/packages/video_player/video_player_android/test/test_api.g.dart b/packages/video_player/video_player_android/test/test_api.g.dart
index 6361522..bb68e71 100644
--- a/packages/video_player/video_player_android/test/test_api.g.dart
+++ b/packages/video_player/video_player_android/test/test_api.g.dart
@@ -1,20 +1,16 @@
 // Copyright 2013 The Flutter Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-// Autogenerated from Pigeon (v2.0.1), do not edit directly.
+// Autogenerated from Pigeon (v9.2.5), do not edit directly.
 // See also: https://pub.dev/packages/pigeon
-// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis
+// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import
 // ignore_for_file: avoid_relative_lib_imports
-// @dart = 2.12
 import 'dart:async';
-import 'dart:typed_data' show Uint8List, Int32List, Int64List, Float64List;
-// TODO(a14n): remove this import once Flutter 3.1 or later reaches stable (including flutter/flutter#106316)
-// ignore: unnecessary_import
-import 'package:flutter/foundation.dart' show WriteBuffer, ReadBuffer;
+import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List;
+import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
 import 'package:flutter/services.dart';
 import 'package:flutter_test/flutter_test.dart';
 
-// TODO(gaaclarke): This had to be hand tweaked from a relative path.
 import 'package:video_player_android/src/messages.g.dart';
 
 class _TestHostVideoPlayerApiCodec extends StandardMessageCodec {
@@ -52,25 +48,18 @@
     switch (type) {
       case 128:
         return CreateMessage.decode(readValue(buffer)!);
-
       case 129:
         return LoopingMessage.decode(readValue(buffer)!);
-
       case 130:
         return MixWithOthersMessage.decode(readValue(buffer)!);
-
       case 131:
         return PlaybackSpeedMessage.decode(readValue(buffer)!);
-
       case 132:
         return PositionMessage.decode(readValue(buffer)!);
-
       case 133:
         return TextureMessage.decode(readValue(buffer)!);
-
       case 134:
         return VolumeMessage.decode(readValue(buffer)!);
-
       default:
         return super.readValueOfType(type, buffer);
     }
@@ -78,19 +67,32 @@
 }
 
 abstract class TestHostVideoPlayerApi {
+  static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding =>
+      TestDefaultBinaryMessengerBinding.instance;
   static const MessageCodec<Object?> codec = _TestHostVideoPlayerApiCodec();
 
   void initialize();
+
   TextureMessage create(CreateMessage msg);
+
   void dispose(TextureMessage msg);
+
   void setLooping(LoopingMessage msg);
+
   void setVolume(VolumeMessage msg);
+
   void setPlaybackSpeed(PlaybackSpeedMessage msg);
+
   void play(TextureMessage msg);
+
   PositionMessage position(TextureMessage msg);
+
   void seekTo(PositionMessage msg);
+
   void pause(TextureMessage msg);
+
   void setMixWithOthers(MixWithOthersMessage msg);
+
   static void setup(TestHostVideoPlayerApi? api,
       {BinaryMessenger? binaryMessenger}) {
     {
@@ -98,12 +100,15 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.initialize', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           // ignore message
           api.initialize();
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -112,9 +117,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.create', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.create was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -122,7 +130,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.create was null, expected non-null CreateMessage.');
           final TextureMessage output = api.create(arg_msg!);
-          return <Object?, Object?>{'result': output};
+          return <Object?>[output];
         });
       }
     }
@@ -131,9 +139,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.dispose', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.dispose was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -141,7 +152,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.dispose was null, expected non-null TextureMessage.');
           api.dispose(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -150,9 +161,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.setLooping', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setLooping was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -160,7 +174,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setLooping was null, expected non-null LoopingMessage.');
           api.setLooping(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -169,9 +183,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.setVolume', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setVolume was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -179,7 +196,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setVolume was null, expected non-null VolumeMessage.');
           api.setVolume(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -188,9 +205,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.setPlaybackSpeed', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setPlaybackSpeed was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -199,7 +219,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setPlaybackSpeed was null, expected non-null PlaybackSpeedMessage.');
           api.setPlaybackSpeed(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -208,9 +228,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.play', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.play was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -218,7 +241,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.play was null, expected non-null TextureMessage.');
           api.play(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -227,9 +250,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.position', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.position was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -237,7 +263,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.position was null, expected non-null TextureMessage.');
           final PositionMessage output = api.position(arg_msg!);
-          return <Object?, Object?>{'result': output};
+          return <Object?>[output];
         });
       }
     }
@@ -246,9 +272,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.seekTo', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.seekTo was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -256,7 +285,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.seekTo was null, expected non-null PositionMessage.');
           api.seekTo(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -265,9 +294,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.pause', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.pause was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -275,7 +307,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.pause was null, expected non-null TextureMessage.');
           api.pause(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }
@@ -284,9 +316,12 @@
           'dev.flutter.pigeon.AndroidVideoPlayerApi.setMixWithOthers', codec,
           binaryMessenger: binaryMessenger);
       if (api == null) {
-        channel.setMockMessageHandler(null);
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel, null);
       } else {
-        channel.setMockMessageHandler((Object? message) async {
+        _testBinaryMessengerBinding!.defaultBinaryMessenger
+            .setMockDecodedMessageHandler<Object?>(channel,
+                (Object? message) async {
           assert(message != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setMixWithOthers was null.');
           final List<Object?> args = (message as List<Object?>?)!;
@@ -295,7 +330,7 @@
           assert(arg_msg != null,
               'Argument for dev.flutter.pigeon.AndroidVideoPlayerApi.setMixWithOthers was null, expected non-null MixWithOthersMessage.');
           api.setMixWithOthers(arg_msg!);
-          return <Object?, Object?>{};
+          return <Object?>[];
         });
       }
     }