TileLayer constructor

TileLayer({
  1. int? id,
  2. required String name,
  3. String? class_,
  4. int x = 0,
  5. int y = 0,
  6. double offsetX = 0,
  7. double offsetY = 0,
  8. double parallaxX = 1,
  9. double parallaxY = 1,
  10. int? startX,
  11. int? startY,
  12. String? tintColorHex,
  13. Color? tintColor,
  14. double opacity = 1,
  15. bool visible = true,
  16. CustomProperties properties = CustomProperties.empty,
  17. required int width,
  18. required int height,
  19. Compression? compression,
  20. FileEncoding encoding = FileEncoding.csv,
  21. List<Chunk>? chunks,
  22. List<int>? data,
})

Implementation

TileLayer({
  super.id,
  required super.name,
  super.class_,
  super.x,
  super.y,
  super.offsetX,
  super.offsetY,
  super.parallaxX,
  super.parallaxY,
  super.startX,
  super.startY,
  super.tintColorHex,
  super.tintColor,
  super.opacity,
  super.visible,
  super.properties,
  required this.width,
  required this.height,
  this.compression,
  this.encoding = FileEncoding.csv,
  this.chunks,
  this.data,
})  : tileData = maybeGenerate(data, width, height),
      super(
        type: LayerType.tileLayer,
      );