From 035b92d9b87e9d8eee5841943a06caa8998312b4 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 7 Aug 2024 00:12:44 +0800 Subject: [PATCH] :rewind: Rollback sized container --- lib/widgets/sized_container.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/widgets/sized_container.dart b/lib/widgets/sized_container.dart index a51e52a..dfc1859 100644 --- a/lib/widgets/sized_container.dart +++ b/lib/widgets/sized_container.dart @@ -16,9 +16,8 @@ class SizedContainer extends StatelessWidget { Widget build(BuildContext context) { return Align( alignment: Alignment.centerLeft, - child: LimitedBox( - maxWidth: maxWidth, - maxHeight: maxHeight, + child: Container( + constraints: BoxConstraints(maxWidth: maxWidth, maxHeight: maxHeight), child: child, ), ); @@ -38,8 +37,8 @@ class CenteredContainer extends StatelessWidget { @override Widget build(BuildContext context) { return Center( - child: LimitedBox( - maxWidth: maxWidth, + child: Container( + constraints: BoxConstraints(maxWidth: maxWidth), child: child, ), );