Andrea Bizzotto 💙 Profile picture
Jan 21 12 tweets 4 min read
When building non-trivial apps, following a *structured workflow* can bring great benefits and avoid many pitfalls.

Rather than diving straight into the code, here's a 6 step workflow that you can follow.

Thread. 🧵
1. Design your app (part 1)

Design all the screens that will be in your app.

You can use Sketch, Figma, Adobe XD, or even draw them by hand.

This will help you think about the most logical UI flows before diving into the code.

Here's an example from my website: 👇
1. Design your app (part 2)

This is also a great chance to define stylesheets including a color palette, typography, paddings etc.

This will:

- make your designs much more consistent
- make your app look much nicer
- save you time down the line
2. Design your Database/Backend

- what entities do you need? what are their properties & relationships?
- what queries will you need to perform to get the data you need in your UI?
- any other features? Authentication? Data syncing? Realtime updates?

Then, choose your backend.
3. Choose the right app architecture

- Is your app UI heavy?
- Is it data-heavy?
- Does it need to connect to device-specific APIs?
- How should data propagate to the UI?
- How should events modify the application state/database?

Continued. 👇
3. Choose the right app architecture (part 2)

Answering the questions above will help you choose:

- the most suitable architecture
- the correct state management solution to support your codebase as it grows

There are many choices. Here's one: 👇

codewithandrea.com/articles/flutt…
4. Setup a project board and create tasks on GitHub

- Create issues describing each feature you want to build.
- For each task, create a TODO checklist of the things that need to be completed before it's considered done
- This is also a great place to identify dependencies
5. Setup a CI workflow

You can use GitHub actions, Codemagic, whatever.

What matters is that you have your automated tests running every time you push a new PR (you do write tests, right?)
6. Do the work

- Create a new branch in Git
- Do the work following the steps in the TODO
- Add tests covering edge cases for the feature
- Push a PR to GitHub, and review your own code
- Once everything is green, merge and move on to the next task

docs.github.com/en/get-started…
What are the benefits of this approach?

- you'll have a consistent design across the entire app
- you'll break your project into a *discrete* set of tasks, each with its own PR, tests, and a clear beginning and end
- you'll have a historical track record about all your changes
Of course, there is much more to app development than just this.

But this is already much better than "dive right in, commit everyhing to main, YOLO".

You can benefit from this approach even if you don't work in a team.

It helps you stay organized and see tangible progress.
Would you like me to write more about this and create an article?

Let me know in the comments.

If you liked this, retweet the thread above. 👆

And for more Flutter tips, just follow me: @biz84

Happy coding!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Andrea Bizzotto 💙

Andrea Bizzotto 💙 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @biz84

Jan 7
"Program to interfaces, not implementations" is a very important concept in software design.

It is used to decouple your code from implementation-specific details.

A good use case for this is when creating repositories that connect to external data sources:
Once you have an interface (abstract class), you can *implement* it with a concrete implementation.

You can even create a "fake", which can be very useful in your tests.
During app startup, you can initialize your repository with a *concrete* instance (using a service locator or any other dependency injection system).

And the rest of your app can just access the repository using the base abstract class.
Read 4 tweets
Dec 31, 2021
Here's a thread about my 2021 in numbers as a content creator making Flutter tutorials and courses. 🧵

Total Revenue: $69,532

Here's a breakdown by month. 👇
Here's a pie chart about revenue by income stream.

80% of total revenue came from sales on Udemy and Teachable.
This year I had $20,660 in expenses.

This is a large number primarily due to outsourcing costs (design & development) on my site.
Read 11 tweets
Oct 12, 2021
How do you navigate programmatically between tabs like in Flutter?

Let's figure it out. 🧵
First of all, we need:

- a TabBar with three tabs
- a TabController to control the selected tab
Then, let's add a TabBarView to contain all the views (pages).

Our custom views have an "onNext" callback that we can use to change the index of the TabController (and update the page).
Read 8 tweets
Sep 19, 2021
Every week I send some my best content to my email subscribers.

And in the last month alone, feedback has been overwhelmingly positive.

So which are my most liked tutorials? Read on. 👇 Image
My Dart top tips article seems to be an all-time favourite:

codewithandrea.com/videos/top-dar…
Ever had issues with widgets that rebuild when they shouldn't?

Then maybe your app has some side effects. Learn all about them here:

codewithandrea.com/articles/side-…
Read 6 tweets
Sep 14, 2021
Remember this thread about how to create a chat with message bubbles?

Well, I found a simpler and more performant solution.

Let's get back to basics. 🧵

What we want to do is to *align* our message bubble to the left or right as needed.

We *could* accomplish this using a Row with MainAxisAlignment.start or MainAxisAlignment.end. Image
But that leads to an unconstrained width issue and breaks our layout in certain cases.

This *could* be fixed with LayoutBuilder + ConstrainedBox.

But there's a better way. Image
Read 6 tweets
Sep 13, 2021
Building a Flutter chat UI with message bubbles like this should be easy right?

Not so fast! 🧵 Image
This layout can be built with a ListView that contains some message bubbles.

Each bubble is a Row that holds a DecoratedBox (with a child Text) and a Spacer (or viceversa).

The text expands horizontally in one line and the bubble adjusts accordingly. Image
Here's how the message bubble looks in code: Image
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(