onBindingsStart<R> method

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

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