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:
parent
f88837232b
commit
ab0b7cb6b9
21 changed files with 31 additions and 31 deletions
|
|
@ -227,7 +227,7 @@ class ChatListViewBody extends StatelessWidget {
|
|||
.contains(
|
||||
controller.searchController.text.toLowerCase(),
|
||||
)) {
|
||||
return Container();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return ChatListItem(
|
||||
rooms[i],
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ class ChatListItem extends StatelessWidget {
|
|||
fontSize: 13,
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class ClientChooserButton extends StatelessWidget {
|
|||
index,
|
||||
context,
|
||||
),
|
||||
child: Container(),
|
||||
child: const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
KeyBoardShortcuts(
|
||||
|
|
@ -199,7 +199,7 @@ class ClientChooserButton extends StatelessWidget {
|
|||
},
|
||||
helpLabel: L10n.of(context)!.nextAccount,
|
||||
onKeysPressed: () => _nextAccount(matrix, context),
|
||||
child: Container(),
|
||||
child: const SizedBox.shrink(),
|
||||
),
|
||||
KeyBoardShortcuts(
|
||||
keysToPress: {
|
||||
|
|
@ -209,7 +209,7 @@ class ClientChooserButton extends StatelessWidget {
|
|||
},
|
||||
helpLabel: L10n.of(context)!.previousAccount,
|
||||
onKeysPressed: () => _previousAccount(matrix, context),
|
||||
child: Container(),
|
||||
child: const SizedBox.shrink(),
|
||||
),
|
||||
PopupMenuButton<Object>(
|
||||
onSelected: (o) => _clientSelected(o, context),
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class StoriesHeader extends StatelessWidget {
|
|||
final displayname = creator.calcDisplayname();
|
||||
final avatarUrl = creator.avatarUrl;
|
||||
if (!displayname.toLowerCase().contains(filter.toLowerCase())) {
|
||||
return Container();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return _StoryButton(
|
||||
profile: Profile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue