saropa_dart_utils 0.x release notes

Every saropa_dart_utils 0.x release, newest first. Tap a version to see its changes.

0.5.12

We switched to the saropa_lints package and custom_lint, and trimmed the analysis config from 255 lines to 69. You get the same level of checking with less to maintain.

0.5.11

We added utilities for Base64 compression, UUID validation and formatting, HTML unescape and plain text, and double formatting (percentages, precision, clamping). All of it is covered by 103 new tests.

Added

  • Base64Utils - Text compression and decompression (compressText, decompressText)
  • UuidUtils - UUID validation and manipulation (isUUID, addHyphens, removeHyphens)
  • HtmlUtils - HTML text processing (unescape, removeHtmlTags, toPlainText)
  • DoubleExtensions - Double formatting (hasDecimals, toPercentage, formatDouble, forceBetween, toPrecision, formatPrecision)
0.5.10

We extended the publish script with version and branch parameters, dry-run validation, and checks for working tree and remote sync. Releases are safer and easier to script from CI.

0.5.9

We added an allowEmpty option to JSON validation and made string methods (substring, truncate, lastChars) use grapheme clusters so emoji and Unicode behave correctly. Note: indices are now grapheme-based—a breaking change if you relied on code-unit positions.

Added

  • isJson: allowEmpty parameter to optionally treat {} as valid JSON

Changed

  • substringSafe: Now uses characters.getRange() for proper UTF-16/emoji support
  • truncateWithEllipsis: Uses grapheme cluster length for accurate emoji handling
  • truncateWithEllipsisPreserveWords: Uses grapheme cluster length
  • lastChars: Uses grapheme cluster length
  • Breaking: Indices now refer to grapheme clusters, not code units

Fixed

  • MakeListExtensions: Changed extension from T to T? for nullable types

Removed

  • UniqueListExtensionsUniqueBy: Removed unused propertyComparer generic parameter
0.5.8

We made the publish script handle git tags and GitHub releases idempotently. You can re-run it after a partial run without it failing.

0.5.7

We fixed string extraction (curly braces, line breaks), made word removal Unicode-aware, and improved the grammar and article rules. Text handling should be more accurate now.

Fixed

  • extractCurlyBraces: Switched to non-greedy matching for correct extraction order
  • removeSingleCharacterWords: Made Unicode-aware for single-letter words beyond ASCII
  • replaceLineBreaks: Improved deduplication for arbitrary replacement strings
  • grammarArticle: Enhanced heuristics for silent 'h', "you"-sound words, and one- prefixes
  • possess: Trims input before applying trailing 's' rules
0.5.6

We added URL/URI extensions so you can check HTTPS, add or get query parameters, and replace the host. Handy when building or validating links.

Added

  • UrlExtensions.isSecure - Check if URI uses HTTPS scheme
  • UrlExtensions.addQueryParameter - Add or update query parameters
  • UrlExtensions.hasQueryParameter - Check if query parameter exists
  • UrlExtensions.getQueryParameter - Get query parameter value
  • UrlExtensions.replaceHost - Create URI with different host
0.5.5

A big release: JSON and map utilities, URL extensions, string extraction and search, date constants, and many new DateTime and string helpers. We added tests too—over 2,850 in total.

Added

  • JsonUtils - JSON parsing, type conversion, and validation
  • MapExtensions - Map manipulation utilities
  • UrlExtensions - URI manipulation (removeQuery, fileName, isValidUrl, isValidHttpUrl, tryParse)
  • StringBetweenExtensions - Content extraction (between, betweenLast, removeBetween, etc.)
  • StringCharacterExtensions - Character operations (splitByCharacterCount, charAtOrNull)
  • StringSearchExtensions - Search utilities (containsAnyIgnoreCase, indexOfAll, lastIndexOfPattern)
  • MonthUtils, WeekdayUtils, SerialDateUtils - Date constant lookups
  • DateTime extensions: mostRecentSunday, mostRecentWeekday, dayOfYear, weekOfYear, numOfWeeks, weekNumber, toSerialString, toSerialStringDay
  • String extensions: removeSingleCharacterWords, removeLeadingAndTrailing, firstWord, secondWord, endsWithAny, endsWithPunctuation, isAny, extractCurlyBraces, obscureText, hasInvalidUnicode, isVowel, hasAnyDigits
  • Iterable/Num extensions: randomElement, containsAll, toDoubleOrNull, toIntOrNull
  • DateTimeUtils.isValidDateParts - Comprehensive date part validation
  • convertDaysToYearsAndMonths - includeRemainingDays option
0.5.4

We fixed range and date logic (inclusive boundaries, year boundaries), list comparison, hex overflow, and string truncation. Added 110 tests so the fixes stay solid.

Fixed

  • isBetweenRange: Properly forwards inclusive parameter
  • isAnnualDateInRange: Correctly handles date ranges spanning year boundaries
  • isNthDayOfMonthInRange: Cross-year range validation
  • inRange and isNowInRange: Default to inclusive boundary semantics
  • equalsIgnoringOrder: Correctly compares duplicate counts
  • hexToInt: Case-sensitive overflow check
  • toUpperLatinOnly: O(n²) → O(n) using StringBuffer
  • upperCaseLettersOnly: O(n²) → O(n) using StringBuffer
  • truncateWithEllipsisPreserveWords: Returns truncated content when first word exceeds cutoff
  • containsIgnoreCase: Empty string is contained in any string
  • convertDaysToYearsAndMonths: Improved precision using average days
0.5.3

We tuned regex usage in string utils and improved the docs for the random and list helpers. A small polish release.

Changed

  • Enhanced string_utils.dart to optimize final regex usages
0.5.2

We renamed the string extension type to StringExtensions for consistency. Behavior is unchanged; only the type name is different.

Changed

  • Renamed StringFormattingAndWrappingExtensions to StringExtensions
0.5.1

We merged all string extension methods into one file and added a full test suite. Imports and structure are simpler.

0.5.0

We added extensions for numbers (e.g. clamping), lists (order-agnostic comparison), and strings (safer number parsing), and refactored names and tests for consistency.

Added

  • Extension methods for numbers, lists, and strings (forceBetween, order-agnostic list comparison, safer string number parsing)

Changed

  • Refactored extension names for consistency
0.4.4

We split the string code into smaller files and added unique-list and number-range utilities. The layout is clearer and you get a few new helpers.

Added

  • Unique lists and number ranges utilities
0.4.3

We added framework-style extensions for primitives (num, string, etc.), set line length to 100, and removed the VGV spelling lists.

Added

  • Framework extensions for primitives (num, string, etc.)
0.4.2

A small maintenance release: minor improvements and fixes.

0.4.1

Another small maintenance release: minor improvements and fixes.

0.4.0

We did a major refactor of the library structure and APIs to set things up for the extensions and utilities that followed.

0.3.18

We added DateTime and DateTimeRange utilities and brought in jiffy/intl for date formatting. Date handling works well out of the box now.

Added

  • DateTimeRange utils
  • DateTime utils
  • Dependency to jiffy and intl for date processing
0.3.17

A small maintenance release: minor improvements.

0.3.16

Another small maintenance release: minor improvements.

0.3.15

Another small maintenance release: minor improvements.

0.3.13

We added a script to detect unused Flutter code and updated the Code of Conduct (logo, examples, survey). We also renamed the doc folder to docs and removed Codecov.

0.2.3

We added CommonRandom for reproducible randomness, a Code of Conduct for contributors, and development helper scripts. The project is easier to work on and expectations are clearer.

Added

  • CommonRandom class as drop-in replacement for math.Random()
0.2.1

We moved the list extensions onto Iterable so they work with any iterable, not just lists. The API is more flexible.

Changed

  • Migrated List extensions to Iterable
0.2.0

We added enum helpers (byNameTry, sortedEnumValues) and list extensions (smallest, biggest, most/least occurrences), and bumped the SDK and collections dependency.

Added

  • Enum methods: byNameTry and sortedEnumValues
  • List extensions for smallest, biggest, most, and least occurrences

Changed

  • Bumped SDK requirements (sdk: ">=3.4.3 <4.0.0", flutter: ">=3.24.0")
  • Added collections package dependency
0.1.0

We renamed nullable string utils to extensions and deprecated a few functions we plan to remove. Cleanup to make the API clearer.

Deprecated

  • Several functions in preparation for removal
0.0.11

We added date constants and ordinal/GCD/countDigits helpers, fixed removeStart when the search is empty, and removed the deprecated string-nullable functions.

Added

  • DateConstants.unixEpochDate
  • DateConstantExtensions.isUnixEpochDate
  • DateConstantExtensions.isUnixEpochDateTime
  • IntStringExtensions.ordinal
  • StringUtils.getNthLatinLetterLower
  • StringUtils.getNthLatinLetterUpper
  • IntUtils.findGreatestCommonDenominator
  • IntExtensions.countDigits

Fixed

  • StringExtensions.removeStart returns input when search param is empty

Removed

  • Deprecated functions in StringNullableExtensions
0.0.10

We made removeStart accept a nullable search parameter so it’s easier to use in nullable contexts.

Changed

  • removeStart parameter changed to nullable
0.0.9

We added an optional trimFirst parameter to removeStart so you can trim the result. A small string API improvement.

Added

  • trimFirst parameter to StringExtensions.removeStart
0.0.8

We added an optional trimFirst parameter to nullIfEmpty so you have finer control over empty and whitespace handling.

Added

  • trimFirst parameter to StringExtensions.nullIfEmpty
0.0.7

We renamed the strings folder to singular and deprecated the nullable string extensions. Naming and API cleanup.

Deprecated

  • Nullable string extensions
0.0.6

We added swipe gesture properties for use in gesture-aware UIs. The groundwork for swipe handling.

Added

  • Swipe gesture properties
0.0.5

We documented all methods, added example app usage and README examples, and extended the string extensions. The library should be easier to discover and use.

Added

  • String extension methods
0.0.4

We added an example app, GitHub Actions, and contribution templates (PR, issue, contributing guide). The project is ready for others to contribute.

Added

  • Example App
0.0.3

We added a random enum selection helper for when you need a random value from an enum.

Added

  • Random enum method
0.0.2

We added string-to-bool conversion methods so you can parse "true"/"false" and similar strings safely.

Added

  • String to bool conversion methods
0.0.1

First release. We included bool list methods to get started.

Added

  • Initial release with bool list methods


      Made by Saropa. All rights reserved.

Source: the saropa_dart_utils changelog on GitHub.

From the makers of Saropa Contacts

A private contacts manager with offline emergency info, free on Android and iPhone.