flutter_boilerplate_annotations 1.1.0 copy "flutter_boilerplate_annotations: ^1.1.0" to clipboard
flutter_boilerplate_annotations: ^1.1.0 copied to clipboard

Annotations for flutter_boilerplate_generators — defines @Model, @CubitState, @JsonKey, @Default, @EnumValue, @Injectable, @Singleton, @LazySingleton, and ServiceContainer.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


1.1.0 - 2026-06-23 #

Added #

  • @Injectable({name, asType}) annotation untuk mendaftarkan class sebagai factory di DI container
  • @Singleton({name, asType}) annotation untuk mendaftarkan class sebagai singleton di DI container
  • @LazySingleton({name, asType}) annotation untuk mendaftarkan class sebagai lazy singleton di DI container
  • Constant shorthand injectable, singleton, lazySingleton untuk masing-masing annotation DI
  • @Named(name) annotation untuk menandai constructor parameter agar di-resolve berdasarkan nama dari container
  • @Module() annotation untuk menandai class sebagai DI module; constant shorthand module
  • ServiceContainer — runtime singleton DI container dengan registerFactory, registerSingleton, registerLazySingleton, get, isRegistered, dan reset

1.0.1 - 2026-06-22 #

Fixed #

  • Menyesuaikan SDK constraint ke ^3.8.1

1.0.0 - 2026-06-19 #

Added #

  • @Model annotation dengan parameter entity, fromJson, toJson, toEntity, fromEntity, genericAugmented, hiveObject, toHiveObject, fromHiveObject
  • @CubitState annotation dengan parameter when, maybeWhen, whenOrNull, map, maybeMap, mapOrNull
  • Constant cubitState sebagai shorthand untuk @CubitState() dengan semua method aktif
  • @JsonKey annotation untuk override nama key JSON pada field
  • @Default annotation untuk nilai default field saat key tidak ada di JSON
  • @EnumValue annotation untuk override nilai JSON pada enum value
  • Constant model sebagai shorthand untuk @Model() dengan konfigurasi default
  • Contoh implementasi di example/ untuk @Model, @cubitState, dan generic model
1
likes
120
points
163
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Annotations for flutter_boilerplate_generators — defines @Model, @CubitState, @JsonKey, @Default, @EnumValue, @Injectable, @Singleton, @LazySingleton, and ServiceContainer.

License

MIT (license)

More

Packages that depend on flutter_boilerplate_annotations