Skip to content

yu6hooke/flutter_contract_pattern_sample

Repository files navigation

contract_pattern_sample

Architecture Sample For Flutter

Demo https://yu6hooke.github.io/flutter_contract_pattern_sample/

Getting Started

fvm use

VSCode

実行 (launch.json)

「Run And Debug」メニューから => debug, profile, release

設定 (settings.json)

自動生成ファイルは畳む

{
...
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.expand": false,
  "explorer.fileNesting.patterns": {
    "*.dart": "$(capture).freezed.dart, $(capture).g.dart"
  }
}

Snippet

"contract": {
  "prefix": "cont",
  "body": [
    "import 'package:freezed_annotation/freezed_annotation.dart';",
    "",
    "part '$TM_FILENAME_BASE.freezed.dart';",
    "",
    "@freezed",
    "class $1UiState with _\\$$1UiState {",
    "  const factory $1UiState({",
    "    ",
    "  }) = _$1UiState;",
    "}",
    "",
    "@freezed",
    "sealed class $1Action with _\\$$1Action {",
    "  const factory $1Action.sampleAction() = SampleAction;",
    "}",
    "",
    "@freezed",
    "sealed class $1Effect with _\\$$1Effect {",
    "  const factory $1Effect.none() = None;",
    "}",
  ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published