簡體   English   中英

MissingPluginException(MissingPluginException(未找到方法 camera#animate on channel plugins.flutter.io/google_maps_53)的實現)

[英]MissingPluginException (MissingPluginException(No implementation found for method camera#animate on channel plugins.flutter.io/google_maps_53))

我最近在我的 flutter 應用程序中安裝了谷歌地圖,但我一直收到此錯誤,

MissingPluginException(MissingPluginException(未找到方法 camera#animate on channel plugins.flutter.io/google_maps_53)的實現)

this happens on every map controller i call on, even oncreated method gives me the same problem, i first tried flutter clean and flutter pub get after but no avail, now i dont know

這是我的主要 dart 文件,我在其中創建 map

GoogleMap(
   mapToolbarEnabled: false,
   mapType: MapType.normal,
   initialCameraPosition: CameraPosition(target:appState.initialPosition, zoom: 15.0),
   markers: appState.markers,
   onCameraMove: appState.onCameraMove,
   polylines: appState.polyLines,
   myLocationEnabled: true,
   zoomControlsEnabled: false,
   onMapCreated: appState.onCreated,compassEnabled: false,
   myLocationButtonEnabled: false,   
),

這是我單獨的 appstate.dart 文件

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:toladriver/requests/google_maps_requests.dart';


class AppState with ChangeNotifier {
  static LatLng _initialPosition;
  LatLng _lastPosition = _initialPosition;
  bool locationServiceActive = true;
  final Set<Marker> _markers = {};
  final Set<Polyline> _polyLines = {};
  GoogleMapController _mapController;
  GoogleMapsServices _googleMapsServices = GoogleMapsServices();
  TextEditingController locationController = TextEditingController();
  TextEditingController destinationController = TextEditingController();
  LatLng get initialPosition => _initialPosition;
  LatLng get lastPosition => _lastPosition;
  GoogleMapsServices get googleMapsServices => _googleMapsServices;
  GoogleMapController get mapController => _mapController;
  Set<Marker> get markers => _markers;
  Set<Polyline> get polyLines => _polyLines;

  AppState() {
    _getUserLocation();
    _loadingInitialPosition();
  }
// ! TO GET THE USERS LOCATION
  void _getUserLocation() async {
    print("GET USER METHOD RUNNING =========");
    Position position = await Geolocator()
        .getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
    List<Placemark> placemark = await Geolocator()
        .placemarkFromCoordinates(position.latitude, position.longitude);
    _initialPosition = LatLng(position.latitude, position.longitude);
    print("the latitude is: ${position.longitude} and th longitude is: ${position.longitude} ");
    print("initial position is : ${_initialPosition.toString()}");
    locationController.text = placemark[0].name;
    notifyListeners();
  }

  // ! TO CREATE ROUTE
  void createRoute(String encondedPoly) {
    _polyLines.add(Polyline(
        polylineId: PolylineId(_lastPosition.toString()),
        width: 5,
        points: _convertToLatLng(_decodePoly(encondedPoly)),
        color: Colors.blueGrey));
    notifyListeners();
  }

  // ! ADD A MARKER ON THE MAO
  void _addMarker(LatLng location, String address) {
    _markers.add(Marker(
        markerId: MarkerId(_lastPosition.toString()),
        position: location,
        infoWindow: InfoWindow(title: address, snippet: "go here"),
        icon: BitmapDescriptor.defaultMarker));
    notifyListeners();
  }

  // ! CREATE LAGLNG LIST
  List<LatLng> _convertToLatLng(List points) {
    List<LatLng> result = <LatLng>[];
    for (int i = 0; i < points.length; i++) {
      if (i % 2 != 0) {
        result.add(LatLng(points[i - 1], points[i]));
      }
    }
    return result;
  }

  // !DECODE POLY
  List _decodePoly(String poly) {
    var list = poly.codeUnits;
    var lList = new List();
    int index = 0;
    int len = poly.length;
    int c = 0;
// repeating until all attributes are decoded
    do {
      var shift = 0;
      int result = 0;

      // for decoding value of one attribute
      do {
        c = list[index] - 63;
        result |= (c & 0x1F) << (shift * 5);
        index++;
        shift++;
      } while (c >= 32);
      /* if value is negetive then bitwise not the value */
      if (result & 1 == 1) {
        result = ~result;
      }
      var result1 = (result >> 1) * 0.00001;
      lList.add(result1);
    } while (index < len);

/*adding to previous value as done in encoding */
    for (var i = 2; i < lList.length; i++) lList[i] += lList[i - 2];

    print(lList.toString());

    return lList;
  }

  // ! SEND REQUEST
  void sendRequest(String intendedLocation) async {

   if(intendedLocation != null){

    List<Placemark> placemark =
        await Geolocator().placemarkFromAddress(intendedLocation);
    double latitude = placemark[0].position.latitude;
    double longitude = placemark[0].position.longitude;
    LatLng destination = LatLng(latitude, longitude);
    _addMarker(destination, intendedLocation);
    String route = await _googleMapsServices.getRouteCoordinates(
        _initialPosition, destination);
    createRoute(route);
    notifyListeners(); }
  }

  // ! ON CAMERA MOVE
  void onCameraMove(CameraPosition position) {
    _lastPosition = position.target;
    notifyListeners();
  }

  // ! ON CREATE
  void onCreated(GoogleMapController controller) {
    _mapController = controller;
              mapController.setMapStyle('[ { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "color": "#7c93a3" }, { "lightness": "-10" } ] }, { "featureType": "administrative.country", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "administrative.country", "elementType": "geometry.stroke", "stylers": [ { "color": "#a0a4a5" } ] }, { "featureType": "administrative.province", "elementType": "geometry.stroke", "stylers": [ { "color": "#62838e" } ] }, { "featureType": "landscape", "elementType": "geometry.fill", "stylers": [ { "color": "#dde3e3" } ] }, { "featureType": "landscape.man_made", "elementType": "geometry.stroke", "stylers": [ { "color": "#3f4a51" }, { "weight": "0.30" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi.attraction", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "poi.business", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.government", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "poi.place_of_worship", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.school", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.sports_complex", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": "-100" }, { "visibility": "on" } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#bbcacf" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "lightness": "0" }, { "color": "#bbcacf" }, { "weight": "0.50" } ] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "labels.text", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry.stroke", "stylers": [ { "color": "#a9b4b8" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "invert_lightness": true }, { "saturation": "-7" }, { "lightness": "3" }, { "gamma": "1.80" }, { "weight": "0.01" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "color": "#a3c7df" } ] } ]');

    notifyListeners();
  }


// FLOATING BUTTON TO LOCATION
 void toUserLocation(){

_mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );

      }

      void centerMap(String intendedLocation) async {


  List<Placemark> placemark =
        await Geolocator().placemarkFromAddress(intendedLocation);
    double latitude = placemark[0].position.latitude;
    double longitude = placemark[0].position.longitude;
    LatLng goToDestination = LatLng(latitude, longitude);   


_mapController.animateCamera(
      CameraUpdate.newLatLngBounds(
          LatLngBounds(
                southwest: LatLng(
                    _initialPosition.latitude <= goToDestination.latitude
                        ? _initialPosition.latitude
                        : goToDestination.latitude,
                    _initialPosition.longitude <= goToDestination.longitude
                        ? _initialPosition.longitude
                        : goToDestination.longitude),
                northeast: LatLng(
                    _initialPosition.latitude <= goToDestination.latitude
                        ? goToDestination.latitude
                        : _initialPosition.latitude,
                    _initialPosition.longitude <= goToDestination.longitude
                        ? goToDestination.longitude
                        : _initialPosition.longitude)),10.0),
    );

      }

void clearMap(){

_polyLines.clear();

_markers.clear();
 _mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );_mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );

}


//  LOADING INITIAL POSITION
  void _loadingInitialPosition()async{
    await Future.delayed(Duration(seconds: 5)).then((v) {
      if(_initialPosition == null){
        locationServiceActive = false;
        notifyListeners();
      }
    });
  }
}

這是我的 pubspec.yaml 文件

name: toladriver
description: A new Flutter project.

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  geolocator: 5.3.2+2
  provider: 4.1.3
  http: 0.12.1
  flutter_google_places: 0.2.5
  geocoder: 0.2.1
  fluttertoast : 4.0.1
  flutter_spinkit: "^2.1.0"
  slide_countdown_clock: 1.0.3

  google_maps_flutter: 0.5.28+1 
  google_maps_webservice: 0.0.17  

  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true      
  fonts:
    - family: Clan-Medium
      fonts:
        - asset: fonts/clan-book-webfont.ttf
        - asset: fonts/clan-med-webfont.ttf
          

在您的項目終端上運行以下命令:

1 - 停止應用程序

2 - flutter 清潔

3 - flutter 酒吧得到

4 - flutter 運行

您需要添加以下依賴項:

dependencies:
  google_maps_flutter: ^0.5.28+1

https://pub.dev/packages/google_maps_flutter#-installing-tab-

確認您的 Google 地圖 API 密鑰是否有效。 驗證密鑰時會引發該錯誤。

只需更新依賴項

google_maps_flutter: ^2.1.2

我最近在我的 flutter 應用程序中安裝了谷歌地圖,但我一直收到此錯誤,

MissingPluginException(MissingPluginException(未找到方法 camera#animate on channel plugins.flutter.io/google_maps_53)的實現)

this happens on every map controller i call on, even oncreated method gives me the same problem, i first tried flutter clean and flutter pub get after but no avail, now i dont know

這是我的主要 dart 文件,我在其中創建 map

 GoogleMap(
 

mapToolbarEnabled: false,
mapType: MapType.normal,
initialCameraPosition: CameraPosition(
              target:appState.initialPosition, zoom: 15.0),markers: appState.markers,
          onCameraMove: appState.onCameraMove,
          polylines: appState.polyLines,
          myLocationEnabled: true,
                

zoomControlsEnabled: false,
onMapCreated: appState.onCreated,compassEnabled: false,
myLocationButtonEnabled: false,


          
  ),

這是我單獨的 appstate.dart 文件

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:toladriver/requests/google_maps_requests.dart';


class AppState with ChangeNotifier {
  static LatLng _initialPosition;
  LatLng _lastPosition = _initialPosition;
  bool locationServiceActive = true;
  final Set<Marker> _markers = {};
  final Set<Polyline> _polyLines = {};
  GoogleMapController _mapController;
  GoogleMapsServices _googleMapsServices = GoogleMapsServices();
  TextEditingController locationController = TextEditingController();
  TextEditingController destinationController = TextEditingController();
  LatLng get initialPosition => _initialPosition;
  LatLng get lastPosition => _lastPosition;
  GoogleMapsServices get googleMapsServices => _googleMapsServices;
  GoogleMapController get mapController => _mapController;
  Set<Marker> get markers => _markers;
  Set<Polyline> get polyLines => _polyLines;

  AppState() {
    _getUserLocation();
    _loadingInitialPosition();
  }
// ! TO GET THE USERS LOCATION
  void _getUserLocation() async {
    print("GET USER METHOD RUNNING =========");
    Position position = await Geolocator()
        .getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
    List<Placemark> placemark = await Geolocator()
        .placemarkFromCoordinates(position.latitude, position.longitude);
    _initialPosition = LatLng(position.latitude, position.longitude);
    print("the latitude is: ${position.longitude} and th longitude is: ${position.longitude} ");
    print("initial position is : ${_initialPosition.toString()}");
    locationController.text = placemark[0].name;
    notifyListeners();
  }

  // ! TO CREATE ROUTE
  void createRoute(String encondedPoly) {
    _polyLines.add(Polyline(
        polylineId: PolylineId(_lastPosition.toString()),
        width: 5,
        points: _convertToLatLng(_decodePoly(encondedPoly)),
        color: Colors.blueGrey));
    notifyListeners();
  }

  // ! ADD A MARKER ON THE MAO
  void _addMarker(LatLng location, String address) {
    _markers.add(Marker(
        markerId: MarkerId(_lastPosition.toString()),
        position: location,
        infoWindow: InfoWindow(title: address, snippet: "go here"),
        icon: BitmapDescriptor.defaultMarker));
    notifyListeners();
  }

  // ! CREATE LAGLNG LIST
  List<LatLng> _convertToLatLng(List points) {
    List<LatLng> result = <LatLng>[];
    for (int i = 0; i < points.length; i++) {
      if (i % 2 != 0) {
        result.add(LatLng(points[i - 1], points[i]));
      }
    }
    return result;
  }

  // !DECODE POLY
  List _decodePoly(String poly) {
    var list = poly.codeUnits;
    var lList = new List();
    int index = 0;
    int len = poly.length;
    int c = 0;
// repeating until all attributes are decoded
    do {
      var shift = 0;
      int result = 0;

      // for decoding value of one attribute
      do {
        c = list[index] - 63;
        result |= (c & 0x1F) << (shift * 5);
        index++;
        shift++;
      } while (c >= 32);
      /* if value is negetive then bitwise not the value */
      if (result & 1 == 1) {
        result = ~result;
      }
      var result1 = (result >> 1) * 0.00001;
      lList.add(result1);
    } while (index < len);

/*adding to previous value as done in encoding */
    for (var i = 2; i < lList.length; i++) lList[i] += lList[i - 2];

    print(lList.toString());

    return lList;
  }

  // ! SEND REQUEST
  void sendRequest(String intendedLocation) async {

   if(intendedLocation != null){

    List<Placemark> placemark =
        await Geolocator().placemarkFromAddress(intendedLocation);
    double latitude = placemark[0].position.latitude;
    double longitude = placemark[0].position.longitude;
    LatLng destination = LatLng(latitude, longitude);
    _addMarker(destination, intendedLocation);
    String route = await _googleMapsServices.getRouteCoordinates(
        _initialPosition, destination);
    createRoute(route);
    notifyListeners(); }
  }

  // ! ON CAMERA MOVE
  void onCameraMove(CameraPosition position) {
    _lastPosition = position.target;
    notifyListeners();
  }

  // ! ON CREATE
  void onCreated(GoogleMapController controller) {
    _mapController = controller;
              mapController.setMapStyle('[ { "featureType": "all", "elementType": "labels.text.fill", "stylers": [ { "color": "#7c93a3" }, { "lightness": "-10" } ] }, { "featureType": "administrative.country", "elementType": "geometry", "stylers": [ { "visibility": "on" } ] }, { "featureType": "administrative.country", "elementType": "geometry.stroke", "stylers": [ { "color": "#a0a4a5" } ] }, { "featureType": "administrative.province", "elementType": "geometry.stroke", "stylers": [ { "color": "#62838e" } ] }, { "featureType": "landscape", "elementType": "geometry.fill", "stylers": [ { "color": "#dde3e3" } ] }, { "featureType": "landscape.man_made", "elementType": "geometry.stroke", "stylers": [ { "color": "#3f4a51" }, { "weight": "0.30" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "poi.attraction", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "poi.business", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.government", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "all", "stylers": [ { "visibility": "on" } ] }, { "featureType": "poi.place_of_worship", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.school", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.sports_complex", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": "-100" }, { "visibility": "on" } ] }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [ { "color": "#bbcacf" } ] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [ { "lightness": "0" }, { "color": "#bbcacf" }, { "weight": "0.50" } ] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway", "elementType": "labels.text", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry.fill", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry.stroke", "stylers": [ { "color": "#a9b4b8" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "invert_lightness": true }, { "saturation": "-7" }, { "lightness": "3" }, { "gamma": "1.80" }, { "weight": "0.01" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "color": "#a3c7df" } ] } ]');

    notifyListeners();
  }


// FLOATING BUTTON TO LOCATION
 void toUserLocation(){

_mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );

      }

      void centerMap(String intendedLocation) async {


  List<Placemark> placemark =
        await Geolocator().placemarkFromAddress(intendedLocation);
    double latitude = placemark[0].position.latitude;
    double longitude = placemark[0].position.longitude;
    LatLng goToDestination = LatLng(latitude, longitude);   


_mapController.animateCamera(
      CameraUpdate.newLatLngBounds(
          LatLngBounds(
                southwest: LatLng(
                    _initialPosition.latitude <= goToDestination.latitude
                        ? _initialPosition.latitude
                        : goToDestination.latitude,
                    _initialPosition.longitude <= goToDestination.longitude
                        ? _initialPosition.longitude
                        : goToDestination.longitude),
                northeast: LatLng(
                    _initialPosition.latitude <= goToDestination.latitude
                        ? goToDestination.latitude
                        : _initialPosition.latitude,
                    _initialPosition.longitude <= goToDestination.longitude
                        ? goToDestination.longitude
                        : _initialPosition.longitude)),10.0),
    );





      }

void clearMap(){

_polyLines.clear();

_markers.clear();
 _mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );_mapController.animateCamera(
      CameraUpdate.newCameraPosition(
        CameraPosition(
            target: initialPosition, zoom: 15.0),
      ),
    );




}


//  LOADING INITIAL POSITION
  void _loadingInitialPosition()async{
    await Future.delayed(Duration(seconds: 5)).then((v) {
      if(_initialPosition == null){
        locationServiceActive = false;
        notifyListeners();
      }
    });
  }
}

這是我的 pubspec.yaml 文件

name: toladriver
description: A new Flutter project.


# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  geolocator: 5.3.2+2
  provider: 4.1.3
  http: 0.12.1
  flutter_google_places: 0.2.5
  geocoder: 0.2.1
  fluttertoast : 4.0.1
  flutter_spinkit: "^2.1.0"
  slide_countdown_clock: 1.0.3
  #firebase_database: ^3.1.1
  #cloud_firestore:


 
       
  
 

  google_maps_flutter: 0.5.28+1 
  google_maps_webservice: 0.0.17  

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
  

    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
  
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For deails regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler 
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
  
  fonts:
    - family: Clan-Medium
      fonts:
        - asset: fonts/clan-book-webfont.ttf
        - asset: fonts/clan-med-webfont.ttf
          

您可以停止並重新運行該應用程序,它將解決問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 FLUTTER 未處理的異常:MissingPluginException(在通道插件上找不到方法 map#waitForMap 的實現。flutter.io/google_maps_0) MissingPluginException(未在通道插件上找到方法 init 的實現。flutter.io/google_sign_in) MissingPluginException(MissingPluginException(在通道 plugins.flutter.io/firebase_core 上找不到方法 Firebase#initializeCore 的實現) 發布到 Google Play 商店后,MissingPluginException(未在頻道插件上找到方法 init 的實現。flutter.io/google_sign_in) MissingPluginException(在 Android 上找不到方法 Firebase#initializeCore 在通道插件上的實現。flutter.io/firebase_core) 未處理的異常:MissingPluginException(在通道插件上找不到方法 X 的實現。flutter.io/Y) MissingPluginException(在通道 plugins.flutter.io/path_provider 上找不到方法 getApplicationDocumentsDirectory 的實現) 缺少插件異常(在通道插件上找不到方法 firebase#initializecore 的實現。flutter.io/firebase_core) 未處理的異常:MissingPluginException(在頻道 plugins.flutter.io/google_mobile_ads 上找不到方法 _init 的實現)in_app_purchase Flutter Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker) 錯誤
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM