1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 11:43:30 +01:00
git-touch-android-ios-app/lib/widgets/action_entry.dart

29 lines
750 B
Dart
Raw Normal View History

2020-01-04 15:47:48 +01:00
import 'package:flutter/cupertino.dart';
2019-09-28 18:25:14 +02:00
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:
2020-01-04 15:47:48 +01:00
return CupertinoButton(
minSize: 0,
2019-09-29 07:47:18 +02:00
child: Icon(iconData, size: 22),
2020-01-04 15:47:48 +01:00
padding: EdgeInsets.zero,
onPressed: onTap,
2019-09-28 18:25:14 +02:00
);
default:
return IconButton(
icon: Icon(iconData),
onPressed: onTap,
);
}
}
}