builder method

Widget builder(
  1. BuildContext context,
  2. Widget navigator
)

Gives the ability to wrap the navigator.

Mostly useful for providing something to the entire location, i.e. to all of the pages.

For example:

@override
Widget builder(BuildContext context, Widget navigator) {
  return MyProvider<MyObject>(
    create: (context) => MyObject(),
    child: navigator,
  );
}

Implementation

Widget builder(BuildContext context, Widget navigator) => navigator;