flutter_pattern_formatter
flutter_pattern_formatter copied to clipboard
Null check operator used on a null value exception from date_formatter
An exception is thrown if the date value is set through WidgetTest.
testWidgets(
'Test Case: test date validator.',
(WidgetTester tester) async {
await app.main();
await tester.pumpAndSettle();
// Set a date to a text field.
await tester.enterText(find.byKey(ValueKey<String>('key')), '01/01/2002');
// tap Submit button here
});
Null check operator used on a null value When the exception was thrown, this was the stack: #0 DateInputFormatter.formatEditUpdate (package:pattern_formatter/date_formatter.dart:82:32) ... ...
date_formatter.dart:82:32 final splashes = resultText!.replaceAll(RegExp(r'[^/]'), '');