use new Material buttons
This commit is contained in:
parent
c163e21910
commit
0110b82c52
14 changed files with 47 additions and 32 deletions
|
@ -65,6 +65,21 @@ class _AvesAppState extends State<AvesApp> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
primary: accentColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
primary: accentColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
primary: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget get firstPage => settings.hasAcceptedTerms ? HomePage() : WelcomePage();
|
Widget get firstPage => settings.hasAcceptedTerms ? HomePage() : WelcomePage();
|
||||||
|
|
|
@ -48,14 +48,14 @@ class _AddShortcutDialogState extends State<AddShortcutDialog> {
|
||||||
onSubmitted: (_) => _submit(context),
|
onSubmitted: (_) => _submit(context),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<bool>(
|
ValueListenableBuilder<bool>(
|
||||||
valueListenable: _isValidNotifier,
|
valueListenable: _isValidNotifier,
|
||||||
builder: (context, isValid, child) {
|
builder: (context, isValid, child) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: isValid ? () => _submit(context) : null,
|
onPressed: isValid ? () => _submit(context) : null,
|
||||||
child: Text('Add'.toUpperCase()),
|
child: Text('Add'.toUpperCase()),
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,14 +92,14 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<bool>(
|
ValueListenableBuilder<bool>(
|
||||||
valueListenable: _isValidNotifier,
|
valueListenable: _isValidNotifier,
|
||||||
builder: (context, isValid, child) {
|
builder: (context, isValid, child) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: isValid ? () => _submit(context) : null,
|
onPressed: isValid ? () => _submit(context) : null,
|
||||||
child: Text('Create'.toUpperCase()),
|
child: Text('Create'.toUpperCase()),
|
||||||
);
|
);
|
||||||
|
|
|
@ -127,11 +127,11 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
||||||
return AvesDialog(
|
return AvesDialog(
|
||||||
content: Text('Are you sure?'),
|
content: Text('Are you sure?'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: Text('Delete'.toUpperCase()),
|
child: Text('Delete'.toUpperCase()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -28,11 +28,11 @@ mixin PermissionAwareMixin {
|
||||||
title: 'Storage Volume Access',
|
title: 'Storage Volume Access',
|
||||||
content: Text('Please select the $dirDisplayName directory of “$volumeDescription” in the next screen, so that this app can access it and complete your request.'),
|
content: Text('Please select the $dirDisplayName directory of “$volumeDescription” in the next screen, so that this app can access it and complete your request.'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: Text('OK'.toUpperCase()),
|
child: Text('OK'.toUpperCase()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -54,14 +54,14 @@ class _RenameAlbumDialogState extends State<RenameAlbumDialog> {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<bool>(
|
ValueListenableBuilder<bool>(
|
||||||
valueListenable: _isValidNotifier,
|
valueListenable: _isValidNotifier,
|
||||||
builder: (context, isValid, child) {
|
builder: (context, isValid, child) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: isValid ? () => _submit(context) : null,
|
onPressed: isValid ? () => _submit(context) : null,
|
||||||
child: Text('Apply'.toUpperCase()),
|
child: Text('Apply'.toUpperCase()),
|
||||||
);
|
);
|
||||||
|
|
|
@ -48,14 +48,14 @@ class _RenameEntryDialogState extends State<RenameEntryDialog> {
|
||||||
onSubmitted: (_) => _submit(context),
|
onSubmitted: (_) => _submit(context),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<bool>(
|
ValueListenableBuilder<bool>(
|
||||||
valueListenable: _isValidNotifier,
|
valueListenable: _isValidNotifier,
|
||||||
builder: (context, isValid, child) {
|
builder: (context, isValid, child) {
|
||||||
return FlatButton(
|
return TextButton(
|
||||||
onPressed: isValid ? () => _submit(context) : null,
|
onPressed: isValid ? () => _submit(context) : null,
|
||||||
child: Text('Apply'.toUpperCase()),
|
child: Text('Apply'.toUpperCase()),
|
||||||
);
|
);
|
||||||
|
|
|
@ -148,11 +148,11 @@ class SelectionActionDelegate with FeedbackMixin, PermissionAwareMixin {
|
||||||
return AvesDialog(
|
return AvesDialog(
|
||||||
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(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: Text('Delete'.toUpperCase()),
|
child: Text('Delete'.toUpperCase()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -38,7 +38,7 @@ class _AvesSelectionDialogState<T> extends State<AvesSelectionDialog> {
|
||||||
title: widget.title,
|
title: widget.title,
|
||||||
scrollableContent: widget.options.entries.map((kv) => _buildRadioListTile(kv.key, kv.value)).toList(),
|
scrollableContent: widget.options.entries.map((kv) => _buildRadioListTile(kv.key, kv.value)).toList(),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -103,7 +103,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('Crashlytics'),
|
child: Text('Crashlytics'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: FirebaseCrashlytics.instance.crash,
|
onPressed: FirebaseCrashlytics.instance.crash,
|
||||||
child: Text('Crash'),
|
child: Text('Crash'),
|
||||||
),
|
),
|
||||||
|
@ -123,7 +123,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('Image cache:\n\t${imageCache.currentSize}/${imageCache.maximumSize} items\n\t${formatFilesize(imageCache.currentSizeBytes)}/${formatFilesize(imageCache.maximumSizeBytes)}'),
|
child: Text('Image cache:\n\t${imageCache.currentSize}/${imageCache.maximumSize} items\n\t${formatFilesize(imageCache.currentSizeBytes)}/${formatFilesize(imageCache.maximumSizeBytes)}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
imageCache.clear();
|
imageCache.clear();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -138,7 +138,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('SVG cache: ${PictureProvider.cacheCount} items'),
|
child: Text('SVG cache: ${PictureProvider.cacheCount} items'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
PictureProvider.clearCache();
|
PictureProvider.clearCache();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -153,7 +153,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('Glide disk cache: ?'),
|
child: Text('Glide disk cache: ?'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: ImageFileService.clearSizedThumbnailDiskCache,
|
onPressed: ImageFileService.clearSizedThumbnailDiskCache,
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -171,7 +171,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB file size: ${formatFilesize(snapshot.data)}'),
|
child: Text('DB file size: ${formatFilesize(snapshot.data)}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => metadataDb.reset().then((_) => _startDbReport()),
|
onPressed: () => metadataDb.reset().then((_) => _startDbReport()),
|
||||||
child: Text('Reset'),
|
child: Text('Reset'),
|
||||||
),
|
),
|
||||||
|
@ -190,7 +190,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB entry rows: ${snapshot.data.length}'),
|
child: Text('DB entry rows: ${snapshot.data.length}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => metadataDb.clearEntries().then((_) => _startDbReport()),
|
onPressed: () => metadataDb.clearEntries().then((_) => _startDbReport()),
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -209,7 +209,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB date rows: ${snapshot.data.length}'),
|
child: Text('DB date rows: ${snapshot.data.length}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => metadataDb.clearDates().then((_) => _startDbReport()),
|
onPressed: () => metadataDb.clearDates().then((_) => _startDbReport()),
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -228,7 +228,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB metadata rows: ${snapshot.data.length}'),
|
child: Text('DB metadata rows: ${snapshot.data.length}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => metadataDb.clearMetadataEntries().then((_) => _startDbReport()),
|
onPressed: () => metadataDb.clearMetadataEntries().then((_) => _startDbReport()),
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -247,7 +247,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB address rows: ${snapshot.data.length}'),
|
child: Text('DB address rows: ${snapshot.data.length}'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => metadataDb.clearAddresses().then((_) => _startDbReport()),
|
onPressed: () => metadataDb.clearAddresses().then((_) => _startDbReport()),
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -266,7 +266,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('DB favourite rows: ${snapshot.data.length} (${favourites.count} in memory)'),
|
child: Text('DB favourite rows: ${snapshot.data.length} (${favourites.count} in memory)'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => favourites.clear().then((_) => _startDbReport()),
|
onPressed: () => favourites.clear().then((_) => _startDbReport()),
|
||||||
child: Text('Clear'),
|
child: Text('Clear'),
|
||||||
),
|
),
|
||||||
|
@ -288,7 +288,7 @@ class DebugPageState extends State<DebugPage> {
|
||||||
child: Text('Settings'),
|
child: Text('Settings'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () => settings.reset().then((_) => setState(() {})),
|
onPressed: () => settings.reset().then((_) => setState(() {})),
|
||||||
child: Text('Reset'),
|
child: Text('Reset'),
|
||||||
),
|
),
|
||||||
|
|
|
@ -65,11 +65,11 @@ class AlbumChipActionDelegate extends ChipActionDelegate with FeedbackMixin, Per
|
||||||
return AvesDialog(
|
return AvesDialog(
|
||||||
content: Text('Are you sure you want to delete this album and its ${Intl.plural(count, one: 'item', other: '$count items')}?'),
|
content: Text('Are you sure you want to delete this album and its ${Intl.plural(count, one: 'item', other: '$count items')}?'),
|
||||||
actions: [
|
actions: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text('Cancel'.toUpperCase()),
|
child: Text('Cancel'.toUpperCase()),
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context, true),
|
onPressed: () => Navigator.pop(context, true),
|
||||||
child: Text('Delete'.toUpperCase()),
|
child: Text('Delete'.toUpperCase()),
|
||||||
),
|
),
|
||||||
|
|
|
@ -176,7 +176,7 @@ class _FullscreenDebugPageState extends State<FullscreenDebugPage> {
|
||||||
child: Text('DB'),
|
child: Text('DB'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await metadataDb.removeIds([entry.contentId]);
|
await metadataDb.removeIds([entry.contentId]);
|
||||||
_loadDatabase();
|
_loadDatabase();
|
||||||
|
|
|
@ -46,13 +46,13 @@ class _GrantedDirectoriesState extends State<GrantedDirectories> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Text(path, style: textTheme.caption)),
|
Expanded(child: Text(path, style: textTheme.caption)),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
OutlineButton(
|
OutlinedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await AndroidFileService.revokeDirectoryAccess(path);
|
await AndroidFileService.revokeDirectoryAccess(path);
|
||||||
_load();
|
_load();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: Text('Revoke'),
|
child: Text('Revoke'.toUpperCase()),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
|
|
@ -110,7 +110,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final button = RaisedButton(
|
final button = ElevatedButton(
|
||||||
key: Key('continue-button'),
|
key: Key('continue-button'),
|
||||||
child: Text('Continue'),
|
child: Text('Continue'),
|
||||||
onPressed: _hasAcceptedTerms
|
onPressed: _hasAcceptedTerms
|
||||||
|
|
Loading…
Reference in a new issue