// SPDX-License-Identifier: Apache-2.0 import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:latlong2/latlong.dart'; import 'kuksa/class.dart'; final currlnglatProvider = StateNotifierProvider( (ref)=> currentLngLat(), ); class currentLngLat extends StateNotifier{ currentLngLat() : super( LatLng(31.706964,76.933138), ); Future update(value) async{ state = value; } } final destinationlnglatProvider = StateNotifierProvider( (ref)=> distiLngLat(), ); class distiLngLat extends StateNotifier{ distiLngLat() : super( LatLng(0,0), ); Future update(value) async{ state = value; } } final CurrentAdressProvider = StateNotifierProvider( (ref)=> currentAdress(), ); class currentAdress extends StateNotifier{ currentAdress() : super( '' ); Future update(value)async{ state = value; } } final DestinationAdressProvider = StateNotifierProvider( (ref)=> destiAdress(), ); class destiAdress extends StateNotifier{ destiAdress() : super( '' ); Future update(value)async{ state = value; } } final polylineprovider = StateNotifierProvider>((ref) => PolyLine()); class PolyLine extends StateNotifier> { PolyLine() : super([]); void update(List list) { state = list; } } final Infoprovider = StateNotifierProvider((ref) => Info()); class Info extends StateNotifier { Info() : super(initial); static final info initial = info(Duration: 0, Distance: 0, instruction: ''); void update({ num? Duration, num? Distance, String? instruction, }){ state = state.copywith( Duration: Duration, Distance: Distance, instruction: instruction, ); } }