QOL: Add Long Press to mih button
This commit is contained in:
parent
6ecce1e9ff
commit
5f5107ee99
1 changed files with 3 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class MihButton extends StatelessWidget {
|
||||
final void Function()? onPressed;
|
||||
final void Function()? onLongPressed;
|
||||
final Color buttonColor;
|
||||
final double? width;
|
||||
final double? height;
|
||||
|
|
@ -12,6 +13,7 @@ class MihButton extends StatelessWidget {
|
|||
const MihButton({
|
||||
super.key,
|
||||
required this.onPressed,
|
||||
this.onLongPressed,
|
||||
required this.buttonColor,
|
||||
this.width,
|
||||
this.height,
|
||||
|
|
@ -49,6 +51,7 @@ class MihButton extends StatelessWidget {
|
|||
highlightColor: rippleColor.withValues(alpha: 0.2),
|
||||
hoverColor: rippleColor.withValues(alpha: 0.3),
|
||||
onTap: onPressed,
|
||||
onLongPress: onLongPressed,
|
||||
child: Container(
|
||||
width: width,
|
||||
height: height,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue