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):
Checklist:
[x] Coding Standards: I have reviewed my code to ensure it follows the project's coding standards.
[x] Testing: I have tested the changes and they work as expected. The PortraitNormalHome widget now correctly accesses localized strings without encountering runtime assertion errors.
[x] Merge Conflicts: I have resolved any merge conflicts with the latest main/development branch.
[x] Branch Status: The branch is up-to-date with the target branch (main/development).
📝 Summary
This PR for issue #1043
This PR fixes the issue encountered in the
PortraitNormalHome
widget where accessing localized strings usingS.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 throughS.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):
Checklist:
PortraitNormalHome
widget now correctly accesses localized strings without encountering runtime assertion errors.