image property

String image
final

The image displayed on the button.

Supports these formats:

  • Asset path: images/flutter_logo.png (from pubspec.yaml assets)
  • SVG asset: images/icon.svg (rasterized to PNG before being sent to the native side; remote/file:// SVGs are not supported)
  • File path: file:///path/to/image.png (local file on device)
  • Network URL: https://example.com/image.png (remote image)

! When creating a grid button, do NOT provide an animated image. If you do, the button uses the first image in the animation sequence. iOS 12.0+ | iPadOS 12.0+ | Mac Catalyst 13.1+

Implementation

final String image;