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
Flutter Beta - Caught error: NoSuchMethodError: The method 'pushNamedAndRemoveUntil' was called on null #641
Comments
Where do you put |
Hi @ghprod This is in
but the
|
It works on my local. GetX 3.11.1, Flutter 1.20.4 • channel stable. Next, please try to add a copy-pasting reproduce code. import 'package:flutter/material.dart';
import 'package:get/get.dart';
main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GetMaterialApp(
home: HomeScreen(),
initialBinding: BindingsBuilder(() {
Get.put(AuthController());
}),
getPages: [
GetPage(
name: '/first',
page: () => FirstScreen(),
binding: BindingsBuilder(() {
Get.lazyPut<FirstController>(() => FirstController());
}),
),
GetPage(
name: '/second',
page: () => SecondScreen(),
binding: BindingsBuilder(() {
Get.lazyPut<SecondController>(() => SecondController());
}),
),
GetPage(
name: '/third',
page: () => ThirdScreen(),
binding: BindingsBuilder(() {
Get.lazyPut<ThirdController>(() => ThirdController());
}),
),
],
);
}
}
class AuthController extends GetxController {
@override
void onInit() {
super.onInit();
Future.delayed(Duration(seconds: 2), () => Get.offAllNamed('/third'));
}
}
class FirstController extends GetxController {}
class SecondController extends GetxController {
final title = 'Second'.obs;
}
class ThirdController extends GetxController {
final title = 'Third'.obs;
}
class HomeScreen extends GetView<AuthController> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Text('Home'),
),
);
}
}
class FirstScreen extends GetView<FirstController> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
RaisedButton(
onPressed: () {
Get.toNamed('/second?id=x');
},
child: Text('Go to Second'),
),
RaisedButton(
onPressed: () {
Get.toNamed('/third?id=x');
},
child: Text('Go to Third'),
),
],
),
),
);
}
}
class SecondScreen extends GetView<SecondController> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: RaisedButton(
onPressed: () {
Get.back();
},
child: Text('Back to First from ${controller.title.value}'),
),
),
);
}
}
class ThirdScreen extends GetView<ThirdController> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: RaisedButton(
onPressed: () {
Get.offNamed('/first');
},
child: Text('Off to First ${controller.title.value}'),
),
),
);
}
}
|
Thanks, but this is nothing like my example nor on Flutter beta channel.
It doesn't have this error the on stable channel.
Sorry, should have added that.
|
I c.. sorry my local just use Stable channel. |
Thanks for your time and effort though. Greatly appreciated. I'll update the subject. |
No problems hopes you can find solution too 👍 |
Thanks. I'll switch back to stable just to double check too later.
…On Wed, 23 Sep 2020, 11:30 Ferri Sutanto, ***@***.***> wrote:
No problems hopes you can find solution too 👍
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#641 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66A6HYN3OWK4CKCRPB3SHHE43ANCNFSM4RWZ3NSA>
.
|
Using the Dev branch is working for me. |
I have this issue on NoSuchMethodError: The method 'pushNamed' was called on null.
Receiver: null
Tried calling: pushNamed<dynamic>("/login", arguments: null)
dart:core Object.noSuchMethod
package:get/src/navigation/extension_navigation.dart 103:36 GetNavigation.toNamed
package:bells_dash/modules/splash/presentation/controller/splash_controller.dart 68:9 SplashController._navigateToLogin
package:bells_dash/modules/splash/presentation/controller/splash_controller.dart 44:9 SplashController.navigateUser
test/modules/splash/presentation/controller/splash_controller_test.dart 107:20 main.<fn>.<fn>.<fn> |
Just testing 3.12.1 and latest beta |
Yeah, still same for me:
|
Just one question, is this during testing? |
Release and debug builds and flutter run builds. Every time for us.
…On Sat, 10 Oct 2020, 16:14 Jonny Borges, ***@***.***> wrote:
Just one question, is this during testing?
Because if it is, using the latest version you can use
Get.TestMode = true.
If it's in the normal build, I can't reproduce
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#641 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66A64P2TEN2ETF75L6DSKB25ZANCNFSM4RWZ3NSA>
.
|
Could you send us a reproducible code that I can paste in my computer and replicate the issue? Tried right now that portion of code you pasted here and it worked properly, so the issue is not in there.
|
Will do next week.
…On Sat, 10 Oct 2020, 19:54 Nipodemos, ***@***.***> wrote:
Could you send us a reproducible code that I can paste in my computer and
replicate the issue?
Tried right now and it worked properly, so the issue is not in the code
you pasted here.
Flutter (Channel beta, 1.22.1, on Microsoft Windows [versão
10.0.18363.1082], locale pt-BR)
Get: 3.13.2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#641 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG66ENP6Y73SPYY4ICBETSKCUXLANCNFSM4RWZ3NSA>
.
|
Not seeing this now when upgrading from 3.12.1 to 3.13.2:
versus:
I think we're good now. Any ideas what it was? |
Probably cache. When you have errors of the type, type |
I did flutter clean loads on macOS. I've just upgraded to Android Studio 4
which may have changed something.
So yeah, please close and I'll open a new issue of it shows again.
Thanks!
|
Thanks |
Describe the bug
On start up of my app, I get this error
Expected behavior
No error
Flutter Version:
[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Linux, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.49.0)
[✓] Connected device (4 available)
Getx Version:
3.11.1
Describe on which device you found the bug:
sdk gphone API 30
Minimal reproduce code
AuthController
app.dart:
The text was updated successfully, but these errors were encountered: