onBindingsStart<R> method

  1. @override
List<R>? onBindingsStart<R>(
  1. List<R>? bindings
)

This function will be called right before the BindingsInterface are initialize. Here you can change BindingsInterface for this page {@tool snippet}

List<Bindings> onBindingsStart(List<Bindings> bindings) {
  final authService = Get.find<AuthService>();
  if (authService.isAdmin) {
    bindings.add(AdminBinding());
  }
  return bindings;
}

{@end-tool}

Implementation

@override
List<R>? onBindingsStart<R>(List<R>? bindings) => bindings;