feat: appscheme
This commit is contained in:
@ -20,6 +20,21 @@
|
|||||||
"android.support.customtabs.action.CustomTabsService" />
|
"android.support.customtabs.action.CustomTabsService" />
|
||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
|
|
||||||
|
<queries>
|
||||||
|
<!-- If your app checks for http support -->
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="http" />
|
||||||
|
</intent>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="https" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="PiliPala"
|
android:label="PiliPala"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
@ -48,6 +63,164 @@
|
|||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="bilibili" android:host="forward" />
|
||||||
|
<data android:scheme="bilibili" android:host="comment"
|
||||||
|
android:pathPattern="/detail/.*/.*/.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="uper" />
|
||||||
|
<data android:scheme="bilibili" android:host="article"
|
||||||
|
android:pathPattern="/readlist" />
|
||||||
|
<data android:scheme="bilibili" android:host="advertise" android:path="/home" />
|
||||||
|
<data android:scheme="bilibili" android:host="clip" />
|
||||||
|
<data android:scheme="bilibili" android:host="search" />
|
||||||
|
<data android:scheme="bilibili" android:host="stardust-search" />
|
||||||
|
<data android:scheme="bilibili" android:host="music" />
|
||||||
|
<data android:scheme="bilibili" android:host="bangumi"
|
||||||
|
android:pathPattern="/season.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="bangumi" android:pathPattern="/.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="pictureshow"
|
||||||
|
android:pathPrefix="/creative_center" />
|
||||||
|
<data android:scheme="bilibili" android:host="cliparea" />
|
||||||
|
<data android:scheme="bilibili" android:host="im" />
|
||||||
|
<data android:scheme="bilibili" android:host="im" android:path="/notifications" />
|
||||||
|
<data android:scheme="bilibili" android:host="following" />
|
||||||
|
<data android:scheme="bilibili" android:host="following"
|
||||||
|
android:pathPattern="/detail/.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="following"
|
||||||
|
android:path="/publishInfo/" />
|
||||||
|
<data android:scheme="bilibili" android:host="laser" android:pathPattern="/.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="livearea" />
|
||||||
|
<data android:scheme="bilibili" android:host="live" />
|
||||||
|
<data android:scheme="bilibili" android:host="catalog" />
|
||||||
|
<data android:scheme="bilibili" android:host="browser" />
|
||||||
|
<data android:scheme="bilibili" android:host="user_center" />
|
||||||
|
<data android:scheme="bilibili" android:host="login" />
|
||||||
|
<data android:scheme="bilibili" android:host="space" />
|
||||||
|
<data android:scheme="bilibili" android:host="author" />
|
||||||
|
<data android:scheme="bilibili" android:host="tag" />
|
||||||
|
<data android:scheme="bilibili" android:host="rank" />
|
||||||
|
<data android:scheme="bilibili" android:host="external" />
|
||||||
|
<data android:scheme="bilibili" android:host="blank" />
|
||||||
|
<data android:scheme="bilibili" android:host="home" />
|
||||||
|
<data android:scheme="bilibili" android:host="root" />
|
||||||
|
<data android:scheme="bilibili" android:host="video" />
|
||||||
|
<data android:scheme="bilibili" android:host="story" />
|
||||||
|
<data android:scheme="bilibili" android:host="podcast" />
|
||||||
|
<data android:scheme="bilibili" android:host="search" />
|
||||||
|
<data android:scheme="bilibili" android:host="main" android:path="/favorite" />
|
||||||
|
<data android:scheme="bilibili" android:host="pgc" android:path="/theater/match" />
|
||||||
|
<data android:scheme="bilibili" android:host="pgc" android:path="/theater/square" />
|
||||||
|
<data android:scheme="bilibili" android:host="m.bilibili.com"
|
||||||
|
android:path="/topic-detail" />
|
||||||
|
<data android:scheme="bilibili" android:host="article" />
|
||||||
|
<data android:scheme="bilibili" android:host="pegasus"
|
||||||
|
android:pathPattern="/channel/v2/.*" />
|
||||||
|
<data android:scheme="bilibili" android:host="feed" android:pathPattern="/channel" />
|
||||||
|
<data android:scheme="bilibili" android:host="vip" />
|
||||||
|
<data android:scheme="bilibili" android:host="user_center" android:path="/vip" />
|
||||||
|
<data android:scheme="bilibili" android:host="history" />
|
||||||
|
<data android:scheme="bilibili" android:host="charge" android:path="/rank" />
|
||||||
|
<data android:scheme="bilibili" android:host="assistant" />
|
||||||
|
<data android:scheme="bilibili" android:host="assistant" />
|
||||||
|
<data android:scheme="bilibili" android:host="feedback" />
|
||||||
|
<data android:scheme="bilibili" android:host="auth" android:path="/launch" />
|
||||||
|
|
||||||
|
<data android:scheme="http" android:host="live.bilibili.com"
|
||||||
|
android:pathPattern="/live/.*" />
|
||||||
|
<data android:scheme="https" android:host="live.bilibili.com"
|
||||||
|
android:pathPattern="/live/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.tv"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.tv"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/story/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/story/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/i/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/i/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/bangumi/i/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/bangumi/i/.*" />
|
||||||
|
<data android:scheme="http" android:host="bangumi.bilibili.com"
|
||||||
|
android:pathPattern="/.*" />
|
||||||
|
<data android:scheme="https" android:host="bangumi.bilibili.com"
|
||||||
|
android:pathPattern="/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/.*" />
|
||||||
|
<data android:scheme="http" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/.*" />
|
||||||
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ss.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ss.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
|
<data android:scheme="http" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/bangumi/play/ss.*" />
|
||||||
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ss.*" />
|
||||||
|
<data android:scheme="http" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
|
<data android:scheme="https" android:host="m.bilibili.com"
|
||||||
|
android:pathPattern="/cheese/play/ep.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/read/cv.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/read/cv.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com" android:path="/review/" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com" android:path="/review/" />
|
||||||
|
<data android:scheme="http" android:host="bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.cn"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/video/.*" />
|
||||||
|
<data android:scheme="http" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/video/.*" />
|
||||||
|
<data android:scheme="https" android:host="www.bilibili.com"
|
||||||
|
android:pathPattern="/mobile/video/.*" />
|
||||||
|
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
@ -56,7 +229,6 @@
|
|||||||
android:value="2" />
|
android:value="2" />
|
||||||
</application>
|
</application>
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
PODS:
|
PODS:
|
||||||
|
- appscheme (1.0.4):
|
||||||
|
- Flutter
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- ReachabilitySwift
|
- ReachabilitySwift
|
||||||
@ -45,6 +47,7 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- appscheme (from `.symlinks/plugins/appscheme/ios`)
|
||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
@ -71,6 +74,8 @@ SPEC REPOS:
|
|||||||
- ReachabilitySwift
|
- ReachabilitySwift
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
appscheme:
|
||||||
|
:path: ".symlinks/plugins/appscheme/ios"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
@ -111,6 +116,7 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
|
appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
|
||||||
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
|
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
|
||||||
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>pilipala</string>
|
<string>PiliPala</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
@ -58,5 +58,50 @@
|
|||||||
<string>https</string>
|
<string>https</string>
|
||||||
<string>http</string>
|
<string>http</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
<!-- Add Scheme related information -->
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>http</string>
|
||||||
|
<string>https</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>m.bilibili.com</string>
|
||||||
|
<string>bilibili.com</string>
|
||||||
|
<string>www.bilibili.com</string>
|
||||||
|
<string>bangumi.bilibili.com</string>
|
||||||
|
<string>bilibili.cn</string>
|
||||||
|
<string>www.bilibili.cn</string>
|
||||||
|
<string>bangumi.bilibili.cn</string>
|
||||||
|
<string>bilibili.tv</string>
|
||||||
|
<string>www.bilibili.tv</string>
|
||||||
|
<string>bangumi.bilibili.tv</string>
|
||||||
|
<string>miniapp.bilibili.com</string>
|
||||||
|
<string>live.bilibili.com</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
|
||||||
|
<!-- 当其他应用程序或系统通过 bilibili -->
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>bilibili</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>bilibili</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -13,6 +13,7 @@ import 'package:pilipala/pages/search/index.dart';
|
|||||||
import 'package:pilipala/pages/video/detail/index.dart';
|
import 'package:pilipala/pages/video/detail/index.dart';
|
||||||
import 'package:pilipala/router/app_pages.dart';
|
import 'package:pilipala/router/app_pages.dart';
|
||||||
import 'package:pilipala/pages/main/view.dart';
|
import 'package:pilipala/pages/main/view.dart';
|
||||||
|
import 'package:pilipala/utils/app_scheme.dart';
|
||||||
import 'package:pilipala/utils/data.dart';
|
import 'package:pilipala/utils/data.dart';
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
import 'package:media_kit/media_kit.dart'; // Provides [Player], [Media], [Playlist] etc.
|
import 'package:media_kit/media_kit.dart'; // Provides [Player], [Media], [Playlist] etc.
|
||||||
@ -35,6 +36,7 @@ void main() async {
|
|||||||
await Request.setCookie();
|
await Request.setCookie();
|
||||||
Data.init();
|
Data.init();
|
||||||
GStrorage.lazyInit();
|
GStrorage.lazyInit();
|
||||||
|
PiliSchame.init();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,10 +29,10 @@ class LiveRoomController extends GetxController {
|
|||||||
if (Get.arguments != null) {
|
if (Get.arguments != null) {
|
||||||
liveItem = Get.arguments['liveItem'];
|
liveItem = Get.arguments['liveItem'];
|
||||||
heroTag = Get.arguments['heroTag'] ?? '';
|
heroTag = Get.arguments['heroTag'] ?? '';
|
||||||
if (liveItem.pic != null && liveItem.pic != '') {
|
if (liveItem != null && liveItem.pic != null && liveItem.pic != '') {
|
||||||
cover = liveItem.pic;
|
cover = liveItem.pic;
|
||||||
}
|
}
|
||||||
if (liveItem.cover != null && liveItem.cover != '') {
|
if (liveItem != null && liveItem.cover != null && liveItem.cover != '') {
|
||||||
cover = liveItem.cover;
|
cover = liveItem.cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,8 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
title: Row(
|
title: _liveRoomController.liveItem != null
|
||||||
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
width: 34,
|
width: 34,
|
||||||
@ -67,13 +68,15 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
|||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
if (_liveRoomController.liveItem.watchedShow != null)
|
if (_liveRoomController.liveItem.watchedShow != null)
|
||||||
Text(
|
Text(
|
||||||
_liveRoomController.liveItem.watchedShow['text_large'] ??
|
_liveRoomController
|
||||||
|
.liveItem.watchedShow['text_large'] ??
|
||||||
'',
|
'',
|
||||||
style: const TextStyle(fontSize: 12)),
|
style: const TextStyle(fontSize: 12)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
|
: const SizedBox(),
|
||||||
// actions: [
|
// actions: [
|
||||||
// SizedBox(
|
// SizedBox(
|
||||||
// height: 34,
|
// height: 34,
|
||||||
@ -94,21 +97,22 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
|||||||
? PLVideoPlayer(controller: plPlayerController!)
|
? PLVideoPlayer(controller: plPlayerController!)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
if (_liveRoomController.liveItem.cover != null)
|
// if (_liveRoomController.liveItem != null &&
|
||||||
Visibility(
|
// _liveRoomController.liveItem.cover != null)
|
||||||
visible: isShowCover,
|
// Visibility(
|
||||||
child: Positioned(
|
// visible: isShowCover,
|
||||||
top: 0,
|
// child: Positioned(
|
||||||
left: 0,
|
// top: 0,
|
||||||
right: 0,
|
// left: 0,
|
||||||
child: NetworkImgLayer(
|
// right: 0,
|
||||||
type: 'emote',
|
// child: NetworkImgLayer(
|
||||||
src: _liveRoomController.liveItem.cover,
|
// type: 'emote',
|
||||||
width: Get.size.width,
|
// src: _liveRoomController.liveItem.cover,
|
||||||
height: videoHeight,
|
// width: Get.size.width,
|
||||||
),
|
// height: videoHeight,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
106
lib/utils/app_scheme.dart
Normal file
106
lib/utils/app_scheme.dart
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
import 'package:appscheme/appscheme.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:pilipala/http/search.dart';
|
||||||
|
import 'package:pilipala/models/common/search_type.dart';
|
||||||
|
|
||||||
|
import 'id_utils.dart';
|
||||||
|
import 'utils.dart';
|
||||||
|
|
||||||
|
class PiliSchame {
|
||||||
|
static AppScheme appScheme = AppSchemeImpl.getInstance() as AppScheme;
|
||||||
|
static void init() async {
|
||||||
|
///
|
||||||
|
SchemeEntity? value = await appScheme.getInitScheme();
|
||||||
|
if (value != null) {
|
||||||
|
_routePush(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
appScheme.getLatestScheme().then((value) {
|
||||||
|
if (value != null) {}
|
||||||
|
});
|
||||||
|
|
||||||
|
/// 注册从外部打开的Scheme监听信息 #
|
||||||
|
appScheme.registerSchemeListener().listen((event) {
|
||||||
|
if (event != null) {
|
||||||
|
_routePush(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 路由跳转
|
||||||
|
static void _routePush(value) async {
|
||||||
|
String scheme = value.scheme;
|
||||||
|
String host = value.host;
|
||||||
|
String path = value.path;
|
||||||
|
|
||||||
|
if (scheme == 'bilibili') {
|
||||||
|
// bilibili://root
|
||||||
|
if (host == 'root') {
|
||||||
|
Navigator.popUntil(Get.context!, (route) => route.isFirst);
|
||||||
|
}
|
||||||
|
|
||||||
|
// bilibili://space/{uid}
|
||||||
|
else if (host == 'space') {
|
||||||
|
var mid = path.split('/').last;
|
||||||
|
Get.toNamed(
|
||||||
|
'/member?mid=$mid',
|
||||||
|
arguments: {'face': null},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// bilibili://video/{aid}
|
||||||
|
else if (host == 'video') {
|
||||||
|
var pathQuery = path.split('/').last;
|
||||||
|
int aid = int.parse(pathQuery);
|
||||||
|
String bvid = IdUtils.av2bv(aid);
|
||||||
|
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||||
|
String heroTag = Utils.makeHeroTag(aid);
|
||||||
|
Get.toNamed('/video?bvid=$bvid&cid=$cid', arguments: {
|
||||||
|
'pic': null,
|
||||||
|
'heroTag': heroTag,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// bilibili://live/{roomid}
|
||||||
|
else if (host == 'live') {
|
||||||
|
var roomId = path.split('/').last;
|
||||||
|
Get.toNamed('/liveRoom?roomid=$roomId',
|
||||||
|
arguments: {'liveItem': null, 'heroTag': roomId.toString()});
|
||||||
|
}
|
||||||
|
|
||||||
|
// bilibili://bangumi/season/${ssid}
|
||||||
|
else if (host == 'bangumi') {
|
||||||
|
if (path.startsWith('/season')) {
|
||||||
|
SmartDialog.showLoading(msg: '获取中...');
|
||||||
|
try {
|
||||||
|
var seasonId = path.split('/').last;
|
||||||
|
var result = await SearchHttp.bangumiInfo(
|
||||||
|
seasonId: int.parse(seasonId), epId: null);
|
||||||
|
if (result['status']) {
|
||||||
|
var bangumiDetail = result['data'];
|
||||||
|
int cid = bangumiDetail.episodes!.first.cid;
|
||||||
|
String bvid = IdUtils.av2bv(bangumiDetail.episodes!.first.aid);
|
||||||
|
String heroTag = Utils.makeHeroTag(cid);
|
||||||
|
var epId = bangumiDetail.episodes!.first.id;
|
||||||
|
SmartDialog.dismiss().then(
|
||||||
|
(e) => Get.toNamed(
|
||||||
|
'/video?bvid=$bvid&cid=$cid&epId=$epId',
|
||||||
|
arguments: {
|
||||||
|
'pic': bangumiDetail.cover,
|
||||||
|
'heroTag': heroTag,
|
||||||
|
'videoType': SearchType.media_bangumi,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
SmartDialog.showToast('失败:${e.toString()}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.7"
|
version: "2.0.7"
|
||||||
|
appscheme:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: appscheme
|
||||||
|
sha256: b885b65219f3839ebafc937024a1bc5ce5a75b0e458fd249ef15e80e81235b6f
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.8"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -105,6 +105,8 @@ dependencies:
|
|||||||
easy_debounce: ^2.0.3
|
easy_debounce: ^2.0.3
|
||||||
# 高帧率
|
# 高帧率
|
||||||
flutter_displaymode: ^0.6.0
|
flutter_displaymode: ^0.6.0
|
||||||
|
# scheme跳转
|
||||||
|
appscheme: ^1.0.8
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Reference in New Issue
Block a user