mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 屏幕阅读器点击按钮无声
This commit is contained in:
@@ -3,12 +3,10 @@ import 'package:flutter/material.dart';
|
||||
class ComBtn extends StatelessWidget {
|
||||
final Widget? icon;
|
||||
final Function? fuc;
|
||||
final String tooltip;
|
||||
|
||||
const ComBtn({
|
||||
this.icon,
|
||||
this.fuc,
|
||||
required this.tooltip,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@@ -17,15 +15,11 @@ class ComBtn extends StatelessWidget {
|
||||
return SizedBox(
|
||||
width: 34,
|
||||
height: 34,
|
||||
child: IconButton(
|
||||
tooltip: tooltip,
|
||||
style: ButtonStyle(
|
||||
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
fuc!();
|
||||
},
|
||||
icon: icon!,
|
||||
child: icon!,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user