dwyl / learn-flutter

🦋 Learn how to use Flutter to Build Cross-platform Native Mobile Apps
https://flutter.dev
GNU General Public License v2.0
73 stars 8 forks source link

TDD Flutter Example #43

Closed nelsonic closed 1 year ago

nelsonic commented 4 years ago

As a person wanting to build reliable & maintainable cross-platform native Apps in Flutter, I want to learn the best practices of TDD from the start by following a great beginners example so that I cultivate good habits for high quality tests and code.

We need to create a basic but complete step-by-step example of doing TDD in Flutter with the complete code on GitHub (not just "snippets" or gists) so that a beginner can follow it from start to finish in less than an hour and understand exactly what it takes to do TDD and how to do it.

Todo/Tasks

The example must:

Writing this example does not need to take more than a couple of days of focussed effort. But it will be a superb resource for others.

@miguelmartins17 remember this is an opportunity to practice your skills and solidify the "basics" so that you have a good foundation to build on. The objective is to know the fundamentals so well that you can do them in your sleep. It's the same a basic fitness for performing a sport like Boxing. You don't expect to walk into the Boxing Ring and beat Anthony Joshua without any practice. The same way that you cannot possibly expect to get a job as a developer without putting in significant practice with the core skills; specifically Test Driven Development. Technical Writing where you explain things to other people in great detail is an essential skill as a developer. It is a strong differentiator between you and your peers. Trust me being able to communicate effectively is every bit as important as being able to write code.

miguelmartins17 commented 4 years ago

@nelsonic So first I should finish the Flutter TDD tutorial course, then move on to this issue?

nelsonic commented 4 years ago

Yeah, finishing the Flutter Clean Architecture and TDD course notes is essential. #15 📝 https://github.com/dwyl/learn-flutter/blob/master/Flutter_TDD_Architecture_Course_notes.md At present the notes only go up to video 3. There are 14 videos in the series. 📺

miguelmartins17 commented 4 years ago

I've managed to make some progress. I just need to do the documentation.

Tests_passing

nelsonic commented 4 years ago

@miguelmartins17 great that you are making progress! 🎉

Please remember to git add . && git commit -m 'describe your progress' && git push so that you are recording your progress on a regular basis. (ideally multiple times per day whenever you reach a checkpoint like a new section in the instructions) https://github.com/dwyl/flutter-counter-example last-commit-5-days-ago The key to mastery is consistency. Push code each time you make an update. The faster you make progress in any/each task the faster you will reach your goals.

If you are facing obstacles, please comment on the issue so we can help. 👍

miguelmartins17 commented 4 years ago

@nelsonic I'm still trying to figure out how to add a function to the button. I found it on StackOverflow. I'll try to use it.

https://stackoverflow.com/questions/51398531/how-to-give-onpressed-a-method-in-custom-button-flutter

miguelmartins17 commented 4 years ago

Today I tried to run the application but when I tried to run it the following error appeared. I already google it but I didn't get any solution.

Screen Shot 2020-03-29 at 15 42 55

miguelmartins17 commented 4 years ago

@nelsonic These were the links where I tried to solve this problem.

nelsonic commented 4 years ago

@nelsonic please get into the habit of pasting the text of the error into an issue screenshots are good for context but they are useless for allowing anyone else to pick up the issue or find the eventual solution via Googling.

miguelmartins17 commented 4 years ago

This is the error written for the next one, I know I have to write.

Resource fork, Finder information, or similar detritus not allowed.
Command CodeSign failed with a nonzero exit code.
note: Using new build system.
note: Planning build
note: Constructing build description
Warning: capabilities for signing and capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this select a development team in the Runner editor.
miguelmartins17 commented 4 years ago

I am currently following this post on StackOverflow.

https://stackoverflow.com/questions/39524148/xcode-error-code-signing-is-required-for-product-type-application-in-sdk-ios

miguelmartins17 commented 4 years ago

This post talks about the error I have in Xcode build but it is still outdated in relation to the version.

https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html

miguelmartins17 commented 4 years ago

@nelsonic I was thinking that maybe the error that appears in Xcode build might be because it was outdated and then I saw that it had an update. Every time I try to update, I get an email other than mine.

Screen Shot 2020-04-02 at 10 44 45

How can I change the email address on the App Store so I can update Xcode? Is there another way to do this update other than from the App Store?

nelsonic commented 4 years ago

@miguelmartins17 the user on the Mac you are using was created specifically for you. You should not need to sign into my iCloud account unless you are using a different user ... you are the "admin" on the machine so you can create a new user e.g "M2" and you should be able to start from scratch. It's actually a good test of the Learn Flutter installation instructions. As for downloading XCode, sadly it's only possible through the App Store.

miguelmartins17 commented 4 years ago

I am currently following this video:

https://www.youtube.com/watch?v=OtkrNQxJzBQ

nelsonic commented 1 year ago

Closing in favour of: https://github.com/dwyl/learn-flutter/issues/65