I want to define a method as following:
@GET("/users")
@Headers(<String, dynamic>{"Accept": "application/json", "Authorization": "Basic " + authKey})
Future<List<User>> getUsers(@Query("fromDate") DateTime from, @Query("toDate") DateTime to);
So that the DateTime parameters are serialized to ISO8061 format and the output query looks like the following:
[GET] https://address.com/users?fromDate=2021-02-21T12:00:00.000Z&toDate=2021-02-27T12:00:00.000Z
I'm already using Flutter retrofit lib (which internally utilizes Flutter dio).
How can I do this?