Prop<T> constructor

Prop<T>({
  1. required PropStatus status,
  2. T? data,
  3. dynamic error,
  4. dynamic allowNull = true,
})

Implementation

Prop({required this.status, this.data, this.error, allowNull = true})
    : assert(
          (allowNull
              ? true
              : (data != null && error == null) ||
                  (data == null && error != null)),
          "Both data and error can't be true at the same time");