fix: remove unused null check
This commit is contained in:
parent
731d50935b
commit
e97a493135
|
@ -525,7 +525,7 @@ class __HistoryState extends State<_History> {
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
audio.delFromPlaylist(episode!);
|
audio.delFromPlaylist(episode!);
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: s!.toastRemovePlaylist,
|
msg: s.toastRemovePlaylist,
|
||||||
gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
@ -534,7 +534,7 @@ class __HistoryState extends State<_History> {
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
audio.addToPlaylist(episode!);
|
audio.addToPlaylist(episode!);
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: s!.toastAddPlaylist,
|
msg: s.toastAddPlaylist,
|
||||||
gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -724,7 +724,7 @@ class __PlaylistsState extends State<_Playlists> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
s!.queue,
|
s.queue,
|
||||||
style: context.textTheme.headline6,
|
style: context.textTheme.headline6,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
|
@ -743,14 +743,13 @@ class __PlaylistsState extends State<_Playlists> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(s.play.toUpperCase(),
|
Text(s.play.toUpperCase(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: context.accentColor,
|
||||||
Theme.of(context).accentColor,
|
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
)),
|
)),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.play_arrow,
|
Icons.play_arrow,
|
||||||
color: Theme.of(context).accentColor,
|
color: context.accentColor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -798,7 +797,7 @@ class __PlaylistsState extends State<_Playlists> {
|
||||||
),
|
),
|
||||||
title: Text(data[index].name!),
|
title: Text(data[index].name!),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
'${data[index].length} ${s!.episode(data[index].length).toLowerCase()}'),
|
'${data[index].length} ${s.episode(data[index].length).toLowerCase()}'),
|
||||||
trailing: TextButton(
|
trailing: TextButton(
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
primary: context.accentColor,
|
primary: context.accentColor,
|
||||||
|
@ -808,13 +807,13 @@ class __PlaylistsState extends State<_Playlists> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(s.play.toUpperCase(),
|
Text(s.play.toUpperCase(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context).accentColor,
|
color: context.accentColor,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
)),
|
)),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.play_arrow,
|
Icons.play_arrow,
|
||||||
color: Theme.of(context).accentColor,
|
color: context.accentColor,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -43,9 +43,9 @@ class _PlaylistDetailState extends State<PlaylistDetail> {
|
||||||
),
|
),
|
||||||
title: Text(_selectedEpisodes.isEmpty
|
title: Text(_selectedEpisodes.isEmpty
|
||||||
? widget.playlist.isQueue
|
? widget.playlist.isQueue
|
||||||
? s!.queue
|
? s.queue
|
||||||
: widget.playlist.name!
|
: widget.playlist.name!
|
||||||
: s!.selected(_selectedEpisodes.length)),
|
: s.selected(_selectedEpisodes.length)),
|
||||||
actions: [
|
actions: [
|
||||||
if (_selectedEpisodes.isNotEmpty)
|
if (_selectedEpisodes.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@ -100,18 +100,17 @@ class _PlaylistDetailState extends State<PlaylistDetail> {
|
||||||
.reorderPlaylist(oldIndex, newIndex);
|
.reorderPlaylist(oldIndex, newIndex);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else {
|
} else {
|
||||||
context
|
context.read<AudioPlayerNotifier>().reorderEpisodesInPlaylist(
|
||||||
.read<AudioPlayerNotifier>()
|
widget.playlist,
|
||||||
.reorderEpisodesInPlaylist(widget.playlist,
|
oldIndex: oldIndex,
|
||||||
oldIndex: oldIndex, newIndex: newIndex);
|
newIndex: newIndex);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
children: episodes.map<Widget>((episode) {
|
children: episodes.map<Widget>((episode) {
|
||||||
return _PlaylistItem(episode,
|
return _PlaylistItem(episode,
|
||||||
key: ValueKey(episode!.enclosureUrl),
|
key: ValueKey(episode!.enclosureUrl), onSelect: (episode) {
|
||||||
onSelect: (episode) {
|
|
||||||
_selectedEpisodes.add(episode);
|
_selectedEpisodes.add(episode);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}, onRemove: (episode) {
|
}, onRemove: (episode) {
|
||||||
|
@ -119,7 +118,8 @@ class _PlaylistDetailState extends State<PlaylistDetail> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}, reset: _resetSelected);
|
}, reset: _resetSelected);
|
||||||
}).toList());
|
}).toList());
|
||||||
}),
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ class __PlaylistItemState extends State<_PlaylistItem>
|
||||||
_episodeTag(
|
_episodeTag(
|
||||||
episode.duration == 0
|
episode.duration == 0
|
||||||
? ''
|
? ''
|
||||||
: s!.minsCount(episode.duration! ~/ 60),
|
: s.minsCount(episode.duration! ~/ 60),
|
||||||
Colors.cyan[300]),
|
Colors.cyan[300]),
|
||||||
if (episode.enclosureLength != null)
|
if (episode.enclosureLength != null)
|
||||||
_episodeTag(
|
_episodeTag(
|
||||||
|
@ -338,7 +338,7 @@ class __PlaylistSettingState extends State<_PlaylistSetting> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => setState(() {
|
onPressed: () => setState(() {
|
||||||
_clearConfirm = false;
|
_clearConfirm = false;
|
||||||
}),
|
}),
|
||||||
|
@ -381,7 +381,7 @@ class __PlaylistSettingState extends State<_PlaylistSetting> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () => setState(() {
|
onPressed: () => setState(() {
|
||||||
_removeConfirm = false;
|
_removeConfirm = false;
|
||||||
}),
|
}),
|
||||||
|
@ -407,9 +407,9 @@ class __PlaylistSettingState extends State<_PlaylistSetting> {
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.info_outline,
|
Icon(Icons.info_outline,
|
||||||
size: 16, color: context.textColor!.withAlpha(90)),
|
size: 16, color: context.textColor.withAlpha(90)),
|
||||||
Text(s.defaultQueueReminder,
|
Text(s.defaultQueueReminder,
|
||||||
style: TextStyle(color: context.textColor!.withAlpha(90))),
|
style: TextStyle(color: context.textColor.withAlpha(90))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -56,7 +56,7 @@ class _CustomTabsState extends State<CustomTabView>
|
||||||
_currentPosition = widget.itemCount - 1;
|
_currentPosition = widget.itemCount - 1;
|
||||||
_currentPosition = _currentPosition! < 0 ? 0 : _currentPosition;
|
_currentPosition = _currentPosition! < 0 ? 0 : _currentPosition;
|
||||||
if (widget.onPositionChange is ValueChanged<int>) {
|
if (widget.onPositionChange is ValueChanged<int>) {
|
||||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
widget.onPositionChange!(_currentPosition);
|
widget.onPositionChange!(_currentPosition);
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,14 +457,16 @@ class _PodcastDetailState extends State<PodcastDetail> {
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 2,
|
width: 2,
|
||||||
color: context.textColor!.withOpacity(0.2))),
|
color: context.textColor.withOpacity(0.2))),
|
||||||
child: _query == ''
|
child: _query == ''
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
Text(s.search,
|
Text(
|
||||||
|
s.search,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: context.textColor!
|
color: context.textColor.withOpacity(0.4),
|
||||||
.withOpacity(0.4))),
|
),
|
||||||
|
),
|
||||||
Spacer()
|
Spacer()
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -732,7 +734,6 @@ class _PodcastDetailState extends State<PodcastDetail> {
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
slivers: <Widget>[
|
slivers: <Widget>[
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
brightness: Brightness.dark,
|
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.more_vert),
|
icon: Icon(Icons.more_vert),
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:feature_discovery/feature_discovery.dart';
|
import 'package:feature_discovery/feature_discovery.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
@ -65,7 +64,7 @@ class _PodcastManageState extends State<PodcastManage>
|
||||||
_controller.stop();
|
_controller.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
FeatureDiscovery.discoverFeatures(context,
|
FeatureDiscovery.discoverFeatures(context,
|
||||||
const <String>{addGroupFeature, configureGroup, configurePodcast});
|
const <String>{addGroupFeature, configureGroup, configurePodcast});
|
||||||
});
|
});
|
||||||
|
@ -91,7 +90,7 @@ class _PodcastManageState extends State<PodcastManage>
|
||||||
context,
|
context,
|
||||||
featureId: configureGroup,
|
featureId: configureGroup,
|
||||||
tapTarget: Icon(Icons.menu),
|
tapTarget: Icon(Icons.menu),
|
||||||
title: s!.featureDiscoveryEditGroup,
|
title: s.featureDiscoveryEditGroup,
|
||||||
backgroundColor: Colors.cyan[600],
|
backgroundColor: Colors.cyan[600],
|
||||||
description: s.featureDiscoveryEditGroupDes,
|
description: s.featureDiscoveryEditGroupDes,
|
||||||
buttonColor: Colors.cyan[500],
|
buttonColor: Colors.cyan[500],
|
||||||
|
@ -126,9 +125,7 @@ class _PodcastManageState extends State<PodcastManage>
|
||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _fraction! > 0.5
|
color: _fraction! > 0.5 ? Colors.red : context.accentColor,
|
||||||
? Colors.red
|
|
||||||
: Theme.of(context).accentColor,
|
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
@ -159,10 +156,9 @@ class _PodcastManageState extends State<PodcastManage>
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: SystemUiOverlayStyle(
|
value: SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness: Theme.of(context).accentColorBrightness,
|
statusBarIconBrightness: context.brightness,
|
||||||
systemNavigationBarColor: Theme.of(context).primaryColor,
|
systemNavigationBarColor: context.primaryColor,
|
||||||
systemNavigationBarIconBrightness:
|
systemNavigationBarIconBrightness: context.iconBrightness,
|
||||||
Theme.of(context).accentColorBrightness,
|
|
||||||
// statusBarColor: Theme.of(context).primaryColor,
|
// statusBarColor: Theme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
@ -530,8 +526,8 @@ class _AddGroupState extends State<AddGroup> {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(s.confirm,
|
child:
|
||||||
style: TextStyle(color: Theme.of(context).accentColor)),
|
Text(s.confirm, style: TextStyle(color: context.accentColor)),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
title: SizedBox(width: context.width - 160, child: Text(s.newGroup)),
|
title: SizedBox(width: context.width - 160, child: Text(s.newGroup)),
|
||||||
|
|
|
@ -121,7 +121,7 @@ class _DataBackupState extends State<DataBackup> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: s!.toastReadFile,
|
msg: s.toastReadFile,
|
||||||
gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
);
|
);
|
||||||
final filePath = filePickResult.files.first.path!;
|
final filePath = filePickResult.files.first.path!;
|
||||||
|
|
|
@ -84,9 +84,9 @@ class _DownloadsManageState extends State<DownloadsManage> {
|
||||||
var date = DateTime.fromMillisecondsSinceEpoch(downloadDate);
|
var date = DateTime.fromMillisecondsSinceEpoch(downloadDate);
|
||||||
var diffrence = DateTime.now().toUtc().difference(date);
|
var diffrence = DateTime.now().toUtc().difference(date);
|
||||||
if (diffrence.inHours < 24) {
|
if (diffrence.inHours < 24) {
|
||||||
return s!.hoursAgo(diffrence.inHours);
|
return s.hoursAgo(diffrence.inHours);
|
||||||
} else if (diffrence.inDays < 7) {
|
} else if (diffrence.inDays < 7) {
|
||||||
return s!.daysAgo(diffrence.inDays);
|
return s.daysAgo(diffrence.inDays);
|
||||||
} else {
|
} else {
|
||||||
return DateFormat.yMMMd().format(
|
return DateFormat.yMMMd().format(
|
||||||
DateTime.fromMillisecondsSinceEpoch(pubDate!, isUtc: true).toLocal());
|
DateTime.fromMillisecondsSinceEpoch(pubDate!, isUtc: true).toLocal());
|
||||||
|
|
|
@ -123,10 +123,9 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: SystemUiOverlayStyle(
|
value: SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness: Theme.of(context).accentColorBrightness,
|
statusBarIconBrightness: context.brightness,
|
||||||
systemNavigationBarColor: Theme.of(context).primaryColor,
|
systemNavigationBarColor: Theme.of(context).primaryColor,
|
||||||
systemNavigationBarIconBrightness:
|
systemNavigationBarIconBrightness: context.iconBrightness,
|
||||||
Theme.of(context).accentColorBrightness,
|
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: context.primaryColor,
|
backgroundColor: context.primaryColor,
|
||||||
|
@ -147,7 +146,7 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
return FlexibleSpaceBar(
|
return FlexibleSpaceBar(
|
||||||
title: top < 70 + MediaQuery.of(context).padding.top
|
title: top < 70 + MediaQuery.of(context).padding.top
|
||||||
? Text(
|
? Text(
|
||||||
s!.settingsHistory,
|
s.settingsHistory,
|
||||||
)
|
)
|
||||||
: Center(),
|
: Center(),
|
||||||
background: Padding(
|
background: Padding(
|
||||||
|
@ -237,7 +236,7 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
.data![index]
|
.data![index]
|
||||||
.playdate!),
|
.playdate!),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: context.textColor!
|
color: context.textColor
|
||||||
.withOpacity(0.8),
|
.withOpacity(0.8),
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontStyle:
|
fontStyle:
|
||||||
|
@ -285,7 +284,7 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
padding: EdgeInsets.all(2),
|
padding: EdgeInsets.all(2),
|
||||||
child: Text(
|
child: Text(
|
||||||
seconds == 0 && seekValue == 1
|
seconds == 0 && seekValue == 1
|
||||||
? s!.mark
|
? s.mark
|
||||||
: seconds!.toInt().toTime,
|
: seconds!.toInt().toTime,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
|
@ -334,7 +333,7 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
DateFormat.yMd().add_jm().format(
|
DateFormat.yMd().add_jm().format(
|
||||||
snapshot.data![index].subDate),
|
snapshot.data![index].subDate),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: context.textColor!
|
color: context.textColor
|
||||||
.withOpacity(0.8),
|
.withOpacity(0.8),
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontStyle: FontStyle.italic),
|
fontStyle: FontStyle.italic),
|
||||||
|
@ -348,7 +347,7 @@ class _PlayedHistoryState extends State<PlayedHistory>
|
||||||
snapshot.data![index].subDate)
|
snapshot.data![index].subDate)
|
||||||
.inDays))
|
.inDays))
|
||||||
: Text(
|
: Text(
|
||||||
s!.removedAt(DateFormat.yMd()
|
s.removedAt(DateFormat.yMd()
|
||||||
.add_jm()
|
.add_jm()
|
||||||
.format(snapshot
|
.format(snapshot
|
||||||
.data![index].delDate)),
|
.data![index].delDate)),
|
||||||
|
|
|
@ -65,11 +65,11 @@ class _LayoutSettingState extends State<LayoutSetting> {
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case PlayerHeight.short:
|
case PlayerHeight.short:
|
||||||
return s!.playerHeightShort;
|
return s.playerHeightShort;
|
||||||
case PlayerHeight.mid:
|
case PlayerHeight.mid:
|
||||||
return s!.playerHeightMed;
|
return s.playerHeightMed;
|
||||||
case PlayerHeight.tall:
|
case PlayerHeight.tall:
|
||||||
return s!.playerHeightTall;
|
return s.playerHeightTall;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
@ -43,11 +41,11 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||||
String _volumeEffect(BuildContext context, int? i) {
|
String _volumeEffect(BuildContext context, int? i) {
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
if (i == 2000) {
|
if (i == 2000) {
|
||||||
return s!.playerHeightShort;
|
return s.playerHeightShort;
|
||||||
} else if (i == 3000) {
|
} else if (i == 3000) {
|
||||||
return s!.playerHeightMed;
|
return s.playerHeightMed;
|
||||||
}
|
}
|
||||||
return s!.playerHeightTall;
|
return s.playerHeightTall;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> _getMarkListenedSkip() async {
|
Future<bool> _getMarkListenedSkip() async {
|
||||||
|
@ -142,7 +140,7 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||||
var startTime = data.item1!;
|
var startTime = data.item1!;
|
||||||
final timeOfDay = await showCustomTimePicker(
|
final timeOfDay = await showCustomTimePicker(
|
||||||
context: context,
|
context: context,
|
||||||
cancelText: s!.cancel,
|
cancelText: s.cancel,
|
||||||
confirmText: s.confirm,
|
confirmText: s.confirm,
|
||||||
helpText: '',
|
helpText: '',
|
||||||
initialTime: TimeOfDay(
|
initialTime: TimeOfDay(
|
||||||
|
@ -227,10 +225,9 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||||
final s = context.s;
|
final s = context.s;
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: SystemUiOverlayStyle(
|
value: SystemUiOverlayStyle(
|
||||||
statusBarIconBrightness: Theme.of(context).accentColorBrightness,
|
statusBarIconBrightness: context.brightness,
|
||||||
systemNavigationBarColor: Theme.of(context).primaryColor,
|
systemNavigationBarColor: context.primaryColor,
|
||||||
systemNavigationBarIconBrightness:
|
systemNavigationBarIconBrightness: context.iconBrightness,
|
||||||
Theme.of(context).accentColorBrightness,
|
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
@ -264,11 +261,13 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 70),
|
padding: EdgeInsets.symmetric(horizontal: 70),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(s.homeMenuPlaylist,
|
child: Text(
|
||||||
|
s.homeMenuPlaylist,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodyText1!
|
.bodyText1!
|
||||||
.copyWith(color: Theme.of(context).accentColor)),
|
.copyWith(color: context.accentColor),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Selector<SettingState, bool?>(
|
Selector<SettingState, bool?>(
|
||||||
selector: (_, settings) => settings.autoPlay,
|
selector: (_, settings) => settings.autoPlay,
|
||||||
|
@ -389,9 +388,11 @@ class _PlaySettingState extends State<PlaySetting> {
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 70),
|
padding: EdgeInsets.symmetric(horizontal: 70),
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(s.sleepTimer,
|
child: Text(
|
||||||
|
s.sleepTimer,
|
||||||
style: context.textTheme.bodyText1!
|
style: context.textTheme.bodyText1!
|
||||||
.copyWith(color: Theme.of(context).accentColor)),
|
.copyWith(color: context.accentColor),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
ListView(
|
ListView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
|
@ -494,7 +495,7 @@ class __NotificationLayoutState extends State<_NotificationLayout> {
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
Text(des,
|
Text(des,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12, color: context.textColor!.withOpacity(0.5)),
|
fontSize: 12, color: context.textColor.withOpacity(0.5)),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.clip),
|
overflow: TextOverflow.clip),
|
||||||
|
@ -526,8 +527,8 @@ class __NotificationLayoutState extends State<_NotificationLayout> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_notificationIcon(Icon(Icons.pause_circle_filled),
|
_notificationIcon(
|
||||||
'${s!.play}| ${s.pause}'),
|
Icon(Icons.pause_circle_filled), '${s.play}| ${s.pause}'),
|
||||||
_notificationIcon(Icon(Icons.fast_forward), s.fastForward),
|
_notificationIcon(Icon(Icons.fast_forward), s.fastForward),
|
||||||
_notificationIcon(Icon(Icons.skip_next), s.skipToNext),
|
_notificationIcon(Icon(Icons.skip_next), s.skipToNext),
|
||||||
_notificationIcon(Icon(Icons.close), s.stop),
|
_notificationIcon(Icon(Icons.close), s.stop),
|
||||||
|
@ -539,7 +540,7 @@ class __NotificationLayoutState extends State<_NotificationLayout> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_notificationIcon(Icon(Icons.pause_circle_filled),
|
_notificationIcon(Icon(Icons.pause_circle_filled),
|
||||||
'${s!.play}| ${s.pause}'),
|
'${s.play}| ${s.pause}'),
|
||||||
_notificationIcon(
|
_notificationIcon(
|
||||||
Icon(Icons.fast_rewind), s.fastRewind),
|
Icon(Icons.fast_rewind), s.fastRewind),
|
||||||
_notificationIcon(Icon(Icons.skip_next), s.skipToNext),
|
_notificationIcon(Icon(Icons.skip_next), s.skipToNext),
|
||||||
|
@ -549,7 +550,7 @@ class __NotificationLayoutState extends State<_NotificationLayout> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_notificationIcon(Icon(Icons.fast_rewind), s!.fastRewind),
|
_notificationIcon(Icon(Icons.fast_rewind), s.fastRewind),
|
||||||
_notificationIcon(Icon(Icons.pause_circle_filled),
|
_notificationIcon(Icon(Icons.pause_circle_filled),
|
||||||
'${s.play}| ${s.pause}'),
|
'${s.play}| ${s.pause}'),
|
||||||
_notificationIcon(
|
_notificationIcon(
|
||||||
|
@ -618,7 +619,8 @@ class __SpeedListState extends State<_SpeedList> {
|
||||||
var speedSelected = snapshot.data;
|
var speedSelected = snapshot.data;
|
||||||
return Wrap(
|
return Wrap(
|
||||||
children: kSpeedToSelect
|
children: kSpeedToSelect
|
||||||
.map((e) => Padding(
|
.map(
|
||||||
|
(e) => Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: FilterChip(
|
child: FilterChip(
|
||||||
key: ValueKey<String>(e.toString()),
|
key: ValueKey<String>(e.toString()),
|
||||||
|
@ -641,9 +643,12 @@ class __SpeedListState extends State<_SpeedList> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
))
|
),
|
||||||
.toList());
|
)
|
||||||
}),
|
.toList(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -9,7 +9,7 @@ part of 'search_top_podcast.dart';
|
||||||
SearchTopPodcast<T> _$SearchTopPodcastFromJson<T>(Map<String, dynamic> json) {
|
SearchTopPodcast<T> _$SearchTopPodcastFromJson<T>(Map<String, dynamic> json) {
|
||||||
return SearchTopPodcast<T>(
|
return SearchTopPodcast<T>(
|
||||||
podcasts:
|
podcasts:
|
||||||
(json['podcasts'] as List?)?.map(_ConvertT<T>().fromJson)?.toList(),
|
(json['podcasts'] as List?)?.map(_ConvertT<T>().fromJson).toList(),
|
||||||
id: json['id'] as int?,
|
id: json['id'] as int?,
|
||||||
total: json['total'] as int?,
|
total: json['total'] as int?,
|
||||||
hasNext: json['has_next'] as bool?,
|
hasNext: json['has_next'] as bool?,
|
||||||
|
@ -20,7 +20,7 @@ SearchTopPodcast<T> _$SearchTopPodcastFromJson<T>(Map<String, dynamic> json) {
|
||||||
Map<String, dynamic> _$SearchTopPodcastToJson<T>(
|
Map<String, dynamic> _$SearchTopPodcastToJson<T>(
|
||||||
SearchTopPodcast<T> instance) =>
|
SearchTopPodcast<T> instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'podcasts': instance.podcasts?.map(_ConvertT<T>().toJson)?.toList(),
|
'podcasts': instance.podcasts?.map(_ConvertT<T>().toJson).toList(),
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'page': instance.page,
|
'page': instance.page,
|
||||||
'total': instance.total,
|
'total': instance.total,
|
||||||
|
|
|
@ -9,14 +9,14 @@ part of 'searchepisodes.dart';
|
||||||
SearchEpisodes<E> _$SearchEpisodesFromJson<E>(Map<String, dynamic> json) {
|
SearchEpisodes<E> _$SearchEpisodesFromJson<E>(Map<String, dynamic> json) {
|
||||||
return SearchEpisodes<E>(
|
return SearchEpisodes<E>(
|
||||||
episodes:
|
episodes:
|
||||||
(json['episodes'] as List?)?.map(_ConvertE<E>().fromJson)?.toList(),
|
(json['episodes'] as List?)?.map(_ConvertE<E>().fromJson).toList(),
|
||||||
nextEpisodeDate: json['next_episode_pub_date'] as int?,
|
nextEpisodeDate: json['next_episode_pub_date'] as int?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> _$SearchEpisodesToJson<E>(SearchEpisodes<E> instance) =>
|
Map<String, dynamic> _$SearchEpisodesToJson<E>(SearchEpisodes<E> instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'episodes': instance.episodes?.map(_ConvertE<E>().toJson)?.toList(),
|
'episodes': instance.episodes?.map(_ConvertE<E>().toJson).toList(),
|
||||||
'next_episode_pub_date': instance.nextEpisodeDate,
|
'next_episode_pub_date': instance.nextEpisodeDate,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ part of 'searchpodcast.dart';
|
||||||
|
|
||||||
SearchPodcast<P> _$SearchPodcastFromJson<P>(Map<String, dynamic> json) {
|
SearchPodcast<P> _$SearchPodcastFromJson<P>(Map<String, dynamic> json) {
|
||||||
return SearchPodcast<P>(
|
return SearchPodcast<P>(
|
||||||
results: (json['results'] as List?)?.map(_ConvertP<P>().fromJson)?.toList(),
|
results: (json['results'] as List?)?.map(_ConvertP<P>().fromJson).toList(),
|
||||||
nextOffset: json['next_offset'] as int?,
|
nextOffset: json['next_offset'] as int?,
|
||||||
total: json['total'] as int?,
|
total: json['total'] as int?,
|
||||||
count: json['count'] as int?,
|
count: json['count'] as int?,
|
||||||
|
@ -17,7 +17,7 @@ SearchPodcast<P> _$SearchPodcastFromJson<P>(Map<String, dynamic> json) {
|
||||||
|
|
||||||
Map<String, dynamic> _$SearchPodcastToJson<P>(SearchPodcast<P> instance) =>
|
Map<String, dynamic> _$SearchPodcastToJson<P>(SearchPodcast<P> instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'results': instance.results?.map(_ConvertP<P>().toJson)?.toList(),
|
'results': instance.results?.map(_ConvertP<P>().toJson).toList(),
|
||||||
'next_offset': instance.nextOffset,
|
'next_offset': instance.nextOffset,
|
||||||
'total': instance.total,
|
'total': instance.total,
|
||||||
'count': instance.count,
|
'count': instance.count,
|
||||||
|
|
Loading…
Reference in New Issue