getAllReadChapters function Null safety
Implementation
Future<ReadChapters?> getAllReadChapters(String token, String mangaId) async {
// get all read chapters for the given mangaId,
var unencodedPath = '/manga/$mangaId/read';
final uri = 'https://$authority$unencodedPath?';
var response = await http.get(Uri.parse(uri), headers: {
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token'
});
return ReadChapters.fromJson(jsonDecode(response.body));
}