enum_object 0.0.2 icon indicating copy to clipboard operation
enum_object: ^0.0.2 copied to clipboard

Converts enum value to String and vice versa

Converts enum value to String and vice versa

Usage #

A simple usage example:

import 'package:enum_object/enum_object.dart';

main() {
  // convert enum value to string
  print(TestEnum.test.enumValue);

  // convert String to enum value
  var enumObject = EnumObject<TestEnum>(TestEnum.values);
  print(enumObject.enumFromString('test2'));
}
enum TestEnum{
  test, test2
}
4
likes
120
pub points
43%
popularity

Publisher

unverified uploader

Converts enum value to String and vice versa

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on enum_object