Skip to content

Commit

Permalink
Merge pull request #96 from KCreek1/main
Browse files Browse the repository at this point in the history
Clarify acousticness
  • Loading branch information
riverscuomo authored Nov 18, 2024
2 parents 41e5d75 + e97c365 commit 777f980
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 19 deletions.
9 changes: 9 additions & 0 deletions lib/widgets/bottom_sheets/bottom_sheets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,12 @@ void showSettingsInfoBottomSheet(BuildContext context) {
showImage: true,
);
}

void showAcousticnessInfoBottomSheet(BuildContext context) {
CustomBottomSheet.show(
context: context,
title: const Text('About Acousticness'),
content: buildAcousticnessInfoSheetContent(context),
showImage: true,
);
}
17 changes: 17 additions & 0 deletions lib/widgets/bottom_sheets/spotkin_info_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,20 @@ List<Widget> buildSettingsInfoSheetContent(BuildContext context) {
),
];
}

List<Widget> buildAcousticnessInfoSheetContent(BuildContext context) {
final theme = Theme.of(context);

return [
Text(
'Higher values (closer to 100) indicate that a track has strong acoustic qualities, meaning it likely features traditional acoustic instruments (like guitar, piano, or vocals without heavy electronic processing).',
style: theme.textTheme.bodyMedium,
),
gap,
Text(
'Lower values (closer to 0) suggest that a track is more likely to be produced electronically or features heavier processing, synthetic sounds, or amplified instrumentation.',
style: theme.textTheme.bodyMedium,
)
];
}

16 changes: 16 additions & 0 deletions lib/widgets/info_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,19 @@ class SettingsInfoButton extends StatelessWidget {
);
}
}

class AcousticnessInfoButton extends StatelessWidget {
const AcousticnessInfoButton({
super.key,
});

@override
Widget build(BuildContext context) {
return IconButton(
icon: const Icon(Icons.info),
onPressed: () {
showAcousticnessInfoBottomSheet(context);
},
);
}
}
16 changes: 11 additions & 5 deletions lib/widgets/settings_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,17 @@ class _SettingsCardState extends State<SettingsCard> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.titleSmall!.copyWith(
fontSize: 16,
),
Row(
children: [
Text(
title,
style: Theme.of(context).textTheme.titleSmall!.copyWith(
fontSize: 16,
),
),
if (title == 'Acousticness') // add button for acousticness info
const AcousticnessInfoButton(),
],
),
const SizedBox(height: 8),
Row(
Expand Down
28 changes: 14 additions & 14 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,26 +316,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
lints:
dependency: transitive
description:
Expand All @@ -356,18 +356,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.15.0"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -561,10 +561,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.2"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -681,10 +681,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.2.4"
web:
dependency: transitive
description:
Expand Down

0 comments on commit 777f980

Please sign in to comment.