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(); } }