Flutter Pub: Expected a key while parsing a block mapping. path:

后端 未结 11 1243
死守一世寂寞
死守一世寂寞 2020-12-24 11:22

I\'m using JSON file and register in Pubspec.ymal but showing error and also when I use an image and register it, the same error also occurs. Maybe there is a f

相关标签:
11条回答
  • 2020-12-24 12:11

    In my case, uses-material-design indentation was broken. I put 1 (one) more space before it, and it worked fine.

    0 讨论(0)
  • 2020-12-24 12:11

    Spaces are very important in .yaml file.

    Just make sure your code is on the same line (vertically) according to key and value.

    Or

    If you are still confused please watch this simple video. It'll help you to solve the issue easily.

    https://imgur.com/gallery/ngoXwUe

    0 讨论(0)
  • 2020-12-24 12:13

    In My Case, the image was too large to load, decreasing dimension of image worked.

    0 讨论(0)
  • 2020-12-24 12:16

    Issue is related with indent spacing, check your spacing, it should work fine
    fonts: - family: CM Sans Serif fonts: - asset: assets/fonts/cm_sans_serif_2012.ttf

    0 讨论(0)
  • 2020-12-24 12:19

    Please make sure that we don't have unwanted whitespace since yaml structure is sensitively considering the white spaces. Please refer the documentation for more info as below link,
    https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html

    0 讨论(0)
提交回复
热议问题