flutter_boilerplate_annotations 1.1.0
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,lazySingletonuntuk 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 shorthandmoduleServiceContainer— runtime singleton DI container denganregisterFactory,registerSingleton,registerLazySingleton,get,isRegistered, danreset
1.0.0 - 2026-06-19 #
Added #
@Modelannotation dengan parameterentity,fromJson,toJson,toEntity,fromEntity,genericAugmented,hiveObject,toHiveObject,fromHiveObject@CubitStateannotation dengan parameterwhen,maybeWhen,whenOrNull,map,maybeMap,mapOrNull- Constant
cubitStatesebagai shorthand untuk@CubitState()dengan semua method aktif @JsonKeyannotation untuk override nama key JSON pada field@Defaultannotation untuk nilai default field saat key tidak ada di JSON@EnumValueannotation untuk override nilai JSON pada enum value- Constant
modelsebagai shorthand untuk@Model()dengan konfigurasi default - Contoh implementasi di
example/untuk@Model,@cubitState, dan generic model