onBindingsStart method

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

This function will be called right before the Bindings are initialize. Here you can change Bindings 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<Bindings>? onBindingsStart(List<Bindings>? bindings) => bindings;