NZFloatingActionButton.image constructor

NZFloatingActionButton.image({
  1. Key? key,
  2. required VoidCallback onPressed,
  3. required ImageProvider<Object> image,
  4. Widget? icon,
  5. bool draggable = false,
  6. Offset initialPosition = const Offset(20, 20),
  7. ScrollController? scrollController,
  8. Object? heroTag,
  9. String? tooltip,
})

快速创建图片背景样式 FAB

Implementation

factory NZFloatingActionButton.image({
  Key? key,
  required VoidCallback onPressed,
  required ImageProvider image,
  Widget? icon,
  bool draggable = false,
  Offset initialPosition = const Offset(20, 20),
  ScrollController? scrollController,
  Object? heroTag,
  String? tooltip,
}) => NZFloatingActionButton(
  key: key,
  onPressed: onPressed,
  image: image,
  icon: icon,
  type: NZFloatingActionButtonType.image,
  draggable: draggable,
  initialPosition: initialPosition,
  scrollController: scrollController,
  heroTag: heroTag,
  tooltip: tooltip,
);