treewide: Container -> SizedBox.shrink()

This helps performance without any user-facing changes,
since SizedBox is constant while Container isn't
This commit is contained in:
noob_tea 2023-03-22 20:28:31 +01:00
commit ab0b7cb6b9
21 changed files with 31 additions and 31 deletions

View file

@ -115,7 +115,7 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
},
helpLabel: L10n.of(context)!.chatDetails,
onKeysPressed: _showChatDetails,
child: Container(),
child: const SizedBox.shrink(),
),
KeyBoardShortcuts(
keysToPress: {
@ -124,7 +124,7 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
},
helpLabel: L10n.of(context)!.matrixWidgets,
onKeysPressed: _showWidgets,
child: Container(),
child: const SizedBox.shrink(),
),
PopupMenuButton(
onSelected: (String choice) async {

View file

@ -163,7 +163,7 @@ class _MxcImageState extends State<MxcImage> {
data == null ? CrossFadeState.showFirst : CrossFadeState.showSecond,
firstChild: placeholder(context),
secondChild: data == null || data.isEmpty
? Container()
? const SizedBox.shrink()
: Image.memory(
data,
width: widget.width,