mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-08 11:07:41 +08:00
Compare commits
13 Commits
b897103af0
...
2.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6341660788 | ||
|
|
a1dbcae93e | ||
|
|
1526137a64 | ||
|
|
3097b56816 | ||
|
|
db74eccf77 | ||
|
|
14890d342a | ||
|
|
51163dd985 | ||
|
|
f0d9b3a9a7 | ||
|
|
8f3707fbf1 | ||
|
|
f52bbe9804 | ||
|
|
3ec54868d0 | ||
|
|
c0b55f9af3 | ||
|
|
279f21857d |
@@ -1,5 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.piliplus">
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@@ -16,8 +17,7 @@
|
||||
</queries>
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name=
|
||||
"android.support.customtabs.action.CustomTabsService" />
|
||||
<action android:name="android.support.customtabs.action.CustomTabsService" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
@@ -35,56 +35,62 @@
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:label="@string/app_name"
|
||||
<application xmlns:tools="http://schemas.android.com/tools"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:enableOnBackInvokedCallback="false"
|
||||
android:allowBackup="false"
|
||||
android:enableOnBackInvokedCallback="false"
|
||||
android:fullBackupContent="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
tools:replace="android:allowBackup">
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.EnableImpeller"
|
||||
android:value="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:supportsPictureInPicture="true"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
>
|
||||
android:supportsPictureInPicture="true"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
|
||||
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
|
||||
<meta-data
|
||||
android:name="flutter_deeplinking_enabled"
|
||||
android:value="false" />
|
||||
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter android:label="PiliPlus">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http"/>
|
||||
<data android:scheme="https"/>
|
||||
<data android:host="*.bilibili.com"/>
|
||||
<data android:host="*.bilibili.cn"/>
|
||||
<data android:host="*.bilibili.tv"/>
|
||||
<data android:host="bilibili.com"/>
|
||||
<data android:host="bilibili.cn"/>
|
||||
<data android:host="bilibili.tv"/>
|
||||
|
||||
<data android:scheme="http" />
|
||||
<data android:scheme="https" />
|
||||
<data android:host="*.bilibili.com" />
|
||||
<data android:host="*.bilibili.cn" />
|
||||
<data android:host="*.bilibili.tv" />
|
||||
<data android:host="bilibili.com" />
|
||||
<data android:host="bilibili.cn" />
|
||||
<data android:host="bilibili.tv" />
|
||||
<data android:host="b23.tv" />
|
||||
<!--<data android:host="live.bilibili.com"/>-->
|
||||
<!--<data android:host="www.bilibili.com"/>-->
|
||||
@@ -100,36 +106,56 @@
|
||||
<intent-filter android:label="PiliPlus">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
<action android:name="com.example.piliplus.SHORTCUT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="bilibili"/>
|
||||
|
||||
<data android:scheme="bilibili" />
|
||||
<data android:host="download" />
|
||||
<data android:host="forward" />
|
||||
<data android:host="comment"
|
||||
<data
|
||||
android:host="comment"
|
||||
android:pathPattern="/detail/.*/.*/.*" />
|
||||
<data android:host="uper" />
|
||||
<data android:host="article"
|
||||
<data
|
||||
android:host="article"
|
||||
android:pathPattern="/readlist" />
|
||||
<data android:host="opus" />
|
||||
<data android:host="advertise" android:path="/home" />
|
||||
<data
|
||||
android:host="advertise"
|
||||
android:path="/home" />
|
||||
<data android:host="clip" />
|
||||
<data android:host="search" android:pathPattern=".*" />
|
||||
<data
|
||||
android:host="search"
|
||||
android:pathPattern=".*" />
|
||||
<data android:host="stardust-search" />
|
||||
<data android:host="music" />
|
||||
<data android:host="cheese" />
|
||||
<data android:host="bangumi"
|
||||
<data
|
||||
android:host="bangumi"
|
||||
android:pathPattern="/season.*" />
|
||||
<data android:host="bangumi" android:pathPattern="/.*" />
|
||||
<data android:host="pictureshow"
|
||||
<data
|
||||
android:host="bangumi"
|
||||
android:pathPattern="/.*" />
|
||||
<data
|
||||
android:host="pictureshow"
|
||||
android:pathPrefix="/creative_center" />
|
||||
<data android:host="cliparea" />
|
||||
<data android:host="im" />
|
||||
<data android:host="im" android:path="/notifications" />
|
||||
<data
|
||||
android:host="im"
|
||||
android:path="/notifications" />
|
||||
<data android:host="following" />
|
||||
<data android:host="following"
|
||||
<data
|
||||
android:host="following"
|
||||
android:pathPattern="/detail/.*" />
|
||||
<data android:host="following"
|
||||
<data
|
||||
android:host="following"
|
||||
android:path="/publishInfo/" />
|
||||
<data android:host="laser" android:pathPattern="/.*" />
|
||||
<data
|
||||
android:host="laser"
|
||||
android:pathPattern="/.*" />
|
||||
<data android:host="livearea" />
|
||||
<data android:host="live" />
|
||||
<data android:host="catalog" />
|
||||
@@ -147,28 +173,44 @@
|
||||
<data android:host="video" />
|
||||
<data android:host="story" />
|
||||
<data android:host="podcast" />
|
||||
<data android:host="main" android:path="/favorite" />
|
||||
<data android:host="pgc" android:path="/theater/match" />
|
||||
<data android:host="pgc" android:path="/theater/square" />
|
||||
<data android:host="m.bilibili.com"
|
||||
<data
|
||||
android:host="main"
|
||||
android:path="/favorite" />
|
||||
<data
|
||||
android:host="pgc"
|
||||
android:path="/theater/match" />
|
||||
<data
|
||||
android:host="pgc"
|
||||
android:path="/theater/square" />
|
||||
<data
|
||||
android:host="m.bilibili.com"
|
||||
android:path="/topic-detail" />
|
||||
<data android:host="article" />
|
||||
<data android:host="pegasus"
|
||||
<data
|
||||
android:host="pegasus"
|
||||
android:pathPattern="/channel/v2/.*" />
|
||||
<data android:host="feed" android:pathPattern="/channel" />
|
||||
<data
|
||||
android:host="feed"
|
||||
android:pathPattern="/channel" />
|
||||
<data android:host="vip" />
|
||||
<data android:host="user_center" android:path="/vip" />
|
||||
<data
|
||||
android:host="user_center"
|
||||
android:path="/vip" />
|
||||
<data android:host="history" />
|
||||
<data android:host="charge" android:path="/rank" />
|
||||
<data
|
||||
android:host="charge"
|
||||
android:path="/rank" />
|
||||
<data android:host="assistant" />
|
||||
<data android:host="feedback" />
|
||||
<data android:host="auth" android:path="/launch" />
|
||||
<data
|
||||
android:host="auth"
|
||||
android:path="/launch" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<service
|
||||
<service
|
||||
android:name="com.ryanheise.audioservice.AudioService"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="mediaPlayback"
|
||||
android:exported="true"
|
||||
tools:ignore="Instantiatable">
|
||||
<intent-filter>
|
||||
<action android:name="android.media.browse.MediaBrowserService" />
|
||||
@@ -177,32 +219,37 @@
|
||||
|
||||
<activity
|
||||
android:name="com.yalantis.ucrop.UCropActivity"
|
||||
android:theme="@style/Ucrop.CropTheme"/>
|
||||
android:theme="@style/Ucrop.CropTheme" />
|
||||
|
||||
<receiver
|
||||
<receiver
|
||||
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
|
||||
android:exported="true"
|
||||
android:exported="true"
|
||||
tools:ignore="Instantiatable">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</receiver>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<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_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<!--
|
||||
Media access permissions.
|
||||
Android 13 or higher.
|
||||
@@ -210,5 +257,5 @@
|
||||
-->
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
</manifest>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
package com.example.piliplus
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.app.PictureInPictureParams
|
||||
import android.app.SearchManager
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.pm.ShortcutInfo
|
||||
import android.content.pm.ShortcutManager
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.drawable.Icon
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.provider.MediaStore
|
||||
@@ -16,6 +21,7 @@ import com.ryanheise.audioservice.AudioServiceActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import kotlin.system.exitProcess
|
||||
import java.io.File
|
||||
|
||||
class MainActivity : AudioServiceActivity() {
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
@@ -133,6 +139,38 @@ class MainActivity : AudioServiceActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
"createShortcut" -> {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
try {
|
||||
val shortcutManager =
|
||||
context.getSystemService(ShortcutManager::class.java)
|
||||
if (shortcutManager.isRequestPinShortcutSupported) {
|
||||
val id = call.argument<String>("id")!!
|
||||
val uri = call.argument<String>("uri")!!
|
||||
val label = call.argument<String>("label")!!
|
||||
val icon = call.argument<String>("icon")!!
|
||||
val bitmap = BitmapFactory.decodeFile(icon)
|
||||
val shortcut =
|
||||
ShortcutInfo.Builder(context, id)
|
||||
.setShortLabel(label)
|
||||
.setIcon(Icon.createWithAdaptiveBitmap(bitmap))
|
||||
.setIntent(Intent(Intent.ACTION_VIEW, uri.toUri()))
|
||||
.build()
|
||||
val pinIntent =
|
||||
shortcutManager.createShortcutResultIntent(shortcut)
|
||||
val pendingIntent = PendingIntent.getBroadcast(
|
||||
context, 0, pinIntent, PendingIntent.FLAG_IMMUTABLE
|
||||
)
|
||||
shortcutManager.requestPinShortcut(
|
||||
shortcut,
|
||||
pendingIntent.intentSender
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
10
android/app/src/main/res/drawable/download.xml
Normal file
10
android/app/src/main/res/drawable/download.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#515151"
|
||||
android:pathData="M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71zM5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1z" />
|
||||
</vector>
|
||||
10
android/app/src/main/res/drawable/search.xml
Normal file
10
android/app/src/main/res/drawable/search.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#515151"
|
||||
android:pathData="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
|
||||
</vector>
|
||||
@@ -1,3 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">PiliPlus</string>
|
||||
<string name="search">搜索</string>
|
||||
<string name="offline_video">离线视频</string>
|
||||
</resources>
|
||||
20
android/app/src/main/res/xml-v25/shortcuts.xml
Normal file
20
android/app/src/main/res/xml-v25/shortcuts.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<shortcut
|
||||
android:icon="@drawable/search"
|
||||
android:shortcutId="search"
|
||||
android:shortcutLongLabel="@string/search"
|
||||
android:shortcutShortLabel="@string/search">
|
||||
<intent
|
||||
android:action="com.example.piliplus.SHORTCUT"
|
||||
android:data="bilibili://search" />
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:icon="@drawable/download"
|
||||
android:shortcutId="offline_video"
|
||||
android:shortcutLongLabel="@string/offline_video"
|
||||
android:shortcutShortLabel="@string/offline_video">
|
||||
<intent
|
||||
android:action="com.example.piliplus.SHORTCUT"
|
||||
android:data="bilibili://download" />
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
@@ -6,8 +6,6 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- audio_session (0.0.1):
|
||||
- Flutter
|
||||
- auto_orientation (0.0.1):
|
||||
- Flutter
|
||||
- battery_plus (1.0.0):
|
||||
- Flutter
|
||||
- chat_bottom_container (0.0.1):
|
||||
@@ -83,6 +81,8 @@ PODS:
|
||||
- Flutter
|
||||
- media_kit_video (0.0.1):
|
||||
- Flutter
|
||||
- native_device_orientation (0.0.1):
|
||||
- Flutter
|
||||
- OrderedSet (6.0.3)
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
@@ -114,7 +114,6 @@ DEPENDENCIES:
|
||||
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||
- audio_service (from `.symlinks/plugins/audio_service/darwin`)
|
||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
||||
- battery_plus (from `.symlinks/plugins/battery_plus/ios`)
|
||||
- chat_bottom_container (from `.symlinks/plugins/chat_bottom_container/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
@@ -133,6 +132,7 @@ DEPENDENCIES:
|
||||
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
||||
- media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`)
|
||||
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
|
||||
- native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- saver_gallery (from `.symlinks/plugins/saver_gallery/ios`)
|
||||
@@ -160,8 +160,6 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/audio_service/darwin"
|
||||
audio_session:
|
||||
:path: ".symlinks/plugins/audio_session/ios"
|
||||
auto_orientation:
|
||||
:path: ".symlinks/plugins/auto_orientation/ios"
|
||||
battery_plus:
|
||||
:path: ".symlinks/plugins/battery_plus/ios"
|
||||
chat_bottom_container:
|
||||
@@ -198,6 +196,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/media_kit_native_event_loop/ios"
|
||||
media_kit_video:
|
||||
:path: ".symlinks/plugins/media_kit_video/ios"
|
||||
native_device_orientation:
|
||||
:path: ".symlinks/plugins/native_device_orientation/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
permission_handler_apple:
|
||||
@@ -221,7 +221,6 @@ SPEC CHECKSUMS:
|
||||
app_links: a754cbec3c255bd4bbb4d236ecc06f28cd9a7ce8
|
||||
audio_service: aa99a6ba2ae7565996015322b0bb024e1d25c6fd
|
||||
audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
|
||||
auto_orientation: a1600c9ed72e6e96982fb4e1214463343342432a
|
||||
battery_plus: b42253f6d2dde71712f8c36fef456d99121c5977
|
||||
chat_bottom_container: f1eb8323db77a87db50f361142c679f11e892d1b
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
@@ -243,6 +242,7 @@ SPEC CHECKSUMS:
|
||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||
media_kit_native_event_loop: 5fba1a849a6c87a34985f1e178a0de5bd444a0cf
|
||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||
native_device_orientation: e3580675687d5034770da198f6839ebf2122ef94
|
||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
||||
|
||||
@@ -5,11 +5,11 @@ import 'package:flutter/material.dart';
|
||||
Widget avatars({
|
||||
required ColorScheme colorScheme,
|
||||
required Iterable<Owner> users,
|
||||
double gap = 6.0,
|
||||
}) {
|
||||
const gap = 6.0;
|
||||
const size = 22.0;
|
||||
const padding = 0.8;
|
||||
const offset = size - gap;
|
||||
final offset = size - gap;
|
||||
const imgSize = size - 2 * padding;
|
||||
if (users.length == 1) {
|
||||
return NetworkImgLayer(
|
||||
|
||||
@@ -830,6 +830,10 @@ abstract final class Api {
|
||||
|
||||
static const String dynReserve = '/x/dynamic/feed/reserve/click';
|
||||
|
||||
static const String spaceReserve = '/x/space/reserve';
|
||||
|
||||
static const String spaceReserveCancel = '/x/space/reserve/cancel';
|
||||
|
||||
static const String favPugv = '/pugv/app/web/favorite/page';
|
||||
|
||||
static const String addFavPugv = '/pugv/app/web/favorite/add';
|
||||
@@ -997,4 +1001,7 @@ abstract final class Api {
|
||||
|
||||
static const String liveMedalWall =
|
||||
'${HttpString.liveBaseUrl}/xlive/web-ucenter/user/MedalWall';
|
||||
|
||||
static const String memberGuard =
|
||||
'${HttpString.liveBaseUrl}/xlive/app-ucenter/v1/guard/MainGuardCardAll';
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import 'package:PiliPlus/models_new/member/coin_like_arc/data.dart';
|
||||
import 'package:PiliPlus/models_new/member/search_archive/data.dart';
|
||||
import 'package:PiliPlus/models_new/member/season_web/data.dart';
|
||||
import 'package:PiliPlus/models_new/member_card_info/data.dart';
|
||||
import 'package:PiliPlus/models_new/member_guard/data.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/data.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/data.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/data.dart';
|
||||
@@ -830,4 +831,23 @@ abstract final class MemberHttp {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<MemberGuardData>> memberGuard({
|
||||
required Object ruid,
|
||||
required int page,
|
||||
}) async {
|
||||
final res = await Request().get(
|
||||
Api.memberGuard,
|
||||
queryParameters: {
|
||||
'page': page,
|
||||
'page_size': 20,
|
||||
'ruid': ruid,
|
||||
},
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return Success(MemberGuardData.fromJson(res.data['data']));
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,7 +431,9 @@ abstract final class UserHttp {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<void>> spaceSettingMod(Map data) async {
|
||||
static Future<LoadingState<void>> spaceSettingMod(
|
||||
Map<String, dynamic> data,
|
||||
) async {
|
||||
final res = await Request().post(
|
||||
Api.spaceSettingMod,
|
||||
queryParameters: {
|
||||
@@ -569,4 +571,23 @@ abstract final class UserHttp {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<LoadingState<void>> spaceReserve({
|
||||
required Object sid,
|
||||
required bool isFollow,
|
||||
}) async {
|
||||
final res = await Request().post(
|
||||
isFollow ? Api.spaceReserveCancel : Api.spaceReserve,
|
||||
data: {
|
||||
'sid': sid,
|
||||
'csrf': Accounts.main.csrf,
|
||||
},
|
||||
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||
);
|
||||
if (res.data['code'] == 0) {
|
||||
return const Success(null);
|
||||
} else {
|
||||
return Error(res.data['message']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:PiliPlus/common/widgets/scale_app.dart';
|
||||
import 'package:PiliPlus/common/widgets/scroll_behavior.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
import 'package:PiliPlus/models/common/theme/theme_color_type.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/utils/fullscreen.dart';
|
||||
import 'package:PiliPlus/router/app_pages.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/services/download/download_service.dart';
|
||||
@@ -28,6 +29,7 @@ import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/theme_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:catcher_2/catcher_2.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -82,6 +84,10 @@ Future<void> _initAppPath() async {
|
||||
appSupportDirPath = (await getApplicationSupportDirectory()).path;
|
||||
}
|
||||
|
||||
Future<void> _initSdkInt() async {
|
||||
Utils.sdkInt = (await DeviceInfoPlugin().androidInfo).version.sdkInt;
|
||||
}
|
||||
|
||||
void main() async {
|
||||
ScaledWidgetsFlutterBinding.ensureInitialized();
|
||||
MediaKit.ensureInitialized();
|
||||
@@ -104,15 +110,8 @@ void main() async {
|
||||
|
||||
if (PlatformUtils.isMobile) {
|
||||
await Future.wait([
|
||||
SystemChrome.setPreferredOrientations(
|
||||
[
|
||||
DeviceOrientation.portraitUp,
|
||||
if (Pref.horizontalScreen) ...[
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.landscapeRight,
|
||||
],
|
||||
],
|
||||
),
|
||||
if (Platform.isAndroid) _initSdkInt(),
|
||||
if (Pref.horizontalScreen) ?fullMode() else ?portraitUpMode(),
|
||||
setupServiceLocator(),
|
||||
]);
|
||||
} else if (Platform.isWindows) {
|
||||
@@ -131,12 +130,10 @@ void main() async {
|
||||
Request.setCookie();
|
||||
RequestUtils.syncHistoryStatus();
|
||||
|
||||
SmartDialog.config.toast = SmartConfigToast(
|
||||
displayType: SmartToastType.onlyRefresh,
|
||||
);
|
||||
SmartDialog.config.toast = SmartConfigToast(displayType: .onlyRefresh);
|
||||
|
||||
if (PlatformUtils.isMobile) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
SystemChrome.setEnabledSystemUIMode(.edgeToEdge);
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
systemNavigationBarColor: Colors.transparent,
|
||||
|
||||
@@ -5,19 +5,7 @@ class AccountMyInfoData {
|
||||
num? coins;
|
||||
String? birthday;
|
||||
String? face;
|
||||
int? faceNftNew;
|
||||
int? sex;
|
||||
int? level;
|
||||
int? rank;
|
||||
int? silence;
|
||||
int? emailStatus;
|
||||
int? telStatus;
|
||||
int? identification;
|
||||
int? isTourist;
|
||||
int? pinPrompting;
|
||||
int? inRegAudit;
|
||||
bool? hasFaceNft;
|
||||
bool? setBirthday;
|
||||
|
||||
AccountMyInfoData({
|
||||
this.mid,
|
||||
@@ -26,19 +14,7 @@ class AccountMyInfoData {
|
||||
this.coins,
|
||||
this.birthday,
|
||||
this.face,
|
||||
this.faceNftNew,
|
||||
this.sex,
|
||||
this.level,
|
||||
this.rank,
|
||||
this.silence,
|
||||
this.emailStatus,
|
||||
this.telStatus,
|
||||
this.identification,
|
||||
this.isTourist,
|
||||
this.pinPrompting,
|
||||
this.inRegAudit,
|
||||
this.hasFaceNft,
|
||||
this.setBirthday,
|
||||
});
|
||||
|
||||
factory AccountMyInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -49,18 +25,6 @@ class AccountMyInfoData {
|
||||
coins: json['coins'] as num?,
|
||||
birthday: json['birthday'] as String?,
|
||||
face: json['face'] as String?,
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
sex: json['sex'] as int?,
|
||||
level: json['level'] as int?,
|
||||
rank: json['rank'] as int?,
|
||||
silence: json['silence'] as int?,
|
||||
emailStatus: json['email_status'] as int?,
|
||||
telStatus: json['tel_status'] as int?,
|
||||
identification: json['identification'] as int?,
|
||||
isTourist: json['is_tourist'] as int?,
|
||||
pinPrompting: json['pin_prompting'] as int?,
|
||||
inRegAudit: json['in_reg_audit'] as int?,
|
||||
hasFaceNft: json['has_face_nft'] as bool?,
|
||||
setBirthday: json['set_birthday'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,86 +1,26 @@
|
||||
import 'package:PiliPlus/models_new/article/article_info/share_channel.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_info/stats.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class ArticleInfoData {
|
||||
int? like;
|
||||
bool? attention;
|
||||
bool? favorite;
|
||||
num? coin;
|
||||
Stats? stats;
|
||||
String? title;
|
||||
String? bannerUrl;
|
||||
int? mid;
|
||||
String? authorName;
|
||||
bool? isAuthor;
|
||||
List<String>? imageUrls;
|
||||
List<String>? originImageUrls;
|
||||
bool? shareable;
|
||||
bool? showLaterWatch;
|
||||
bool? showSmallWindow;
|
||||
bool? inList;
|
||||
int? pre;
|
||||
int? next;
|
||||
List<ShareChannel>? shareChannels;
|
||||
int? type;
|
||||
String? videoUrl;
|
||||
String? location;
|
||||
bool? disableShare;
|
||||
|
||||
ArticleInfoData({
|
||||
this.like,
|
||||
this.attention,
|
||||
this.favorite,
|
||||
this.coin,
|
||||
this.stats,
|
||||
this.title,
|
||||
this.bannerUrl,
|
||||
this.mid,
|
||||
this.authorName,
|
||||
this.isAuthor,
|
||||
this.imageUrls,
|
||||
this.originImageUrls,
|
||||
this.shareable,
|
||||
this.showLaterWatch,
|
||||
this.showSmallWindow,
|
||||
this.inList,
|
||||
this.pre,
|
||||
this.next,
|
||||
this.shareChannels,
|
||||
this.type,
|
||||
this.videoUrl,
|
||||
this.location,
|
||||
this.disableShare,
|
||||
});
|
||||
|
||||
factory ArticleInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleInfoData(
|
||||
like: json['like'] as int?,
|
||||
attention: json['attention'] as bool?,
|
||||
favorite: json['favorite'] as bool?,
|
||||
coin: json['coin'] as num?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
mid: json['mid'] as int?,
|
||||
authorName: json['author_name'] as String?,
|
||||
isAuthor: json['is_author'] as bool?,
|
||||
imageUrls: (json['image_urls'] as List?)?.fromCast(),
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(),
|
||||
shareable: json['shareable'] as bool?,
|
||||
showLaterWatch: json['show_later_watch'] as bool?,
|
||||
showSmallWindow: json['show_small_window'] as bool?,
|
||||
inList: json['in_list'] as bool?,
|
||||
pre: json['pre'] as int?,
|
||||
next: json['next'] as int?,
|
||||
shareChannels: (json['share_channels'] as List<dynamic>?)
|
||||
?.map((e) => ShareChannel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
type: json['type'] as int?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
location: json['location'] as String?,
|
||||
disableShare: json['disable_share'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class ShareChannel {
|
||||
String? name;
|
||||
String? picture;
|
||||
String? shareChannel;
|
||||
|
||||
ShareChannel({this.name, this.picture, this.shareChannel});
|
||||
|
||||
factory ShareChannel.fromJson(Map<String, dynamic> json) => ShareChannel(
|
||||
name: json['name'] as String?,
|
||||
picture: json['picture'] as String?,
|
||||
shareChannel: json['share_channel'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +1,20 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,67 +1,32 @@
|
||||
import 'package:PiliPlus/models_new/article/article_list/category.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/stats.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class ArticleListItemModel {
|
||||
int? id;
|
||||
String? title;
|
||||
int? state;
|
||||
int? publishTime;
|
||||
int? words;
|
||||
List<String>? imageUrls;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? summary;
|
||||
int? type;
|
||||
String? dynIdStr;
|
||||
int? attributes;
|
||||
int? authorUid;
|
||||
int? onlyFans;
|
||||
Stats? stats;
|
||||
int? likeState;
|
||||
|
||||
ArticleListItemModel({
|
||||
this.id,
|
||||
this.title,
|
||||
this.state,
|
||||
this.publishTime,
|
||||
this.words,
|
||||
this.imageUrls,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.summary,
|
||||
this.type,
|
||||
this.dynIdStr,
|
||||
this.attributes,
|
||||
this.authorUid,
|
||||
this.onlyFans,
|
||||
this.stats,
|
||||
this.likeState,
|
||||
});
|
||||
|
||||
factory ArticleListItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListItemModel(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
state: json['state'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
words: json['words'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.fromCast(),
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
summary: json['summary'] as String?,
|
||||
type: json['type'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
attributes: json['attributes'] as int?,
|
||||
authorUid: json['author_uid'] as int?,
|
||||
onlyFans: json['only_fans'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
likeState: json['like_state'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,21 +1,16 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/article.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/last.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_list/list.dart';
|
||||
|
||||
class ArticleListData {
|
||||
ArticleListInfo? list;
|
||||
List<ArticleListItemModel>? articles;
|
||||
Owner? author;
|
||||
Last? last;
|
||||
bool? attention;
|
||||
|
||||
ArticleListData({
|
||||
this.list,
|
||||
this.articles,
|
||||
this.author,
|
||||
this.last,
|
||||
this.attention,
|
||||
});
|
||||
|
||||
factory ArticleListData.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -31,9 +26,5 @@ class ArticleListData {
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['author'] as Map<String, dynamic>),
|
||||
last: json['last'] == null
|
||||
? null
|
||||
: Last.fromJson(json['last'] as Map<String, dynamic>),
|
||||
attention: json['attention'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
|
||||
Label({this.path, this.text, this.labelTheme});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/article/article_list/category.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class Last {
|
||||
int? id;
|
||||
String? title;
|
||||
int? state;
|
||||
int? publishTime;
|
||||
int? words;
|
||||
List<String>? imageUrls;
|
||||
Category? category;
|
||||
dynamic categories;
|
||||
String? summary;
|
||||
int? type;
|
||||
String? dynIdStr;
|
||||
int? attributes;
|
||||
int? authorUid;
|
||||
int? onlyFans;
|
||||
|
||||
Last({
|
||||
this.id,
|
||||
this.title,
|
||||
this.state,
|
||||
this.publishTime,
|
||||
this.words,
|
||||
this.imageUrls,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.summary,
|
||||
this.type,
|
||||
this.dynIdStr,
|
||||
this.attributes,
|
||||
this.authorUid,
|
||||
this.onlyFans,
|
||||
});
|
||||
|
||||
factory Last.fromJson(Map<String, dynamic> json) => Last(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
state: json['state'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
words: json['words'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.fromCast(),
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: json['categories'] as dynamic,
|
||||
summary: json['summary'] as String?,
|
||||
type: json['type'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
attributes: json['attributes'] as int?,
|
||||
authorUid: json['author_uid'] as int?,
|
||||
onlyFans: json['only_fans'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,54 +1,30 @@
|
||||
class ArticleListInfo {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? name;
|
||||
String? imageUrl;
|
||||
int? updateTime;
|
||||
int? ctime;
|
||||
int? publishTime;
|
||||
String? summary;
|
||||
int? words;
|
||||
int? read;
|
||||
int? articlesCount;
|
||||
int? state;
|
||||
String? reason;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
|
||||
ArticleListInfo({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.imageUrl,
|
||||
this.updateTime,
|
||||
this.ctime,
|
||||
this.publishTime,
|
||||
this.summary,
|
||||
this.words,
|
||||
this.read,
|
||||
this.articlesCount,
|
||||
this.state,
|
||||
this.reason,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
});
|
||||
|
||||
factory ArticleListInfo.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleListInfo(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
updateTime: json['update_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
summary: json['summary'] as String?,
|
||||
words: json['words'] as int?,
|
||||
read: json['read'] as int?,
|
||||
articlesCount: json['articles_count'] as int?,
|
||||
state: json['state'] as int?,
|
||||
reason: json['reason'] as String?,
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,32 +1,17 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,95 +1,28 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/category.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/media.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/ops.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/opus.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/stats.dart';
|
||||
import 'package:PiliPlus/models_new/article/article_view/tag.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class ArticleViewData {
|
||||
int? id;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? bannerUrl;
|
||||
int? templateId;
|
||||
int? state;
|
||||
Avatar? author;
|
||||
int? reprint;
|
||||
List<String>? imageUrls;
|
||||
int? publishTime;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
Stats? stats;
|
||||
List<Tag>? tags;
|
||||
int? words;
|
||||
List<String>? originImageUrls;
|
||||
dynamic list;
|
||||
bool? isLike;
|
||||
Media? media;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
int? original;
|
||||
int? actId;
|
||||
dynamic dispute;
|
||||
dynamic authenMark;
|
||||
int? coverAvid;
|
||||
dynamic topVideoInfo;
|
||||
int? type;
|
||||
int? checkState;
|
||||
int? originTemplateId;
|
||||
int? privatePub;
|
||||
dynamic contentPicList;
|
||||
String? content;
|
||||
String? keywords;
|
||||
int? versionId;
|
||||
String? dynIdStr;
|
||||
int? totalArtNum;
|
||||
ArticleOpus? opus;
|
||||
List<ArticleOps>? ops;
|
||||
|
||||
ArticleViewData({
|
||||
this.id,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.bannerUrl,
|
||||
this.templateId,
|
||||
this.state,
|
||||
this.author,
|
||||
this.reprint,
|
||||
this.imageUrls,
|
||||
this.publishTime,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.stats,
|
||||
this.tags,
|
||||
this.words,
|
||||
this.originImageUrls,
|
||||
this.list,
|
||||
this.isLike,
|
||||
this.media,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
this.original,
|
||||
this.actId,
|
||||
this.dispute,
|
||||
this.authenMark,
|
||||
this.coverAvid,
|
||||
this.topVideoInfo,
|
||||
this.type,
|
||||
this.checkState,
|
||||
this.originTemplateId,
|
||||
this.privatePub,
|
||||
this.contentPicList,
|
||||
this.content,
|
||||
this.keywords,
|
||||
this.versionId,
|
||||
this.dynIdStr,
|
||||
this.totalArtNum,
|
||||
this.opus,
|
||||
this.ops,
|
||||
});
|
||||
@@ -97,56 +30,14 @@ class ArticleViewData {
|
||||
factory ArticleViewData.fromJson(Map<String, dynamic> json) =>
|
||||
ArticleViewData(
|
||||
id: json['id'] as int?,
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
templateId: json['template_id'] as int?,
|
||||
state: json['state'] as int?,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Avatar.fromJson(json['author'] as Map<String, dynamic>),
|
||||
reprint: json['reprint'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.fromCast(),
|
||||
publishTime: json['publish_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
tags: (json['tags'] as List<dynamic>?)
|
||||
?.map((e) => Tag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
words: json['words'] as int?,
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(),
|
||||
list: json['list'] as dynamic,
|
||||
isLike: json['is_like'] as bool?,
|
||||
media: json['media'] == null
|
||||
? null
|
||||
: Media.fromJson(json['media'] as Map<String, dynamic>),
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
original: json['original'] as int?,
|
||||
actId: json['act_id'] as int?,
|
||||
dispute: json['dispute'] as dynamic,
|
||||
authenMark: json['authenMark'] as dynamic,
|
||||
coverAvid: json['cover_avid'] as int?,
|
||||
topVideoInfo: json['top_video_info'] as dynamic,
|
||||
type: json['type'] as int?,
|
||||
checkState: json['check_state'] as int?,
|
||||
originTemplateId: json['origin_template_id'] as int?,
|
||||
privatePub: json['private_pub'] as int?,
|
||||
contentPicList: json['content_pic_list'] as dynamic,
|
||||
content: json['content'] as String?,
|
||||
keywords: json['keywords'] as String?,
|
||||
versionId: json['version_id'] as int?,
|
||||
dynIdStr: json['dyn_id_str'] as String?,
|
||||
totalArtNum: json['total_art_num'] as int?,
|
||||
opus: json['opus'] == null
|
||||
? null
|
||||
: ArticleOpus.fromJson(json['opus'] as Map<String, dynamic>),
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
|
||||
Label({this.path, this.text, this.labelTheme});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
int? seasonId;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,9 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||
|
||||
class ArticleOpus {
|
||||
int? opusid;
|
||||
int? opussource;
|
||||
String? title;
|
||||
List<ArticleContentModel>? content;
|
||||
|
||||
ArticleOpus.fromJson(Map<String, dynamic> json) {
|
||||
opusid = json['opus_id'];
|
||||
opussource = json['opus_source'];
|
||||
title = json['title'];
|
||||
if (json['content']?['paragraphs'] case List list) {
|
||||
content = list.map((i) => ArticleContentModel.fromJson(i)).toList();
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Tag {
|
||||
int? tid;
|
||||
String? name;
|
||||
|
||||
Tag({this.tid, this.name});
|
||||
|
||||
factory Tag.fromJson(Map<String, dynamic> json) => Tag(
|
||||
tid: json['tid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -2,16 +2,14 @@ import 'package:PiliPlus/models_new/blacklist/list.dart';
|
||||
|
||||
class BlackListData {
|
||||
List<BlackListItem>? list;
|
||||
int? reVersion;
|
||||
int? total;
|
||||
|
||||
BlackListData({this.list, this.reVersion, this.total});
|
||||
BlackListData({this.list, this.total});
|
||||
|
||||
factory BlackListData.fromJson(Map<String, dynamic> json) => BlackListData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => BlackListItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
reVersion: json['re_version'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,61 +1,20 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class BlackListItem {
|
||||
int? mid;
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? uname;
|
||||
String? face;
|
||||
String? sign;
|
||||
int? faceNft;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
String? nftIcon;
|
||||
String? recReason;
|
||||
String? trackId;
|
||||
String? followTime;
|
||||
|
||||
BlackListItem({
|
||||
this.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
this.uname,
|
||||
this.face,
|
||||
this.sign,
|
||||
this.faceNft,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.nftIcon,
|
||||
this.recReason,
|
||||
this.trackId,
|
||||
this.followTime,
|
||||
});
|
||||
|
||||
factory BlackListItem.fromJson(Map<String, dynamic> json) => BlackListItem(
|
||||
mid: json['mid'] as int?,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
special: json['special'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
faceNft: json['face_nft'] as int?,
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
nftIcon: json['nft_icon'] as String?,
|
||||
recReason: json['rec_reason'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
followTime: json['follow_time'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/coin_log/list.dart';
|
||||
|
||||
class CoinLogData {
|
||||
List<CoinLogItem>? list;
|
||||
int? count;
|
||||
CoinLogData({this.list});
|
||||
|
||||
CoinLogData({this.list, this.count});
|
||||
List<CoinLogItem>? list;
|
||||
|
||||
factory CoinLogData.fromJson(Map<String, dynamic> json) => CoinLogData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => CoinLogItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
class CoinLogItem {
|
||||
final String time;
|
||||
final String delta;
|
||||
final String reason;
|
||||
|
||||
const CoinLogItem({
|
||||
required this.time,
|
||||
required this.delta,
|
||||
required this.reason,
|
||||
});
|
||||
|
||||
final String time;
|
||||
final String delta;
|
||||
final String reason;
|
||||
|
||||
factory CoinLogItem.fromJson(Map<String, dynamic> json) => CoinLogItem(
|
||||
time: json['time'],
|
||||
delta: (json['delta'] as num).toString(),
|
||||
|
||||
@@ -1,31 +1,13 @@
|
||||
class DanmakuPost {
|
||||
DanmakuPost({
|
||||
required this.action,
|
||||
required this.animation,
|
||||
required this.colorfulSrc,
|
||||
required this.dmContent,
|
||||
required this.dmid,
|
||||
required this.dmidStr,
|
||||
required this.visible,
|
||||
});
|
||||
|
||||
final String? action;
|
||||
final String? animation;
|
||||
final dynamic colorfulSrc;
|
||||
final String? dmContent;
|
||||
final int? dmid;
|
||||
final String? dmidStr;
|
||||
final bool? visible;
|
||||
|
||||
factory DanmakuPost.fromJson(Map<String, dynamic> json) {
|
||||
return DanmakuPost(
|
||||
action: json["action"],
|
||||
animation: json["animation"],
|
||||
colorfulSrc: json["colorful_src"],
|
||||
dmContent: json["dm_content"],
|
||||
dmid: json["dmid"],
|
||||
dmidStr: json["dmid_str"],
|
||||
visible: json["visible"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,12 @@ import 'package:PiliPlus/models_new/dynamic/dyn_mention/item.dart';
|
||||
|
||||
class MentionGroup {
|
||||
String? groupName;
|
||||
int? groupType;
|
||||
List<MentionItem>? items;
|
||||
|
||||
MentionGroup({this.groupName, this.groupType, this.items});
|
||||
MentionGroup({this.groupName, this.items});
|
||||
|
||||
factory MentionGroup.fromJson(Map<String, dynamic> json) => MentionGroup(
|
||||
groupName: json['group_name'] as String?,
|
||||
groupType: json['group_type'] as int?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MentionItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -4,14 +4,12 @@ class MentionItem with MultiSelectData {
|
||||
final String? face;
|
||||
final int? fans;
|
||||
final String? name;
|
||||
final int? officialVerifyType;
|
||||
final String? uid;
|
||||
|
||||
MentionItem({
|
||||
this.face,
|
||||
this.fans,
|
||||
this.name,
|
||||
this.officialVerifyType,
|
||||
this.uid,
|
||||
});
|
||||
|
||||
@@ -19,7 +17,6 @@ class MentionItem with MultiSelectData {
|
||||
face: json['face'] as String?,
|
||||
fans: json['fans'] as int?,
|
||||
name: json['name'] as String?,
|
||||
officialVerifyType: json['official_verify_type'] as int?,
|
||||
uid: json['uid'] as String?,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
class DynReserveData {
|
||||
int? finalBtnStatus;
|
||||
int? btnMode;
|
||||
int? reserveUpdate;
|
||||
String? descUpdate;
|
||||
String? toast;
|
||||
|
||||
DynReserveData({
|
||||
this.finalBtnStatus,
|
||||
this.btnMode,
|
||||
this.reserveUpdate,
|
||||
this.descUpdate,
|
||||
this.toast,
|
||||
});
|
||||
|
||||
factory DynReserveData.fromJson(Map<String, dynamic> json) => DynReserveData(
|
||||
finalBtnStatus: json['final_btn_status'] as int?,
|
||||
btnMode: json['btn_mode'] as int?,
|
||||
reserveUpdate: json['reserve_update'] as int?,
|
||||
descUpdate: json['desc_update'] as String?,
|
||||
toast: json['toast'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,48 +1,18 @@
|
||||
class ReserveInfoData {
|
||||
int? id;
|
||||
String? title;
|
||||
int? stime;
|
||||
int? etime;
|
||||
int? type;
|
||||
int? livePlanStartTime;
|
||||
int? lotteryType;
|
||||
String? lotteryId;
|
||||
int? subType;
|
||||
|
||||
ReserveInfoData({
|
||||
this.id,
|
||||
this.title,
|
||||
this.stime,
|
||||
this.etime,
|
||||
this.type,
|
||||
this.livePlanStartTime,
|
||||
this.lotteryType,
|
||||
this.lotteryId,
|
||||
this.subType,
|
||||
});
|
||||
|
||||
factory ReserveInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
ReserveInfoData(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
stime: json['stime'] as int?,
|
||||
etime: json['etime'] as int?,
|
||||
type: json['type'] as int?,
|
||||
livePlanStartTime: json['live_plan_start_time'] as int?,
|
||||
lotteryType: json['lottery_type'] as int?,
|
||||
lotteryId: json['lottery_id'] as String?,
|
||||
subType: json['sub_type'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'title': title,
|
||||
'stime': stime,
|
||||
'etime': etime,
|
||||
'type': type,
|
||||
'live_plan_start_time': livePlanStartTime,
|
||||
'lottery_type': lotteryType,
|
||||
'lottery_id': lotteryId,
|
||||
'sub_type': subType,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,17 +2,15 @@ import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/all_sort_by.dart';
|
||||
|
||||
class TopicSortByConf {
|
||||
List<AllSortBy>? allSortBy;
|
||||
int? defaultSortBy;
|
||||
int? showSortBy;
|
||||
|
||||
TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy});
|
||||
TopicSortByConf({this.allSortBy, this.showSortBy});
|
||||
|
||||
factory TopicSortByConf.fromJson(Map<String, dynamic> json) {
|
||||
return TopicSortByConf(
|
||||
allSortBy: (json['all_sort_by'] as List<dynamic>?)
|
||||
?.map((e) => AllSortBy.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
defaultSortBy: json['default_sort_by'] as int?,
|
||||
showSortBy: json['show_sort_by'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,32 +1,20 @@
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/new_topic.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_pub_search/page_info.dart';
|
||||
import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_item.dart';
|
||||
|
||||
class TopicPubSearchData {
|
||||
NewTopic? newTopic;
|
||||
bool? hasCreateJurisdiction;
|
||||
List<TopicItem>? topicItems;
|
||||
String? requestId;
|
||||
PageInfo? pageInfo;
|
||||
|
||||
TopicPubSearchData({
|
||||
this.newTopic,
|
||||
this.hasCreateJurisdiction,
|
||||
this.topicItems,
|
||||
this.requestId,
|
||||
this.pageInfo,
|
||||
});
|
||||
|
||||
factory TopicPubSearchData.fromJson(Map<String, dynamic> json) =>
|
||||
TopicPubSearchData(
|
||||
newTopic: json['new_topic'] == null
|
||||
? null
|
||||
: NewTopic.fromJson(json['new_topic'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
topicItems: (json['topic_items'] as List<dynamic>?)
|
||||
?.map((e) => TopicItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
requestId: json['request_id'] as String?,
|
||||
pageInfo: json['page_info'] == null
|
||||
? null
|
||||
: PageInfo.fromJson(json['page_info'] as Map<String, dynamic>),
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class NewTopic {
|
||||
String? name;
|
||||
|
||||
NewTopic({this.name});
|
||||
|
||||
factory NewTopic.fromJson(Map<String, dynamic> json) => NewTopic(
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
class PageInfo {
|
||||
int? offset;
|
||||
bool? hasMore;
|
||||
|
||||
PageInfo({this.offset, this.hasMore});
|
||||
PageInfo({this.hasMore});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
offset: json['offset'] as int?,
|
||||
hasMore: json['has_more'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,16 +4,10 @@ import 'package:PiliPlus/models_new/dynamic/dyn_topic_top/topic_item.dart';
|
||||
class TopDetails {
|
||||
TopicItem? topicItem;
|
||||
TopicCreator? topicCreator;
|
||||
bool? hasCreateJurisdiction;
|
||||
int? wordColor;
|
||||
bool? closePubLayerEntry;
|
||||
|
||||
TopDetails({
|
||||
this.topicItem,
|
||||
this.topicCreator,
|
||||
this.hasCreateJurisdiction,
|
||||
this.wordColor,
|
||||
this.closePubLayerEntry,
|
||||
});
|
||||
|
||||
factory TopDetails.fromJson(Map<String, dynamic> json) => TopDetails(
|
||||
@@ -23,8 +17,5 @@ class TopDetails {
|
||||
topicCreator: json['topic_creator'] == null
|
||||
? null
|
||||
: TopicCreator.fromJson(json['topic_creator'] as Map<String, dynamic>),
|
||||
hasCreateJurisdiction: json['has_create_jurisdiction'] as bool?,
|
||||
wordColor: json['word_color'] as int?,
|
||||
closePubLayerEntry: json['close_pub_layer_entry'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,14 +5,7 @@ class TopicItem {
|
||||
int discuss;
|
||||
int fav;
|
||||
int like;
|
||||
int? dynamics;
|
||||
String? jumpUrl;
|
||||
String? backColor;
|
||||
String? description;
|
||||
String? sharePic;
|
||||
String? shareUrl;
|
||||
int? ctime;
|
||||
bool? showInteractData;
|
||||
bool? isFav;
|
||||
bool? isLike;
|
||||
|
||||
@@ -23,14 +16,7 @@ class TopicItem {
|
||||
required this.discuss,
|
||||
required this.fav,
|
||||
required this.like,
|
||||
this.dynamics,
|
||||
this.jumpUrl,
|
||||
this.backColor,
|
||||
this.description,
|
||||
this.sharePic,
|
||||
this.shareUrl,
|
||||
this.ctime,
|
||||
this.showInteractData,
|
||||
this.isFav,
|
||||
this.isLike,
|
||||
});
|
||||
@@ -42,14 +28,7 @@ class TopicItem {
|
||||
discuss: json['discuss'] ?? 0,
|
||||
fav: json['fav'] ?? 0,
|
||||
like: json['like'] ?? 0,
|
||||
dynamics: json['dynamics'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
backColor: json['back_color'] as String?,
|
||||
description: json['description'] as String?,
|
||||
sharePic: json['share_pic'] as String?,
|
||||
shareUrl: json['share_url'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
isFav: json['is_fav'] as bool?,
|
||||
isLike: json['is_like'] as bool?,
|
||||
);
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
class Author {
|
||||
String? name;
|
||||
String? face;
|
||||
String? mid;
|
||||
|
||||
Author({this.name, this.face, this.mid});
|
||||
Author({this.name});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
mid: json['mid'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
int? width;
|
||||
int? height;
|
||||
|
||||
Cover({this.url, this.width, this.height});
|
||||
Cover({this.url});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,16 +3,10 @@ import 'package:PiliPlus/models_new/fav/fav_article/item.dart';
|
||||
class FavArticleData {
|
||||
List<FavArticleItemModel>? items;
|
||||
bool? hasMore;
|
||||
String? offset;
|
||||
String? updateNum;
|
||||
String? updateBaseline;
|
||||
|
||||
FavArticleData({
|
||||
this.items,
|
||||
this.hasMore,
|
||||
this.offset,
|
||||
this.updateNum,
|
||||
this.updateBaseline,
|
||||
});
|
||||
|
||||
factory FavArticleData.fromJson(Map<String, dynamic> json) => FavArticleData(
|
||||
@@ -20,8 +14,5 @@ class FavArticleData {
|
||||
?.map((e) => FavArticleItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
offset: json['offset'] as String?,
|
||||
updateNum: json['update_num'] as String?,
|
||||
updateBaseline: json['update_baseline'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,20 +3,16 @@ import 'package:PiliPlus/models_new/fav/fav_article/cover.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_article/stat.dart';
|
||||
|
||||
class FavArticleItemModel {
|
||||
String? jumpUrl;
|
||||
String? opusId;
|
||||
String? content;
|
||||
dynamic badge;
|
||||
Author? author;
|
||||
Cover? cover;
|
||||
Stat? stat;
|
||||
String? pubTime;
|
||||
|
||||
FavArticleItemModel({
|
||||
this.jumpUrl,
|
||||
this.opusId,
|
||||
this.content,
|
||||
this.badge,
|
||||
this.author,
|
||||
this.cover,
|
||||
this.stat,
|
||||
@@ -25,10 +21,8 @@ class FavArticleItemModel {
|
||||
|
||||
factory FavArticleItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FavArticleItemModel(
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
opusId: json['opus_id'] as String?,
|
||||
content: json['content'] as String?,
|
||||
badge: json['badge'] as dynamic,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
class Stat {
|
||||
String? view;
|
||||
String? like;
|
||||
|
||||
Stat({this.view, this.like});
|
||||
Stat({this.like});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
view: json['view'] as String?,
|
||||
like: json['like'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,41 +1,15 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? thumbDown;
|
||||
int? share;
|
||||
int? reply;
|
||||
int? danmaku;
|
||||
num? coin;
|
||||
int? vt;
|
||||
int? playSwitch;
|
||||
String? viewText1;
|
||||
|
||||
CntInfo({
|
||||
this.collect,
|
||||
this.play,
|
||||
this.thumbUp,
|
||||
this.thumbDown,
|
||||
this.share,
|
||||
this.reply,
|
||||
|
||||
this.danmaku,
|
||||
this.coin,
|
||||
this.vt,
|
||||
this.playSwitch,
|
||||
this.viewText1,
|
||||
});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
thumbDown: json['thumb_down'] as int?,
|
||||
share: json['share'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
vt: json['vt'] as int?,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
viewText1: json['view_text_1'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ class FavDetailData {
|
||||
FavFolderInfo? info;
|
||||
List<FavDetailItemModel>? medias;
|
||||
bool? hasMore;
|
||||
int? ttl;
|
||||
|
||||
FavDetailData({this.info, this.medias, this.hasMore, this.ttl});
|
||||
FavDetailData({this.info, this.medias, this.hasMore});
|
||||
|
||||
factory FavDetailData.fromJson(Map<String, dynamic> json) => FavDetailData(
|
||||
info: json['info'] == null
|
||||
@@ -17,6 +16,5 @@ class FavDetailData {
|
||||
?.map((e) => FavDetailItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
ttl: json['ttl'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||
|
||||
class FavDetailInfo {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Owner? upper;
|
||||
int? coverType;
|
||||
CntInfo? cntInfo;
|
||||
int? type;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? likeState;
|
||||
int? mediaCount;
|
||||
bool? isTop;
|
||||
|
||||
FavDetailInfo({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.cntInfo,
|
||||
this.type,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.likeState,
|
||||
this.mediaCount,
|
||||
this.isTop,
|
||||
});
|
||||
|
||||
factory FavDetailInfo.fromJson(Map<String, dynamic> json) => FavDetailInfo(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
type: json['type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
likeState: json['like_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -10,19 +10,14 @@ class FavDetailItemModel with MultiSelectData {
|
||||
String? title;
|
||||
String? cover;
|
||||
String? intro;
|
||||
int? page;
|
||||
int? duration;
|
||||
Owner? upper;
|
||||
int? attr;
|
||||
CntInfo? cntInfo;
|
||||
String? link;
|
||||
int? ctime;
|
||||
int? pubtime;
|
||||
int? favTime;
|
||||
String? bvid;
|
||||
Ogv? ogv;
|
||||
Ugc? ugc;
|
||||
String? mediaListLink;
|
||||
|
||||
FavDetailItemModel({
|
||||
this.id,
|
||||
@@ -30,19 +25,14 @@ class FavDetailItemModel with MultiSelectData {
|
||||
this.title,
|
||||
this.cover,
|
||||
this.intro,
|
||||
this.page,
|
||||
this.duration,
|
||||
this.upper,
|
||||
this.attr,
|
||||
this.cntInfo,
|
||||
this.link,
|
||||
this.ctime,
|
||||
this.pubtime,
|
||||
this.favTime,
|
||||
this.bvid,
|
||||
this.ogv,
|
||||
this.ugc,
|
||||
this.mediaListLink,
|
||||
});
|
||||
|
||||
factory FavDetailItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -52,7 +42,6 @@ class FavDetailItemModel with MultiSelectData {
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
intro: json['intro'] as String?,
|
||||
page: json['page'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
@@ -61,15 +50,11 @@ class FavDetailItemModel with MultiSelectData {
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
link: json['link'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
pubtime: json['pubtime'] as int?,
|
||||
favTime: json['fav_time'] as int?,
|
||||
bvid: json['bvid'] ?? json['bv_id'],
|
||||
ogv: json['ogv'] == null ? null : Ogv.fromJson(json['ogv']),
|
||||
ugc: json['ugc'] == null
|
||||
? null
|
||||
: Ugc.fromJson(json['ugc'] as Map<String, dynamic>),
|
||||
mediaListLink: json['media_list_link'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
class Ogv {
|
||||
String? typeName;
|
||||
int? typeId;
|
||||
int? seasonId;
|
||||
|
||||
Ogv({
|
||||
this.typeName,
|
||||
this.typeId,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory Ogv.fromJson(Map<String, dynamic> json) => Ogv(
|
||||
typeName: json['type_name'],
|
||||
typeId: json['type_id'],
|
||||
seasonId: json['season_id'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,42 +5,24 @@ class FavFolderInfo {
|
||||
int? fid;
|
||||
int mid;
|
||||
int attr;
|
||||
String? attrDesc;
|
||||
String title;
|
||||
String cover;
|
||||
Owner? upper;
|
||||
int? coverType;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int mediaCount;
|
||||
int? viewCount;
|
||||
bool? isTop;
|
||||
int? type;
|
||||
String? bvid;
|
||||
|
||||
FavFolderInfo({
|
||||
this.id = 0,
|
||||
this.fid,
|
||||
this.mid = 0,
|
||||
this.attr = -1,
|
||||
this.attrDesc,
|
||||
this.title = '',
|
||||
this.cover = '',
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.mediaCount = 0,
|
||||
this.viewCount,
|
||||
this.isTop,
|
||||
this.type,
|
||||
this.bvid,
|
||||
});
|
||||
|
||||
factory FavFolderInfo.fromJson(Map<String, dynamic> json) => FavFolderInfo(
|
||||
@@ -48,22 +30,13 @@ class FavFolderInfo {
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int? ?? 0,
|
||||
attr: json['attr'] as int? ?? 0,
|
||||
attrDesc: json['attr_desc'] as String?,
|
||||
title: json['title'] as String? ?? '',
|
||||
cover: json['cover'] as String? ?? '',
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
mediaCount: json['media_count'] as int? ?? 0,
|
||||
viewCount: json['view_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
type: json['type'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
class Arc {
|
||||
int? oid;
|
||||
String? bvid;
|
||||
String? pic;
|
||||
String? desc;
|
||||
int? status;
|
||||
int? oidType;
|
||||
int? aid;
|
||||
|
||||
Arc({
|
||||
this.oid,
|
||||
this.bvid,
|
||||
this.pic,
|
||||
this.desc,
|
||||
this.status,
|
||||
this.oidType,
|
||||
this.aid,
|
||||
});
|
||||
|
||||
factory Arc.fromJson(Map<String, dynamic> json) => Arc(
|
||||
oid: json['oid'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
pic: json['pic'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
status: json['status'] as int?,
|
||||
oidType: json['oid_type'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,18 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_note/list.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_note/page.dart';
|
||||
|
||||
class FavNoteData {
|
||||
List<FavNoteItemModel>? list;
|
||||
Page? page;
|
||||
|
||||
FavNoteData({this.list, this.page});
|
||||
FavNoteData({this.list});
|
||||
|
||||
factory FavNoteData.fromJson(Map<String, dynamic> json) => FavNoteData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FavNoteItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Page.fromJson(json['page'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Page {
|
||||
int? total;
|
||||
int? size;
|
||||
int? num;
|
||||
|
||||
Page({this.total, this.size, this.num});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
total: json['total'] as int?,
|
||||
size: json['size'] as int?,
|
||||
num: json['num'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Area {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Area({this.id, this.name});
|
||||
|
||||
factory Area.fromJson(Map<String, dynamic> json) => Area(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class BadgeInfo {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
BadgeInfo({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory BadgeInfo.fromJson(Map<String, dynamic> json) => BadgeInfo(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/content_attr.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/vip_or_pay.dart';
|
||||
|
||||
class BadgeInfos {
|
||||
ContentAttr? contentAttr;
|
||||
VipOrPay? vipOrPay;
|
||||
|
||||
BadgeInfos({this.contentAttr, this.vipOrPay});
|
||||
|
||||
factory BadgeInfos.fromJson(Map<String, dynamic> json) => BadgeInfos(
|
||||
contentAttr: json['content_attr'] == null
|
||||
? null
|
||||
: ContentAttr.fromJson(json['content_attr'] as Map<String, dynamic>),
|
||||
vipOrPay: json['vip_or_pay'] == null
|
||||
? null
|
||||
: VipOrPay.fromJson(json['vip_or_pay'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class CcOnLock {
|
||||
String? typeUrl;
|
||||
|
||||
CcOnLock({this.typeUrl});
|
||||
|
||||
factory CcOnLock.fromJson(Map<String, dynamic> json) => CcOnLock(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/cc_on_lock.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_hd.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_ott.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/highlight_ineffective_pink.dart';
|
||||
|
||||
class ConfigAttrs {
|
||||
CcOnLock? ccOnLock;
|
||||
HighlightIneffectiveHd? highlightIneffectiveHd;
|
||||
HighlightIneffectiveOtt? highlightIneffectiveOtt;
|
||||
HighlightIneffectivePink? highlightIneffectivePink;
|
||||
|
||||
ConfigAttrs({
|
||||
this.ccOnLock,
|
||||
this.highlightIneffectiveHd,
|
||||
this.highlightIneffectiveOtt,
|
||||
this.highlightIneffectivePink,
|
||||
});
|
||||
|
||||
factory ConfigAttrs.fromJson(Map<String, dynamic> json) => ConfigAttrs(
|
||||
ccOnLock: json['cc_on_lock'] == null
|
||||
? null
|
||||
: CcOnLock.fromJson(json['cc_on_lock'] as Map<String, dynamic>),
|
||||
highlightIneffectiveHd: json['highlight_ineffective_hd'] == null
|
||||
? null
|
||||
: HighlightIneffectiveHd.fromJson(
|
||||
json['highlight_ineffective_hd'] as Map<String, dynamic>,
|
||||
),
|
||||
highlightIneffectiveOtt: json['highlight_ineffective_ott'] == null
|
||||
? null
|
||||
: HighlightIneffectiveOtt.fromJson(
|
||||
json['highlight_ineffective_ott'] as Map<String, dynamic>,
|
||||
),
|
||||
highlightIneffectivePink: json['highlight_ineffective_pink'] == null
|
||||
? null
|
||||
: HighlightIneffectivePink.fromJson(
|
||||
json['highlight_ineffective_pink'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class ContentAttr {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
ContentAttr({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory ContentAttr.fromJson(Map<String, dynamic> json) => ContentAttr(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -2,18 +2,14 @@ import 'package:PiliPlus/models_new/fav/fav_pgc/list.dart';
|
||||
|
||||
class FavPgcData {
|
||||
List<FavPgcItemModel>? list;
|
||||
int? pn;
|
||||
int? ps;
|
||||
int? total;
|
||||
|
||||
FavPgcData({this.list, this.pn, this.ps, this.total});
|
||||
FavPgcData({this.list, this.total});
|
||||
|
||||
factory FavPgcData.fromJson(Map<String, dynamic> json) => FavPgcData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => FavPgcItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
pn: json['pn'] as int?,
|
||||
ps: json['ps'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
class FirstEpInfo {
|
||||
int? id;
|
||||
String? cover;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? pubTime;
|
||||
int? duration;
|
||||
|
||||
FirstEpInfo({
|
||||
this.id,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.pubTime,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory FirstEpInfo.fromJson(Map<String, dynamic> json) => FirstEpInfo(
|
||||
id: json['id'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
pubTime: json['pub_time'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class HighlightIneffectiveHd {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectiveHd({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectiveHd.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectiveHd(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class HighlightIneffectiveOtt {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectiveOtt({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectiveOtt.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectiveOtt(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class HighlightIneffectivePink {
|
||||
String? typeUrl;
|
||||
|
||||
HighlightIneffectivePink({this.typeUrl});
|
||||
|
||||
factory HighlightIneffectivePink.fromJson(Map<String, dynamic> json) {
|
||||
return HighlightIneffectivePink(
|
||||
typeUrl: json['type_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,208 +1,39 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/area.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/badge_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/badge_infos.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/config_attrs.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/first_ep_info.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/new_ep.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/producer.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/publish.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/rating.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/rights.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/section.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/series.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/stat.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class FavPgcItemModel with MultiSelectData {
|
||||
int? seasonId;
|
||||
int? mediaId;
|
||||
int? seasonType;
|
||||
String? seasonTypeName;
|
||||
String? title;
|
||||
String? cover;
|
||||
int? totalCount;
|
||||
int? isFinish;
|
||||
int? isStarted;
|
||||
int? isPlay;
|
||||
String? badge;
|
||||
int? badgeType;
|
||||
Rights? rights;
|
||||
Stat? stat;
|
||||
NewEp? newEp;
|
||||
Rating? rating;
|
||||
String? squareCover;
|
||||
int? seasonStatus;
|
||||
String? seasonTitle;
|
||||
String? badgeEp;
|
||||
int? mediaAttr;
|
||||
int? seasonAttr;
|
||||
String? evaluate;
|
||||
List<Area>? areas;
|
||||
String? subtitle;
|
||||
int? firstEp;
|
||||
int? canWatch;
|
||||
Series? series;
|
||||
Publish? publish;
|
||||
int? mode;
|
||||
List<Section>? section;
|
||||
String? url;
|
||||
BadgeInfo? badgeInfo;
|
||||
String? renewalTime;
|
||||
FirstEpInfo? firstEpInfo;
|
||||
int? formalEpCount;
|
||||
String? shortUrl;
|
||||
BadgeInfos? badgeInfos;
|
||||
String? seasonVersion;
|
||||
String? horizontalCover169;
|
||||
String? horizontalCover1610;
|
||||
String? subtitle14;
|
||||
int? viewableCrowdType;
|
||||
List<Producer>? producers;
|
||||
String? summary;
|
||||
List<String>? styles;
|
||||
ConfigAttrs? configAttrs;
|
||||
int? followStatus;
|
||||
int? isNew;
|
||||
String? progress;
|
||||
bool? bothFollow;
|
||||
String? subtitle25;
|
||||
|
||||
FavPgcItemModel({
|
||||
this.seasonId,
|
||||
this.mediaId,
|
||||
this.seasonType,
|
||||
this.seasonTypeName,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.totalCount,
|
||||
this.isFinish,
|
||||
this.isStarted,
|
||||
this.isPlay,
|
||||
this.badge,
|
||||
this.badgeType,
|
||||
this.rights,
|
||||
this.stat,
|
||||
this.newEp,
|
||||
this.rating,
|
||||
this.squareCover,
|
||||
this.seasonStatus,
|
||||
this.seasonTitle,
|
||||
this.badgeEp,
|
||||
this.mediaAttr,
|
||||
this.seasonAttr,
|
||||
this.evaluate,
|
||||
this.areas,
|
||||
this.subtitle,
|
||||
this.firstEp,
|
||||
this.canWatch,
|
||||
this.series,
|
||||
this.publish,
|
||||
this.mode,
|
||||
this.section,
|
||||
this.url,
|
||||
this.badgeInfo,
|
||||
this.renewalTime,
|
||||
this.firstEpInfo,
|
||||
this.formalEpCount,
|
||||
this.shortUrl,
|
||||
this.badgeInfos,
|
||||
this.seasonVersion,
|
||||
this.horizontalCover169,
|
||||
this.horizontalCover1610,
|
||||
this.subtitle14,
|
||||
this.viewableCrowdType,
|
||||
this.producers,
|
||||
this.summary,
|
||||
this.styles,
|
||||
this.configAttrs,
|
||||
this.followStatus,
|
||||
this.isNew,
|
||||
this.progress,
|
||||
this.bothFollow,
|
||||
this.subtitle25,
|
||||
});
|
||||
|
||||
factory FavPgcItemModel.fromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => FavPgcItemModel(
|
||||
seasonId: json['season_id'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
seasonType: json['season_type'] as int?,
|
||||
seasonTypeName: json['season_type_name'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
totalCount: json['total_count'] as int?,
|
||||
isFinish: json['is_finish'] as int?,
|
||||
isStarted: json['is_started'] as int?,
|
||||
isPlay: json['is_play'] as int?,
|
||||
badge: json['badge'] as String?,
|
||||
badgeType: json['badge_type'] as int?,
|
||||
rights: json['rights'] == null
|
||||
? null
|
||||
: Rights.fromJson(json['rights'] as Map<String, dynamic>),
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
newEp: json['new_ep'] == null
|
||||
? null
|
||||
: NewEp.fromJson(json['new_ep'] as Map<String, dynamic>),
|
||||
rating: json['rating'] == null
|
||||
? null
|
||||
: Rating.fromJson(json['rating'] as Map<String, dynamic>),
|
||||
squareCover: json['square_cover'] as String?,
|
||||
seasonStatus: json['season_status'] as int?,
|
||||
seasonTitle: json['season_title'] as String?,
|
||||
badgeEp: json['badge_ep'] as String?,
|
||||
mediaAttr: json['media_attr'] as int?,
|
||||
seasonAttr: json['season_attr'] as int?,
|
||||
evaluate: json['evaluate'] as String?,
|
||||
areas: (json['areas'] as List<dynamic>?)
|
||||
?.map((e) => Area.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
subtitle: json['subtitle'] as String?,
|
||||
firstEp: json['first_ep'] as int?,
|
||||
canWatch: json['can_watch'] as int?,
|
||||
series: json['series'] == null
|
||||
? null
|
||||
: Series.fromJson(json['series'] as Map<String, dynamic>),
|
||||
publish: json['publish'] == null
|
||||
? null
|
||||
: Publish.fromJson(json['publish'] as Map<String, dynamic>),
|
||||
mode: json['mode'] as int?,
|
||||
section: (json['section'] as List<dynamic>?)
|
||||
?.map((e) => Section.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
url: json['url'] as String?,
|
||||
badgeInfo: json['badge_info'] == null
|
||||
? null
|
||||
: BadgeInfo.fromJson(json['badge_info'] as Map<String, dynamic>),
|
||||
renewalTime: json['renewal_time'] as String?,
|
||||
firstEpInfo: json['first_ep_info'] == null
|
||||
? null
|
||||
: FirstEpInfo.fromJson(json['first_ep_info'] as Map<String, dynamic>),
|
||||
formalEpCount: json['formal_ep_count'] as int?,
|
||||
shortUrl: json['short_url'] as String?,
|
||||
badgeInfos: json['badge_infos'] == null
|
||||
? null
|
||||
: BadgeInfos.fromJson(json['badge_infos'] as Map<String, dynamic>),
|
||||
seasonVersion: json['season_version'] as String?,
|
||||
horizontalCover169: json['horizontal_cover_16_9'] as String?,
|
||||
horizontalCover1610: json['horizontal_cover_16_10'] as String?,
|
||||
subtitle14: json['subtitle_14'] as String?,
|
||||
viewableCrowdType: json['viewable_crowd_type'] as int?,
|
||||
producers: (json['producers'] as List<dynamic>?)
|
||||
?.map((e) => Producer.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
summary: json['summary'] as String?,
|
||||
styles: (json['styles'] as List?)?.fromCast(),
|
||||
configAttrs: json['config_attrs'] == null
|
||||
? null
|
||||
: ConfigAttrs.fromJson(json['config_attrs'] as Map<String, dynamic>),
|
||||
followStatus: json['follow_status'] as int?,
|
||||
isNew: json['is_new'] as int?,
|
||||
progress: json['progress'] == '' ? null : json['progress'],
|
||||
bothFollow: json['both_follow'] as bool?,
|
||||
subtitle25: json['subtitle_25'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class MultiImg {
|
||||
String? color;
|
||||
String? mediumRemind;
|
||||
|
||||
MultiImg({this.color, this.mediumRemind});
|
||||
|
||||
factory MultiImg.fromJson(Map<String, dynamic> json) => MultiImg(
|
||||
color: json['color'] as String?,
|
||||
mediumRemind: json['medium_remind'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,29 +1,11 @@
|
||||
class NewEp {
|
||||
int? id;
|
||||
String? indexShow;
|
||||
String? cover;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? pubTime;
|
||||
int? duration;
|
||||
|
||||
NewEp({
|
||||
this.id,
|
||||
this.indexShow,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.pubTime,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory NewEp.fromJson(Map<String, dynamic> json) => NewEp(
|
||||
id: json['id'] as int?,
|
||||
indexShow: json['index_show'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
pubTime: json['pub_time'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
class Producer {
|
||||
int? mid;
|
||||
int? type;
|
||||
int? isContribute;
|
||||
String? title;
|
||||
|
||||
Producer({this.mid, this.type, this.isContribute, this.title});
|
||||
|
||||
factory Producer.fromJson(Map<String, dynamic> json) => Producer(
|
||||
mid: json['mid'] as int?,
|
||||
type: json['type'] as int?,
|
||||
isContribute: json['is_contribute'] as int?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
class Publish {
|
||||
String? pubTime;
|
||||
String? pubTimeShow;
|
||||
String? releaseDate;
|
||||
String? releaseDateShow;
|
||||
|
||||
Publish({
|
||||
this.pubTime,
|
||||
this.pubTimeShow,
|
||||
this.releaseDate,
|
||||
this.releaseDateShow,
|
||||
});
|
||||
|
||||
factory Publish.fromJson(Map<String, dynamic> json) => Publish(
|
||||
pubTime: json['pub_time'] as String?,
|
||||
pubTimeShow: json['pub_time_show'] as String?,
|
||||
releaseDate: json['release_date'] as String?,
|
||||
releaseDateShow: json['release_date_show'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Rating {
|
||||
double? score;
|
||||
int? count;
|
||||
|
||||
Rating({this.score, this.count});
|
||||
|
||||
factory Rating.fromJson(Map<String, dynamic> json) => Rating(
|
||||
score: (json['score'] as num?)?.toDouble(),
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class Rights {
|
||||
int? allowReview;
|
||||
int? allowPreview;
|
||||
int? isSelection;
|
||||
int? selectionStyle;
|
||||
int? isRcmd;
|
||||
|
||||
Rights({
|
||||
this.allowReview,
|
||||
this.allowPreview,
|
||||
this.isSelection,
|
||||
this.selectionStyle,
|
||||
this.isRcmd,
|
||||
});
|
||||
|
||||
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
|
||||
allowReview: json['allow_review'] as int?,
|
||||
allowPreview: json['allow_preview'] as int?,
|
||||
isSelection: json['is_selection'] as int?,
|
||||
selectionStyle: json['selection_style'] as int?,
|
||||
isRcmd: json['is_rcmd'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class Section {
|
||||
int? sectionId;
|
||||
int? seasonId;
|
||||
int? limitGroup;
|
||||
int? watchPlatform;
|
||||
String? copyright;
|
||||
int? banAreaShow;
|
||||
List<int>? episodeIds;
|
||||
|
||||
Section({
|
||||
this.sectionId,
|
||||
this.seasonId,
|
||||
this.limitGroup,
|
||||
this.watchPlatform,
|
||||
this.copyright,
|
||||
this.banAreaShow,
|
||||
this.episodeIds,
|
||||
});
|
||||
|
||||
factory Section.fromJson(Map<String, dynamic> json) => Section(
|
||||
sectionId: json['section_id'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
limitGroup: json['limit_group'] as int?,
|
||||
watchPlatform: json['watch_platform'] as int?,
|
||||
copyright: json['copyright'] as String?,
|
||||
banAreaShow: json['ban_area_show'] as int?,
|
||||
episodeIds: (json['episode_ids'] as List?)?.fromCast(),
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class Series {
|
||||
int? seriesId;
|
||||
String? title;
|
||||
int? seasonCount;
|
||||
int? newSeasonId;
|
||||
int? seriesOrd;
|
||||
|
||||
Series({
|
||||
this.seriesId,
|
||||
this.title,
|
||||
this.seasonCount,
|
||||
this.newSeasonId,
|
||||
this.seriesOrd,
|
||||
});
|
||||
|
||||
factory Series.fromJson(Map<String, dynamic> json) => Series(
|
||||
seriesId: json['series_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
seasonCount: json['season_count'] as int?,
|
||||
newSeasonId: json['new_season_id'] as int?,
|
||||
seriesOrd: json['series_ord'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
class Stat {
|
||||
int? follow;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
num? coin;
|
||||
int? seriesFollow;
|
||||
int? seriesView;
|
||||
int? likes;
|
||||
int? favorite;
|
||||
|
||||
Stat({
|
||||
this.follow,
|
||||
this.view,
|
||||
this.danmaku,
|
||||
this.reply,
|
||||
this.coin,
|
||||
this.seriesFollow,
|
||||
this.seriesView,
|
||||
this.likes,
|
||||
this.favorite,
|
||||
});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
follow: json['follow'] as int?,
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
seriesFollow: json['series_follow'] as int?,
|
||||
seriesView: json['series_view'] as int?,
|
||||
likes: json['likes'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/fav/fav_pgc/multi_img.dart';
|
||||
|
||||
class VipOrPay {
|
||||
String? text;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? img;
|
||||
MultiImg? multiImg;
|
||||
|
||||
VipOrPay({
|
||||
this.text,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.img,
|
||||
this.multiImg,
|
||||
});
|
||||
|
||||
factory VipOrPay.fromJson(Map<String, dynamic> json) => VipOrPay(
|
||||
text: json['text'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
img: json['img'] as String?,
|
||||
multiImg: json['multi_img'] == null
|
||||
? null
|
||||
: MultiImg.fromJson(json['multi_img'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
class PageInfo {
|
||||
int? curPageNum;
|
||||
int? total;
|
||||
|
||||
PageInfo({this.curPageNum, this.total});
|
||||
PageInfo({this.total});
|
||||
|
||||
factory PageInfo.fromJson(Map<String, dynamic> json) => PageInfo(
|
||||
curPageNum: json['cur_page_num'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
class FavTopicItem {
|
||||
int? id;
|
||||
String? name;
|
||||
int? view;
|
||||
int? discuss;
|
||||
String? jumpUrl;
|
||||
String? statDesc;
|
||||
bool? showInteractData;
|
||||
|
||||
FavTopicItem({
|
||||
this.id,
|
||||
this.name,
|
||||
this.view,
|
||||
this.discuss,
|
||||
this.jumpUrl,
|
||||
this.statDesc,
|
||||
this.showInteractData,
|
||||
});
|
||||
|
||||
factory FavTopicItem.fromJson(Map<String, dynamic> json) => FavTopicItem(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
view: json['view'] as int?,
|
||||
discuss: json['discuss'] as int?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
statDesc: json['stat_desc'] as String?,
|
||||
showInteractData: json['show_interact_data'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,35 +3,22 @@ import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class FollowItemModel extends UpItem {
|
||||
int? attribute;
|
||||
int? mtime;
|
||||
dynamic tag;
|
||||
int? special;
|
||||
String? sign;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
String? followTime;
|
||||
|
||||
FollowItemModel({
|
||||
required super.mid,
|
||||
this.attribute,
|
||||
this.mtime,
|
||||
this.tag,
|
||||
this.special,
|
||||
super.uname,
|
||||
super.face,
|
||||
this.sign,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
this.followTime,
|
||||
});
|
||||
|
||||
factory FollowItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
FollowItemModel(
|
||||
mid: json['mid'] as int? ?? 0,
|
||||
attribute: json['attribute'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
tag: json['tag'] as dynamic,
|
||||
special: json['special'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
sign: json['sign'] as String?,
|
||||
@@ -40,9 +27,5 @@ class FollowItemModel extends UpItem {
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
followTime: json['follow_time'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
class Cursor {
|
||||
int? max;
|
||||
int? viewAt;
|
||||
String? business;
|
||||
int? ps;
|
||||
|
||||
Cursor({this.max, this.viewAt, this.business, this.ps});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
max: json['max'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
business: json['business'] as String?,
|
||||
ps: json['ps'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,18 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/history/cursor.dart';
|
||||
import 'package:PiliPlus/models_new/history/list.dart';
|
||||
import 'package:PiliPlus/models_new/history/tab.dart';
|
||||
|
||||
class HistoryData {
|
||||
Cursor? cursor;
|
||||
List<HistoryTab>? tab;
|
||||
List<HistoryItemModel>? list;
|
||||
|
||||
HistoryData({this.cursor, this.tab, this.list});
|
||||
HistoryData({this.tab, this.list});
|
||||
|
||||
factory HistoryData.fromJson(Map<String, dynamic> json) => HistoryData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
tab: (json['tab'] as List<dynamic>?)
|
||||
?.map((e) => HistoryTab.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -4,7 +4,6 @@ class History {
|
||||
String? bvid;
|
||||
int? page;
|
||||
int? cid;
|
||||
String? part;
|
||||
String? business;
|
||||
|
||||
History({
|
||||
@@ -13,7 +12,6 @@ class History {
|
||||
this.bvid,
|
||||
this.page,
|
||||
this.cid,
|
||||
this.part,
|
||||
this.business,
|
||||
});
|
||||
|
||||
@@ -23,7 +21,6 @@ class History {
|
||||
bvid: json['bvid'],
|
||||
page: json['page'],
|
||||
cid: json['cid'] == 0 ? null : json['cid'],
|
||||
part: json['part'],
|
||||
business: json['business'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,24 +4,18 @@ import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class HistoryItemModel with MultiSelectData {
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
List<String>? covers;
|
||||
String? uri;
|
||||
late History history;
|
||||
int? videos;
|
||||
String? authorName;
|
||||
String? authorFace;
|
||||
int? authorMid;
|
||||
int? viewAt;
|
||||
int? progress;
|
||||
String? badge;
|
||||
String? showTitle;
|
||||
int? duration;
|
||||
String? current;
|
||||
int? total;
|
||||
String? newDesc;
|
||||
int? isFinish;
|
||||
int? isFav;
|
||||
int? kid;
|
||||
String? tagName;
|
||||
@@ -29,24 +23,18 @@ class HistoryItemModel with MultiSelectData {
|
||||
|
||||
HistoryItemModel({
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.cover,
|
||||
this.covers,
|
||||
this.uri,
|
||||
required this.history,
|
||||
this.videos,
|
||||
this.authorName,
|
||||
this.authorFace,
|
||||
this.authorMid,
|
||||
this.viewAt,
|
||||
this.progress,
|
||||
this.badge,
|
||||
this.showTitle,
|
||||
this.duration,
|
||||
this.current,
|
||||
this.total,
|
||||
this.newDesc,
|
||||
this.isFinish,
|
||||
this.isFav,
|
||||
this.kid,
|
||||
this.tagName,
|
||||
@@ -56,7 +44,6 @@ class HistoryItemModel with MultiSelectData {
|
||||
factory HistoryItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
HistoryItemModel(
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
covers: (json['covers'] as List?)?.fromCast(),
|
||||
uri: json['uri'] as String?,
|
||||
@@ -65,17 +52,12 @@ class HistoryItemModel with MultiSelectData {
|
||||
: History.fromJson(json['history'] as Map<String, dynamic>),
|
||||
videos: json['videos'] as int?,
|
||||
authorName: json['author_name'] as String?,
|
||||
authorFace: json['author_face'] as String?,
|
||||
authorMid: json['author_mid'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
progress: json['progress'] as int?,
|
||||
badge: json['badge'] as String?,
|
||||
showTitle: json['show_title'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
current: json['current'] as String?,
|
||||
total: json['total'] as int?,
|
||||
newDesc: json['new_desc'] as String?,
|
||||
isFinish: json['is_finish'] as int?,
|
||||
isFav: json['is_fav'] as int?,
|
||||
kid: json['kid'] as int?,
|
||||
tagName: json['tag_name'] as String?,
|
||||
|
||||
@@ -2,24 +2,15 @@ import 'package:PiliPlus/models_new/later/season.dart';
|
||||
|
||||
class Bangumi {
|
||||
int? epId;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
Season? season;
|
||||
|
||||
Bangumi({
|
||||
this.epId,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.cover,
|
||||
this.season,
|
||||
});
|
||||
|
||||
factory Bangumi.fromJson(Map<String, dynamic> json) => Bangumi(
|
||||
epId: json['ep_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/later/bangumi.dart';
|
||||
import 'package:PiliPlus/models_new/later/page.dart';
|
||||
import 'package:PiliPlus/models_new/later/rights.dart';
|
||||
import 'package:PiliPlus/models_new/later/stat.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
|
||||
@@ -8,7 +7,6 @@ import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
|
||||
class LaterItemModel with MultiSelectData {
|
||||
int? aid;
|
||||
int? videos;
|
||||
String? pic;
|
||||
String? title;
|
||||
String? subtitle;
|
||||
@@ -18,7 +16,6 @@ class LaterItemModel with MultiSelectData {
|
||||
Rights? rights;
|
||||
Owner? owner;
|
||||
Stat? stat;
|
||||
List<Page>? pages;
|
||||
Bangumi? bangumi;
|
||||
int? cid;
|
||||
int? progress;
|
||||
@@ -26,13 +23,11 @@ class LaterItemModel with MultiSelectData {
|
||||
bool? isPgc;
|
||||
String? pgcLabel;
|
||||
bool? isPugv;
|
||||
int? seasonId;
|
||||
bool? isCharging;
|
||||
Dimension? dimension;
|
||||
|
||||
LaterItemModel({
|
||||
this.aid,
|
||||
this.videos,
|
||||
this.pic,
|
||||
this.title,
|
||||
this.subtitle,
|
||||
@@ -42,7 +37,6 @@ class LaterItemModel with MultiSelectData {
|
||||
this.rights,
|
||||
this.owner,
|
||||
this.stat,
|
||||
this.pages,
|
||||
this.bangumi,
|
||||
this.cid,
|
||||
this.progress,
|
||||
@@ -50,14 +44,12 @@ class LaterItemModel with MultiSelectData {
|
||||
this.isPgc,
|
||||
this.pgcLabel,
|
||||
this.isPugv,
|
||||
this.seasonId,
|
||||
this.isCharging,
|
||||
this.dimension,
|
||||
});
|
||||
|
||||
factory LaterItemModel.fromJson(Map<String, dynamic> json) => LaterItemModel(
|
||||
aid: json['aid'] as int?,
|
||||
videos: json['videos'] as int?,
|
||||
pic: json['pic'] as String?,
|
||||
title: json['title'] as String?,
|
||||
pubdate: json['pubdate'] as int?,
|
||||
@@ -72,9 +64,6 @@ class LaterItemModel with MultiSelectData {
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
pages: (json['pages'] as List<dynamic>?)
|
||||
?.map((e) => Page.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
bangumi: json['bangumi'] == null
|
||||
? null
|
||||
: Bangumi.fromJson(json['bangumi'] as Map<String, dynamic>),
|
||||
@@ -90,7 +79,6 @@ class LaterItemModel with MultiSelectData {
|
||||
isPgc: json['is_pgc'] as bool?,
|
||||
pgcLabel: json['pgc_label'] == '' ? null : json['pgc_label'],
|
||||
isPugv: json['is_pugv'] as bool?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
isCharging: json['charging_pay']?['level'] != null,
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
class Page {
|
||||
int? cid;
|
||||
int? page;
|
||||
int? duration;
|
||||
|
||||
Page({
|
||||
this.cid,
|
||||
this.page,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
cid: json['cid'] as int?,
|
||||
page: json['page'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,11 @@
|
||||
class Season {
|
||||
int? seasonId;
|
||||
String? title;
|
||||
|
||||
Season({
|
||||
this.seasonId,
|
||||
this.title,
|
||||
});
|
||||
|
||||
factory Season.fromJson(Map<String, dynamic> json) => Season(
|
||||
seasonId: json['season_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
class Stat {
|
||||
int? aid;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
|
||||
Stat({
|
||||
this.aid,
|
||||
this.view,
|
||||
this.danmaku,
|
||||
});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
aid: json['aid'] as int?,
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
);
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
||||
|
||||
class AreaList {
|
||||
int? id;
|
||||
String? name;
|
||||
int? parentAreaType;
|
||||
List<AreaItem>? areaList;
|
||||
|
||||
AreaList({this.id, this.name, this.parentAreaType, this.areaList});
|
||||
AreaList({this.name, this.areaList});
|
||||
|
||||
factory AreaList.fromJson(Map<String, dynamic> json) => AreaList(
|
||||
id: json['id'] as int?,
|
||||
name: json['name'] ?? '',
|
||||
parentAreaType: json['parent_area_type'] as int?,
|
||||
areaList: (json['area_list'] as List<dynamic>?)
|
||||
?.map((e) => AreaItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -4,7 +4,6 @@ class LiveContributionRankItem {
|
||||
int? uid;
|
||||
String? name;
|
||||
String? face;
|
||||
int? rank;
|
||||
int? score;
|
||||
UinfoMedal? uinfoMedal;
|
||||
|
||||
@@ -12,7 +11,6 @@ class LiveContributionRankItem {
|
||||
this.uid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.rank,
|
||||
this.score,
|
||||
this.uinfoMedal,
|
||||
});
|
||||
@@ -22,7 +20,6 @@ class LiveContributionRankItem {
|
||||
uid: json['uid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
rank: json['rank'] as int?,
|
||||
score: json['score'] as int?,
|
||||
uinfoMedal: json['uinfo']?['medal'] == null
|
||||
? null
|
||||
|
||||
@@ -10,11 +10,8 @@ class CardLiveItem {
|
||||
String? _systemCover;
|
||||
String? get systemCover => _systemCover ?? cover;
|
||||
String? title;
|
||||
int? liveTime;
|
||||
String? areaName;
|
||||
int? areaV2Id;
|
||||
String? areaV2Name;
|
||||
String? areaV2ParentName;
|
||||
int? areaV2ParentId;
|
||||
WatchedShow? watchedShow;
|
||||
|
||||
@@ -26,11 +23,8 @@ class CardLiveItem {
|
||||
this.cover,
|
||||
String? systemCover,
|
||||
this.title,
|
||||
this.liveTime,
|
||||
this.areaName,
|
||||
this.areaV2Id,
|
||||
this.areaV2Name,
|
||||
this.areaV2ParentName,
|
||||
this.areaV2ParentId,
|
||||
this.watchedShow,
|
||||
}) : _systemCover = noneNullOrEmptyString(systemCover);
|
||||
@@ -43,11 +37,8 @@ class CardLiveItem {
|
||||
cover: json['cover'] as String?,
|
||||
systemCover: json['system_cover'],
|
||||
title: json['title'] as String?,
|
||||
liveTime: json['live_time'] as int?,
|
||||
areaName: json['area_name'] as String?,
|
||||
areaV2Id: json['area_v2_id'] as int?,
|
||||
areaV2Name: json['area_v2_name'] as String?,
|
||||
areaV2ParentName: json['area_v2_parent_name'] as String?,
|
||||
areaV2ParentId: json['area_v2_parent_id'] as int?,
|
||||
watchedShow: json['watched_show'] == null
|
||||
? null
|
||||
|
||||
@@ -1,37 +1,25 @@
|
||||
class LiveFollowItem {
|
||||
int? roomid;
|
||||
int? uid;
|
||||
String? uname;
|
||||
String? title;
|
||||
String? face;
|
||||
int? liveStatus;
|
||||
String? areaName;
|
||||
String? areaNameV2;
|
||||
String? textSmall;
|
||||
String? roomCover;
|
||||
|
||||
LiveFollowItem({
|
||||
this.roomid,
|
||||
this.uid,
|
||||
this.uname,
|
||||
this.title,
|
||||
this.face,
|
||||
this.liveStatus,
|
||||
this.areaName,
|
||||
this.areaNameV2,
|
||||
this.textSmall,
|
||||
this.roomCover,
|
||||
});
|
||||
|
||||
factory LiveFollowItem.fromJson(Map<String, dynamic> json) => LiveFollowItem(
|
||||
roomid: json['roomid'] as int?,
|
||||
uid: json['uid'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
title: json['title'] as String?,
|
||||
face: json['face'] as String?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
areaName: json['area_name'] as String?,
|
||||
areaNameV2: json['area_name_v2'] as String?,
|
||||
textSmall: json['text_small'] as String?,
|
||||
roomCover: json['room_cover'] as String?,
|
||||
);
|
||||
|
||||
@@ -5,16 +5,12 @@ class MedalWallData {
|
||||
int? count;
|
||||
String? name;
|
||||
String? icon;
|
||||
int? uid;
|
||||
int? level;
|
||||
|
||||
MedalWallData({
|
||||
this.list,
|
||||
this.count,
|
||||
this.name,
|
||||
this.icon,
|
||||
this.uid,
|
||||
this.level,
|
||||
});
|
||||
|
||||
factory MedalWallData.fromJson(Map<String, dynamic> json) => MedalWallData(
|
||||
@@ -24,7 +20,5 @@ class MedalWallData {
|
||||
count: json['count'] as int?,
|
||||
name: json['name'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
uid: json['uid'] as int?,
|
||||
level: json['level'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,35 +1,20 @@
|
||||
class RoomInfo {
|
||||
int? uid;
|
||||
int? roomId;
|
||||
String? title;
|
||||
String? cover;
|
||||
int? liveStatus;
|
||||
int? liveStartTime;
|
||||
int? online;
|
||||
String? appBackground;
|
||||
String? subSessionKey;
|
||||
|
||||
RoomInfo({
|
||||
this.uid,
|
||||
this.roomId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.liveStatus,
|
||||
this.liveStartTime,
|
||||
this.online,
|
||||
this.appBackground,
|
||||
this.subSessionKey,
|
||||
});
|
||||
|
||||
factory RoomInfo.fromJson(Map<String, dynamic> json) => RoomInfo(
|
||||
uid: json['uid'] as int?,
|
||||
roomId: json['room_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
liveStartTime: json['live_start_time'] as int?,
|
||||
online: json['online'] as int?,
|
||||
appBackground: json['app_background'] as String?,
|
||||
subSessionKey: json['sub_session_key'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,39 +2,24 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class CodecItem {
|
||||
String? codecName;
|
||||
int? currentQn;
|
||||
List<int>? acceptQn;
|
||||
String? baseUrl;
|
||||
List<UrlInfo>? urlInfo;
|
||||
dynamic hdrQn;
|
||||
int? dolbyType;
|
||||
String? attrName;
|
||||
int? hdrType;
|
||||
|
||||
CodecItem({
|
||||
this.codecName,
|
||||
this.currentQn,
|
||||
this.acceptQn,
|
||||
this.baseUrl,
|
||||
this.urlInfo,
|
||||
this.hdrQn,
|
||||
this.dolbyType,
|
||||
this.attrName,
|
||||
this.hdrType,
|
||||
});
|
||||
|
||||
factory CodecItem.fromJson(Map<String, dynamic> json) => CodecItem(
|
||||
codecName: json['codec_name'] as String?,
|
||||
currentQn: json['current_qn'] as int?,
|
||||
acceptQn: (json['accept_qn'] as List?)?.fromCast(),
|
||||
baseUrl: json['base_url'] as String?,
|
||||
urlInfo: (json['url_info'] as List<dynamic>?)
|
||||
?.map((e) => UrlInfo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hdrQn: json['hdr_qn'] as dynamic,
|
||||
dolbyType: json['dolby_type'] as int?,
|
||||
attrName: json['attr_name'] as String?,
|
||||
hdrType: json['hdr_type'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user