feat: appscheme
This commit is contained in:
@ -20,7 +20,22 @@
|
||||
"android.support.customtabs.action.CustomTabsService" />
|
||||
</intent>
|
||||
</queries>
|
||||
<application
|
||||
|
||||
<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
|
||||
android:label="PiliPala"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@ -48,6 +63,164 @@
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</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>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
@ -56,7 +229,6 @@
|
||||
android:value="2" />
|
||||
</application>
|
||||
<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.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
@ -1,4 +1,6 @@
|
||||
PODS:
|
||||
- appscheme (1.0.4):
|
||||
- Flutter
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- ReachabilitySwift
|
||||
@ -45,6 +47,7 @@ PODS:
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- appscheme (from `.symlinks/plugins/appscheme/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
@ -71,6 +74,8 @@ SPEC REPOS:
|
||||
- ReachabilitySwift
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
appscheme:
|
||||
:path: ".symlinks/plugins/appscheme/ios"
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
device_info_plus:
|
||||
@ -111,6 +116,7 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
|
||||
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
|
||||
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
|
@ -1,62 +1,107 @@
|
||||
<?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">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>PiliPala</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>pilipala</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>请允许APP保存图片到相册</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>App需要您的同意,才能访问相册</string>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>App需要您的同意,才能访问媒体资料库</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
<string>http</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>PiliPala</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>PiliPala</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string>请允许APP保存图片到相册</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>App需要您的同意,才能访问相册</string>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>App需要您的同意,才能访问媒体资料库</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
<string>http</string>
|
||||
</array>
|
||||
<!-- 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>
|
||||
|
@ -13,6 +13,7 @@ import 'package:pilipala/pages/search/index.dart';
|
||||
import 'package:pilipala/pages/video/detail/index.dart';
|
||||
import 'package:pilipala/router/app_pages.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/storage.dart';
|
||||
import 'package:media_kit/media_kit.dart'; // Provides [Player], [Media], [Playlist] etc.
|
||||
@ -35,6 +36,7 @@ void main() async {
|
||||
await Request.setCookie();
|
||||
Data.init();
|
||||
GStrorage.lazyInit();
|
||||
PiliSchame.init();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -29,10 +29,10 @@ class LiveRoomController extends GetxController {
|
||||
if (Get.arguments != null) {
|
||||
liveItem = Get.arguments['liveItem'];
|
||||
heroTag = Get.arguments['heroTag'] ?? '';
|
||||
if (liveItem.pic != null && liveItem.pic != '') {
|
||||
if (liveItem != null && liveItem.pic != null && liveItem.pic != '') {
|
||||
cover = liveItem.pic;
|
||||
}
|
||||
if (liveItem.cover != null && liveItem.cover != '') {
|
||||
if (liveItem != null && liveItem.cover != null && liveItem.cover != '') {
|
||||
cover = liveItem.cover;
|
||||
}
|
||||
}
|
||||
|
@ -48,32 +48,35 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Row(
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
width: 34,
|
||||
height: 34,
|
||||
type: 'avatar',
|
||||
src: _liveRoomController.liveItem.face,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_liveRoomController.liveItem.uname,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
const SizedBox(height: 1),
|
||||
if (_liveRoomController.liveItem.watchedShow != null)
|
||||
Text(
|
||||
_liveRoomController.liveItem.watchedShow['text_large'] ??
|
||||
'',
|
||||
style: const TextStyle(fontSize: 12)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
title: _liveRoomController.liveItem != null
|
||||
? Row(
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
width: 34,
|
||||
height: 34,
|
||||
type: 'avatar',
|
||||
src: _liveRoomController.liveItem.face,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_liveRoomController.liveItem.uname,
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
const SizedBox(height: 1),
|
||||
if (_liveRoomController.liveItem.watchedShow != null)
|
||||
Text(
|
||||
_liveRoomController
|
||||
.liveItem.watchedShow['text_large'] ??
|
||||
'',
|
||||
style: const TextStyle(fontSize: 12)),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
// actions: [
|
||||
// SizedBox(
|
||||
// height: 34,
|
||||
@ -94,21 +97,22 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
|
||||
? PLVideoPlayer(controller: plPlayerController!)
|
||||
: const SizedBox(),
|
||||
),
|
||||
if (_liveRoomController.liveItem.cover != null)
|
||||
Visibility(
|
||||
visible: isShowCover,
|
||||
child: Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: NetworkImgLayer(
|
||||
type: 'emote',
|
||||
src: _liveRoomController.liveItem.cover,
|
||||
width: Get.size.width,
|
||||
height: videoHeight,
|
||||
),
|
||||
),
|
||||
),
|
||||
// if (_liveRoomController.liveItem != null &&
|
||||
// _liveRoomController.liveItem.cover != null)
|
||||
// Visibility(
|
||||
// visible: isShowCover,
|
||||
// child: Positioned(
|
||||
// top: 0,
|
||||
// left: 0,
|
||||
// right: 0,
|
||||
// child: NetworkImgLayer(
|
||||
// type: 'emote',
|
||||
// src: _liveRoomController.liveItem.cover,
|
||||
// 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"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
appscheme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: appscheme
|
||||
sha256: b885b65219f3839ebafc937024a1bc5ce5a75b0e458fd249ef15e80e81235b6f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.8"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -105,6 +105,8 @@ dependencies:
|
||||
easy_debounce: ^2.0.3
|
||||
# 高帧率
|
||||
flutter_displaymode: ^0.6.0
|
||||
# scheme跳转
|
||||
appscheme: ^1.0.8
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Reference in New Issue
Block a user