use theme button text style
This commit is contained in:
parent
8b06e6c86c
commit
85517012ae
3 changed files with 12 additions and 8 deletions
|
@ -133,16 +133,17 @@ class EntryActionDelegate with PermissionAwareMixin {
|
||||||
final confirmed = await showDialog<bool>(
|
final confirmed = await showDialog<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
final buttonStyle = Theme.of(context).textTheme.button;
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
content: const Text('Are you sure?'),
|
content: const Text('Are you sure?'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: const Text('CANCEL'),
|
child: Text('Cancel', style: buttonStyle),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: const Text('DELETE'),
|
child: Text('Delete', style: buttonStyle),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -172,6 +173,7 @@ class EntryActionDelegate with PermissionAwareMixin {
|
||||||
final newName = await showDialog<String>(
|
final newName = await showDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
final buttonStyle = Theme.of(context).textTheme.button;
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
content: TextField(
|
content: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
|
@ -180,11 +182,11 @@ class EntryActionDelegate with PermissionAwareMixin {
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: const Text('CANCEL'),
|
child: Text('Cancel', style: buttonStyle),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context, controller.text),
|
onPressed: () => Navigator.pop(context, controller.text),
|
||||||
child: const Text('APPLY'),
|
child: Text('Apply', style: buttonStyle),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,17 +22,18 @@ mixin PermissionAwareMixin {
|
||||||
final confirmed = await showDialog<bool>(
|
final confirmed = await showDialog<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
final buttonStyle = Theme.of(context).textTheme.button;
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: const Text('Storage Volume Access'),
|
title: const Text('Storage Volume Access'),
|
||||||
content: Text('Please select the root directory of “${volume.description}” in the next screen, so that this app can access it and complete your request.'),
|
content: Text('Please select the root directory of “${volume.description}” in the next screen, so that this app can access it and complete your request.'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: const Text('CANCEL'),
|
child: Text('Cancel', style: buttonStyle),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: const Text('OK'),
|
child: Text('OK', style: buttonStyle),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -40,16 +40,17 @@ class SelectionActionDelegate with PermissionAwareMixin {
|
||||||
final confirmed = await showDialog<bool>(
|
final confirmed = await showDialog<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
final buttonStyle = Theme.of(context).textTheme.button;
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
content: Text('Are you sure you want to delete ${Intl.plural(count, one: 'this item', other: 'these ${count} items')}?'),
|
content: Text('Are you sure you want to delete ${Intl.plural(count, one: 'this item', other: 'these ${count} items')}?'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: const Text('CANCEL'),
|
child: Text('Cancel', style: buttonStyle),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: const Text('DELETE'),
|
child: Text('Delete', style: buttonStyle),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue