1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 03:33:42 +01:00
git-touch-android-ios-app/lib/widgets/mutation_button.dart
2020-01-27 15:08:10 +08:00

36 lines
855 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:git_touch/models/theme.dart';
import 'package:provider/provider.dart';
class MutationButton extends StatelessWidget {
final String text;
final VoidCallback onPressed;
MutationButton({
@required this.text,
@required this.onPressed,
});
@override
Widget build(BuildContext context) {
final theme = Provider.of<ThemeModel>(context);
return CupertinoButton(
onPressed: onPressed,
minSize: 0,
color: theme.paletteOf(context).primary,
padding: EdgeInsets.symmetric(
horizontal: 12,
vertical: 4,
),
borderRadius: BorderRadius.all(Radius.circular(20)),
child: Text(
text,
style: TextStyle(
fontSize: 17,
color: theme.paletteOf(context).background,
),
),
);
}
}