mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
emoji setting
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget/loading_widget.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget/loading_widget.dart';
|
||||||
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
import 'package:PiliPlus/common/widgets/scroll_physics.dart';
|
||||||
@@ -27,10 +28,13 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
return Obx(() => _buildBody(_emotePanelController.loadingState.value));
|
final ThemeData theme = Theme.of(context);
|
||||||
|
return Obx(
|
||||||
|
() => _buildBody(theme, _emotePanelController.loadingState.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBody(LoadingState<List<Packages>?> loadingState) {
|
Widget _buildBody(
|
||||||
|
ThemeData theme, LoadingState<List<Packages>?> loadingState) {
|
||||||
return switch (loadingState) {
|
return switch (loadingState) {
|
||||||
Loading() => loadingWidget,
|
Loading() => loadingWidget,
|
||||||
Success(:var response) => response?.isNotEmpty == true
|
Success(:var response) => response?.isNotEmpty == true
|
||||||
@@ -93,9 +97,34 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: theme.dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
TabBar(
|
Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
child: iconButton(
|
||||||
|
iconSize: 20,
|
||||||
|
iconColor:
|
||||||
|
theme.colorScheme.onSurfaceVariant.withOpacity(0.8),
|
||||||
|
bgColor: Colors.transparent,
|
||||||
|
context: context,
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed(
|
||||||
|
'/webview',
|
||||||
|
parameters: {
|
||||||
|
'url':
|
||||||
|
'https://www.bilibili.com/h5/mall/emoji-package/home?navhide=1&native.theme=1&night=${Get.isDarkMode ? 1 : 0}',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
icon: Icons.settings,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: TabBar(
|
||||||
controller: _emotePanelController.tabController,
|
controller: _emotePanelController.tabController,
|
||||||
padding: const EdgeInsets.only(right: 60),
|
padding: const EdgeInsets.only(right: 60),
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
@@ -115,6 +144,10 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user