Mouse secondary button clieck pop
This commit is contained in:
parent
7e742a185a
commit
68ac6eff64
|
@ -172,7 +172,7 @@ Future<String?> displayTextInputDialog(BuildContext context,
|
|||
? []
|
||||
: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 20, bottom: 10),
|
||||
padding: const EdgeInsets.only(top: 20, bottom: 10),
|
||||
child: Text(
|
||||
desc,
|
||||
style: TextStyle(
|
||||
|
|
|
@ -28,7 +28,7 @@ Future<void> chooseAddress(BuildContext context) async {
|
|||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text('选择分流'),
|
||||
title: const Text('选择分流'),
|
||||
children: <Widget>[
|
||||
..._addresses.entries.map(
|
||||
(e) => SimpleDialogOption(
|
||||
|
@ -52,7 +52,7 @@ Widget switchAddressSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("分流"),
|
||||
title: const Text("分流"),
|
||||
subtitle: Text(currentAddressName()),
|
||||
onTap: () async {
|
||||
await chooseAddress(context);
|
||||
|
|
|
@ -41,7 +41,7 @@ Widget androidDisplayModeSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("屏幕刷新率(安卓)"),
|
||||
title: const Text("屏幕刷新率(安卓)"),
|
||||
subtitle: Text(_androidDisplayMode),
|
||||
onTap: () async {
|
||||
await _chooseAndroidDisplayMode(context);
|
||||
|
|
|
@ -37,7 +37,7 @@ Widget androidSecureFlagSetting() {
|
|||
return StatefulBuilder(builder:
|
||||
(BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("禁止截图/禁止显示在任务视图"),
|
||||
title: const Text("禁止截图/禁止显示在任务视图"),
|
||||
subtitle: Text(_androidSecureFlag ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseAndroidSecureFlag(context);
|
||||
|
|
|
@ -33,7 +33,7 @@ Future<void> _chooseAutoCleanSec(BuildContext context) async {
|
|||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text('选择自动清理周期'),
|
||||
title: const Text('选择自动清理周期'),
|
||||
children: <Widget>[
|
||||
..._autoCleanMap.entries.map(
|
||||
(e) => SimpleDialogOption(
|
||||
|
@ -57,7 +57,7 @@ Widget autoCleanSecSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("自动清理缓存"),
|
||||
title: const Text("自动清理缓存"),
|
||||
subtitle: Text(_currentAutoCleanSec()),
|
||||
onTap: () async {
|
||||
await _chooseAutoCleanSec(context);
|
||||
|
|
|
@ -31,7 +31,7 @@ Widget autoFullScreenSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("进入阅读器自动全屏"),
|
||||
title: const Text("进入阅读器自动全屏"),
|
||||
subtitle: Text(_autoFullScreen ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseAutoFullScreen(context);
|
||||
|
|
|
@ -66,7 +66,7 @@ Widget chooserRootSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("文件夹选择器默认路径"),
|
||||
title: const Text("文件夹选择器默认路径"),
|
||||
subtitle: Text(_currentChooserRoot()),
|
||||
onTap: () async {
|
||||
await _inputChooserRoot(context);
|
||||
|
|
|
@ -58,7 +58,7 @@ Widget contentFailedReloadActionSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("加载失败时"),
|
||||
title: const Text("加载失败时"),
|
||||
subtitle: Text(_currentContentFailedReloadActionName()),
|
||||
onTap: () async {
|
||||
await _chooseContentFailedReloadAction(context);
|
||||
|
|
|
@ -34,7 +34,7 @@ Widget convertToPNGSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("读取到超大图片时进行缩放(防止崩溃)"),
|
||||
title: const Text("读取到超大图片时进行缩放(防止崩溃)"),
|
||||
subtitle: Text(_convertToPNG ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseConvertToPNGSetting(context);
|
||||
|
|
|
@ -27,7 +27,7 @@ Widget downloadAndExportPathSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("下载的同时导出到文件系统"),
|
||||
title: const Text("下载的同时导出到文件系统"),
|
||||
subtitle: Text(_downloadAndExportPath),
|
||||
onTap: () async {
|
||||
if (_downloadAndExportPath == "") {
|
||||
|
|
|
@ -15,7 +15,7 @@ Widget downloadThreadCountSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("下载线程数"),
|
||||
title: const Text("下载线程数"),
|
||||
subtitle: Text("$_downloadThreadCount"),
|
||||
onTap: () async {
|
||||
int? value = await chooseListDialog(context, "选择下载线程数", _values);
|
||||
|
|
|
@ -29,7 +29,7 @@ Widget exportRenameSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("导出时进行重命名"),
|
||||
title: const Text("导出时进行重命名"),
|
||||
subtitle: Text(_exportRename ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseExportRename(context);
|
||||
|
|
|
@ -67,7 +67,7 @@ Widget fullScreenActionSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("操控方式"),
|
||||
title: const Text("操控方式"),
|
||||
subtitle: Text(currentFullScreenActionName()),
|
||||
onTap: () async {
|
||||
await chooseFullScreenAction(context);
|
||||
|
|
|
@ -27,7 +27,7 @@ Future<void> chooseImageAddress(BuildContext context) async {
|
|||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text('选择图片分流'),
|
||||
title: const Text('选择图片分流'),
|
||||
children: <Widget>[
|
||||
..._imageAddresses.entries.map(
|
||||
(e) => SimpleDialogOption(
|
||||
|
@ -51,7 +51,7 @@ Widget imageSwitchAddressSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("图片分流"),
|
||||
title: const Text("图片分流"),
|
||||
subtitle: Text(currentImageAddressName()),
|
||||
onTap: () async {
|
||||
await chooseImageAddress(context);
|
||||
|
|
|
@ -31,7 +31,7 @@ Widget keyboardControllerSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("阅读器键盘翻页(仅PC)"),
|
||||
title: const Text("阅读器键盘翻页(仅PC)"),
|
||||
subtitle: Text(keyboardController ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseKeyboardController(context);
|
||||
|
|
|
@ -29,7 +29,7 @@ Widget noAnimationSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("取消键盘或音量翻页动画"),
|
||||
title: const Text("取消键盘或音量翻页动画"),
|
||||
subtitle: Text(_noAnimation ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseNoAnimation(context);
|
||||
|
|
|
@ -58,7 +58,7 @@ Widget pagerActionSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("列表页加载方式"),
|
||||
title: const Text("列表页加载方式"),
|
||||
subtitle: Text(_currentPagerActionName()),
|
||||
onTap: () async {
|
||||
await _choosePagerAction(context);
|
||||
|
|
|
@ -34,7 +34,7 @@ Widget proxySetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("代理服务器"),
|
||||
title: const Text("代理服务器"),
|
||||
subtitle: Text(currentProxyName()),
|
||||
onTap: () async {
|
||||
await inputProxy(context);
|
||||
|
|
|
@ -46,7 +46,7 @@ Future<void> chooseQuality(BuildContext context) async {
|
|||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text("请选择图片质量"),
|
||||
title: const Text("请选择图片质量"),
|
||||
children: <Widget>[
|
||||
..._qualities.entries.map(
|
||||
(e) => SimpleDialogOption(
|
||||
|
@ -70,7 +70,7 @@ Widget qualitySetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("浏览时的图片质量"),
|
||||
title: const Text("浏览时的图片质量"),
|
||||
subtitle: Text(currentQualityName()),
|
||||
onTap: () async {
|
||||
await chooseQuality(context);
|
||||
|
|
|
@ -49,7 +49,7 @@ Future<void> choosePagerDirection(BuildContext buildContext) async {
|
|||
context: buildContext,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text("选择翻页方向"),
|
||||
title: const Text("选择翻页方向"),
|
||||
children: _types.entries
|
||||
.map((e) => SimpleDialogOption(
|
||||
child: Text(e.key),
|
||||
|
@ -71,7 +71,7 @@ Widget readerDirectionSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("阅读器方向"),
|
||||
title: const Text("阅读器方向"),
|
||||
subtitle: Text(_currentReaderDirectionName()),
|
||||
onTap: () async {
|
||||
await choosePagerDirection(context);
|
||||
|
|
|
@ -49,7 +49,7 @@ Widget readerSliderPositionSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("滚动条的位置"),
|
||||
title: const Text("滚动条的位置"),
|
||||
subtitle: Text(currentReaderSliderPositionName()),
|
||||
onTap: () async {
|
||||
await chooseReaderSliderPosition(context);
|
||||
|
|
|
@ -52,7 +52,7 @@ Future<void> choosePagerType(BuildContext buildContext) async {
|
|||
context: buildContext,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text("选择阅读模式"),
|
||||
title: const Text("选择阅读模式"),
|
||||
children: _types.entries
|
||||
.map((e) => SimpleDialogOption(
|
||||
child: Text(e.key),
|
||||
|
@ -74,7 +74,7 @@ Widget readerTypeSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("阅读器模式"),
|
||||
title: const Text("阅读器模式"),
|
||||
subtitle: Text(currentReaderTypeName()),
|
||||
onTap: () async {
|
||||
await choosePagerType(context);
|
||||
|
|
|
@ -38,10 +38,10 @@ Future<void> _chooseShadowCategories(BuildContext context) async {
|
|||
}
|
||||
}
|
||||
return MultiSelectDialog<String>(
|
||||
title: Text('封印'),
|
||||
title: const Text('封印'),
|
||||
searchHint: '搜索',
|
||||
cancelText: Text('取消'),
|
||||
confirmText: Text('确定'),
|
||||
cancelText: const Text('取消'),
|
||||
confirmText: const Text('确定'),
|
||||
items: storedCategories.map((e) => MultiSelectItem(e, e)).toList(),
|
||||
initialValue: initialValue,
|
||||
onConfirm: (List<String>? value) async {
|
||||
|
@ -69,7 +69,7 @@ Widget shadowCategoriesSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("封印"),
|
||||
title: const Text("封印"),
|
||||
subtitle: Text(jsonEncode(shadowCategories)),
|
||||
onTap: () async {
|
||||
await _chooseShadowCategories(context);
|
||||
|
|
|
@ -42,7 +42,7 @@ Widget fontSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("字体"),
|
||||
title: const Text("字体"),
|
||||
subtitle: Text("$_fontFamily"),
|
||||
onTap: () async {
|
||||
await inputFont(context);
|
||||
|
@ -170,7 +170,7 @@ class _DarkTheme extends _ThemePackage {
|
|||
colorScheme: ColorScheme.light(
|
||||
secondary: Colors.pink.shade200,
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
appBarTheme: const AppBarTheme(
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
color: Color(0xFF1E1E1E),
|
||||
iconTheme: IconThemeData(
|
||||
|
@ -207,13 +207,16 @@ class _DustyBlueTheme extends _ThemePackage {
|
|||
ThemeData themeData(ThemeData rawData) =>
|
||||
rawData.copyWith(
|
||||
scaffoldBackgroundColor: Color.alphaBlend(
|
||||
Color(0x11999999), Color(0xff20253b)),
|
||||
cardColor: Color.alphaBlend(Color(0x11AAAAAA), Color(0xff20253b)),
|
||||
const Color(0x11999999), const Color(0xff20253b),
|
||||
),
|
||||
cardColor: Color.alphaBlend(
|
||||
const Color(0x11AAAAAA), const Color(0xff20253b),
|
||||
),
|
||||
brightness: Brightness.light,
|
||||
colorScheme: ColorScheme.light(
|
||||
secondary: Colors.blue.shade200,
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
appBarTheme: const AppBarTheme(
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
color: Color(0xff20253b),
|
||||
iconTheme: IconThemeData(
|
||||
|
@ -339,7 +342,7 @@ Future<dynamic> chooseTheme(BuildContext buildContext) async {
|
|||
onChange(!_androidNightMode);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 3, bottom: 3),
|
||||
margin: const EdgeInsets.only(top: 3, bottom: 3),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
|
@ -362,7 +365,7 @@ Future<dynamic> chooseTheme(BuildContext buildContext) async {
|
|||
value: _androidNightMode,
|
||||
onChanged: onChange,
|
||||
),
|
||||
Text("随手机进入黑暗模式"),
|
||||
const Text("随手机进入黑暗模式"),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -43,7 +43,7 @@ Widget timeZoneSetting() {
|
|||
c = "+" + c;
|
||||
}
|
||||
return ListTile(
|
||||
title: Text("时区"),
|
||||
title: const Text("时区"),
|
||||
subtitle: Text(c),
|
||||
onTap: () async {
|
||||
await _chooseTimeZone(context);
|
||||
|
|
|
@ -140,7 +140,7 @@ Widget autoUpdateCheckSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("自动检查更新"),
|
||||
title: const Text("自动检查更新"),
|
||||
subtitle: Text(_periodText()),
|
||||
onTap: () async {
|
||||
await _choosePeriod(context);
|
||||
|
|
|
@ -30,7 +30,7 @@ Widget volumeControllerSetting() {
|
|||
return StatefulBuilder(builder:
|
||||
(BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("阅读器音量键翻页"),
|
||||
title: const Text("阅读器音量键翻页"),
|
||||
subtitle: Text(volumeController ? "是" : "否"),
|
||||
onTap: () async {
|
||||
await _chooseVolumeController(context);
|
||||
|
|
|
@ -61,7 +61,7 @@ Widget shadowCategoriesModeSetting() {
|
|||
return StatefulBuilder(
|
||||
builder: (BuildContext context, void Function(void Function()) setState) {
|
||||
return ListTile(
|
||||
title: Text("封印模式"),
|
||||
title: const Text("封印模式"),
|
||||
subtitle: Text(_currentShadowCategoriesMode()),
|
||||
onTap: () async {
|
||||
await _chooseShadowCategoriesMode(context);
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'package:pikapika/screens/components/MouseAndTouchScrollBehavior.dart';
|
|||
import 'basic/config/Themes.dart';
|
||||
|
||||
void main() {
|
||||
runApp(PikapikaApp());
|
||||
runApp(const PikapikaApp());
|
||||
}
|
||||
|
||||
class PikapikaApp extends StatefulWidget {
|
||||
|
@ -41,7 +41,7 @@ class _PikapikaAppState extends State<PikapikaApp> {
|
|||
theme: currentThemeData(),
|
||||
darkTheme: currentDarkTheme(),
|
||||
navigatorObservers: [navigatorObserver, routeObserver],
|
||||
home: InitScreen(),
|
||||
home: const InitScreen(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import 'package:pikapika/basic/Cross.dart';
|
|||
import 'package:pikapika/basic/config/Version.dart';
|
||||
import 'package:pikapika/screens/components/Badge.dart';
|
||||
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
const _releasesUrl = "https://github.com/niuhuan/pikapika/releases";
|
||||
|
||||
// 关于
|
||||
|
@ -34,6 +36,10 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
var min = size.width < size.height ? size.width : size.height;
|
||||
var _currentVersion = currentVersion();
|
||||
|
@ -59,21 +65,21 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
),
|
||||
),
|
||||
Container(height: 20),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20, right: 20),
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'软件版本 : $_currentVersion',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
"检查更新 : ",
|
||||
style: TextStyle(
|
||||
height: 1.3,
|
||||
|
@ -87,12 +93,12 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
],
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
autoUpdateCheckSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: SelectableText(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: const SelectableText(
|
||||
"提示 : \n"
|
||||
"1. 详情页的作者/上传者/分类/标签都可以点击\n"
|
||||
"2. 详情页的作者/上传者/标题长按可以复制\n"
|
||||
|
@ -104,7 +110,7 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
),
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -118,16 +124,16 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
WidgetSpan(
|
||||
child: Badged(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(right: 12),
|
||||
padding: const EdgeInsets.only(right: 12),
|
||||
child: Text(
|
||||
latestVersion,
|
||||
style: TextStyle(height: 1.3),
|
||||
style: const TextStyle(height: 1.3),
|
||||
),
|
||||
),
|
||||
badge: "1",
|
||||
),
|
||||
),
|
||||
TextSpan(text: " "),
|
||||
const TextSpan(text: " "),
|
||||
TextSpan(
|
||||
text: "去下载",
|
||||
style: TextStyle(
|
||||
|
@ -144,13 +150,13 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
return Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: "未检测到新版本", style: TextStyle(height: 1.3)),
|
||||
const TextSpan(text: "未检测到新版本", style: TextStyle(height: 1.3)),
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(4),
|
||||
margin: EdgeInsets.only(left: 3, right: 3),
|
||||
decoration: BoxDecoration(
|
||||
padding: const EdgeInsets.all(4),
|
||||
margin: const EdgeInsets.only(left: 3, right: 3),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
),
|
||||
),
|
||||
|
@ -187,13 +193,13 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Divider(),
|
||||
Text("更新内容:"),
|
||||
const Divider(),
|
||||
const Text("更新内容:"),
|
||||
Container(
|
||||
padding: EdgeInsets.all(15),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Text(
|
||||
latestVersionInfo,
|
||||
style: TextStyle(),
|
||||
style: const TextStyle(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -202,9 +208,9 @@ class _AboutScreenState extends State<AboutScreen> {
|
|||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Divider(),
|
||||
const Divider(),
|
||||
Container(
|
||||
padding: EdgeInsets.all(15),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "去RELEASE仓库",
|
||||
|
|
|
@ -62,22 +62,22 @@ class _AccountScreenState extends State<AccountScreen> {
|
|||
onPressed: () {
|
||||
chooseTheme(context);
|
||||
},
|
||||
icon: Text('主题'),
|
||||
icon: const Text('主题'),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: _toDownloadList,
|
||||
icon: Icon(Icons.download_rounded),
|
||||
icon: const Icon(Icons.download_rounded),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: _logIn,
|
||||
icon: Icon(Icons.save),
|
||||
icon: const Icon(Icons.save),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text("账号"),
|
||||
title: const Text("账号"),
|
||||
subtitle: Text(_username == "" ? "未设置" : _username),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -95,7 +95,7 @@ class _AccountScreenState extends State<AccountScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("密码"),
|
||||
title: const Text("密码"),
|
||||
subtitle: Text(_password == "" ? "未设置" : '\u2022' * 10),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -113,12 +113,12 @@ class _AccountScreenState extends State<AccountScreen> {
|
|||
}
|
||||
},
|
||||
),
|
||||
NetworkSetting(),
|
||||
const NetworkSetting(),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(15),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Text.rich(TextSpan(
|
||||
text: '没有账号,我要注册',
|
||||
style: TextStyle(
|
||||
|
@ -180,7 +180,7 @@ class _AccountScreenState extends State<AccountScreen> {
|
|||
_toDownloadList() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => DownloadListScreen()),
|
||||
MaterialPageRoute(builder: (context) => const DownloadListScreen()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,13 +52,13 @@ class _AppScreenState extends State<AppScreen> {
|
|||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.public),
|
||||
label: '浏览',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Badged(
|
||||
child: Icon(Icons.face),
|
||||
child: const Icon(Icons.face),
|
||||
badge: latestVersion() == null ? null : "1",
|
||||
),
|
||||
label: '我的',
|
||||
|
|
|
@ -25,7 +25,7 @@ class CategoriesScreen extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _CategoriesScreenState extends State<CategoriesScreen> {
|
||||
late SearchBar _searchBar = SearchBar(
|
||||
late final SearchBar _searchBar = SearchBar(
|
||||
hintText: '搜索',
|
||||
inBar: false,
|
||||
setState: setState,
|
||||
|
@ -41,7 +41,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
},
|
||||
buildDefaultAppBar: (BuildContext context) {
|
||||
return AppBar(
|
||||
title: Text('分类'),
|
||||
title: const Text('分类'),
|
||||
actions: [
|
||||
shadowCategoriesActionButton(context),
|
||||
_searchBar.getSearchAction(context),
|
||||
|
@ -113,7 +113,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
);
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
return ListView(
|
||||
children: [
|
||||
|
@ -123,7 +123,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
alignment: WrapAlignment.spaceAround,
|
||||
children: _buildChannels(),
|
||||
),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
Wrap(
|
||||
runSpacing: 20,
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
|
@ -253,7 +253,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => RankingsScreen()),
|
||||
MaterialPageRoute(builder: (context) => const RankingsScreen()),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -265,7 +265,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => RandomComicsScreen()),
|
||||
MaterialPageRoute(builder: (context) => const RandomComicsScreen()),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -277,7 +277,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
|
|||
() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => GamesScreen()),
|
||||
MaterialPageRoute(builder: (context) => const GamesScreen()),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -17,6 +17,7 @@ import 'components/CommentList.dart';
|
|||
import 'components/ContentError.dart';
|
||||
import 'components/ContentLoading.dart';
|
||||
import 'components/ContinueReadButton.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 漫画详情
|
||||
class ComicInfoScreen extends StatefulWidget {
|
||||
|
@ -74,6 +75,10 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: _comicFuture,
|
||||
builder: (BuildContext context, AsyncSnapshot<ComicInfo> snapshot) {
|
||||
|
@ -94,7 +99,7 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: ContentLoading(label: '加载中'),
|
||||
body: const ContentLoading(label: '加载中'),
|
||||
);
|
||||
}
|
||||
var _comicInfo = snapshot.data!;
|
||||
|
@ -122,7 +127,7 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
ComicTagsCard(_comicInfo.tags),
|
||||
ComicDescriptionCard(description: _comicInfo.description),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -173,7 +178,7 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
TextSpan(
|
||||
text:
|
||||
"( ${formatTimeToDate(_comicInfo.updatedAt)} )",
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.grey,
|
||||
),
|
||||
|
@ -245,11 +250,11 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
this._epListFuture = _loadEps();
|
||||
});
|
||||
},
|
||||
icon: Icon(Icons.sync_problem),
|
||||
icon: const Icon(Icons.sync_problem),
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return IconButton(onPressed: () {}, icon: Icon(Icons.sync));
|
||||
return IconButton(onPressed: () {}, icon: const Icon(Icons.sync));
|
||||
}
|
||||
var _epList = snapshot.data!;
|
||||
return IconButton(
|
||||
|
@ -264,7 +269,7 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
),
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.download_rounded),
|
||||
icon: const Icon(Icons.download_rounded),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -305,8 +310,10 @@ class _ComicInfoScreenState extends State<ComicInfoScreen> with RouteAware {
|
|||
_push(_comicInfo, _epList, e.order, null);
|
||||
},
|
||||
color: Colors.white,
|
||||
child:
|
||||
Text(e.title, style: TextStyle(color: Colors.black)),
|
||||
child: Text(
|
||||
e.title,
|
||||
style: const TextStyle(color: Colors.black),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:pikapika/screens/components/ContentError.dart';
|
|||
import 'package:pikapika/screens/components/ContentLoading.dart';
|
||||
import 'DownloadConfirmScreen.dart';
|
||||
import 'components/ImageReader.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 在线阅读漫画
|
||||
class ComicReaderScreen extends StatefulWidget {
|
||||
|
@ -143,6 +144,10 @@ class _ComicReaderScreenState extends State<ComicReaderScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return readerKeyboardHolder(_build(context));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:pikapika/basic/Method.dart';
|
|||
import '../basic/Entities.dart';
|
||||
import 'SearchScreen.dart';
|
||||
import 'components/ComicPager.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 漫画列表
|
||||
class ComicsScreen extends StatefulWidget {
|
||||
|
@ -96,7 +97,7 @@ class _ComicsScreenState extends State<ComicsScreen> {
|
|||
));
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.category),
|
||||
icon: const Icon(Icons.category),
|
||||
);
|
||||
|
||||
Future<ComicsPage> _load(String _currentSort, int _currentPage) {
|
||||
|
@ -112,6 +113,10 @@ class _ComicsScreenState extends State<ComicsScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
PreferredSizeWidget? appBar;
|
||||
if (widget.tag == null &&
|
||||
widget.creatorId == null &&
|
||||
|
|
|
@ -7,6 +7,8 @@ import 'package:pikapika/screens/components/CommentItem.dart';
|
|||
import 'package:pikapika/screens/components/CommentMainType.dart';
|
||||
import 'package:pikapika/screens/components/ContentBuilder.dart';
|
||||
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
class _CommentChildPage extends e.Page {
|
||||
late List<ChildOfComment> docs;
|
||||
|
||||
|
@ -77,9 +79,13 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('评论'),
|
||||
title: const Text('评论'),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
|
@ -138,8 +144,8 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||
),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.all(30),
|
||||
child: Center(
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: const Center(
|
||||
child: Text('我有话要讲'),
|
||||
),
|
||||
),
|
||||
|
@ -156,8 +162,8 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(30),
|
||||
child: Center(
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: const Center(
|
||||
child: Text('上一页'),
|
||||
),
|
||||
),
|
||||
|
@ -176,8 +182,8 @@ class _CommentScreenState extends State<CommentScreen> {
|
|||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(30),
|
||||
child: Center(
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: const Center(
|
||||
child: Text('下一页'),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:pikapika/screens/components/ContentLoading.dart';
|
|||
import 'package:pikapika/basic/Method.dart';
|
||||
|
||||
import 'components/ComicInfoCard.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 确认下载
|
||||
class DownloadConfirmScreen extends StatefulWidget {
|
||||
|
@ -100,6 +101,10 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("下载 - ${widget.comicInfo.title}"),
|
||||
|
@ -110,10 +115,10 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
if (snapshot.hasError) {
|
||||
print(snapshot.error);
|
||||
print(snapshot.stackTrace);
|
||||
return Text('error');
|
||||
return const Text('error');
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
return ListView(
|
||||
children: [
|
||||
|
@ -126,7 +131,7 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
children: [
|
||||
...widget.epList.map((e) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: MaterialButton(
|
||||
onPressed: () {
|
||||
_clickOfEp(e);
|
||||
|
@ -141,7 +146,7 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
width: 10,
|
||||
),
|
||||
Text(e.title,
|
||||
style: TextStyle(color: Colors.black)),
|
||||
style: const TextStyle(color: Colors.black)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -159,7 +164,7 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
Widget _buildButtons() {
|
||||
var theme = Theme.of(context);
|
||||
return Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
padding: const EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -176,13 +181,13 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
color: theme.colorScheme.secondary,
|
||||
textColor: Colors.white,
|
||||
onPressed: _selectAll,
|
||||
child: Text('全选'),
|
||||
child: const Text('全选'),
|
||||
),
|
||||
MaterialButton(
|
||||
color: theme.colorScheme.secondary,
|
||||
textColor: Colors.white,
|
||||
onPressed: _download,
|
||||
child: Text('确定下载'),
|
||||
child: const Text('确定下载'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -201,12 +206,12 @@ class _DownloadConfirmScreenState extends State<DownloadConfirmScreen> {
|
|||
|
||||
Icon _iconOfEp(Ep e) {
|
||||
if (_taskedEps.contains(e.order)) {
|
||||
return Icon(Icons.download_rounded, color: Colors.black);
|
||||
return const Icon(Icons.download_rounded, color: Colors.black);
|
||||
}
|
||||
if (_selectedEps.contains(e.order)) {
|
||||
return Icon(Icons.check_box, color: Colors.black);
|
||||
return const Icon(Icons.check_box, color: Colors.black);
|
||||
}
|
||||
return Icon(Icons.check_box_outline_blank, color: Colors.black);
|
||||
return const Icon(Icons.check_box_outline_blank, color: Colors.black);
|
||||
}
|
||||
|
||||
void _clickOfEp(Ep e) {
|
||||
|
|
|
@ -85,18 +85,18 @@ class _DownloadExportToFileScreenState
|
|||
});
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
return ListView(
|
||||
children: [
|
||||
DownloadInfoCard(task: _task),
|
||||
Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: exportResult != "" ? Text(exportResult) : Container(),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Text('TIPS : 选择一个目录'),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: const Text('TIPS : 选择一个目录'),
|
||||
),
|
||||
..._buildExportToFileButtons(),
|
||||
MaterialButton(
|
||||
|
@ -280,7 +280,7 @@ class _DownloadExportToFileScreenState
|
|||
builder: (BuildContext context, BoxConstraints constraints) {
|
||||
return Container(
|
||||
width: constraints.maxWidth,
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
color: (Theme.of(context).textTheme.bodyText1?.color ?? Colors.black)
|
||||
.withOpacity(.05),
|
||||
child: Text(
|
||||
|
|
|
@ -74,16 +74,16 @@ class _DownloadExportToSocketScreenState
|
|||
});
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
return ListView(
|
||||
children: [
|
||||
DownloadInfoCard(task: widget.task),
|
||||
Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
const Text(
|
||||
'TIPS : 传输成功之前请不要退出页面, 一次只能导出到一个设备, 两台设备需要在同一网段或无限局域网中, 请另外一台设备输入 IP:端口 , 有一个IP时请选择无限局域网的IP, 通常是192.168开头'),
|
||||
FutureBuilder(
|
||||
future: _ipFuture,
|
||||
|
|
|
@ -62,12 +62,12 @@ class _DownloadImportScreenState extends State<DownloadImportScreen> {
|
|||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('导入'),
|
||||
title: const Text('导入'),
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Text(_importMessage),
|
||||
),
|
||||
...actions,
|
||||
|
@ -116,7 +116,7 @@ class _DownloadImportScreenState extends State<DownloadImportScreen> {
|
|||
}
|
||||
}
|
||||
},
|
||||
child: Text('选择zip文件进行导入'),
|
||||
child: const Text('选择zip文件进行导入'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ class _DownloadImportScreenState extends State<DownloadImportScreen> {
|
|||
}
|
||||
}
|
||||
},
|
||||
child: Text('从其他设备导入'),
|
||||
child: const Text('从其他设备导入'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ class _DownloadInfoScreenState extends State<DownloadInfoScreen>
|
|||
),
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.add_to_home_screen),
|
||||
icon: const Icon(Icons.add_to_home_screen),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
|
@ -95,7 +95,7 @@ class _DownloadInfoScreenState extends State<DownloadInfoScreen>
|
|||
),
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.settings_ethernet_outlined),
|
||||
icon: const Icon(Icons.settings_ethernet_outlined),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -113,7 +113,7 @@ class _DownloadInfoScreenState extends State<DownloadInfoScreen>
|
|||
});
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
List<dynamic> tagsDynamic = json.decode(_task.tags);
|
||||
List<String> tags = tagsDynamic.map((e) => "$e").toList();
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'DownloadImportScreen.dart';
|
|||
import 'DownloadInfoScreen.dart';
|
||||
import 'components/ContentLoading.dart';
|
||||
import 'components/DownloadInfoCard.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 下载列表
|
||||
class DownloadListScreen extends StatefulWidget {
|
||||
|
@ -54,9 +55,9 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
final screen = Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('下载列表'),
|
||||
title: const Text('下载列表'),
|
||||
actions: [
|
||||
importButton(),
|
||||
pauseButton(),
|
||||
|
@ -68,13 +69,13 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
|
|||
builder: (BuildContext context,
|
||||
AsyncSnapshot<List<DownloadComic>> snapshot) {
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
print("${snapshot.error}");
|
||||
print("${snapshot.stackTrace}");
|
||||
return Center(child: Text('加载失败'));
|
||||
return const Center(child: Text('加载失败'));
|
||||
}
|
||||
|
||||
var data = snapshot.data!;
|
||||
|
@ -106,6 +107,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
|
|||
},
|
||||
),
|
||||
);
|
||||
return RightClickPop(screen);
|
||||
}
|
||||
|
||||
Widget downloadWidget(DownloadComic e) {
|
||||
|
@ -155,12 +157,12 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
|
|||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Container()),
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.label_important,
|
||||
size: 18,
|
||||
color: Colors.white,
|
||||
),
|
||||
Text(
|
||||
const Text(
|
||||
'导入',
|
||||
style: TextStyle(fontSize: 14, color: Colors.white),
|
||||
),
|
||||
|
@ -197,7 +199,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
|
|||
_downloadRunning = to;
|
||||
});
|
||||
},
|
||||
child: Text('确认'),
|
||||
child: const Text('确认'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:pikapika/basic/Method.dart';
|
||||
import '../basic/Entities.dart';
|
||||
import 'components/ComicPager.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 收藏的漫画
|
||||
class FavouritePaperScreen extends StatefulWidget {
|
||||
|
@ -18,9 +19,13 @@ class _FavouritePaperScreen extends State<FavouritePaperScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('收藏'),
|
||||
title: const Text('收藏'),
|
||||
),
|
||||
body: ComicPager(
|
||||
fetchPage: _fetch,
|
||||
|
|
|
@ -4,6 +4,8 @@ import 'package:pikapika/basic/Common.dart';
|
|||
import 'package:pikapika/basic/Cross.dart';
|
||||
import 'package:pikapika/screens/components/Images.dart';
|
||||
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 预览图片
|
||||
class FilePhotoViewScreen extends StatelessWidget {
|
||||
final String filePath;
|
||||
|
@ -11,7 +13,11 @@ class FilePhotoViewScreen extends StatelessWidget {
|
|||
const FilePhotoViewScreen(this.filePath, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) => Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
GestureDetector(
|
||||
|
@ -31,8 +37,8 @@ class FilePhotoViewScreen extends StatelessWidget {
|
|||
InkWell(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 30),
|
||||
padding: EdgeInsets.only(left: 4, right: 4),
|
||||
margin: const EdgeInsets.only(top: 30),
|
||||
padding: const EdgeInsets.only(left: 4, right: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(.75),
|
||||
borderRadius: BorderRadius.only(
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:pikapika/basic/Method.dart';
|
|||
import 'package:pikapika/screens/components/ItemBuilder.dart';
|
||||
|
||||
import 'components/GameTitleCard.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 游戏下载地址列表页
|
||||
class GameDownloadScreen extends StatefulWidget {
|
||||
|
@ -22,6 +23,10 @@ class _GameDownloadScreenState extends State<GameDownloadScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("下载 - ${widget.info.title}"),
|
||||
|
@ -64,8 +69,8 @@ class _GameDownloadScreenState extends State<GameDownloadScreen> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
padding: EdgeInsets.all(10),
|
||||
margin: const EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.grey.shade500,
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:pikapika/screens/components/Images.dart';
|
|||
import 'GameDownloadScreen.dart';
|
||||
import 'components/CommentList.dart';
|
||||
import 'components/GameTitleCard.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 游戏详情
|
||||
class GameInfoScreen extends StatefulWidget {
|
||||
|
@ -25,13 +26,17 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: _future,
|
||||
builder: (BuildContext context, AsyncSnapshot<GameInfo> snapshot) {
|
||||
if (snapshot.hasError) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('加载出错'),
|
||||
title: const Text('加载出错'),
|
||||
),
|
||||
body: ContentError(
|
||||
error: snapshot.error,
|
||||
|
@ -46,16 +51,16 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('加载中'),
|
||||
title: const Text('加载中'),
|
||||
),
|
||||
body: ContentLoading(label: '加载中'),
|
||||
body: const ContentLoading(label: '加载中'),
|
||||
);
|
||||
}
|
||||
|
||||
BorderRadius iconRadius = BorderRadius.all(Radius.circular(6));
|
||||
BorderRadius iconRadius = const BorderRadius.all(Radius.circular(6));
|
||||
double screenShootMargin = 10;
|
||||
double screenShootHeight = 200;
|
||||
TextStyle descriptionStyle = TextStyle();
|
||||
TextStyle descriptionStyle = const TextStyle();
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints constraints) {
|
||||
|
@ -70,14 +75,14 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
children: [
|
||||
GameTitleCard(info),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 5,
|
||||
bottom: 10,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
||||
child: MaterialButton(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
textColor: Colors.white,
|
||||
|
@ -90,8 +95,8 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
child: Text('下载'),
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: const Text('下载'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -137,7 +142,7 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
.withOpacity(.025),
|
||||
child: TabBar(
|
||||
tabs: <Widget>[
|
||||
Tab(text: '详情 '),
|
||||
const Tab(text: '详情 '),
|
||||
Tab(text: '评论 (${info.commentsCount})'),
|
||||
],
|
||||
indicatorColor:
|
||||
|
@ -155,7 +160,7 @@ class _GameInfoScreenState extends State<GameInfoScreen> {
|
|||
),
|
||||
_tabIndex == 0
|
||||
? Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child:
|
||||
Text(info.description, style: descriptionStyle),
|
||||
)
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:pikapika/screens/components/ContentBuilder.dart';
|
|||
|
||||
import 'GameInfoScreen.dart';
|
||||
import 'components/Images.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 游戏列表
|
||||
class GamesScreen extends StatefulWidget {
|
||||
|
@ -32,9 +33,13 @@ class _GamesScreenState extends State<GamesScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('游戏'),
|
||||
title: const Text('游戏'),
|
||||
),
|
||||
body: ContentBuilder(
|
||||
future: _future,
|
||||
|
@ -64,9 +69,9 @@ class _GamesScreenState extends State<GamesScreen> {
|
|||
}
|
||||
return Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(40),
|
||||
preferredSize: const Size.fromHeight(40),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
padding: const EdgeInsets.only(left: 10, right: 10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -168,7 +173,7 @@ class _GamesScreenState extends State<GamesScreen> {
|
|||
_onPageChange(page.page + 1);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 30, bottom: 30),
|
||||
padding: const EdgeInsets.only(top: 30, bottom: 30),
|
||||
child: Text('下一页'),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -95,7 +95,7 @@ class _InitScreenState extends State<InitScreen> {
|
|||
// 否则跳转到登录页
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => AccountScreen()),
|
||||
MaterialPageRoute(builder: (context) => const AccountScreen()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ class _InitScreenState extends State<InitScreen> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xfffffced),
|
||||
backgroundColor: const Color(0xfffffced),
|
||||
body: ConstrainedBox(
|
||||
constraints: BoxConstraints.expand(),
|
||||
constraints: const BoxConstraints.expand(),
|
||||
child: Image.asset(
|
||||
"lib/assets/init.jpg",
|
||||
fit: BoxFit.contain,
|
||||
|
|
|
@ -6,6 +6,8 @@ import 'package:pikapika/basic/Method.dart';
|
|||
import 'package:pikapika/screens/components/ContentBuilder.dart';
|
||||
import 'package:pikapika/screens/components/ContentLoading.dart';
|
||||
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 数据迁移页面
|
||||
class MigrateScreen extends StatefulWidget {
|
||||
const MigrateScreen({Key? key}) : super(key: key);
|
||||
|
@ -32,9 +34,13 @@ class _MigrateScreenState extends State<MigrateScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('数据迁移'),
|
||||
title: const Text('数据迁移'),
|
||||
),
|
||||
body: ContentBuilder(
|
||||
future: _future,
|
||||
|
@ -46,8 +52,8 @@ class _MigrateScreenState extends State<MigrateScreen> {
|
|||
return ListView(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Text(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: const Text(
|
||||
"1. 为了手机数据存储空间不足, 且具有内存卡的安卓手机设计, 可将数据迁移到内存卡上。\n\n"
|
||||
"2. 您在迁移之前, 请确保您的下载处于暂停状态, 或下载均已完成, 以保证您的数据完整性。\n\n"
|
||||
"3. 如果迁移中断, 迁移失败, 或其他原因导致程序无法启动, 图片失效等问题, 您可在程序管理中清除本应用程序的数据, 以回复正常使用。\n\n"
|
||||
|
@ -58,18 +64,18 @@ class _MigrateScreenState extends State<MigrateScreen> {
|
|||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Text("当前文件储存路径 : $_current"),
|
||||
),
|
||||
...paths.map((e) => Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: MaterialButton(
|
||||
color: Theme.of(context).accentColor,
|
||||
textColor: Theme.of(context)
|
||||
.accentTextTheme
|
||||
.subtitle1
|
||||
?.color,
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
onPressed: () async {
|
||||
if (!await confirmDialog(context, "文件迁移",
|
||||
"您将要迁移到$e, 迁移过程中一定《 不 要 关 闭 程 序 》")) {
|
||||
|
@ -96,9 +102,9 @@ class _MigrateScreenState extends State<MigrateScreen> {
|
|||
],
|
||||
);
|
||||
case 1:
|
||||
return ContentLoading(label: "迁移中");
|
||||
return const ContentLoading(label: "迁移中");
|
||||
case 2:
|
||||
return Center(child: Text("迁移成功 您需要关闭应用程序重新启动"));
|
||||
return const Center(child: Text("迁移成功 您需要关闭应用程序重新启动"));
|
||||
case 3:
|
||||
return Center(child: Text("迁移失败\n$_message"));
|
||||
default:
|
||||
|
|
|
@ -3,8 +3,11 @@ import 'package:pikapika/basic/Method.dart';
|
|||
import 'package:pikapika/screens/components/ContentLoading.dart';
|
||||
|
||||
import '../basic/Common.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
class ModifyPasswordScreen extends StatefulWidget {
|
||||
const ModifyPasswordScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _ModifyPasswordScreenState();
|
||||
}
|
||||
|
@ -17,14 +20,18 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("修改密码"),
|
||||
title: const Text("修改密码"),
|
||||
),
|
||||
body: _loading
|
||||
? Stack(
|
||||
children: [
|
||||
ContentLoading(label: "请稍后"),
|
||||
const ContentLoading(label: "请稍后"),
|
||||
WillPopScope(
|
||||
child: Container(),
|
||||
onWillPop: () async {
|
||||
|
@ -42,7 +49,7 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
children: [
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text("旧密码"),
|
||||
title: const Text("旧密码"),
|
||||
subtitle: Text(_oldPassword == "" ? "未填写" : '\u2022' * 10),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -61,7 +68,7 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text("新密码"),
|
||||
title: const Text("新密码"),
|
||||
subtitle: Text(_newPassword == "" ? "未填写" : '\u2022' * 10),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -80,7 +87,7 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text("重复输入新密码"),
|
||||
title: const Text("重复输入新密码"),
|
||||
subtitle: Text(_newPasswordRep == "" ? "未填写" : '\u2022' * 10),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -99,7 +106,7 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
),
|
||||
const Divider(),
|
||||
Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
margin: const EdgeInsets.all(10),
|
||||
child: MaterialButton(
|
||||
textColor: Colors.white,
|
||||
color: Theme.of(context).appBarTheme.backgroundColor,
|
||||
|
@ -122,7 +129,7 @@ class _ModifyPasswordScreenState extends State<ModifyPasswordScreen> {
|
|||
});
|
||||
}
|
||||
},
|
||||
child: Text("确认"),
|
||||
child: const Text("确认"),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:pikapika/screens/components/NetworkSetting.dart';
|
||||
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
class NetworkSettingsScreen extends StatelessWidget {
|
||||
const NetworkSettingsScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(title: Text('网络设置')),
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(title: const Text('网络设置')),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: const [
|
||||
NetworkSetting(),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -5,9 +5,12 @@ import 'package:pikapika/basic/config/ListLayout.dart';
|
|||
import 'package:pikapika/basic/config/ShadowCategories.dart';
|
||||
|
||||
import 'components/ComicListBuilder.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 随机漫画页面
|
||||
class RandomComicsScreen extends StatefulWidget {
|
||||
const RandomComicsScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _RandomComicsScreenState();
|
||||
}
|
||||
|
@ -23,6 +26,10 @@ class _RandomComicsScreenState extends State<RandomComicsScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('随机本子'),
|
||||
|
|
|
@ -5,16 +5,22 @@ import 'package:pikapika/basic/config/ListLayout.dart';
|
|||
import 'package:pikapika/basic/config/ShadowCategories.dart';
|
||||
|
||||
import 'components/ComicListBuilder.dart';
|
||||
import 'components/RightClickPop.dart';
|
||||
|
||||
// 排行榜
|
||||
class RankingsScreen extends StatelessWidget {
|
||||
const RankingsScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
var theme = Theme.of(context);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('排行榜'),
|
||||
title: const Text('排行榜'),
|
||||
actions: [
|
||||
shadowCategoriesActionButton(context),
|
||||
chooseLayoutActionButton(context),
|
||||
|
@ -30,14 +36,14 @@ class RankingsScreen extends StatelessWidget {
|
|||
child: TabBar(
|
||||
indicatorColor: theme.colorScheme.secondary,
|
||||
labelColor: theme.colorScheme.secondary,
|
||||
tabs: [
|
||||
tabs: const [
|
||||
Tab(text: '天'),
|
||||
Tab(text: '周'),
|
||||
Tab(text: '月'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
const Expanded(
|
||||
child: TabBarView(
|
||||
children: [
|
||||
_Leaderboard("H24"),
|
||||
|
@ -56,7 +62,7 @@ class RankingsScreen extends StatelessWidget {
|
|||
class _Leaderboard extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
_Leaderboard(this.type);
|
||||
const _Leaderboard(this.type);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _LeaderboardState();
|
||||
|
|
|
@ -3,11 +3,14 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
|
|||
import 'package:pikapika/basic/Common.dart';
|
||||
import 'package:pikapika/basic/Method.dart';
|
||||
import 'package:pikapika/screens/components/NetworkSetting.dart';
|
||||
import 'package:pikapika/screens/components/RightClickPop.dart';
|
||||
|
||||
import 'components/ContentLoading.dart';
|
||||
|
||||
/// 注册页面
|
||||
class RegisterScreen extends StatefulWidget {
|
||||
const RegisterScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _RegisterScreenState();
|
||||
}
|
||||
|
@ -86,13 +89,16 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
if (_registerOver) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('注册成功'),
|
||||
),
|
||||
body: Center(
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: Container()),
|
||||
|
@ -104,24 +110,24 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (_registering) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: ContentLoading(label: '注册中'),
|
||||
body: const ContentLoading(label: '注册中'),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('注册'), actions: [
|
||||
IconButton(onPressed: () => _register(), icon: Icon(Icons.check),),
|
||||
appBar: AppBar(title: const Text('注册'), actions: [
|
||||
IconButton(
|
||||
onPressed: () => _register(), icon: const Icon(Icons.check),),
|
||||
],),
|
||||
body: ListView(
|
||||
children: [
|
||||
Divider(),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text("账号 (不一定是邮箱/登录使用)"),
|
||||
title: const Text("账号 (不一定是邮箱/登录使用)"),
|
||||
subtitle: Text(_email == "" ? "未设置" : _email),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -138,7 +144,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("密码 (8位以上)"),
|
||||
title: const Text("密码 (8位以上)"),
|
||||
subtitle: Text(_password == "" ? "未设置" : '\u2022' * 10),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -156,7 +162,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("昵称 (2-50字)"),
|
||||
title: const Text("昵称 (2-50字)"),
|
||||
subtitle: Text(_name == "" ? "未设置" : _name),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -173,29 +179,29 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("性别"),
|
||||
title: const Text("性别"),
|
||||
subtitle: Text(_genderText(_gender)),
|
||||
onTap: () async {
|
||||
String? result = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Text('选择您的性别'),
|
||||
title: const Text('选择您的性别'),
|
||||
children: [
|
||||
SimpleDialogOption(
|
||||
child: Text('扶她'),
|
||||
child: const Text('扶她'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, 'bot');
|
||||
},
|
||||
),
|
||||
SimpleDialogOption(
|
||||
child: Text('公'),
|
||||
child: const Text('公'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, 'm');
|
||||
},
|
||||
),
|
||||
SimpleDialogOption(
|
||||
child: Text('母'),
|
||||
child: const Text('母'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, 'f');
|
||||
},
|
||||
|
@ -212,7 +218,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("生日"),
|
||||
title: const Text("生日"),
|
||||
subtitle: Text(_birthday),
|
||||
onTap: () async {
|
||||
DatePicker.showDatePicker(
|
||||
|
@ -227,9 +233,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
);
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text("问题1"),
|
||||
title: const Text("问题1"),
|
||||
subtitle: Text(_question1 == "" ? "未设置" : _question1),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -246,7 +252,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("回答1"),
|
||||
title: const Text("回答1"),
|
||||
subtitle: Text(_answer1 == "" ? "未设置" : _answer1),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -263,7 +269,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("问题2"),
|
||||
title: const Text("问题2"),
|
||||
subtitle: Text(_question2 == "" ? "未设置" : _question2),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -280,7 +286,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("回答2"),
|
||||
title: const Text("回答2"),
|
||||
subtitle: Text(_answer2 == "" ? "未设置" : _answer2),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -297,7 +303,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("问题3"),
|
||||
title: const Text("问题3"),
|
||||
subtitle: Text(_question3 == "" ? "未设置" : _question3),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -314,7 +320,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("回答3"),
|
||||
title: const Text("回答3"),
|
||||
subtitle: Text(_answer3 == "" ? "未设置" : _answer3),
|
||||
onTap: () async {
|
||||
String? input = await displayTextInputDialog(
|
||||
|
@ -330,9 +336,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||
}
|
||||
},
|
||||
),
|
||||
Divider(),
|
||||
NetworkSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
const NetworkSetting(),
|
||||
const Divider(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:pikapika/basic/config/ShadowCategories.dart';
|
|||
import 'package:pikapika/basic/store/Categories.dart';
|
||||
import 'package:pikapika/basic/config/ListLayout.dart';
|
||||
import 'package:pikapika/basic/Method.dart';
|
||||
import 'package:pikapika/screens/components/RightClickPop.dart';
|
||||
import '../basic/Entities.dart';
|
||||
import 'components/ComicPager.dart';
|
||||
|
||||
|
@ -80,7 +81,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
));
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.category),
|
||||
icon: const Icon(Icons.category),
|
||||
);
|
||||
|
||||
Future<ComicsPage> _fetch(String _currentSort, int _currentPage) {
|
||||
|
@ -98,6 +99,10 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: _searchBar.build(context),
|
||||
body: ComicPager(
|
||||
|
|
|
@ -28,6 +28,7 @@ import 'package:pikapika/basic/config/Version.dart';
|
|||
import 'package:pikapika/basic/config/VolumeController.dart';
|
||||
import 'package:pikapika/basic/config/shadowCategoriesMode.dart';
|
||||
import 'package:pikapika/screens/components/NetworkSetting.dart';
|
||||
import 'package:pikapika/screens/components/RightClickPop.dart';
|
||||
|
||||
import 'CleanScreen.dart';
|
||||
import 'MigrateScreen.dart';
|
||||
|
@ -37,7 +38,11 @@ class SettingsScreen extends StatelessWidget {
|
|||
const SettingsScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
Widget build(BuildContext context) {
|
||||
return RightClickPop(buildScreen(context));
|
||||
}
|
||||
|
||||
Widget buildScreen(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(title: const Text('设置')),
|
||||
body: ListView(
|
||||
children: [
|
||||
|
@ -47,7 +52,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ModifyPasswordScreen()),
|
||||
builder: (context) => const ModifyPasswordScreen()),
|
||||
);
|
||||
},
|
||||
title: const Text('修改密码'),
|
||||
|
@ -72,31 +77,31 @@ class SettingsScreen extends StatelessWidget {
|
|||
fullScreenUISetting(),
|
||||
contentFailedReloadActionSetting(),
|
||||
timeZoneSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
autoCleanSecSetting(),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => CleanScreen()),
|
||||
MaterialPageRoute(builder: (context) => const CleanScreen()),
|
||||
);
|
||||
},
|
||||
title: Text('清除缓存'),
|
||||
title: const Text('清除缓存'),
|
||||
),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
androidDisplayModeSetting(),
|
||||
androidSecureFlagSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
chooserRootSetting(),
|
||||
downloadThreadCountSetting(),
|
||||
downloadAndExportPathSetting(),
|
||||
exportRenameSetting(),
|
||||
fontSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
migrate(context),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
autoUpdateCheckSetting(),
|
||||
Divider(),
|
||||
const Divider(),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -104,15 +109,15 @@ class SettingsScreen extends StatelessWidget {
|
|||
Widget migrate(BuildContext context) {
|
||||
if (Platform.isAndroid) {
|
||||
return ListTile(
|
||||
title: Text("文件迁移"),
|
||||
subtitle: Text("更换您的数据文件夹"),
|
||||
title: const Text("文件迁移"),
|
||||
subtitle: const Text("更换您的数据文件夹"),
|
||||
onTap: () async {
|
||||
var f =
|
||||
await confirmDialog(context, "文件迁移", "此功能菜单保存后, 需要重启程序, 您确认吗");
|
||||
if (f) {
|
||||
Navigator.of(context).pushAndRemoveUntil(
|
||||
MaterialPageRoute(builder: (BuildContext context) {
|
||||
return MigrateScreen();
|
||||
return const MigrateScreen();
|
||||
}),
|
||||
(route) => false,
|
||||
);
|
||||
|
@ -122,4 +127,5 @@ class SettingsScreen extends StatelessWidget {
|
|||
}
|
||||
return Container();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:pikapika/basic/Common.dart';
|
||||
import 'package:pikapika/basic/Method.dart';
|
||||
import 'package:pikapika/screens/components/RightClickPop.dart';
|
||||
|
||||
import 'ComicInfoScreen.dart';
|
||||
import 'components/Images.dart';
|
||||
|
@ -105,12 +106,12 @@ class _ViewLogsScreenState extends State<ViewLogsScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return NotificationListener(
|
||||
final screen = NotificationListener(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('浏览记录'),
|
||||
title: const Text('浏览记录'),
|
||||
actions: [
|
||||
IconButton(onPressed: _clearAll, icon: Icon(Icons.auto_delete)),
|
||||
IconButton(onPressed: _clearAll, icon: const Icon(Icons.auto_delete)),
|
||||
],
|
||||
),
|
||||
body: ListView(
|
||||
|
@ -133,6 +134,7 @@ class _ViewLogsScreenState extends State<ViewLogsScreen> {
|
|||
return true;
|
||||
},
|
||||
);
|
||||
return RightClickPop(screen);
|
||||
}
|
||||
|
||||
void _chooseComic(String comicId) {
|
||||
|
@ -190,8 +192,8 @@ class ViewLogWrap extends StatelessWidget {
|
|||
e.title + '\n',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(height: 1.4),
|
||||
strutStyle: StrutStyle(height: 1.4),
|
||||
style: const TextStyle(height: 1.4),
|
||||
strutStyle: const StrutStyle(height: 1.4),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -16,7 +16,7 @@ class Avatar extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
var theme = Theme.of(context);
|
||||
return Container(
|
||||
margin: EdgeInsets.all(_avatarMargin),
|
||||
margin: const EdgeInsets.all(_avatarMargin),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
|
|
|
@ -32,7 +32,7 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
bool? like = info is ComicInfo ? info.isLiked : null;
|
||||
bool? favourite = info is ComicInfo ? (info).isFavourite : null;
|
||||
return Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
padding: const EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -43,7 +43,7 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 10),
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: RemoteImage(
|
||||
fileServer: info.thumb.fileServer,
|
||||
path: info.thumb.path,
|
||||
|
@ -86,11 +86,11 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
widget.linkItem
|
||||
? TextSpan(
|
||||
children: [
|
||||
TextSpan(text: '分类 :'),
|
||||
const TextSpan(text: '分类 :'),
|
||||
...info.categories.map(
|
||||
(e) => TextSpan(
|
||||
children: [
|
||||
TextSpan(text: ' '),
|
||||
const TextSpan(text: ' '),
|
||||
TextSpan(
|
||||
text: e,
|
||||
recognizer: TapGestureRecognizer()
|
||||
|
@ -149,7 +149,7 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
...(info.epsCount > 0
|
||||
? [
|
||||
Text.rich(TextSpan(children: [
|
||||
WidgetSpan(child: iconPage),
|
||||
const WidgetSpan(child: iconPage),
|
||||
WidgetSpan(child: iconSpacing),
|
||||
WidgetSpan(
|
||||
child: Text(
|
||||
|
@ -186,7 +186,7 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
? IconButton(
|
||||
color: Colors.pink[400],
|
||||
onPressed: () {},
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.sync,
|
||||
),
|
||||
)
|
||||
|
@ -211,7 +211,7 @@ class _ComicInfoCard extends State<ComicInfoCard> {
|
|||
? IconButton(
|
||||
color: Colors.pink[400],
|
||||
onPressed: () {},
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.sync,
|
||||
),
|
||||
)
|
||||
|
@ -277,12 +277,12 @@ double imageHeight = 315 / 3.15;
|
|||
Widget buildFinished(bool comicFinished) {
|
||||
if (comicFinished) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 8, right: 8),
|
||||
padding: const EdgeInsets.only(left: 8, right: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange.shade800,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: Text(
|
||||
child: const Text(
|
||||
"完结",
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
|
@ -313,13 +313,13 @@ final iconLabelStyle = TextStyle(
|
|||
color: Colors.pink.shade400,
|
||||
height: 1.2,
|
||||
);
|
||||
final iconLabelStrutStyle = StrutStyle(
|
||||
const iconLabelStrutStyle = StrutStyle(
|
||||
height: 1.2,
|
||||
);
|
||||
|
||||
final iconPage =
|
||||
const iconPage =
|
||||
Icon(Icons.ballot_outlined, size: _iconSize, color: Colors.grey);
|
||||
final countLabelStyle = TextStyle(
|
||||
const countLabelStyle = TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.grey,
|
||||
height: 1.2,
|
||||
|
@ -328,7 +328,7 @@ final countLabelStyle = TextStyle(
|
|||
final iconMargin = Container(width: 20);
|
||||
final iconSpacing = Container(width: 5);
|
||||
|
||||
final titleStyle = TextStyle(fontWeight: FontWeight.bold);
|
||||
const titleStyle = TextStyle(fontWeight: FontWeight.bold);
|
||||
final authorStyle = TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.pink.shade300,
|
||||
|
|
|
@ -85,7 +85,7 @@ class _ComicListState extends State<ComicList> {
|
|||
return InkWell(
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -311,7 +311,7 @@ class _ComicListState extends State<ComicList> {
|
|||
fontSize: titleFontSize,
|
||||
height: 1.2,
|
||||
),
|
||||
strutStyle: StrutStyle(height: 1.2),
|
||||
strutStyle: const StrutStyle(height: 1.2),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
|
|
@ -14,14 +14,13 @@ import 'ContentLoading.dart';
|
|||
class ComicPager extends StatefulWidget {
|
||||
final Future<ComicsPage> Function(String sort, int page) fetchPage;
|
||||
|
||||
const ComicPager({required this.fetchPage});
|
||||
const ComicPager({required this.fetchPage, Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _ComicPagerState();
|
||||
}
|
||||
|
||||
class _ComicPagerState extends State<ComicPager> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
shadowCategoriesEvent.subscribe(_onShadowChange);
|
||||
|
@ -35,8 +34,7 @@ class _ComicPagerState extends State<ComicPager> {
|
|||
}
|
||||
|
||||
void _onShadowChange(EventArgs? args) {
|
||||
setState(() {
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -89,10 +87,10 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
future: _pageFuture,
|
||||
builder: (BuildContext context, AsyncSnapshot<ComicsPage> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.none) {
|
||||
return Text('初始化');
|
||||
return const Text('初始化');
|
||||
}
|
||||
if (snapshot.connectionState != ConnectionState.done) {
|
||||
return ContentLoading(label: '加载中');
|
||||
return const ContentLoading(label: '加载中');
|
||||
}
|
||||
if (snapshot.hasError) {
|
||||
return ContentError(
|
||||
|
@ -115,7 +113,7 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
|
||||
PreferredSize _buildAppBar(ComicsPage comicsPage, BuildContext context) {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(40),
|
||||
preferredSize: const Size.fromHeight(40),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
|
@ -169,7 +167,7 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text('取消'),
|
||||
child: const Text('取消'),
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
|
@ -185,7 +183,7 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
_currentPage = num;
|
||||
_load();
|
||||
},
|
||||
child: Text('确定'),
|
||||
child: const Text('确定'),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -208,7 +206,7 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
_load();
|
||||
}
|
||||
},
|
||||
child: Text('上一页'),
|
||||
child: const Text('上一页'),
|
||||
),
|
||||
MaterialButton(
|
||||
minWidth: 0,
|
||||
|
@ -218,7 +216,7 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
|
|||
_load();
|
||||
}
|
||||
},
|
||||
child: Text('下一页'),
|
||||
child: const Text('下一页'),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -298,7 +296,7 @@ class _StreamComicPagerState extends State<StreamComicPager> {
|
|||
} catch (e, s) {
|
||||
_error = true;
|
||||
print("$e\n$s");
|
||||
throw e;
|
||||
rethrow;
|
||||
} finally {
|
||||
setState(() {
|
||||
_loading = false;
|
||||
|
@ -334,7 +332,7 @@ class _StreamComicPagerState extends State<StreamComicPager> {
|
|||
|
||||
PreferredSize _buildAppBar(BuildContext context) {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(40),
|
||||
preferredSize: const Size.fromHeight(40),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
|
|
|
@ -12,7 +12,7 @@ class ComicTagsCard extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
var theme = Theme.of(context);
|
||||
return Container(
|
||||
padding: EdgeInsets.only(top: 5, bottom: 5),
|
||||
padding: const EdgeInsets.only(top: 5, bottom: 5),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -27,13 +27,13 @@ class ComicTagsCard extends StatelessWidget {
|
|||
navPushOrReplace(context, (context) => ComicsScreen(tag: e));
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 10,
|
||||
right: 10,
|
||||
top: 3,
|
||||
bottom: 3,
|
||||
),
|
||||
margin: EdgeInsets.only(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 5,
|
||||
right: 5,
|
||||
top: 3,
|
||||
|
|
|
@ -129,7 +129,7 @@ class _CommentListState extends State<CommentList> {
|
|||
),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.all(30),
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: Center(
|
||||
child: Text('我有话要讲'),
|
||||
),
|
||||
|
@ -147,7 +147,7 @@ class _CommentListState extends State<CommentList> {
|
|||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(30),
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: Center(
|
||||
child: Text('上一页'),
|
||||
),
|
||||
|
@ -167,7 +167,7 @@ class _CommentListState extends State<CommentList> {
|
|||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(30),
|
||||
padding: const EdgeInsets.all(30),
|
||||
child: Center(
|
||||
child: Text('下一页'),
|
||||
),
|
||||
|
|
|
@ -43,8 +43,8 @@ class _ContinueReadButtonState extends State<ContinueReadButton> {
|
|||
text = '开始阅读';
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
margin: EdgeInsets.only(bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 10, right: 10),
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
width: width,
|
||||
child: MaterialButton(
|
||||
onPressed: onPressed,
|
||||
|
@ -57,7 +57,7 @@ class _ContinueReadButtonState extends State<ContinueReadButton> {
|
|||
.bodyText1!
|
||||
.color!
|
||||
.withOpacity(.05),
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Text(
|
||||
text,
|
||||
textAlign: TextAlign.center,
|
||||
|
|
|
@ -63,7 +63,7 @@ class _DesktopCropperState extends State<DesktopCropper> {
|
|||
baseSizeImage =
|
||||
image.copyResize(baseSizeImage, height: 200, width: 200);
|
||||
}
|
||||
var f = image.encodeJpg(baseSizeImage!);
|
||||
var f = image.encodeJpg(baseSizeImage);
|
||||
Navigator.of(context).pop(f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class DownloadInfoCard extends StatelessWidget {
|
|||
List<dynamic> categories = json.decode(task.categories);
|
||||
var categoriesString = categories.map((e) => "$e").join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
padding: const EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
@ -57,7 +57,7 @@ class DownloadInfoCard extends StatelessWidget {
|
|||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 10),
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: task.thumbLocalPath == ""
|
||||
? RemoteImage(
|
||||
fileServer: task.thumbFileServer,
|
||||
|
|
|
@ -63,7 +63,7 @@ class GameTitleCard extends StatelessWidget {
|
|||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: iconMargin),
|
||||
// padding: EdgeInsets.only(
|
||||
// padding: const EdgeInsets.only(
|
||||
// left: platformMargin,
|
||||
// right: platformMargin,
|
||||
// ),
|
||||
|
|
|
@ -417,7 +417,7 @@ abstract class _ImageReaderContentState extends State<_ImageReaderContent> {
|
|||
bottomRight: Radius.circular(10),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10, left: 6, right: 5),
|
||||
padding: const EdgeInsets.only(top: 10, bottom: 10, left: 6, right: 5),
|
||||
child: Center(
|
||||
child: _buildSliderWidget(Axis.vertical),
|
||||
),
|
||||
|
@ -441,7 +441,7 @@ abstract class _ImageReaderContentState extends State<_ImageReaderContent> {
|
|||
bottomLeft: Radius.circular(10),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 6),
|
||||
padding: const EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 6),
|
||||
child: Center(
|
||||
child: _buildSliderWidget(Axis.vertical),
|
||||
),
|
||||
|
@ -481,7 +481,7 @@ abstract class _ImageReaderContentState extends State<_ImageReaderContent> {
|
|||
tooltip: FlutterSliderTooltip(custom: (value) {
|
||||
double a = value + 1;
|
||||
return Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.black.withAlpha(0xCC),
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -526,8 +526,8 @@ abstract class _ImageReaderContentState extends State<_ImageReaderContent> {
|
|||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
|
||||
margin: EdgeInsets.only(bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(10),
|
||||
|
@ -1082,7 +1082,7 @@ class _WebToonReaderState extends _ImageReaderContentState {
|
|||
},
|
||||
textColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 40, bottom: 40),
|
||||
padding: const EdgeInsets.only(top: 40, bottom: 40),
|
||||
child: Text(super._hasNextEp() ? '下一章' : '结束阅读'),
|
||||
),
|
||||
),
|
||||
|
@ -1379,7 +1379,7 @@ class _ListViewReaderState extends _ImageReaderContentState
|
|||
return Container();
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: MaterialButton(
|
||||
onPressed: () {
|
||||
if (super._hasNextEp()) {
|
||||
|
@ -1390,7 +1390,7 @@ class _ListViewReaderState extends _ImageReaderContentState
|
|||
},
|
||||
textColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 40, bottom: 40),
|
||||
padding: const EdgeInsets.only(top: 40, bottom: 40),
|
||||
child: Text(super._hasNextEp() ? '下一章' : '结束阅读'),
|
||||
),
|
||||
),
|
||||
|
@ -1571,8 +1571,8 @@ class _GalleryReaderState extends _ImageReaderContentState {
|
|||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 10),
|
||||
padding: EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10),
|
||||
|
|
|
@ -293,7 +293,7 @@ Widget buildMock(double? width, double? height) {
|
|||
var widget = Container(
|
||||
width: width,
|
||||
height: height,
|
||||
padding: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'lib/assets/unknown.svg',
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class RightClickPop extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const RightClickPop(this.child, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onSecondaryTap: () => Navigator.of(context).pop(),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue