mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 15:35:17 +00:00
feat: use platform checkbox
This commit is contained in:
parent
fb9c0e44be
commit
2211505d71
@ -75,15 +75,15 @@ class PlaylistCreateDialog extends HookConsumerWidget {
|
||||
maxLines: 5,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
CheckboxListTile(
|
||||
PlatformCheckbox(
|
||||
value: public.value,
|
||||
title: const PlatformText("Public"),
|
||||
label: const PlatformText("Public"),
|
||||
onChanged: (val) => public.value = val ?? false,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
CheckboxListTile(
|
||||
PlatformCheckbox(
|
||||
value: collaborative.value,
|
||||
title: const PlatformText("Collaborative"),
|
||||
label: const PlatformText("Collaborative"),
|
||||
onChanged: (val) => collaborative.value = val ?? false,
|
||||
),
|
||||
],
|
||||
|
@ -137,10 +137,8 @@ class TrackTile extends HookConsumerWidget {
|
||||
itemCount: snapshot.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final playlist = snapshot.data!.elementAt(index);
|
||||
return CheckboxListTile(
|
||||
title: PlatformText(playlist.name!),
|
||||
controlAffinity:
|
||||
ListTileControlAffinity.leading,
|
||||
return PlatformCheckbox(
|
||||
label: PlatformText(playlist.name!),
|
||||
value:
|
||||
playlistsCheck.value[playlist.id] ?? false,
|
||||
onChanged: (val) {
|
||||
@ -181,7 +179,7 @@ class TrackTile extends HookConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
if (showCheck)
|
||||
Checkbox(
|
||||
PlatformCheckbox(
|
||||
value: isChecked,
|
||||
onChanged: (s) => onCheckChange?.call(s),
|
||||
)
|
||||
|
@ -68,7 +68,7 @@ class TracksTableView extends HookConsumerWidget {
|
||||
if (heading != null) heading!,
|
||||
Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
PlatformCheckbox(
|
||||
value: selected.value.length == sortedTracks.length,
|
||||
onChanged: (checked) {
|
||||
if (!showCheck.value) showCheck.value = true;
|
||||
|
@ -199,7 +199,7 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
|
||||
};
|
||||
}, []);
|
||||
|
||||
platform = TargetPlatform.macOS;
|
||||
platform = TargetPlatform.android;
|
||||
|
||||
return PlatformApp.router(
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
|
Loading…
Reference in New Issue
Block a user