Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Update README with how to setup and run flutter instructions. #25

Closed
3 tasks
mtreacy002 opened this issue Apr 30, 2020 · 36 comments · Fixed by #35
Closed
3 tasks

Update README with how to setup and run flutter instructions. #25

mtreacy002 opened this issue Apr 30, 2020 · 36 comments · Fixed by #35
Assignees
Labels
Category: Documentation/Training Improvements or additions to documentation. First Timers Only Good for newcomers.

Comments

@mtreacy002
Copy link
Member

mtreacy002 commented Apr 30, 2020

Description

As a developer,,
I need to make sure contributors can setup and run flutter on their local machine so they can start contributing to the project,

Mocks

N/A

Acceptance Criteria

  • Update README.md with setup instructions

Definition of Done

  • All of the required items are completed.
  • Approval by 1 mentor.

Estimation

1 hour

@gaurivn
Copy link
Member

gaurivn commented Apr 30, 2020

I would like to work on this issue.

@mtreacy002
Copy link
Member Author

Go ahead, @gaurivn 👍.

@gaurivn
Copy link
Member

gaurivn commented Apr 30, 2020

Thank you @mtreacy002 . I think I need @isabelcosta 's approval and be assigned this issue to work on it.

@techno-disaster
Copy link
Contributor

@mtreacy002 i think this a good "first time only" issue and @gaurivn has contributed earlier too.
Shouldn't we give others a chance? what do you think

@techno-disaster techno-disaster added the Category: Documentation/Training Improvements or additions to documentation. label Apr 30, 2020
@mtreacy002
Copy link
Member Author

mtreacy002 commented Apr 30, 2020

@techno-disaster, Ok... that sounds right. I don't have the triage level to the repo though, can you please add label on this? first-timer issue? sorry @gaurivn, didn't realise it at first. 😂

@techno-disaster techno-disaster added the First Timers Only Good for newcomers. label Apr 30, 2020
@techno-disaster
Copy link
Contributor

done @mtreacy002.

@mtreacy002 mtreacy002 changed the title feat: Update README with how to setup and run flutter instructions. Update README with how to setup and run flutter instructions. Apr 30, 2020
@mtreacy002
Copy link
Member Author

done @mtreacy002.

👍 Thanks, @techno-disaster

@gaurivn
Copy link
Member

gaurivn commented Apr 30, 2020

It's okay @mtreacy002 😂 , I understand.

@mtreacy002
Copy link
Member Author

mtreacy002 commented Apr 30, 2020

Thanks for your understanding, @gaurivn. This issue is open to any "first-timer" who wants to work on it. I'm new to flutter so I want to learn too. 😉

@techno-disaster
Copy link
Contributor

@mtreacy002 do you want to solve this issue? should i assign it to you?

@mtreacy002
Copy link
Member Author

@mtreacy002 do you want to solve this issue? should i assign it to you?

I never use flutter before. I could give it a try. but I'm currently working on another issue on mentorship backend. So, I should pass this to someone else who's available. 😉

@mtreacy002
Copy link
Member Author

And is first-timer related to Flutter only first-timer? If not, then I'm not eligible 😂

@techno-disaster
Copy link
Contributor

I would say this falls under the flutter first timer.But why aren't you eligible? I'm not sure if we have to consider your contributions in other repos as well to see if you qualify for a first timer task.
Can you confirm this @mayburgos
Thank You

@bartekpacia
Copy link
Contributor

bartekpacia commented May 1, 2020

IMHO we're discussing it too much. I'd just assign this issue to the first person who considers themselves a "first-timer", doesn't feel very comfortable with Flutter and wants to work on this :)

@isabelcosta
Copy link
Member

@mtreacy002 has never contributed to this repository, so I totally consider Maya eligible for it. Want to work on this, since you want to learn this? We can assign it to you, since you also detected this problem of lack o documentation.

@techno-disaster thank you for promoting issues for first timers :) I am sure a lot of issues will come up.

@mtreacy002
Copy link
Member Author

Thanks for the clarification, @isabelcosta. I thought @bartekpacia is going to work on this as per his Zulip post. I'm also happy to help if need to, I'm trialling it atm on vscode. I'll wait for @bartekpacia confirmation 1st though. 😉

@isabelcosta
Copy link
Member

Take the time to learn anyways and ask for help, this is assigned to you :)

@bartekpacia
Copy link
Contributor

@mtreacy002 If you want to proceed with this, go on :)

@mtreacy002
Copy link
Member Author

Thanks, @isabelcosta and @bartekpacia for assigning me to the issue. I'm excited to learn more on this. actually I have my 1st question, @bartekpacia and @techno-disaster.

When I installed the flutter on my Android and when tried to register, came across same issue as issue#32 so I decided to clone and run from IDE.

I cloned and tried to run on VSCode IDE with dart and flutter extension installed but still run into an issue. Below is the console log of the error. Can you please advise what might cause this @bartekpacia and @techno-disaster?

Running "flutter pub get" in mentorship-flutter...                 85.5s
Launching lib/main.dart on Android SDK built for x86 in debug mode...

Compiler message:
lib/screens/home/pages/stats/stats_page.dart:47:64: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Downloads/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
                            style: Theme.of(context).textTheme.headline6,
                                                               ^^^^^^^^^
lib/screens/home/pages/stats/stats_page.dart:92:48: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Downloads/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
            style: Theme.of(context).textTheme.headline6.apply(color: Colors.grey[600]),
                                               ^^^^^^^^^
lib/screens/home/pages/stats/stats_page.dart:96:48: Error: The getter 'subtitle2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Downloads/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle2'.
            style: Theme.of(context).textTheme.subtitle2.copyWith(fontWeight: FontWeight.bold),
                                               ^^^^^^^^^
lib/widgets/bold_text.dart:15:44: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../Downloads/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
        style: Theme.of(context).textTheme.bodyText2,
                                           ^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script '/Users/mayatreacy/Downloads/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/mayatreacy/Downloads/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5m 35s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

@mtreacy002
Copy link
Member Author

PS: The Android emulator opened and standby for input when I ran the main.dart. It also came up with warnings below and asked if I want to proceed.

Screen Shot 2020-05-02 at 10 29 52 am

@mtreacy002
Copy link
Member Author

mtreacy002 commented May 2, 2020

I think this is probably like those missing reference R things that normally happens in android studio.

@bartekpacia
Copy link
Contributor

@mtreacy002 what is your output of flutter --version?

@mtreacy002
Copy link
Member Author

@bartekpacia ,

Screen Shot 2020-05-02 at 10 39 51 am

@mtreacy002
Copy link
Member Author

Also, do I need to setup a virtual environment for this just like for mentorship-backend? atm I didn't create or use it for flutter

@bartekpacia
Copy link
Contributor

bartekpacia commented May 2, 2020

No, you don't need to setup any virtual environments like when using Python :)
Regarding the problem: I see that you're on the stable channel of Flutter. On this project we use the beta channel. It is not as stable as stable, but has faster access to the new features. You need to change it by typing:
flutter channel beta

BTW This situation is a great example of how desperately we a need setup guide 👀

@mtreacy002
Copy link
Member Author

Ok. I switched to channel beta as your suggestion. it output red texts all over, is this ok?

Screen Shot 2020-05-02 at 10 55 45 am

Also, the error warnings still there

@mtreacy002
Copy link
Member Author

Before changing to channel beta, I also tried to run on android studio. But before running can see the same errors exist there too.

Screen Shot 2020-05-02 at 10 53 57 am

@mtreacy002
Copy link
Member Author

Yayy.... I got the flutter running on the emulator with beta channel....
thanks heaps, @bartekpacia

Screen Shot 2020-05-02 at 11 02 05 am

@bartekpacia
Copy link
Contributor

bartekpacia commented May 2, 2020

@mtreacy002 The red text is normal when updating/changing channel in Flutter.

And regarding the errors...hmm. Try doing flutter clean and then flutter run :)

EDIT Okay now I see you succeeded :D great!

@mtreacy002
Copy link
Member Author

I'll try to do the flutter clean later after trying the signup first 😉

@mtreacy002
Copy link
Member Author

wait,... @bartekpacia .. can we target local server with this flutter? where can I change the target server in the code? so I'll run the mentorship-backend at the same time.

@mtreacy002
Copy link
Member Author

I registered and logged in successfully with dev server. 🎉 🥳

Screen Shot 2020-05-02 at 11 11 17 am

But still would love to connect to local server if possible coz it's easier to debug @bartekpacia and @techno-disaster as we don't have access to debug console on dev server.

@mtreacy002
Copy link
Member Author

Anyway, thank you very very much again, @bartekpacia to troubleshoot this with me. I'll work on the README.md setting up instructions now.

@mtreacy002
Copy link
Member Author

alright. so, I noticed that VSCode IDE a bit slow to pick up changes. The error warnings were still shown even when I switched to beta channel.
On Android Studio, I noticed these error warnings disappeared straight away without refreshing the IDE( when I switched to beta from VSCode terminal).
With VSCode, I ran flutter clean but unable to remove the error warnings. Only when I closed the VSCode project window and reopened it, the error warnings finally gone. phewww,....😂

@bartekpacia
Copy link
Contributor

@mtreacy002 Server URL is hardcoded somewhere in code...if you perform search for "https" in Android Studio you should find the file and be able to alter it.

We need a better solution for this too.

@mtreacy002
Copy link
Member Author

cool... I'll look into it @bartekpacia 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Category: Documentation/Training Improvements or additions to documentation. First Timers Only Good for newcomers.
Projects
None yet
5 participants