pushDynamic method

  1. @override
void pushDynamic({
  1. required String dynamicPathName,
  2. required WidgetBuilder builder,
})
override

Push a route with a dynamic route name

Implementation

@override
void pushDynamic(
    {required String dynamicPathName, required WidgetBuilder builder}) {
  /// Trim the leading / if used here
  /// We'll put it back when we put the
  /// private prefix e.g. /_ back on
  if (dynamicPathName.startsWith('/')) {
    dynamicPathName = dynamicPathName.substring(1);
  }

  _addPath(
      DartBoardPath('/_$dynamicPathName', initialPath, builder: builder));
  notifyListeners();
}