long1eu / long1eu/flutter_i18n

Not sure how to widget test

Open
#116 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
248
Forks
51
PR merge metrics
No merged PRs in 30d

Description

I had originally used the basic Flutter internationalization strategy and even managed to widget test it using @remonh87 workaround (https://medium.com/flutterpub/testing-localized-widget-in-flutter-3bfa5492bc84)

But, like most people, this was just too much boilerplate and this plugin makes life much better. However, now my widget tests don't work and I am not sure how to implement a solution like @remonh87, since the underlying class is now autogenerated (which is why this is such a great tool to begin with!)

I was wondering if anyone else has been able to get widget testing using the localized strings working before I looked into doing a PR.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the plugin's autogenerated localization class is used during Flutter widget tests, alongside the workaround linked in the issue. Reproduce the failure with localized strings and determine whether a working testing approach can be implemented or documented; done means widget tests can access the generated localized strings.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
localization, mobile-dev, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.