Gonçalo Palma Profile picture
Lead Flutter Developer 👨‍💻 Writer ✍️ @GoogleDevExpert for Flutter and Dart 💙 | Creator of 🤖 @WidgetsBot
Oct 13, 2021 7 tweets 3 min read
💡 Did you know that Flutter Web allows you to know the app's version?

Let's see how 👇

📱When developing for mobile, we can easily check the app's version number by going to the settings or the app store

This can be quite useful whenever a user is reporting a bug 🐛

Or..

1/
Just to make sure our app got deployed to the stores correctly 🤦

However, Flutter Web doesn't seem to offer that out-of-the-box... or does it?

🔎 Let's explore the `build/web` folder after we build a flutter web app with

`$ flutter build web`

2/
Oct 6, 2021 6 tweets 2 min read
Using --dart-define, a 🧵

When we're developing Flutter apps we can have two issues:

1⃣ We want to add `flavors` for Flutter Web, but there's no out-of-the-box way of doing it

2⃣ Our app needs an API key or configuration that we don't want to commit

1/
In pure Dart, this can be easily achievable with the args package:

pub.dev/packages/args

We are able to stipulate what are the flags and arguments we need to use, such as:

`dart run bin/converter.dart --verbose --out-path="/out" data.json`

2/