Imagine the scenario in a Flutter app with go_router for navigation, a bottom navigation bar (say, Home, Search, Profile, etc.) and you want to handle Back button behavior smartly: If you are on another tab (e.g., Search, Profile), pressing back should switch back to the initial tab (e.g., Home). If you are already on the initial…
Author: Toma Velev
How to Restart Flutter App Programatically
To programmatically Restart a Flutter app, you can’t directly “restart” the whole app like you would restart an Android/iOS process, but you can simulate a restart by rebuilding the widget tree from the root. Here’s the most common approach using a custom RestartWidget: ✅ Step-by-step solution 1. Create a RestartWidget wrapper import ‘package:flutter/material.dart’; class RestartWidget…
In Flutter – How to Programmatically Trigger Fatal Crash
This is how you programmatically trigger a fatal crash in Flutter, maybe for testing crash reporting (like Sentry, Firebase Crashlytics, etc.), etc. Here’s a simple way to cause a fatal crash in Flutter: void triggerFatalCrash() { Future.delayed(Duration.zero, () { throw StateError(‘This is a fatal crash triggered manually.’); }); } How this works: Future.delayed(Duration.zero, …) puts…
In Flutter – how to have a text with a Hyperlink
In Flutter, if you want a text with a clickable hyperlink inside it, you typically use a RichText widget with a TextSpan, and you add a gesture recognizer to detect taps. Here’s a simple example: import ‘package:flutter/gestures.dart’; import ‘package:flutter/material.dart’; class HyperlinkTextExample extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text(‘Hyperlink in…
Flutter image caching issue
If your ListView in Flutter is caching images (e.g., with the fast_cached_network_image package), and you’re observing that image fields do not update even though other fields in the list items do, it’s likely due to caching behavior or widget tree reuse. Here are a few possible causes and how to address them: 1. Image URL…
Lazy Loading with ScrollController in Flutter
To implement Lazy Loading (also called infinite scrolling) in your Flutter widget using a ScrollController, you need to listen to scroll events and detect when the user is near the bottom of the list. At that point, you trigger loading more data. Here’s a complete example pattern you can integrate into your widget: ✅ 1….
Offset of type Long in Java Object Relational Mapping Frameworks
To this day amazes me that all Java Object Relational Mapping Frameworks use 32bit Integer as parameter to the offset you could pass to the database. Spring’s Pageable uses int internally — so it cannot handle offsets beyond Integer.MAX_VALUE. (JPA API also expects int for offset and limit. https://docs.oracle.com/javaee/5/api/javax/persistence/Query.html#setFirstResult(int) Hibrnate https://docs.jboss.org/hibernate/orm/6.6/javadocs/org/hibernate/query/Page.html#page(int,int) 🔍 Breakdown: 1. Pageable…
What does Scalable Flutter Mobile App really means?
A Scalable Flutter Mobile App is one that can handle increased demand—like more users, more data, or more features—without breaking down or slowing down significantly. Scalability means your app continues to perform well as it grows. Here are a few dimensions of scalability in mobile apps: 🔼 1. User Load Scalability Can your app serve…
What are some tools in flutter to archive development and delivery speed
Flutter has a powerful ecosystem designed to supercharge your development and delivery speed. Whether you’re building solo or working with a team, here are the top tools and practices that will help you ship faster and smarter: 🚀 Tools & Techniques to Speed Up Flutter Development & Delivery 🔁 1. Hot Reload & Hot Restart…
How Flutter handles User Load Scalability
Flutter has User Load Scalability—especially since Flutter itself is a frontend framework, and most of the heavy lifting (load handling) typically happens on the backend. But Flutter still plays a big role in the overall scalability experience. ⚙️ 1. Flutter & User Load Scalability ✅ What Flutter handles well: a. Efficient Rendering Engine (Skia) Flutter’s…