init method

  1. @override
Future<RouteBase?> init(
  1. BuildContext context
)
override

Implementation

@override
Future<RouteBase?> init(BuildContext context) async {
  if (_initializedInstance != null) {
    return _initializedInstance;
  }

  if (lifecycleHandlers != null && lifecycleHandlers!.isNotEmpty) {
    for (final config in lifecycleHandlers!) {
      await config.init(context, this);
    }
  }

  _initializedInstance = this;
  return _initializedInstance;
}