Reply<T> constructor
Reply<T> ({
- required Status status,
- T? data,
- dynamic error,
- dynamic allowNull = true,
Implementation
Reply({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");