TiledJsonReader constructor

TiledJsonReader(
  1. String pathFile
)

Implementation

TiledJsonReader(this.pathFile) {
  _fileName = pathFile.split('/').last;
  if (!(_fileName?.contains('.json') == true ||
      _fileName?.contains('.tmj') == true)) {
    throw Exception('only supports json files');
  }
  _basePathFile = pathFile.replaceAll(_fileName ?? '', '');
}