TileDisplay.fadeIn constructor

const TileDisplay.fadeIn({
  1. Duration duration,
  2. double startOpacity,
  3. double reloadStartOpacity,
})

Fade in the tile when it is loaded. Not that opacity is not supported when fading is enabled. This is because underlying tiles are kept when fading in a new tile until it is loaded and with a partially transparent tile they are both visible during fading which causes flickering.

If you wish to make the TileLayer transparent you must disable fading (see the TileDisplay.instantaneous opacity option) or wrap the whole TileLayer in an Opacity widget.

Implementation

const factory TileDisplay.fadeIn({
  /// Duration of the fade. Defaults to 100ms.
  Duration duration,

  /// Opacity start value when a tile is faded in, default 1.0. The allowed
  /// range is (0.0 - 1.0).
  double startOpacity,

  /// Opacity start value when a tile is reloaded, default 1.0. A tile reload
  /// will occur when the provider tile url changes and
  /// [TileLayer.overrideTilesWhenUrlChanges] is true. Valid range is
  /// (0.0 - 1.0).
  double reloadStartOpacity,
}) = FadeInTileDisplay._;