create method

  1. @override
RectangleDrawable create(
  1. Offset position, [
  2. Paint? paint
])
override

Creates and returns a RectangleDrawable of zero size and the passed position and paint.

Implementation

@override
RectangleDrawable create(Offset position, [Paint? paint]) {
  final borderRadius = this.borderRadius;
  if (borderRadius != null) {
    return RectangleDrawable(
        size: Size.zero,
        position: position,
        borderRadius: borderRadius,
        paint: paint);
  }
  return RectangleDrawable(size: Size.zero, position: position, paint: paint);
}