Skip to content

Commit

Permalink
Use "MediaQuery.sizeOf(context)" instead of "MediaQuery.of(context).s…
Browse files Browse the repository at this point in the history
…ize" to query the size attribute because this results in better performance.
  • Loading branch information
KarinBerg committed Jan 19, 2025
1 parent 3caf7d6 commit f81d937
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SocialIncomeContactDialog extends StatelessWidget {
children: [
Image(
image: const AssetImage("assets/team.png"),
width: MediaQuery.of(context).size.width * 0.6,
width: MediaQuery.sizeOf(context).width * 0.6,
),
Text(
localizations.supportTeam,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _PhoneInputPageState extends State<PhoneInputPage> {
children: [
Image(
image: const AssetImage("assets/earth_animation.gif"),
height: MediaQuery.of(context).size.height * 0.3,
height: MediaQuery.sizeOf(context).height * 0.3,
),
const SizedBox(height: 16),
Text(
Expand Down

0 comments on commit f81d937

Please sign in to comment.