init static method

Future<bool> init(
  1. BuildContext context, {
  2. String? dir,
})

Initialize the App's Assets Manager.

Implementation

static Future<bool> init(BuildContext context, {String? dir}) {
  if (_assets == null) {
    _assets = DefaultAssetBundle.of(context);
    _dir = dir ?? 'assets';
  }
  return Future.value(true);
}