timrijckaert / test_assets

Access your assets folder from your Widget tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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()
    );
  }

About

Access your assets folder from your Widget tests

License:BSD 2-Clause "Simplified" License


Languages

Language:Dart 100.0%