pubspec.yaml
获取此错误错误...第39行,第10列:此处不允许使用映射值。你早些想念冒号吗?
name: myvoapp
description: A new Flutter application.
publish_to:
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
flutter_login: ^1.0.14
record_mp3: ^2.0.0
permission_handler: ^5.0.1+1
path_provider: ^1.6.11
audioplayer: ^0.8.1
stop_watch_timer: ^0.5.0
firebase_core: ^0.4.5
firebase_auth: ^0.16.1
cloud_firestore: ^0.13.7
modal_progress_hud: ^0.1.3
animated_text_kit: ^2.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/icon1.png
我检查了空格,但无法解决问题
答案 0 :(得分:1)
修复后,您的assets
缩进是错误的:
使用以下内容:
name: myvoapp
description: A new Flutter application.
publish_to:
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
flutter_login: ^1.0.14
record_mp3: ^2.0.0
permission_handler: ^5.0.1+1
path_provider: ^1.6.11
audioplayer: ^0.8.1
stop_watch_timer: ^0.5.0
firebase_core: ^0.4.5
firebase_auth: ^0.16.1
cloud_firestore: ^0.13.7
modal_progress_hud: ^0.1.3
animated_text_kit: ^2.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
# assets indentation was wrong
assets:
- images/icon1.png