Skip to content

[Sequence of command cause Null check exception] #358

Closed
@bnjun96

Description

@bnjun96

Before creating a feature request make sure the suggestion fit within our principles

Unhandled exception:
type 'Null' is not a subtype of type 'String' in type cast

#0      new FvmConfig.fromMap (package:fvm/src/models/config_model.dart:41)
#1      new FvmConfig.fromJson (package:fvm/src/models/config_model.dart:31)
#2      ConfigService.read (package:fvm/src/services/config_service.dart:21)
<asynchronous suspension>
#3      ProjectService.getByDirectory (package:fvm/src/services/project_service.dart:18)
<asynchronous suspension>
#4      useVersionWorkflow (package:fvm/src/workflows/use_version.workflow.dart:15)
<asynchronous suspension>
#5      UseCommand.run (package:fvm/src/commands/use_command.dart:86)
<asynchronous suspension>
#6      CommandRunner.runCommand (package:args/command_runner.dart:209)
<asynchronous suspension>
#7      FvmCommandRunner.run (package:fvm/src/runner.dart:72)
<asynchronous suspension>
#8      main (file:///private/tmp/fvm-20211027-54069-11mnwzs/fvm-2.2.3/bin/main.dart:6)
<asynchronous suspension>

Steps to procedure

  1. run fvm use 2.2.0 --flavor dev
  2. run fvm use 1.22.6 --flavor prod

Hope to enhance feature, pre set fvm_config flutterSdkVersion with version.
Example run fvm use 2.2.0 --flavor dev
fvm_config.json will be

{
"flutterSdkVersion": null 1.22.6,
"flavors": {
"dev": "1.22.6"
}
}

Else throw to developer run fvm use first before with flavor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions