mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -30,6 +30,12 @@ android {
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
}
|
||||
|
||||
val keyProperties = Properties().also {
|
||||
val properties = rootProject.file("key.properties")
|
||||
if (properties.exists())
|
||||
@@ -51,12 +57,12 @@ android {
|
||||
all {
|
||||
signingConfig = config ?: signingConfigs["debug"]
|
||||
}
|
||||
release {
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
// release {
|
||||
// proguardFiles(
|
||||
// getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
// "proguard-rules.pro"
|
||||
// )
|
||||
// }
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
}
|
||||
|
||||
3
android/app/src/debug/res/values/string.xml
Normal file
3
android/app/src/debug/res/values/string.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">PiliPlus debug</string>
|
||||
</resources>
|
||||
@@ -36,11 +36,11 @@
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:label="PiliPlus"
|
||||
android:label="@string/app_name"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:enableOnBackInvokedCallback="false"
|
||||
android:allowBackup="false"
|
||||
android:fullBackupContent="false"
|
||||
tools:replace="android:allowBackup">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Ucrop.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
|
||||
</style>
|
||||
<style name="Ucrop.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
3
android/app/src/main/res/values/string.xml
Normal file
3
android/app/src/main/res/values/string.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">PiliPlus</string>
|
||||
</resources>
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -16,24 +18,27 @@ abstract class CommonCollapseSlidePageState<T extends CommonCollapseSlidePage>
|
||||
}
|
||||
|
||||
void init() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
isInit = false;
|
||||
});
|
||||
if (Platform.isAndroid) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
isInit = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget child = super.build(context);
|
||||
if (isInit) {
|
||||
if (Platform.isAndroid) {
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
const CustomScrollView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
),
|
||||
child,
|
||||
if (isInit)
|
||||
const CustomScrollView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
),
|
||||
super.build(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
return child;
|
||||
return super.build(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ class _VotePanelState extends State<VotePanel> {
|
||||
),
|
||||
Flexible(
|
||||
child: ListView.builder(
|
||||
key: const PageStorageKey('vote_opions'),
|
||||
shrinkWrap: true,
|
||||
itemCount: _voteInfo.options.length,
|
||||
itemBuilder: (context, index) => _buildOptions(index),
|
||||
|
||||
@@ -261,7 +261,6 @@ class _EpisodePanelState extends CommonCollapseSlidePageState<EpisodePanel> {
|
||||
final isCurrTab = tabIndex == widget.initialTabIndex;
|
||||
return KeepAliveWrapper(
|
||||
builder: (context) => ScrollablePositionedList.separated(
|
||||
key: PageStorageKey(tabIndex),
|
||||
padding: EdgeInsets.only(
|
||||
top: 7,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
|
||||
@@ -56,7 +56,6 @@ class _PgcReviewChildPageState extends State<PgcReviewChildPage>
|
||||
return refreshIndicator(
|
||||
onRefresh: _controller.onRefresh,
|
||||
child: CustomScrollView(
|
||||
key: PageStorageKey(_tag),
|
||||
controller: _controller.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
|
||||
@@ -61,7 +61,6 @@ class _AiDetailState extends CommonCollapseSlidePageState<AiConclusionPanel> {
|
||||
@override
|
||||
Widget buildList(ThemeData theme) {
|
||||
return CustomScrollView(
|
||||
key: const PageStorageKey('ai_detail'),
|
||||
controller: _controller,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
|
||||
@@ -99,7 +99,6 @@ class _IntroDetailState extends CommonCollapseSlidePageState<PgcIntroPanel> {
|
||||
);
|
||||
return SelectionArea(
|
||||
child: ListView(
|
||||
key: const PageStorageKey('pgc_intro'),
|
||||
controller: _controller,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.only(
|
||||
|
||||
@@ -136,7 +136,6 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
SizedBox(
|
||||
height: 35,
|
||||
child: ListView.builder(
|
||||
key: PageStorageKey(hashCode),
|
||||
controller: _scrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: pages.length,
|
||||
|
||||
@@ -122,7 +122,6 @@ class _MediaListPanelState
|
||||
() {
|
||||
final showDelBtn = widget.onDelete != null && widget.mediaList.length > 1;
|
||||
return ScrollablePositionedList.separated(
|
||||
key: const PageStorageKey('medialist'),
|
||||
itemScrollController: _controller,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
itemCount: widget.mediaList.length,
|
||||
|
||||
@@ -112,7 +112,6 @@ class _PostPanelState extends CommonCollapseSlidePageState<PostPanel> {
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
key: const PageStorageKey('segment_list'),
|
||||
controller: _controller,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.only(bottom: 88 + bottom),
|
||||
|
||||
@@ -96,7 +96,6 @@ class _ViewPointsPageState
|
||||
@override
|
||||
Widget buildList(ThemeData theme) {
|
||||
return ListView.builder(
|
||||
key: const PageStorageKey('viewpoint'),
|
||||
controller: _controller,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.only(
|
||||
|
||||
Reference in New Issue
Block a user