Skip to content

feat: add Dart and Flutter support - #47

Merged
zackkitzmiller merged 17 commits into
mainfrom
worktree-dart-flutter-support
Jul 12, 2026
Merged

feat: add Dart and Flutter support#47
zackkitzmiller merged 17 commits into
mainfrom
worktree-dart-flutter-support

Conversation

@zackkitzmiller

@zackkitzmiller zackkitzmiller commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds initium dart (templates: default, cli, package) and initium flutter (templates: default, package, plugin) commands, mirroring the existing Ruby/Python/Node/Go/Rust/Bash generator pattern
  • Generates pubspec.yaml, analysis_options.yaml, .gitignore, and justfile for each, plus the shared basic config files
  • Adds ProjectType::Dart/ProjectType::Flutter auto-detection via plain-text pubspec.yaml sniffing (no new YAML dependency)
  • Adds git hook generation (--hooks) for both languages, following the existing per-language hooks pattern

Test plan

  • just ci-local (rustfmt, clippy -D warnings, full suite) passes
  • cargo test — 148 passed, 9 suites, 0 failures
  • Manual smoke test: initium dart --template package and initium flutter --template plugin generate all expected files with correct content
  • Coverage: src/generators/dart.rs 95.8%, src/generators/flutter.rs 97.5% (target 80%+)
  • Final whole-branch review (independent agent): no Critical/Important findings, verdict "Ready to merge — Yes"

Spec: docs/superpowers/specs/2026-07-12-dart-flutter-support-design.md
Plan: docs/superpowers/plans/2026-07-12-dart-flutter-support.md

zackkitzmiller and others added 16 commits July 12, 2026 04:25
Locks in the approach for initium dart/initium flutter commands,
mirroring the existing per-language generator pattern.
Add Dart and Flutter project type detection by checking for pubspec.yaml
with Flutter SDK dependencies or top-level flutter section. Includes
placeholder generator modules for Dart and Flutter to be implemented
in follow-up tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… shim)

- Run cargo fmt to fix rustfmt violations in mod.rs and (formerly)
  flutter.rs from the original commit.
- Revert src/generators/dart.rs and flutter.rs to the brief's exact
  Step 6 placeholder (empty impl block, no methods) instead of the
  working stub methods added in 688e395, which belong to Tasks 2-7.
  Added #[allow(unused_imports)] to each since the bare InitiumError
  import otherwise fails the clippy -D warnings CI gate.
- Replace the ~40-line Dart/Flutter match arms in
  handle_auto_generate (src/commands.rs) with a minimal compiling
  placeholder, since the exhaustive ProjectType match requires an
  arm for the two new variants. Full UX wiring is Task 10's scope.
…try point

Adds get_dart_justfile_content (default/cli/package templates) and wires
generate_dart/generate_dart_with_template as the Dart generator entry point,
matching the Go generator's private-helper pattern. generate_dart_pubspec,
generate_dart_analysis_options, and generate_dart_gitignore are made private
(no longer needed pub since Task 3's direct-call test is superseded by
integration coverage through generate_dart_with_template); the two
analysis_options.yaml content assertions from that test were preserved by
folding them into test_generate_dart_config.
…ate entry point

Mirrors Task 4's Dart wiring: adds get_flutter_justfile_content (default/
package/plugin templates) and generate_flutter_with_template, which chains
the basic config generator with the Flutter pubspec/analysis_options/
gitignore/justfile generators.

Privatizes generate_flutter_pubspec/generate_flutter_analysis_options/
generate_flutter_gitignore (previously pub only so Task 6's integration test
could call them directly), matching the Dart/Go precedent of pub entry point
+ private per-file helpers. Task 6's test_generate_flutter_analysis_options_and_gitignore
is removed since it can no longer compile; its two content assertions
(flutter_lints include, *.freezed.dart exclude) are folded into the new
test_generate_flutter_config.
Add Commands::Dart/Flutter variants and dispatch in main.rs, plus
handle_dart/handle_flutter in CommandHandler. Extend handle_auto_generate
with ProjectType::Dart/Flutter arms (removing the Task 1 placeholder shim
that would otherwise become an unreachable_patterns clippy error) and
extend handle_list with Dart/Flutter file, template, and command entries.
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.13018% with 64 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/commands.rs 0.00% 58 Missing ⚠️
src/generators/dart.rs 91.66% 2 Missing ⚠️
src/generators/flutter.rs 91.66% 2 Missing ⚠️
src/main.rs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

docs: add design spec for Dart and Flutter support
@zackkitzmiller
zackkitzmiller merged commit bf9757a into main Jul 12, 2026
7 checks passed
@zackkitzmiller
zackkitzmiller deleted the worktree-dart-flutter-support branch July 12, 2026 16:04
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

Successfully merging this pull request may close these issues.

1 participant