enum_to_string
Better conversion of ENUMs to string. Dart has annoying EnumName.ValueName syntax when calling enum.toString, this package fixes that.
2.2.1
157K downloads/mo
#944 most downloaded on pub.dev
rknell/flutterEnumsToString
What this package is like to depend on
Last release 1 years ago
16 Mar 2025
Ships unpredictably
gaps range from 9 days to 3.8 years
Nearly every release is documented
notes for 17 of 18 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
21 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
21 releases · May 2019 to Mar 2025Releases
latest 21-
2.2.116 Mar 2025Release notes
Open source →- Performance improvements:
- Optimized
_getCustomMappingmethod to avoid throwing exceptions for enums without custom values - Added caching for string representations of enum values in
fromStringmethod to avoid repeated conversions - Fixed performance regression reported in issues #35 and #36
- Added benchmark tests to measure performance improvements
- Optimized
- Performance improvements:
-
2.2.017 Jan 2025Release notes
Open source →- Added support for enhanced enums (Dart 2.17+)
- Added ability to use custom string mappings with enhanced enums
- Minimum SDK version increased to 2.17.0
-
2.1.017 Jan 2025Release notes
Open source →- Added new
capitalizeWordsflag to control word capitalization in camelCase conversion - When used with
camelCase: true, settingcapitalizeWords: truewill capitalize all words instead of just the first one - Maintains backward compatibility with existing behavior
- Added new
-
2.0.119 Mar 2021Nothing published for this version
-
2.0.0-nullsafety.123 Feb 2021 pre-releaseNothing published for this version
-
1.0.1420 Nov 2020Release notes
Open source →- Added camelCase flag in "fromString" function to properly handle conversion back of a string with spaces to enum
-
1.0.14-nullsafety.121 Feb 2021 pre-releaseNothing published for this version
-
1.0.14-nullsafety.016 Feb 2021 pre-releaseNothing published for this version
-
1.0.1324 Sep 2020Release notes
Open source →- Fixed previous bug by replacing exception with an assertion. The library will no longer break in release mode with minified code, but it will also not throw an exception in production if you try to parse a non enum item.
-
1.0.1223 Sep 2020Release notes
Open source →- Fixing issue where minification in the web breaks the app. Unfortunately we can't safely check if the object type is an enum when compiled in release mode using type.toString as a result of this change. More information can be found here: https://github.com/flutter/flutter/issues/66236#issuecomment-697967770
-
1.0.1114 Sep 2020Release notes
Open source →- Fixing major mistake, renaming new function to convertToString so as not to conflict with system calls
-
1.0.1014 Sep 2020Release notes
Open source →BROKEN BUILD DO NOT USE
- Added .fromString function (Thanks @amoslai5128)
- Better error handling (Thanks @lironhl)
- Improved documentation
- Deprecated parseCamelCase function in favour of toString(enumItem, camelCase: true)
- Deprecated parse in favour of toString
-
1.0.922 Feb 2020 -
1.0.802 Nov 2019 -
1.0.730 May 2019 -
1.0.7+120 Oct 2019 -
1.0.630 May 2019 -
1.0.429 May 2019 -
1.0.326 May 2019 -
1.0.224 May 2019 -
1.0.124 May 2019