localizely / flutter-intl-intellij

This Android Studio & IntelliJ plugin generates boilerplate code for localization of Flutter apps with official Dart Intl library
MIT License
129 stars 4 forks source link

Plugin stopped generating with updating Flutter to version 3.24 #118

Open npateras opened 3 months ago

npateras commented 3 months ago

After updating my Flutter version to 3.24, I get the following stacktrace every time the generate commands runs:

Failed to build intl_utils:generate:
../../../.pub-cache/hosted/pub.dev/analyzer-6.5.0/lib/src/summary2/macro_application.dart:1261:7: Error: The non-abstract class '_StaticTypeImpl' is missing implementations for these members:
 - StaticType.asInstanceOf
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class _StaticTypeImpl implements macro.StaticType {
      ^^^^^^^^^^^^^^^
../../flutter/bin/cache/dart-sdk/pkg/_macros/lib/src/api/introspection.dart:119:28: Context: 'StaticType.asInstanceOf' is defined here.
  Future<NamedStaticType?> asInstanceOf(TypeDeclaration declaration);
lzoran commented 3 months ago

Hi @npateras,

I guess that this issue is somehow related to the Flutter cache.

Could you check if reactivating the intl_utils package helps?

  1. Deactivate the intl_utils package:

    flutter pub global deactivate intl_utils

  2. Update one of your ARB files and save it in order to trigger the reactivation of the intl_utils package and generation of the localization code.

taosif7-dreamorbit commented 3 months ago

Hi @lzoran, it doesn't work. Main problem is that it doesn't add to the arb file at all

NeckCracker commented 3 months ago

running flutter pub global activate intl_utils solved the issue on my side

look here: https://github.com/dart-lang/pub/issues/4406