mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-06 15:39:41 +00:00
* feat(queue): add multi-select and bulk actions to queue - Add selection mode to PlayerQueue with long-press to select - Disable inner navigation (title/artist) when selecting via TrackTile - Show checkboxes only in selection mode - Add selection AppBar behavior and bottom-sheet menu with: Select all, Add to playlist, Remove selected, Cancel - Reuse existing PlaylistAddTrackDialog for bulk add - Hide drag handle while in selection mode Closes: # (implement multi-select queue feature) * chore: update .gitignore to include .vscode and modify signing configurations back to default in build.gradle * chore: add VS Code configuration files * chore: update dependencies in pubspec.lock * chore: update pubspec.lock to reflect dependency changes and version updates * chore: fix replace material widgets with shadcn widgets --------- Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com>
45 lines
1.3 KiB
Dart
45 lines
1.3 KiB
Dart
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
|
import 'package:shadcn_flutter/shadcn_flutter_extension.dart';
|
|
import 'package:spotube/collections/spotube_icons.dart';
|
|
import 'package:spotube/extensions/constrains.dart';
|
|
|
|
class PlayerQueueActionButton extends StatelessWidget {
|
|
final Widget Function(BuildContext context, VoidCallback close) builder;
|
|
|
|
const PlayerQueueActionButton({
|
|
super.key,
|
|
required this.builder,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return IconButton.ghost(
|
|
onPressed: () {
|
|
final mediaQuery = MediaQuery.sizeOf(context);
|
|
|
|
if (mediaQuery.lgAndUp) {
|
|
showDropdown(
|
|
context: context,
|
|
builder: (context) {
|
|
return SizedBox(
|
|
width: 220 * context.theme.scaling,
|
|
child: Card(
|
|
padding: EdgeInsets.zero,
|
|
child: builder(context, () => closeOverlay(context)),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
} else {
|
|
openSheet(
|
|
context: context,
|
|
builder: (context) => builder(context, () => closeSheet(context)),
|
|
position: OverlayPosition.bottom,
|
|
);
|
|
}
|
|
},
|
|
icon: const Icon(SpotubeIcons.moreHorizontal),
|
|
);
|
|
}
|
|
}
|