Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null

Viewed 1305

Need help.

[ERROR]
material_localizations.dart:413:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null. Try calling using ?. instead.

).replaceFirst(r'$selectedRowCount', formatDecimal(selectedRowCount));
  ^^^^^^^^^^^^

material_localizations.dart:550:7: Error: Method 'replaceFirst' cannot be called on 'String?' because it is potentially null.
Try calling using ?. instead.

    ).replaceFirst(r'$licenseCount', formatDecimal(licenseCount));
      ^^^^^^^^^^^^

=========================================================================

Flutter doctor > No Issues

=========================================================================

1 Answers

I found another solution on Stackoverflow, was to downgrade flutter, i was on dev channel but it not worked from command. after redownload it manually it works like charme.

[ILLUSTRATION]

flutter channel stable flutter upgrade

Not worked, so :

flutter channel stable Next download the zip manually and unzip it again.

Worked for me.

Related