NZFloatingActionButton.icon constructor

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

快速创建仅图标样式 FAB

Implementation

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