reportImageStatus function Null safety

Future<void> reportImageStatus(
  1. String pageUrl,
  2. bool success,
  3. bool cached,
  4. int bytes,
  5. int duration
)

Report the mangadex at-home servers if a chapter page/image is unretrieveable

Implementation

Future<void> reportImageStatus(
    String pageUrl, bool success, bool cached, int bytes, int duration) async {
  final uri = 'https://api.mangadex.network/report';
  await http.post(Uri.parse(uri), headers: {
    HttpHeaders.contentTypeHeader: 'application/json',
    'url': pageUrl,
    'success': '$success',
    'cached': '$cached',
    'bytes': '$bytes',
    'duration': '$duration',
  });
}