mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 05:33:59 +08:00
Compare commits
5 Commits
1.1.3.37
...
1.1.3.37-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
924fb4bf81 | ||
|
|
f60c0b9a10 | ||
|
|
7c0d161b9a | ||
|
|
0a8b632200 | ||
|
|
401f5268a6 |
@@ -58,6 +58,9 @@
|
|||||||
android:supportsPictureInPicture="true"
|
android:supportsPictureInPicture="true"
|
||||||
android:resizeableActivity="true"
|
android:resizeableActivity="true"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
|
||||||
|
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
the Android process has started. This theme is visible to the user
|
the Android process has started. This theme is visible to the user
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
|||||||
@@ -119,15 +119,17 @@ class _DynamicSliverAppBarMediumState extends State<DynamicSliverAppBarMedium> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
Orientation? _orientation;
|
||||||
void didChangeDependencies() {
|
|
||||||
_height = 0;
|
|
||||||
_updateHeight();
|
|
||||||
super.didChangeDependencies();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final orientation = MediaQuery.of(context).orientation;
|
||||||
|
if (orientation != _orientation) {
|
||||||
|
_orientation = orientation;
|
||||||
|
_height = 0;
|
||||||
|
_updateHeight();
|
||||||
|
}
|
||||||
|
|
||||||
//Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
|
//Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
|
||||||
if (_height == 0) {
|
if (_height == 0) {
|
||||||
return SliverToBoxAdapter(
|
return SliverToBoxAdapter(
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ class MyApp extends StatelessWidget {
|
|||||||
supportedLocales: const [Locale("zh", "CN"), Locale("en", "US")],
|
supportedLocales: const [Locale("zh", "CN"), Locale("en", "US")],
|
||||||
fallbackLocale: const Locale("zh", "CN"),
|
fallbackLocale: const Locale("zh", "CN"),
|
||||||
getPages: Routes.getPages,
|
getPages: Routes.getPages,
|
||||||
home: const MainApp(),
|
initialRoute: '/',
|
||||||
builder: FlutterSmartDialog.init(
|
builder: FlutterSmartDialog.init(
|
||||||
toastBuilder: (String msg) => CustomToast(msg: msg),
|
toastBuilder: (String msg) => CustomToast(msg: msg),
|
||||||
loadingBuilder: (msg) => LoadingWidget(msg: msg),
|
loadingBuilder: (msg) => LoadingWidget(msg: msg),
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:canvas_danmaku/canvas_danmaku.dart';
|
import 'package:canvas_danmaku/canvas_danmaku.dart';
|
||||||
import 'package:floating/floating.dart';
|
import 'package:floating/floating.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart' show MethodChannel;
|
import 'package:flutter/services.dart' show MethodChannel, SystemUiOverlayStyle;
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:screen_brightness/screen_brightness.dart';
|
import 'package:screen_brightness/screen_brightness.dart';
|
||||||
@@ -207,8 +207,29 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemUiOverlayStyle _systemOverlayStyleForBrightness(
|
||||||
|
Brightness brightness, [
|
||||||
|
Color? backgroundColor,
|
||||||
|
]) {
|
||||||
|
final SystemUiOverlayStyle style = brightness == Brightness.dark
|
||||||
|
? SystemUiOverlayStyle.light
|
||||||
|
: SystemUiOverlayStyle.dark;
|
||||||
|
// For backward compatibility, create an overlay style without system navigation bar settings.
|
||||||
|
return SystemUiOverlayStyle(
|
||||||
|
statusBarColor: backgroundColor,
|
||||||
|
statusBarBrightness: style.statusBarBrightness,
|
||||||
|
statusBarIconBrightness: style.statusBarIconBrightness,
|
||||||
|
systemStatusBarContrastEnforced: style.systemStatusBarContrastEnforced,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget childWhenDisabled(bool isPortrait) {
|
Widget childWhenDisabled(bool isPortrait) {
|
||||||
return ColoredBox(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
|
value: _systemOverlayStyleForBrightness(
|
||||||
|
Brightness.dark,
|
||||||
|
Theme.of(context).useMaterial3 ? const Color(0x00000000) : null,
|
||||||
|
),
|
||||||
|
child: ColoredBox(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
@@ -259,6 +280,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import 'package:PiliPlus/pages/later/view.dart';
|
|||||||
import 'package:PiliPlus/pages/later_search/view.dart';
|
import 'package:PiliPlus/pages/later_search/view.dart';
|
||||||
import 'package:PiliPlus/pages/live_room/view.dart';
|
import 'package:PiliPlus/pages/live_room/view.dart';
|
||||||
import 'package:PiliPlus/pages/login/view.dart';
|
import 'package:PiliPlus/pages/login/view.dart';
|
||||||
|
import 'package:PiliPlus/pages/main/view.dart';
|
||||||
import 'package:PiliPlus/pages/media/view.dart';
|
import 'package:PiliPlus/pages/media/view.dart';
|
||||||
import 'package:PiliPlus/pages/member/view.dart';
|
import 'package:PiliPlus/pages/member/view.dart';
|
||||||
import 'package:PiliPlus/pages/member_dynamics/view.dart';
|
import 'package:PiliPlus/pages/member_dynamics/view.dart';
|
||||||
@@ -61,8 +62,9 @@ import 'package:get/get.dart';
|
|||||||
|
|
||||||
class Routes {
|
class Routes {
|
||||||
static final List<GetPage<dynamic>> getPages = [
|
static final List<GetPage<dynamic>> getPages = [
|
||||||
|
CustomGetPage(name: '/', page: () => const MainApp()),
|
||||||
// 首页(推荐)
|
// 首页(推荐)
|
||||||
CustomGetPage(name: '/', page: () => const HomePage()),
|
CustomGetPage(name: '/home', page: () => const HomePage()),
|
||||||
// 热门
|
// 热门
|
||||||
CustomGetPage(name: '/hot', page: () => const HotPage()),
|
CustomGetPage(name: '/hot', page: () => const HotPage()),
|
||||||
// 视频详情
|
// 视频详情
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ class PiliScheme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void launchURL() {
|
void launchURL() {
|
||||||
if (selfHandle) {
|
if (!selfHandle) {
|
||||||
_toWebview(uri.toString(), off, parameters);
|
_toWebview(uri.toString(), off, parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user