arianneorpilla / jidoujisho

A full-featured immersion language learning suite for mobile.
GNU General Public License v3.0
819 stars 55 forks source link

DecoderCallback is not recognized in Flutter? #365

Open nhatminh1209 opened 4 months ago

nhatminh1209 commented 4 months ago
@override
  ImageStreamCompleter load(CacheImageProvider key, DecoderCallback decode) {
    return MultiFrameImageStreamCompleter(
      codec: _loadAsync(decode),
      scale: 1,
      debugLabel: tag,
      informationCollector: () sync* {
        yield ErrorDescription('Tag: $tag');
      },
    );
  }

  Future<Codec> _loadAsync(DecoderCallback decode) async {

The DecoderCallback seems to be called from Java. Is there any way to fix this problem, because I can not run it with Flutter?

arianneorpilla commented 4 months ago

Could you please share the Flutter version you are using?

nhatminh1209 commented 4 months ago

I checked the Flutter version: " Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision bae5e49bc2 (2 weeks ago) • 2024-02-13 17:46:18 -0800 Engine • revision 04817c99c9 Tools • Dart 3.3.0 • DevTools 2.31.1" Is that possible because of the version? I'm not upgrading to the 3.19.2 yet :)

arianneorpilla commented 4 months ago

If you look at the pubspec.yaml for yuuna, you can see that the project has a Flutter version constraint:

environment:
  sdk: ">=3.0.0<4.0.0"
  flutter: "^3.13.5"

You can also see how the tests are passing on GitHub actions, and with what Flutter version those tests are being built with.