LaCoro/ConsumerFlutterApp

Settings page

Opened this issue · 29 comments

Add a setting page with the following options. Please note you just have to add the options not the actual functionality for each one.

  1. Dark mode (toggle/switch)
  2. Notifications (toggle/switch)
  3. Contributors
  4. About OpenSource Contribution

i would like to make PR in this please assign me.

Ok @code-netizen all yours!

@diegoalvis I am pretty completed up with setting page code but not able to run app as production.env is not in assets.Please tell a way for production.env to start the app on android studio.

@code-netizen please create a development.env file. You can find the instructions in README.md about how to get back4app credentials and how to set up then dot.env file

I have already created development.env but there is one more file needed in assets production.env what to do with that

@code-netizen you can comment/remove that line and modify the EnvironmentConfiguration
To use the same file for both variants

class EnvironmentConfiguration {
  static Future run() async {
    const bool isProduction = bool.fromEnvironment('dart.vm.product');
    final envFileName = isProduction ? "production.env" : "development.env";
    ...

replace this
final envFileName = isProduction ? "production.env" : "development.env";

for this
final envFileName = "development.env";

I've updated the repo with that change if you prefer you can update yours as well.

@diegoalvis i have made changes as you said but now in some file due to production.env there is error as in android/app/src/main/androidmanifest.xml there is some problem. Due to app not starting i an not able to see appearance and working of app.

And i have made setting page class so if you want i will make PR of that code so that you can apply in your code base as import.

@diegoalvis see into this so that i can run the app and add setting page in it.

@code-netizen apologize you have gone through this. Missing google maps api key was added to develop branch. Let me know if you can run the app after this

@diegoalvis I am having some problem with androidmanifest in android/app/src/main of which I have send you a screenshot above in which .mainactivity and other are having error(red coloured).

@code-netizen error is related to missing google maps key, take a look at the build.gradle app level.
The reason is that the manifest is expecting a value for that, you can added whatever string since we're not using maps currently

@diegoalvis facing above problem
i think target sdk version is not latest
and its saying error in line 17 GradleException gradle.build

@diegoalvis still not able to run app even I have made some changes to resolve error but it didn't solved the issue.

@code-netizen will update the SDK but still doesn’t seem like that is the error
@llanox could you clone the project and try to run it in your end and confirm if you got these issues?

@diegoalvis @llanox the app has been installed but showing only white screen

see console message

@code-netizen issue seems to be related to null safety call at my_address_page.dart class line 83
child: cityList?.isNotEmpty != true

I've added a null check before it would be fix the problem (branch develop), let me know if it works since I cannot reproduce the issue.
I also suggest to clean up the project and run flutter upgrade command due null safety call was changed in the latest version of flutter sdk

No again the app is installed with some warnings in log and showing only blank screen. I have made all above changes stated by you.

@code-netizen can you share your .env file?

Once the keys have been added rename this file for development.env

API Settings (LA_CORO PUBLIC DB) https://www.back4app.com/database/admin7/lacoro

BASE_URL=https://parseapi.back4app.com
PARSE_APPLICATION_ID=CV76bmzooUdKrAPaGxVSxJvVH5SXaWOFYli5MEvQ
PARSE_CLIENT_ID=3xgekfc1ClhcvTfa3YN8f4BYwcoQwEOZUfnehtOa
PARSE_MASTER_KEY=Z2gBx8y0nPYKAHKkwFNQCv9o4d72zFXCHBKbzftd

@code-netizen develop branch running on Mac OS 10.15.4 (Catalina)
with the following development.env file


# API Settings (LA_CORO PUBLIC DB) https://www.back4app.com/database/admin7/lacoro
BASE_URL=https://parseapi.back4app.com
PARSE_APPLICATION_ID=CV76bmzooUdKrAPaGxVSxJvVH5SXaWOFYli5MEvQ
PARSE_CLIENT_ID=3xgekfc1ClhcvTfa3YN8f4BYwcoQwEOZUfnehtOa
PARSE_MASTER_KEY=Z2gBx8y0nPYKAHKkwFNQCv9o4d72zFXCHBKbzftd

#PUBNUB KEYS (not mandatory)
PUBNUB_SUBSCRIBE_KEY=<pubnub_subscribe_key>
PUBNUB_PUBLISH_KEY=<pubnub_publish_key>

It might be a OS related issue. What OS are you using?

@llanox did you have the chance to run the app on Windows?

@diegoalvis i am using windows

I opened an issue for this #75

Hey guys!!
@diegoalvis @code-netizen
Finally, I managed to get a laptop with windows. I didn't see any problem building the project and deploying it with your credentials. Please, double-check you are using one of the following cities with data: "Villavicencio" or "Ibague". Those are the only cities with stores in the demo database. Let me know if you can see the list of stores when you change the city.

@diegoalvis We need to add empty states to our roadmap

Thanks,

demo

I am interested to make pull request please add me.

Hey @shathurshan I've assigned the issue to you as we didn’t get any update from @code-netizen

hii - please assign this issue to me - I am interested to contribute on this