felangel / mocktail

A mock library for Dart inspired by mockito
https://pub.dev/packages/mocktail
MIT License
617 stars 81 forks source link

feat(mocktail_image_network): add ability to mock images by url #232

Closed pedrox-hs closed 3 months ago

pedrox-hs commented 7 months ago

Status

READY

Breaking Changes

NO

Description

This Pull Request enhances the mockNetworkImages utility method by introducing an optional imageMockProvider parameter. This allows users to provide custom mock image data based on the URI. It refactors the HttpClient creation process to allow dynamic generation of mock responses based on requested URIs using this provider. Additionally, default mock data for SVG file type is provided.

Also, fix flutter_svg compatibility.

closes #239

Type of Change