mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-06-21 02:18:03 +00:00
Compare commits
5 Commits
3bdb49c3a5
...
80626ba4b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80626ba4b5 | ||
|
|
b9b59835d9 | ||
|
|
33e1f3bef5 | ||
|
|
e1149537b1 | ||
|
|
2cc8d2620d |
1910
CHANGELOG.md
1910
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,8 @@ extension SpotubeImageExtensions on List<SpotubeImageObject>? {
|
||||
int index = 1,
|
||||
required ImagePlaceholder placeholder,
|
||||
}) {
|
||||
final sortedImage = this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0));
|
||||
final sortedImage =
|
||||
this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0));
|
||||
|
||||
return sortedImage != null && sortedImage.isNotEmpty
|
||||
? sortedImage[
|
||||
|
||||
@ -59,6 +59,7 @@ class SearchPage extends HookConsumerWidget {
|
||||
|
||||
void onSubmitted(String value) {
|
||||
ref.read(searchTermStateProvider.notifier).state = value;
|
||||
focusNode.unfocus();
|
||||
if (value.trim().isEmpty) {
|
||||
return;
|
||||
}
|
||||
@ -127,25 +128,12 @@ class SearchPage extends HookConsumerWidget {
|
||||
)
|
||||
.toList();
|
||||
|
||||
return KeyboardListener(
|
||||
focusNode: focusNode,
|
||||
autofocus: true,
|
||||
onKeyEvent: (value) {
|
||||
final isEnter = value.logicalKey ==
|
||||
LogicalKeyboardKey.enter;
|
||||
|
||||
if (isEnter) {
|
||||
onSubmitted(controller.text);
|
||||
focusNode.unfocus();
|
||||
}
|
||||
},
|
||||
child: AutoComplete(
|
||||
return AutoComplete(
|
||||
suggestions: suggestions.length <= 2
|
||||
? [
|
||||
...suggestions,
|
||||
"Twenty One Pilots",
|
||||
"Linkin Park",
|
||||
"d4vd"
|
||||
]
|
||||
: suggestions,
|
||||
completer: (suggestion) => suggestion,
|
||||
@ -153,6 +141,7 @@ class SearchPage extends HookConsumerWidget {
|
||||
child: TextField(
|
||||
autofocus: true,
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
features: [
|
||||
const InputFeature.leading(
|
||||
Icon(SpotubeIcons.search),
|
||||
@ -167,8 +156,7 @@ class SearchPage extends HookConsumerWidget {
|
||||
: CrossFadeState.showSecond,
|
||||
firstChild: IconButton.ghost(
|
||||
size: ButtonSize.small,
|
||||
icon:
|
||||
const Icon(SpotubeIcons.close),
|
||||
icon: const Icon(SpotubeIcons.close),
|
||||
onPressed: () {
|
||||
controller.clear();
|
||||
},
|
||||
@ -182,7 +170,6 @@ class SearchPage extends HookConsumerWidget {
|
||||
placeholder: Text(context.l10n.search),
|
||||
onSubmitted: onSubmitted,
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
||||
12
pubspec.lock
12
pubspec.lock
@ -2376,26 +2376,26 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb"
|
||||
sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.26.2"
|
||||
version: "1.26.3"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
|
||||
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.6"
|
||||
version: "0.7.7"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a"
|
||||
sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.11"
|
||||
version: "0.6.12"
|
||||
time:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@ -3,7 +3,7 @@ description: Open source extensible music streaming platform and app, based on B
|
||||
|
||||
publish_to: "none"
|
||||
|
||||
version: 5.1.1+44
|
||||
version: 5.1.2+45
|
||||
|
||||
homepage: https://spotube.krtirtho.dev
|
||||
repository: https://github.com/KRTirtho/spotube
|
||||
|
||||
Loading…
Reference in New Issue
Block a user