providers.dart 551 B

12345678910111213141516171819
  1. import 'package:amap_flutter_base/amap_flutter_base.dart';
  2. import 'package:flutter/foundation.dart';
  3. class MyLocationProvider with ChangeNotifier, DiagnosticableTreeMixin {
  4. LatLng _myLatLng;
  5. LatLng get myLatLng => _myLatLng;
  6. void getLocation(double lat,double lng) {
  7. _myLatLng = LatLng(lat, lng);
  8. notifyListeners();
  9. }
  10. /// Makes `Counter` readable inside the devtools by listing all of its properties
  11. @override
  12. void debugFillProperties(DiagnosticPropertiesBuilder properties) {
  13. super.debugFillProperties(properties);
  14. }
  15. }