Code on the Rocks

@cotr
7 Followers
7 Following
207 Posts
Building the AI-focused Stack Overflow alternative 🤖
Websitehttps://cotr.dev

Pro Flutter Tip 💙

You can change the application ID and label of your Android app during development using the "debug" build type

This lets you have the production and development versions installed at the same time

Today's the day I add Shorebird to my Fastlane files

These app store times are giving me ulcers

TIL you can override the equality operator in Flutter/Dart 💙

This is especially important when using the Signals library.

If the change you make to a signal doesn't change the equality check, the signal won't trigger any changes

#Flutter Tip 💙

Turn on the "checked" flag in the JsonSerializable annotation to see exactly which fields cause errors during deserialization

This has saved me literal hours

Flutter Tip 💙

You can use the .icon (and .tonalIcon) button constructors to auto-add an icon before the button label

Does anyone know how to make .tonalIcon do anything? 😅

This Flutter package is pretty cool 👀

Turn any widget into a loading skeleton that mimics the widgets layout

Flutter Tip 💙

You can convert any widget to an image (ex. PNG)

1. Find RenderRepaintBoundary using GlobalKey
2. Convert RenderRepaintboundary to Image
3. Convert Image to ByteData

📸

Flutter reminder 💙🔥

You shouldn't show an error message on every sign in "error"

Google Sign In and Firebase Auth can both throw errors that simply mean the user canceled the sign in flow-->

More Flutter goodness 💙

TIL I learned you can use the Feedback class from the material library to provide "platform-specific feedback for a tap"

It doesn't do anything on iOS but on Android it plays the click system sound

1.3 billion years to find a new home