Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Freezed GoStyle FormatterNew to Visual Studio Code? Get it now.
Freezed GoStyle Formatter

Freezed GoStyle Formatter

Dmytrij Okladnoy

|
1 install
| (0) | Free
Automatically formats Freezed models in Go-style after dart format
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Freezed GoStyle Formatter

VS Code/Cursor extension that automatically formats Freezed models in Go-style alignment after dart format.

Before

@freezed
class User with _$User {
  const factory User({
    @JsonKey(name: 'id') @Default(0) int id,
    @JsonKey(name: 'email') required String email,
    @JsonKey(name: 'full_name') @Default('') String fullName,
    @JsonKey(name: 'age') int? age,
    @JsonKey(name: 'is_active') @Default(true) bool isActive,
    @JsonKey(name: 'tags') @Default([]) List<String> tags,
    @JsonKey(name: 'metadata') Map<String, dynamic>? metadata,
    @JsonKey(name: 'created_at') DateTime? createdAt,
  }) = _User;
}

After

@FreezedGoStyle()
@freezed
class User with _$User {
  const factory User({
    @JsonKey(name: 'id')           @Default(0)    int                    id,
    @JsonKey(name: 'email')                       required String        email,
    @JsonKey(name: 'full_name')    @Default('')   String                 fullName,
    @JsonKey(name: 'age')                         int?                   age,
    @JsonKey(name: 'is_active')    @Default(true) bool                   isActive,
    @JsonKey(name: 'tags')         @Default([])   List<String>           tags,
    @JsonKey(name: 'metadata')                    Map<String, dynamic>?  metadata,
    @JsonKey(name: 'created_at')                  DateTime?              createdAt,
  }) = _User;
}

Features

  • ✅ Automatically runs after dart format (Cmd+S / Ctrl+S)
  • ✅ Formats only classes with @FreezedGoStyle annotation
  • ✅ Fast native executable for instant formatting
  • ✅ Zero configuration needed

How It Works

  1. Save your Dart file (Cmd+S / Ctrl+S)
  2. dart format runs automatically
  3. Extension detects save and formats classes with @FreezedGoStyle() annotation
  4. File reloads with Go-style aligned parameters

Requirements

  • VS Code/Cursor 1.80.0+
  • Dart SDK installed
  • freezed_go_style package in workspace (or parent directory)

Links

  • GitHub Repository
  • Dart Package
  • Issue Tracker

License

MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft