The cast to the FutureOr<> type confuses dart/flutter nowadays:
flutter: type 'Future<dynamic>' is not a subtype of type 'FutureOr<ProxmoxApiClient>' in type cast
flutter: #0 _ProxmoxLoginPageState._onLoginButtonPressed (package:proxmox_login_manager/proxmox_login_form.dart:406:12)
<asynchronous suspension>
just drop it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
'$username@$realm', password, origin, settings.sslValidation!);
if (client.credentials.tfa) {
- client = await (Navigator.of(context).push(MaterialPageRoute(
+ client = await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
apiClient: client,
),
- )) as FutureOr<ProxmoxApiClient>);
+ ));
}
final status = await client.getClusterStatus();