1

I have a test which has to load a screen which contains the FlutterMap widget. Unfortunately the test throws an exception because all http calls for the map tile images return a 400 response. I would have to mock a http client that responds with an example image as the body but couldn't find a way to do so. What is the best way to go about this?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Kulpas
  • 167
  • 1
  • 9

1 Answers1

0

In the TileLayer, it should be possible to specify a tileProvider. In this case, you should be able to use NetworkTileProvider, as is the default, but it is possible to pass in a custom BaseClient, if that fits your needs. For more information, see https://docs.fleaflet.dev/layers/tile-layer/tile-providers#network-tile-provider.

JaffaKetchup
  • 1,151
  • 10
  • 26