Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for issue "Error Range start 5 is out of text of length 1 #136" #149

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [2.12.1]
- Fixed a bug with incorrect decimal point detection when mantissa length is 0
- Fixed https://github.com/caseyryan/flutter_multi_formatter/issues/136 Error Range start 5 is out of text of length 1 #136

## [2.12.0]
- Updated SKD restrictions
- formatAsCardNumber now also tries to format invalid cards
Expand Down
4 changes: 2 additions & 2 deletions lib/formatters/formatter_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ String toCurrencyString(
mantissaSeparator: mSeparator,
mantissaLength: mantissaLength,
);
String? fractionalSeparator = _detectFractionSeparator(value);
// mantissaLength > 0 ? _detectFractionSeparator(value) : null;
String? fractionalSeparator =
mantissaLength > 0 ? _detectFractionSeparator(value) : null;

var sb = StringBuffer();
bool addedMantissaSeparator = false;
Expand Down