addClient method Null safety

  1. @override
Future addClient(
  1. AuthServer server,
  2. AuthClient client
)
override

Must store client.

client must be returned by getClient after this method has been invoked, and until (if ever) removeClient is invoked.

Implementation

@override
Future addClient(AuthServer server, AuthClient client) async {
  final storage = ManagedAuthClient.fromClient(client);
  final query = Query<ManagedAuthClient>(context!)..values = storage;
  return query.insert();
}