RxModel<T> constructor

RxModel<T>({
  1. required Future<T> source(),
  2. required T defaultValue,
  3. bool autoStart = true,
})

Implementation

RxModel({
  required this.source,
  required T defaultValue,
  bool autoStart = true,
}) : super(defaultValue) {
  if (autoStart) {
    fetch();
  }
}