Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Jan 19, 2024
1 parent 169d919 commit 092f53c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:mocktail/mocktail.dart';

Expand Down Expand Up @@ -38,13 +39,12 @@ import 'package:mocktail/mocktail.dart';
/// }
/// ```
/// {@endtemplate}
T mockNetworkImages<T>(
T Function() body, {
List<int> imageBytes = _transparentPixelPng,
}) {
T mockNetworkImages<T>(T Function() body, {Uint8List? imageBytes}) {
return HttpOverrides.runZoned(
body,
createHttpClient: (_) => _createHttpClient(data: imageBytes),
createHttpClient: (_) => _createHttpClient(
data: imageBytes ?? _transparentPixelPng,
),
);
}

Expand Down

0 comments on commit 092f53c

Please sign in to comment.