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

type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'String' #24

Closed
Xgamefactory opened this issue Sep 2, 2019 · 3 comments

Comments

@Xgamefactory
Copy link

getting this error

AppLocalizations.of(context).tr("offers.total", args: ["$response"])

lang json content
"offers": {
        "total": {
            "zero": "No offers",
            "one": "Total {} offer",
            "other": "Total {} offers"
        }
    }
@pal
Copy link

pal commented Oct 9, 2020

How was this resolved? I get the same with the following:

tr('chart_legend_current_period', namedArgs: {'period': 'Period.DAY'}

"chart_legend_previous_period": {
    "Period.DAY": "Last week",
    "Period.WEEK": "Week before",
    "Period.MONTH": "Month before"
  },

@AhmedAbouelkher
Copy link

Same problem, even when not using any translation args at all.

@DarkMikey
Copy link

DarkMikey commented Apr 12, 2021

Please reopen: I'm getting this error inside a SearchDelegate. It does work everywhere else. Surprisingly it still works when passed to the parent constructor.

I'm so sorry. It was of course a plural which i wanted to translate with .tr(). Although the error message makes sense now, I think it could do a better job of leading the developer to the solution. What do you think?

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

5 participants