• Latest
  • Hot
  • Ask
  • Full Apps
  • Ui
  • Game
Ask April 11,2020

A dependency specification must be a string or a mapping

Error on line 32, column 5 of pubspec.yaml: A dependency specification must be a string or a mapping. ╷

32 │ ┌     - assets/
33 │ └ 
   ╵

pub get failed (65; ╵)

enter image description here


Solution 1: live-love

The problem is I had the assets folder in the wrong location. It should not be under dependencies.

In addition, you must add 2 spaces before "assets", as shown in the picture:

enter image description here


Twitter Facebook Reddit Hacker News LinkedIn Email

Most Viewed

Netflix UI Clone Build with Flutter and BloC

GitJournal - Markdown Notes Build with Fluter

How to debug multiple widgets used the same GlobalKey

Sign in up takes so long time to load from firebase

Featured Articles

Catagories

  • Ask63292
  • Full Apps40
  • Ui5
  • Game2
  • Packages2
  • Template0
  • firebase
  • flutter
  • google-cloud-firestore
  • firebase-realtime-database
  • rxdart
  • dart
  • flutter-dependencies
  • android
  • visual-studio-code
  • radio-button
  • radio-group
  • radiobuttonlist
  • crashlytics
  • androidx
  • websocket
  • signalr
  • flutter-layout
  • flutter-web
  • mobile
  • usergroups
  • android-manifest
  • manifest
  • flutter-android
  • amazon-web-services
  • amazon-cognito
  • state
  • ios
  • swift
  • flutter-plugin
  • form-data
  • flutter-animation
  • floating-action-button
  • revenuecat
  • gesture
  • firebase-dynamic-links
  • firebase-authentication
  • google-signin
  • list
  • mobile-development
  • openssl
  • facebook-login
  • sha1
  • validation
  • web
  • containers
  • shapes
  • php
  • mysql
  • json
  • dart-pub
  • android-app-bundle
  • exception
  • flutter-futurebuilder
  • Privacy Policy
  • Submit Project
© Copyright © All rights reserved
Licensed under cc by-sa 3.0 with attribution required.

Catagories

  • Ask
  • Full Apps
  • Ui
  • Game

Join our Newsletter