Hello,
When the user selects the whole number and tries the delete it by pressing delete button, it fails and returns NaN instead of something like zero.
delete_issue.mp4
Minimal code example:
import 'package:flutter/material.dart' ;
import 'package:flutter_multi_formatter/flutter_multi_formatter.dart' ;
void main () => runApp (const MyApp ());
class MyApp extends StatefulWidget {
const MyApp ({super .key});
@override
State <MyApp > createState () => _MyAppState ();
}
class _MyAppState extends State <MyApp > {
String enteredValue = '' ;
@override
Widget build (BuildContext context) {
return MaterialApp (
home: Scaffold (
body: Padding (
padding: const EdgeInsets .all (32 ),
child: Center (
child: Column (
mainAxisSize: MainAxisSize .min,
children: [
TextFormField (
autofocus: true ,
textAlign: TextAlign .center,
inputFormatters: [
CurrencyInputFormatter (
onValueChange: (value) {
setState (() {
enteredValue = value.toStringAsFixed (2 );
});
},
),
],
),
const SizedBox (height: 16 ),
Text ('Entered Value: $enteredValue ' ),
],
),
),
),
),
);
}
}
Hello,
When the user selects the whole number and tries the delete it by pressing delete button, it fails and returns
NaNinstead of something like zero.delete_issue.mp4
Minimal code example: