Error: No named parameter with the name 'builder' Flutter macOS

207

I believe your parent class doesn't have a builder method, I also believe you need to use the child method and then builder inside of that.

Share:
207
Ahmed AlNeaimy
Author by

Ahmed AlNeaimy

Updated on January 01, 2023

Comments

  • Ahmed AlNeaimy
    Ahmed AlNeaimy over 1 year

    can someone please explain what to do to fix "Error: No named parameter with the name 'builder'."?

    Code:

    @override
      final Map<String, _i1.PageFactory> pagesMap = {
        SplashScreenRoute.name: (routeData) => _i1.CupertinoPageX<dynamic>(
            routeData: routeData,
            builder: (_) {
              return const _i4.SplashScreen();
            }),
    

    Error:

    Xcode's output: ↳ leveldb-library-evkvtgfvdszrevdlzrfbvlaovfcr lib/routes/router.gr.dart:58:9: Error: No named parameter with the name 'builder'. builder: (_) { ^^^^^^^

    Flutter Doctor