Closed AyaNady17 closed 3 months ago
please let me know your feedback. @chandansgowda
Great job @AyaNady17 Please add a screen recording showing that the app works.
Also, have you upgraded flutter to latest version ?
Great job @AyaNady17 Please add a screen recording showing that the app works.
done @chandansgowda
Also, have you upgraded flutter to latest version ?
until now I'm working on the Flutter 3.16.5 version. should i upgrade to the latest version before merging the changes? @chandansgowda
Question: Instead of using late
keyword can we directly use MediaQuery
to get the screen size?
I did the same thing in other one of my flutter app and it still worked fine. If this is possible we can avoid use of late
keyword.
Question: Instead of using
late
keyword can we directly useMediaQuery
to get the screen size? I did the same thing in other one of my flutter app and it still worked fine. If this is possible we can avoid use oflate
keyword.
if we declared sizes without using the late keyword, we must initialize it with a specific value. Otherwise, we’ll encounter an error. So, I think late keyword is essential for safely accessing context-related properties once they are fully available. if I get it wrong or you have another opinion to enhance it, please let's discuss it more. @bhawesh2002
Great Job @AyaNady17
Also, have you upgraded flutter to latest version ?
until now I'm working on the Flutter 3.16.5 version. should i upgrade to the latest version before merging the changes? @chandansgowda
Let's upgrade before merging this PR.
Great Job @AyaNady17
Also, have you upgraded flutter to latest version ?
until now I'm working on the Flutter 3.16.5 version. should i upgrade to the latest version before merging the changes? @chandansgowda
Let's upgrade before merging this PR.
done, upgraded to the latest stable version with no errors. @chandansgowda
Due to the upgrade one of the packages (text field tags) updated to latest version where one of its attributes have changed and I refactored it to fit with the update so there's some changes in Ui file and pubspec.Yaml but now everything works well with the latest versions.
Thanks for contributing @AyaNady17
Description
This PR addresses the issue where a
Null check operator used on a null value
exception is thrown when trying to accessGet.width
andGet.height
in theUiSizes
class before theBuildContext
is available.The solution involves refactoring the
UiSizes
class to uselate
keyword for the size variables and initializing them in a newinit
method which is called after theBuildContext
is available. 'MediaQuery' is used to get the screen sizes. Fixes #288Changes:
UiSizes
class to uselate
keyword for the size variables.init
method inUiSizes
class to initialize the size variables usingMediaQuery
.UiSizes.init()
in thebuild
method of the main widget.How Has This Been Tested?
Null check operator used on a null value
exception.https://github.com/AOSSIE-Org/Resonate/assets/144162711/57346fcb-7e5e-4e6b-9fd5-ed527b031c0a![Screenshot (182)](https://github.com/AOSSIE-Org/Resonate/assets/144162711/1922b727-584a-470e-a4cb-a20029a52a6b)
Checklist:
Maintainer Checklist