1️⃣ didChangeDependencies is called immediately after initState
2️⃣ BuildContext is not available in initState
1️⃣ didChangeDependencies is called immediately after initState
2️⃣ BuildContext is not available in initState
#flutter #dart #buildcontext #mobiledev #flutterdeveloper #beginners #fluttertutorial #widgettree #statefulwidget #androiddevelopment
#flutter #dart #buildcontext #mobiledev #flutterdeveloper #beginners #fluttertutorial #widgettree #statefulwidget #androiddevelopment
#flutter #dart #mobileDeveloper #buildContext #flutterDeveloper #scaffold #flutterBeginners #learnFlutter #flutterTips #mobiledev
#flutter #dart #mobileDeveloper #buildContext #flutterDeveloper #scaffold #flutterBeginners #learnFlutter #flutterTips #mobiledev
When you call MediaQuery.of(context) inside a build method, the widget will rebuild when any of the MediaQuery properties change.
But there's a better way that lets you depend only on the properties you care about (and minimize unnecessary rebuilds). 👇
When you call MediaQuery.of(context) inside a build method, the widget will rebuild when any of the MediaQuery properties change.
But there's a better way that lets you depend only on the properties you care about (and minimize unnecessary rebuilds). 👇
If you add a debugFillProperties() method to your widget classes, all your custom properties will show in the DevTools.
This information is useful for debugging purposes and has no performance impact on release builds (where it is stripped).
If you add a debugFillProperties() method to your widget classes, all your custom properties will show in the DevTools.
This information is useful for debugging purposes and has no performance impact on release builds (where it is stripped).
Widget build(BuildContext context) {
return const Material(
child: Center(
child: Text('hello world'),
),
);
}
Widget build(BuildContext context) {
return const Material(
child: Center(
child: Text('hello world'),
),
);
}
#Flutter #Dart #MobileDevelopment #MobileApp #FlutterApp #Programming
#Flutter #Dart #MobileDevelopment #MobileApp #FlutterApp #Programming
In Flutter, you can easily create a responsive split-view widget that works on mobile, desktop and web.
You can do this in 30 lines of code, without any 3rd party packages: 👇
In Flutter, you can easily create a responsive split-view widget that works on mobile, desktop and web.
You can do this in 30 lines of code, without any 3rd party packages: 👇
https://zenn.dev/chooyan/articles/9e3caa641e12f5
https://zenn.dev/chooyan/articles/9e3caa641e12f5
Static release toggles let you release unfinished code without activating it in production.
This is common with large projects that practice trunk-based deployment and continuous delivery.
For more flexibility, you can implement this with --dart-defines. 👇
Static release toggles let you release unfinished code without activating it in production.
This is common with large projects that practice trunk-based deployment and continuous delivery.
For more flexibility, you can implement this with --dart-defines. 👇
🔗 Here is a rule to help you quickly find such issues: dcm.dev/docs/rules/f...
#Flutter #Dart
🔗 Here is a rule to help you quickly find such issues: dcm.dev/docs/rules/f...
#Flutter #Dart
https://zenn.dev/joo_hashi/books/197286c99fe1a1
https://zenn.dev/joo_hashi/books/197286c99fe1a1
✅ Adaptive mode (Material / Cupertino)
✅ Default and cancel actions
✅ Destructive UI style
✅ Dismissible mode
Super useful for Yes/No, Cancel/Delete scenarios. 👍
See below for the source code.
✅ Adaptive mode (Material / Cupertino)
✅ Default and cancel actions
✅ Destructive UI style
✅ Dismissible mode
Super useful for Yes/No, Cancel/Delete scenarios. 👍
See below for the source code.
We often treat #Flutter’s BuildContext as some sort of "magic" variable, but while reading about the Strategy Pattern on refactoring.guru today, everything just clicked.
Flutter applies this pattern beautifully. 🧵👇
We often treat #Flutter’s BuildContext as some sort of "magic" variable, but while reading about the Strategy Pattern on refactoring.guru today, everything just clicked.
Flutter applies this pattern beautifully. 🧵👇
www.freecodecamp.org/news/how-flu...
www.freecodecamp.org/news/how-flu...
Today I discovered the power of having a single public “GlobalKey
#flutter
Today I discovered the power of having a single public “GlobalKey
#flutter
From using it after `await` to calling it in `initState(),`these patterns are risky.
📘 Here's how to avoid them: dcm.dev/blog/2025/03...
From using it after `await` to calling it in `initState(),`these patterns are risky.
📘 Here's how to avoid them: dcm.dev/blog/2025/03...
There is a signals specific package
github.com/s0nerik/cont...
There is a signals specific package
github.com/s0nerik/cont...
So basically, Provider and RepositoryProvider were not enough for us and get_it was too powerful.
So basically, Provider and RepositoryProvider were not enough for us and get_it was too powerful.
What if your BLoC architecture was decoupled from BuildContext and ran 100% synchronously on the call stack?
Check out my new article on devto: dev.to/randalschwar... #Dart #BlocSignal
What if your BLoC architecture was decoupled from BuildContext and ran 100% synchronously on the call stack?
Check out my new article on devto: dev.to/randalschwar... #Dart #BlocSignal