flutterRouteBuilder function

Builder flutterRouteBuilder(
  1. BuilderOptions options
)

A builder that generates a json file for one or more routes.

Implementation

Builder flutterRouteBuilder(BuilderOptions options) {
  return LibraryBuilder(
    const FlutterRouteGenerator(),
    formatOutput: (generated) => generated.replaceAll(RegExp(r'//.*|\s'), ''),
    generatedExtension: '.navigator.json',
  );
}