Skip to content

Switch statement for enum should create all the cases #2969

@dark-chocolate

Description

@dark-chocolate

Steps to Reproduce

enum Phone {
  samsung,
  google,
}

Phone phone = Phone.samsung;

void method() {
 switch(phone) {
   
 }
}

When you hover over to the switch(phone), it will tell you to implement all the cases for Phone enum, now there should be a way/shortcut that will let IDE to create all the cases in 1 click.

Screenshot

screenshot 2018-12-17 at 10 18 22 pm

Version info

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14 18A389, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[✓] Connected device (1 available)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions