Area constructor

Area({
  1. double? size,
  2. double? flex,
  3. double? min,
  4. double? max,
  5. dynamic id,
  6. dynamic data,
  7. AreaWidgetBuilder? builder,
})

Implementation

Area(
    {double? size,
    double? flex,
    double? min,
    double? max,
    dynamic id,
    this.data,
    this.builder})
    : this.id = id != null ? id : AreaId._() {
  if (size != null && flex != null) {
    throw ArgumentError('Cannot provide both a size and a flex.');
  }
  if (size == null && flex == null) {
    flex = 1;
  }
  _setMinWithoutNotify(min);
  _setMaxWithoutNotify(max);
  _setFlexWithoutNotify(value: flex, useMin: true, useMax: true);
  _setSizeWithoutNotify(value: size, useMin: true, useMax: true);
}