Use more specific MediaQuery methods to reduce unnecessary rebuilds (#467)

This commit is contained in:
Hamidreza Bayat
2026-07-10 06:41:00 +03:30
committed by GitHub
parent fe72286273
commit e97ecf38c5
15 changed files with 23 additions and 24 deletions
+2 -2
View File
@@ -421,7 +421,7 @@ class _CollectionHeaderSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final screenWidth = MediaQuery.of(context).size.width;
final screenWidth = MediaQuery.sizeOf(context).width;
final coverSize = (screenWidth * 0.5).clamp(150.0, 210.0).toDouble();
return Padding(
@@ -542,7 +542,7 @@ class ArtistScreenSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final screenWidth = MediaQuery.of(context).size.width;
final screenWidth = MediaQuery.sizeOf(context).width;
return ShimmerLoading(
child: SingleChildScrollView(
physics: const NeverScrollableScrollPhysics(),
+1 -1
View File
@@ -75,7 +75,7 @@ class _BatchConvertSheetState extends State<BatchConvertSheet> {
return Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
bottom: MediaQuery.viewInsetsOf(context).bottom,
),
child: DraggableScrollableSheet(
initialChildSize: 0.85,
@@ -68,7 +68,7 @@ class _TrackOptionsSheet extends ConsumerWidget {
return SafeArea(
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.82,
maxHeight: MediaQuery.sizeOf(context).height * 0.82,
),
child: SingleChildScrollView(
child: Column(