Fix selectable text pop menu color schame

This commit is contained in:
niuhuan 2022-04-17 13:48:09 +08:00
parent f2e1bb5a14
commit 9d66481a16
12 changed files with 78 additions and 61 deletions

View File

@ -6,3 +6,4 @@ linter:
unnecessary_this: false
file_names: false
constant_identifier_names: false
no_logic_in_create_state: false

View File

@ -71,7 +71,10 @@ void switchFullScreenUI() {
break;
}
if (Platform.isAndroid || Platform.isIOS) {
SystemChrome.setEnabledSystemUIOverlays(list);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: list,
);
}
}

View File

@ -177,13 +177,14 @@ class _DarkTheme extends _ThemePackage {
@override
ThemeData themeData(ThemeData rawData) => rawData.copyWith(
brightness: Brightness.light,
brightness: Brightness.dark,
colorScheme: ColorScheme.light(
secondary: Colors.pink.shade200,
),
appBarTheme: const AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.light,
color: Color(0xFF1E1E1E),
foregroundColor: Colors.white,
iconTheme: IconThemeData(
color: Colors.white,
),
@ -219,6 +220,7 @@ class _DustyBlueTheme extends _ThemePackage {
@override
ThemeData themeData(ThemeData rawData) => rawData.copyWith(
brightness: Brightness.dark,
scaffoldBackgroundColor: Color.alphaBlend(
const Color(0x11999999),
const Color(0xff20253b),
@ -227,13 +229,13 @@ class _DustyBlueTheme extends _ThemePackage {
const Color(0x11AAAAAA),
const Color(0xff20253b),
),
brightness: Brightness.light,
colorScheme: ColorScheme.light(
secondary: Colors.blue.shade200,
),
appBarTheme: const AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.light,
color: Color(0xff20253b),
foregroundColor: Colors.white,
iconTheme: IconThemeData(
color: Colors.white,
),
@ -273,7 +275,7 @@ class _DarkBlackTheme extends _ThemePackage {
@override
ThemeData themeData(ThemeData rawData) => rawData.copyWith(
brightness: Brightness.light,
brightness: Brightness.dark,
colorScheme: ColorScheme.light(
secondary: Colors.pink.shade200,
),
@ -281,6 +283,7 @@ class _DarkBlackTheme extends _ThemePackage {
appBarTheme: const AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.light,
color: Color.fromARGB(0xff, 10, 10, 10),
foregroundColor: Colors.white,
iconTheme: IconThemeData(
color: Colors.white,
),

View File

@ -62,7 +62,10 @@ class _ComicReaderScreenState extends State<ComicReaderScreen> {
} while (page.pages > page.page);
if (widget.autoFullScreen) {
setState(() {
SystemChrome.setEnabledSystemUIOverlays([]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [],
);
_fullScreen = true;
});
}
@ -227,7 +230,10 @@ class _ComicReaderScreenState extends State<ComicReaderScreen> {
setState(() {
if (fullScreen) {
if (Platform.isAndroid || Platform.isIOS) {
SystemChrome.setEnabledSystemUIOverlays([]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [],
);
}
} else {
switchFullScreenUI();

View File

@ -60,7 +60,10 @@ class _DownloadReaderScreenState extends State<DownloadReaderScreen> {
}
if (widget.autoFullScreen) {
setState(() {
SystemChrome.setEnabledSystemUIOverlays([]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [],
);
_fullScreen = true;
});
}
@ -210,7 +213,10 @@ class _DownloadReaderScreenState extends State<DownloadReaderScreen> {
setState(() {
if (fullScreen) {
if (Platform.isAndroid || Platform.isIOS) {
SystemChrome.setEnabledSystemUIOverlays([]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [],
);
}
} else {
switchFullScreenUI();

View File

@ -91,7 +91,7 @@ class _InitScreenState extends State<InitScreen> {
// token或username+password有效则直接进入登录好的界面
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => AppScreen()),
MaterialPageRoute(builder: (context) => const AppScreen()),
);
} else {
//

View File

@ -33,7 +33,7 @@ class _MigrateScreenState extends State<MigrateScreen> {
}
@override
Widget build(BuildContext context){
Widget build(BuildContext context) {
return rightClickPop(
child: buildScreen(context),
context: context,
@ -74,11 +74,9 @@ class _MigrateScreenState extends State<MigrateScreen> {
...paths.map((e) => Container(
padding: const EdgeInsets.all(10),
child: MaterialButton(
color: Theme.of(context).accentColor,
textColor: Theme.of(context)
.accentTextTheme
.subtitle1
?.color,
color: Theme.of(context).colorScheme.secondary,
textColor:
Theme.of(context).textTheme.bodyText1?.color,
padding: const EdgeInsets.all(10),
onPressed: () async {
if (!await confirmDialog(context, "文件迁移",

View File

@ -36,7 +36,7 @@ class _RandomComicsScreenState extends State<RandomComicsScreen> {
Widget buildScreen(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('随机本子'),
title: const Text('随机本子'),
actions: [
shadowCategoriesActionButton(context),
chooseLayoutActionButton(context),

View File

@ -261,7 +261,8 @@ class _StreamComicPagerState extends State<StreamComicPager> {
late bool _loading = false;
late bool _over = false;
late bool _error = false;
late Future<dynamic> _pageFuture;
// late Future<dynamic> _pageFuture;
void _onScroll() {
if (_over || _error || _loading) {
@ -276,7 +277,8 @@ class _StreamComicPagerState extends State<StreamComicPager> {
Future<dynamic> _load() async {
setState(() {
_pageFuture = _fetch();
//_pageFuture =
_fetch();
});
}

View File

@ -25,7 +25,6 @@ class ContentMessage extends StatelessWidget {
var iconSize = min / 2.3;
var textSize = min / 16;
var tipSize = min / 20;
var infoSize = min / 30;
if (contentFailedReloadAction ==
ContentFailedReloadAction.TOUCH_LOADER) {
return GestureDetector(
@ -110,7 +109,6 @@ class ContentMessage extends StatelessWidget {
var width = constraints.maxWidth;
var height = constraints.maxHeight;
var min = width < height ? width : height;
var theme = Theme.of(context);
return Center(
child: Column(
children: [

View File

@ -13,7 +13,7 @@ class DownloadInfoCard extends StatelessWidget {
final bool downloading;
final bool linkItem;
DownloadInfoCard({
const DownloadInfoCard({
Key? key,
required this.task,
this.downloading = false,

View File

@ -735,7 +735,7 @@ class _EpChooser extends StatefulWidget {
final int epOrder;
final FutureOr Function(int) onChangeEp;
_EpChooser(this.epNameMap, this.epOrder, this.onChangeEp);
const _EpChooser(this.epNameMap, this.epOrder, this.onChangeEp);
@override
State<StatefulWidget> createState() => _EpChooserState();
@ -782,7 +782,7 @@ class _SettingPanel extends StatefulWidget {
final FutureOr Function() onReloadEp;
final FutureOr Function() onDownload;
_SettingPanel(this.onReloadEp, this.onDownload);
const _SettingPanel(this.onReloadEp, this.onDownload);
@override
State<StatefulWidget> createState() => _SettingPanelState();
@ -866,42 +866,42 @@ class _SettingPanelState extends State<_SettingPanel> {
);
}
Widget _bottomIcon({
required IconData icon,
required String title,
required void Function() onPressed,
}) {
return Expanded(
child: Center(
child: Column(
children: [
IconButton(
iconSize: 55,
icon: Column(
children: [
Container(height: 3),
Icon(
icon,
size: 25,
color: Colors.white,
),
Container(height: 3),
Text(
title,
style: const TextStyle(color: Colors.white, fontSize: 10),
maxLines: 1,
textAlign: TextAlign.center,
),
Container(height: 3),
],
),
onPressed: onPressed,
)
],
Widget _bottomIcon({
required IconData icon,
required String title,
required void Function() onPressed,
}) {
return Expanded(
child: Center(
child: Column(
children: [
IconButton(
iconSize: 55,
icon: Column(
children: [
Container(height: 3),
Icon(
icon,
size: 25,
color: Colors.white,
),
Container(height: 3),
Text(
title,
style: const TextStyle(color: Colors.white, fontSize: 10),
maxLines: 1,
textAlign: TextAlign.center,
),
Container(height: 3),
],
),
onPressed: onPressed,
)
],
),
),
),
);
}
);
}
}
///////////////////////////////////////////////////////////////////////////////
@ -1104,7 +1104,7 @@ class _WebToonDownloadImage extends _WebToonReaderImage {
final int height;
final String format;
_WebToonDownloadImage({
const _WebToonDownloadImage({
required this.fileServer,
required this.path,
required this.localPath,
@ -1137,7 +1137,7 @@ class _WebToonRemoteImage extends _WebToonReaderImage {
final String fileServer;
final String path;
_WebToonRemoteImage(
const _WebToonRemoteImage(
this.fileServer,
this.path,
Size size,
@ -1155,7 +1155,7 @@ abstract class _WebToonReaderImage extends StatefulWidget {
final Size size;
final Function(Size)? onTrueSize;
_WebToonReaderImage(this.size, this.onTrueSize);
const _WebToonReaderImage(this.size, this.onTrueSize);
@override
State<StatefulWidget> createState() => _WebToonReaderImageState();