How to pass parameters in navigation using Beamer package in Flutter

256 views Asked by At

I have this

Beamer.of(context)
            .beamToNamed('${path??'home/start'}/booking');

and I would like to send a parameter to the creation of that page:

class NewBookingPage extends ConsumerWidget {
  final String? resourceType;
  const NewBookingPage(this.resourceType, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    // ....
  }
}

I was checking some solutions that don't use the constructor, such as sending them as a query or as a data object, but I don't really know how to apply them to my case.

0

There are 0 answers