DiscoverModule/lib/provider_class/affiliationsprovider.dart

32 lines
848 B
Dart
Raw Normal View History

2024-07-05 08:48:29 +00:00
import 'package:discover_module/model_class/affiliations.dart';
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class AffiliationsProvider extends ChangeNotifier {
final affapi = Callapi();
List affiliations1 = [];
List allaffiliations1 = [];
List get adddta => affiliations1;
List get affiliationsAll => allaffiliations1;
getAffiliationsdata() async {
print("Affiliations_is: ");
final affdata = await affapi.getaffiliationsdata();
print("Affiliations_is after:$affdata ");
affiliations1 = affdata;
notifyListeners();
}
getAllAffiliationsdata() async {
print("Affiliations_is: ");
final affdata = await affapi.getallaffiliationsdata();
print("Affiliations_is after:$affdata ");
allaffiliations1 = affdata;
notifyListeners();
}
}