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

Error: The class 'FileSystemEvent' can't be extended, implemented, or mixed in outside of its library because it's a sealed class. #103

Closed SonPham17 closed 1 year ago

SonPham17 commented 1 year ago

I upgrade flutter version 3.13. When I put new value in arb file, plugin generate error with message:

Failed to build intl_utils:generate: ../../.pub-cache/hosted/pub.dev/watcher-1.0.2/lib/src/constructable_file_system_event.dart:7:57: Error: The class 'FileSystemEvent' can't be extended, implemented, or mixed in outside of its library because it's a sealed class. abstract class _ConstructableFileSystemEvent implements FileSystemEvent { ^ Process finished with exit code 1

Please help me check issue, many thanks 😊

Flutter doctor

[βœ“] Flutter (Channel stable, 3.13.0, on macOS 13.4.1 22F770820d darwin-x64, locale en-VN) β€’ Flutter version 3.13.0 on channel stable at /Users/sonpham/Dev/flutter_version/flutter β€’ Upstream repository https://github.com/flutter/flutter.git β€’ Framework revision efbf63d9c6 (7 days ago), 2023-08-15 21:05:06 -0500 β€’ Engine revision 1ac611c64e β€’ Dart version 3.1.0 β€’ DevTools version 2.25.0 [βœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.1) β€’ Android SDK at /Users/sonpham/Library/Android/sdk β€’ Platform android-33, build-tools 33.0.1 β€’ ANDROID_HOME = /Users/sonpham/Library/Android/sdk β€’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java β€’ Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) β€’ All Android licenses accepted. [βœ“] Xcode - develop for iOS and macOS (Xcode 14.3.1) β€’ Xcode at /Applications/Xcode.app/Contents/Developer β€’ Build 14E300c β€’ CocoaPods version 1.12.1 [βœ“] Chrome - develop for the web β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [βœ“] Android Studio (version 2022.3) β€’ Android Studio at /Applications/Android Studio.app/Contents β€’ Flutter plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/9212-flutter β€’ Dart plugin can be installed from: πŸ”¨ https://plugins.jetbrains.com/plugin/6351-dart β€’ Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) [βœ“] VS Code (version 1.81.1) β€’ VS Code at /Applications/Visual Studio Code.app/Contents β€’ Flutter extension can be installed from: πŸ”¨ https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [βœ“] Connected device (3 available) β€’ sdk gphone64 x86 64 (mobile) β€’ emulator-5554 β€’ android-x64 β€’ Android 13 (API 33) (emulator) β€’ macOS (desktop) β€’ macos β€’ darwin-x64 β€’ macOS 13.4.1 22F770820d darwin-x64 β€’ Chrome (web) β€’ chrome β€’ web-javascript β€’ Google Chrome 116.0.5845.96 [βœ“] Network resources β€’ All expected network resources are available. β€’ No issues found!

lzoran commented 1 year ago

Hi @SonPham17,

I believe that this problem is somehow related to an issue with the cache that occurs after a Flutter upgrade.

What version of the intl_utils package do you use?

flutter pub global list

Could you check if reactivating the intl_utils package helps?

flutter pub global deactivate intl_utils
flutter pub global activate intl_utils
SonPham17 commented 1 year ago

flutter pub global deactivate intl_utils flutter pub global activate intl_utils

It worked for me! Thank you πŸ™