initialize method

  1. @override
void initialize(
  1. AppContext context
)
override

Starts work after every module has registered its values.

Implementation

@override
void initialize(AppContext context) {
  final query = context.maybe(queryClientKey);
  final initial = _initial;
  if (initial != null && query != null) {
    handoff.apply(initial, query: query);
  }
  if (_acceptHandoff) {
    _frames = browserHandoffFrames().listen(
      (frame) => handoff.apply(frame, query: query),
      onError: (Object error, StackTrace stackTrace) {
        FlutterError.reportError(
          FlutterErrorDetails(
            exception: error,
            stack: stackTrace,
            library: 'document handoff',
          ),
        );
      },
    );
  }
}