-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjacent Material widgets in Column with equal elevation cast shadows on each other #20591
Comments
I've run into this as well. Any ideas for how to keep them from casting shadows on each other would be great. |
@tobytraylor Using "add reaction" on the initial comment would increase priority. |
Issue still exist Code Sample
flutter doctor -v
|
Would be really nice if this worked. |
Any update here? This issue breaks the fundamental rule of material design. |
Issue replicable on latest master and on latest stable. flutter doctor -v
|
This is still a problem in 2021. I would expect that widgets on the same elevation would not cast shadow on each other. |
no updates on this issue? Also, the shadow is only cast on the LEFT child in all layouts. |
Reproduces on the latest versions of flutter. updated code sampleimport 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Bug Demo',
home: Scaffold(
appBar: AppBar(
title: const Text('Bug Demo'),
),
body: const Center(
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Material(
elevation: 8.0,
child: SizedBox(width: 50.0, height: 50.0),
),
Material(
elevation: 8.0,
child: SizedBox(width: 150.0, height: 150.0),
),
],
),
),
),
);
}
} flutter doctor -v
|
Interestingly opposite to #12206, I would expect two material widgets next to each other to cast shadows below, but not on the other. Instead I get this (code here):
Would also appreciate a workaround. I looked into MergeableMaterial but it didn't seem appropriate since it needs to be unconstrained and I'm using a CustomSingleChildLayout as a PopupRoute (like PopupMenu does).
The text was updated successfully, but these errors were encountered: