Skip to content

Shape is no longer honoured in a Material Widget #20556

@kunit1

Description

@kunit1

Steps to Reproduce

Creating a Material Widget and setting the shape to StadiumBorder() does not result in the expected shape. Instead, the material simply looks like a rectangle. This used to work in the Beta channel but is broken in the Master channel

 Widget floatingBar() => Material(
    shape: StadiumBorder(),
    elevation: 3.0,
    child: Ink(
      decoration: BoxDecoration(
        gradient: LinearGradient(colors: kitGradients)),
      child: FloatingActionButton.extended(
        onPressed: () {},
        backgroundColor: Colors.transparent,
        icon: Icon(
          Icons.done,
          color: Colors.white,
        ),
        label: Text(
          "Continue",
          style: TextStyle(color: Colors.white),
        ),
      ),
    ),
  );

Screenshot of wrong output

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v0.5.9-pre.29, on Microsoft Windows [Version 10.0.17134.165], locale en-CA)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[√] Android Studio (version 3.1)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code, 64-bit edition (version 1.25.1)
[√] Connected devices (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