improvement: action tap effect

This commit is contained in:
Rongjian Zhang 2020-01-04 22:47:48 +08:00
parent ffa3ef79d9
commit 68e031ebe5
2 changed files with 9 additions and 4 deletions

View File

@ -48,9 +48,11 @@ class ActionButton extends StatelessWidget {
final theme = Provider.of<ThemeModel>(context);
switch (theme.theme) {
case AppThemeType.cupertino:
return GestureDetector(
return CupertinoButton(
minSize: 0,
child: Icon(iconData, size: 22),
onTap: () async {
padding: EdgeInsets.zero,
onPressed: () async {
var value = await showCupertinoModalPopup<int>(
context: context,
builder: (BuildContext context) {

View File

@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
@ -11,9 +12,11 @@ class ActionEntry extends StatelessWidget {
Widget build(BuildContext context) {
switch (Provider.of<ThemeModel>(context).theme) {
case AppThemeType.cupertino:
return GestureDetector(
return CupertinoButton(
minSize: 0,
child: Icon(iconData, size: 22),
onTap: onTap,
padding: EdgeInsets.zero,
onPressed: onTap,
);
default:
return IconButton(