getx icon indicating copy to clipboard operation
getx copied to clipboard

RouterOutlet.builder throws TDelegate

Open AxanIqbal opened this issue 2 years ago • 6 comments

just following the nav2 example for my current project

example:

class RootView extends GetView<RootController> {
  @override
  Widget build(BuildContext context) {
    return RouterOutlet.builder( // <==== error
      delegate: Get.nestedKey(null),
      builder: (context, tDelegate, y) {
        print(tDelegate);
        print(y);
        print(context);
        // final title = context.location;
        return Scaffold(
          drawer: DrawerWidget(),
          appBar: CustomAppBar(title: "title"),
          body: GetRouterOutlet(
            initialRoute: Routes.HOME,
            // delegate: Get.delegate(),
            anchorRoute: '/',
            filterPages: (afterAnchor) {
              return afterAnchor.take(1);
            },
          ),
        );
      },
    );
  }
}

To Reproduce Steps to reproduce the behavior:

  1. Follow nav2 example
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Flutter Version: v3.0.1

Getx Version: get: 4.6.5

Describe on which device you found the bug: ex: any.

AxanIqbal avatar May 27 '22 06:05 AxanIqbal

same here..

geekz-reno avatar Jun 09 '22 07:06 geekz-reno

kindly any suggestions?

ayayui avatar Jun 17 '22 12:06 ayayui

I'm using auto routes for it

AxanIqbal avatar Jun 17 '22 12:06 AxanIqbal

I'm using auto routes for it

I will try it. thanks !

ayayui avatar Jun 17 '22 12:06 ayayui

I'm using auto routes for it

I will try it. thanks !

it is success? or any other alternative? can't find auto routes :(

geekz-reno avatar Jun 20 '22 14:06 geekz-reno

I'm using auto routes for it

I will try it. thanks !

it is success? or any other alternative? can't find auto routes :(

if others face same issues, just use current master git and reference getx to this git and not using current release version.

geekz-reno avatar Jun 30 '22 04:06 geekz-reno

same problem here

felix0324324 avatar Nov 10 '22 01:11 felix0324324

Hmm, I think this is already fixed in master, but not yet in pub.dev.

I'll take a look at that.

jonataslaw avatar Nov 10 '22 02:11 jonataslaw

Hmm, I think this is already fixed in master, but not yet in pub.dev.

I'll take a look at that.

It worksssss!! You save my life seriously!!!

added this to pubspec.yaml

get: git: url: http://github.com/jonataslaw/getx.git ref: master

felix0324324 avatar Nov 10 '22 04:11 felix0324324