1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-18 19:22:54 +01:00
git-touch-android-ios-app/lib/widgets/action_entry.dart
2019-09-29 13:47:18 +08:00

26 lines
647 B
Dart

import 'package:flutter/material.dart';
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
class ActionEntry extends StatelessWidget {
final IconData iconData;
final VoidCallback onTap;
ActionEntry({this.iconData, this.onTap});
@override
Widget build(BuildContext context) {
switch (Provider.of<ThemeModel>(context).theme) {
case AppThemeType.cupertino:
return GestureDetector(
child: Icon(iconData, size: 22),
onTap: onTap,
);
default:
return IconButton(
icon: Icon(iconData),
onPressed: onTap,
);
}
}
}