Flutter 谷歌地图颤振软件包的一部分是';我认不出

Flutter 谷歌地图颤振软件包的一部分是';我认不出,flutter,android-studio,google-maps-flutter,Flutter,Android Studio,Google Maps Flutter,我已经成功地在我的项目上安装了google_maps_Flatter 2.0.3,但是当我导入包时,它的许多类都没有被android studio识别。实际上,它只识别GoogleMap和GoogleMapController。我该怎么办?顺便说一句,导入行为灰色表示未使用!! 这是我的pubspec.yaml: dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.0 flutter_vector_icons: ^1.0.0 di

我已经成功地在我的项目上安装了google_maps_Flatter 2.0.3,但是当我导入包时,它的许多类都没有被android studio识别。实际上,它只识别GoogleMap和GoogleMapController。我该怎么办?顺便说一句,导入行为灰色表示未使用!! 这是我的pubspec.yaml:

dependencies:
flutter:
sdk: flutter

cupertino_icons: ^1.0.0
flutter_vector_icons: ^1.0.0
dio: ^4.0.0
provider: ^4.3.1
network_manager: ^0.0.92
flutter_spinkit: ^5.0.0
handy_ui_kit: ^0.0.42
flutter_picker: ^2.0.1
get: ^3.26.0
shared_preferences: ^2.0.5
connectivity: ^3.0.3
device_info: ^2.0.0
package_info: ^2.0.0
flutter_colorpicker: ^0.3.4
path_provider: ^2.0.1
flutter_datetime_picker: ^1.4.0
intl: ^0.17.0
cached_network_image: ^3.0.0
firebase_core: ^1.0.3
firebase_crashlytics: ^2.0.0
url_launcher: ^6.0.3
flutter_multi_formatter: ^1.3.0
flutter_verification_code: ^0.2.1
google_maps_flutter: ^2.0.3
expandable_group: ^0.0.7
sleek_circular_slider: ^1.2.0+web
flutter_circular_slider: ^2.5.0
web_socket_channel: ^1.1.0
audioplayers: ^0.18.3
flutter_date_pickers: ^0.2.0
oktoast: ^2.3.2
animated_widgets: ^1.0.6
flutter_local_notifications: ^5.0.0+1
flutter_native_timezone: ^1.0.4
volume_watcher: ^1.3.1
signalr_client: ^0.1.6
percent_indicator: "^2.1.7+2"
flutter_icomoon_icons: ^1.0.0
path_drawing: ^0.5.0
flutter_google_places: ^0.3.0
uuid: ^3.0.4
flutter_typeahead: ^3.1.1
fl_toast: ^3.0.1
image_picker: any
drag_and_drop_lists: ^0.3.0+1
reorderables: ^0.4.0
image_cropper: ^1.4.0
dotted_border: ^2.0.0
这里有一个使用LatLng的类:

class RestaurantInfo {
String restaurantTitle;
String restaurantLogoURL;
String restaurantPosition;
RestaurantStatus restaurantStatus;
List<LatLng> restrictionArea;

RestaurantInfo(
    {this.restaurantTitle, this.restaurantLogoURL,this.restaurantStatus, 
this.restaurantPosition,this.restrictionArea=const
    []});

RestaurantInfo.fromJson(Map<String, dynamic> json) {
  String area = json['Paths']==null?"[]":json['Paths'].toString().replaceAll("\\", "");

  restaurantTitle = json['RestaurantName']??"";
  restaurantLogoURL = json['RestaurantLogoURL'];
  restaurantPosition = json['RestaurantPosition'];
  restrictionArea = (jsonDecode(area) as List).map((e) => LatLng(e["lat"], e["lng"])).toList();
  restaurantStatus = RestaurantStatus.values.firstWhere((element) => 
  element.key==json['StatusShortKey'],orElse: ()=>RestaurantStatus.Start);
}

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['RestaurantTitle'] = this.restaurantTitle;
  data['RestaurantLogoURL'] = this.restaurantLogoURL;
  data['RestaurantPosition'] = this.restaurantPosition;
  data['RestaurantStatus'] = this.restaurantStatus.key;
  return data;
}
}
class RestaurantInfo{
串餐厅;
字符串restaurantLogoURL;
串餐厅位置;
餐厅状态餐厅状态;
列表限制a;
餐厅(
{this.restaurantTitle,this.restaurantlogour,this.restaurantStatus,
this.restaurantPosition,this.restrictionArea=const
[]});
RestaurantInfo.fromJson(映射json){
字符串区域=json['path']==null?”[]:json['path'].toString().replaceAll(“\\”,”);
restaurantTitle=json['RestaurantName']??“”;
restaurantLogoURL=json['restaurantLogoURL'];
restaurantPosition=json['restaurantPosition'];
限制区A=(jsonDecode(区域)作为列表).map((e)=>LatLng(e[“lat”],e[“lng”]).toList();
restaurantStatus=restaurantStatus.values.firstWhere((元素)=>
element.key==json['StatusShortKey'],orElse:()=>RestaurantStatus.Start);
}
映射到JSON(){
最终地图数据=新地图();
数据['RestaurantTitle']=this.RestaurantTitle;
数据['RestaurantLogoURL']=this.RestaurantLogoURL;
数据['RestaurantPosition']=this.RestaurantPosition;
数据['RestaurantStatus']=this.RestaurantStatus.key;
返回数据;
}
}