Saransh-cpp / BookRentApp-Chapter3

An app where you can rent some books!
12 stars 27 forks source link

deprecation of current flutter version #106

Open Pranav108 opened 2 years ago

Pranav108 commented 2 years ago

Description

I have upgraded my flutter version for my android studio few days ago now when I'm trying to run the code of this app then I'm getting a warning which suggest me to migrate the project to it's updated flutter version.

Relevant files

MainActivity.java/kt android/app/src/main/AndroidManifest.xml Drawable styles.xml

Screenshot

screenshot

References

more_info

Pranav108 commented 2 years ago

I never worked with migration of any app, but I would love to give it a try. @Saransh-cpp Can I take it?

Saransh-cpp commented 2 years ago

Yes, go ahead!

Saransh-cpp commented 2 years ago

I might turn this into bonus if it requires too much work.

Pranav108 commented 2 years ago

Do I have to remove this error only or have to migrate whole app(like migration for null safety)? Because after a single change in AndroidManifest.xml and updating the sdk version removed this warning and code is running well. Means what are the changes you are expecting from this issue?

Saransh-cpp commented 2 years ago

Do I have to remove this error only or have to migrate whole app(like migration for null safety)?

This would be good for the long run. But if you want to get rid of the warning for now you can do so (would be an easy issue in that case).

Pranav108 commented 2 years ago

Do I have to remove this error only or have to migrate whole app(like migration for null safety)?

This would be good for the long run. But if you want to get rid of the warning for now you can do so (would be an easy issue in that case).

Okay , I have done only minute changes and the warning gone now. These are the only change I found from this resource.

Saransh-cpp commented 2 years ago

Re-opening this for complete migration

rajoriaakash commented 2 years ago

Hi, Can I take this?

rajoriaakash commented 2 years ago

To migrate the app completely I must upgrade all dependencies into their null safety versions. There is one dependency, carousel_pro that doesn't have a null-safety version. Should I replace it with some other carousel dependency that ensures null safety? And it would help a lot if the mentors could tell me which files am I supposed to look at, for changing the carousel code? Thanks:)

letsintegreat commented 2 years ago

@rajoriaakash Yes, there are two dependencies that will cause problems with null safety. carousel_pro can be replaced with another dependency, while you will have to remove firebase_admob dependency completely, and also the code relevant to it.

I have also dealt with this issue in my PR, but it is yet to be reviewed. But fortunately, I created a separate commit while dealing with these two dependencies, so you can basically copy all the changes from this commit: https://github.com/Saransh-cpp/BookRentApp-Chapter3/pull/114/commits/7bf747b825986e3db9db4cd405980d924c2f042b

Additionally, there's this feature on Android Studio, where you can search for code across the entire project. The shortcut key is: Ctrl + Shift + F So, you could just search for carousel_pro and it would show you all the relevant files. (Please ignore the files in node_modules.) But now you don't need to do that either, as you can basically copy my commit!

rajoriaakash commented 2 years ago

Oh okay! Thanks for the detailed explanation :D I will try my best :)

rajoriaakash commented 2 years ago

I did all the migration and stuff but now when I try to run the app. The following error is encountered : image I am not sure how this error appeared 😔 Here is my commit fe1d94333abaa626fa028ca078ebdc500631096a

rajoriaakash commented 2 years ago

All the migration changes have already been updated in the master branch by some other commit probably :). This issue should be closed now