mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
fix(macos): black text in dark mode
This commit is contained in:
parent
c201624f99
commit
fb9c0e44be
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -5,7 +5,7 @@
|
|||||||
"name": "Flutter",
|
"name": "Flutter",
|
||||||
"type": "dart",
|
"type": "dart",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "lib/main.dart"
|
"program": "${workspaceFolder}/lib/main.dart"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"compounds": []
|
"compounds": []
|
||||||
|
@ -25,6 +25,7 @@ class UserAlbums extends HookConsumerWidget {
|
|||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
@ -31,6 +31,7 @@ class UserArtists extends HookConsumerWidget {
|
|||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
itemCount: artists.length,
|
itemCount: artists.length,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import 'package:fl_query_hooks/fl_query_hooks.dart';
|
import 'package:fl_query_hooks/fl_query_hooks.dart';
|
||||||
import 'package:flutter/material.dart' hide Image;
|
import 'package:flutter/material.dart' hide Image;
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:platform_ui/platform_ui.dart';
|
||||||
import 'package:spotify/spotify.dart';
|
import 'package:spotify/spotify.dart';
|
||||||
import 'package:spotube/components/LoaderShimmers/ShimmerPlaybuttonCard.dart';
|
import 'package:spotube/components/LoaderShimmers/ShimmerPlaybuttonCard.dart';
|
||||||
import 'package:spotube/components/Playlist/PlaylistCard.dart';
|
import 'package:spotube/components/Playlist/PlaylistCard.dart';
|
||||||
@ -36,6 +37,7 @@ class UserPlaylists extends HookConsumerWidget {
|
|||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
@ -49,13 +49,10 @@ class LyricDelayAdjustDialog extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: TextField(
|
child: PlatformTextField(
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
decoration: const InputDecoration(
|
placeholder: "Delay in milliseconds",
|
||||||
isDense: true,
|
|
||||||
hintText: "Delay in milliseconds",
|
|
||||||
),
|
|
||||||
onSubmitted: (_) {
|
onSubmitted: (_) {
|
||||||
Navigator.of(context).pop(
|
Navigator.of(context).pop(
|
||||||
Duration(
|
Duration(
|
||||||
|
@ -74,6 +74,7 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
height: breakpoint >= Breakpoints.md ? 50 : 30,
|
height: breakpoint >= Breakpoints.md ? 50 : 30,
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
|
@ -90,6 +90,7 @@ class Player extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
|
@ -62,6 +62,7 @@ class PlayerOverlay extends HookConsumerWidget {
|
|||||||
duration: const Duration(milliseconds: 250),
|
duration: const Duration(milliseconds: 250),
|
||||||
opacity: canShow ? 1 : 0,
|
opacity: canShow ? 1 : 0,
|
||||||
child: Material(
|
child: Material(
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
@ -69,6 +69,7 @@ class PlayerView extends HookConsumerWidget {
|
|||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
|
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
|
||||||
child: Material(
|
child: Material(
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
color: paletteColor.color.withOpacity(.5),
|
color: paletteColor.color.withOpacity(.5),
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -3,6 +3,7 @@ import 'dart:ui';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:platform_ui/platform_ui.dart';
|
||||||
import 'package:spotube/components/Shared/UniversalImage.dart';
|
import 'package:spotube/components/Shared/UniversalImage.dart';
|
||||||
import 'package:spotube/provider/Playback.dart';
|
import 'package:spotube/provider/Playback.dart';
|
||||||
import 'package:spotube/utils/primitive_utils.dart';
|
import 'package:spotube/utils/primitive_utils.dart';
|
||||||
@ -59,7 +60,7 @@ class SiblingTracksSheet extends HookConsumerWidget {
|
|||||||
itemCount: playback.siblingYtVideos.length,
|
itemCount: playback.siblingYtVideos.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final video = playback.siblingYtVideos[index];
|
final video = playback.siblingYtVideos[index];
|
||||||
return ListTile(
|
return PlatformListTile(
|
||||||
title: Text(video.title),
|
title: Text(video.title),
|
||||||
leading: UniversalImage(
|
leading: UniversalImage(
|
||||||
path: video.thumbnails.lowResUrl,
|
path: video.thumbnails.lowResUrl,
|
||||||
@ -69,7 +70,6 @@ class SiblingTracksSheet extends HookConsumerWidget {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
),
|
),
|
||||||
horizontalTitleGap: 10,
|
|
||||||
trailing: Text(
|
trailing: Text(
|
||||||
PrimitiveUtils.toReadableDuration(
|
PrimitiveUtils.toReadableDuration(
|
||||||
video.duration ?? Duration.zero,
|
video.duration ?? Duration.zero,
|
||||||
|
@ -77,13 +77,13 @@ class PlaylistCreateDialog extends HookConsumerWidget {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
value: public.value,
|
value: public.value,
|
||||||
title: const Text("Public"),
|
title: const PlatformText("Public"),
|
||||||
onChanged: (val) => public.value = val ?? false,
|
onChanged: (val) => public.value = val ?? false,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
CheckboxListTile(
|
CheckboxListTile(
|
||||||
value: collaborative.value,
|
value: collaborative.value,
|
||||||
title: const Text("Collaborative"),
|
title: const PlatformText("Collaborative"),
|
||||||
onChanged: (val) => collaborative.value = val ?? false,
|
onChanged: (val) => collaborative.value = val ?? false,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -78,6 +78,7 @@ class Search extends HookConsumerWidget {
|
|||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
@ -32,7 +32,7 @@ class About extends HookWidget {
|
|||||||
|
|
||||||
return PlatformListTile(
|
return PlatformListTile(
|
||||||
leading: const Icon(Icons.info_outline_rounded),
|
leading: const Icon(Icons.info_outline_rounded),
|
||||||
title: Text(
|
title: PlatformText(
|
||||||
"About Spotube",
|
"About Spotube",
|
||||||
style: PlatformTextTheme.of(context).body,
|
style: PlatformTextTheme.of(context).body,
|
||||||
),
|
),
|
||||||
@ -48,7 +48,7 @@ class About extends HookWidget {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: const [
|
children: const [
|
||||||
Text("Author: "),
|
PlatformText("Author: "),
|
||||||
Hyperlink(
|
Hyperlink(
|
||||||
"Kingkor Roy Tirtho",
|
"Kingkor Roy Tirtho",
|
||||||
"https://github.com/KRTirtho",
|
"https://github.com/KRTirtho",
|
||||||
@ -63,12 +63,12 @@ class About extends HookWidget {
|
|||||||
"💚 Sponsor/Donate 💚",
|
"💚 Sponsor/Donate 💚",
|
||||||
"https://opencollective.com/spotube",
|
"https://opencollective.com/spotube",
|
||||||
),
|
),
|
||||||
Text(" • "),
|
PlatformText(" • "),
|
||||||
Hyperlink(
|
Hyperlink(
|
||||||
"BSD-4-Clause LICENSE",
|
"BSD-4-Clause LICENSE",
|
||||||
"https://github.com/KRTirtho/spotube/blob/master/LICENSE",
|
"https://github.com/KRTirtho/spotube/blob/master/LICENSE",
|
||||||
),
|
),
|
||||||
Text(" • "),
|
PlatformText(" • "),
|
||||||
Hyperlink(
|
Hyperlink(
|
||||||
"Bug Report",
|
"Bug Report",
|
||||||
"https://github.com/KRTirtho/spotube/issues/new?assignees=&labels=bug&template=bug_report.md&title=",
|
"https://github.com/KRTirtho/spotube/issues/new?assignees=&labels=bug&template=bug_report.md&title=",
|
||||||
@ -76,7 +76,8 @@ class About extends HookWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
const Center(child: Text("© Spotube 2022. All rights reserved"))
|
const Center(
|
||||||
|
child: PlatformText("© Spotube 2022. All rights reserved"))
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:macos_ui/macos_ui.dart';
|
|
||||||
import 'package:platform_ui/platform_ui.dart';
|
import 'package:platform_ui/platform_ui.dart';
|
||||||
import 'package:spotube/components/Settings/About.dart';
|
import 'package:spotube/components/Settings/About.dart';
|
||||||
import 'package:spotube/components/Settings/ColorSchemePickerDialog.dart';
|
import 'package:spotube/components/Settings/ColorSchemePickerDialog.dart';
|
||||||
@ -339,20 +338,17 @@ class Settings extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
AdaptiveListTile(
|
AdaptiveListTile(
|
||||||
leading: const Icon(Icons.screen_search_desktop_rounded),
|
leading: const Icon(Icons.screen_search_desktop_rounded),
|
||||||
title: SizedBox(
|
title: const SizedBox(
|
||||||
height: 50,
|
height: 50,
|
||||||
width: 200,
|
width: 200,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: DefaultTextStyle(
|
child: AutoSizeText(
|
||||||
style: PlatformTextTheme.of(context).body!,
|
|
||||||
child: const AutoSizeText(
|
|
||||||
"Format of the YouTube Search term",
|
"Format of the YouTube Search term",
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
subtitle: const PlatformText("(Case sensitive)"),
|
subtitle: const PlatformText("(Case sensitive)"),
|
||||||
breakOn: Breakpoints.lg,
|
breakOn: Breakpoints.lg,
|
||||||
trailing: (context, update) => ConstrainedBox(
|
trailing: (context, update) => ConstrainedBox(
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
import 'package:fluent_ui/fluent_ui.dart' as FluentUI;
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:macos_ui/macos_ui.dart';
|
|
||||||
import 'package:platform_ui/platform_ui.dart';
|
import 'package:platform_ui/platform_ui.dart';
|
||||||
import 'package:spotube/components/Shared/HoverBuilder.dart';
|
import 'package:spotube/components/Shared/HoverBuilder.dart';
|
||||||
import 'package:spotube/components/Shared/SpotubeMarqueeText.dart';
|
import 'package:spotube/components/Shared/SpotubeMarqueeText.dart';
|
||||||
@ -54,10 +51,6 @@ class PlaybuttonCard extends HookWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final titleStyle = PlatformTextTheme.of(context).body;
|
|
||||||
|
|
||||||
final descriptionStyle = PlatformTextTheme.of(context).caption;
|
|
||||||
|
|
||||||
final splash = usePlatformProperty<InteractiveInkFeatureFactory?>(
|
final splash = usePlatformProperty<InteractiveInkFeatureFactory?>(
|
||||||
(context) => PlatformProperty.multiPlatformGroup({
|
(context) => PlatformProperty.multiPlatformGroup({
|
||||||
InkRipple.splashFactory: {TargetPlatform.android, TargetPlatform.linux},
|
InkRipple.splashFactory: {TargetPlatform.android, TargetPlatform.linux},
|
||||||
@ -164,8 +157,8 @@ class PlaybuttonCard extends HookWidget {
|
|||||||
height: 20,
|
height: 20,
|
||||||
child: SpotubeMarqueeText(
|
child: SpotubeMarqueeText(
|
||||||
text: title,
|
text: title,
|
||||||
style: titleStyle?.copyWith(
|
style:
|
||||||
fontWeight: FontWeight.bold),
|
const TextStyle(fontWeight: FontWeight.bold),
|
||||||
isHovering: isHovering,
|
isHovering: isHovering,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -176,7 +169,7 @@ class PlaybuttonCard extends HookWidget {
|
|||||||
height: 30,
|
height: 30,
|
||||||
child: SpotubeMarqueeText(
|
child: SpotubeMarqueeText(
|
||||||
text: description!,
|
text: description!,
|
||||||
style: descriptionStyle,
|
style: PlatformTextTheme.of(context).caption,
|
||||||
isHovering: isHovering,
|
isHovering: isHovering,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -26,12 +26,12 @@ class SpotubeMarqueeText extends HookWidget {
|
|||||||
return AutoSizeText(
|
return AutoSizeText(
|
||||||
text,
|
text,
|
||||||
minFontSize: 13,
|
minFontSize: 13,
|
||||||
style: style,
|
style: DefaultTextStyle.of(context).style.merge(style),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflowReplacement: Marquee(
|
overflowReplacement: Marquee(
|
||||||
key: uKey.value,
|
key: uKey.value,
|
||||||
text: text,
|
text: text,
|
||||||
style: style,
|
style: DefaultTextStyle.of(context).style.merge(style),
|
||||||
scrollAxis: Axis.horizontal,
|
scrollAxis: Axis.horizontal,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
blankSpace: 40.0,
|
blankSpace: 40.0,
|
||||||
|
@ -155,6 +155,7 @@ class TrackCollectionView<T> extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
|
@ -177,6 +177,7 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
|
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
if (showCheck)
|
if (showCheck)
|
||||||
|
@ -3,13 +3,11 @@ import 'dart:convert';
|
|||||||
import 'package:audio_service/audio_service.dart';
|
import 'package:audio_service/audio_service.dart';
|
||||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||||
import 'package:fl_query/fl_query.dart';
|
import 'package:fl_query/fl_query.dart';
|
||||||
import 'package:fluent_ui/fluent_ui.dart' as FluentUI;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:macos_ui/macos_ui.dart';
|
|
||||||
import 'package:platform_ui/platform_ui.dart';
|
import 'package:platform_ui/platform_ui.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:spotube/components/Shared/ReplaceDownloadedFileDialog.dart';
|
import 'package:spotube/components/Shared/ReplaceDownloadedFileDialog.dart';
|
||||||
@ -201,7 +199,7 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
|
|||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
platform = TargetPlatform.windows;
|
platform = TargetPlatform.macOS;
|
||||||
|
|
||||||
return PlatformApp.router(
|
return PlatformApp.router(
|
||||||
routeInformationParser: router.routeInformationParser,
|
routeInformationParser: router.routeInformationParser,
|
||||||
|
Loading…
Reference in New Issue
Block a user