mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-17 23:56:13 +08:00
fix: 状态栏图标颜色错误
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:PiliPalaX/models/common/dynamics_type.dart';
|
|||||||
import 'package:PiliPalaX/models/common/up_panel_position.dart';
|
import 'package:PiliPalaX/models/common/up_panel_position.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:PiliPalaX/utils/feed_back.dart';
|
import 'package:PiliPalaX/utils/feed_back.dart';
|
||||||
@@ -70,7 +71,9 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
child: Container(
|
child: Container(
|
||||||
//抽屉模式增加底色
|
//抽屉模式增加底色
|
||||||
color: upPanelPosition.code > 1? Theme.of(context).colorScheme.surface: Colors.transparent,
|
color: upPanelPosition.code > 1
|
||||||
|
? Theme.of(context).colorScheme.surface
|
||||||
|
: Colors.transparent,
|
||||||
width: 56,
|
width: 56,
|
||||||
child: FutureBuilder(
|
child: FutureBuilder(
|
||||||
future: _futureBuilderFutureUp,
|
future: _futureBuilderFutureUp,
|
||||||
@@ -82,8 +85,7 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
Map data = snapshot.data;
|
Map data = snapshot.data;
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
return Obx(() => UpPanel(
|
return Obx(() => UpPanel(
|
||||||
_dynamicsController.upData.value,
|
_dynamicsController.upData.value, scrollController));
|
||||||
scrollController));
|
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
}
|
}
|
||||||
@@ -97,6 +99,7 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
print('upPanelPosition1: $upPanelPosition');
|
print('upPanelPosition1: $upPanelPosition');
|
||||||
@@ -107,6 +110,12 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
toolbarHeight: 50,
|
toolbarHeight: 50,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
systemOverlayStyle: SystemUiOverlayStyle(
|
||||||
|
statusBarIconBrightness:
|
||||||
|
Theme.of(context).brightness == Brightness.light
|
||||||
|
? Brightness.dark
|
||||||
|
: Brightness.light,
|
||||||
|
),
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
height: 50,
|
height: 50,
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
@@ -127,31 +136,31 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
print('index: $index');
|
print('index: $index');
|
||||||
feedBack();
|
feedBack();
|
||||||
tabsConfig[_dynamicsController.tabController.index]['ctr'].animateToTop();
|
tabsConfig[_dynamicsController.tabController.index]['ctr']
|
||||||
|
.animateToTop();
|
||||||
// _dynamicsController.tabController
|
// _dynamicsController.tabController
|
||||||
// _dynamicsController.tabController.index = index;
|
// _dynamicsController.tabController.index = index;
|
||||||
// _dynamicsController.onSelectType(index);
|
// _dynamicsController.onSelectType(index);
|
||||||
// _
|
// _
|
||||||
}
|
})),
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
drawer: upPanelPosition == UpPanelPosition.leftDrawer ?
|
drawer: upPanelPosition == UpPanelPosition.leftDrawer
|
||||||
upPanelPart(): null,
|
? upPanelPart()
|
||||||
|
: null,
|
||||||
drawerEnableOpenDragGesture: true,
|
drawerEnableOpenDragGesture: true,
|
||||||
endDrawer: upPanelPosition == UpPanelPosition.rightDrawer ?
|
endDrawer: upPanelPosition == UpPanelPosition.rightDrawer
|
||||||
upPanelPart(): null,
|
? upPanelPart()
|
||||||
|
: null,
|
||||||
endDrawerEnableOpenDragGesture: true,
|
endDrawerEnableOpenDragGesture: true,
|
||||||
body: Row(children: [
|
body: Row(children: [
|
||||||
if (upPanelPosition == UpPanelPosition.leftFixed)
|
if (upPanelPosition == UpPanelPosition.leftFixed) upPanelPart(),
|
||||||
upPanelPart(),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
controller: _dynamicsController.tabController,
|
controller: _dynamicsController.tabController,
|
||||||
children: _dynamicsController.tabsPageList,
|
children: _dynamicsController.tabsPageList,
|
||||||
)),
|
)),
|
||||||
if (upPanelPosition == UpPanelPosition.rightFixed)
|
if (upPanelPosition == UpPanelPosition.rightFixed) upPanelPart(),
|
||||||
upPanelPart(),
|
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
||||||
import 'package:PiliPalaX/models/user/fav_folder.dart';
|
import 'package:PiliPalaX/models/user/fav_folder.dart';
|
||||||
@@ -63,7 +64,16 @@ class _MediaPageState extends State<MediaPage>
|
|||||||
Color primary = Theme.of(context).colorScheme.primary;
|
Color primary = Theme.of(context).colorScheme.primary;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: AppBar(toolbarHeight: 30, backgroundColor: Colors.transparent),
|
appBar: AppBar(
|
||||||
|
toolbarHeight: 30,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
systemOverlayStyle: SystemUiOverlayStyle(
|
||||||
|
statusBarIconBrightness:
|
||||||
|
Theme.of(context).brightness == Brightness.light
|
||||||
|
? Brightness.dark
|
||||||
|
: Brightness.light,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
controller: mediaController.scrollController,
|
controller: mediaController.scrollController,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
Reference in New Issue
Block a user