FlatIconTextButton constructor

FlatIconTextButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. Clip? clipBehavior,
  4. FocusNode? focusNode,
  5. required Widget icon,
  6. 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,
  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,
            const SizedBox(height: 5.0),
            label,
          ],
        ),
      );