PackageTrack
Sign in Get early access

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 2025
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 21
  1. 2.2.1 16 Mar 2025
    Release notes
    • Performance improvements:
      • Optimized _getCustomMapping method to avoid throwing exceptions for enums without custom values
      • Added caching for string representations of enum values in fromString method to avoid repeated conversions
      • Fixed performance regression reported in issues #35 and #36
      • Added benchmark tests to measure performance improvements
    Open source →
  2. 2.2.0 17 Jan 2025
    Release notes
    • 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
    Open source →
  3. 2.1.0 17 Jan 2025
    Release notes
    • Added new capitalizeWords flag to control word capitalization in camelCase conversion
    • When used with camelCase: true, setting capitalizeWords: true will capitalize all words instead of just the first one
    • Maintains backward compatibility with existing behavior
    Open source →
  4. 2.0.1 19 Mar 2021

    Nothing published for this version

  5. 2.0.0-nullsafety.1 23 Feb 2021 pre-release

    Nothing published for this version

  6. 1.0.14 20 Nov 2020
    Release notes
    • Added camelCase flag in "fromString" function to properly handle conversion back of a string with spaces to enum
    Open source →
  7. 1.0.14-nullsafety.1 21 Feb 2021 pre-release

    Nothing published for this version

  8. 1.0.14-nullsafety.0 16 Feb 2021 pre-release

    Nothing published for this version

  9. 1.0.13 24 Sep 2020
    Release notes
    • 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.
    Open source →
  10. 1.0.12 23 Sep 2020
    Release notes
    • 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
    Open source →
  11. 1.0.11 14 Sep 2020
    Release notes
    • Fixing major mistake, renaming new function to convertToString so as not to conflict with system calls
    Open source →
  12. 1.0.10 14 Sep 2020
    Release notes

    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
    Open source →
  13. 1.0.9 22 Feb 2020
    Release notes
    • Added .toList function (Thanks @CodeGrue)
    Open source →
  14. 1.0.8 02 Nov 2019
    Release notes
    • Better type handling in fromString method (Thanks @Sergey-Schirmer)
    Open source →
  15. 1.0.7 30 May 2019
    Release notes
    • Improving examples
    Open source →
  16. 1.0.7+1 20 Oct 2019
    Release notes
    • Improving code robustness (Thanks @ewertonrp)
    Open source →
  17. 1.0.6 30 May 2019
    Release notes
    • Added support for getting an enum from a string
    Open source →
  18. 1.0.4 29 May 2019
    Release notes
    • Better handling of null types
    Open source →
  19. 1.0.3 26 May 2019
    Release notes
    • Adding explicit types
    Open source →
  20. 1.0.2 24 May 2019
    Release notes
    • Improving my dart score
    Open source →
  21. 1.0.1 24 May 2019
    Release notes
    • Initial library release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive