slovnicki / beamer

A routing package built on top of Router and Navigator's pages API, supporting arbitrary nested navigation, guards and more.
MIT License
591 stars 129 forks source link

Add builder parameter to BeamerLocationBuilder #593

Open AlaaEldeenYsr opened 1 year ago

AlaaEldeenYsr commented 1 year ago

I need to use builder parameter with BeamerLocationBuilder like RoutesBeamLocation and RouterLocationBuilder

BeamerLocationBuilder(
  // builder missing
  beamLocations: beamLocations,
);

RoutesBeamLocation(
  // builder
  navBuilder: (context, navigator) => builder(navigator),
  routeInformation: routeInformation,
  routes: routes,
);

  RoutesLocationBuilder(
  // builder
  builder: (context, navigator) => builder(navigator),
  routes: routes,
);
slovnicki commented 1 year ago

Hey @AlaaEldeenYsr :wave: Thanks for creating an issue and sorry for my absence lately.

As BeamerLocationBuilder accepts multiple BeamLocations, we have the builder to override on each of them, as needed; https://github.com/slovnicki/beamer/blob/a16123a859907b00b3cf2a2c8ae0372a76cd16e5/package/lib/src/beam_location.dart#L340