-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grey screen Errors in Release Mode #3103
Comments
You need to check how to create controller. You will have some scenario for that error. Please check the scenario. |
how should I create the controller????? |
I would suggest you to check the counter app with GetX |
@fluttyCat You can create controller like Get.lazyOut(()=> TestController) or Get.put(TestController); |
I do it this way, I think you did not understand my problem. just in my laptop this error happens, when build apk. but with another systems when they get the apk, it is ok |
if you are @fluttyCat using getview then class Detail extends GetView<MyControllerName> { |
@allasca I do it exactly like this |
check your main.dart, use like this. then you can get.find everywhere. @fluttyCat class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return GetBuilder(
init: MainController(),
builder: (_) {
return GetMaterialApp(
title: "Lestaripedia",
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.green,
brightness: Brightness.light,
),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.green,
brightness: Brightness.dark,
),
useMaterial3: true,
),
themeMode: _.isDarkMode.value ? ThemeMode.dark : ThemeMode.light,
home: const LoginUi(),
);
});
}
} |
@allasca main.dart is not stateles. it is just a function |
When I build the app with my laptop, something strange happens
When I switch between the app pages, the error "Controller not found" appears randomly
and the error says it is OBX widget that causing this.either loses the controller or does not register it at all when navigating between pages. but in other laptops everything is fine and the APK works correctly.
class Detail extends GetView {
Detail({Key? key}) : super(key: key);
@OverRide
Widget build(BuildContext context) {
}
}
To Reproduce
Steps to reproduce the behavior:
3.grey screen
Expected behavior
I Expect not seeing grey screen
Screenshots
Flutter Version:
Flutter (Channel [user-branch], 3.13.7
Getx Version:
get: ^4.6.1
Describe on which device you found the bug:
samsung galaxy A21
The text was updated successfully, but these errors were encountered: