super_enum_generator 0.6.0 copy "super_enum_generator: ^0.6.0" to clipboard
super_enum_generator: ^0.6.0 copied to clipboard

discontinuedreplaced by: freezed

Dev-dependency to generate sealed classes and when statements together with the super_enum.dart package.

example/example.dart

import 'package:super_enum/super_enum.dart';

part 'example.super.dart';

/// Possible Types of Attribute
@superEnum
enum _Attribute {
  /// Strength Attribute type
  @Data(fields: [DataField<int>('value')])
  Strength,

  /// Intelligence Attribute type
  @Data(fields: [DataField<int>('value')])
  Intelligence,

  /// Agility Attribute type
  @Data(fields: [DataField<int>('value')])
  Agility,

  /// Dexterity Attribute type
  @Data(fields: [DataField<int>('value')])
  Dexterity,

  /// Endurance Attribute type
  @Data(fields: [DataField<int>('value')])
  Endurance,

  /// Speed Attribute type
  @Data(fields: [DataField<int>('value')])
  Speed
}
10
likes
40
pub points
8%
popularity

Publisher

verified publisherxdsahil.dev

Dev-dependency to generate sealed classes and when statements together with the super_enum.dart package.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, code_builder, dart_style, source_gen, super_enum

More

Packages that depend on super_enum_generator