我是个新手,我正试图在我的项目中使用flutter_tts,但酒吧的get并不能解决这个问题。我已经在其他应用程序中使用了这个API,但是我不能再在那里使用它了。其他软件包也很好,就像flutter_tts和firebase_auth一样。任何帮助都将不胜感激。
pubspec:
name: aa
description: aa
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.1
this image is proof of my error. $ flutter device
1 connected device:
GM1901 • bf9d2d80 • android-arm64 • Android 9 (API 28)
$ flutter run
Unable to locate a development device; please run 'flutter doctor' for information about installing additional components. 这个错误不断出现,但当我运行flutter doct
Code表示根据控制台指出的行出现错误的代码行
错误显示在三个部分中。第一个:
新的FlickrPhotoList.fromJson (package:flutter_app_new_flutter/flickerPhotoList.dart:22:26)
import 'package:flutter_app_new_flutter/model.dart';
class FlickrPhotoList {
int page;
int pages;
int perpage;
int total;
List<FlickrPhoto> phot
我有一个附加了拦截器的Dio客户端,但当我尝试添加一些头文件时,它们不会出现在日志中。他的代码是我的
Dio dio(KeyStore keyStore) {
final Dio dio = Dio(BaseOptions(
contentType: 'application/json',
connectTimeout: 5000,
sendTimeout: 5000,
));
final Dio tokenDio = Dio();
tokenDio.interceptors.add(LogIntercept
调用API时出现错误,无法解析bean类中的数据。
我的API服务代码是:
// Get all Hotels list from the API url
Future<List<Hotel>> getHotels() async {
final response = await http.get(Uri.parse(apiUrl));
///// checking the status code is successful
if (response.statusCode == 200) {
// print(respons