setPath static method

String? setPath(
  1. String key
)

Determine the appropriate path for the asset.

Implementation

static String? setPath(String key) {
  /// In case 'assets' begins the key or if '/' begins the key.
  final path = key.indexOf(_dir!) == 0
      ? ''
      : key.substring(0, 0) == '/'
          ? _dir
          : '$_dir/';
  return path;
}