mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +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,
|
maxLines: 5,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
CheckboxListTile(
|
PlatformCheckbox(
|
||||||
value: public.value,
|
value: public.value,
|
||||||
title: const PlatformText("Public"),
|
label: const PlatformText("Public"),
|
||||||
onChanged: (val) => public.value = val ?? false,
|
onChanged: (val) => public.value = val ?? false,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
CheckboxListTile(
|
PlatformCheckbox(
|
||||||
value: collaborative.value,
|
value: collaborative.value,
|
||||||
title: const PlatformText("Collaborative"),
|
label: const PlatformText("Collaborative"),
|
||||||
onChanged: (val) => collaborative.value = val ?? false,
|
onChanged: (val) => collaborative.value = val ?? false,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -137,10 +137,8 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
itemCount: snapshot.data!.length,
|
itemCount: snapshot.data!.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final playlist = snapshot.data!.elementAt(index);
|
final playlist = snapshot.data!.elementAt(index);
|
||||||
return CheckboxListTile(
|
return PlatformCheckbox(
|
||||||
title: PlatformText(playlist.name!),
|
label: PlatformText(playlist.name!),
|
||||||
controlAffinity:
|
|
||||||
ListTileControlAffinity.leading,
|
|
||||||
value:
|
value:
|
||||||
playlistsCheck.value[playlist.id] ?? false,
|
playlistsCheck.value[playlist.id] ?? false,
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
@ -181,7 +179,7 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
if (showCheck)
|
if (showCheck)
|
||||||
Checkbox(
|
PlatformCheckbox(
|
||||||
value: isChecked,
|
value: isChecked,
|
||||||
onChanged: (s) => onCheckChange?.call(s),
|
onChanged: (s) => onCheckChange?.call(s),
|
||||||
)
|
)
|
||||||
|
@ -68,7 +68,7 @@ class TracksTableView extends HookConsumerWidget {
|
|||||||
if (heading != null) heading!,
|
if (heading != null) heading!,
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Checkbox(
|
PlatformCheckbox(
|
||||||
value: selected.value.length == sortedTracks.length,
|
value: selected.value.length == sortedTracks.length,
|
||||||
onChanged: (checked) {
|
onChanged: (checked) {
|
||||||
if (!showCheck.value) showCheck.value = true;
|
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(
|
return PlatformApp.router(
|
||||||
routeInformationParser: router.routeInformationParser,
|
routeInformationParser: router.routeInformationParser,
|
||||||
|
Loading…
Reference in New Issue
Block a user