Skip to content

File Filters & Prefixes

Birju Vachhani edited this page Jul 30, 2020 · 1 revision

Categorizing by File Extension

By default, Spider allows any file to be referenced in the dart code. but you can change that behavior. You can specify which files you want to be referenced.

path: assets
class_name: Assets
package: res
types: [ jpg, png, jpeg, webp, bmp, gif ]

Use Prefix

You can use prefixes for names of the generated dart references. Prefixes will be attached to the formatted reference names.

path: assets
class_name: Assets
package: res
prefix: ic
Output
class Assets {
  static const String icCamera = 'assets/camera.png';
  static const String icLocation = 'assets/location.png';
}
Clone this wiki locally