Skip to content

Auto import on .dart folder #4869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aliyazdi75 opened this issue Sep 21, 2020 · 4 comments
Open

Auto import on .dart folder #4869

aliyazdi75 opened this issue Sep 21, 2020 · 4 comments
Milestone

Comments

@aliyazdi75
Copy link

Hi,
I am using flutter_gen to produce localization. It's like Gallary localization described here.
When I want to import my localization that placed at package:flutter_gen/gen_l10n/localizations.dart by Alt + Inter, there is no recommendation to import from there.
Is there a way to fix this, or have to import that manually?

@stevemessick
Copy link
Member

@scheglov Can you answer this question about auto-import? Or suggest someone who could? Thanks!

@stevemessick stevemessick added this to the On Deck milestone Sep 30, 2020
@md-weber
Copy link

The same issue, it is quite hard to import the generated files into your project with intellij at the moment.

grafik

@ipcjs
Copy link

ipcjs commented Dec 1, 2020

add lib/ext.dart file

export 'package:flutter_gen/gen_l10n/localizations.dart';

then auto import work again :)

@aliyazdi75
Copy link
Author

@stevemessick
any update on this?

gnprice pushed a commit to zulip/zulip-flutter that referenced this issue Nov 20, 2024
Previously with `package:flutter_gen`, a manual import of the
bindings file was required because editor/IDE plugins didn't
automatically suggest imports for the `ZulipLocalizations` class.
See:
  https://github.com/dart-lang/linter/issues/3308
  Dart-Code/Dart-Code#3948
  flutter/flutter-intellij#4869

Now that the generated files are located in `lib/generated/l10n`,
IDE plugins provide auto-import suggestions, making the manual
import instruction unnecessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants