Add "ALT" button to gallery thumbnails so can quickly see values

codemagic-setup
Hank Grabowski 2023-04-29 20:42:34 -04:00
rodzic 9beefcc5ba
commit 605e9682e6
2 zmienionych plików z 80 dodań i 35 usunięć

Wyświetl plik

@ -131,12 +131,34 @@ class GalleryScreen extends StatelessWidget {
height: thumbnailDimension,
imageUrl: image.thumbnailUrl,
),
if (image.description.isNotEmpty)
Positioned(
bottom: 5.0,
left: 5.0,
child: ElevatedButton(
onPressed: () async => await showImageCaption(
context,
image.description,
),
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.7)),
child: const Text('ALT'),
),
),
Positioned(
bottom: 5.0,
right: 5.0,
child: Icon(image.visibility.type == VisibilityType.public
? Icons.public
: Icons.lock),
child: Card(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.7),
child: Icon(
image.visibility.type == VisibilityType.public
? Icons.public
: Icons.lock),
),
),
],
),
@ -145,4 +167,27 @@ class GalleryScreen extends StatelessWidget {
);
});
}
Future<void> showImageCaption(BuildContext context, String text) async {
await showDialog<bool>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
content: Text(
text,
softWrap: true,
),
actions: <Widget>[
ElevatedButton(
child: const Text('Dismiss'),
onPressed: () {
Navigator.pop(context, true); // showDialog() returns true
},
),
],
);
},
);
}
}

Wyświetl plik

@ -269,10 +269,10 @@ packages:
dependency: "direct main"
description:
name: device_info_plus
sha256: "4fb13cf762bd84c4739eb7a5d8230f41493a749728dd2666ca259f7e4462eb2e"
sha256: f52ab3b76b36ede4d135aab80194df8925b553686f0fa12226b4e2d658e45903
url: "https://pub.dev"
source: hosted
version: "8.2.1"
version: "8.2.2"
device_info_plus_platform_interface:
dependency: transitive
description:
@ -391,10 +391,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf
sha256: "8ffe990dac54a4a5492747added38571a5ab474c8e5d196809ea08849c69b1bb"
url: "https://pub.dev"
source: hosted
version: "2.0.9"
version: "2.0.13"
flutter_portal:
dependency: transitive
description:
@ -545,10 +545,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: "4d141302e68dcdec0949ac798b5a8cf307eb6f79c70830ef1a2aec9b31827c28"
sha256: bd7e671d26fd39c78cba82070fa34ef1f830b0e7ed1aeebccabc6561302a7ee5
url: "https://pub.dev"
source: hosted
version: "6.5.8"
version: "6.5.9"
graphs:
dependency: transitive
description:
@ -593,10 +593,10 @@ packages:
dependency: "direct main"
description:
name: image
sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227"
sha256: "73964e3609fb96e01e69b0924b939967c556e46c7ff05db2ea9e31019000f4ef"
url: "https://pub.dev"
source: hosted
version: "4.0.15"
version: "4.0.16"
image_picker:
dependency: "direct main"
description:
@ -609,10 +609,10 @@ packages:
dependency: transitive
description:
name: image_picker_android
sha256: "1ea6870350f56af8dab716459bd9d5dc76947e29e07a2ba1d0c172eaaf4f269c"
sha256: "7d2b25e0aec884495d782bb60cd09f779a92370035374c5ec622d09782ac68fe"
url: "https://pub.dev"
source: hosted
version: "0.8.6+7"
version: "0.8.6+10"
image_picker_for_web:
dependency: transitive
description:
@ -713,18 +713,18 @@ packages:
dependency: "direct main"
description:
name: media_kit
sha256: "47292aae58bb0b118b7097d3aba1db86807b5ea8ecf056f1a2493663b801ff29"
sha256: d9a32b3f6eafdfbba6aff2e37045a3a80009b6dfbdeec638d51d85e8b254a6a2
url: "https://pub.dev"
source: hosted
version: "0.0.6"
version: "0.0.7+1"
media_kit_libs_android_video:
dependency: "direct main"
description:
name: media_kit_libs_android_video
sha256: "25bf160a477628e5c39ee7c73978ba03a910e0a9d9500d2f4454346d2aef246d"
sha256: b80aad84e038cdb641b941cefc2a7e9366881d19a14292f613c32ae6ec810e40
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "1.0.3"
media_kit_libs_ios_video:
dependency: "direct main"
description:
@ -745,10 +745,10 @@ packages:
dependency: "direct main"
description:
name: media_kit_libs_macos_video
sha256: ab1cbdf51400e30a9087bd7d6e10c6130d17296e76313fedd0ef0c57dae8c0f4
sha256: c4d3706af5a67bf194d8208eef5cf29ea79e64931ea9bcd50f665b9a438f8416
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
media_kit_libs_windows_video:
dependency: "direct main"
description:
@ -769,10 +769,10 @@ packages:
dependency: "direct main"
description:
name: media_kit_video
sha256: c6db00eded195c1a8d91fc39d74f706f4db125ba03f0fe4bc9b33d46c6d133cc
sha256: "634872ca85575e5756c466af04d1adbdb5178315d7f801901b8c731fae314c66"
url: "https://pub.dev"
source: hosted
version: "0.0.8"
version: "0.0.9"
meta:
dependency: transitive
description:
@ -873,10 +873,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: da97262be945a72270513700a92b39dd2f4a54dad55d061687e2e37a6390366a
sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86"
url: "https://pub.dev"
source: hosted
version: "2.0.25"
version: "2.0.27"
path_provider_foundation:
dependency: transitive
description:
@ -1018,10 +1018,10 @@ packages:
dependency: "direct main"
description:
name: scrollable_positioned_list
sha256: ca7fcaa743db712d4f7b1580526f494d0093c77a721a65705ee51fbeac7a2bd3
sha256: "45806e0d64aa9dcbf4ced336eabff766dd7ba734014fd71c89bc08241c02bfc5"
url: "https://pub.dev"
source: hosted
version: "0.3.5"
version: "0.3.6"
shared_preferences:
dependency: "direct main"
description:
@ -1034,10 +1034,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "7fa90471a6875d26ad78c7e4a675874b2043874586891128dc5899662c97db46"
sha256: "6478c6bbbecfe9aced34c483171e90d7c078f5883558b30ec3163cf18402c749"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.4"
shared_preferences_foundation:
dependency: transitive
description:
@ -1119,18 +1119,18 @@ packages:
dependency: transitive
description:
name: sqflite
sha256: e7dfb6482d5d02b661d0b2399efa72b98909e5aa7b8336e1fb37e226264ade00
sha256: "8453780d1f703ead201a39673deb93decf85d543f359f750e2afc4908b55533f"
url: "https://pub.dev"
source: hosted
version: "2.2.7"
version: "2.2.8"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "220831bf0bd5333ff2445eee35ec131553b804e6b5d47a4a37ca6f5eb66e282c"
sha256: e77abf6ff961d69dfef41daccbb66b51e9983cdd5cb35bf30733598057401555
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
sqlite3:
dependency: "direct main"
description:
@ -1247,10 +1247,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: a52628068d282d01a07cd86e6ba99e497aa45ce8c91159015b2416907d78e411
sha256: "22f8db4a72be26e9e3a4aa3f194b1f7afbc76d20ec141f84be1d787db2155cbd"
url: "https://pub.dev"
source: hosted
version: "6.0.27"
version: "6.0.31"
url_launcher_ios:
dependency: transitive
description:
@ -1327,10 +1327,10 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: a592048a711d5739d9cea2255d425779f138d41095b9149bda60ce4bc1af8871
sha256: "318c83a6329032eee2a90eafedf88da94dd0cd8bb2c2d0d5117764da25c697ff"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.6"
video_player_avfoundation:
dependency: transitive
description: