nvim-flutter / nvim-flutter/flutter-tools.nvim
Snippit import is always at the bottom instead of the top
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 1.4k
- Forks
- 116
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
When I use the stateless widget snippit it appears like this:
class MyWidget extends StatelessWidget {
const MyWidget({super.key});
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}import 'package:flutter/material.dart';
I have to move the import to the top every time, is there a way to fix this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the stateless widget snippet in Neovim with flutter-tools.nvim and inspect the snippet-generation entry point. Trace why the Flutter/Dart import is emitted after the widget, then verify that the generated snippet places the import before the class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, lua, neovim
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100