mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-04 10:49:37 -05:00
improvement: style tweaks
This commit is contained in:
32
lib/widgets/mutation_button.dart
Normal file
32
lib/widgets/mutation_button.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
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.palette.primary,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 4,
|
||||
),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(fontSize: 16, color: theme.palette.background),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user