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

Null check operator used on a null value exception from date_formatter #23

Open
claptv opened this issue Aug 3, 2022 · 0 comments
Open

Comments

@claptv
Copy link

claptv commented Aug 3, 2022

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'[^/]'), '');

@claptv claptv changed the title Null check operator used on a null value exception from data_formatter Null check operator used on a null value exception from date_formatter Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant