A year ago, I used to follow fellow developers in an attempt to learn sth new.
Today, I'm excited to announce that I'm a @GoogleDevExpert for Flutter, & the first female GDE for Flutter in Pakistan! 🥳🎉
Thank you to everyone who has supported me; many exciting things to come!
@Wicaodian If you’re in Pakistan, it’s an IP level issue. Use a VPN and see if it works. All our apps using Firebase Storage weren’t showing images asw since yesterday evening and Firebase status dashboard is also not reporting any incidents.
I've been working on a Flutter package for syncing subtitles and lyrics with video and audio playbacks
https://t.co/GvRn3qVcQL
I've learnt a lot about WebVTT, SubRip and LRC formats working on this.
What a coincidence! I opened Twitter after ~2 months and the first Tweet I saw was yours. :D
1. Been busy working on a big project on Flutter which is to be released soon! 🤞
2. Twitter is restricted in Pakistan, so it's not very handy to use since you have to turn on a VPN everytime. .-.
Flutter Tip - Day 20:
If you want to prevent others from snooping into your #flutter app (or a part of it),
You can use local_auth to perform biometric authentication!
You can do this on the app's startup or just before accessing any feature you want to control the access to🛑
Flutter Tip - Day 19:
If you want to store sensitive data in your #flutter app, such as app credentials, auth tokens, etc, how can you ensure that this data is secure?
Solution: Use flutter_secure_storage to securely store data that is only accessible via cryptographic keys!🔑
Flutter Tip - Day 18:
Have you ever wondered if you could create a #flutter project based on your own custom template instead of the standard counter app?
Mason makes that achievable! 😁
It allows you to generate and re-use files based on your custom variables.
This means that you don't have to manually copy-paste redundant files, models and services everytime you create a new project! 🥳
Flutter Tip - Day 17:
Have you ever wondered if there was a way to re-use the boilerplate code for various controllers, streams or just other functionality in your #flutter app?
Use flutter_hooks!🪝
A hook contains the boilerplate code for a specific functionality, so you don't need to worry about writing the same redundant code for initialising a controller, disposing it off, updating its value if there's a change in dependency, etc for every widget where needed.
flutter_hooks already supports a large number of commonly used hooks, but you can always create your own custom hooks too.
Flutter Tip - Day 16:
If you want to use a separate database or make API requests to a different server for the same #flutter app in different environments, e.g. staging, production etc.:
You can set up flavors for each of these environments!
No more switching b/w branches for a separate build config.🙅♀️
Flutter Tip - Day 15:
You can inspect your #flutter app's memory usage and leaks with DevTools! 🛠️
Not only will it show you memory usage for the classes from:
1. Dart runtime
2. the sdk itself
3. dependencies
But you can also see memory usage of your own custom classes too!
@ookami_kb Fair point! Although I prefer this approach, so I can remember to perform any necessary error handling in case the operation fails. But again, it's subjective.
Flutter Tip - Day 13:
If you're displaying images or even svg icons in your #flutter app, you must have noticed that rendering them often takes some time.
This results in a bad user experience. 👎
The good news is you can precache these images/icons to help load them faster!
Good question!
The main reason is: context.
If you use the context inside initState, it will throw you an error like 'dependOnInheritedElement() was called before the screen's initState() completed'.
This is because context is not available at this time since dependencies have not fully loaded.
@dhuma1981 Hey, I'm glad you found it useful! 🙋♀️
GoRouter is such a savior.
When I started off with Flutter, I tried so many packages designed for a persistent bottom navigation bar. They did the trick, but ofc they weren't scalable as the user journeys and requirements got more complex.
Flutter Tip - Day 14:
If your #flutter app has a BottomNavigationBar, have you ever wondered how to perform nested routing such that the nav bar always remains accessible? (similar to Twitter, LinkedIn & other apps)
Here's how you can achieve this with GoRouter's ShellRoute!🛣️
Day 6 of #fluttershare24
So I tried making a simulation of the famous bouncing DVD logo.... 👀
P.s. No third party packages were used - only a timer, CustomPaint and some math for collisions and speed!