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