Closed jramesh91 closed 4 years ago
You can specify a prefix for an import - import ... as ...
, for ex.:
import 'package:maps_toolkit/maps_toolkit.dart' as mp;
import 'package:google_maps/google_maps.dart';
import 'package:test/test.dart';
void main() {
// LatLng from maps toolkit
final pointToolkit = mp.LatLng(90, 0);
// LatLng from google maps
final pointGoogle = LatLng(90, 0);
// functions and classes from maps toolkit
mp.SphericalUtil.computeAngleBetween(pointToolkit , pointToolkit );
}
Can't use import 'package:google_maps_flutter/google_maps_flutter.dart'; & import 'package:maps_toolkit/maps_toolkit.dart'; in the same dart file. The existing LatLng class is throwing error.