FlatIconTextButton constructor

FlatIconTextButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. Clip? clipBehavior,
  4. FocusNode? focusNode,
  5. double spacing = 5.0,
  6. required Widget icon,
  7. required Widget label,
})

Creates a FlatIconTextButton widget with the specified properties.

The icon and label parameters are required, while the others are optional.

Implementation

FlatIconTextButton({
  super.key,
  super.onPressed,
  super.clipBehavior,
  super.focusNode,
  double spacing = 5.0,
  required Widget icon,
  required Widget label,
}) : super(
       style: TextButton.styleFrom(
         padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2),
         maximumSize: const Size(double.infinity, kBottomNavigationBarHeight),
       ),
       child: Column(
         mainAxisSize: MainAxisSize.min,
         children: <Widget>[
           icon,
           SizedBox(height: spacing),
           label,
         ],
       ),
     );