SliverRowSize constructor

const SliverRowSize({
  1. double? percent,
  2. double? size,
})

Creates an instance of SliverRowSize with the given size parameters.

Implementation

const SliverRowSize({
  this.percent,
  this.size,
})  : assert(
        // If 'percent' is provided, it must be between 0 and 1.
        percent == null || (percent > 0 && percent < 1),
        'percent must be greater than 0 and less than 1 if it is provided.',
      ),
      assert(
        // Ensure that both 'percent' and 'size' are not provided
        // simultaneously.
        !(percent != null && size != null),
        'You cannot provide both percent and size at the same time.',
      );