From 092f53c109b007e350e3bb6d20f4b2634da17da9 Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Fri, 19 Jan 2024 00:40:07 -0600 Subject: [PATCH] cleanup --- .../lib/src/mocktail_image_network.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/mocktail_image_network/lib/src/mocktail_image_network.dart b/packages/mocktail_image_network/lib/src/mocktail_image_network.dart index c670ec8..4f7d6d3 100644 --- a/packages/mocktail_image_network/lib/src/mocktail_image_network.dart +++ b/packages/mocktail_image_network/lib/src/mocktail_image_network.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'dart:typed_data'; import 'package:mocktail/mocktail.dart'; @@ -38,13 +39,12 @@ import 'package:mocktail/mocktail.dart'; /// } /// ``` /// {@endtemplate} -T mockNetworkImages( - T Function() body, { - List imageBytes = _transparentPixelPng, -}) { +T mockNetworkImages(T Function() body, {Uint8List? imageBytes}) { return HttpOverrides.runZoned( body, - createHttpClient: (_) => _createHttpClient(data: imageBytes), + createHttpClient: (_) => _createHttpClient( + data: imageBytes ?? _transparentPixelPng, + ), ); }