mawaqit / android-tv-app

Prayer times App for Android TV
https://mawaqit.net
Other
34 stars 15 forks source link

fix: Localization Access in PortraitNormalHome produces Assertion Error #1044

Closed YassinNouh21 closed 4 months ago

YassinNouh21 commented 4 months ago

📝 Summary

This PR for issue #1043

This PR fixes the issue encountered in the PortraitNormalHome widget where accessing localized strings using S.current was causing runtime assertion errors due to the localization delegate not being initialized at the time of access.

Description

This PR fixes the PortraitNormalHome widget to access localized strings through S.of(context), ensuring the localization delegate is properly initialized before use. This change addresses the runtime assertion error and aligns with Flutter's recommended practices for localization.

Tests

🧪 Use case 1

💬 Description: The primary use case tested is the initialization and display of the PortraitNormalHome widget

📷 Screenshots or GIFs (if applicable):

2024-02-24 02-41-47

Checklist: