Avoid allocation of large canvases on the web (#1557)

pull/1560/head
Mouad Debbar 2 years ago committed by GitHub
parent 6fbc6fef7a
commit 4f059e686e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -252,11 +252,13 @@ class ColorGroup extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Card(
return RepaintBoundary(
child: Card(
clipBehavior: Clip.antiAlias,
child: Column(
children: children,
),
),
);
}
}

@ -1910,7 +1910,8 @@ class ComponentDecoration extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
return RepaintBoundary(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10.0),
child: Column(
children: [
@ -1927,7 +1928,8 @@ class ComponentDecoration extends StatelessWidget {
],
),
ConstrainedBox(
constraints: const BoxConstraints.tightFor(width: widthConstraint),
constraints:
const BoxConstraints.tightFor(width: widthConstraint),
child: Card(
elevation: 0,
shape: RoundedRectangleBorder(
@ -1944,6 +1946,7 @@ class ComponentDecoration extends StatelessWidget {
),
],
),
),
);
}
}

Loading…
Cancel
Save