NineSliceSprite constructor

NineSliceSprite(SpriteTexture texture, Size size, EdgeInsets insets)

Creates a new NineSliceSprite from the privided texture, size, and texture insets.

Implementation

NineSliceSprite(SpriteTexture texture, Size size, EdgeInsets insets) : super(size) {
  assert(texture != null && !texture.rotated);
  assert(size != null);
  assert(insets != null);
  pivot = const Offset(0.5, 0.5);
  this.texture = texture;
  this.insets = insets;
}