feat: update just audio

This commit is contained in:
xijieyin 2022-06-03 16:18:29 +08:00
parent 79f06e27ec
commit 49a70fb833
11 changed files with 218 additions and 178 deletions

View File

@ -124,7 +124,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
pinned: true,
title: _showTitle
? Text(
widget.episodeItem!.title!,
widget.episodeItem?.title ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
)
@ -133,8 +133,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
maxLines: 1,
style: TextStyle(
fontSize: 15,
color:
context.textColor!.withOpacity(0.7)),
color: context.textColor!.withOpacity(0.7)),
),
leading: CustomBackButton(),
elevation: _showTitle ? 1 : 0,
@ -164,8 +163,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
s.published(DateFormat.yMMMd().format(
DateTime.fromMillisecondsSinceEpoch(
widget.episodeItem!.pubDate!))),
style:
TextStyle(color: context.accentColor)),
style: TextStyle(color: context.accentColor)),
SizedBox(width: 10),
if (widget.episodeItem!.explicit == 1)
Text('E',
@ -177,8 +175,8 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 20, vertical: 5),
padding:
EdgeInsets.symmetric(horizontal: 20, vertical: 5),
child: Row(
children: <Widget>[
if (widget.episodeItem!.duration != 0)
@ -189,8 +187,8 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
Radius.circular(16.0))),
height: 28.0,
margin: EdgeInsets.only(right: 10.0),
padding: EdgeInsets.symmetric(
horizontal: 10.0),
padding:
EdgeInsets.symmetric(horizontal: 10.0),
alignment: Alignment.center,
child: Text(
s.minsCount(
@ -198,8 +196,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
),
style: TextStyle(color: Colors.black),
)),
if (widget.episodeItem!.enclosureLength !=
null &&
if (widget.episodeItem!.enclosureLength != null &&
widget.episodeItem!.enclosureLength != 0)
Container(
decoration: BoxDecoration(
@ -227,18 +224,18 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
snapshot.data!.seconds! > 10) {
return ButtonTheme(
height: 28,
padding: EdgeInsets.symmetric(
horizontal: 0),
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
100.0),
side: BorderSide(
color:
context.accentColor)),
highlightedBorderColor:
Colors.green[700],
padding:
EdgeInsets.symmetric(horizontal: 0),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
100.0),
side: BorderSide(
color:
context.accentColor)),
),
onPressed: () => audio.episodeLoad(
widget.episodeItem,
startPosition:
@ -258,8 +255,7 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
),
SizedBox(width: 5),
Text(
snapshot
.data!.seconds!.toTime,
snapshot.data!.seconds!.toTime,
),
],
),
@ -275,11 +271,10 @@ class _EpisodeDetailState extends State<EpisodeDetail> {
ShowNote(episode: widget.episodeItem),
Selector<AudioPlayerNotifier,
Tuple2<bool, PlayerHeight?>>(
selector: (_, audio) => Tuple2(
audio.playerRunning, audio.playerHeight),
selector: (_, audio) =>
Tuple2(audio.playerRunning, audio.playerHeight),
builder: (_, data, __) {
var height =
kMinPlayerHeight[data.item2!.index];
var height = kMinPlayerHeight[data.item2!.index];
return SizedBox(
height: data.item1 ? height : 0,
);
@ -560,13 +555,13 @@ class __MenuBarState extends State<_MenuBar> {
children: <Widget>[
Text(s!.play.toUpperCase(),
style: TextStyle(
color: Theme.of(context).accentColor,
color: context.accentColor,
fontSize: 15,
fontWeight: FontWeight.bold,
)),
Icon(
Icons.play_arrow,
color: Theme.of(context).accentColor,
color: context.accentColor,
),
],
),

View File

@ -349,13 +349,15 @@ class LastPosition extends StatelessWidget {
)
: snapshot.data!.seconds! < 10
? Center()
: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(100.0),
side: BorderSide(
color: context.accentColor)),
highlightedBorderColor: Colors.green[700],
: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(100.0),
side: BorderSide(
color: context.accentColor)),
),
// highlightedBorderColor: Colors.green[700],
onPressed: () => audio.seekTo(
(snapshot.data!.seconds! * 1000)
.toInt()),
@ -931,11 +933,14 @@ class _ChaptersWidgetState extends State<ChaptersWidget> {
child: ButtonTheme(
height: 28,
padding: EdgeInsets.symmetric(horizontal: 0),
child: OutlineButton(
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: context.accentColor)),
highlightedBorderColor: Colors.green[700],
),
// highlightedBorderColor: Colors.green[700],
onPressed: () {
context
.read<AudioPlayerNotifier>()

View File

@ -47,7 +47,7 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
TabController? _controller;
Decoration _getIndicator(BuildContext context) {
return UnderlineTabIndicator(
borderSide: BorderSide(color: Theme.of(context).accentColor, width: 3),
borderSide: BorderSide(color: context.accentColor, width: 3),
insets: EdgeInsets.only(
left: 10.0,
right: 10.0,
@ -96,9 +96,9 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle(
systemNavigationBarIconBrightness:
Theme.of(context).accentColorBrightness,
statusBarIconBrightness: Theme.of(context).accentColorBrightness,
systemNavigationBarColor: Theme.of(context).primaryColor,
context.brightness,
statusBarIconBrightness: context.iconBrightness,
systemNavigationBarColor: context.primaryColor,
),
child: WillPopScope(
onWillPop: () async {

View File

@ -102,15 +102,17 @@ class DiscoveryPageState extends State<DiscoveryPage> {
child: Center(
child: SizedBox(
height: 32,
child: OutlineButton(
color: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.grey[500]!)),
highlightedBorderColor: Colors.grey[500],
disabledTextColor: Colors.grey[500],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
primary: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.grey[500]!)),
// highlightedBorderColor: Colors.grey[500],
// disabledTextColor: Colors.grey[500],
// disabledBorderColor: Colors.grey[500],
),
child: Text(context.s!.subscribe),
disabledBorderColor: Colors.grey[500],
onPressed: () {}),
),
),
@ -460,11 +462,14 @@ class __TopPodcastListState extends State<_TopPodcastList> {
children: [
Padding(
padding: const EdgeInsets.only(top: 10.0, bottom: 20.0),
child: OutlineButton(
highlightedBorderColor: context.accentColor,
splashColor: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(100))),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(100))),
),
// highlightedBorderColor: context.accentColor,
// splashColor: context.accentColor.withOpacity(0.5),
child: _loading
? SizedBox(
height: 20,

View File

@ -331,12 +331,14 @@ class _RssResultState extends State<RssResult> {
return Container(
padding: const EdgeInsets.only(top: 10.0, bottom: 20.0),
alignment: Alignment.center,
child: OutlineButton(
highlightedBorderColor: context.accentColor,
splashColor: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(100))),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
// highlightedBorderColor: context.accentColor,
onSurface: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.all(Radius.circular(100))),
),
child: Text(context.s!.loadMore),
onPressed: () => setState(
() => _loadItems += 10,
@ -542,11 +544,13 @@ class __ListenNotesSearchState extends State<_ListenNotesSearch> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.min,
children: [
OutlineButton(
highlightedBorderColor: context.accentColor,
splashColor: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(color: context.accentColor),
onSurface: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
),
child: _loading
? SizedBox(
height: 20,
@ -704,11 +708,13 @@ class __PodcastIndexSearchState extends State<_PodcastIndexSearch> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.min,
children: [
OutlineButton(
highlightedBorderColor: context.accentColor,
splashColor: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(color: context.accentColor),
onSurface: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
),
child: _loading
? SizedBox(
height: 20,
@ -991,11 +997,13 @@ class _SearchResultDetailState extends State<SearchResultDetail>
padding: const EdgeInsets.only(top: 10.0, bottom: 20.0),
alignment: Alignment.center,
child: SizedBox(
child: OutlineButton(
highlightedBorderColor: context.accentColor,
splashColor: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(color: context.accentColor),
onSurface: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
),
child: _loading
? SizedBox(
height: 20,
@ -1252,43 +1260,50 @@ class SubscribeButton extends StatelessWidget {
searchState.addPodcast(podcast);
}
return Consumer<SearchState>(builder: (_, searchState, __) {
final subscribed = searchState.isSubscribed(onlinePodcast);
return !subscribed
? ButtonTheme(
height: 32,
child: OutlineButton(
highlightedBorderColor: context.accentColor,
borderSide: BorderSide(color: context.accentColor),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: context.accentColor)),
splashColor: context.accentColor.withOpacity(0.5),
child: Text(s!.subscribe,
style: TextStyle(color: context.accentColor)),
onPressed: () {
Fluttertoast.showToast(
msg: s.podcastSubscribed,
gravity: ToastGravity.BOTTOM,
);
subscribePodcast(onlinePodcast!);
searchState.addPodcast(onlinePodcast);
}),
)
: ButtonTheme(
height: 32,
child: OutlineButton(
color: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.grey[500]!)),
highlightedBorderColor: Colors.grey[500],
disabledTextColor: Colors.grey[500],
child: Text(s!.subscribe),
disabledBorderColor: Colors.grey[500],
onPressed: () {}),
);
});
return Consumer<SearchState>(
builder: (_, searchState, __) {
final subscribed = searchState.isSubscribed(onlinePodcast);
return !subscribed
? ButtonTheme(
height: 32,
child: OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(color: context.accentColor),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: context.accentColor)),
onSurface: context.accentColor.withOpacity(0.5),
),
child: Text(s!.subscribe,
style: TextStyle(color: context.accentColor)),
onPressed: () {
Fluttertoast.showToast(
msg: s.podcastSubscribed,
gravity: ToastGravity.BOTTOM,
);
subscribePodcast(onlinePodcast!);
searchState.addPodcast(onlinePodcast);
}),
)
: ButtonTheme(
height: 32,
child: OutlinedButton(
style: OutlinedButton.styleFrom(
primary: context.accentColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.grey[500]!)),
side: BorderSide(
color: Colors.grey[500]!,
),
// disabledTextColor: Colors.grey[500],
// disabledBorderColor: Colors.grey[500],
),
child: Text(s!.subscribe),
onPressed: () {}),
);
},
);
}
}

View File

@ -181,10 +181,9 @@ class _DataBackupState extends State<DataBackup> {
final s = context.s!;
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle(
statusBarIconBrightness: Theme.of(context).accentColorBrightness,
statusBarIconBrightness: context.iconBrightness,
systemNavigationBarColor: Theme.of(context).primaryColor,
systemNavigationBarIconBrightness:
Theme.of(context).accentColorBrightness,
systemNavigationBarIconBrightness: context.brightness,
),
child: Scaffold(
appBar: AppBar(
@ -255,11 +254,12 @@ class _DataBackupState extends State<DataBackup> {
style: TextStyle(color: Colors.purple[700])),
ButtonTheme(
height: 32,
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.purple[700]!)),
highlightedBorderColor: Colors.purple[700],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.purple[700]!)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -365,11 +365,12 @@ class _DataBackupState extends State<DataBackup> {
children: [
ButtonTheme(
height: 32,
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.green[700]!)),
highlightedBorderColor: Colors.green[700],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.green[700]!)),
),
child: Row(
children: [
Icon(
@ -390,11 +391,12 @@ class _DataBackupState extends State<DataBackup> {
SizedBox(width: 10),
ButtonTheme(
height: 32,
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.blue[700]!)),
highlightedBorderColor: Colors.blue[700],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.blue[700]!)),
),
child: Row(
children: [
Icon(
@ -434,11 +436,12 @@ class _DataBackupState extends State<DataBackup> {
child: Wrap(children: [
ButtonTheme(
height: 32,
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.green[700]!)),
highlightedBorderColor: Colors.green[700],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.green[700]!)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -460,11 +463,12 @@ class _DataBackupState extends State<DataBackup> {
SizedBox(width: 10),
ButtonTheme(
height: 32,
child: OutlineButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.blue[700]!)),
highlightedBorderColor: Colors.blue[700],
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.blue[700]!)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -486,11 +490,12 @@ class _DataBackupState extends State<DataBackup> {
SizedBox(width: 10),
ButtonTheme(
height: 32,
child: OutlineButton(
highlightedBorderColor: Colors.red[700],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.red[700]!)),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100.0),
side: BorderSide(color: Colors.red[700]!)),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -815,11 +820,12 @@ class __LoginGpodderState extends State<_LoginGpodder> {
],
),
Center(
child: OutlineButton(
child: OutlinedButton(
onPressed: () {
Navigator.of(context).pop();
},
highlightedBorderColor: context.accentColor,
style: OutlinedButton.styleFrom(
side: BorderSide(color: context.accentColor)),
child: Text(s.back)),
),
]),
@ -987,8 +993,7 @@ class __GpodderInfoState extends State<_GpodderInfo> {
Future<List<String>?> _getLoginInfo() async {
final storage = KeyValueStorage(gpodderApiKey);
final androidInfo = await DeviceInfoPlugin().androidInfo;
final deviceInfo =
await storage.getStringList();
final deviceInfo = await storage.getStringList();
deviceInfo.add("Tsacdop on ${androidInfo.model}");
return deviceInfo;
}

View File

@ -52,6 +52,7 @@ MediaControl rewindControl = MediaControl(
/// Sleep timer mode.
enum SleepTimerMode { endOfEpisode, timer, undefined }
enum PlayerHeight { short, mid, tall }
class AudioPlayerNotifier extends ChangeNotifier {
@ -304,9 +305,7 @@ class AudioPlayerNotifier extends ChangeNotifier {
if (state[1] != '') {
var episode = await _dbHelper.getRssItemWithUrl(state[1]);
if (episode != null &&
((!_playlist!.isQueue &&
episode != null &&
_playlist!.contains(episode)) ||
((!_playlist!.isQueue && _playlist!.contains(episode)) ||
(_playlist!.isQueue &&
_queue.isNotEmpty &&
_queue.episodes.first!.title == episode.title))) {
@ -987,7 +986,16 @@ class CustomAudioHandler extends BaseAudioHandler
with QueueHandler, SeekHandler {
final cacheStorage = KeyValueStorage(cacheMaxKey);
final layoutStorage = KeyValueStorage(notificationLayoutKey);
final AudioPlayer _player = AudioPlayer();
final _equalizer = AndroidEqualizer();
final _loudnessEnhancer = AndroidLoudnessEnhancer();
late final AudioPlayer _player = AudioPlayer(
audioPipeline: AudioPipeline(
androidAudioEffects: [
_loudnessEnhancer,
_equalizer,
],
),
);
bool _interrupted = false;
int? _layoutIndex;
bool _stopAtEnd = false;
@ -1007,7 +1015,7 @@ class CustomAudioHandler extends BaseAudioHandler
PublishSubject<Map<String, dynamic>> customEvent = PublishSubject()..add({});
CustomAudioHandler(int cacheMax) {
_player.cacheMax = cacheMax;
// _player.cacheMax = cacheMax;
_handleInterruption();
_player.currentIndexStream.listen(
(index) {
@ -1147,8 +1155,7 @@ class CustomAudioHandler extends BaseAudioHandler
@override
Future<void> play() async {
if (playing == null || playing == false) {
log('playing');
if (!playing) {
await super.play();
await _player.play();
} else {
@ -1285,11 +1292,12 @@ class CustomAudioHandler extends BaseAudioHandler
}
Future _setSkipSilence(bool boo) async {
await _player.setSkipSilence(boo);
await _player.setSkipSilenceEnabled(boo);
}
Future _setBoostVolume(bool boo, int gain) async {
await _player.setBoostVolume(boo, gain);
Future _setBoostVolume(bool enabled, int gain) async {
await _loudnessEnhancer.setEnabled(enabled);
await _loudnessEnhancer.setTargetGain(1.5);
}
List<MediaControl> _getControls(int? index) {
@ -1301,7 +1309,6 @@ class CustomAudioHandler extends BaseAudioHandler
skipToNextControl,
stopControl
];
break;
case 1:
return [
playing ? pauseControl : playControl,
@ -1309,7 +1316,6 @@ class CustomAudioHandler extends BaseAudioHandler
skipToNextControl,
stopControl
];
break;
case 2:
return [
rewindControl,
@ -1318,7 +1324,6 @@ class CustomAudioHandler extends BaseAudioHandler
stopControl
];
break;
default:
return [
playing ? pauseControl : playControl,
@ -1326,7 +1331,6 @@ class CustomAudioHandler extends BaseAudioHandler
skipToNextControl,
stopControl
];
break;
}
}

View File

@ -154,7 +154,14 @@ class SettingState extends ChangeNotifier {
iconTheme: IconThemeData(color: Colors.black),
systemOverlayStyle: SystemUiOverlayStyle.dark),
textTheme: TextTheme(
bodyText2: TextStyle(fontSize: 15.0, fontWeight: FontWeight.normal),
bodyLarge: TextStyle(
fontSize: 17.0,
color: Colors.black,
fontWeight: FontWeight.normal),
bodyMedium: TextStyle(
fontSize: 15.0,
color: Colors.black,
fontWeight: FontWeight.normal),
),
tabBarTheme: TabBarTheme(
labelColor: Colors.black,
@ -178,6 +185,16 @@ class SettingState extends ChangeNotifier {
.copyWith(brightness: Brightness.dark, secondary: _accentSetColor),
brightness: Brightness.light,
primaryColorDark: Colors.grey[800],
textTheme: TextTheme(
bodyLarge: TextStyle(
fontSize: 17.0,
color: Colors.white,
fontWeight: FontWeight.normal),
bodyMedium: TextStyle(
fontSize: 15.0,
color: Colors.white,
fontWeight: FontWeight.normal),
),
scaffoldBackgroundColor:
_realDark! ? Colors.black87 : Color(0XFF212121),
primaryColor: _realDark! ? Colors.black : Color(0XFF1B1B1B),

View File

@ -12,7 +12,7 @@ extension ContextExtension on BuildContext {
Color get accentColor => Theme.of(this).colorScheme.secondary;
Color get scaffoldBackgroundColor => Theme.of(this).scaffoldBackgroundColor;
Color get primaryColorDark => Theme.of(this).primaryColorDark;
Color? get textColor => Theme.of(this).textTheme.bodyText1!.color;
Color get textColor => textTheme.bodyLarge!.color!;
Color get dialogBackgroundColor => Theme.of(this).dialogBackgroundColor;
Brightness get brightness => Theme.of(this).brightness;
Brightness get iconBrightness => Theme.of(this).colorScheme.brightness;

View File

@ -652,7 +652,7 @@ class _LineLoaderState extends State<LineLoader>
@override
Widget build(BuildContext context) {
return CustomPaint(
painter: LinePainter(_fraction, Theme.of(context).accentColor));
painter: LinePainter(_fraction, context.accentColor));
}
}
@ -1116,7 +1116,7 @@ class LayoutButton extends StatelessWidget {
width: 30,
child: CustomPaint(
painter:
LayoutPainter(4, context.textTheme.bodyText1!.color),
LayoutPainter(4, context.textColor),
),
),
);

View File

@ -48,15 +48,11 @@ dependencies:
tuple: ^2.0.0
url_launcher: ^6.0.3
uuid: ^3.0.4
workmanager: ^0.4.1
workmanager: ^0.5.0
wc_flutter_share: ^0.4.0
xml: ^5.2.0
audio_service: ^0.18.0
just_audio:
git:
url: https://github.com/stonega/just_audio_origin.git
ref: update
path: just_audio
just_audio: ^0.9.23
flutter_downloader:
git:
url: https://github.com/stonega/flutter_downloader.git
@ -74,8 +70,6 @@ dependencies:
path_provider_android: ^2.0.14
dependency_overrides:
meta: 1.3.0
shared_preferences: 2.0.0
linkify:
git:
url: https://github.com/stonega/linkify.git