(注)本件は2022/5/15にバージョン5.5.0へのアップグレードで解消された模様です。
日本時間の2022/5/12未明に、FlutterSDKの安定版が3.0にアップグレードされましたが、
Flutterで音声認識できるパッケージである「speech_to_text」をFlutter3.0にアップグレードしたプロジェクトでお使いの場合は、以下のようなビルドエラーが発生します。
e: /opt/homebrew/Caskroom/flutter/2.10.4/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-5.4.3/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (81, 8): Class 'SpeechToTextPlugin' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener e: /opt/homebrew/Caskroom/flutter/2.10.4/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-5.4.3/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (627, 5): 'onRequestPermissionsResult' overrides nothing e: /opt/homebrew/Caskroom/flutter/2.10.4/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-5.4.3/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (771, 9): Class 'ChannelResultWrapper' is not abstract and does not implement abstract member public abstract fun error(p0: String, p1: String?, p2: Any?): Unit defined in io.flutter.plugin.common.MethodChannel.Result e: /opt/homebrew/Caskroom/flutter/2.10.4/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-5.4.3/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (786, 5): 'error' overrides nothing e: /opt/homebrew/Caskroom/flutter/2.10.4/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-5.4.3/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (789, 30): Type mismatch: inferred type is String? but String was expected FAILURE: Build failed with an exception.
パッケージのサイトでissueは上がっているのですが、まだ解決されていないので、「speech_to_text」をお使いの場合は現時点ではFlutter3にアップグレードしないで下さい。
Flutter3にアップグレードしてしまった場合は、現時点ではターミナルから「flutter downgrade」して、バージョンを2.10.xにダウングレードした方が無難です。