Get.find cannot locate a GetX controller
Your error
"HomeController" not found. You need to call "Get.put(HomeController())" or "Get.lazyPut(()=>HomeController())"Fix it fast
Most common cause, 1 of 3The screen opened without the Binding that registers its controller
Write a Binding for the screen and attach it where the route is declared or pushed, under GetMaterialApp.
class HomeBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HomeController>(() => HomeController());
}
}
GetMaterialApp(
getPages: [
GetPage(name: '/home', page: () => const HomeView(), binding: HomeBinding()),
],
);
// or when pushing directly:
Get.to(() => const HomeView(), binding: HomeBinding());Short answer
"HomeController" not found. You need to call "Get.put(HomeController())" means Get.find, often called by GetView, looked up a type and tag nothing had registered at that moment: the route's Binding never ran, SmartManagement deleted the controller with its route, or the tag or type differs. Register it in a Binding or keep it with permanent: true. Applies to get 4.7.3.
Which cause do you have?
List every place that registers or looks up a controller. Compare where the failing type is put with where it is found: no registration on that route points to the first cause, a registration on an earlier route to the second, and a tag or different type to the third.
grep -rnE "Get\.(put|lazyPut|putAsync|create|find)|GetView<|binding:|initialBinding" lib/Then find the line you see in this list and open its fix:
- 1The screen opened without the Binding that registers its controller
No Get.put or Get.lazyPut for the type runs before the screen builds, or the screen is opened with Navigator.push or a MaterialApp route instead of a GetPage or Get.to with a binding - 2SmartManagement deleted the controller when the route that created it closed
The first screen works, and the error shows up on a later screen, or after Get.off or a back press, for a controller registered by an earlier route - 3The instance was registered with a tag, or under another type, than the lookup uses
Get.put uses tag: or registers a subclass or interface, while Get.find or GetView asks without that tag or for a different type
What does the error look like?
"HomeController" not found. You need to call "Get.put(HomeController())" or "Get.lazyPut(()=>HomeController())"
Cause 1 of 3
The screen opened without the Binding that registers its controller
You seeNo Get.put or Get.lazyPut for the type runs before the screen builds, or the screen is opened with Navigator.push or a MaterialApp route instead of a GetPage or Get.to with a binding
Check
GetView gives a view its controller by calling Get.find for you, so the controller must already be registered when the view builds. GetX registers route dependencies through Bindings: GetPage and navigation methods such as Get.to take a binding whose dependencies() runs Get.put or Get.lazyPut for that route. A route opened through plain Flutter navigation never runs that Binding, and the lookup fails.
// does the route that shows HomeView carry a binding?
grep -rn "HomeView" lib/Fix
Write a Binding for the screen and attach it where the route is declared or pushed, under GetMaterialApp.
class HomeBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HomeController>(() => HomeController());
}
}
GetMaterialApp(
getPages: [
GetPage(name: '/home', page: () => const HomeView(), binding: HomeBinding()),
],
);
// or when pushing directly:
Get.to(() => const HomeView(), binding: HomeBinding());Verify
The screen opens without the exception, and Get.isRegistered reports the controller while it is on screen.
debugPrint('${Get.isRegistered<HomeController>()}'); // trueConfirmed by pub.dev
Cause 2 of 3
SmartManagement deleted the controller when the route that created it closed
You seeThe first screen works, and the error shows up on a later screen, or after Get.off or a back press, for a controller registered by an earlier route
Check
With the default SmartManagement.full, GetX disposes classes that are no longer in use and were not set to be permanent; when a route leaves the stack, the controllers tied to it are removed from memory. A second screen that calls Get.find for a controller owned by a closed route therefore gets the not found error.
// after leaving the first route:
debugPrint('${Get.isRegistered<CartController>()}'); // falseFix
Register controllers that many screens share once, in an initialBinding, and mark them permanent. For one that may be dropped and rebuilt later, use lazyPut with fenix: true so GetX keeps the factory and recreates it on the next find.
class AppBinding extends Bindings {
@override
void dependencies() {
Get.put<AuthController>(AuthController(), permanent: true);
Get.lazyPut<CartController>(() => CartController(), fenix: true);
}
}
GetMaterialApp(initialBinding: AppBinding(), getPages: appPages);Verify
Leaving the first screen and opening the second no longer throws, and Get.find returns a controller each time.
debugPrint('${Get.find<CartController>()}');Confirmed by pub.dev
Cause 3 of 3
The instance was registered with a tag, or under another type, than the lookup uses
You seeGet.put uses tag: or registers a subclass or interface, while Get.find or GetView asks without that tag or for a different type
Check
Get.find builds its lookup key from the type and the optional tag, so Get.put(ItemController(), tag: id) is invisible to Get.find<ItemController>() with no tag. Type works the same way: Get.put(FirebaseAuthService()) registers the concrete class, and Get.find<AuthService>() for its interface finds nothing. GetView has a tag property for exactly this case.
grep -rn "tag:" lib/Fix
Pass the same tag on both sides (in a GetView, override tag), and give Get.put the type you will look up.
Get.put(ItemController(), tag: item.id);
final c = Get.find<ItemController>(tag: item.id);
class ItemView extends GetView<ItemController> {
const ItemView({super.key, required this.id});
final String id;
@override
String? get tag => id;
@override
Widget build(BuildContext context) => Text(controller.title);
}
Get.put<AuthService>(FirebaseAuthService());Verify
Each tagged view shows its own controller's data, and Get.find<AuthService>() returns the registered service.
debugPrint('${Get.isRegistered<ItemController>(tag: item.id)}'); // trueConfirmed by pub.dev
How do I stop it coming back?
- Give every GetX screen a Binding attached to its GetPage, and navigate with Get.toNamed or Get.to so the Binding always runs.
- Register app-wide services once in initialBinding with permanent: true rather than inside the first screen that happens to need them.
- Build tags in one helper function used by both put and find, so a typo cannot split one controller into two keys.
- Pin get to 4.7.3 in pubspec.yaml so a future major release cannot change these registration APIs under the app.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: TaxiDex, Qist Bazaar, SessionBird.