mirror of
https://github.com/stonega/tsacdop
synced 2025-02-16 11:31:45 +01:00
Minor change.
This commit is contained in:
parent
b5aad31c15
commit
0a8f622f85
@ -5,7 +5,7 @@ import 'package:line_icons/line_icons.dart';
|
|||||||
import '../util/extension_helper.dart';
|
import '../util/extension_helper.dart';
|
||||||
import '../widgets/custom_widget.dart';
|
import '../widgets/custom_widget.dart';
|
||||||
|
|
||||||
const String version = '0.5.0';
|
const String version = '0.5.1';
|
||||||
|
|
||||||
class AboutApp extends StatefulWidget {
|
class AboutApp extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
|
@ -149,7 +149,7 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
|||||||
s.featureDiscoverySearchDes,
|
s.featureDiscoverySearchDes,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: s.add,
|
tooltip: s.add,
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
icon:
|
icon:
|
||||||
Icon(Icons.add_circle_outline),
|
Icon(Icons.add_circle_outline),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
@ -189,7 +189,10 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
|
|||||||
title: s.featureDiscoveryOMPL,
|
title: s.featureDiscoveryOMPL,
|
||||||
description:
|
description:
|
||||||
s.featureDiscoveryOMPLDes,
|
s.featureDiscoveryOMPLDes,
|
||||||
child: PopupMenu()),
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 5.0),
|
||||||
|
child: PopupMenu(),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -93,109 +93,114 @@ class _PopupMenuState extends State<PopupMenu> {
|
|||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
borderRadius: BorderRadius.circular(100),
|
borderRadius: BorderRadius.circular(100),
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
child: PopupMenuButton<int>(
|
child: SizedBox(
|
||||||
shape: RoundedRectangleBorder(
|
height: 40,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10))),
|
width: 40,
|
||||||
elevation: 1,
|
child: PopupMenuButton<int>(
|
||||||
tooltip: s.menu,
|
icon: Icon(Icons.more_vert),
|
||||||
itemBuilder: (context) => [
|
shape: RoundedRectangleBorder(
|
||||||
PopupMenuItem(
|
borderRadius: BorderRadius.circular(10)),
|
||||||
value: 1,
|
elevation: 1,
|
||||||
child: Container(
|
tooltip: s.menu,
|
||||||
padding: EdgeInsets.only(left: 10),
|
itemBuilder: (context) => [
|
||||||
child: Row(
|
PopupMenuItem(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
value: 1,
|
||||||
children: <Widget>[
|
child: Container(
|
||||||
Icon(LineIcons.cloud_download_alt_solid),
|
padding: EdgeInsets.only(left: 10),
|
||||||
Padding(
|
child: Row(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
),
|
children: <Widget>[
|
||||||
Column(
|
Icon(LineIcons.cloud_download_alt_solid),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Padding(
|
||||||
children: <Widget>[
|
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
Text(
|
),
|
||||||
s.homeToprightMenuRefreshAll,
|
Column(
|
||||||
),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
FutureBuilder<String>(
|
children: <Widget>[
|
||||||
future: _getRefreshDate(context),
|
Text(
|
||||||
builder: (_, snapshot) {
|
s.homeToprightMenuRefreshAll,
|
||||||
if (snapshot.hasData) {
|
),
|
||||||
return Text(
|
FutureBuilder<String>(
|
||||||
snapshot.data,
|
future: _getRefreshDate(context),
|
||||||
style:
|
builder: (_, snapshot) {
|
||||||
TextStyle(color: Colors.red, fontSize: 12),
|
if (snapshot.hasData) {
|
||||||
);
|
return Text(
|
||||||
} else {
|
snapshot.data,
|
||||||
return Center();
|
style:
|
||||||
}
|
TextStyle(color: Colors.red, fontSize: 12),
|
||||||
})
|
);
|
||||||
],
|
} else {
|
||||||
),
|
return Center();
|
||||||
],
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
PopupMenuItem(
|
||||||
PopupMenuItem(
|
value: 2,
|
||||||
value: 2,
|
child: Container(
|
||||||
child: Container(
|
padding: EdgeInsets.only(left: 10),
|
||||||
padding: EdgeInsets.only(left: 10),
|
child: Row(
|
||||||
child: Row(
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Icon(LineIcons.paperclip_solid),
|
||||||
Icon(LineIcons.paperclip_solid),
|
Padding(
|
||||||
Padding(
|
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
),
|
||||||
),
|
Text(s.homeToprightMenuImportOMPL),
|
||||||
Text(s.homeToprightMenuImportOMPL),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
PopupMenuItem(
|
||||||
PopupMenuItem(
|
value: 4,
|
||||||
value: 4,
|
child: Container(
|
||||||
child: Container(
|
padding: EdgeInsets.only(left: 10),
|
||||||
padding: EdgeInsets.only(left: 10),
|
child: Row(
|
||||||
child: Row(
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Icon(LineIcons.cog_solid),
|
||||||
Icon(LineIcons.cog_solid),
|
Padding(
|
||||||
Padding(
|
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
),
|
||||||
),
|
Text(s.settings),
|
||||||
Text(s.settings),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
PopupMenuItem(
|
||||||
PopupMenuItem(
|
value: 5,
|
||||||
value: 5,
|
child: Container(
|
||||||
child: Container(
|
padding: EdgeInsets.only(left: 10),
|
||||||
padding: EdgeInsets.only(left: 10),
|
child: Row(
|
||||||
child: Row(
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Icon(LineIcons.info_circle_solid),
|
||||||
Icon(LineIcons.info_circle_solid),
|
Padding(
|
||||||
Padding(
|
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.0),
|
),
|
||||||
),
|
Text(s.homeToprightMenuAbout),
|
||||||
Text(s.homeToprightMenuAbout),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
onSelected: (value) {
|
||||||
onSelected: (value) {
|
if (value == 5) {
|
||||||
if (value == 5) {
|
Navigator.push(
|
||||||
Navigator.push(
|
context, MaterialPageRoute(builder: (context) => AboutApp()));
|
||||||
context, MaterialPageRoute(builder: (context) => AboutApp()));
|
} else if (value == 2) {
|
||||||
} else if (value == 2) {
|
_getFilePath();
|
||||||
_getFilePath();
|
} else if (value == 1) {
|
||||||
} else if (value == 1) {
|
refreshWorker.start([]);
|
||||||
refreshWorker.start([]);
|
} else if (value == 3) {
|
||||||
} else if (value == 3) {
|
// setting.theme != 2 ? setting.setTheme(2) : setting.setTheme(1);
|
||||||
// setting.theme != 2 ? setting.setTheme(2) : setting.setTheme(1);
|
} else if (value == 4) {
|
||||||
} else if (value == 4) {
|
Navigator.push(
|
||||||
Navigator.push(
|
context, MaterialPageRoute(builder: (context) => Settings()));
|
||||||
context, MaterialPageRoute(builder: (context) => Settings()));
|
}
|
||||||
}
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class MyHomePageDelegate extends SearchDelegate<int> {
|
|||||||
},
|
},
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
tooltip: context.s.back,
|
tooltip: context.s.back,
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
icon: AnimatedIcon(
|
icon: AnimatedIcon(
|
||||||
icon: AnimatedIcons.menu_arrow,
|
icon: AnimatedIcons.menu_arrow,
|
||||||
progress: transitionAnimation,
|
progress: transitionAnimation,
|
||||||
@ -115,7 +115,7 @@ class MyHomePageDelegate extends SearchDelegate<int> {
|
|||||||
if (query.isNotEmpty)
|
if (query.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: context.s.clear,
|
tooltip: context.s.clear,
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
icon: const Icon(Icons.clear),
|
icon: const Icon(Icons.clear),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
query = '';
|
query = '';
|
||||||
|
@ -16,6 +16,7 @@ import 'state/refresh_podcast.dart';
|
|||||||
import 'state/search_state.dart';
|
import 'state/search_state.dart';
|
||||||
import 'state/setting_state.dart';
|
import 'state/setting_state.dart';
|
||||||
|
|
||||||
|
///Initial theme settings
|
||||||
final SettingState themeSetting = SettingState();
|
final SettingState themeSetting = SettingState();
|
||||||
Future main() async {
|
Future main() async {
|
||||||
timeDilation = 1.0;
|
timeDilation = 1.0;
|
||||||
@ -52,7 +53,7 @@ class MyApp extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Consumer<SettingState>(
|
return Consumer<SettingState>(
|
||||||
builder: (_, setting, __) {
|
builder: (_, setting, child) {
|
||||||
return FeatureDiscovery(
|
return FeatureDiscovery(
|
||||||
child: MaterialApp(
|
child: MaterialApp(
|
||||||
themeMode: setting.theme,
|
themeMode: setting.theme,
|
||||||
@ -67,12 +68,11 @@ class MyApp extends StatelessWidget {
|
|||||||
GlobalCupertinoLocalizations.delegate,
|
GlobalCupertinoLocalizations.delegate,
|
||||||
],
|
],
|
||||||
supportedLocales: S.delegate.supportedLocales,
|
supportedLocales: S.delegate.supportedLocales,
|
||||||
home: setting.showIntro
|
home: setting.showIntro ? SlideIntro(goto: Goto.home) : child,
|
||||||
? SlideIntro(goto: Goto.home)
|
|
||||||
: FeatureDiscovery(child: Home()),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
child: FeatureDiscovery(child: Home()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -336,12 +336,12 @@ class _PodcastDetailState extends State<PodcastDetail> {
|
|||||||
String tooltip,
|
String tooltip,
|
||||||
List<PopupMenuEntry<int>> itemBuilder,
|
List<PopupMenuEntry<int>> itemBuilder,
|
||||||
Function(int) onSelected,
|
Function(int) onSelected,
|
||||||
bool clip = true}) =>
|
}) =>
|
||||||
Material(
|
Material(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
borderRadius: BorderRadius.circular(100),
|
borderRadius: BorderRadius.circular(100),
|
||||||
clipBehavior: clip ? Clip.hardEdge : Clip.none,
|
clipBehavior: Clip.hardEdge,
|
||||||
child: PopupMenuButton<int>(
|
child: PopupMenuButton<int>(
|
||||||
shape:
|
shape:
|
||||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
@ -358,7 +358,7 @@ class _PodcastDetailState extends State<PodcastDetail> {
|
|||||||
return _customPopupMenu(
|
return _customPopupMenu(
|
||||||
tooltip: s.menu,
|
tooltip: s.menu,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
padding: EdgeInsets.all(10),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 30,
|
height: 30,
|
||||||
|
@ -178,7 +178,7 @@ class _PodcastManageState extends State<PodcastManage>
|
|||||||
description: s.featureDiscoveryGroupDes,
|
description: s.featureDiscoveryGroupDes,
|
||||||
buttonColor: Colors.cyan[500],
|
buttonColor: Colors.cyan[500],
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
onPressed: () => showGeneralDialog(
|
onPressed: () => showGeneralDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
|
@ -205,20 +205,23 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
onTap: () => _setAutoDownload(!snapshot.data),
|
onTap: () => _setAutoDownload(!snapshot.data),
|
||||||
dense: true,
|
dense: true,
|
||||||
leading: SizedBox(
|
title: Row(
|
||||||
height: 18,
|
children: [
|
||||||
width: 18,
|
SizedBox(
|
||||||
child: CustomPaint(
|
height: 18,
|
||||||
painter: DownloadPainter(
|
width: 18,
|
||||||
color: context.brightness == Brightness.light
|
child: CustomPaint(
|
||||||
? Colors.grey[600]
|
painter: DownloadPainter(
|
||||||
: Colors.white,
|
color: context.textColor,
|
||||||
fraction: 0,
|
fraction: 0,
|
||||||
progressColor: context.accentColor,
|
progressColor: context.accentColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(width: 20),
|
||||||
|
Text(s.autoDownload, style: textStyle),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
title: Text(s.autoDownload, style: textStyle),
|
|
||||||
trailing: Transform.scale(
|
trailing: Transform.scale(
|
||||||
scale: 0.8,
|
scale: 0.8,
|
||||||
child:
|
child:
|
||||||
@ -233,8 +236,13 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
dense: true,
|
dense: true,
|
||||||
onTap: () => _setNeverUpdate(!snapshot.data),
|
onTap: () => _setNeverUpdate(!snapshot.data),
|
||||||
leading: Icon(Icons.lock, size: 18),
|
title: Row(
|
||||||
title: Text(s.neverAutoUpdate, style: textStyle),
|
children: [
|
||||||
|
Icon(Icons.lock, size: 18),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
Text(s.neverAutoUpdate, style: textStyle),
|
||||||
|
],
|
||||||
|
),
|
||||||
trailing: Transform.scale(
|
trailing: Transform.scale(
|
||||||
scale: 0.8,
|
scale: 0.8,
|
||||||
child:
|
child:
|
||||||
@ -256,8 +264,13 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
dense: true,
|
dense: true,
|
||||||
leading: Icon(Icons.fast_forward, size: 18),
|
title: Row(
|
||||||
title: Text(s.skipSecondsAtStart, style: textStyle),
|
children: [
|
||||||
|
Icon(Icons.fast_forward, size: 18),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
Text(s.skipSecondsAtStart, style: textStyle),
|
||||||
|
],
|
||||||
|
),
|
||||||
trailing: Padding(
|
trailing: Padding(
|
||||||
padding: const EdgeInsets.only(right: 10.0),
|
padding: const EdgeInsets.only(right: 10.0),
|
||||||
child: Text(snapshot.data.toTime),
|
child: Text(snapshot.data.toTime),
|
||||||
@ -282,8 +295,13 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dense: true,
|
dense: true,
|
||||||
title: Text(s.refreshArtwork, style: textStyle),
|
title: Row(
|
||||||
leading: Icon(Icons.refresh, size: 18),
|
children: [
|
||||||
|
Icon(Icons.refresh, size: 18),
|
||||||
|
SizedBox(width: 20),
|
||||||
|
Text(s.refreshArtwork, style: textStyle),
|
||||||
|
],
|
||||||
|
),
|
||||||
trailing: Padding(
|
trailing: Padding(
|
||||||
padding: const EdgeInsets.only(right: 15.0),
|
padding: const EdgeInsets.only(right: 15.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
@ -301,19 +319,23 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
dense: true,
|
dense: true,
|
||||||
title: Text(s.menuMarkAllListened,
|
title: Row(
|
||||||
style: textStyle.copyWith(
|
children: [
|
||||||
color: context.accentColor, fontWeight: FontWeight.bold)),
|
SizedBox(
|
||||||
leading: SizedBox(
|
height: 18,
|
||||||
height: 18,
|
width: 18,
|
||||||
width: 18,
|
child: CustomPaint(
|
||||||
child: CustomPaint(
|
painter: ListenedAllPainter(
|
||||||
painter: ListenedAllPainter(
|
context.accentColor,
|
||||||
context.brightness == Brightness.light
|
stroke: 2),
|
||||||
? Colors.grey[600]
|
),
|
||||||
: Colors.white,
|
),
|
||||||
stroke: 2),
|
SizedBox(width: 20),
|
||||||
),
|
Text(s.menuMarkAllListened,
|
||||||
|
style: textStyle.copyWith(
|
||||||
|
color: context.accentColor,
|
||||||
|
fontWeight: FontWeight.bold)),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
trailing: Padding(
|
trailing: Padding(
|
||||||
padding: const EdgeInsets.only(right: 10.0),
|
padding: const EdgeInsets.only(right: 10.0),
|
||||||
@ -365,10 +387,15 @@ class _PodcastSettingState extends State<PodcastSetting> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
dense: true,
|
dense: true,
|
||||||
title: Text(s.remove,
|
title: Row(
|
||||||
style: textStyle.copyWith(
|
children: [
|
||||||
color: Colors.red, fontWeight: FontWeight.bold)),
|
Icon(Icons.delete, color: Colors.red, size: 18),
|
||||||
leading: Icon(Icons.delete, color: Colors.red, size:18),
|
SizedBox(width: 20),
|
||||||
|
Text(s.remove,
|
||||||
|
style: textStyle.copyWith(
|
||||||
|
color: Colors.red, fontWeight: FontWeight.bold)),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (_removeConfirm)
|
if (_removeConfirm)
|
||||||
Container(
|
Container(
|
||||||
|
@ -31,14 +31,16 @@ class _SettingsState extends State<Settings> {
|
|||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
dense: true,
|
dense: true,
|
||||||
leading: Icon(
|
title: Row(
|
||||||
icon,
|
children: [
|
||||||
size: 20,
|
Icon(icon, size: 20),
|
||||||
),
|
SizedBox(width: 20),
|
||||||
title: Text(
|
Text(
|
||||||
name,
|
name,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: context.textTheme.bodyText2,
|
style: context.textTheme.bodyText2,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1211,7 +1211,7 @@ class CustomBackButton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
icon: const BackButtonIcon(),
|
icon: const BackButtonIcon(),
|
||||||
tooltip: context.s.back,
|
tooltip: context.s.back,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user