AngeloAvv / flutter_flavorizr

A flutter utility to easily create flavors in your flutter application
https://pub.dev/packages/flutter_flavorizr
MIT License
468 stars 85 forks source link

Only for Android issue [The following fields were missing: [flavors]. Read the docs for further details] #271

Closed jk-hub closed 4 months ago

jk-hub commented 4 months ago

Error: The following fields were missing: [flavors]. Read the docs for further details

Here is the Code for the yaml file

` flavorizr: ide: "vscode" app: android: flavorDimensions: "flavor-type" ios:

flavors: development: app: name: "Bharti Dev"

  android:
    applicationId: "com.dev.example.app"
    icon: "assets/png/app_logo.png"
  ios:
    bundleId: ""

staging:
  app:
    name: "Bharti Qa"

  android:
    applicationId: "com.staging.example.app"
    icon: "assets/png/app_logo.png"
  ios:
    bundleId: ""

production:
  app:
    name: "Bharti"

  android:
    applicationId: "com.example.app"
    icon: "assets/png/app_logo.png"
  ios:
    bundleId: ""
instructions:
  - android:androidManifest
  - android:buildGradle
  - android:dummyAssets
  - android:icons
  - flutter:flavors
  - flutter:app
  - flutter:targets

`

AngeloAvv commented 4 months ago

Can you please fix your flavor format? I strongly believe you indented it the wrong way and that's why you get that error

jk-hub commented 4 months ago

This is the format from were i have copied from

Screenshot 2024-06-27 at 12 15 46 PM
jk-hub commented 4 months ago

Now I'm getting this error

Building package executable... Built flutter_flavorizr:flutter_flavorizr. type 'YamlList' is not a subtype of type 'Map<dynamic, dynamic>' in type cast

jk-hub commented 4 months ago

I got my fix by removed this below instructions and by fix my flavor format

instructions: