DiscoverModule/lib/contacts_module/provider_class/location_provider.dart

23 lines
662 B
Dart
Raw Permalink Normal View History

2024-10-07 12:41:28 +00:00
import 'package:discover_module/contacts_module/service.dart/service.dart';
import 'package:discover_module/contacts_module/storage_hive/loc_data/crud_loc.dart';
2024-08-30 12:24:54 +00:00
import 'package:flutter/cupertino.dart';
class LocationProvider extends ChangeNotifier {
final apicall = Callapi();
List loclist = [];
List get locationlist => loclist;
locationinfo(text) async {
print("Location_Text");
final publication_result = await apicall.getlocationsdata(text);
loclist = publication_result;
notifyListeners();
}
2024-10-07 12:41:28 +00:00
storeLoc(row) async {
final publicationResult = await apicall.getlocationsdata(row);
await addLoc(publicationResult);
}
2024-08-30 12:24:54 +00:00
}