test_assets 0.0.2 copy "test_assets: ^0.0.2" to clipboard
test_assets: ^0.0.2 copied to clipboard

Access your assets folder from your Widget tests

test_assets #

A small package that will help you to access your assets/ folder during testing.
Code was originally copied from the original Github Issue.

How to use? #

Future<void> _pumpTag(final WidgetTester tester) async {
    await tester.runAsync(() => DiskAssetBundle.loadGlob(['fonts/**.ttf'])); //relative to your /assets folder
    return tester.pumpWidget(
      YourWidgetUnderTest()
    );
  }
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Access your assets folder from your Widget tests

Homepage
Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

flutter, glob

More

Packages that depend on test_assets