Skip to content

Adjacent Material Widgets in a Column/Row do not cast a shadow on each other #12206

@zzzev

Description

@zzzev

Internal: b/292548582

Steps to Reproduce

When you create a widget that has a build method like this:

Widget build(BuildContext context) => return new Scaffold(
      appBar: new AppBar(
        title: new Text('Test'),
      ),
      body: new Column(
        children: <Widget>[
          new Material(
            color: Colors.blue.shade500,
            child: new Container(height: 100.0),
            elevation: 20.0,
          ),
          new Material(
            color: Colors.white,
            child: new Container(height: 100.0),
            elevation: 10.0,
          ),
          new Material(
            color: Colors.orange.shade500,
            child: new Container(height: 100.0),
            elevation: 20.0,
          ),
        ],
      ),
    );

You get this result:
screenshot_1506024976

As you can see, only the shadow from the bottom-most, orange Material is rendered. I would expect there to be a shadow rendered over the middle, white Material from both the above and below, as both of those have higher elevation.

For bonus points, I would also expect the shadow over the white Material to be about half as large as the one cast over the scaffold background by the orange Material (because the former is going from elevation 20 to 10, while the latter is going from elevation 20 to 0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: mulligan (g3)engineflutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions