Skip to content

[web] Card shadow not rendering on flutter_web when using ContinuousRectangleBorder or BeveledRectangleBorder #66334

@PhillDubois

Description

@PhillDubois

Describe the bug
Using this exact code on both web and mobile results in different rendered output. On mobile, the card has a shadow, on web not.

Working on web (1):

Card(
  elevation: 10,
  child: Container(
    color: Colors.green,
    height: 100,
    width: 100,
  ),
)

NOT Working on web (2):

Card(
  elevation: 10,
  shape: ContinuousRectangleBorder(),
  child: Container(
    color: Colors.green,
    height: 100,
    width: 100,
  ),
)

Working on web (3):

Card(
  elevation: 10,
  shape: const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(Radius.circular(0.0)),
  ),
  child: Container(
    color: Colors.green,
    height: 100,
    width: 100,
  ),
)

NOT Working on web (4):

Card(
  elevation: 10,
  shape: const BeveledRectangleBorder(
    borderRadius: BorderRadius.only(
      bottomRight: Radius.elliptical(15, 15),
      topRight: Radius.elliptical(15, 15),
    ),
  ),
  child: Container(
    color: Colors.green,
    height: 100,
    width: 100,
  ),
)

Steps to Reproduce

Use the widgets above and run on mobile, or web.

Expected results:
They should have shadows rendered.

Actual results:
(1) - Has shadow
image
(2) - Has no shadow
image
(3) - Has shadow
image
(4) - Has no shadow
image

Flutter Doctor
image

Metadata

Metadata

Assignees

Labels

assigned for triageissue is assigned to a domain expert for further triagec: renderingUI glitches reported at the engine/skia or impeller rendering levelf: material designflutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions