minor fixes
This commit is contained in:
parent
930ca0e1f0
commit
a3543a7c69
5 changed files with 78 additions and 61 deletions
|
@ -289,7 +289,7 @@ class ImageEntry {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (exception, stack) {
|
} catch (exception, stack) {
|
||||||
debugPrint('$runtimeType addAddressToMetadata failed with path=$path coordinates=$coordinates exception=$exception\n$stack');
|
debugPrint('$runtimeType locate failed with path=$path coordinates=$coordinates exception=$exception\n$stack');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,53 +36,59 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('New Album'),
|
title: Text('New Album'),
|
||||||
content: ListView(
|
content: Container(
|
||||||
shrinkWrap: true,
|
// workaround because the dialog tries
|
||||||
children: [
|
// to size itself to the content intrinsic size,
|
||||||
if (_allVolumes.length > 1) ...[
|
// but the `ListView` viewport does not have one
|
||||||
|
width: double.maxFinite,
|
||||||
|
child: ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
children: [
|
||||||
|
if (_allVolumes.length > 1) ...[
|
||||||
|
Padding(
|
||||||
|
padding: Constants.dialogContentHorizontalPadding,
|
||||||
|
child: Text('Storage:'),
|
||||||
|
),
|
||||||
|
..._allVolumes.map((volume) => RadioListTile<StorageVolume>(
|
||||||
|
value: volume,
|
||||||
|
groupValue: _selectedVolume,
|
||||||
|
onChanged: (volume) {
|
||||||
|
_selectedVolume = volume;
|
||||||
|
_checkAlbumExists();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: Text(
|
||||||
|
volume.description,
|
||||||
|
softWrap: false,
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
volume.path,
|
||||||
|
softWrap: false,
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
],
|
||||||
Padding(
|
Padding(
|
||||||
padding: Constants.dialogContentHorizontalPadding,
|
padding: Constants.dialogContentHorizontalPadding,
|
||||||
child: Text('Storage:'),
|
child: ValueListenableBuilder<bool>(
|
||||||
|
valueListenable: _existsNotifier,
|
||||||
|
builder: (context, exists, child) {
|
||||||
|
return TextField(
|
||||||
|
controller: _nameController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
helperText: exists ? 'Album already exists' : '',
|
||||||
|
),
|
||||||
|
onChanged: (_) => _checkAlbumExists(),
|
||||||
|
onSubmitted: (_) => _submit(context),
|
||||||
|
);
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
..._allVolumes.map((volume) => RadioListTile<StorageVolume>(
|
|
||||||
value: volume,
|
|
||||||
groupValue: _selectedVolume,
|
|
||||||
onChanged: (volume) {
|
|
||||||
_selectedVolume = volume;
|
|
||||||
_checkAlbumExists();
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: Text(
|
|
||||||
volume.description,
|
|
||||||
softWrap: false,
|
|
||||||
overflow: TextOverflow.fade,
|
|
||||||
maxLines: 1,
|
|
||||||
),
|
|
||||||
subtitle: Text(
|
|
||||||
volume.path,
|
|
||||||
softWrap: false,
|
|
||||||
overflow: TextOverflow.fade,
|
|
||||||
maxLines: 1,
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
SizedBox(height: 8),
|
|
||||||
],
|
],
|
||||||
Padding(
|
),
|
||||||
padding: Constants.dialogContentHorizontalPadding,
|
|
||||||
child: ValueListenableBuilder<bool>(
|
|
||||||
valueListenable: _existsNotifier,
|
|
||||||
builder: (context, exists, child) {
|
|
||||||
return TextField(
|
|
||||||
controller: _nameController,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
helperText: exists ? 'Album already exists' : '',
|
|
||||||
),
|
|
||||||
onChanged: (_) => _checkAlbumExists(),
|
|
||||||
onSubmitted: (_) => _submit(context),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.only(top: 20),
|
contentPadding: EdgeInsets.only(top: 20),
|
||||||
actions: [
|
actions: [
|
||||||
|
|
|
@ -22,14 +22,20 @@ class _GroupCollectionDialogState extends State<GroupCollectionDialog> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('Group'),
|
title: Text('Group'),
|
||||||
content: ListView(
|
content: Container(
|
||||||
shrinkWrap: true,
|
// workaround because the dialog tries
|
||||||
children: [
|
// to size itself to the content intrinsic size,
|
||||||
_buildRadioListTile(GroupFactor.album, 'By album'),
|
// but the `ListView` viewport does not have one
|
||||||
_buildRadioListTile(GroupFactor.month, 'By month'),
|
width: double.maxFinite,
|
||||||
_buildRadioListTile(GroupFactor.day, 'By day'),
|
child: ListView(
|
||||||
_buildRadioListTile(GroupFactor.none, 'Do not group'),
|
shrinkWrap: true,
|
||||||
],
|
children: [
|
||||||
|
_buildRadioListTile(GroupFactor.album, 'By album'),
|
||||||
|
_buildRadioListTile(GroupFactor.month, 'By month'),
|
||||||
|
_buildRadioListTile(GroupFactor.day, 'By day'),
|
||||||
|
_buildRadioListTile(GroupFactor.none, 'Do not group'),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.only(top: 20),
|
contentPadding: EdgeInsets.only(top: 20),
|
||||||
actions: [
|
actions: [
|
||||||
|
|
|
@ -22,13 +22,19 @@ class _SortCollectionDialogState extends State<SortCollectionDialog> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('Sort'),
|
title: Text('Sort'),
|
||||||
content: ListView(
|
content: Container(
|
||||||
shrinkWrap: true,
|
// workaround because the dialog tries
|
||||||
children: [
|
// to size itself to the content intrinsic size,
|
||||||
_buildRadioListTile(SortFactor.date, 'By date'),
|
// but the `ListView` viewport does not have one
|
||||||
_buildRadioListTile(SortFactor.size, 'By size'),
|
width: double.maxFinite,
|
||||||
_buildRadioListTile(SortFactor.name, 'By album & file name'),
|
child: ListView(
|
||||||
],
|
shrinkWrap: true,
|
||||||
|
children: [
|
||||||
|
_buildRadioListTile(SortFactor.date, 'By date'),
|
||||||
|
_buildRadioListTile(SortFactor.size, 'By size'),
|
||||||
|
_buildRadioListTile(SortFactor.name, 'By album & file name'),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.only(top: 20),
|
contentPadding: EdgeInsets.only(top: 20),
|
||||||
actions: [
|
actions: [
|
||||||
|
|
|
@ -140,8 +140,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
child: Markdown(
|
child: Markdown(
|
||||||
data: terms,
|
data: terms,
|
||||||
// TODO TLAD make it selectable when this fix (in 1.18.0-6.0.pre) lands on stable: https://github.com/flutter/flutter/pull/54479
|
selectable: true,
|
||||||
selectable: false,
|
|
||||||
onTapLink: (url) async {
|
onTapLink: (url) async {
|
||||||
if (await canLaunch(url)) {
|
if (await canLaunch(url)) {
|
||||||
await launch(url);
|
await launch(url);
|
||||||
|
|
Loading…
Reference in a new issue