Description
Dart client is not working
Description
As stated in FusionAuth/fusionauth-dart-client#13, our Dart client library is throwing a lot of errors.
I tried fixing it by changing the char
type to String
as it was complaining that char
doesn't even exist and I solved all Error: The parameter '...' can't have a value of 'null' because of its type 'String', but the implicit default value is 'null'
errors by making a lot of parameters nullable.
I still received a bunch of Error: A value of type 'Future<ClientResponse<dynamic, dynamic>>' can't be returned from a function with return type 'Future<ClientResponse<ActionResponse, Errors>>'
that I tried solving by changing a few things in how we use Generics but couldn't get anywhere.
Finally, I tried downgrading Dart SDK from 2.19 to 2.7 (which was the last SDK change introduced by FusionAuth/fusionauth-dart-client@b8496c5) and our lib to 1.21.0 (which is mentioned in README) and I still got errors, so I gave up.
I then tried using OpenAPI Dart Generator but got other errors. There's an open PR OpenAPITools/openapi-generator#12574 that tries to fix some of them, so I built from source and tried using it but still no luck. Finally, I tried using the OpenAPI Dart Dio Generator (that uses dio HTTP client) and it finally worked, but I still need to tweak a lot of settings to generate correct docs (that are currently wrong).
Affects versions
- Tried a lot of client versions from 1.21.0 to 1.45.1 (latest)
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.