"No methods were found to override" for indirect import not exposing the class #7454
Open
Description
Steps to Reproduce
Creating a class RenderObjectExample
that extends RenderBox
while importing package:flutter/widgets.dart
throws No methods were found to override
if I use Generate->override methods
tool.
When I change the import to package:flutter/rendering.dart
then it works correctly.
In both cases implementing an override doesn't throw any error in dart analysis or while compiling, the problem is just how AndroidStudio behaves if I want to use Generate->override methods
tool.
I think that the problem is related to that package:flutter/widgets.dart
wants to expose only TextSelectionHandlyType
from rendering.dart
:
export 'rendering.dart' show TextSelectionHandleType;
Version info
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.3.1 23D60 darwin-arm64, locale en-PL)
• Flutter version 3.22.1 on channel stable at /Users/rafalbednarczuk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision a14f74ff3a (3 days ago), 2024-05-22 11:08:21 -0500
• Engine revision 55eae6864b
• Dart version 3.4.1
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/rafalbednarczuk/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• 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.9+0-17.0.9b1087.7-11185874)
[✓] IntelliJ IDEA Community Edition (version 2023.2.5)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] IntelliJ IDEA Community Edition (version 2023.1.3)
• IntelliJ at /Users/rafalbednarczuk/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/231.9161.38/IntelliJ
IDEA CE.app
• 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
[✓] Connected device (4 available)
• iPhone 15 (mobile) • 7222F41F-D0F7-407D-9E46-578F5B2A7E8D • ios •
com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3.1 23D60
darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.3.1 23D60
darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.78
[✓] Network resources
• All expected network resources are available.
• No issues found!
Metadata
Assignees
Labels
No labels