2023-12-30 21:23:42 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
abstract class BaseProvider<T, DTO> with ChangeNotifier {
|
|
|
|
late Future<T> data;
|
2024-02-11 22:05:39 +00:00
|
|
|
DTO? dto;
|
2023-12-30 21:23:42 +00:00
|
|
|
|
|
|
|
loadFuture(context, {DTO? dto});
|
|
|
|
|
2024-02-11 22:05:39 +00:00
|
|
|
refresh(context) {
|
|
|
|
loadFuture(context, dto: this.dto);
|
2023-12-30 21:23:42 +00:00
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|