localizely/intl_utils

Problem building l10n.dart since 2.5.0: Error: 'text' isn't a type.

Closed this issue · 2 comments

In the l10n.dart file generated by versions 2.5.0 and 2.5.1, all the parameter types are changed from Object to text, and flutter then complains that this isn't a type. For example:

modules/............./lib/generated/l10n.dart:6215:24: Error: 'text' isn't a type.
  String s.......title(text count, text unit, text date) {
                       ^^^^

Hi @JeroenvdV,

Could you check if you are using the text type for some placeholders in your arb files?
You should use some of Dart types (e.g., String, Object, int, double, num, DateTime).

@lzoran Thanks once again for your lightning-fast response. There were placeholders with "type": "text" and changing them to one of the Dart types resolved the problem. Everything builds now using 2.5.1, so all my problems are resolved for the day :)