mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-05 19:29:37 -05:00
improvement: action tap effect
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user