TiledAssetReader constructor

TiledAssetReader({
  1. required String asset,
})

Implementation

TiledAssetReader({
  required this.asset,
}) {
  var assetKey = asset.startsWith(_ASSET_KEY_PREFIX)
      ? asset.substring(_ASSET_KEY_PREFIX.length)
      : asset;
  basePath = assetKey.replaceAll(assetKey.split('/').last, '');
  _reader = TiledJsonReader('assets/images/$assetKey');
}