Compare commits

..

576 Commits

Author SHA1 Message Date
dom
0504011ba0 Release 2.0.0
Signed-off-by: dom <githubaccount56556@proton.me>
2026-03-03 10:54:58 +08:00
dom
dc9d4f9eed upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-03-03 09:56:48 +08:00
dom
187c92d691 flutter 3.41.3
Signed-off-by: dom <githubaccount56556@proton.me>
2026-03-03 09:55:59 +08:00
dom
9c7b18710c refa persistent header & dynamic sliver appbar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-03-03 09:44:29 +08:00
dom
1dbc54f063 opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-03-02 10:31:16 +08:00
My-Responsitories
348bc8b920 opt: set repeat ui (#1854) 2026-03-01 20:38:03 +08:00
dom
a375d8525f upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-28 18:12:52 +08:00
dom
e3e423f9b1 fix app scheme
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-28 18:06:01 +08:00
NLsdt
62048992be chore(ci): upgrade upload-artifact to v7 and set archive options (#1852) 2026-02-28 13:31:45 +08:00
dom
ec9498a2ca fix profile actions constraints
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-28 12:04:05 +08:00
dom
1d35abef63 fixes
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-27 18:15:34 +08:00
dom
889f6d01c2 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-27 16:03:56 +08:00
dom
d9c47be2a9 opt chat list
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-27 15:55:40 +08:00
dom
cf44036589 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-27 15:52:14 +08:00
My-Responsitories
7276cde48a refa player (#1848)
* tweak

* Reapply "opt: audio uri" (#1833)

This reverts commit 8e726f49b2.

* opt: player

* opt: player

* refa: create player

* refa: player

* opt: UaType

* fix: sb seek preview

* opt: setSub

* fix: screenshot

* opt: unnecessary final player state

* opt: player track

* opt FileSource constructor [skip ci]

* fixes

* fix: dispose player

* fix: quote

* update

* fix: multi ua & remove unused loop

* remove unneeded check [skip ci]

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-27 15:51:55 +08:00
My-Responsitories
6782bee11a opt: HeaderLayout with SlottedMultiChild (#1850)
* opt: HeaderLayout with SlottedMultiChild

* ordered

* update [skip ci]
2026-02-27 14:40:17 +08:00
barmxds6ch
b55e102dc3 feat(whisper): add uploader message attachment display (#1849)
* feat(whisper): add uploader message attachment display

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-27 10:56:44 +08:00
dom
65ad8a0fdc opt anim
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-26 21:26:28 +08:00
dom
fdb3bf3edc opt member profile
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-26 16:59:51 +08:00
dom
95506ad896 tweak
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-26 14:06:34 +08:00
dom
348b2533dc opt image gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-26 10:05:06 +08:00
dom
2bdab71138 opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-25 18:02:36 +08:00
My-Responsitories
e707764f84 tweaks (#1846)
* opt: live extra

* opt: remove addPointer

* opt: use ssd

* opt: cache svg

* opt: localToGlobal

* opt: disabled icon

* opt: onVideoDetailChange switch

* fix

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-25 18:01:43 +08:00
dom
4a3d827f7a opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-24 21:48:42 +08:00
dom
e88cd12dfa opt refresh
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-24 12:17:18 +08:00
dom
ee04978e0c opt scrollPhysics
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-23 12:03:35 +08:00
dom
d15ad4911d upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-23 11:53:26 +08:00
dom
14b6c115b5 opt refresh
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-23 11:44:39 +08:00
dom
ee188da6b0 opt scrollPhysics
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-22 20:45:06 +08:00
dom
998b70cd87 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-22 16:47:51 +08:00
dom
7563a52bed opt refresh
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-22 15:51:57 +08:00
dom
7e81fae2bc fix jump to item
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-22 15:22:12 +08:00
dom
639dfac8af build
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-21 21:13:47 +08:00
dom
d8950adb64 opt player bottom bar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-21 19:50:51 +08:00
dom
9092db86ca upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-21 18:54:22 +08:00
My-Responsitories
d7d9655f81 opt: RepaintBoundary (#1840)
* opt: RepaintBoundary

* fix [skip ci]

* opt time width

* opt: video position

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-20 21:04:34 +08:00
dom
a63ca93762 flutter 3.41.2
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-20 12:00:54 +08:00
dom
243178c112 format
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-20 12:00:54 +08:00
Just_A_Pony
dcb3a02da8 allow user to configure window decorations(CSD/SSD) (#1839)
* allow user to configure window decorations(CSD/SSD)

* rename piliplus.desktop
to com.example.piliplus.desktop

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-20 11:46:25 +08:00
Starfallen
b1c0eca328 fix(player): clamp loudnorm parameters to valid FFmpeg ranges (#1838)
- Define Integrated True Peak (TP) boundary constants.
- Use .clamp() in Volume.format to ensure parameters stay within [-9, 0] for 'TP'.
- Prevents FFmpeg filter errors when video metadata contains very low peak values (e.g., TP = -22).
2026-02-19 15:31:29 +08:00
dom
e3a1eb5c87 opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-19 15:12:29 +08:00
dom
736478b1c5 fix patch
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-19 13:33:05 +08:00
dom
12919804dc mouse cursor patch
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-19 12:23:20 +08:00
dom
888b3d8173 remove unused val
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-19 10:45:57 +08:00
dom
1e6b0f0b53 opt hide bottom bar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-19 10:33:40 +08:00
dom
aa3e5a4737 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 23:12:03 +08:00
dom
3f3d54fd27 add bar hide type
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 21:41:15 +08:00
dom
a142b15344 fix hide bottom bar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 18:33:33 +08:00
dom
651e79ce26 opt handle scroll
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 18:16:22 +08:00
dom
9b93ce84ab upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 17:44:46 +08:00
dom
dfa258b9e6 opt hide top/bottom bar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-18 17:36:11 +08:00
dom
a5efca4e1f upgrade dep
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-17 18:35:03 +08:00
dom
1fe84d1d34 Revert "disable windows thread merging"
This reverts commit bebf34db23.
2026-02-17 18:35:03 +08:00
dom
b978ff5649 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-17 18:34:58 +08:00
dom
fa85ae47ac gitignore
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-16 10:22:03 +08:00
dom
3209ecd0ba opt image recognizer
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-15 22:19:54 +08:00
dom
807de41ff0 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-15 21:43:51 +08:00
dom
d273e72a44 opt image viewer
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-15 19:14:17 +08:00
dom
2c0597175d opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-15 17:16:24 +08:00
My-Responsitories
85292a3df2 opt: image viewer (#1837)
* opt: image

* opt: MatrixTransition

* update


---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-15 17:13:55 +08:00
dom
9c7c6f9e4e tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-15 10:47:20 +08:00
Gujial
511ff71f5f opt share video link (#1835)
* feat: share video with current time position preference

* simplify


---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-14 21:16:47 +08:00
систем
e104982246 handle Cmd+Q on macOS (#1834)
* feat(video): add Pref.keyboardControl check &  support in video page

- 在 player_focus 处理按键事件前增加 Pref.keyboardControl 检查,允许禁用键盘快捷键
- 修复 Cmd+Q 事件被 Q 键逻辑拦截导致无法退出的问题

* Update player_focus.dart
2026-02-14 21:01:34 +08:00
dom
e7e79eb62a opt image preview
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 18:26:31 +08:00
dom
352e314ee1 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 18:26:31 +08:00
dom
e9dafbc227 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 12:03:28 +08:00
dom
96727469ac build
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 12:03:28 +08:00
dom
c70c9829c0 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 12:03:18 +08:00
dom
beb7eb1aea refa image preview
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-14 11:03:02 +08:00
My-Responsitories
8e726f49b2 Revert "opt: audio uri" (#1833)
This reverts commit 78739d9c0a.
2026-02-13 20:36:51 +08:00
dom
007375371e revert new overscrollindicator
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 17:39:26 +08:00
dom
6d79551566 fix updateTicker
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 15:27:10 +08:00
dom
483953cf56 sync flutter widgets
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 13:44:55 +08:00
dom
fbf7116edf fix modal barrier patch
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 11:14:51 +08:00
dom
6c164d81e3 use TickerMode.getValuesNotifier
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:30:40 +08:00
dom
d0789734ec fix get icon assets
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:20:11 +08:00
dom
f3bd305337 use findItemIndexCallback
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:15:19 +08:00
dom
5ab7000716 platform assets
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:12:08 +08:00
dom
dc1c33f086 adapt RadioClient
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:12:08 +08:00
dom
920c51100a flutter 3.41.0
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:12:08 +08:00
dom
05a385d69e tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-12 10:12:08 +08:00
My-Responsitories
9411785d26 opt: PlPlayerController (#1832)
* opt: audio uri

* opt: PlPlayerController
2026-02-10 16:33:02 +08:00
My-Responsitories
ed2bd069ee opt: segment (#1831)
* opt: segment

* revert: block config
2026-02-10 16:13:38 +08:00
My-Responsitories
0460030a2b feat: tempPlayerConf add playRepeat (#1830) 2026-02-09 18:16:45 +08:00
My-Responsitories
7e570d11d8 fix: live dm 2026-02-09 16:43:21 +08:00
dom
32cd3209d0 opt init recognizer
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-09 09:55:01 +08:00
dom
0cb07aef1c audio block
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-08 23:35:58 +08:00
dom
0c65605ac0 audio sschedule shutdown
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-08 20:51:13 +08:00
My-Responsitories
8234b7ac92 opt: matrix anim (#1829) 2026-02-08 15:27:03 +08:00
dom
4ac855d393 Release 1.1.6
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 16:43:37 +08:00
dom
7381939c0f upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 16:43:37 +08:00
dom
a380bcd96a tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 12:38:52 +08:00
dom
d253ef468b tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 11:39:23 +08:00
систем
e8145ef65a fix: initialize controller before super (#1827) 2026-02-07 11:32:02 +08:00
dom
0c175abc0b opt image physics
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 10:55:00 +08:00
dom
946a5a1e47 opt image gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 10:40:21 +08:00
dom
29e7e0e556 feat: vertical tabbar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 09:28:02 +08:00
dom
cc1704a021 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-07 09:25:23 +08:00
My-Responsitories
7ab2cf973f tweaks (#1826)
* opt: dataStatus

* tweaks

* opt: ui

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-06 14:25:45 +08:00
dom
32386bf146 fix check bottom bar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-06 12:52:35 +08:00
dom
40269da391 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-06 12:34:08 +08:00
dom
42e082bbc6 scroll to current rank
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-06 11:39:31 +08:00
dom
1ad710c1cf opt settings
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-06 10:48:36 +08:00
dom
cfa925549e tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-05 16:54:27 +08:00
dom
ca387787b3 opt handle reply note
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-05 11:19:36 +08:00
dom
29a9b22c29 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-05 11:18:17 +08:00
dom
672375b925 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-04 19:54:44 +08:00
wuhenzha
c099738802 fix: respect title bar setting after exiting PiP (#1825) 2026-02-04 19:50:52 +08:00
dom
50561b8dc1 opt persist header
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-03 18:28:06 +08:00
dom
2596859778 custom dyn text menu
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-03 10:21:34 +08:00
dom
3d453bafdb modal barrier patch
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-03 10:21:34 +08:00
систем
18e0b93ca7 feat: add copy/move support to fav/later search results (#1822)
* feat: add copy/move support to fav/later search results

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-03 10:21:01 +08:00
My-Responsitories
7260a387f9 tweaks (#1821)
* opt: _onTapUp

* opt: set contains

* opt: elementAtOrNull
2026-02-02 20:12:12 +08:00
dom
37fa165f59 opt pip
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-01 17:06:21 +08:00
dom
8f08104f37 upgrade dep
Signed-off-by: dom <githubaccount56556@proton.me>
2026-02-01 11:57:13 +08:00
lesetong
6ee4deab05 Fix duplicate items in Up list when showAllUp is enabled. (#1819)
Overrode UpItem's == operator and hashCode using 'mid' to prevent
redundant entries.
2026-02-01 00:18:18 +08:00
My-Responsitories
77fff92939 opt: binary search fontsize (#1818)
* opt: permission

* opt: opt: binary search fontsize

* use transform

Signed-off-by: dom <githubaccount56556@proton.me>

* fix

Signed-off-by: dom <githubaccount56556@proton.me>

* opt: matrix

* opt [skip ci]

* tweaks [skip ci]

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-02-01 00:01:34 +08:00
dom
8964197b73 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-31 13:20:51 +08:00
dom
dbc7bcd0dd upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-31 13:20:51 +08:00
dom
207ad2753c opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-30 15:16:22 +08:00
My-Responsitories
d6e6e52df2 tweaks (#1816)
* opt: getFileName

* opt: audio-pitch-correction

* opt: spring dialog

* opt: account dialog

* update [skip ci]

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-30 10:31:26 +08:00
систем
9442b17d63 opt select account (#1815)
* feat: switchAccountDialog pages simple-detaile

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-29 22:06:10 +08:00
dom
058ff44e39 opt autosync
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 19:35:50 +08:00
dom
48c7dc0eed custom autosync
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 18:12:08 +08:00
dom
99634a66ab tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 18:12:03 +08:00
nakixii
21fad89cde Add autosync property with value '30' (#1813) 2026-01-29 15:22:00 +08:00
dom
5979ddb60c tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 14:55:16 +08:00
dom
bcbfe5c849 SpringDescription with duration
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 12:35:58 +08:00
dom
1640732f5d opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 12:35:58 +08:00
dom
9567910611 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 10:24:16 +08:00
dom
d1713504a0 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-29 10:16:16 +08:00
dom
bce73d9f16 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-28 15:46:06 +08:00
dom
6f30d2e331 opt reply
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-28 12:37:21 +08:00
dom
556bda0d68 opt video intro
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-28 11:46:47 +08:00
dom
9d5eb55e26 upgrade dep
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-28 11:46:42 +08:00
dom
110469961d opt video scheme
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-27 11:40:00 +08:00
dom
fa348db7c5 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-27 11:19:49 +08:00
dom
3eac565b5e fix slide
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-26 14:52:49 +08:00
dom
af40e489bc opt ao
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-26 14:38:48 +08:00
dom
361eb4c614 opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-26 14:15:47 +08:00
dom
7ace981f24 upgrade dep
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-26 14:15:47 +08:00
My-Responsitories
bfb2becb2d opt: ao (#1811)
* opt: ao

* multi select

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-26 14:11:48 +08:00
My-Responsitories
038f03a4e7 tweaks (#1810)
* tweak

* opt: image quality

* opt: VideoPlayerServiceHandler

* fixes

* update

Signed-off-by: dom <githubaccount56556@proton.me>

* fix get file name

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-25 15:21:33 +08:00
dom
219228f8b5 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-25 11:59:17 +08:00
dom
1f64de5954 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-25 11:59:17 +08:00
dom
e9b5cffa91 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-25 11:59:12 +08:00
dom
68872f7b14 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-24 16:23:14 +08:00
dom
bd158619a4 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-24 15:40:21 +08:00
dom
310f497c30 opt slide
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-24 15:20:01 +08:00
dom
30ee413852 fix web rcmd
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-24 13:45:30 +08:00
dom
0ab07a713e tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-24 13:45:25 +08:00
My-Responsitories
7eaf05839a fixes (#1809)
* Revert "opt gesture"

This reverts commit bd97f9a500.

* revert: late init

* update [skip ci]

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-24 11:46:00 +08:00
该昵称己被占用_
777c3c2278 fix typo (#1808)
把中文段落中的“, ”改为“,”。
2026-01-24 11:45:44 +08:00
dom
b9b54ce4f7 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-23 13:08:32 +08:00
dom
92e5fae29c opt pop
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-22 12:35:34 +08:00
dom
05e8ded86a upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-21 21:32:15 +08:00
dom
7a65b777c9 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-21 21:32:10 +08:00
dom
0b1f6c4d0e tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-21 13:38:10 +08:00
My-Responsitories
923af32c96 tweaks (#1806)
* opt: nonnull case

* fix: ImageGrid

* opt: distanceSquared
2026-01-21 13:34:44 +08:00
dom
4eae7e698f opt live border indicator
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-20 15:13:32 +08:00
dom
5a61dbe30c opt emoji tooltip
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-20 15:13:32 +08:00
dom
036dbcaf21 opt image grid
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-20 15:13:32 +08:00
dom
bd97f9a500 opt gesture
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-20 15:13:32 +08:00
dom
33278a74b2 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-20 15:13:27 +08:00
dom
397f887b91 fix video progress indicator
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 12:21:25 +08:00
dom
ebe793ccfc fix progress behavior
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 12:12:54 +08:00
dom
68464e4e34 refa: segment progressbar
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 11:39:25 +08:00
dom
395893fc7d refa: video progress indicator
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 11:38:28 +08:00
dom
f5657d2d4c refa custom painter
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 11:38:27 +08:00
dom
a3ddc83430 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 11:37:45 +08:00
dom
d2f8aff421 opt ui
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-19 11:37:33 +08:00
My-Responsitories
25148509d2 opt: aaudio (#1805)
* opt: aaudio
2026-01-18 09:29:34 +08:00
dom
2879d0dc00 upgrade deps
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-15 16:41:23 +08:00
dom
90349189ee fix image grid
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-15 16:41:23 +08:00
dom
bdc524e486 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-15 16:41:17 +08:00
dom
cb58822009 feat: edit dyn
feat: set pub setting

feat: set reply interaction

Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-15 15:03:19 +08:00
dom
4a2679a589 opt scale
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-11 21:40:25 +08:00
dom
09bd1edeb3 tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-11 15:27:10 +08:00
KoishiMoe
00da3c4a0e fix: ipa can't be installed by altstore/sidestore (#1803) 2026-01-11 10:46:18 +08:00
My-Responsitories
c40d794180 tweaks (#1802)
* opt: uuid

* tweak

* opt: SlideDialog

* mod: fvmrc [skip ci]

* Revert "mod: fvmrc [skip ci]"

This reverts commit 500fd7f454.

* Revert "opt: SlideDialog"

This reverts commit b435a312a6.

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-11 10:45:51 +08:00
dom
34a839d9e2 fix menu position
fix sc

opt ui

Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-10 18:04:30 +08:00
dom
f06d0605ce fix chat panel container
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-10 12:38:15 +08:00
dom
ef975de624 mark deleted sc
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-10 11:47:40 +08:00
dom
d10c737a38 show img menu
opt img placeholder

opt player gesture

opt pref

tweaks

Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-10 10:21:06 +08:00
s
28b69a06fa feat: Add desktop scaling and fix linux postinst (#1800)
* fix: resolve Linux window close handler to prevent app hang

- Add delete-event callback that properly quits the application when window is closed

* feat: Add desktop scaling and fix linux postinst

- Implement desktop interface scaling in main.dart using FittedBox.
- Add desktop scaling setting UI.
- Add desktopScale to storage preference.
- Fix typos and logic in Linux postinst script.
- Update piliplus.desktop with StartupWMClass.

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Signed-off-by: Shao Guohao <shao.gh.98@gmail.com>
Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-10 10:03:51 +08:00
dom
069cf555ea bump flutter
Signed-off-by: dom <githubaccount56556@proton.me>
2026-01-09 11:48:04 +08:00
KoishiMoe
836ab311d6 feat: add option to turn off dynamic interactions (#1798)
* add option to turn off dynamic interactions

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-09 11:35:47 +08:00
KoishiMoe
dbc11c36df fix: permission dialog (#1799)
* don't request photo permission on A13+

saving to system album requires no additional permission

* fix permission dialog

* update

Signed-off-by: dom <githubaccount56556@proton.me>

---------

Co-authored-by: dom <githubaccount56556@proton.me>
2026-01-09 11:07:39 +08:00
Kofua
fffce10b31 update sponsor block api (#1797)
* update sponsor block api

* update

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-08 11:33:07 +08:00
dom
de85e82bfa Update build.yml 2026-01-07 12:12:39 +08:00
bggRGjQaUbCoE
9855b35b65 opt ui
fix

report im msg

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-07 11:32:24 +08:00
bggRGjQaUbCoE
5a0b045a1f opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-06 13:10:02 +08:00
bggRGjQaUbCoE
c226f8f6df upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-06 13:10:02 +08:00
bggRGjQaUbCoE
fd06fa9cc4 report sc
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-06 13:09:58 +08:00
s
2b5f111fb1 fix: resolve Linux window close handler to prevent app hang (#1795)
- Add delete-event callback that properly quits the application when window is closed
2026-01-03 18:42:30 +08:00
bggRGjQaUbCoE
9f5ce5ae37 fix find sc index
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-03 15:28:19 +08:00
Vixb
3d95165d46 feat: support more dolby id (#1794) 2026-01-03 12:16:09 +08:00
bggRGjQaUbCoE
cfb72f27ac tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-03 11:29:47 +08:00
bggRGjQaUbCoE
bcacc41db3 live dm action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-03 11:01:06 +08:00
bggRGjQaUbCoE
b2da99e334 fix dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-02 14:58:52 +08:00
bggRGjQaUbCoE
041af37bb0 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-02 12:06:09 +08:00
bggRGjQaUbCoE
80e007bac6 add static2Scroll option
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2026-01-02 12:06:05 +08:00
bggRGjQaUbCoE
87c7699324 fix dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-31 14:01:49 +08:00
bggRGjQaUbCoE
11912c5f62 fix level
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-31 12:44:03 +08:00
bggRGjQaUbCoE
236a8b3023 fix dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-31 12:14:01 +08:00
bggRGjQaUbCoE
63e4bac204 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-31 12:13:38 +08:00
My-Responsitories
2e11247af4 fix: font size 2025-12-30 14:13:45 +08:00
My-Responsitories
13f377f680 fix: font size 2025-12-30 14:07:18 +08:00
bggRGjQaUbCoE
b9d594bc8b tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-29 21:04:52 +08:00
bggRGjQaUbCoE
2a52157c3f show live rank
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-29 21:04:10 +08:00
bggRGjQaUbCoE
a037d8e793 opt dyn publish
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-29 21:04:10 +08:00
My-Responsitories
49b7ea14c3 refa: danmaku & feat: scroll fixed velocity (#1791) 2025-12-29 21:03:24 +08:00
bggRGjQaUbCoE
0a40d11133 opt SpringDescription
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-28 10:58:31 +08:00
bggRGjQaUbCoE
dff6b6486d do not check uploadPictureIconState
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 20:54:57 +08:00
bggRGjQaUbCoE
b51c646415 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 20:54:41 +08:00
My-Responsitories
25acf3a9bb fix: dynamic openInBrowser (#1790) 2025-12-27 20:51:40 +08:00
bggRGjQaUbCoE
7ec90e9a22 opt dyn more text
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 14:07:49 +08:00
bggRGjQaUbCoE
645ce0b7b3 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 13:52:36 +08:00
bggRGjQaUbCoE
864fef5881 fix check uploadPictureIconState
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 12:40:35 +08:00
bggRGjQaUbCoE
eea232c6db show dyn interaction
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 12:40:35 +08:00
bggRGjQaUbCoE
25fca498fc opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-27 12:40:30 +08:00
bggRGjQaUbCoE
c9a02f9c74 fix retry
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-26 10:43:27 +08:00
bggRGjQaUbCoE
99602eea95 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-26 10:43:27 +08:00
bggRGjQaUbCoE
b5fe0faeec Revert "opt view dyn reply"
This reverts commit 161bf2eedb.
2025-12-26 10:43:27 +08:00
bggRGjQaUbCoE
20a36e8f9a tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-25 13:46:21 +08:00
bggRGjQaUbCoE
161bf2eedb opt view dyn reply
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-24 18:36:17 +08:00
bggRGjQaUbCoE
fcf4e72d8e fix vote card
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-24 12:47:50 +08:00
bggRGjQaUbCoE
b46cb69df4 opt reload reply
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-24 12:47:30 +08:00
My-Responsitories
43c7620b4c fix: cacheIndex 2025-12-24 01:05:59 +08:00
bggRGjQaUbCoE
1a8f65b075 opt bar set
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-23 21:12:51 +08:00
bggRGjQaUbCoE
259e7080f8 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-23 17:31:05 +08:00
My-Responsitories
7da6f05a50 tweak 2025-12-23 14:17:22 +08:00
My-Responsitories
521ca3ad18 tweaks (#1788)
* tweak

* opt: show bar

* opt: crc32

* opt: appsign

* opt: Get

* opt: compress only if large

* opt: wbi

* tweak

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com>
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-23 12:57:19 +08:00
bggRGjQaUbCoE
31e5692dff upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-22 10:58:45 +08:00
bggRGjQaUbCoE
191bcbc525 fix parse dyn emoji
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-22 10:58:45 +08:00
bggRGjQaUbCoE
a0f3b3e442 tweaks
cache season fav state

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-22 10:58:40 +08:00
bggRGjQaUbCoE
5bcd822251 opt live follow list
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-22 10:43:52 +08:00
My-Responsitories
d80324655e opt: cache image (#1787) 2025-12-22 10:43:32 +08:00
bggRGjQaUbCoE
952d168022 fix grpc contentType
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-19 11:22:26 +08:00
bggRGjQaUbCoE
af723e161c tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-19 11:22:13 +08:00
dom
3ff521e103 Update build.yml 2025-12-18 22:29:19 +08:00
My-Responsitories
b4a5d985f5 opt: isolate parse danmaku & feat: grpc account (#1785)
* opt: isolate parse danmaku

* feat: grpc account
2025-12-18 22:27:40 +08:00
bggRGjQaUbCoE
1e0e2d2d6e tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-18 12:30:57 +08:00
My-Responsitories
d7f7611af4 opt: color (#1782)
* fixes

* opt: color

* fix
2025-12-18 11:08:03 +08:00
My-Responsitories
11cdb67050 feat: show network type (#1781) 2025-12-17 21:58:42 +08:00
bggRGjQaUbCoE
53cf9d54c4 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 21:39:34 +08:00
bggRGjQaUbCoE
2e73688688 add superChatType
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 19:54:30 +08:00
My-Responsitories
ce5e85e64b tweaks (#1780)
* opt: sized

* fix: self send

* feat: ctrl enter to send

* opt: checked

* opt: download notifier

* opt: Future.syncValue

* mod: account

* mod: loading state

* opt: DebounceStreamMixin

* opt: report

* opt: enum map

* opt: file handler

* opt: dyn color

* opt: Uint8List subview

* opt: FileExt

* opt: computeLuminance

* opt: isNullOrEmpty

* opt: Get context

* update [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt dynamicColor [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fixes [skip ci]

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com>
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 17:01:10 +08:00
bggRGjQaUbCoE
02e0d34127 increase desktop max volume
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 14:05:30 +08:00
bggRGjQaUbCoE
830f3b60e0 opt theme
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 13:09:15 +08:00
bggRGjQaUbCoE
b4fb7d14d4 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 13:02:01 +08:00
lesetong
ab1e5cb62a Add multi-select support to pmshare panel (#1779)
* Add multi-select support to share panel

- Replace single selection index with per-user selected flag
- Allow sending to multiple selected users
- Add sending state to prevent multiple clicks
- Update default selection logic to mark first user as selected

* 简化代码逻辑

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: lesetong <oscarlbw@qq.com>
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-17 12:46:36 +08:00
bggRGjQaUbCoE
348a9e014e opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-16 18:42:20 +08:00
bggRGjQaUbCoE
0baf3fcd36 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-16 15:56:54 +08:00
bggRGjQaUbCoE
13818533a7 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-16 14:13:40 +08:00
bggRGjQaUbCoE
0dd3689d65 opt opus text
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-16 11:21:03 +08:00
bggRGjQaUbCoE
23b6850778 opt dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-15 20:29:46 +08:00
bggRGjQaUbCoE
d8ca89ac8f upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-15 20:11:07 +08:00
bggRGjQaUbCoE
ae06d5f7f2 opt live header
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 17:02:01 +08:00
bggRGjQaUbCoE
62506d3eb5 disable alwaysOnTop on dispose
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 16:36:02 +08:00
bggRGjQaUbCoE
f7c61d63a0 remove deprecated pref keys
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 16:14:10 +08:00
bggRGjQaUbCoE
f46437f891 fix get block color
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 15:57:57 +08:00
bggRGjQaUbCoE
1cd949c365 use ValueGetter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 14:14:27 +08:00
bggRGjQaUbCoE
bc5ce11449 fix PopupMenuText
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 14:04:00 +08:00
Vixb
cef4beaa0c feat: sync segment type with upstream (#1777)
* feat: sync segment type with upstream

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: Vixb <xzx8023@outlook.com>
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 13:48:00 +08:00
bggRGjQaUbCoE
02bd68f697 opt desktop pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 12:31:51 +08:00
bggRGjQaUbCoE
2bc3275c1f opt reply
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-14 11:14:01 +08:00
bggRGjQaUbCoE
ec107063c3 opt pay coin
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-13 20:42:27 +08:00
bggRGjQaUbCoE
4c2fd38d6c upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-13 17:10:46 +08:00
bggRGjQaUbCoE
1a6653ba93 opt reply
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-13 15:53:14 +08:00
bggRGjQaUbCoE
74d5e03a34 show followee votes
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-13 15:53:14 +08:00
My-Responsitories
2b4b1debe6 tweak 2025-12-13 14:51:07 +08:00
My-Responsitories
17883eb77e opt: LoadingState (#1776) 2025-12-13 12:43:32 +08:00
bggRGjQaUbCoE
3741fe54ff upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-10 18:00:01 +08:00
bggRGjQaUbCoE
ec11af3827 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-10 17:57:39 +08:00
My-Responsitories
890dc58dc3 refa: settings model (#1773)
* opt: MediaQuery

* refa: settings model
2025-12-10 16:41:31 +08:00
bggRGjQaUbCoE
b12bdf2eb8 opt log page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-10 10:51:33 +08:00
bggRGjQaUbCoE
59c7f8a030 opt onChangeAccount
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-10 10:51:33 +08:00
bggRGjQaUbCoE
50cf74ccf7 fix play next audio
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-10 10:51:33 +08:00
LiPolymer
15b5c0a874 feat: modify recommend page's card width separately (#1771)
* feat: modify recommend card width setting separately
2025-12-10 10:51:16 +08:00
My-Responsitories
244ef22f54 feat: load config from text (#1772)
* feat: load config from text

* opt: login utils

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-09 22:09:57 +08:00
bggRGjQaUbCoE
b4daf5fbd8 reduce log snackbar duration
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-08 23:07:30 +08:00
bggRGjQaUbCoE
0519ec0e4b build
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-08 23:07:30 +08:00
My-Responsitories
ff4f97de1a opt: parse sys msg (#1770) 2025-12-08 23:06:46 +08:00
My-Responsitories
773bdafec3 opt: more linter (#1765)
* opt: more linter

* fix [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-07 23:46:42 +08:00
bggRGjQaUbCoE
3787f99d35 opt download next
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-07 12:29:12 +08:00
bggRGjQaUbCoE
2cb8331528 cache follow order type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-07 11:48:47 +08:00
bggRGjQaUbCoE
5b6443cfa4 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-07 11:48:42 +08:00
bggRGjQaUbCoE
6fd8212d8b upgrade actions/checkout
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-07 10:42:36 +08:00
My-Responsitories
0d273f6909 refa: logfile (#1764)
* refa: logfile

* opt: log page

* opt: raf log file

* remove old log

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-06 22:33:00 +08:00
bggRGjQaUbCoE
255e39b709 bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-06 10:04:57 +08:00
bggRGjQaUbCoE
ea52dd4484 fix typos
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-06 10:04:52 +08:00
bggRGjQaUbCoE
b4a46133be opt set pageTransition
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-04 17:11:59 +08:00
bggRGjQaUbCoE
7c1644efc4 upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-04 11:26:17 +08:00
bggRGjQaUbCoE
775e1aa97d do not show others rank
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-04 11:19:50 +08:00
bggRGjQaUbCoE
2a55d4390a opt list
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-04 11:16:51 +08:00
bggRGjQaUbCoE
d57a34a4e1 fix member list jump
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 22:05:06 +08:00
bggRGjQaUbCoE
2785248615 opt up panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 21:47:12 +08:00
bggRGjQaUbCoE
c42468e2c8 opt update down progress
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 19:05:00 +08:00
bggRGjQaUbCoE
196ddf3f5f opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 17:36:47 +08:00
bggRGjQaUbCoE
27302435be specify window class name
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 17:36:47 +08:00
My-Responsitories
2b3ec77e92 opt: unnecessary_non_null_assertion (#1762) 2025-12-03 17:35:42 +08:00
bggRGjQaUbCoE
b7a277a57c refa: member fav
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 14:15:02 +08:00
bggRGjQaUbCoE
9c8e5b53e7 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-03 14:14:38 +08:00
bggRGjQaUbCoE
001b746f65 change dynamicColor def value
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 17:06:52 +08:00
bggRGjQaUbCoE
a78214de3c sort video language
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 16:58:26 +08:00
bggRGjQaUbCoE
d88ffb1127 tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 16:58:26 +08:00
dom
f05b901009 fix & opt appsign (#1761)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 16:58:13 +08:00
bggRGjQaUbCoE
430837eef6 opt live
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 11:46:38 +08:00
bggRGjQaUbCoE
fa583ebd0f tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 11:46:31 +08:00
bggRGjQaUbCoE
d2dcba5a59 upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-02 11:45:57 +08:00
bggRGjQaUbCoE
fb5116d525 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-12-01 14:14:29 +08:00
bggRGjQaUbCoE
a48f6b1ca5 opt update block type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-30 11:41:34 +08:00
bggRGjQaUbCoE
fc0af3f284 remove seek announce
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-30 11:41:34 +08:00
bggRGjQaUbCoE
2288e11398 fix dm block type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-30 11:06:20 +08:00
bggRGjQaUbCoE
d95283c4ac upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-28 20:49:28 +08:00
bggRGjQaUbCoE
4b56bd5a87 fix download status
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-28 16:50:53 +08:00
My-Responsitories
62bb605ee8 tweak: danmaku (#1756)
* fix: danmaku like

* opt: danmaku merge

* remove: showSpecialDanmaku
2025-11-28 16:50:37 +08:00
bggRGjQaUbCoE
0f8da1999a opt multi select
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-28 11:59:12 +08:00
bggRGjQaUbCoE
21a2373a5c update dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-28 11:24:03 +08:00
bggRGjQaUbCoE
2ca5310825 reduce fullscreen sc duration
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-28 11:24:03 +08:00
dom
9ccaa3072b opt download (#1755)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-27 21:00:13 +08:00
bggRGjQaUbCoE
ded78e534f upgrade protobuf
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-26 17:11:35 +08:00
bggRGjQaUbCoE
9b0a43efc9 upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-26 11:50:08 +08:00
bggRGjQaUbCoE
10808c2a84 show live online count
update live title

update live watchedshow

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-26 11:47:00 +08:00
My-Responsitories
38a7afd63a opt: player controller (#1753)
* opt: player controller

* tweak [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-26 11:45:16 +08:00
bggRGjQaUbCoE
54b26d20fa upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-23 12:43:53 +08:00
bggRGjQaUbCoE
ad2bc78ebd opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-23 12:43:46 +08:00
bggRGjQaUbCoE
c4aca389a8 fixes
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-22 22:35:37 +08:00
bggRGjQaUbCoE
cb8333d4c0 show vote status
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-22 19:35:27 +08:00
bggRGjQaUbCoE
2f5eed6998 bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-22 13:56:06 +08:00
bggRGjQaUbCoE
935c53e452 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-22 09:50:32 +08:00
bggRGjQaUbCoE
dd0ccb327b show battery level
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-22 09:50:27 +08:00
bggRGjQaUbCoE
919134759b tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 17:53:46 +08:00
bggRGjQaUbCoE
c1d42b498a opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 17:46:17 +08:00
bggRGjQaUbCoE
a7e67796f1 fix theme type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 14:07:22 +08:00
bggRGjQaUbCoE
6692c9e851 set dm for live
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 14:03:20 +08:00
bggRGjQaUbCoE
ace949aaa0 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 13:26:57 +08:00
bggRGjQaUbCoE
fbd9687432 upgrade kgp
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-21 13:26:47 +08:00
bggRGjQaUbCoE
460a8262c1 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-20 19:45:55 +08:00
bggRGjQaUbCoE
c8de503fae fix dyn showmore
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-20 15:27:52 +08:00
bggRGjQaUbCoE
a60cd51ff4 bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-20 13:27:31 +08:00
bggRGjQaUbCoE
aad980ce23 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-20 13:27:15 +08:00
bggRGjQaUbCoE
e7cda7b9fa upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 18:34:54 +08:00
bggRGjQaUbCoE
1d368b7a8b update richtextfield
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 18:34:49 +08:00
bggRGjQaUbCoE
725d7055bf update flutter widgets
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 17:45:24 +08:00
bggRGjQaUbCoE
1fb798db4e opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 10:19:36 +08:00
bggRGjQaUbCoE
8e1d5e0dd5 opt live back btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 09:35:14 +08:00
bggRGjQaUbCoE
2d9a1310b9 tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 09:35:09 +08:00
bggRGjQaUbCoE
588ec7babd upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 09:35:04 +08:00
My-Responsitories
2be13e7283 refa: sb & feat: sb portVideo (WIP) (#1751)
* refa: sb

* feat: sb portVideo (WIP)

* fix: keep-alive

* revert: ua version

* fix

* tweak [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-19 09:30:04 +08:00
bggRGjQaUbCoE
d5d95671ff ios uiscene migration
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-18 18:22:55 +08:00
bggRGjQaUbCoE
a0eccda6ff set player proxy
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-18 18:22:55 +08:00
bggRGjQaUbCoE
ec82c86210 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 22:06:30 +08:00
bggRGjQaUbCoE
de03bef226 show video restore btn if translated
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 21:50:03 +08:00
My-Responsitories
0f8166620e opt: notify-debugger-on-exception (#1750) 2025-11-17 21:49:36 +08:00
bggRGjQaUbCoE
76c2de4394 fix THREE_DOT_ITEM_TYPE_UP_HELPER action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 21:10:20 +08:00
bggRGjQaUbCoE
0d38ded981 show lock btn for live
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 18:51:40 +08:00
bggRGjQaUbCoE
646888c06f fix import
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 18:15:20 +08:00
bggRGjQaUbCoE
332f6f1bb4 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 18:04:30 +08:00
bggRGjQaUbCoE
aaab5371b2 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 17:35:29 +08:00
JianGuo Wang
ad931d7ea2 add media notification handling for offline videos (#1748)
* feat: add media notification handling for offline videos

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 17:35:00 +08:00
My-Responsitories
377e430d74 refa: report error (#1747)
* refa: report error

* remove some reports [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-17 17:20:29 +08:00
My-Responsitories
a797467606 upgrade dep (#1746) 2025-11-16 15:02:20 +00:00
My-Responsitories
5ee83d902d opt: exclude analysis flutter widget (#1745) 2025-11-16 14:33:40 +00:00
My-Responsitories
27ae296b28 refa: cdn (#1743)
* refa: cdn

* feat: live cdn (WIP)

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* add live quality [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* mod: replace durl host

* tweak [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-15 20:12:21 +08:00
My-Responsitories
e589f27195 fix; set subtitle before init (#1742)
* tweka

* fix; set subtitle before init
2025-11-15 07:34:23 +00:00
bggRGjQaUbCoE
c89d6a5a59 fix wakelock
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-15 11:50:17 +08:00
bggRGjQaUbCoE
861365930d reformat
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-14 09:22:43 +08:00
bggRGjQaUbCoE
0d4d92a202 bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-14 09:22:43 +08:00
bggRGjQaUbCoE
4c6ad0e385 increase webdav timeout
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-14 09:22:43 +08:00
iKirby
ad45e995e2 fix preferred cdn & Add more PCDN url patterns (#1739)
* Fix preferred cdn not used after changing quality

* Add more PCDN url patterns
2025-11-14 09:21:51 +08:00
bggRGjQaUbCoE
50a035a479 opt get season status
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-13 14:27:52 +08:00
bggRGjQaUbCoE
c0dbd6cbb2 migration
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-13 11:04:46 +08:00
bggRGjQaUbCoE
686af4a330 bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-13 10:07:44 +08:00
bggRGjQaUbCoE
46aad06e34 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-13 10:05:27 +08:00
bggRGjQaUbCoE
3921b2304d opt download task
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-13 09:38:23 +08:00
My-Responsitories
bca5b0419c tweaks (#1738)
* feat: edit dm filter

* opt: browser

* feat: sb userInfo

* mod: tvPlayUrl
2025-11-13 09:36:50 +08:00
bggRGjQaUbCoE
9754b061dd check dm state
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-12 20:21:11 +08:00
My-Responsitories
407b31c5c1 refa: download video (#1737)
* opt: save pb danmaku

* refa: download video

* opt: replaceAll

* fix: wait delete

* opt: remove completer

* fix: index.json

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-12 19:12:17 +08:00
bggRGjQaUbCoE
37b1228552 feat: dlna
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-12 19:03:01 +08:00
bggRGjQaUbCoE
0acd9ca767 upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-12 10:50:29 +08:00
My-Responsitories
8f3c9f029c opt: const page (#1736) 2025-11-12 07:33:28 +08:00
BH8GUQ
9310732343 Mark offline cache as completed in README (#1735) 2025-11-11 17:46:11 +08:00
bggRGjQaUbCoE
e767e506f3 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-11 17:43:50 +08:00
bggRGjQaUbCoE
ef3a612338 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-11 09:32:08 +08:00
bggRGjQaUbCoE
d66a42a0aa opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-11 09:32:03 +08:00
bggRGjQaUbCoE
0f06de0047 fix save subtitle on win
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-10 12:09:59 +08:00
bggRGjQaUbCoE
963181fef2 feat: load file sub
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-10 11:31:43 +08:00
bggRGjQaUbCoE
ffd4f9ee73 feat: video download
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-09 22:06:19 +08:00
bggRGjQaUbCoE
976622df89 fix pm send btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-09 16:13:42 +08:00
bggRGjQaUbCoE
13c220338c set system brightness
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-09 15:48:52 +08:00
bggRGjQaUbCoE
1291dc77c8 stop audio service
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-09 11:34:00 +08:00
bggRGjQaUbCoE
08e5477e74 enable audio cdn by def
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-08 16:55:28 +08:00
bggRGjQaUbCoE
c4c6a2243e disable win single alt key event
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-08 16:55:28 +08:00
bggRGjQaUbCoE
58791e3e91 show vote option pic
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-08 16:55:28 +08:00
bggRGjQaUbCoE
d5bb4bc149 fix fan/follow params
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-07 19:55:59 +08:00
bggRGjQaUbCoE
3d1199363b Release 1.1.5
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-07 16:45:13 +08:00
bggRGjQaUbCoE
f225fa33e1 update proto
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-06 15:08:19 +08:00
bggRGjQaUbCoE
e85c8b3dde tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-02 12:37:20 +08:00
bggRGjQaUbCoE
737be8dcac del cache
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-01 18:26:58 +08:00
bggRGjQaUbCoE
77dd939172 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-11-01 15:57:17 +08:00
bggRGjQaUbCoE
0a5965a423 fix parse dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-31 18:57:31 +08:00
bggRGjQaUbCoE
a53be6814c opt tooltip style
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-31 15:12:28 +08:00
bggRGjQaUbCoE
415b8e9da3 fix audio action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-31 12:28:59 +08:00
bggRGjQaUbCoE
f034c24d13 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-30 17:32:18 +08:00
bggRGjQaUbCoE
1ac93d6269 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-30 17:32:02 +08:00
bggRGjQaUbCoE
906c8f7999 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-29 18:28:10 +08:00
bggRGjQaUbCoE
c904a5ded8 del
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-29 18:28:04 +08:00
bggRGjQaUbCoE
0c9486f6b4 build
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 23:15:48 +08:00
bggRGjQaUbCoE
576740a502 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 21:53:07 +08:00
bggRGjQaUbCoE
b3f9f43b57 fix #1729
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 21:52:52 +08:00
bggRGjQaUbCoE
e7424bcc66 fix buvidActive
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 17:21:41 +08:00
bggRGjQaUbCoE
209ec70ea9 opt icon
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 17:21:00 +08:00
bggRGjQaUbCoE
3b4e251034 opt desktop pip
Closes #1478

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 13:49:09 +08:00
bggRGjQaUbCoE
86beb879a2 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 13:17:16 +08:00
bggRGjQaUbCoE
321d434141 build
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-28 11:04:12 +08:00
Axiaobo
b9d17e27b1 fix #1718 (#1723) 2025-10-28 10:45:15 +08:00
My-Responsitories
2f6f6da6c0 opt: tap (#1719)
* opt: tap

* revert: remove suspendedDm
2025-10-27 21:32:39 +08:00
bggRGjQaUbCoE
c3d3fa67f7 fix #1716
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-27 18:16:09 +08:00
bggRGjQaUbCoE
032dfd69be fix #1712
fix #1641

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-27 18:16:09 +08:00
bggRGjQaUbCoE
e9dc154642 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-27 18:16:03 +08:00
My-Responsitories
b43840b636 mod: save panel (#1706) 2025-10-25 10:23:42 +00:00
My-Responsitories
1a9d8e35ba feat: show aiConclusion (#1698) 2025-10-25 06:54:21 +00:00
My-Responsitories
ccb61415f5 tweaks (#1697)
* opt: play status

* opt: comment
2025-10-25 06:45:19 +00:00
My-Responsitories
08944241bb fix: danmaku (#1696)
* fix: post danmaku

* mod: tap danmaku

* mod: delete danmaku
2025-10-25 06:41:47 +00:00
bggRGjQaUbCoE
63030147ea bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-25 12:16:11 +08:00
bggRGjQaUbCoE
8ff71c44ca opt dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-25 12:16:11 +08:00
bggRGjQaUbCoE
4eaf16f500 disable search default by def
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-24 20:22:06 +08:00
Axiaobo
1a9c8a62f2 package linux appimage (#1688)
* modified:   .github/workflows/linux_x64.yml

* modified:   .github/workflows/linux_arm64.yml

* modified:   .github/workflows/linux_arm64.yml
	modified:   lib/plugin/pl_player/controller.dart

* modified:   lib/plugin/pl_player/controller.dart

* modified:   lib/plugin/pl_player/controller.dart

* modified:   lib/plugin/pl_player/controller.dart

---------

Co-authored-by: Xiaobo Ch. <Axiaobo7788@163.com>
2025-10-24 18:36:46 +08:00
bggRGjQaUbCoE
4256c2b023 opt ui
Closes #1680

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-24 14:34:13 +08:00
bggRGjQaUbCoE
bbcf0dec1b upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-23 23:21:33 +08:00
bggRGjQaUbCoE
da52cac2c6 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-23 23:21:28 +08:00
bggRGjQaUbCoE
e8a32a6149 custom audio order
Closes #1636

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 17:22:33 +08:00
bggRGjQaUbCoE
a71a7b66f8 opt req
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 17:01:18 +08:00
bggRGjQaUbCoE
9808f50816 show audio playlist parts
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 11:35:41 +08:00
bggRGjQaUbCoE
cf86bb7e13 add match entrance
Closes #1628

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 10:20:42 +08:00
bggRGjQaUbCoE
ff065254ae fix get window pos
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 10:20:00 +08:00
bggRGjQaUbCoE
39b4c1a59b show rank fold items
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-21 10:19:17 +08:00
bggRGjQaUbCoE
28f10e0a4b check uploadPictureIconState
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-20 19:34:27 +08:00
bggRGjQaUbCoE
12c0ed5baf fix #1616
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-20 15:41:20 +08:00
bggRGjQaUbCoE
23272d285b tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-20 15:39:48 +08:00
bggRGjQaUbCoE
67b4ed65ab opt audio playlist
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-20 13:15:26 +08:00
My-Responsitories
7524b3d168 fix: hide danmaku (#1654) 2025-10-20 12:17:59 +08:00
bggRGjQaUbCoE
340a933e70 fix #1648
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-20 10:23:13 +08:00
bggRGjQaUbCoE
488ca29fc1 opt dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 21:31:27 +08:00
bggRGjQaUbCoE
cc00b2cc39 feat: dyn show more
Closes #1629

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 20:27:42 +08:00
bggRGjQaUbCoE
287cea4d6c tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 20:11:44 +08:00
bggRGjQaUbCoE
39e556891a upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 15:33:02 +08:00
bggRGjQaUbCoE
0ae4157384 create release
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 14:40:40 +08:00
My-Responsitories
6e1ceb1277 feat: like count (#1640) 2025-10-19 05:45:29 +00:00
bggRGjQaUbCoE
71a170deb5 audio notification
Closes #1635

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-19 11:24:14 +08:00
bggRGjQaUbCoE
9482a706da fix #1613
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 21:02:05 +08:00
bggRGjQaUbCoE
0804484a49 check cmd key
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 19:28:14 +08:00
bggRGjQaUbCoE
cdb9bb3dbc check cmd key
Closes #1630

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 19:16:55 +08:00
bggRGjQaUbCoE
6ca0de96f4 opt pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 17:21:14 +08:00
bggRGjQaUbCoE
d908f58528 opt pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 16:29:14 +08:00
bggRGjQaUbCoE
1368733a24 fix check pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 16:17:32 +08:00
bggRGjQaUbCoE
32e71dbf65 fix #1625
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 15:57:41 +08:00
bggRGjQaUbCoE
c9ce1af2c6 Update build
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 14:23:17 +08:00
bggRGjQaUbCoE
416f9e6a8d upgrade dm dep
Closes #1619

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 13:25:10 +08:00
bggRGjQaUbCoE
3ae3955f53 rename release files
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 13:14:05 +08:00
bggRGjQaUbCoE
464f008023 fix #1615
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 11:29:31 +08:00
bggRGjQaUbCoE
52498b3e34 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-18 11:29:31 +08:00
Axiaobo
57c57b02a5 build linux arm64 (#1610)
* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* new file:   .github/workflows/linux_arm64.yml

* modified:   .github/workflows/linux.yml
	deleted:    .github/workflows/linux_arm64.yml
	modified:   .github/workflows/win.yml

* new file:   .github/workflows/linux_arm64.yml

* modified:   .github/workflows/linux_arm64.yml

* modified:   .github/workflows/linux_arm64.yml

* modified:   .github/workflows/linux_arm64.yml
	renamed:    .github/workflows/linux.yml -> .github/workflows/linux_x64.yml

* renamed:    .github/workflows/win.yml -> .github/workflows/win_x64.yml

* modified:   .github/workflows/linux_x64.yml

---------

Co-authored-by: Zhang Yujie <Axiaobo7788@163.com>
2025-10-17 23:23:33 +08:00
My-Responsitories
b8c6868043 fix: cross import 2025-10-17 17:24:13 +08:00
My-Responsitories
8200fbf512 tweak 2025-10-17 14:38:56 +08:00
My-Responsitories
8650c96b7b feat: danmaku seekTo (#1603) 2025-10-17 06:37:25 +00:00
bggRGjQaUbCoE
15fe7787ba pause
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-17 13:28:21 +08:00
dom
d83076cb07 Update android.yml 2025-10-17 12:07:07 +08:00
bggRGjQaUbCoE
8b3b4c28a5 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-17 10:43:43 +08:00
bggRGjQaUbCoE
740c001e2f bump flutter
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-17 10:34:13 +08:00
bggRGjQaUbCoE
096b057f81 fix #1598
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-17 10:34:13 +08:00
bggRGjQaUbCoE
a161fa5e58 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-17 10:34:08 +08:00
bggRGjQaUbCoE
bebf34db23 disable windows thread merging
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 19:09:47 +08:00
bggRGjQaUbCoE
b95061434a upgrade danmaku dep
Closes #1583

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 18:56:23 +08:00
bggRGjQaUbCoE
f2a05bb970 fix #1593
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 18:55:47 +08:00
bggRGjQaUbCoE
6c361a047b live dm action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 17:37:49 +08:00
bggRGjQaUbCoE
3fb9e22378 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 13:44:13 +08:00
bggRGjQaUbCoE
b2fb4c9afe opt dm action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-16 13:21:15 +08:00
bggRGjQaUbCoE
0862c0fc87 show backbtn on mine page if needed
Closes #1580

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 21:34:21 +08:00
My-Responsitories
77ec78e3fe opt: singleton FollowTypeController (#1578) 2025-10-15 21:13:56 +08:00
Axiaobo
fb59c208e3 package linux rpm (#1575)
* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml

* modified:   .github/workflows/linux.yml
2025-10-15 20:17:46 +08:00
bggRGjQaUbCoE
112a06f92a custom show tray icon
Closes #1569

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 19:21:11 +08:00
bggRGjQaUbCoE
c10c4a6f89 windows single instance
Closes #1574

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 19:06:28 +08:00
bggRGjQaUbCoE
669c807b23 Update README.md
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 18:40:54 +08:00
bggRGjQaUbCoE
c9de79532a handle relation url
Closes #1566

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 18:28:50 +08:00
bggRGjQaUbCoE
32ce2b87db enable tap dm by def
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 18:28:46 +08:00
bggRGjQaUbCoE
4cfcf18bc9 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 18:06:51 +08:00
bggRGjQaUbCoE
14ae61f891 fix typo
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-15 18:06:51 +08:00
My-Responsitories
a2d5ecc51e feat: ImmediateTapGestureRecognizer (#1572) 2025-10-15 18:06:10 +08:00
My-Responsitories
84f972a3ab fix: report 2025-10-15 16:03:10 +08:00
bggRGjQaUbCoE
5249ceccdb opt audio playlist
Closes #1547

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-14 21:39:30 +08:00
bggRGjQaUbCoE
5035495043 pause
Closes #1559

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-14 21:39:30 +08:00
My-Responsitories
25483d71e9 fix: decompress 2025-10-14 21:23:26 +08:00
My-Responsitories
c3fa976b26 tweaks (#1562)
* opt: downloadImg use cache

* opt: uin8 cast

* non null ext
2025-10-14 11:36:43 +00:00
My-Responsitories
43beb518f4 feat: right click fullscreen (#1561) 2025-10-14 11:27:15 +00:00
bggRGjQaUbCoE
11edabb890 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-14 17:09:06 +08:00
bggRGjQaUbCoE
019cd9fda0 opt search
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-14 17:08:42 +08:00
My-Responsitories
9d747c8e2c refa: video (#1555)
* refa: video [skip ci]

* fix: scroll [skip ci]

* mod: only left click

* downgrade

* refa: background play & wakelock [skip ci]

* fix: subtitle [skip ci]

* upgrade deps

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* mod: long press

* tweak

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fix [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* use right pos

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* delay showing

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fix: null danmaku

* remove

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-14 17:05:31 +08:00
bggRGjQaUbCoE
4cf1c25b36 fix #1545
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 20:35:40 +08:00
bggRGjQaUbCoE
6c6ed46aea fix #1541
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 19:32:29 +08:00
bggRGjQaUbCoE
e1473a453e tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 17:03:36 +08:00
bggRGjQaUbCoE
9f6ef0281a tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 14:36:38 +08:00
bggRGjQaUbCoE
84d5a24bc3 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 13:44:32 +08:00
bggRGjQaUbCoE
ed8c39aa76 opt player gesture
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 12:52:50 +08:00
bggRGjQaUbCoE
23d235b8f4 opt player gesture
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 12:39:22 +08:00
bggRGjQaUbCoE
8bea09b78a tap dm when debug
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 11:49:20 +08:00
bggRGjQaUbCoE
897fda875a opt dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-13 10:55:56 +08:00
bggRGjQaUbCoE
510bfe01be opt btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 21:55:39 +08:00
My-Responsitories
f6ca007815 feat: tap danmaku (#1534) 2025-10-12 21:51:59 +08:00
bggRGjQaUbCoE
35b34cb2d4 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 21:51:14 +08:00
My-Responsitories
5197cca69c tweaks 2025-10-12 18:56:09 +08:00
My-Responsitories
e5f0742bf6 feat: danmaku api (#1530) 2025-10-12 18:41:40 +08:00
bggRGjQaUbCoE
88d207cc24 upgrade danmaku dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 18:32:01 +08:00
bggRGjQaUbCoE
931fcb6f8f opt fab
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 17:09:50 +08:00
bggRGjQaUbCoE
e4a960ecf9 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 16:13:23 +08:00
My-Responsitories
e44419e088 mod: ui (#1521)
* mod: ui

* fix: -400

* tweaks

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweak [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweak [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-12 12:12:44 +08:00
dom
16f577f3fd feat: audio page (#1518)
* feat: audio page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt ui

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* impl intro, share, fav

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* tweaks

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* load prev/next

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-11 22:16:16 +08:00
My-Responsitories
a65edab7d1 opt: env (#1510)
* opt: env

* fix

* fix: regex

* fix: android

* fix

* fix

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fastforge define

* fix

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-10 15:52:26 +08:00
bggRGjQaUbCoE
c0bbf8400a upgrade dep
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-10 13:20:53 +08:00
bggRGjQaUbCoE
1dc2da68ac opt msgNotifyMsg
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-10 13:20:47 +08:00
bggRGjQaUbCoE
3d49529272 show user name
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-09 16:48:42 +08:00
bggRGjQaUbCoE
41768656b4 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-09 11:24:44 +08:00
bggRGjQaUbCoE
c7e7b3f9c5 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-09 11:24:39 +08:00
bggRGjQaUbCoE
e0b0a98f0f opt block
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-08 23:03:59 +08:00
bggRGjQaUbCoE
ca0eb1716f feat: pgc skip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-08 22:50:08 +08:00
bggRGjQaUbCoE
06d8296939 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-08 16:11:24 +08:00
bggRGjQaUbCoE
322885f284 opt slide
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 21:25:47 +08:00
bggRGjQaUbCoE
4553b86cb4 tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 17:47:31 +08:00
bggRGjQaUbCoE
904756b6ea opt gesture
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 14:10:48 +08:00
bggRGjQaUbCoE
2bfa1bb6c2 tweaks
Closes #1505

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 14:10:29 +08:00
bggRGjQaUbCoE
8439a3d85c opt fs
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 12:32:36 +08:00
bggRGjQaUbCoE
454d6b9de1 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 11:52:29 +08:00
bggRGjQaUbCoE
44c7c44a27 tweaks
Closes #1354

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-07 11:52:24 +08:00
dom
40e5e2f372 Update 功能请求.yml 2025-10-06 14:15:34 +08:00
dom
138739781c Update bug-反馈.yml 2025-10-06 14:14:23 +08:00
dom
355d897ef0 Update 功能请求.yml 2025-10-06 14:10:04 +08:00
dom
a06aef2b25 Update bug-反馈.yml 2025-10-06 14:08:19 +08:00
bggRGjQaUbCoE
6ef9a24ed1 opt play btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 15:03:46 +08:00
bggRGjQaUbCoE
4df2bb0073 opt update
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 14:34:57 +08:00
bggRGjQaUbCoE
f93753ccfd tweaks
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 14:11:26 +08:00
bggRGjQaUbCoE
52373dc540 dyn uplist
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 12:06:46 +08:00
bggRGjQaUbCoE
203a997583 opt exit desktop pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 11:10:16 +08:00
bggRGjQaUbCoE
b22a406471 opt trackpad pan
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 10:31:37 +08:00
bggRGjQaUbCoE
a441759eb6 check live playurl
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-05 10:31:24 +08:00
bggRGjQaUbCoE
9057401b16 opt video progress indicator
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 21:03:12 +08:00
bggRGjQaUbCoE
6d0017c256 opt queryBySort
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 20:23:58 +08:00
dom
12b27b1d8d Update 功能请求.yml 2025-10-04 19:52:45 +08:00
dom
884bb53d6f Update bug-反馈.yml 2025-10-04 19:52:16 +08:00
bggRGjQaUbCoE
aa356b5376 global escape
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 18:19:02 +08:00
bggRGjQaUbCoE
2aa9b46433 handle trackpad pan
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 17:51:48 +08:00
Axiaobo
42f5a42dd9 build windows setup (#1454)
* modified:   .github/workflows/win.yml
	new file:   windows/Inno_Setup.iss

* modified:   windows/Inno_Setup.iss

* modified:   .github/workflows/win.yml
	new file:   distribute_options.yaml
	deleted:    windows/Inno_Setup.iss
	new file:   windows/packaging/exe/make_config.yaml

* modified:   windows/packaging/exe/make_config.yaml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml
	new file:   windows/packaging/exe/ChineseSimplified.isl

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* modified:   .github/workflows/win.yml

* fix

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 14:19:29 +08:00
bggRGjQaUbCoE
74f0fb471c fix thumbGlowColor
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 12:38:23 +08:00
bggRGjQaUbCoE
c31e772a63 opt progress bar
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 12:32:32 +08:00
bggRGjQaUbCoE
32f6d97256 opt play
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 11:17:12 +08:00
bggRGjQaUbCoE
a28db0dd98 remove videoRelation from recommend
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 11:07:14 +08:00
bggRGjQaUbCoE
aba9493ae0 fix #1429
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 10:58:37 +08:00
bggRGjQaUbCoE
4973176868 fix #1448
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 10:20:14 +08:00
bggRGjQaUbCoE
a000e2262c upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 09:49:46 +08:00
My-Responsitories
a5715868b3 tweaks (#1444)
* opt: proxy

* opt: calcWindowPosition

* fix: height depend on svg

* bump

* fix

* ci: cache linux

* string systemProxyPort

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-04 09:44:41 +08:00
bggRGjQaUbCoE
a928e48159 opt fullscreen
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 21:39:55 +08:00
bggRGjQaUbCoE
16c152d306 opt fullscreen
Closes #1442

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 21:18:29 +08:00
bggRGjQaUbCoE
5747dee03d opt mouse/keyboard event
Closes #1443

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 20:38:24 +08:00
bggRGjQaUbCoE
06c545acd4 fix #1441
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 20:01:24 +08:00
bggRGjQaUbCoE
54c3c314e1 tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 19:56:18 +08:00
bggRGjQaUbCoE
11c4fae547 fix progress bar
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 19:00:04 +08:00
My-Responsitories
8f87d248a1 fix: like details (#1438)
* fix: like details

* check counts

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 16:46:14 +08:00
bggRGjQaUbCoE
ec37af5900 fix #1439
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 16:17:33 +08:00
bggRGjQaUbCoE
1b213793d4 opt mouse event
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 15:52:04 +08:00
bggRGjQaUbCoE
aaa8998cb1 upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 15:10:11 +08:00
VillagerTom
94760a4136 tweak gitignore and vscode config (#1433)
* tweak gitignore and vscode config

* restore settings

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 11:48:28 +08:00
bggRGjQaUbCoE
bdbd6cd377 opt player gesture
Closes #1427

opt dyn/reply check

Closes #1430

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-03 11:26:36 +08:00
bggRGjQaUbCoE
d69d81912d fix #1418
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-02 18:41:55 +08:00
bggRGjQaUbCoE
198a38b103 tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-10-02 18:41:55 +08:00
NLsdt
750e67d835 feat: add deb build (#1422) 2025-10-02 18:39:42 +08:00
988 changed files with 104833 additions and 36056 deletions

4
.fvmrc
View File

@@ -1,3 +1,3 @@
{
"flutter": "3.35.5"
}
"flutter": "3.41.3"
}

View File

@@ -9,10 +9,24 @@ body:
attributes:
label: 检查清单
options:
- label: 之前没有人提交过类似或相同的 bug report。
- label: 搜索了 [历史 issue](https://github.com/bggRGjQaUbCoE/PiliPlus/issues?q=is%3Aissue) ,并未发现相同问题
required: true
- label: 正在使用最新版本。
required: true
- label: 已排除网络问题
required: true
- label: 已排除账号问题
required: true
- label: 已排除设置问题
required: true
- type: checkboxes
id: assign
attributes:
label: Assign
options:
- label: self-assign
required: false
- type: textarea
id: version

View File

@@ -9,10 +9,20 @@ body:
attributes:
label: 检查清单
options:
- label: 之前没有人提交过类似或相同功能请求
- label: 搜索了 [历史 issue](https://github.com/bggRGjQaUbCoE/PiliPlus/issues?q=is%3Aissue) ,并未发现相同功能请求
required: true
- label: 正在使用最新版本。
required: true
- label: 设置中未搜索到该功能
required: true
- type: checkboxes
id: assign
attributes:
label: Assign
options:
- label: self-assign
required: false
- type: textarea
id: desc

View File

@@ -1,92 +0,0 @@
name: Android Release
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
jobs:
android:
runs-on: ubuntu-latest
steps:
- name: 代码迁出
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 构建Java环境
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
- name: 检查缓存
uses: actions/cache@v4
id: cache-flutter
with:
path: /root/flutter-sdk # Flutter SDK 的路径
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
- name: 安装Flutter
if: steps.cache-flutter.outputs.cache-hit != 'true'
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: apply bottom sheet patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: |
git apply $GITHUB_WORKSPACE/lib/scripts/bottom_sheet_patch.diff
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "bottom sheet patch"
- name: 下载项目依赖
run: flutter pub get
- name: Write key
if: github.event_name != 'pull_request'
run: |
if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then
echo "${{ secrets.SIGN_KEYSTORE_BASE64 }}" | base64 --decode > android/app/key.jks
echo storeFile='key.jks' >> android/key.properties
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> android/key.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> android/key.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> android/key.properties
fi
- name: flutter build apk
run: |
chmod +x lib/scripts/build.dart
dart lib/scripts/build.dart "true"
flutter build apk --release --split-per-abi
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-arm64-v8a
path: |
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-armeabi-v7a
path: |
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-x86_64
path: |
build/app/outputs/flutter-apk/app-x86_64-release.apk

189
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,189 @@
name: Build
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
inputs:
build_android:
description: "Build Android"
required: false
default: true
type: boolean
build_ios:
description: "Build iOS"
required: false
default: true
type: boolean
build_mac:
description: "Build Mac"
required: false
default: true
type: boolean
build_win_x64:
description: "Build Win-x64"
required: false
default: true
type: boolean
build_linux_x64:
description: "Build Linux-x64"
required: false
default: true
type: boolean
tag:
description: "tag"
required: false
default: ""
type: string
jobs:
android:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_android == 'true' }}
name: Release Android
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: 代码迁出
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 构建Java环境
uses: actions/setup-java@v5
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
cache-dependency-path: |
android/*.gradle*
android/**/gradle-wrapper.properties
- name: 安装Flutter
uses: subosito/flutter-action@v2
id: flutter-action
with:
channel: stable
flutter-version-file: pubspec.yaml
cache: true
- name: revert new overscrollindicator
working-directory: ${{ env.FLUTTER_ROOT }}
# https://github.com/flutter/flutter/issues/182281
run: |
git config --global user.name "ci"
git config --global user.email "example@example.com"
git stash || true
git revert 362b1de29974ffc1ed6faa826e1df870d7bec75f --no-edit
git reset --soft HEAD~1
git stash pop || true
continue-on-error: true
- name: apply bottom sheet patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/bottom_sheet_patch.diff || true
continue-on-error: true
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true
- name: Write key
if: github.event_name == 'workflow_dispatch'
run: |
if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then
echo "${{ secrets.SIGN_KEYSTORE_BASE64 }}" | base64 --decode > android/app/key.jks
echo storeFile='key.jks' >> android/key.properties
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> android/key.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> android/key.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> android/key.properties
fi
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1 android
- name: flutter build apk
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
- name: rename
run: |
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|')
mv "$file" "PiliPlus_android_${{ env.version }}_${abi}.apk"
done
shell: bash
- name: Release
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: PiliPlus_android_*.apk
- name: 上传
uses: actions/upload-artifact@v7
with:
archive: false
name: Android_arm64-v8a
path: PiliPlus_android_*_arm64-v8a.apk
- name: 上传
uses: actions/upload-artifact@v7
with:
archive: false
name: Android_armeabi-v7a
path: PiliPlus_android_*_armeabi-v7a.apk
- name: 上传
uses: actions/upload-artifact@v7
with:
archive: false
name: Android_x86_64
path: PiliPlus_android_*_x86_64.apk
ios:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_ios == 'true' }}
uses: ./.github/workflows/ios.yml
permissions: write-all
with:
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}
mac:
if: ${{ github.event.inputs.build_mac == 'true' }}
uses: ./.github/workflows/mac.yml
permissions: write-all
with:
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}
win_x64:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_win_x64 == 'true' }}
uses: ./.github/workflows/win_x64.yml
permissions: write-all
with:
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}
linux_x64:
if: ${{ github.event.inputs.build_linux_x64 == 'true' }}
uses: ./.github/workflows/linux_x64.yml
permissions: write-all
with:
tag: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || '' }}

View File

@@ -1,19 +1,14 @@
name: Build for iOS
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
workflow_call:
inputs:
branch:
tag:
description: "tag"
required: false
default: "main"
default: ""
type: string
workflow_dispatch:
jobs:
build-macos-app:
@@ -21,9 +16,8 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
@@ -32,16 +26,40 @@ jobs:
channel: stable
flutter-version-file: pubspec.yaml
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true
- name: Build iOS
run: |
chmod +x lib/scripts/build.dart
dart lib/scripts/build.dart
flutter build ios --release --no-codesign
flutter build ios --release --no-codesign --dart-define-from-file=pili_release.json
ln -sf ./build/ios/iphoneos Payload
zip -r9 ios-release-no-sign.ipa Payload/runner.app
# make AltSign happy...
find Payload/Runner.app/Frameworks -type d -name "*.framework" -exec codesign --force --sign - --preserve-metadata=identifier,entitlements {} \;
zip -r9 PiliPlus_ios_${{env.version}}.ipa Payload/runner.app
- name: Release
if: ${{ github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: |
PiliPlus_ios_*.ipa
- name: Upload ios release
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ios-release
path: ios-release-no-sign.ipa
archive: false
name: iOS-release
path: PiliPlus_ios_*.ipa

View File

@@ -1,78 +0,0 @@
name: Build for Linux
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-linux-app:
name: Release Linux
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev unzip webkit2gtk-4.1 libasound2-dev
sudo apt-get install -y gcc g++ autoconf automake debhelper glslang-dev ladspa-sdk xutils-dev libasound2-dev \
libarchive-dev libbluray-dev libbs2b-dev libcaca-dev libcdio-paranoia-dev libdrm-dev \
libdav1d-dev libdvdnav-dev libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfreetype6-dev \
libfribidi-dev libgl1-mesa-dev libgbm-dev libgme-dev libgsm1-dev libharfbuzz-dev libjpeg-dev \
libbrotli-dev liblcms2-dev libmodplug-dev libmp3lame-dev libopenal-dev \
libopus-dev libopencore-amrnb-dev libopencore-amrwb-dev libpulse-dev librtmp-dev \
libsdl2-dev libsixel-dev libssh-dev libsoxr-dev libspeex-dev libtool \
libv4l-dev libva-dev libvdpau-dev libvorbis-dev libvo-amrwbenc-dev \
libunwind-dev libvpx-dev libwayland-dev libx11-dev libxext-dev \
libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev libxvidcore-dev \
linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \
x11proto-core-dev zlib1g-dev libfdk-aac-dev libtheora-dev libwebp-dev \
unixodbc-dev libpq-dev libxxhash-dev libaom-dev \
libgtk-3-0 libblkid1 liblzma5 libmpv-dev
shell: bash
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Get Flutter dependencies
run: flutter pub get
shell: bash
- name: Set and Extract version
run: |
dart lib/scripts/build.dart
VERSION=$(cat pubspec.yaml | grep 'version:' | sed 's/version: //g' | tr -d '[:space:]')
echo "version=$VERSION" >> $GITHUB_ENV
shell: bash
#TODO: deb and rpm packages need to be build
- name: Build Linux
run: flutter build linux --release -v
- name: Package linux build output
run: tar -zcvf PiliPlus_linux_${{ env.version }}_amd64.tar.gz -C build/linux/x64/release/bundle .
- name: Upload linux outputs
uses: actions/upload-artifact@v4
with:
name: linux_outputs
path: |
PiliPlus_linux_*.tar.gz

274
.github/workflows/linux_x64.yml vendored Normal file
View File

@@ -0,0 +1,274 @@
name: Build for Linux x64
on:
workflow_call:
inputs:
tag:
description: "tag"
required: false
default: ""
type: string
workflow_dispatch:
jobs:
build-linux-app:
name: Release Linux x64
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev unzip webkit2gtk-4.1 libasound2-dev rpm patchelf
sudo apt-get install -y gcc g++ autoconf automake debhelper glslang-dev ladspa-sdk xutils-dev libasound2-dev \
libarchive-dev libbluray-dev libbs2b-dev libcaca-dev libcdio-paranoia-dev libdrm-dev \
libdav1d-dev libdvdnav-dev libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfreetype6-dev \
libfribidi-dev libgl1-mesa-dev libgbm-dev libgme-dev libgsm1-dev libharfbuzz-dev libjpeg-dev \
libbrotli-dev liblcms2-dev libmodplug-dev libmp3lame-dev libopenal-dev \
libopus-dev libopencore-amrnb-dev libopencore-amrwb-dev libpulse-dev librtmp-dev \
libsdl2-dev libsixel-dev libssh-dev libsoxr-dev libspeex-dev libtool \
libv4l-dev libva-dev libvdpau-dev libvorbis-dev libvo-amrwbenc-dev \
libunwind-dev libvpx-dev libwayland-dev libx11-dev libxext-dev \
libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev libxvidcore-dev \
linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \
x11proto-core-dev zlib1g-dev libfdk-aac-dev libtheora-dev libwebp-dev \
unixodbc-dev libpq-dev libxxhash-dev libaom-dev \
libgtk-3-0 libblkid1 liblzma5 libmpv-dev
shell: bash
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
cache: true
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true
#TODO: deb and rpm packages need to be build
- name: Build Linux
run: flutter build linux --release -v --pub --dart-define-from-file=pili_release.json
- name: Package .tar.gz
run: tar -zcvf PiliPlus_linux_${{ env.version }}_amd64.tar.gz -C build/linux/x64/release/bundle .
- name: Packege deb
run: |
printf "建立构建目录...\n"
mkdir "PiliPlus_linux_${{ env.version }}_amd64"
pushd "PiliPlus_linux_${{ env.version }}_amd64"
mkdir -p opt/PiliPlus
mkdir -p usr/share/applications
mkdir -p usr/share/icons/hicolor/512x512/apps
printf "复制文件...\n"
cp -r ../build/linux/x64/release/bundle/* opt/PiliPlus
cp -r ../assets/linux/DEBIAN .
cp ../assets/linux/com.example.piliplus.desktop usr/share/applications
cp ../assets/images/logo/logo.png usr/share/icons/hicolor/512x512/apps/piliplus.png
printf "修改控制文件...\n"
# 替换版本号
sed -i "2s/version_need_change/${{ env.version }}/g" DEBIAN/control
# 计算安装大小并替换
SIZE_KB=$(du -s -b --apparent-size . | awk '{print int($1)}')
SIZE_KB=$(($SIZE_KB - $(du -s -b --apparent-size DEBIAN | awk '{print int($1)}')))
SIZE_KB=$(echo $SIZE_KB | awk '{print int($1/1024 + 0.999)}')
printf "\t安装大小: %s KB\n" "$SIZE_KB"
sed -i "9s/size_need_change/${SIZE_KB}/g" DEBIAN/control
printf "生成并写入 md5sums ...\n"
md5sum opt/PiliPlus/piliplus >> DEBIAN/md5sums
md5sum opt/PiliPlus/lib/* >> DEBIAN/md5sums
md5sum opt/PiliPlus/data/icudtl.dat >> DEBIAN/md5sums
printf "设置权限...\n"
chmod 0644 DEBIAN/control
chmod 0644 DEBIAN/md5sums
chmod 0755 DEBIAN/postinst
chmod 0755 DEBIAN/postrm
chmod 0755 DEBIAN/prerm
printf "打包 deb 文件...\n"
popd
dpkg-deb --build --verbose --root-owner-group "PiliPlus_linux_${{ env.version }}_amd64"
printf "完成: PiliPlus_linux_%s_amd64.deb\n" "${{ env.version }}"
shell: bash
- name: Packege rpm
run: |
printf "建立 RPM 构建目录...\n"
RPM_BUILD_ROOT="$PWD/rpm_build"
mkdir -p "$RPM_BUILD_ROOT/BUILD" "$RPM_BUILD_ROOT/RPMS" "$RPM_BUILD_ROOT/SOURCES" "$RPM_BUILD_ROOT/SPECS" "$RPM_BUILD_ROOT/SRPMS"
printf "准备源码归档(仅包含运行时与元数据)...\n"
DATE="$(date '+%a %b %d %Y')"
SRC_DIR="$PWD/piliplus-${{ env.version }}"
mkdir -p "$SRC_DIR/bundle" "$SRC_DIR/assets"
cp -r build/linux/x64/release/bundle/* "$SRC_DIR/bundle/"
cp assets/linux/com.example.piliplus.desktop "$SRC_DIR/assets/com.example.piliplus.desktop"
cp assets/images/logo/logo.png "$SRC_DIR/assets/piliplus.png"
tar -zcvf "$RPM_BUILD_ROOT/SOURCES/piliplus-${{ env.version }}.tar.gz" -C "$PWD" "piliplus-${{ env.version }}"
printf "生成 spec 文件...\n"
cat > "$RPM_BUILD_ROOT/SPECS/piliplus.spec" <<EOF
Name: piliplus
Version: ${{ env.version }}
Release: 1%{?dist}
Summary: PiliPlus Linux Version
License: GPL-3.0
Source0: piliplus-${{ env.version }}.tar.gz
Requires: desktop-file-utils, hicolor-icon-theme
%description
使用 Flutter 开发的 BiliBili 第三方客户端
%prep
%setup -q -n piliplus-${{ env.version }}
%build
%install
mkdir -p %{buildroot}/opt/PiliPlus
cp -r bundle/* %{buildroot}/opt/PiliPlus/
# 二进制权限与命令行入口
chmod 755 %{buildroot}/opt/PiliPlus/piliplus
mkdir -p %{buildroot}/usr/bin
ln -sf /opt/PiliPlus/piliplus %{buildroot}/usr/bin/piliplus
# 桌面集成
mkdir -p %{buildroot}/usr/share/applications
install -m 644 assets/com.example.piliplus.desktop %{buildroot}/usr/share/applications/com.example.piliplus.desktop
mkdir -p %{buildroot}/usr/share/icons/hicolor/512x512/apps
install -m 644 assets/piliplus.png %{buildroot}/usr/share/icons/hicolor/512x512/apps/piliplus.png
%post
update-desktop-database -q || true
gtk-update-icon-cache -q -t -f %{_datadir}/icons/hicolor || true
%postun
update-desktop-database -q || true
gtk-update-icon-cache -q -t -f %{_datadir}/icons/hicolor || true
%files
/opt/PiliPlus
/usr/bin/piliplus
/usr/share/applications/com.example.piliplus.desktop
/usr/share/icons/hicolor/512x512/apps/piliplus.png
%changelog
* DATE - ${{ env.version }}-1
- Initial RPM release
EOF
sed -i "s/DATE/${DATE}/g" "$RPM_BUILD_ROOT/SPECS/piliplus.spec"
printf "构建 RPM 包...\n"
rpmbuild --define "_topdir $RPM_BUILD_ROOT" -bb "$RPM_BUILD_ROOT/SPECS/piliplus.spec"
printf "移动生成的 RPM...\n"
find "$RPM_BUILD_ROOT/RPMS" -name "*.rpm" -exec mv {} "PiliPlus_linux_${{ env.version }}_amd64.rpm" \;
printf "完成: PiliPlus_linux_%s_amd64.rpm\n" "${{ env.version }}"
shell: bash
- name: Package AppImage
run: |
printf "下载 appimagetool...\n"
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
printf "建立 AppDir 目录结构...\n"
APPDIR="PiliPlus.AppDir"
mkdir -p "$APPDIR/usr/bin"
mkdir -p "$APPDIR/usr/lib"
mkdir -p "$APPDIR/usr/share/applications"
mkdir -p "$APPDIR/usr/share/icons/hicolor/512x512/apps"
printf "复制应用文件...\n"
cp -r build/linux/x64/release/bundle/* "$APPDIR/usr/bin/"
printf "复制桌面文件和图标...\n"
cp assets/linux/com.example.piliplus.desktop "$APPDIR/com.example.piliplus.desktop"
cp assets/linux/com.example.piliplus.desktop "$APPDIR/usr/share/applications/com.example.piliplus.desktop"
cp assets/images/logo/logo.png "$APPDIR/piliplus.png"
cp assets/images/logo/logo.png "$APPDIR/usr/share/icons/hicolor/512x512/apps/piliplus.png"
printf "创建 AppRun 启动脚本...\n"
cat > "$APPDIR/AppRun" <<'APPRUN_EOF'
#!/bin/bash
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
export PATH="${HERE}/usr/bin:${PATH}"
export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
exec "${HERE}/usr/bin/piliplus" "$@"
APPRUN_EOF
chmod +x "$APPDIR/AppRun"
printf "修改桌面文件中的 Exec 路径...\n"
sed -i 's|Exec=piliplus|Exec=piliplus|g' "$APPDIR/com.example.piliplus.desktop"
sed -i 's|Icon=piliplus|Icon=piliplus|g' "$APPDIR/com.example.piliplus.desktop"
printf "打包 AppImage...\n"
ARCH=x86_64 ./appimagetool-x86_64.AppImage "$APPDIR" "PiliPlus_linux_${{ env.version }}_amd64.AppImage"
printf "完成: PiliPlus_linux_%s_amd64.AppImage\n" "${{ env.version }}"
shell: bash
- name: Release
if: ${{ github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: |
PiliPlus_linux_*.tar.gz
PiliPlus_linux_*.deb
PiliPlus_linux_*.rpm
PiliPlus_linux_*.AppImage
- name: Upload linux targz package
uses: actions/upload-artifact@v7
with:
archive: false
name: Linux_targz_amd64_packege
path: PiliPlus_linux_*.tar.gz
- name: Upload linux deb package
uses: actions/upload-artifact@v7
with:
archive: false
name: Linux_deb_amd64_package
path: PiliPlus_linux_*.deb
- name: Upload linux rpm package
uses: actions/upload-artifact@v7
with:
archive: false
name: Linux_rpm_amd64_package
path: PiliPlus_linux_*.rpm
- name: Upload linux AppImage package
uses: actions/upload-artifact@v7
with:
archive: false
name: Linux_AppImage_amd64_package
path: PiliPlus_linux_*.AppImage

View File

@@ -1,19 +1,14 @@
name: Build for Mac
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- '**.md'
workflow_dispatch:
workflow_call:
inputs:
branch:
tag:
description: "tag"
required: false
default: 'main'
default: ""
type: string
workflow_dispatch:
jobs:
build-mac-app:
@@ -21,9 +16,8 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
@@ -32,24 +26,44 @@ jobs:
channel: stable
flutter-version-file: pubspec.yaml
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true
- name: Build Mac
run: |
dart lib/scripts/build.dart
VERSION=$(cat pubspec.yaml | grep 'version:' | sed 's/version: //g' | tr -d '[:space:]')
echo "version=$VERSION" >> $GITHUB_ENV
flutter build macos --release
run: flutter build macos --release --dart-define-from-file=pili_release.json
- name: Prepare Upload
run: |
npm install --global create-dmg
create-dmg build/macos/Build/Products/Release/PiliPlus.app
create-dmg build/macos/Build/Products/Release/PiliPlus.app || true
continue-on-error: true
- name: Rename DMG
run: mv PiliPlus*.dmg PiliPlus_macos_${{ env.version }}.dmg
- name: Upload macos release
uses: actions/upload-artifact@v4
- name: Release
if: ${{ github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
name: macos-release
path: PiliPlus*.dmg
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: |
PiliPlus_macos_*.dmg
- name: Upload macos release
uses: actions/upload-artifact@v7
with:
archive: false
name: macOS-release
path: PiliPlus_macos_*.dmg

View File

@@ -1,49 +0,0 @@
name: Build for Windows
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
branch:
required: false
default: 'main'
jobs:
build-windows-app:
name: Release Windows
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Build Windows
run: |
dart lib/scripts/build.dart
flutter build windows --release
- name: Prepare Upload
run: |
mkdir -p Release/PiliPlus-Win
mv build/windows/x64/runner/Release/* Release/PiliPlus-Win/
- name: Upload windows release
uses: actions/upload-artifact@v4
with:
name: windows-release
path: Release

94
.github/workflows/win_x64.yml vendored Normal file
View File

@@ -0,0 +1,94 @@
name: Build for Windows x64
on:
workflow_call:
inputs:
tag:
description: "tag"
required: false
default: ""
type: string
workflow_dispatch:
jobs:
build-windows-app:
name: Release Windows x64
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\modal_barrier_patch.diff || true
shell: pwsh
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\mouse_cursor_patch.diff || true
shell: pwsh
continue-on-error: true
- name: Add fastforge and Inno Setup
run: |
dart pub global activate fastforge
choco install innosetup
- name: Add Chinese language file for Inno Setup
run: |
Copy-Item "windows/packaging/exe/ChineseSimplified.isl" "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl"
shell: pwsh
- name: Set and Extract version
shell: pwsh
run: lib/scripts/build.ps1
- name: Build Windows
run: |
fastforge package --platform windows --targets exe --flutter-build-args="dart-define-from-file=pili_release.json"
- name: Prepare Upload
run: |
mkdir -p Release/PiliPlus-Win
mkdir -p PiliPlus-Win-Setup
mv build/windows/x64/runner/Release/* Release/PiliPlus-Win/
mv dist/**/*.exe PiliPlus-Win-Setup/PiliPlus_windows_${{env.version}}_x64_setup.exe
- name: Compress
if: ${{ github.event.inputs.tag != '' }}
run: |
Compress-Archive -Path "Release/PiliPlus-Win" -DestinationPath "PiliPlus_windows_${{env.version}}_x64_portable.zip"
shell: pwsh
- name: Release
if: ${{ github.event.inputs.tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: ${{ github.event.inputs.tag }}
files: |
PiliPlus_windows_*.zip
PiliPlus-Win-Setup/PiliPlus_windows_*.exe
- name: Upload windows file release
uses: actions/upload-artifact@v7
with:
archive: true
name: PiliPlus_windows_${{env.version}}_x64_portable
path: Release
- name: Upload windows setup release
uses: actions/upload-artifact@v7
with:
archive: false
name: Windows-setup-x64-release
path: PiliPlus-Win-Setup/PiliPlus_windows_*.exe

15
.gitignore vendored
View File

@@ -19,7 +19,7 @@ migrate_working_dir/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
.vscode/
# Flutter repo-specific
/bin/cache/
@@ -134,7 +134,16 @@ app.*.symbols
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!.vscode/settings.json
/lib/build_config.dart
!.vscode/launch.json
!.vscode/tasks.json
devtools_options.yaml
# FVM Version Cache
.fvm/
pili_release.json
dist
test*.dart

8
.vscode/launch.json vendored
View File

@@ -1,22 +1,22 @@
{
// 使用 IntelliSense 了解相关属性。
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "piliplus",
"name": "PiliPlus",
"request": "launch",
"type": "dart"
},
{
"name": "piliplus (profile mode)",
"name": "PiliPlus (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "piliplus (release mode)",
"name": "PiliPlus (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"

View File

@@ -43,8 +43,15 @@
## feat
- [x] 编辑动态
- [x] DLNA 投屏
- [x] 离线缓存/播放
- [x] 移动端支持点击弹幕悬停,点赞、复制、举报 by [@My-Responsitories](https://github.com/My-Responsitories)
- [x] 播放音频
- [x] 跳过番剧片头/片尾
- [x] 安卓端 `loudnorm` 适配 by [@My-Responsitories](https://github.com/My-Responsitories)
- [x] Win/Mac 支持极验、短信登录 by [@My-Responsitories](https://github.com/My-Responsitories)
- [x] 视频截取 GIF by [@My-Responsitories](https://github.com/My-Responsitories)
- [x] 视频截取动图 by [@My-Responsitories](https://github.com/My-Responsitories)
- [x] AI 原声翻译
- [x] SuperChat
- [x] 播放课堂视频
@@ -147,7 +154,7 @@
- [x] 粉丝、关注用户、拉黑用户查看
- [x] 用户主页查看
- [x] 关注/取关用户
- [ ] 离线缓存
- [x] 离线缓存
- [x] 稍后再看
- [x] 观看记录
- [x] 我的收藏
@@ -212,8 +219,8 @@
## 声明
此项目PiliPlus是个人为了兴趣而开发, 仅用于学习和测试请于下载后24小时内删除。
所用API皆从官方网站收集, 不提供任何破解内容。
此项目PiliPlus是个人为了兴趣而开发仅用于学习和测试请于下载后24小时内删除。
所用API皆从官方网站收集不提供任何破解内容。
在此致敬原作者:[guozhigq/pilipala](https://github.com/guozhigq/pilipala)
在此致敬上游作者:[orz12/PiliPalaX](https://github.com/orz12/PiliPalaX)
本仓库做了更激进的修改,感谢原作者的开源精神。

View File

@@ -12,7 +12,8 @@ include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- lib/grpc/bilibili/**
- lib/grpc/google/**
# - lib/grpc/google/**
# - lib/common/widgets/flutter/**
formatter:
trailing_commas: preserve
@@ -63,5 +64,13 @@ linter:
- use_null_aware_elements
- unnecessary_lambdas
- use_is_even_rather_than_modulo
- unnecessary_async
- unnecessary_await_in_return
- unnecessary_getters_setters
- prefer_const_literals_to_create_immutables
- no_literal_bool_comparisons
- use_truncating_division
- use_string_buffers
- unnecessary_statements
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View File

@@ -210,4 +210,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"/>
</manifest>

View File

@@ -1,5 +1,6 @@
package com.example.piliplus
import android.app.PictureInPictureParams
import android.app.SearchManager
import android.content.ComponentName
import android.content.Intent
@@ -42,7 +43,10 @@ class MainActivity : AudioServiceActivity() {
val cookies = call.argument<List<String>>("cookies") ?: emptyList<String>()
val intent = Intent().apply {
component = ComponentName("icu.freedomIntrovert.biliSendCommAntifraud", "icu.freedomIntrovert.biliSendCommAntifraud.ByXposedLaunchedActivity")
component = ComponentName(
"icu.freedomIntrovert.biliSendCommAntifraud",
"icu.freedomIntrovert.biliSendCommAntifraud.ByXposedLaunchedActivity"
)
putExtra("action", action)
putExtra("oid", oid.toLong())
putExtra("type", type)
@@ -51,23 +55,27 @@ class MainActivity : AudioServiceActivity() {
putExtra("parent", parent.toLong())
putExtra("ctime", ctime.toLong())
putExtra("comment_text", commentText)
if(pictures != null)
if (pictures != null)
putExtra("pictures", pictures)
putExtra("source_id", sourceId)
putExtra("uid", uid.toLong())
putStringArrayListExtra("cookies", ArrayList(cookies))
}
startActivity(intent)
} catch (_: Exception) {}
} catch (_: Exception) {
}
}
"linkVerifySettings" -> {
val uri = ("package:" + context.packageName).toUri()
try {
val intent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
Intent(Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS, uri)
} else {
Intent("android.intent.action.MAIN", uri).setClassName("com.android.settings",
"com.android.settings.applications.InstalledAppOpenByDefaultActivity")
Intent("android.intent.action.MAIN", uri).setClassName(
"com.android.settings",
"com.android.settings.applications.InstalledAppOpenByDefaultActivity"
)
}
context.startActivity(intent)
} catch (_: Throwable) {
@@ -75,33 +83,56 @@ class MainActivity : AudioServiceActivity() {
context.startActivity(intent)
}
}
"music" -> {
val title = call.argument<String>("title")
val intent = Intent(MediaStore.INTENT_ACTION_MEDIA_SEARCH).apply {
putExtra(SearchManager.QUERY, title)
putExtra(MediaStore.EXTRA_MEDIA_TITLE, title)
call.argument<String?>("artist")?.let { putExtra(MediaStore.EXTRA_MEDIA_ARTIST, it) }
call.argument<String?>("album")?.let { putExtra(MediaStore.EXTRA_MEDIA_ALBUM, it) }
call.argument<String?>("artist")
?.let { putExtra(MediaStore.EXTRA_MEDIA_ARTIST, it) }
call.argument<String?>("album")
?.let { putExtra(MediaStore.EXTRA_MEDIA_ALBUM, it) }
addCategory(Intent.CATEGORY_DEFAULT)
}
try {
if (packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null) {
if (packageManager.resolveActivity(
intent,
PackageManager.MATCH_DEFAULT_ONLY
) != null
) {
startActivity(intent)
result.success(true)
return@setMethodCallHandler
}
} catch (_: Throwable) {}
} catch (_: Throwable) {
}
try {
intent.action = MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH
if (packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null) {
if (packageManager.resolveActivity(
intent,
PackageManager.MATCH_DEFAULT_ONLY
) != null
) {
startActivity(intent)
result.success(true)
return@setMethodCallHandler
}
} catch (_: Throwable) {}
} catch (_: Throwable) {
}
result.success(false)
}
"setPipAutoEnterEnabled" -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val params = PictureInPictureParams.Builder()
.setAutoEnterEnabled(call.argument<Boolean>("autoEnable") ?: false)
.build()
setPictureInPictureParams(params)
}
}
else -> result.notImplemented()
}
}
@@ -124,6 +155,7 @@ class MainActivity : AudioServiceActivity() {
}
override fun onDestroy() {
stopService(Intent(this, com.ryanheise.audioservice.AudioService::class.java))
super.onDestroy()
android.os.Process.killProcess(android.os.Process.myPid())
exitProcess(0)
@@ -134,7 +166,10 @@ class MainActivity : AudioServiceActivity() {
methodChannel.invokeMethod("onUserLeaveHint", null)
}
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration?) {
override fun onPictureInPictureModeChanged(
isInPictureInPictureMode: Boolean,
newConfig: Configuration?
) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
MethodChannel(
flutterEngine!!.dartExecutor.binaryMessenger,

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -20,7 +20,7 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.12.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@@ -0,0 +1,16 @@
Package: PiliPlus
Version: version_need_change
Maintainer: gh-MzA4Nzk <githubaccount2333@proton.me>
Original-Maintainer: bggRGjQaUbCoE <githubaccount56556@proton.me>
Section: x11
Priority: optional
Architecture: amd64
Essential: no
Installed-Size: size_need_change
Description: third-party Bilibili client developed in Flutter
Homepage: https://github.com/bggRGjQaUbCoE/PiliPlus
Depends: libgtk-3-0t64,
libmpv2,
gir1.2-ayatanaappindicator3-0.1,
libayatana-appindicator3-1

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
ln -sf /opt/PiliPlus/piliplus /usr/bin/piliplus
chmod +x /usr/bin/piliplus
if [ $1 == "configure" ] && [ -x /usr/bin/update-mime-database ]; then
echo "updating mime database..."
update-mime-database /usr/share/mime || true
fi
if [ $1 == "configure" ] && [ -x /usr/bin/gtk-update-icon-cache ]; then
echo "updating icon cache..."
gtk-update-icon-cache -q -f -t /usr/share/icons/hicolor || true
fi
if [ $1 == "configure" ] && [ -x /usr/bin/update-desktop-database ]; then
echo "configure desktop database..."
update-desktop-database -q /usr/share/applications || true
fi
exit 0

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
rm /usr/bin/piliplus
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
if [ -x /usr/bin/update-desktop-database ]; then
echo "updating desktop database..."
update-desktop-database -q /usr/share/applications || true
fi
if [ -x /usr/bin/gtk-update-icon-cache ]; then
echo "updating icon cache..."
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
fi
if [ -x /usr/bin/update-mime-database ]; then
echo "updating mime database..."
update-mime-database /usr/share/mime || true
fi
fi
if [ $1 = "purge" ]; then
echo "Removing user data..."
rm -rf /home/*/.local/share/com.example.PiliPlus || true
rm -rf /root/.local/share/com.example.PiliPlus || true
fi
exit 0

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
echo "Stopping PiliPlus if running..."
pkill -x piliplus || true
fi
exit 0

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Name=PiliPlus
Comment=A third-party Bilibili Client developed in Flutter
Comment[zh_CN]=使用 Flutter 开发的 BiliBili 第三方客户端
Exec=piliplus
Icon=piliplus
Terminal=false
StartupWMClass=com.example.piliplus
Categories=Video;AudioVideo;Player;

View File

@@ -1,11 +0,0 @@
## 1.0.0
### 初始版本
+ 直播、推荐、动态功能
+ 投稿、番剧播放功能
+ 播放器手势支持
+ 画质、音质、解码格式支持
+ 点赞、投币、收藏功能
+ 关注/取关、用户主页功能
+ 评论功能
+ 历史记录、稍后再看功能

View File

@@ -1,7 +0,0 @@
## 1.0.1
### 修复
+ 升级播放器依赖
+ android平台 AV1格式视频支持
+ 视频全屏功能

View File

@@ -1,4 +0,0 @@
## 1.0.10
### 修复
+ 长按倍速抬起后未恢复默认倍速

View File

@@ -1,26 +0,0 @@
## 1.0.11
### 新功能
+ 适配了原生媒体通知栏 @Daydreamer-riri
+ 视频主题图标 @Daydreamer-riri
+ 关闭软件后自动画中画播放
+ UP主分组管理
+ md2样式底栏
+
### 修复
+ 历史记录记忆播放
+ 部分类型视频连播
+ 播放速度选择框不支持返回手势
+ 播放速度选择框不支持返回手势
+ 视频播放速度总是显示1.0X
+ 评论页面计数错误
+ 退出视频还有声音
### 优化
+ 视频加载速度
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,11 +0,0 @@
## 1.0.12
### 修复
+ iOS端视频播放时没有声音
+ 超过6分钟弹幕不显示
+ 视频详情页网络异常
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,22 +0,0 @@
## 1.0.13
### 新功能
+ 视频详情页稍后再看
+ 发送弹幕 感谢@orz12
+ 消息展示
+ up主页显示获赞数
+ up主页显示合集
+ 视频详情页「ai总结」增加开关
### 修复
+ 首页推荐问题(需要重新登录)
+ 长按倍速逻辑
+ 视频详情页网络异常
### 优化
+ 设置面板样式 感谢@GuMengYu @KoolShow
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,28 +0,0 @@
## 1.0.14
圣诞节快乐~ 🎉
大部分内容由@orz12提供,感谢👏
### 修复
+ 全屏弹幕消失
+ iOS全屏/退出全屏视频暂停
+ 个人主页关注状态
+ 视频合集向下滑动UI问题
+ 媒体库滑动底栏不隐藏
+ 个人主页动态加载问题 * 2
+ 未登录状态访问个人主页异常
+ 视频搜索标题特殊字符转义
+ iOS闪退
+ 消息页面夜间模式异常
+ 消息页面含有撤回消息时异常
+ 弹幕速度
### 优化
+ 全屏播放方案优化
+ 弹幕加载逻辑优化
+ 点赞、投币逻辑优化
+ 进度条及播放时间渲染优化
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,22 +0,0 @@
## 1.0.15
元旦快乐~ 🎉
### 功能
+ 转发动态评论展示
+ 推荐、最热、收藏视频增肌日期显示
### 修复
+ 全屏播放相关问题
+ 评论区@用户展示问题
+ 登录状态闪退问题
+ pip意外触发问题
+ 动态页tab切换样式问题
### 优化
+ 首页默认使用web端推荐
+ 取消iOS路由切换效果
+ 视频分享中添加Up主
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,15 +0,0 @@
## 1.0.16
### 功能
+ toast 背景支持透明度调节
### 修复
+ web端推荐未展示【已关注】
+ up主动态页异常
+ 未打开自动播放时,视频详情页异常
+ 视频暂停状态取消自动ip
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,39 +0,0 @@
## 1.0.17
### 功能
+ 视频全屏时隐藏进度条
+ 动态内容增加投稿跳转
+ 未开启自动播放时点击封面播放
+ 弹幕发送标识
+ 定时关闭
+ 推荐视频卡片拉黑up功能
+ 首页tabbar编辑排序
### 修复
+ 连续跳转搜索页未刷新
+ 搜索结果为空时页面异常
+ 评论区链接解析
+ 视频全屏状态栏背景色
+ 私信对话气泡位置
+ 设置up关注分组样式
+ 每次推荐请求数据相同
+ iOS代理网络异常
+ 双击切换播放状态无声
+ 设置自定义倍速白屏
+ 免登录查看1080p
### 优化
+ 首页web端推荐观看数展示
+ 首页web端推荐接口更新
+ 首页样式
+ 搜索页跳转
+ 弹幕资源优化
+ 图片渲染占用内存优化(部分)
+ 两次返回退出应用
+ schame 补充
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,16 +0,0 @@
## 1.0.18
### 功能
### 修复
### 优化
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,15 +0,0 @@
## 1.0.19
### 修复
+ 视频404、评论加载错误
+ bvav转换
### 优化
+ 视频详情页内存占用
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,19 +0,0 @@
## 1.0.2
### 新功能
+ 自动检查更新
+ 封面图片保存
+ 动态跳转番剧
+ 历史记录番剧记忆播放
+ 一键清空稍后再看
### 修复
+ 切换分P cid未切换
+ cookie存储问题
+ 登录/退出登录问题
### 优化
+ 页面空/异常状态样式
+ 退出登录提示
+ 请求节流
+ 全屏播放

View File

@@ -1,19 +0,0 @@
## 1.0.3
建议卸载1.0.2版本,重新安装
### 新功能
+ 底部播放进度条设置
+ 复制图片链接
### 修复
+ 用户数据格式修改
+ video Fit
+ 没有audio 资源的视频异常
+ 评论区域图片无法点击
+ 视频进度条拖动问题
### 优化
+ 页面空/异常状态样式
+ 部分页面样式
+ 图片预览页面样式

View File

@@ -1,21 +0,0 @@
## 1.0.4
### 新功能
+ 热搜刷新
+ 视频搜索排序、筛选
+ app字体大小自定义
+ app主题色自定义
+ 「课堂」类动态渲染
### 修复
+ 搜索词联想richText渲染异常
+ 部分动态点赞异常
+ 默认视频解码格式
+ 搜索页面返回搜索词未清空
+ 动态详情评论加载异常
+ 动态页面下拉刷新数据异常
### 优化
+ 一些样式修改
+ 取消热搜词缓存

View File

@@ -1,30 +0,0 @@
## 1.0.5
主要是bug修复跟一部分小功能弹幕功能需要下一版。
问题反馈请前往QQ频道或提交issues。
感谢🙏酷友「无力感*」「斤斤计较呀」「Pseudopamine」
### 新功能
+ 高帧率支持
+ 默认评论排序设置
+ 默认动态类别设置
+ 动态合集查看
+ 同时观看人数
+ iOS路由切换效果
### 修复
+ 收藏夹翻页
+ 首页搜索框频繁点击消失
+ 评论排序切换空白
+ 快速返回首页
+ 重复进入个人中心页面数据未刷新
+ 动态goods数据异常
+ 大会员切换番剧
+ 高画质codes匹配
### 优化
+ 倍速选择
+ 播放器亮度记忆
+ 下载对应版本apk

View File

@@ -1,34 +0,0 @@
## 1.0.6
问题反馈、功能建议请查看「关于」页面。
### 新功能
+ 首页单列布局
+ 首页推荐展示播放量、弹幕数
+ 简单弹幕功能实现(持续开发中...
+ 评论区搜索关键词开关 issues#46
+ 热搜榜隐藏功能 issues#35
+ 自动全屏 issues#37
+ 快速收藏功能
+ 双击快进/快退开关
+ 评论链接跳转视频
+ 支持移除单个稍后再看
+ app scheme外链跳转
### 修复
+ 杜比、无损音频切换
+ 收藏夹展示 issues#42
+ 搜索建议次 issues#47
### 优化
+ 倍速选择优化
+ 导航条沉浸
+ 取消Hero动画
+ 视频锁定逻辑
+ 登录逻辑优化
+ 图片预览样式
+ +评论区用户点击范围
+ 关注、粉丝页面优化
+ 关闭自动播放时播放器初始化逻辑

View File

@@ -1,22 +0,0 @@
## 1.0.7
默认倍速、直播弹幕、专栏等功能开发中
### 新功能
+ 弹幕设置、屏蔽功能
+ 不是很完美的后台播放功能
+ 不是很完美的画中画(pip)功能Android端
### 修复
+ 动态页面加载异常
+ 网络异常时页面空白
+ 竖屏全屏状态栏问题
+ iOS端代理请求异常
### 优化
+ 图片预览
+ 全屏播放时自动旋转
+ 转发内容增加视频标题
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,24 +0,0 @@
## 1.0.8
直播弹幕、循环播放等功能开发中
### 新功能
+ 用户拉黑功能
+ gif图片保存
+ 删除已看历史记录
### 修复
+ 弹幕数量较少
+ 弹幕屏蔽设置自动记忆
+ 动态页面渲染
+ 用户主页数据错乱
+ 大家都在搜空白
+ 默认自动全屏,顶部操作栏丢失
### 优化
+ 全屏状态栏区域显示优化
+ 图片保存至PiliPala文件夹
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

View File

@@ -1,28 +0,0 @@
## 1.0.9
### 新功能
+ 自定义倍速、默认倍速
+ 历史记录搜索
+ 收藏夹搜索
+ 历史记录多选删除
+ 视频循环播放
+ 免登录看1080P
+ 评论区视频链接跳转
+ up主分组
+ up主投稿搜索
### 修复
+ 搜索视频标题乱码
+ 屏幕帧率
+ 动态页面渲染
### 优化
+ 快进手势
+ 视频简介链接匹配
+ 视频全屏时安全区域
更多更新日志可在Github上查看
问题反馈、功能建议请查看「关于」页面。

1
distribute_options.yaml Normal file
View File

@@ -0,0 +1 @@
output: dist/

View File

@@ -1,10 +0,0 @@
PiliPlus is a third-party Bilibili client developed in Flutter,
fork from PiliPalaX (https://github.com/orz12/PiliPalaX).
Top Features:
* List of recommended videos
* List of hottest videos
* Popular live streams
* List of bangumis
* Block videos from blacklisted users

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -1 +0,0 @@
A third-party Bilibili client developed in Flutter

View File

@@ -1 +0,0 @@
PiliPlus

View File

@@ -1,10 +0,0 @@
PiliPlus 是使用 Flutter 开发的 BiliBili 第三方客户端,
是由PiliPalaX仓库fork并进行了差异化开发的版本
主要功能:
* 推荐视频列表
* 最热视频列表
* 热门直播
* 番剧列表
* 屏蔽黑名单内用户视频

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -1 +0,0 @@
使用 Flutter 开发的 BiliBili 第三方客户端

View File

@@ -1 +0,0 @@
PiliPlus

View File

@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>13.0</string>
</dict>
</plist>

View File

@@ -1,83 +1,135 @@
PODS:
- appscheme (1.0.4):
- app_links (7.0.0):
- Flutter
- audio_service (0.0.1):
- Flutter
- FlutterMacOS
- audio_session (0.0.1):
- Flutter
- auto_orientation (0.0.1):
- Flutter
- chat_bottom_container (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.9):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.9)
- DKImagePickerController/PhotoGallery (4.3.9):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.3.9)
- DKPhotoGallery (0.0.19):
- DKPhotoGallery/Core (= 0.0.19)
- DKPhotoGallery/Model (= 0.0.19)
- DKPhotoGallery/Preview (= 0.0.19)
- DKPhotoGallery/Resource (= 0.0.19)
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Core (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Model (0.0.19):
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Preview (0.0.19):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SwiftyGif
- DKPhotoGallery/Resource (0.0.19):
- SDWebImage
- SwiftyGif
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- flutter_inappwebview_ios (0.0.1):
- Flutter
- flutter_inappwebview_ios/Core (= 0.0.1)
- OrderedSet (~> 6.0.3)
- flutter_inappwebview_ios/Core (0.0.1):
- Flutter
- OrderedSet (~> 6.0.3)
- flutter_mailer (0.0.1):
- Flutter
- flutter_native_splash (2.4.3):
- Flutter
- flutter_volume_controller (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
- Toast
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- gt3_flutter_plugin (0.0.8):
- gt3_flutter_plugin (0.0.9):
- Flutter
- GT3Captcha-iOS
- GT3Captcha-iOS (0.15.8.3)
- image_cropper (0.0.4):
- Flutter
- TOCropViewController (~> 2.8.0)
- image_picker_ios (0.0.1):
- Flutter
- live_photo_maker (0.0.3):
- Flutter
- media_kit_libs_ios_video (1.0.4):
- Flutter
- media_kit_native_event_loop (1.0.0):
- Flutter
- media_kit_video (0.0.1):
- Flutter
- OrderedSet (6.0.3)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- permission_handler_apple (9.3.0):
- Flutter
- ReachabilitySwift (5.0.0)
- saver_gallery (0.0.1):
- Flutter
- screen_brightness_ios (0.1.0):
- Flutter
- SDWebImage (5.21.3):
- SDWebImage/Core (= 5.21.3)
- SDWebImage/Core (5.21.3)
- share_plus (0.0.1):
- Flutter
- sqflite (0.0.3):
- shared_preferences_foundation (0.0.1):
- Flutter
- FMDB (>= 2.7.5)
- status_bar_control (3.2.1):
- FlutterMacOS
- sqflite_darwin (0.0.4):
- Flutter
- system_proxy (0.0.1):
- Flutter
- Toast (4.1.0)
- FlutterMacOS
- SwiftyGif (5.4.5)
- TOCropViewController (2.8.0)
- url_launcher_ios (0.0.1):
- Flutter
- volume_controller (0.0.1):
- Flutter
- wakelock_plus (0.0.1):
- Flutter
- webview_cookie_manager (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
DEPENDENCIES:
- appscheme (from `.symlinks/plugins/appscheme/ios`)
- audio_service (from `.symlinks/plugins/audio_service/ios`)
- 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`)
- chat_bottom_container (from `.symlinks/plugins/chat_bottom_container/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_volume_controller (from `.symlinks/plugins/flutter_volume_controller/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- gt3_flutter_plugin (from `.symlinks/plugins/gt3_flutter_plugin/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- live_photo_maker (from `.symlinks/plugins/live_photo_maker/ios`)
- 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`)
@@ -87,45 +139,58 @@ DEPENDENCIES:
- saver_gallery (from `.symlinks/plugins/saver_gallery/ios`)
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- status_bar_control (from `.symlinks/plugins/status_bar_control/ios`)
- system_proxy (from `.symlinks/plugins/system_proxy/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- webview_cookie_manager (from `.symlinks/plugins/webview_cookie_manager/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS:
trunk:
- FMDB
- DKImagePickerController
- DKPhotoGallery
- GT3Captcha-iOS
- ReachabilitySwift
- Toast
- OrderedSet
- SDWebImage
- SwiftyGif
- TOCropViewController
EXTERNAL SOURCES:
appscheme:
:path: ".symlinks/plugins/appscheme/ios"
app_links:
:path: ".symlinks/plugins/app_links/ios"
audio_service:
:path: ".symlinks/plugins/audio_service/ios"
:path: ".symlinks/plugins/audio_service/darwin"
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
auto_orientation:
:path: ".symlinks/plugins/auto_orientation/ios"
chat_bottom_container:
:path: ".symlinks/plugins/chat_bottom_container/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
flutter_inappwebview_ios:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
flutter_mailer:
:path: ".symlinks/plugins/flutter_mailer/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_volume_controller:
:path: ".symlinks/plugins/flutter_volume_controller/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
gt3_flutter_plugin:
:path: ".symlinks/plugins/gt3_flutter_plugin/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
live_photo_maker:
:path: ".symlinks/plugins/live_photo_maker/ios"
media_kit_libs_ios_video:
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
media_kit_native_event_loop:
@@ -144,57 +209,55 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/screen_brightness_ios/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
status_bar_control:
:path: ".symlinks/plugins/status_bar_control/ios"
system_proxy:
:path: ".symlinks/plugins/system_proxy/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
volume_controller:
:path: ".symlinks/plugins/volume_controller/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
webview_cookie_manager:
:path: ".symlinks/plugins/webview_cookie_manager/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
app_links: 6d01271b3907b0ee7325c5297c75d697c4226c4d
audio_service: cab6c1a0eaf01b5a35b567e11fa67d3cc1956910
audio_session: 19e9480dbdd4e5f6c4543826b2e8b0e4ab6145fe
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
chat_bottom_container: d8b077152c91b0ab90001e900748ea50353a5520
connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
file_picker: b159e0c068aef54932bb15dc9fd1571818edaf49
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
flutter_native_splash: df59bb2e1421aa0282cb2e95618af4dcb0c56c29
flutter_volume_controller: e4d5832f08008180f76e30faf671ffd5a425e529
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gt3_flutter_plugin: bfa1f26e9a09dc00401514be5ed437f964cabf23
fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f
gt3_flutter_plugin: 5bd2c08d3c19cbb6ee3b08f4358439e54c8ab2ee
GT3Captcha-iOS: 5e3b1077834d8a9d6f4d64a447a30af3e14affe6
image_cropper: b8ef14d3fcff4040b0f9da2ca28d98219a5cba0e
image_picker_ios: 4f2f91b01abdb52842a8e277617df877e40f905b
live_photo_maker: 7d57bfc70a120b4673c10871f354f4b1b6fde5fd
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
saver_gallery: 2b4e584106fde2407ab51560f3851564963e6b78
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
status_bar_control: 7c84146799e6a076315cc1550f78ef53aae3e446
system_proxy: bec1a5c5af67dd3e3ebf43979400a8756c04cc44
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
saver_gallery: 76172dc4bf6b40e66d694948ada9ff402304dd87
screen_brightness_ios: 6a6f7794b67f07c4f1e24f6374b2d8ad367ffb39
SDWebImage: 16309af6d214ba3f77a7c6f6fdda888cb313a50a
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
TOCropViewController: 797deaf39c90e6e9ddd848d88817f6b9a8a09888
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa
wakelock_plus: 76957ab028e12bfa4e66813c99e46637f367fc7e
PODFILE CHECKSUM: 637cd290bed23275b5f5ffcc7eb1e73d0a5fb2be
PODFILE CHECKSUM: f62db4fb414ebdecb264109948f76dfef35fdc3d
COCOAPODS: 1.14.3
COCOAPODS: 1.16.2

View File

@@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@@ -1,14 +1,17 @@
import UIKit
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
application.applicationSupportsShakeToEdit = false // Disable shake to undo
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

View File

@@ -2,6 +2,27 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>FlutterDeepLinkingEnabled</key>
<false/>
<key>CFBundleDevelopmentRegion</key>

16
lib/build_config.dart Normal file
View File

@@ -0,0 +1,16 @@
abstract final class BuildConfig {
static const int versionCode = int.fromEnvironment(
'pili.code',
defaultValue: 1,
);
static const String versionName = String.fromEnvironment(
'pili.name',
defaultValue: 'SNAPSHOT',
);
static const int buildTime = int.fromEnvironment('pili.time');
static const String commitHash = String.fromEnvironment(
'pili.hash',
defaultValue: 'N/A',
);
}

View File

@@ -1,18 +1,31 @@
import 'package:PiliPlus/http/constants.dart';
import 'package:flutter/material.dart';
class StyleString {
abstract final class StyleString {
static const double cardSpace = 8;
static const double safeSpace = 12;
static const BorderRadius mdRadius = BorderRadius.all(imgRadius);
static const Radius imgRadius = Radius.circular(10);
static const double aspectRatio = 16 / 10;
static const double aspectRatio16x9 = 16 / 9;
static const double imgMaxRatio = 22 / 9;
static const bottomSheetRadius = BorderRadius.vertical(
top: Radius.circular(18),
);
static const dialogFixedConstraints = BoxConstraints(
minWidth: 420,
maxWidth: 420,
);
static const topBarHeight = 52.0;
static const buttonStyle = ButtonStyle(
visualDensity: VisualDensity(
horizontal: -2,
vertical: -1.25,
),
tapTargetSize: .shrinkWrap,
);
}
class Constants {
abstract final class Constants {
static const appName = 'PiliPlus';
static const sourceCodeUrl = 'https://github.com/bggRGjQaUbCoE/PiliPlus';
@@ -21,9 +34,9 @@ class Constants {
static const String appKey = 'dfca71928277209b';
// 59b43e04ad6965f34319062b478f83dd TV端
static const String appSec = 'b5475a8825547a4fc26c7d518eaaa02e';
static const String thirdSign = '04224646d1fea004e79606d3b038c84a';
static const String thirdApi =
'https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png';
// static const String thirdSign = '04224646d1fea004e79606d3b038c84a';
// static const String thirdApi =
// 'https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png';
static const String traceId =
'11111111111111111111111111111111:1111111111111111:0:0';
@@ -41,9 +54,7 @@ class Constants {
'{"appId":1,"platform":3,"version":"8.43.0","abtest":""}';
static const baseHeaders = {
'connection': 'keep-alive',
'accept-encoding': 'br,gzip',
'referer': HttpString.baseUrl,
// 'referer': HttpString.baseUrl,
'env': 'prod',
'app-key': 'android64',
'x-bili-aurora-zone': 'sh001',

View File

@@ -9,6 +9,13 @@ class DynamicCardSkeleton extends StatelessWidget {
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final color = theme.colorScheme.onInverseSurface;
final buttonStyle = TextButton.styleFrom(
tapTargetSize: .padded,
padding: const .symmetric(horizontal: 15),
foregroundColor: theme.colorScheme.outline.withValues(
alpha: 0.2,
),
);
return Skeleton(
child: Container(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
@@ -86,29 +93,19 @@ class DynamicCardSkeleton extends StatelessWidget {
if (GlobalData().dynamicsWaterfallFlow) const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
for (var i = 0; i < 3; i++)
TextButton.icon(
onPressed: () {},
icon: const Icon(
Icons.radio_button_unchecked_outlined,
size: 20,
),
style: TextButton.styleFrom(
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
foregroundColor: theme.colorScheme.outline.withValues(
alpha: 0.2,
children: const ['转发', '评论', '点赞']
.map(
(e) => TextButton.icon(
onPressed: () {},
icon: const Icon(
Icons.radio_button_unchecked_outlined,
size: 20,
),
style: buttonStyle,
label: Text(e),
),
label: Text(
i == 0
? '转发'
: i == 1
? '评论'
: '点赞',
),
),
],
)
.toList(),
),
],
),

View File

@@ -11,7 +11,7 @@ class Skeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.surface.withAlpha(10);
var shimmerGradient = LinearGradient(
final shimmerGradient = LinearGradient(
colors: [
Colors.transparent,
color,
@@ -62,7 +62,6 @@ class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
@override
void initState() {
super.initState();
_shimmerController = AnimationController.unbounded(vsync: this)
..repeat(min: -0.5, max: 1.5, period: const Duration(milliseconds: 1000));
}

View File

@@ -7,19 +7,21 @@ class MultiSelectAppBarWidget extends StatelessWidget
final MultiSelectBase ctr;
final bool? visible;
final AppBar child;
final List<Widget>? children;
final List<Widget>? actions;
const MultiSelectAppBarWidget({
super.key,
required this.ctr,
this.visible,
this.children,
this.actions,
required this.child,
});
@override
Widget build(BuildContext context) {
if (visible ?? ctr.enableMultiSelect.value) {
final style = TextButton.styleFrom(visualDensity: VisualDensity.compact);
final colorScheme = ColorScheme.of(context);
return AppBar(
bottom: child.bottom,
leading: IconButton(
@@ -30,21 +32,22 @@ class MultiSelectAppBarWidget extends StatelessWidget
title: Obx(() => Text('已选: ${ctr.checkedCount}')),
actions: [
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity.compact,
),
style: style,
onPressed: () => ctr.handleSelect(checked: true),
child: const Text('全选'),
),
...?children,
...?actions,
TextButton(
style: TextButton.styleFrom(
visualDensity: VisualDensity.compact,
),
onPressed: ctr.onRemove,
style: style,
onPressed: () {
if (ctr.checkedCount == 0) {
return;
}
ctr.onRemove();
},
child: Text(
'移除',
style: TextStyle(color: Get.theme.colorScheme.error),
style: TextStyle(color: colorScheme.error),
),
),
const SizedBox(width: 6),

View File

@@ -0,0 +1,56 @@
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/models/model_owner.dart';
import 'package:flutter/material.dart';
Widget avatars({
required ColorScheme colorScheme,
required Iterable<Owner> users,
}) {
const gap = 6.0;
const size = 22.0;
const padding = 0.8;
const offset = size - gap;
const imgSize = size - 2 * padding;
if (users.length == 1) {
return NetworkImgLayer(
src: users.first.face,
width: imgSize,
height: imgSize,
type: .avatar,
);
} else {
final decoration = BoxDecoration(
shape: .circle,
border: Border.all(color: colorScheme.surface),
);
return SizedBox(
height: size,
width: offset * users.length + gap,
child: Stack(
clipBehavior: .none,
children: users.indexed
.map(
(e) => Positioned(
top: 0,
bottom: 0,
width: size,
left: e.$1 * offset,
child: DecoratedBox(
decoration: decoration,
child: Padding(
padding: const .all(padding),
child: NetworkImgLayer(
src: e.$2.face,
width: imgSize,
height: imgSize,
type: .avatar,
),
),
),
),
)
.toList(),
),
);
}
}

View File

@@ -0,0 +1,42 @@
import 'package:flutter/gestures.dart' show kBackMouseButton;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show KeyDownEvent;
class BackDetector extends StatelessWidget {
const BackDetector({
super.key,
required this.onBack,
required this.child,
});
final Widget child;
final VoidCallback onBack;
@override
Widget build(BuildContext context) {
return Focus(
canRequestFocus: false,
onKeyEvent: _onKeyEvent,
child: Listener(
behavior: .translucent,
onPointerDown: _onPointerDown,
child: child,
),
);
}
KeyEventResult _onKeyEvent(FocusNode node, KeyEvent event) {
if (event.logicalKey == .escape && event is KeyDownEvent) {
onBack();
return .handled;
}
return .ignored;
}
void _onPointerDown(PointerDownEvent event) {
if (event.buttons == kBackMouseButton) {
onBack();
}
}
}

View File

@@ -1,7 +1,7 @@
import 'package:PiliPlus/models/common/badge_type.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/extension/string_ext.dart';
import 'package:PiliPlus/utils/extension/theme_ext.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class PBadge extends StatelessWidget {
final String? text;
@@ -59,7 +59,7 @@ class PBadge extends StatelessWidget {
bgColor = Colors.black45;
color = Colors.white;
case PBadgeType.error:
if (Get.isDarkMode) {
if (theme.isDark) {
bgColor = theme.errorContainer;
color = theme.onErrorContainer;
} else {

View File

@@ -1,50 +1,35 @@
import 'package:flutter/material.dart';
Widget iconButton({
required BuildContext context,
BuildContext? context,
String? tooltip,
required IconData icon,
required Widget icon,
required VoidCallback? onPressed,
double size = 36,
double? iconSize,
Color? bgColor,
Color? iconColor,
}) {
late final theme = Theme.of(context);
Color? backgroundColor = bgColor;
Color? foregroundColor = iconColor;
if (context != null) {
final colorScheme = ColorScheme.of(context);
backgroundColor = colorScheme.secondaryContainer;
foregroundColor = colorScheme.onSecondaryContainer;
}
return SizedBox(
width: size,
height: size,
child: IconButton(
icon: icon,
tooltip: tooltip,
onPressed: onPressed,
icon: Icon(
icon,
size: iconSize ?? size / 2,
color: iconColor ?? theme.colorScheme.onSecondaryContainer,
),
style: IconButton.styleFrom(
padding: EdgeInsets.zero,
backgroundColor: bgColor ?? theme.colorScheme.secondaryContainer,
iconSize: iconSize ?? size / 2,
backgroundColor: backgroundColor,
foregroundColor: foregroundColor,
),
),
);
}
Widget mediumButton({
String? tooltip,
IconData? icon,
VoidCallback? onPressed,
}) {
return SizedBox(
width: 34,
height: 34,
child: IconButton(
tooltip: tooltip,
icon: Icon(icon),
style: const ButtonStyle(
padding: WidgetStatePropertyAll(EdgeInsets.zero),
),
onPressed: onPressed,
),
);
}

View File

@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
Widget moreTextButton({
String text = '查看更多',
required VoidCallback onTap,
EdgeInsets? padding,
Color? color,
}) {
Widget child = Text.rich(
style: TextStyle(color: color, height: 1),
strutStyle: const StrutStyle(leading: 0, height: 1),
TextSpan(
children: [
TextSpan(text: text),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
size: 22,
color: color,
Icons.keyboard_arrow_right,
),
),
],
),
);
if (padding != null) {
child = Padding(padding: padding, child: child);
}
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onTap,
child: child,
);
}

View File

@@ -1,39 +1,32 @@
import 'package:PiliPlus/common/constants.dart';
import 'package:flutter/material.dart';
import 'package:material_color_utilities/material_color_utilities.dart';
class ColorPalette extends StatelessWidget {
final Color color;
final ColorScheme colorScheme;
final bool selected;
final bool showBgColor;
const ColorPalette({
super.key,
required this.color,
required this.colorScheme,
required this.selected,
this.showBgColor = true,
});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final Hct hct = Hct.fromInt(color.toARGB32());
final primary = Color(Hct.from(hct.hue, 20.0, 90.0).toInt());
final tertiary = Color(Hct.from(hct.hue + 50, 20.0, 85.0).toInt());
final primaryContainer = Color(Hct.from(hct.hue, 30.0, 50.0).toInt());
Widget coloredBox(Color color) => Expanded(
child: ColoredBox(
color: color,
child: const SizedBox.expand(),
),
);
final primary = colorScheme.primary;
final tertiary = colorScheme.tertiary;
final primaryContainer = colorScheme.primaryContainer;
Widget child = ClipOval(
child: Column(
children: [
coloredBox(primary),
_coloredBox(primary),
Expanded(
child: Row(
children: [
coloredBox(tertiary),
coloredBox(primaryContainer),
_coloredBox(tertiary),
_coloredBox(primaryContainer),
],
),
),
@@ -50,7 +43,7 @@ class ColorPalette extends StatelessWidget {
width: 23,
height: 23,
decoration: BoxDecoration(
color: Color(Hct.from(hct.hue, 30.0, 40.0).toInt()),
color: colorScheme.surfaceContainer,
shape: BoxShape.circle,
),
child: Icon(
@@ -62,15 +55,25 @@ class ColorPalette extends StatelessWidget {
],
);
}
return Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: theme.colorScheme.onInverseSurface,
borderRadius: StyleString.mdRadius,
),
child: child,
);
if (showBgColor) {
return Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: colorScheme.onInverseSurface,
borderRadius: StyleString.mdRadius,
),
child: child,
);
}
return child;
}
static Widget _coloredBox(Color color) => Expanded(
child: ColoredBox(
color: color,
child: const SizedBox.expand(),
),
);
}

View File

@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
class ColoredBoxTransition extends AnimatedWidget {
const ColoredBoxTransition({
super.key,
required this.color,
this.child,
}) : super(listenable: color);
final Animation<Color?> color;
final Widget? child;
@override
Widget build(BuildContext context) {
return ColoredBox(
color: color.value!,
child: child,
);
}
}

View File

@@ -0,0 +1,158 @@
/*
* This file is part of PiliPlus
*
* PiliPlus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PiliPlus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
*/
import 'dart:ui' as ui;
import 'package:flutter/widgets.dart';
class CroppedImage extends LeafRenderObjectWidget {
const CroppedImage({
super.key,
required this.size,
required this.image,
required this.srcRect,
required this.dstRect,
required this.rrect,
required this.imgPaint,
required this.borderPaint,
});
final Size size;
final ui.Image image;
final Rect srcRect;
final Rect dstRect;
final RRect rrect;
final Paint imgPaint;
final Paint borderPaint;
@override
RenderObject createRenderObject(BuildContext context) {
return RenderCroppedImage(
preferredSize: size,
image: image,
srcRect: srcRect,
dstRect: dstRect,
rrect: rrect,
imgPaint: imgPaint,
borderPaint: borderPaint,
);
}
@override
void updateRenderObject(
BuildContext context,
RenderCroppedImage renderObject,
) {
renderObject
..preferredSize = size
..image = image
..srcRect = srcRect
..dstRect = dstRect
..rrect = rrect
..imgPaint = imgPaint
..borderPaint = borderPaint;
}
}
class RenderCroppedImage extends RenderBox {
RenderCroppedImage({
required Size preferredSize,
required ui.Image image,
required Rect srcRect,
required Rect dstRect,
required RRect rrect,
required Paint imgPaint,
required Paint borderPaint,
}) : _preferredSize = preferredSize,
_image = image,
_srcRect = srcRect,
_dstRect = dstRect,
_rrect = rrect,
_imgPaint = imgPaint,
_borderPaint = borderPaint;
Size _preferredSize;
Size get preferredSize => _preferredSize;
set preferredSize(Size value) {
if (_preferredSize == value) return;
_preferredSize = value;
markNeedsLayout();
}
ui.Image _image;
ui.Image get image => _image;
set image(ui.Image value) {
if (_image == value) return;
_image = value;
markNeedsPaint();
}
Rect _srcRect;
Rect get srcRect => _srcRect;
set srcRect(Rect value) {
if (_srcRect == value) return;
_srcRect = value;
markNeedsPaint();
}
Rect _dstRect;
Rect get dstRect => _dstRect;
set dstRect(Rect value) {
if (_dstRect == value) return;
_dstRect = value;
markNeedsPaint();
}
RRect _rrect;
RRect get rrect => _rrect;
set rrect(RRect value) {
if (_rrect == value) return;
_rrect = value;
markNeedsPaint();
}
Paint _imgPaint;
Paint get imgPaint => _imgPaint;
set imgPaint(Paint value) {
if (_imgPaint == value) return;
_imgPaint = value;
markNeedsPaint();
}
Paint _borderPaint;
Paint get borderPaint => _borderPaint;
set borderPaint(Paint value) {
if (_borderPaint == value) return;
_borderPaint = value;
markNeedsPaint();
}
@override
void performLayout() {
size = constraints.constrain(_preferredSize);
}
@override
void paint(PaintingContext context, Offset offset) {
context.canvas
..drawImageRect(image, srcRect, dstRect, _imgPaint)
..drawRRect(rrect, _borderPaint);
}
@override
bool get isRepaintBoundary => true;
}

View File

@@ -0,0 +1,113 @@
import 'dart:math' show pi;
import 'package:flutter/widgets.dart';
class Arc extends LeafRenderObjectWidget {
const Arc({
super.key,
required this.size,
required this.color,
required this.progress,
this.strokeWidth = 2,
});
final double size;
final Color color;
final double progress;
final double strokeWidth;
@override
RenderObject createRenderObject(BuildContext context) {
return RenderArc(
preferredSize: size,
color: color,
progress: progress,
strokeWidth: strokeWidth,
);
}
@override
void updateRenderObject(
BuildContext context,
RenderArc renderObject,
) {
renderObject
..preferredSize = size
..color = color
..progress = progress
..strokeWidth = strokeWidth;
}
}
class RenderArc extends RenderBox {
RenderArc({
required double preferredSize,
required Color color,
required double progress,
required double strokeWidth,
}) : _preferredSize = preferredSize,
_color = color,
_progress = progress,
_strokeWidth = strokeWidth;
Color _color;
Color get color => _color;
set color(Color value) {
if (_color == value) return;
_color = value;
markNeedsPaint();
}
double _progress;
double get progress => _progress;
set progress(double value) {
if (_progress == value) return;
_progress = value;
markNeedsPaint();
}
double _strokeWidth;
double get strokeWidth => _strokeWidth;
set strokeWidth(double value) {
if (_strokeWidth == value) return;
_strokeWidth = value;
markNeedsPaint();
}
double _preferredSize;
double get preferredSize => _preferredSize;
set preferredSize(double value) {
if (_preferredSize == value) return;
_preferredSize = value;
markNeedsLayout();
}
@override
void performLayout() {
size = constraints.constrainDimensions(_preferredSize, _preferredSize);
}
@override
void paint(PaintingContext context, Offset offset) {
if (progress == 0) {
return;
}
final paint = Paint()
..color = color
..strokeWidth = strokeWidth
..style = PaintingStyle.stroke;
final radius = size.width / 2;
final rect = Rect.fromCircle(
center: Offset(radius, radius),
radius: radius,
);
const startAngle = -pi / 2;
context.canvas.drawArc(rect, startAngle, progress * 2 * pi, false, paint);
}
@override
bool get isRepaintBoundary => true;
}

View File

@@ -0,0 +1,68 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart' show RenderProxyBox;
class CustomHeightWidget extends SingleChildRenderObjectWidget {
const CustomHeightWidget({
super.key,
required this.height,
this.offset = .zero,
required super.child,
});
final double height;
final Offset offset;
@override
RenderObject createRenderObject(BuildContext context) {
return RenderCustomHeightWidget(
height: height,
offset: offset,
);
}
@override
void updateRenderObject(
BuildContext context,
RenderCustomHeightWidget renderObject,
) {
renderObject
..height = height
..offset = offset;
}
}
class RenderCustomHeightWidget extends RenderProxyBox {
RenderCustomHeightWidget({
required double height,
required Offset offset,
}) : _height = height,
_offset = offset;
double _height;
double get height => _height;
set height(double value) {
if (_height == value) return;
_height = value;
markNeedsLayout();
}
Offset _offset;
Offset get offset => _offset;
set offset(Offset value) {
if (_offset == value) return;
_offset = value;
markNeedsPaint();
}
@override
void performLayout() {
child!.layout(constraints);
size = constraints.constrainDimensions(constraints.maxWidth, height);
}
@override
void paint(PaintingContext context, Offset offset) {
context.paintChild(child!, offset + _offset);
}
}

View File

@@ -10,19 +10,24 @@ class CustomIcons {
static const IconData dyn = _CustomIconData(0xe804);
static const IconData fav = _CustomIconData(0xe805);
static const IconData live_reserve = _CustomIconData(0xe806);
static const IconData share = _CustomIconData(0xe807);
static const IconData share_line = _CustomIconData(0xe808);
static const IconData share_node = _CustomIconData(0xe809);
static const IconData star_favorite_line = _CustomIconData(0xe80a);
static const IconData star_favorite_solid = _CustomIconData(0xe80b);
static const IconData thumbs_down = _CustomIconData(0xe80c);
static const IconData thumbs_down_outline = _CustomIconData(0xe80d);
static const IconData thumbs_up = _CustomIconData(0xe80e);
static const IconData thumbs_up_fill = _CustomIconData(0xe80f);
static const IconData thumbs_up_line = _CustomIconData(0xe810);
static const IconData thumbs_up_outline = _CustomIconData(0xe811);
static const IconData topic_tag = _CustomIconData(0xe812);
static const IconData watch_later = _CustomIconData(0xe813);
static const IconData player_dm_tip_back = _CustomIconData(0xe807);
static const IconData player_dm_tip_copy = _CustomIconData(0xe808);
static const IconData player_dm_tip_like = _CustomIconData(0xe809);
static const IconData player_dm_tip_like_solid = _CustomIconData(0xe80a);
static const IconData player_dm_tip_recall = _CustomIconData(0xe80b);
static const IconData share = _CustomIconData(0xe80c);
static const IconData share_line = _CustomIconData(0xe80d);
static const IconData share_node = _CustomIconData(0xe80e);
static const IconData star_favorite_line = _CustomIconData(0xe80f);
static const IconData star_favorite_solid = _CustomIconData(0xe810);
static const IconData thumbs_down = _CustomIconData(0xe811);
static const IconData thumbs_down_outline = _CustomIconData(0xe812);
static const IconData thumbs_up = _CustomIconData(0xe813);
static const IconData thumbs_up_fill = _CustomIconData(0xe814);
static const IconData thumbs_up_line = _CustomIconData(0xe815);
static const IconData thumbs_up_outline = _CustomIconData(0xe816);
static const IconData topic_tag = _CustomIconData(0xe817);
static const IconData watch_later = _CustomIconData(0xe818);
}
class _CustomIconData extends IconData {

View File

@@ -1,462 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ignore_for_file: uri_does_not_exist_in_doc_import
/// @docImport 'package:flutter/widgets.dart';
///
/// @docImport 'stack.dart';
library;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class CustomMultiChildLayout extends MultiChildRenderObjectWidget {
/// Creates a custom multi-child layout.
const CustomMultiChildLayout({
super.key,
required this.delegate,
super.children,
});
/// The delegate that controls the layout of the children.
final MultiChildLayoutDelegate delegate;
@override
RenderCustomMultiChildLayoutBox createRenderObject(BuildContext context) {
return RenderCustomMultiChildLayoutBox(delegate: delegate);
}
@override
void updateRenderObject(
BuildContext context,
RenderCustomMultiChildLayoutBox renderObject,
) {
renderObject.delegate = delegate;
}
}
/// A delegate that controls the layout of multiple children.
///
/// Used with [CustomMultiChildLayout] (in the widgets library) and
/// [RenderCustomMultiChildLayoutBox] (in the rendering library).
///
/// Delegates must be idempotent. Specifically, if two delegates are equal, then
/// they must produce the same layout. To change the layout, replace the
/// delegate with a different instance whose [shouldRelayout] returns true when
/// given the previous instance.
///
/// Override [getSize] to control the overall size of the layout. The size of
/// the layout cannot depend on layout properties of the children. This was
/// a design decision to simplify the delegate implementations: This way,
/// the delegate implementations do not have to also handle various intrinsic
/// sizing functions if the parent's size depended on the children.
/// If you want to build a custom layout where you define the size of that widget
/// based on its children, then you will have to create a custom render object.
/// See [MultiChildRenderObjectWidget] with [ContainerRenderObjectMixin] and
/// [RenderBoxContainerDefaultsMixin] to get started or [RenderStack] for an
/// example implementation.
///
/// Override [performLayout] to size and position the children. An
/// implementation of [performLayout] must call [layoutChild] exactly once for
/// each child, but it may call [layoutChild] on children in an arbitrary order.
/// Typically a delegate will use the size returned from [layoutChild] on one
/// child to determine the constraints for [performLayout] on another child or
/// to determine the offset for [positionChild] for that child or another child.
///
/// Override [shouldRelayout] to determine when the layout of the children needs
/// to be recomputed when the delegate changes.
///
/// The most efficient way to trigger a relayout is to supply a `relayout`
/// argument to the constructor of the [MultiChildLayoutDelegate]. The custom
/// layout will listen to this value and relayout whenever the Listenable
/// notifies its listeners, such as when an [Animation] ticks. This allows
/// the custom layout to avoid the build phase of the pipeline.
///
/// Each child must be wrapped in a [LayoutId] widget to assign the id that
/// identifies it to the delegate. The [LayoutId.id] needs to be unique among
/// the children that the [CustomMultiChildLayout] manages.
///
/// {@tool snippet}
///
/// Below is an example implementation of [performLayout] that causes one widget
/// (the follower) to be the same size as another (the leader):
///
/// ```dart
/// // Define your own slot numbers, depending upon the id assigned by LayoutId.
/// // Typical usage is to define an enum like the one below, and use those
/// // values as the ids.
/// enum _Slot {
/// leader,
/// follower,
/// }
///
/// class FollowTheLeader extends MultiChildLayoutDelegate {
/// @override
/// void performLayout(Size size) {
/// Size leaderSize = Size.zero;
///
/// if (hasChild(_Slot.leader)) {
/// leaderSize = layoutChild(_Slot.leader, BoxConstraints.loose(size));
/// positionChild(_Slot.leader, Offset.zero);
/// }
///
/// if (hasChild(_Slot.follower)) {
/// layoutChild(_Slot.follower, BoxConstraints.tight(leaderSize));
/// positionChild(_Slot.follower, Offset(size.width - leaderSize.width,
/// size.height - leaderSize.height));
/// }
/// }
///
/// @override
/// bool shouldRelayout(MultiChildLayoutDelegate oldDelegate) => false;
/// }
/// ```
/// {@end-tool}
///
/// The delegate gives the leader widget loose constraints, which means the
/// child determines what size to be (subject to fitting within the given size).
/// The delegate then remembers the size of that child and places it in the
/// upper left corner.
///
/// The delegate then gives the follower widget tight constraints, forcing it to
/// match the size of the leader widget. The delegate then places the follower
/// widget in the bottom right corner.
///
/// The leader and follower widget will paint in the order they appear in the
/// child list, regardless of the order in which [layoutChild] is called on
/// them.
///
/// See also:
///
/// * [CustomMultiChildLayout], the widget that uses this delegate.
/// * [RenderCustomMultiChildLayoutBox], render object that uses this
/// delegate.
abstract class MultiChildLayoutDelegate {
/// Creates a layout delegate.
///
/// The layout will update whenever [relayout] notifies its listeners.
MultiChildLayoutDelegate({Listenable? relayout}) : _relayout = relayout;
final Listenable? _relayout;
Map<Object, RenderBox>? _idToChild;
Set<RenderBox>? _debugChildrenNeedingLayout;
/// True if a non-null LayoutChild was provided for the specified id.
///
/// Call this from the [performLayout] method to determine which children
/// are available, if the child list might vary.
///
/// This method cannot be called from [getSize] as the size is not allowed
/// to depend on the children.
bool hasChild(Object childId) => _idToChild![childId] != null;
/// Ask the child to update its layout within the limits specified by
/// the constraints parameter. The child's size is returned.
///
/// Call this from your [performLayout] function to lay out each
/// child. Every child must be laid out using this function exactly
/// once each time the [performLayout] function is called.
Size layoutChild(Object childId, BoxConstraints constraints) {
final RenderBox? child = _idToChild![childId];
assert(() {
if (child == null) {
throw FlutterError(
'The $this custom multichild layout delegate tried to lay out a non-existent child.\n'
'There is no child with the id "$childId".',
);
}
if (!_debugChildrenNeedingLayout!.remove(child)) {
throw FlutterError(
'The $this custom multichild layout delegate tried to lay out the child with id "$childId" more than once.\n'
'Each child must be laid out exactly once.',
);
}
try {
assert(constraints.debugAssertIsValid(isAppliedConstraint: true));
} on AssertionError catch (exception) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary(
'The $this custom multichild layout delegate provided invalid box constraints for the child with id "$childId".',
),
DiagnosticsProperty<AssertionError>(
'Exception',
exception,
showName: false,
),
ErrorDescription(
'The minimum width and height must be greater than or equal to zero.\n'
'The maximum width must be greater than or equal to the minimum width.\n'
'The maximum height must be greater than or equal to the minimum height.',
),
]);
}
return true;
}());
child!.layout(constraints, parentUsesSize: true);
return child.size;
}
/// Specify the child's origin relative to this origin.
///
/// Call this from your [performLayout] function to position each
/// child. If you do not call this for a child, its position will
/// remain unchanged. Children initially have their position set to
/// (0,0), i.e. the top left of the [RenderCustomMultiChildLayoutBox].
void positionChild(Object childId, Offset offset) {
final RenderBox? child = _idToChild![childId];
assert(() {
if (child == null) {
throw FlutterError(
'The $this custom multichild layout delegate tried to position out a non-existent child:\n'
'There is no child with the id "$childId".',
);
}
return true;
}());
final MultiChildLayoutParentData childParentData =
child!.parentData! as MultiChildLayoutParentData;
childParentData.offset = offset;
}
DiagnosticsNode _debugDescribeChild(RenderBox child) {
final MultiChildLayoutParentData childParentData =
child.parentData! as MultiChildLayoutParentData;
return DiagnosticsProperty<RenderBox>('${childParentData.id}', child);
}
void _callPerformLayout(Size size, RenderBox? firstChild) {
// A particular layout delegate could be called reentrantly, e.g. if it used
// by both a parent and a child. So, we must restore the _idToChild map when
// we return.
final Map<Object, RenderBox>? previousIdToChild = _idToChild;
Set<RenderBox>? debugPreviousChildrenNeedingLayout;
assert(() {
debugPreviousChildrenNeedingLayout = _debugChildrenNeedingLayout;
_debugChildrenNeedingLayout = <RenderBox>{};
return true;
}());
try {
_idToChild = <Object, RenderBox>{};
RenderBox? child = firstChild;
while (child != null) {
final MultiChildLayoutParentData childParentData =
child.parentData! as MultiChildLayoutParentData;
assert(() {
if (childParentData.id == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary(
'Every child of a RenderCustomMultiChildLayoutBox must have an ID in its parent data.',
),
child!.describeForError('The following child has no ID'),
]);
}
return true;
}());
_idToChild![childParentData.id!] = child;
assert(() {
_debugChildrenNeedingLayout!.add(child!);
return true;
}());
child = childParentData.nextSibling;
}
performLayout(size);
assert(() {
if (_debugChildrenNeedingLayout!.isNotEmpty) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('Each child must be laid out exactly once.'),
DiagnosticsBlock(
name:
'The $this custom multichild layout delegate forgot '
'to lay out the following '
'${_debugChildrenNeedingLayout!.length > 1 ? 'children' : 'child'}',
properties: _debugChildrenNeedingLayout!
.map<DiagnosticsNode>(_debugDescribeChild)
.toList(),
),
]);
}
return true;
}());
} finally {
_idToChild = previousIdToChild;
assert(() {
_debugChildrenNeedingLayout = debugPreviousChildrenNeedingLayout;
return true;
}());
}
}
/// Override this method to return the size of this object given the
/// incoming constraints.
///
/// The size cannot reflect the sizes of the children. If this layout has a
/// fixed width or height the returned size can reflect that; the size will be
/// constrained to the given constraints.
///
/// By default, attempts to size the box to the biggest size
/// possible given the constraints.
Size getSize(BoxConstraints constraints) => constraints.biggest;
/// Override this method to lay out and position all children given this
/// widget's size.
///
/// This method must call [layoutChild] for each child. It should also specify
/// the final position of each child with [positionChild].
void performLayout(Size size);
/// Override this method to return true when the children need to be
/// laid out.
///
/// This should compare the fields of the current delegate and the given
/// `oldDelegate` and return true if the fields are such that the layout would
/// be different.
bool shouldRelayout(covariant MultiChildLayoutDelegate oldDelegate);
/// Override this method to include additional information in the
/// debugging data printed by [debugDumpRenderTree] and friends.
///
/// By default, returns the [runtimeType] of the class.
@override
String toString() => objectRuntimeType(this, 'MultiChildLayoutDelegate');
}
/// Defers the layout of multiple children to a delegate.
///
/// The delegate can determine the layout constraints for each child and can
/// decide where to position each child. The delegate can also determine the
/// size of the parent, but the size of the parent cannot depend on the sizes of
/// the children.
class RenderCustomMultiChildLayoutBox extends RenderBox
with
ContainerRenderObjectMixin<RenderBox, MultiChildLayoutParentData>,
RenderBoxContainerDefaultsMixin<RenderBox, MultiChildLayoutParentData> {
/// Creates a render object that customizes the layout of multiple children.
RenderCustomMultiChildLayoutBox({
List<RenderBox>? children,
required MultiChildLayoutDelegate delegate,
}) : _delegate = delegate {
addAll(children);
}
@override
void setupParentData(RenderBox child) {
if (child.parentData is! MultiChildLayoutParentData) {
child.parentData = MultiChildLayoutParentData();
}
}
/// The delegate that controls the layout of the children.
MultiChildLayoutDelegate get delegate => _delegate;
MultiChildLayoutDelegate _delegate;
set delegate(MultiChildLayoutDelegate newDelegate) {
if (_delegate == newDelegate) {
return;
}
final MultiChildLayoutDelegate oldDelegate = _delegate;
if (newDelegate.runtimeType != oldDelegate.runtimeType ||
newDelegate.shouldRelayout(oldDelegate)) {
markNeedsLayout();
}
_delegate = newDelegate;
if (attached) {
oldDelegate._relayout?.removeListener(markNeedsLayout);
newDelegate._relayout?.addListener(markNeedsLayout);
}
}
@override
void attach(PipelineOwner owner) {
super.attach(owner);
_delegate._relayout?.addListener(markNeedsLayout);
}
@override
void detach() {
_delegate._relayout?.removeListener(markNeedsLayout);
super.detach();
}
Size _getSize(BoxConstraints constraints) {
assert(constraints.debugAssertIsValid());
return constraints.constrain(_delegate.getSize(constraints));
}
// TODO(ianh): It's a bit dubious to be using the getSize function from the delegate to
// figure out the intrinsic dimensions. We really should either not support intrinsics,
// or we should expose intrinsic delegate callbacks and throw if they're not implemented.
@override
double computeMinIntrinsicWidth(double height) {
final double width = _getSize(
BoxConstraints.tightForFinite(height: height),
).width;
if (width.isFinite) {
return width;
}
return 0.0;
}
@override
double computeMaxIntrinsicWidth(double height) {
final double width = _getSize(
BoxConstraints.tightForFinite(height: height),
).width;
if (width.isFinite) {
return width;
}
return 0.0;
}
@override
double computeMinIntrinsicHeight(double width) {
final double height = _getSize(
BoxConstraints.tightForFinite(width: width),
).height;
if (height.isFinite) {
return height;
}
return 0.0;
}
@override
double computeMaxIntrinsicHeight(double width) {
final double height = _getSize(
BoxConstraints.tightForFinite(width: width),
).height;
if (height.isFinite) {
return height;
}
return 0.0;
}
@override
@protected
Size computeDryLayout(covariant BoxConstraints constraints) {
return _getSize(constraints);
}
@override
void performLayout() {
size = _getSize(constraints);
delegate._callPerformLayout(size, firstChild);
}
@override
void paint(PaintingContext context, Offset offset) {
defaultPaint(context, offset);
}
@override
bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
return defaultHitTestChildren(result, position: position);
}
@override
bool get isRepaintBoundary => true;
}

View File

@@ -1,60 +0,0 @@
import 'dart:io' show Platform;
import 'package:flutter/material.dart';
class CustomSliverPersistentHeaderDelegate
extends SliverPersistentHeaderDelegate {
CustomSliverPersistentHeaderDelegate({
required this.child,
required this.bgColor,
double extent = 45,
this.needRebuild = false,
}) : _minExtent = extent,
_maxExtent = extent;
final double _minExtent;
final double _maxExtent;
final Widget child;
final Color? bgColor;
final bool needRebuild;
@override
Widget build(
BuildContext context,
double shrinkOffset,
bool overlapsContent,
) {
//创建child子组件
//shrinkOffsetchild偏移值minExtent~maxExtent
//overlapsContentSliverPersistentHeader覆盖其他子组件返回true否则返回false
return bgColor != null
? DecoratedBox(
decoration: BoxDecoration(
color: bgColor,
boxShadow: Platform.isIOS
? null
: [
BoxShadow(
color: bgColor!,
offset: const Offset(0, -1),
),
],
),
child: child,
)
: child;
}
//SliverPersistentHeader最大高度
@override
double get maxExtent => _maxExtent;
//SliverPersistentHeader最小高度
@override
double get minExtent => _minExtent;
@override
bool shouldRebuild(CustomSliverPersistentHeaderDelegate oldDelegate) {
return oldDelegate.bgColor != bgColor ||
(needRebuild && oldDelegate.child != child);
}
}

View File

@@ -50,6 +50,7 @@ class LoadingWidget extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(15)),
),
child: Column(
spacing: 20,
mainAxisSize: MainAxisSize.min,
children: [
//loading animation
@@ -59,10 +60,7 @@ class LoadingWidget extends StatelessWidget {
),
//msg
Container(
margin: const EdgeInsets.only(top: 20),
child: Text(msg, style: TextStyle(color: onSurfaceVariant)),
),
Text(msg, style: TextStyle(color: onSurfaceVariant)),
],
),
);

View File

@@ -1,135 +1,63 @@
import 'dart:math' as math;
import 'dart:ui' show clampDouble;
import 'package:PiliPlus/utils/utils.dart';
import 'package:PiliPlus/utils/platform_utils.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
enum TooltipType { top, right }
import 'package:flutter/rendering.dart'
show
ContainerRenderObjectMixin,
RenderBoxContainerDefaultsMixin,
MultiChildLayoutParentData;
import 'package:flutter/widgets.dart';
class CustomTooltip extends StatefulWidget {
const CustomTooltip({
super.key,
this.type = TooltipType.top,
required this.overlayWidget,
required this.child,
this.indicator,
required this.indicator,
});
final TooltipType type;
final Widget child;
final Widget Function() overlayWidget;
final Widget Function()? indicator;
static final List<CustomTooltipState> _openedTooltips =
<CustomTooltipState>[];
static bool dismissAllToolTips() {
if (_openedTooltips.isNotEmpty) {
final List<CustomTooltipState> openedTooltips = _openedTooltips.toList();
for (final CustomTooltipState state in openedTooltips) {
assert(state.mounted);
state._scheduleDismissTooltip();
}
return true;
}
return false;
}
final ValueGetter<Widget> overlayWidget;
final ValueGetter<Widget> indicator;
@override
State<CustomTooltip> createState() => CustomTooltipState();
State<CustomTooltip> createState() => _CustomTooltipState();
}
class CustomTooltipState extends State<CustomTooltip>
with SingleTickerProviderStateMixin {
static const Duration _fadeInDuration = Duration(milliseconds: 150);
static const Duration _fadeOutDuration = Duration(milliseconds: 75);
class _CustomTooltipState extends State<CustomTooltip> {
final OverlayPortalController _overlayController = OverlayPortalController();
AnimationController? _backingController;
AnimationController get _controller {
return _backingController ??= AnimationController(
duration: _fadeInDuration,
reverseDuration: _fadeOutDuration,
vsync: this,
)..addStatusListener(_handleStatusChanged);
}
CurvedAnimation? _backingOverlayAnimation;
CurvedAnimation get _overlayAnimation {
return _backingOverlayAnimation ??= CurvedAnimation(
parent: _controller,
curve: Curves.fastOutSlowIn,
);
}
LongPressGestureRecognizer? _longPressRecognizer;
AnimationStatus _animationStatus = AnimationStatus.dismissed;
void _handleStatusChanged(AnimationStatus status) {
assert(mounted);
switch ((_animationStatus.isDismissed, status.isDismissed)) {
case (false, true):
CustomTooltip._openedTooltips.remove(this);
_overlayController.hide();
case (true, false):
_overlayController.show();
CustomTooltip._openedTooltips.add(this);
case (true, true) || (false, false):
break;
}
_animationStatus = status;
}
LongPressGestureRecognizer get longPressRecognizer =>
_longPressRecognizer ??= LongPressGestureRecognizer()
..onLongPress = _scheduleShowTooltip;
void _scheduleShowTooltip() {
_controller.forward();
_overlayController.show();
}
void _scheduleDismissTooltip() {
_controller.reverse();
_overlayController.hide();
}
void _handlePointerDown(PointerDownEvent event) {
assert(mounted);
const Set<PointerDeviceKind> triggerModeDeviceKinds = <PointerDeviceKind>{
PointerDeviceKind.invertedStylus,
PointerDeviceKind.stylus,
PointerDeviceKind.touch,
PointerDeviceKind.unknown,
PointerDeviceKind.trackpad,
};
_longPressRecognizer ??= LongPressGestureRecognizer(
debugOwner: this,
supportedDevices: triggerModeDeviceKinds,
);
_longPressRecognizer!
..onLongPress = _scheduleShowTooltip
..addPointer(event);
longPressRecognizer.addPointer(event);
}
Widget _buildCustomTooltipOverlay(BuildContext context) {
final OverlayState overlayState = Overlay.of(
context,
debugRequiredFor: widget,
Widget _buildCustomTooltipOverlay(
BuildContext context,
OverlayChildLayoutInfo layoutInfo,
) {
final target = MatrixUtils.transformPoint(
layoutInfo.childPaintTransform,
layoutInfo.childSize.topCenter(Offset.zero),
);
final RenderBox box = this.context.findRenderObject()! as RenderBox;
final Offset target = box.localToGlobal(
box.size.center(Offset.zero),
ancestor: overlayState.context.findRenderObject(),
);
final _CustomTooltipOverlay overlayChild = _CustomTooltipOverlay(
verticalOffset: box.size.height / 2,
horizontslOffset: box.size.width / 2,
type: widget.type,
animation: _overlayAnimation,
target: target,
onDismiss: _scheduleDismissTooltip,
overlayWidget: widget.overlayWidget,
indicator: widget.indicator,
);
return SelectionContainer.maybeOf(context) == null
? overlayChild
: SelectionContainer.disabled(child: overlayChild);
@@ -138,11 +66,10 @@ class CustomTooltipState extends State<CustomTooltip>
@protected
@override
void dispose() {
CustomTooltip._openedTooltips.remove(this);
_longPressRecognizer?.onLongPressCancel = null;
_longPressRecognizer?.dispose();
_backingController?.dispose();
_backingOverlayAnimation?.dispose();
_longPressRecognizer
?..onLongPress = null
..dispose();
_longPressRecognizer = null;
super.dispose();
}
@@ -150,7 +77,7 @@ class CustomTooltipState extends State<CustomTooltip>
@override
Widget build(BuildContext context) {
Widget result;
if (Utils.isMobile) {
if (PlatformUtils.isMobile) {
result = Listener(
onPointerDown: _handlePointerDown,
behavior: HitTestBehavior.opaque,
@@ -164,7 +91,7 @@ class CustomTooltipState extends State<CustomTooltip>
child: widget.child,
);
}
return OverlayPortal(
return OverlayPortal.overlayChildLayoutBuilder(
controller: _overlayController,
overlayChildBuilder: _buildCustomTooltipOverlay,
child: result,
@@ -174,232 +101,230 @@ class CustomTooltipState extends State<CustomTooltip>
class _CustomTooltipOverlay extends StatelessWidget {
const _CustomTooltipOverlay({
required this.verticalOffset,
required this.horizontslOffset,
required this.type,
required this.animation,
required this.target,
required this.onDismiss,
required this.overlayWidget,
this.indicator,
required this.indicator,
});
final double verticalOffset;
final double horizontslOffset;
final TooltipType type;
final Animation<double> animation;
final Offset target;
final VoidCallback onDismiss;
final Widget Function() overlayWidget;
final Widget Function()? indicator;
final ValueGetter<Widget> overlayWidget;
final ValueGetter<Widget> indicator;
@override
Widget build(BuildContext context) {
Widget child = CustomMultiChildLayout(
delegate: _CustomMultiTooltipPositionDelegate(
type: type,
target: target,
verticalOffset: verticalOffset,
horizontslOffset: horizontslOffset,
preferBelow: false,
),
return _ToolTip(
target: target,
preferBelow: false,
onTap: PlatformUtils.isMobile ? onDismiss : null,
children: [
LayoutId(
id: 'overlay',
child: overlayWidget(),
),
if (indicator != null)
LayoutId(
id: 'indicator',
child: indicator!(),
),
indicator(),
overlayWidget(),
],
);
if (Utils.isMobile) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onDismiss,
child: child,
);
}
return child;
}
}
class _CustomMultiTooltipPositionDelegate extends MultiChildLayoutDelegate {
_CustomMultiTooltipPositionDelegate({
required this.type,
class _ToolTip extends MultiChildRenderObjectWidget {
const _ToolTip({
super.children,
this.onTap,
required this.target,
required this.verticalOffset,
required this.horizontslOffset,
required this.preferBelow,
});
final TooltipType type;
final VoidCallback? onTap;
final Offset target;
final double verticalOffset;
final double horizontslOffset;
final bool preferBelow;
@override
void performLayout(Size size) {
switch (type) {
case TooltipType.top:
Size? indicatorSize;
if (hasChild('indicator')) {
indicatorSize = layoutChild('indicator', BoxConstraints.loose(size));
}
RenderObject createRenderObject(BuildContext context) {
return _RenderToolTip(
onTap: onTap,
target: target,
preferBelow: preferBelow,
);
}
if (hasChild('overlay')) {
final overlaySize = layoutChild(
'overlay',
BoxConstraints.loose(size),
);
Offset offset = positionDependentBox(
type: type,
size: size,
childSize: overlaySize,
target: target,
verticalOffset: verticalOffset,
horizontslOffset: horizontslOffset,
preferBelow: preferBelow,
);
if (indicatorSize != null) {
offset = Offset(offset.dx, offset.dy - indicatorSize.height + 1);
positionChild(
'indicator',
Offset(
target.dx - indicatorSize.width / 2,
offset.dy + overlaySize.height - 1,
),
);
}
positionChild('overlay', offset);
}
case TooltipType.right:
Size? indicatorSize;
if (hasChild('indicator')) {
indicatorSize = layoutChild('indicator', BoxConstraints.loose(size));
}
@override
void updateRenderObject(BuildContext context, _RenderToolTip renderObject) {
renderObject
..onTap = onTap
..target = target
..preferBelow = preferBelow;
}
}
if (hasChild('overlay')) {
final overlaySize = layoutChild(
'overlay',
BoxConstraints.loose(size),
);
Offset offset = positionDependentBox(
type: type,
size: size,
childSize: overlaySize,
target: target,
verticalOffset: verticalOffset,
horizontslOffset: horizontslOffset,
preferBelow: preferBelow,
);
if (indicatorSize != null) {
offset = Offset(offset.dx + indicatorSize.height - 1, offset.dy);
positionChild(
'indicator',
Offset(
offset.dx - indicatorSize.width + 1,
target.dy - indicatorSize.height / 2,
),
);
}
positionChild('overlay', offset);
}
class _RenderToolTip extends RenderBox
with
ContainerRenderObjectMixin<RenderBox, MultiChildLayoutParentData>,
RenderBoxContainerDefaultsMixin<RenderBox, MultiChildLayoutParentData> {
_RenderToolTip({
VoidCallback? onTap,
required Offset target,
required bool preferBelow,
}) : _target = target,
_preferBelow = preferBelow,
_hitTestSelf = onTap != null {
if (onTap != null) {
_tapGestureRecognizer = TapGestureRecognizer()..onTap = onTap;
}
}
TapGestureRecognizer? _tapGestureRecognizer;
set onTap(VoidCallback? value) {
_tapGestureRecognizer?.onTap = value;
}
@override
void dispose() {
_tapGestureRecognizer
?..onTap = null
..dispose();
_tapGestureRecognizer = null;
super.dispose();
}
final bool _hitTestSelf;
@override
bool hitTestSelf(Offset position) => _hitTestSelf;
@override
void handleEvent(PointerEvent event, HitTestEntry<HitTestTarget> entry) {
if (event is PointerDownEvent) {
_tapGestureRecognizer?.addPointer(event);
}
}
Offset _target;
Offset get target => _target;
set target(Offset value) {
if (_target == value) return;
_target = value;
markNeedsPaint();
}
bool _preferBelow;
bool get preferBelow => _preferBelow;
set preferBelow(bool value) {
if (_preferBelow == value) return;
_preferBelow = value;
markNeedsPaint();
}
@override
void setupParentData(RenderBox child) {
if (child.parentData is! MultiChildLayoutParentData) {
child.parentData = MultiChildLayoutParentData();
}
}
@override
bool shouldRelayout(_CustomMultiTooltipPositionDelegate oldDelegate) {
return target != oldDelegate.target ||
verticalOffset != oldDelegate.verticalOffset ||
preferBelow != oldDelegate.preferBelow;
void performLayout() {
size = constraints.constrain(constraints.biggest);
final c = BoxConstraints.loose(size);
RenderBox indicator = firstChild!..layout(c, parentUsesSize: true);
RenderBox overlay = lastChild!..layout(c, parentUsesSize: true);
final indicatorSize = indicator.size;
final overlaySize = overlay.size;
final indicatorParentData =
indicator.parentData as MultiChildLayoutParentData;
final overlayParentData = overlay.parentData as MultiChildLayoutParentData;
Offset offset = positionDependentBox(
size: size,
childSize: overlaySize,
target: target,
preferBelow: preferBelow,
);
offset = Offset(offset.dx, offset.dy - indicatorSize.height + 1);
overlayParentData.offset = offset;
indicatorParentData.offset = Offset(
target.dx - indicatorSize.width / 2,
offset.dy + overlaySize.height - 1,
);
}
@override
void paint(PaintingContext context, Offset offset) {
defaultPaint(context, offset);
}
}
class TrianglePainter extends CustomPainter {
TrianglePainter(this.color, {this.type = TooltipType.top});
final TooltipType type;
class Triangle extends LeafRenderObjectWidget {
const Triangle({
super.key,
required this.color,
required this.size,
});
final Color color;
final Size size;
@override
void paint(Canvas canvas, Size size) {
RenderObject createRenderObject(BuildContext context) {
return RenderTriangle(
color: color,
preferredSize: size,
);
}
@override
void updateRenderObject(
BuildContext context,
RenderTriangle renderObject,
) {
renderObject
..color = color
..preferredSize = size;
}
}
class RenderTriangle extends RenderBox {
RenderTriangle({
required Color color,
required Size preferredSize,
}) : _color = color,
_preferredSize = preferredSize;
Color _color;
Color get color => _color;
set color(Color value) {
if (_color == value) return;
_color = value;
markNeedsPaint();
}
Size _preferredSize;
set preferredSize(Size value) {
if (_preferredSize == value) return;
_preferredSize = value;
markNeedsLayout();
}
@override
void performLayout() {
size = constraints.constrain(_preferredSize);
}
@override
void paint(PaintingContext context, Offset offset) {
final size = this.size;
final paint = Paint()
..color = color
..style = PaintingStyle.fill;
Path path;
switch (type) {
case TooltipType.top:
path = Path()
..moveTo(0, 0)
..lineTo(size.width, 0)
..lineTo(size.width / 2, size.height)
..close();
case TooltipType.right:
path = Path()
..moveTo(0, size.height / 2)
..lineTo(size.width, 0)
..lineTo(size.width, size.height)
..close();
}
final path = Path()
..moveTo(offset.dx, offset.dy)
..lineTo(offset.dx + size.width, offset.dy)
..lineTo(offset.dx + size.width / 2, size.height + offset.dy)
..close();
canvas.drawPath(path, paint);
}
@override
bool shouldRepaint(TrianglePainter oldDelegate) => color != oldDelegate.color;
}
Offset positionDependentBox({
required TooltipType type,
required Size size,
required Size childSize,
required Offset target,
required bool preferBelow,
double verticalOffset = 0.0,
double horizontslOffset = 0.0,
double margin = 10.0,
}) {
switch (type) {
case TooltipType.top:
// VERTICAL DIRECTION
final bool fitsBelow =
target.dy + verticalOffset + childSize.height <= size.height - margin;
final bool fitsAbove =
target.dy - verticalOffset - childSize.height >= margin;
final bool tooltipBelow = fitsAbove == fitsBelow
? preferBelow
: fitsBelow;
final double y;
if (tooltipBelow) {
y = math.min(target.dy + verticalOffset, size.height - margin);
} else {
y = math.max(target.dy - verticalOffset - childSize.height, margin);
} // HORIZONTAL DIRECTION
final double flexibleSpace = size.width - childSize.width;
final double x = flexibleSpace <= 2 * margin
// If there's not enough horizontal space for margin + child, center the
// child.
? flexibleSpace / 2.0
: clampDouble(
target.dx - childSize.width / 2,
margin,
flexibleSpace - margin,
);
return Offset(x, y);
case TooltipType.right:
final double dy = math.max(margin, target.dy - childSize.height / 2);
final double dx = math.min(
target.dx + horizontslOffset,
size.width - childSize.width - margin,
);
return Offset(dx, dy);
context.canvas.drawPath(path, paint);
}
}

View File

@@ -1,41 +1,44 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
Future<void> showConfirmDialog({
Future<bool> showConfirmDialog({
required BuildContext context,
required String title,
dynamic content,
required VoidCallback onConfirm,
}) {
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(title),
content: content is String
? Text(content)
: content is Widget
? content
: null,
actions: [
TextButton(
onPressed: Get.back,
child: Text(
'取消',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
Object? content,
// @Deprecated('use `bool result = await showConfirmDialog()` instead')
VoidCallback? onConfirm,
}) async {
assert(content is String? || content is Widget);
return await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title: Text(title),
content: content is String
? Text(content)
: content is Widget
? content
: null,
actions: [
TextButton(
onPressed: Get.back,
child: Text(
'取消',
style: TextStyle(
color: Theme.of(context).colorScheme.outline,
),
),
),
),
TextButton(
onPressed: () {
Get.back();
onConfirm();
},
child: const Text('确认'),
),
],
);
},
);
TextButton(
onPressed: () {
Get.back(result: true);
onConfirm?.call();
},
child: const Text('确认'),
),
],
),
) ??
false;
}
void showPgcFollowDialog({

View File

@@ -1,5 +1,7 @@
import 'package:PiliPlus/common/widgets/radio_widget.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/utils/extension/string_ext.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
@@ -7,92 +9,81 @@ import 'package:get/get.dart';
Future<void> autoWrapReportDialog(
BuildContext context,
Map<String, Map<int, String>> options,
Future<Map> Function(int reasonType, String? reasonDesc, bool banUid)
onSuccess,
) {
Future<LoadingState> Function(int reasonType, String? reasonDesc, bool banUid)
onSuccess, {
bool ban = true,
}) {
int? reasonType;
String? reasonDesc;
bool banUid = false;
late final key = GlobalKey<FormState>();
late final key = GlobalKey<FormFieldState<String>>();
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: const Text('举报'),
titlePadding: const EdgeInsets.only(left: 22, top: 16, right: 22),
contentPadding: const EdgeInsets.symmetric(vertical: 5),
actionsPadding: const EdgeInsets.only(
left: 16,
right: 16,
bottom: 10,
),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: SingleChildScrollView(
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
child: Builder(
builder: (context) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: EdgeInsets.only(
left: 22,
right: 22,
bottom: 5,
),
child: Text('请选择举报的理由:'),
builder: (context) => AlertDialog(
title: const Text('举报'),
titlePadding: const .only(left: 22, top: 16, right: 22),
contentPadding: const .symmetric(vertical: 5),
actionsPadding: const .only(left: 16, right: 16, bottom: 10),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: SingleChildScrollView(
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
child: Builder(
builder: (context) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: .only(left: 22, right: 22, bottom: 5),
child: Text('请选择举报的理由:'),
),
RadioGroup(
onChanged: (value) {
reasonType = value;
(context as Element).markNeedsBuild();
},
groupValue: reasonType,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: options.entries.map((entry) {
return WrapRadioOptionsGroup<int>(
groupTitle: entry.key,
options: entry.value,
);
}).toList(),
),
RadioGroup(
onChanged: (value) {
reasonType = value;
(context as Element).markNeedsBuild();
},
groupValue: reasonType,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: options.entries.map((entry) {
return WrapRadioOptionsGroup<int>(
groupTitle: entry.key,
options: entry.value,
);
}).toList(),
),
if (reasonType == 0)
Padding(
padding: const .only(left: 22, top: 5, right: 22),
child: TextFormField(
key: key,
autofocus: true,
minLines: 2,
maxLines: 4,
initialValue: reasonDesc,
decoration: const InputDecoration(
labelText: '为帮助审核人员更快处理,请补充问题类型和出现位置等详细信息',
border: OutlineInputBorder(),
contentPadding: .all(10),
labelStyle: TextStyle(fontSize: 14),
floatingLabelStyle: TextStyle(fontSize: 14),
),
onChanged: (value) => reasonDesc = value,
validator: (value) =>
value.isNullOrEmpty ? '理由不能为空' : null,
),
),
if (reasonType == 0)
Padding(
padding: const EdgeInsets.only(
left: 22,
top: 5,
right: 22,
),
child: Form(
key: key,
child: TextFormField(
autofocus: true,
minLines: 2,
maxLines: 4,
initialValue: reasonDesc,
decoration: const InputDecoration(
labelText: '为帮助审核人员更快处理,请补充问题类型和出现位置等详细信息',
border: OutlineInputBorder(),
contentPadding: EdgeInsets.all(10),
),
onChanged: (value) => reasonDesc = value,
validator: (value) =>
value.isNullOrEmpty ? '理由不能为空' : null,
),
),
),
],
),
],
),
),
),
),
),
if (ban)
Padding(
padding: const EdgeInsets.only(left: 14, top: 6),
child: CheckBoxText(
@@ -100,42 +91,42 @@ Future<void> autoWrapReportDialog(
onChanged: (value) => banUid = value,
),
),
],
),
actions: [
TextButton(
onPressed: Get.back,
child: Text(
'取消',
style: TextStyle(color: Theme.of(context).colorScheme.outline),
),
),
TextButton(
onPressed: () async {
if (reasonType == null ||
(reasonType == 0 && key.currentState?.validate() != true)) {
return;
}
SmartDialog.showLoading();
try {
final data = await onSuccess(reasonType!, reasonDesc, banUid);
SmartDialog.dismiss();
if (data['code'] == 0) {
Get.back();
SmartDialog.showToast('举报成功');
} else {
SmartDialog.showToast(data['message']);
}
} catch (e) {
SmartDialog.dismiss();
SmartDialog.showToast('提交失败:$e');
}
},
child: const Text('确定'),
),
],
);
},
),
actions: [
TextButton(
onPressed: Get.back,
child: Text(
'取消',
style: TextStyle(color: ColorScheme.of(context).outline),
),
),
TextButton(
onPressed: () async {
if (reasonType == null ||
(reasonType == 0 && key.currentState?.validate() != true)) {
return;
}
SmartDialog.showLoading();
try {
final res = await onSuccess(reasonType!, reasonDesc, banUid);
SmartDialog.dismiss();
if (res.isSuccess) {
Get.back();
SmartDialog.showToast('举报成功');
} else {
res.toast();
}
} catch (e, s) {
SmartDialog.dismiss();
SmartDialog.showToast('提交失败:$e');
Utils.reportError(e, s);
}
},
child: const Text('确定'),
),
],
),
);
}
@@ -166,7 +157,7 @@ class _CheckBoxTextState extends State<CheckBoxText> {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
final colorScheme = ColorScheme.of(context);
return InkWell(
onTap: () {
setState(() {
@@ -199,7 +190,7 @@ class _CheckBoxTextState extends State<CheckBoxText> {
}
}
class ReportOptions {
abstract final class ReportOptions {
// from https://s1.hdslb.com/bfs/seed/jinkela/comment-h5/static/js/605.chunks.js
static Map<String, Map<int, String>> get commentReport => const {
'违反法律法规': {9: '违法违规', 2: '色情', 10: '低俗', 12: '赌博诈骗', 23: '违法信息外链'},
@@ -231,4 +222,46 @@ class ReportOptions {
0: '其他',
},
};
static Map<String, Map<int, String>> get danmakuReport => const {
'': {
1: '违法违禁',
2: '色情低俗',
3: '赌博诈骗',
4: '人身攻击',
5: '侵犯隐私',
6: '垃圾广告',
7: '引战',
8: '剧透',
9: '恶意刷屏',
10: '视频无关',
12: '青少年不良信息',
13: '违法信息外链',
0: '其它', // 11
},
};
static Map<String, Map<int, String>> get liveDanmakuReport => const {
'': {
1: '违法违规',
2: '低俗色情',
3: '垃圾广告',
4: '辱骂引战',
5: '政治敏感',
6: '青少年不良信息',
7: '其他', // avoid show form
},
};
static Map<String, Map<int, String>> get imMsgReport => const {
'': {
1: '色情低俗',
2: '政治敏感',
3: '违法有害',
4: '广告骚扰',
5: '人身攻击',
6: '诈骗',
0: '其他问题',
},
};
}

View File

@@ -3,6 +3,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
const _reason = ['头像违规', '昵称违规', '签名违规'];
const _reasonV2 = ['色情低俗', '不实信息', '违禁', '人身攻击', '赌博诈骗', '违规引流外链'];
Future<void> showMemberReportDialog(
BuildContext context, {
required Object? name,
@@ -17,13 +21,11 @@ Future<void> showMemberReportDialog(
final theme = Theme.of(context);
return AlertDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 16,
),
contentPadding: const EdgeInsets.symmetric(vertical: 16),
titleTextStyle: theme.textTheme.bodyMedium,
title: Column(
spacing: 4,
crossAxisAlignment: .start,
children: [
Text(
'举报: $name',
@@ -34,53 +36,101 @@ Future<void> showMemberReportDialog(
),
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: .min,
crossAxisAlignment: .start,
children: [
const Text('举报内容(必选,可多选)'),
const Padding(
padding: .only(left: 18),
child: Text('举报内容(必选,可多选)'),
),
...List.generate(
3,
(index) => Builder(
builder: (context) => CheckboxListTile(
dense: true,
value: reason.contains(index + 1),
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.zero,
onChanged: (value) {
if (value!) {
reason.add(index + 1);
} else {
reason.remove(index + 1);
}
(context as Element).markNeedsBuild();
},
title: Text(const ['头像违规', '昵称违规', '签名违规'][index]),
),
builder: (context) {
final checked = reason.contains(index + 1);
return ListTile(
dense: true,
minTileHeight: 40,
onTap: () {
if (!checked) {
reason.add(index + 1);
} else {
reason.remove(index + 1);
}
(context as Element).markNeedsBuild();
},
title: Row(
spacing: 8,
children: [
checked
? Icon(
size: 22,
Icons.check_box,
color: theme.colorScheme.primary,
)
: Icon(
size: 22,
Icons.check_box_outline_blank,
color: theme.colorScheme.onSurfaceVariant,
),
Expanded(
child: Text(
_reason[index],
style: const TextStyle(fontSize: 14),
),
),
],
),
);
},
),
),
const Text('举报理由(单选,非必选)'),
const Padding(
padding: .only(left: 18),
child: Text('举报理由(单选,非必选)'),
),
Builder(
builder: (context) => RadioGroup<int>(
onChanged: (v) {
reasonV2 = v;
(context as Element).markNeedsBuild();
},
groupValue: reasonV2,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(
5,
(index) => RadioListTile<int>(
toggleable: true,
controlAffinity: ListTileControlAffinity.leading,
contentPadding: const EdgeInsets.only(left: 4),
builder: (context) => Column(
crossAxisAlignment: .start,
children: List.generate(
_reasonV2.length,
(index) {
final checked = index == reasonV2;
return ListTile(
dense: true,
value: index,
title: Text(
const ['色情低俗', '不实信息', '违禁', '人身攻击', '赌博诈骗'][index],
minTileHeight: 40,
onTap: () {
if (checked) {
reasonV2 = null;
} else {
reasonV2 = index;
}
(context as Element).markNeedsBuild();
},
title: Row(
spacing: 8,
children: [
checked
? Icon(
size: 22,
Icons.radio_button_checked,
color: theme.colorScheme.primary,
)
: Icon(
size: 22,
Icons.radio_button_off,
color: theme.colorScheme.onSurfaceVariant,
),
Expanded(
child: Text(
_reasonV2[index],
style: const TextStyle(fontSize: 14),
),
),
],
),
),
),
);
},
),
),
),
@@ -96,21 +146,16 @@ Future<void> showMemberReportDialog(
),
),
TextButton(
onPressed: () async {
onPressed: () {
if (reason.isEmpty) {
SmartDialog.showToast('至少选择一项作为举报内容');
} else {
Get.back();
var result = await MemberHttp.reportMember(
MemberHttp.reportMember(
mid,
reason: reason.join(','),
reasonV2: reasonV2 != null ? reasonV2! + 1 : null,
);
if (result['msg'] is String && result['msg'].isNotEmpty) {
SmartDialog.showToast(result['msg']);
} else {
SmartDialog.showToast('举报失败');
}
}
},
child: const Text('确定'),

View File

@@ -3,62 +3,141 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class DisabledIcon<T extends Widget> extends SingleChildRenderObjectWidget {
final Color? color;
final double lineLengthScale;
final StrokeCap strokeCap;
class DisabledIcon extends SingleChildRenderObjectWidget {
const DisabledIcon({
super.key,
required T child,
required Widget super.child,
this.disable = false,
this.color,
double? lineLengthScale,
StrokeCap? strokeCap,
}) : lineLengthScale = lineLengthScale ?? 0.9,
strokeCap = strokeCap ?? StrokeCap.butt,
super(child: child);
this.iconSize,
this.lineLengthScale = 0.9,
this.strokeCap = .butt,
});
final bool disable;
final Color? color;
final double? iconSize;
final StrokeCap strokeCap;
final double lineLengthScale;
@override
RenderObject createRenderObject(BuildContext context) {
late final iconTheme = IconTheme.of(context);
return RenderMaskedIcon(
color ??
(child is Icon
? (child as Icon).color ?? IconTheme.of(context).color!
: IconTheme.of(context).color!),
lineLengthScale,
strokeCap,
disable: disable,
iconSize:
iconSize ??
(child is Icon ? (child as Icon).size : null) ??
iconTheme.size ??
24.0,
color:
color ??
(child is Icon ? (child as Icon).color : null) ??
iconTheme.color!,
strokeCap: strokeCap,
lineLengthScale: lineLengthScale,
);
}
T enable() => child as T;
@override
void updateRenderObject(BuildContext context, RenderMaskedIcon renderObject) {
late final iconTheme = IconTheme.of(context);
renderObject
..disable = disable
..iconSize =
iconSize ??
(child is Icon ? (child as Icon).size : null) ??
iconTheme.size ??
24.0
..color =
color ??
(child is Icon ? (child as Icon).color : null) ??
iconTheme.color!
..strokeCap = strokeCap
..lineLengthScale = lineLengthScale;
}
}
class RenderMaskedIcon extends RenderProxyBox {
final Color color;
final double lineLengthScale;
final StrokeCap strokeCap;
RenderMaskedIcon({
required bool disable,
required double iconSize,
required Color color,
required StrokeCap strokeCap,
required double lineLengthScale,
}) : _disable = disable,
_iconSize = iconSize,
_color = color,
_strokeCap = strokeCap,
_lineLengthScale = lineLengthScale;
RenderMaskedIcon(this.color, this.lineLengthScale, this.strokeCap);
bool _disable;
bool get disable => _disable;
set disable(bool value) {
if (_disable == value) return;
_disable = value;
markNeedsPaint();
}
double _iconSize;
double get iconSize => _iconSize;
set iconSize(double value) {
if (_iconSize == value) return;
_iconSize = value;
markNeedsPaint();
}
Color _color;
Color get color => _color;
set color(Color value) {
if (_color == value) return;
_color = value;
markNeedsPaint();
}
StrokeCap _strokeCap;
StrokeCap get strokeCap => _strokeCap;
set strokeCap(StrokeCap value) {
if (_strokeCap == value) return;
_strokeCap = value;
markNeedsPaint();
}
double _lineLengthScale;
double get lineLengthScale => _lineLengthScale;
set lineLengthScale(double value) {
if (_lineLengthScale == value) return;
_lineLengthScale = value;
markNeedsPaint();
}
@override
void paint(PaintingContext context, Offset offset) {
final strokeWidth = size.width / 12;
if (!disable) {
return super.paint(context, offset);
}
final canvas = context.canvas;
var rect = offset & size;
var rectOffset = offset;
Size size = this.size;
final exceedWidth = size.width > _iconSize;
final exceedHeight = size.height > _iconSize;
if (exceedWidth || exceedHeight) {
final dx = exceedWidth ? (size.width - _iconSize) / 2.0 : 0.0;
final dy = exceedHeight ? (size.height - _iconSize) / 2.0 : 0.0;
size = Size.square(_iconSize);
rectOffset += Offset(dx, dy);
} else if (size.width < _iconSize && size.height < _iconSize) {
size = Size.square(_iconSize);
}
final strokeWidth = size.width / 12;
var rect = rectOffset & size;
final sqrt2Width = strokeWidth * sqrt2; // rotate pi / 4
// final path = Path.combine(
// PathOperation.difference,
// Path()..addRect(rect),
// Path()..moveTo(rect.left, rect.top)
// ..relativeLineTo(sqrt2Width, 0)
// ..lineTo(rect.right, rect.bottom - sqrt2Width)
// ..lineTo(rect.right, rect.bottom)
// ..close(),
// );
final path = Path.combine(
PathOperation.union,
Path() // bottom
@@ -77,7 +156,7 @@ class RenderMaskedIcon extends RenderProxyBox {
..clipPath(path, doAntiAlias: false);
super.paint(context, offset);
context.canvas.restore();
canvas.restore();
final linePaint = Paint()
..color = color
@@ -95,8 +174,3 @@ class RenderMaskedIcon extends RenderProxyBox {
);
}
}
extension DisabledIconExt on Icon {
DisabledIcon<Icon> disable([double? lineLengthScale]) =>
DisabledIcon(lineLengthScale: lineLengthScale, child: this);
}

View File

@@ -0,0 +1,357 @@
/*
* This file is part of PiliPlus
*
* PiliPlus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PiliPlus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
*/
import 'dart:math' as math;
import 'package:PiliPlus/common/widgets/dynamic_sliver_app_bar/redering/sliver_persistent_header.dart';
import 'package:PiliPlus/common/widgets/dynamic_sliver_app_bar/sliver_persistent_header.dart';
import 'package:PiliPlus/common/widgets/only_layout_widget.dart'
show LayoutCallback;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'
hide SliverPersistentHeader, SliverPersistentHeaderDelegate;
import 'package:flutter/services.dart';
/// ref [SliverAppBar]
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
_SliverAppBarDelegate({
required this.leading,
required this.automaticallyImplyLeading,
required this.title,
required this.actions,
required this.automaticallyImplyActions,
required this.flexibleSpace,
required this.bottom,
required this.elevation,
required this.scrolledUnderElevation,
required this.shadowColor,
required this.surfaceTintColor,
required this.forceElevated,
required this.backgroundColor,
required this.foregroundColor,
required this.iconTheme,
required this.actionsIconTheme,
required this.primary,
required this.centerTitle,
required this.excludeHeaderSemantics,
required this.titleSpacing,
required this.collapsedHeight,
required this.topPadding,
required this.shape,
required this.toolbarHeight,
required this.leadingWidth,
required this.toolbarTextStyle,
required this.titleTextStyle,
required this.systemOverlayStyle,
required this.forceMaterialTransparency,
required this.useDefaultSemanticsOrder,
required this.clipBehavior,
required this.accessibleNavigation,
required this.actionsPadding,
}) : assert(primary || topPadding == 0.0),
_bottomHeight = bottom?.preferredSize.height ?? 0.0;
final Widget? leading;
final bool automaticallyImplyLeading;
final Widget title;
final List<Widget>? actions;
final bool automaticallyImplyActions;
final Widget flexibleSpace;
final PreferredSizeWidget? bottom;
final double? elevation;
final double? scrolledUnderElevation;
final Color? shadowColor;
final Color? surfaceTintColor;
final bool forceElevated;
final Color? backgroundColor;
final Color? foregroundColor;
final IconThemeData? iconTheme;
final IconThemeData? actionsIconTheme;
final bool primary;
final bool? centerTitle;
final bool excludeHeaderSemantics;
final double? titleSpacing;
final double collapsedHeight;
final double topPadding;
final ShapeBorder? shape;
final double? toolbarHeight;
final double? leadingWidth;
final TextStyle? toolbarTextStyle;
final TextStyle? titleTextStyle;
final SystemUiOverlayStyle? systemOverlayStyle;
final double _bottomHeight;
final bool forceMaterialTransparency;
final bool useDefaultSemanticsOrder;
final Clip? clipBehavior;
final bool accessibleNavigation;
final EdgeInsetsGeometry? actionsPadding;
@override
double get minExtent => collapsedHeight;
@override
Widget build(
BuildContext context,
double shrinkOffset,
bool overlapsContent,
double? maxExtent,
) {
maxExtent ??= double.infinity;
final bool isScrolledUnder =
overlapsContent ||
forceElevated ||
(shrinkOffset > maxExtent - minExtent);
final effectiveTitle = AnimatedOpacity(
opacity: isScrolledUnder ? 1 : 0,
duration: const Duration(milliseconds: 500),
curve: const Cubic(0.2, 0.0, 0.0, 1.0),
child: title,
);
return FlexibleSpaceBar.createSettings(
minExtent: minExtent,
maxExtent: maxExtent,
currentExtent: math.max(minExtent, maxExtent - shrinkOffset),
isScrolledUnder: isScrolledUnder,
hasLeading: leading != null || automaticallyImplyLeading,
child: AppBar(
clipBehavior: clipBehavior,
leading: leading,
automaticallyImplyLeading: automaticallyImplyLeading,
title: effectiveTitle,
actions: actions,
automaticallyImplyActions: automaticallyImplyActions,
flexibleSpace: maxExtent == .infinity
? flexibleSpace
: FlexibleSpaceBar(background: flexibleSpace),
bottom: bottom,
elevation: isScrolledUnder ? elevation : 0.0,
scrolledUnderElevation: scrolledUnderElevation,
shadowColor: shadowColor,
surfaceTintColor: surfaceTintColor,
backgroundColor: backgroundColor,
foregroundColor: foregroundColor,
iconTheme: iconTheme,
actionsIconTheme: actionsIconTheme,
primary: primary,
centerTitle: centerTitle,
excludeHeaderSemantics: excludeHeaderSemantics,
titleSpacing: titleSpacing,
shape: shape,
toolbarHeight: toolbarHeight,
leadingWidth: leadingWidth,
toolbarTextStyle: toolbarTextStyle,
titleTextStyle: titleTextStyle,
systemOverlayStyle: systemOverlayStyle,
forceMaterialTransparency: forceMaterialTransparency,
useDefaultSemanticsOrder: useDefaultSemanticsOrder,
actionsPadding: actionsPadding,
),
);
}
@override
bool shouldRebuild(covariant _SliverAppBarDelegate oldDelegate) {
return leading != oldDelegate.leading ||
automaticallyImplyLeading != oldDelegate.automaticallyImplyLeading ||
title != oldDelegate.title ||
actions != oldDelegate.actions ||
automaticallyImplyActions != oldDelegate.automaticallyImplyActions ||
flexibleSpace != oldDelegate.flexibleSpace ||
bottom != oldDelegate.bottom ||
_bottomHeight != oldDelegate._bottomHeight ||
elevation != oldDelegate.elevation ||
shadowColor != oldDelegate.shadowColor ||
backgroundColor != oldDelegate.backgroundColor ||
foregroundColor != oldDelegate.foregroundColor ||
iconTheme != oldDelegate.iconTheme ||
actionsIconTheme != oldDelegate.actionsIconTheme ||
primary != oldDelegate.primary ||
centerTitle != oldDelegate.centerTitle ||
titleSpacing != oldDelegate.titleSpacing ||
topPadding != oldDelegate.topPadding ||
forceElevated != oldDelegate.forceElevated ||
toolbarHeight != oldDelegate.toolbarHeight ||
leadingWidth != oldDelegate.leadingWidth ||
toolbarTextStyle != oldDelegate.toolbarTextStyle ||
titleTextStyle != oldDelegate.titleTextStyle ||
systemOverlayStyle != oldDelegate.systemOverlayStyle ||
forceMaterialTransparency != oldDelegate.forceMaterialTransparency ||
useDefaultSemanticsOrder != oldDelegate.useDefaultSemanticsOrder ||
accessibleNavigation != oldDelegate.accessibleNavigation ||
actionsPadding != oldDelegate.actionsPadding;
}
@override
String toString() {
return '${describeIdentity(this)}(topPadding: ${topPadding.toStringAsFixed(1)}, bottomHeight: ${_bottomHeight.toStringAsFixed(1)}, ...)';
}
}
class DynamicSliverAppBar extends StatefulWidget {
const DynamicSliverAppBar.medium({
super.key,
this.leading,
this.automaticallyImplyLeading = true,
required this.title,
this.actions,
this.automaticallyImplyActions = true,
required this.flexibleSpace,
this.bottom,
this.elevation,
this.scrolledUnderElevation,
this.shadowColor,
this.surfaceTintColor,
this.forceElevated = false,
this.backgroundColor,
this.foregroundColor,
this.iconTheme,
this.actionsIconTheme,
this.primary = true,
this.centerTitle,
this.excludeHeaderSemantics = false,
this.titleSpacing,
this.shape,
this.leadingWidth,
this.toolbarTextStyle,
this.titleTextStyle,
this.systemOverlayStyle,
this.forceMaterialTransparency = false,
this.useDefaultSemanticsOrder = true,
this.clipBehavior,
this.actionsPadding,
this.onPerformLayout,
});
final LayoutCallback? onPerformLayout;
final Widget? leading;
final bool automaticallyImplyLeading;
final Widget title;
final List<Widget>? actions;
final bool automaticallyImplyActions;
final Widget flexibleSpace;
final PreferredSizeWidget? bottom;
final double? elevation;
final double? scrolledUnderElevation;
final Color? shadowColor;
final Color? surfaceTintColor;
final bool forceElevated;
final Color? backgroundColor;
final Color? foregroundColor;
final IconThemeData? iconTheme;
final IconThemeData? actionsIconTheme;
final bool primary;
final bool? centerTitle;
final bool excludeHeaderSemantics;
final double? titleSpacing;
final ShapeBorder? shape;
final double? leadingWidth;
final TextStyle? toolbarTextStyle;
final TextStyle? titleTextStyle;
final SystemUiOverlayStyle? systemOverlayStyle;
final bool forceMaterialTransparency;
final bool useDefaultSemanticsOrder;
final Clip? clipBehavior;
final EdgeInsetsGeometry? actionsPadding;
@override
State<DynamicSliverAppBar> createState() => _DynamicSliverAppBarState();
}
class _DynamicSliverAppBarState extends State<DynamicSliverAppBar> {
@override
Widget build(BuildContext context) {
final double bottomHeight = widget.bottom?.preferredSize.height ?? 0.0;
final double topPadding = widget.primary
? MediaQuery.viewPaddingOf(context).top
: 0.0;
final double effectiveCollapsedHeight =
topPadding + kToolbarHeight + bottomHeight + 1;
return MediaQuery.removePadding(
context: context,
removeBottom: true,
child: SliverPinnedHeader(
onPerformLayout: widget.onPerformLayout,
delegate: _SliverAppBarDelegate(
leading: widget.leading,
automaticallyImplyLeading: widget.automaticallyImplyLeading,
title: widget.title,
actions: widget.actions,
automaticallyImplyActions: widget.automaticallyImplyActions,
flexibleSpace: widget.flexibleSpace,
bottom: widget.bottom,
elevation: widget.elevation,
scrolledUnderElevation: widget.scrolledUnderElevation,
shadowColor: widget.shadowColor,
surfaceTintColor: widget.surfaceTintColor,
forceElevated: widget.forceElevated,
backgroundColor: widget.backgroundColor,
foregroundColor: widget.foregroundColor,
iconTheme: widget.iconTheme,
actionsIconTheme: widget.actionsIconTheme,
primary: widget.primary,
centerTitle: widget.centerTitle,
excludeHeaderSemantics: widget.excludeHeaderSemantics,
titleSpacing: widget.titleSpacing,
collapsedHeight: effectiveCollapsedHeight,
topPadding: topPadding,
shape: widget.shape,
toolbarHeight: kToolbarHeight,
leadingWidth: widget.leadingWidth,
toolbarTextStyle: widget.toolbarTextStyle,
titleTextStyle: widget.titleTextStyle,
systemOverlayStyle: widget.systemOverlayStyle,
forceMaterialTransparency: widget.forceMaterialTransparency,
useDefaultSemanticsOrder: widget.useDefaultSemanticsOrder,
clipBehavior: widget.clipBehavior,
accessibleNavigation: MediaQuery.of(context).accessibleNavigation,
actionsPadding: widget.actionsPadding,
),
),
);
}
}

View File

@@ -0,0 +1,285 @@
/*
* This file is part of PiliPlus
*
* PiliPlus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PiliPlus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
*/
import 'dart:math' as math;
import 'package:PiliPlus/common/widgets/dynamic_sliver_app_bar/sliver_persistent_header.dart';
import 'package:PiliPlus/common/widgets/only_layout_widget.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart' hide LayoutCallback;
import 'package:flutter/widgets.dart'
hide SliverPersistentHeader, SliverPersistentHeaderDelegate;
/// ref [SliverPersistentHeader]
Rect? _trim(
Rect? original, {
double top = -double.infinity,
double right = double.infinity,
double bottom = double.infinity,
double left = -double.infinity,
}) => original?.intersect(Rect.fromLTRB(left, top, right, bottom));
abstract class RenderSliverPersistentHeader extends RenderSliver
with RenderObjectWithChildMixin<RenderBox>, RenderSliverHelpers {
RenderSliverPersistentHeader({RenderBox? child}) {
this.child = child;
}
SliverPersistentHeaderElement? element;
double get minExtent =>
(element!.widget as SliverPinnedHeader).delegate.minExtent;
bool _needsUpdateChild = true;
double get lastShrinkOffset => _lastShrinkOffset;
double _lastShrinkOffset = 0.0;
bool get lastOverlapsContent => _lastOverlapsContent;
bool _lastOverlapsContent = false;
@protected
void updateChild(
double shrinkOffset,
bool overlapsContent,
double? maxExtent,
) {
assert(element != null);
element!.build(shrinkOffset, overlapsContent, maxExtent);
}
@override
void markNeedsLayout() {
_needsUpdateChild = true;
super.markNeedsLayout();
}
@protected
void updateChildIfNeeded(
double scrollOffset,
double? maxExtent, {
bool overlapsContent = false,
}) {
final double shrinkOffset = maxExtent == null
? scrollOffset
: math.min(scrollOffset, maxExtent);
if (_needsUpdateChild ||
_lastShrinkOffset != shrinkOffset ||
_lastOverlapsContent != overlapsContent) {
invokeLayoutCallback<SliverConstraints>((SliverConstraints constraints) {
assert(constraints == this.constraints);
updateChild(shrinkOffset, overlapsContent, maxExtent);
});
_lastShrinkOffset = shrinkOffset;
_lastOverlapsContent = overlapsContent;
_needsUpdateChild = false;
}
}
@override
double childMainAxisPosition(covariant RenderObject child) =>
super.childMainAxisPosition(child);
@override
bool hitTestChildren(
SliverHitTestResult result, {
required double mainAxisPosition,
required double crossAxisPosition,
}) {
assert(geometry!.hitTestExtent > 0.0);
if (child != null) {
return hitTestBoxChild(
BoxHitTestResult.wrap(result),
child!,
mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition,
);
}
return false;
}
@override
void applyPaintTransform(RenderObject child, Matrix4 transform) {
assert(child == this.child);
applyPaintTransformForBoxChild(child as RenderBox, transform);
}
void triggerRebuild() {
markNeedsLayout();
}
}
class SliverPinnedHeader extends RenderObjectWidget {
const SliverPinnedHeader({
super.key,
required this.delegate,
this.onPerformLayout,
});
final SliverPersistentHeaderDelegate delegate;
final LayoutCallback? onPerformLayout;
@override
SliverPersistentHeaderElement createElement() =>
SliverPersistentHeaderElement(this);
@override
RenderSliverPinnedHeader createRenderObject(BuildContext context) {
return RenderSliverPinnedHeader(onPerformLayout: onPerformLayout);
}
@override
void updateRenderObject(
BuildContext context,
RenderSliverPinnedHeader renderObject,
) {
renderObject.onPerformLayout = onPerformLayout;
}
}
class RenderSliverPinnedHeader extends RenderSliverPersistentHeader {
RenderSliverPinnedHeader({
super.child,
this.onPerformLayout,
});
LayoutCallback? onPerformLayout;
({double crossAxisExtent, double maxExtent})? _maxExtent;
double? get maxExtent => _maxExtent?.maxExtent;
void _rawLayout() {
child!.layout(constraints.asBoxConstraints(), parentUsesSize: true);
_maxExtent = (
crossAxisExtent: constraints.crossAxisExtent,
maxExtent: child!.size.height,
);
onPerformLayout?.call(child!.size);
}
void _layout() {
final double shrinkOffset = math.min(
constraints.scrollOffset,
_maxExtent!.maxExtent,
);
child!.layout(
constraints.asBoxConstraints(
maxExtent: math.max(minExtent, _maxExtent!.maxExtent - shrinkOffset),
),
parentUsesSize: true,
);
}
@override
void performLayout() {
final constraints = this.constraints;
final bool overlapsContent = constraints.overlap > 0.0;
if (_maxExtent == null) {
updateChildIfNeeded(
constraints.scrollOffset,
_maxExtent?.maxExtent,
overlapsContent: overlapsContent,
);
_rawLayout();
} else {
if (_maxExtent!.crossAxisExtent == constraints.crossAxisExtent) {
updateChildIfNeeded(
constraints.scrollOffset,
_maxExtent?.maxExtent,
overlapsContent: overlapsContent,
);
_layout();
} else {
_needsUpdateChild = true;
updateChildIfNeeded(
constraints.scrollOffset,
null,
overlapsContent: overlapsContent,
);
_rawLayout();
if (constraints.scrollOffset > 0.0) {
_needsUpdateChild = true;
updateChildIfNeeded(
constraints.scrollOffset,
_maxExtent?.maxExtent,
overlapsContent: overlapsContent,
);
_layout();
}
}
}
final childExtent = child!.size.height;
final maxExtent = _maxExtent!.maxExtent;
final double effectiveRemainingPaintExtent = math.max(
0,
constraints.remainingPaintExtent - constraints.overlap,
);
final double layoutExtent = clampDouble(
maxExtent - constraints.scrollOffset,
0.0,
effectiveRemainingPaintExtent,
);
geometry = SliverGeometry(
scrollExtent: maxExtent,
paintOrigin: constraints.overlap,
paintExtent: math.min(childExtent, effectiveRemainingPaintExtent),
layoutExtent: layoutExtent,
maxPaintExtent: maxExtent,
maxScrollObstructionExtent: minExtent,
cacheExtent: layoutExtent > 0.0
? -constraints.cacheOrigin + layoutExtent
: layoutExtent,
hasVisualOverflow: false,
);
}
@override
void paint(PaintingContext context, Offset offset) {
if (child != null && geometry!.visible) {
context.paintChild(child!, offset);
}
}
@override
double childMainAxisPosition(RenderBox child) => 0.0;
@override
void showOnScreen({
RenderObject? descendant,
Rect? rect,
Duration duration = Duration.zero,
Curve curve = Curves.ease,
}) {
final Rect? localBounds = descendant != null
? MatrixUtils.transformRect(
descendant.getTransformTo(this),
rect ?? descendant.paintBounds,
)
: rect;
final Rect? newRect = _trim(localBounds, top: 0);
super.showOnScreen(
descendant: this,
rect: newRect,
duration: duration,
curve: curve,
);
}
}

View File

@@ -0,0 +1,148 @@
/*
* This file is part of PiliPlus
*
* PiliPlus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PiliPlus is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PiliPlus. If not, see <https://www.gnu.org/licenses/>.
*/
import 'package:PiliPlus/common/widgets/dynamic_sliver_app_bar/redering/sliver_persistent_header.dart';
import 'package:flutter/widgets.dart';
/// ref [SliverPersistentHeader]
abstract class SliverPersistentHeaderDelegate {
const SliverPersistentHeaderDelegate();
Widget build(
BuildContext context,
double shrinkOffset,
bool overlapsContent,
double? maxExtent,
);
double get minExtent;
bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate);
}
class SliverPersistentHeaderElement extends RenderObjectElement {
SliverPersistentHeaderElement(
SliverPinnedHeader super.widget,
);
@override
RenderSliverPinnedHeader get renderObject =>
super.renderObject as RenderSliverPinnedHeader;
@override
void mount(Element? parent, Object? newSlot) {
super.mount(parent, newSlot);
renderObject.element = this;
}
@override
void unmount() {
renderObject.element = null;
super.unmount();
}
@override
void update(SliverPinnedHeader newWidget) {
final oldWidget = widget as SliverPinnedHeader;
super.update(newWidget);
final SliverPersistentHeaderDelegate newDelegate = newWidget.delegate;
final SliverPersistentHeaderDelegate oldDelegate = oldWidget.delegate;
if (newDelegate != oldDelegate &&
(newDelegate.runtimeType != oldDelegate.runtimeType ||
newDelegate.shouldRebuild(oldDelegate))) {
final RenderSliverPinnedHeader renderObject = this.renderObject;
_updateChild(
newDelegate,
renderObject.lastShrinkOffset,
renderObject.lastOverlapsContent,
renderObject.maxExtent,
);
renderObject.triggerRebuild();
}
}
@override
void performRebuild() {
super.performRebuild();
renderObject.triggerRebuild();
}
Element? child;
void _updateChild(
SliverPersistentHeaderDelegate delegate,
double shrinkOffset,
bool overlapsContent,
double? maxExtent,
) {
final Widget newWidget = delegate.build(
this,
shrinkOffset,
overlapsContent,
maxExtent,
);
child = updateChild(child, newWidget, null);
}
void build(double shrinkOffset, bool overlapsContent, double? maxExtent) {
owner!.buildScope(this, () {
final sliverPersistentHeaderRenderObjectWidget =
widget as SliverPinnedHeader;
_updateChild(
sliverPersistentHeaderRenderObjectWidget.delegate,
shrinkOffset,
overlapsContent,
maxExtent,
);
});
}
@override
void forgetChild(Element child) {
assert(child == this.child);
this.child = null;
super.forgetChild(child);
}
@override
void insertRenderObjectChild(covariant RenderBox child, Object? slot) {
assert(renderObject.debugValidateChild(child));
renderObject.child = child;
}
@override
void moveRenderObjectChild(
covariant RenderObject child,
Object? oldSlot,
Object? newSlot,
) {
assert(false);
}
@override
void removeRenderObjectChild(covariant RenderObject child, Object? slot) {
renderObject.child = null;
}
@override
void visitChildren(ElementVisitor visitor) {
if (child != null) {
visitor(child!);
}
}
}

View File

@@ -1,184 +0,0 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// https://github.com/flutter/flutter/issues/18345#issuecomment-1627644396
class DynamicSliverAppBarMedium extends StatefulWidget {
const DynamicSliverAppBarMedium({
this.flexibleSpace,
super.key,
this.leading,
this.automaticallyImplyLeading = true,
this.title,
this.actions,
this.bottom,
this.elevation,
this.scrolledUnderElevation,
this.shadowColor,
this.surfaceTintColor,
this.forceElevated = false,
this.backgroundColor,
this.backgroundGradient,
this.foregroundColor,
this.iconTheme,
this.actionsIconTheme,
this.primary = true,
this.centerTitle,
this.excludeHeaderSemantics = false,
this.titleSpacing,
this.collapsedHeight,
this.expandedHeight,
this.floating = false,
this.pinned = false,
this.snap = false,
this.stretch = false,
this.stretchTriggerOffset = 100.0,
this.onStretchTrigger,
this.shape,
this.toolbarHeight = kToolbarHeight,
this.leadingWidth,
this.toolbarTextStyle,
this.titleTextStyle,
this.systemOverlayStyle,
this.forceMaterialTransparency = false,
this.clipBehavior,
this.appBarClipper,
this.callback,
});
final ValueChanged<double>? callback;
final Widget? flexibleSpace;
final Widget? leading;
final bool automaticallyImplyLeading;
final Widget? title;
final List<Widget>? actions;
final PreferredSizeWidget? bottom;
final double? elevation;
final double? scrolledUnderElevation;
final Color? shadowColor;
final Color? surfaceTintColor;
final bool forceElevated;
final Color? backgroundColor;
/// If backgroundGradient is non null, backgroundColor will be ignored
final LinearGradient? backgroundGradient;
final Color? foregroundColor;
final IconThemeData? iconTheme;
final IconThemeData? actionsIconTheme;
final bool primary;
final bool? centerTitle;
final bool excludeHeaderSemantics;
final double? titleSpacing;
final double? expandedHeight;
final double? collapsedHeight;
final bool floating;
final bool pinned;
final ShapeBorder? shape;
final double toolbarHeight;
final double? leadingWidth;
final TextStyle? toolbarTextStyle;
final TextStyle? titleTextStyle;
final SystemUiOverlayStyle? systemOverlayStyle;
final bool forceMaterialTransparency;
final Clip? clipBehavior;
final bool snap;
final bool stretch;
final double stretchTriggerOffset;
final AsyncCallback? onStretchTrigger;
final CustomClipper<Path>? appBarClipper;
@override
State<DynamicSliverAppBarMedium> createState() =>
_DynamicSliverAppBarMediumState();
}
class _DynamicSliverAppBarMediumState extends State<DynamicSliverAppBarMedium> {
final GlobalKey _childKey = GlobalKey();
// As long as the height is 0 instead of the sliver app bar a sliver to box adapter will be used
// to calculate dynamically the size for the sliver app bar
double _height = 0;
void _updateHeight() {
// Gets the new height and updates the sliver app bar. Needs to be called after the last frame has been rebuild
// otherwise this will throw an error
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if (_childKey.currentContext == null) return;
setState(() {
_height = (_childKey.currentContext!.findRenderObject()! as RenderBox)
.size
.height;
widget.callback?.call(_height);
});
});
}
double? _width;
@override
void didChangeDependencies() {
super.didChangeDependencies();
final width = MediaQuery.widthOf(context);
if (_width != width) {
_width = width;
_height = 0;
_updateHeight();
}
}
@override
Widget build(BuildContext context) {
//Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
if (_height == 0) {
return SliverToBoxAdapter(
child: UnconstrainedBox(
alignment: Alignment.topLeft,
child: SizedBox(
key: _childKey,
width: _width,
child: widget.flexibleSpace,
),
),
);
}
final padding = MediaQuery.viewPaddingOf(context).top;
return SliverAppBar.medium(
leading: widget.leading,
automaticallyImplyLeading: widget.automaticallyImplyLeading,
title: widget.title,
actions: widget.actions,
bottom: widget.bottom,
elevation: widget.elevation,
scrolledUnderElevation: widget.scrolledUnderElevation,
shadowColor: widget.shadowColor,
surfaceTintColor: widget.surfaceTintColor,
forceElevated: widget.forceElevated,
backgroundColor: widget.backgroundColor,
foregroundColor: widget.foregroundColor,
iconTheme: widget.iconTheme,
actionsIconTheme: widget.actionsIconTheme,
primary: widget.primary,
centerTitle: widget.centerTitle,
excludeHeaderSemantics: widget.excludeHeaderSemantics,
titleSpacing: widget.titleSpacing,
floating: widget.floating,
pinned: widget.pinned,
snap: widget.snap,
stretch: widget.stretch,
stretchTriggerOffset: widget.stretchTriggerOffset,
onStretchTrigger: widget.onStretchTrigger,
shape: widget.shape,
toolbarHeight: kToolbarHeight,
collapsedHeight: kToolbarHeight + padding + 1,
expandedHeight: _height - padding,
leadingWidth: widget.leadingWidth,
toolbarTextStyle: widget.toolbarTextStyle,
titleTextStyle: widget.titleTextStyle,
systemOverlayStyle: widget.systemOverlayStyle,
forceMaterialTransparency: widget.forceMaterialTransparency,
clipBehavior: widget.clipBehavior,
flexibleSpace: FlexibleSpaceBar(background: widget.flexibleSpace),
);
}
}

View File

@@ -0,0 +1,385 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class ChatListView extends BoxScrollView {
ChatListView.separated({
super.key,
super.scrollDirection,
super.controller,
super.primary,
super.physics,
super.padding,
required NullableIndexedWidgetBuilder itemBuilder,
@Deprecated(
'Use findItemIndexCallback instead. '
'findChildIndexCallback returns child indices (which include separators), '
'while findItemIndexCallback returns item indices (which do not). '
'If you were multiplying results by 2 to account for separators, '
'you can remove that workaround when migrating to findItemIndexCallback. '
'This feature was deprecated after v3.37.0-1.0.pre.',
)
ChildIndexGetter? findChildIndexCallback,
ChildIndexGetter? findItemIndexCallback,
required IndexedWidgetBuilder separatorBuilder,
required int itemCount,
bool addAutomaticKeepAlives = true,
bool addRepaintBoundaries = true,
bool addSemanticIndexes = true,
super.cacheExtent,
super.dragStartBehavior,
super.keyboardDismissBehavior,
super.restorationId,
super.clipBehavior,
super.hitTestBehavior,
}) : assert(itemCount >= 0),
assert(
findItemIndexCallback == null || findChildIndexCallback == null,
'Cannot provide both findItemIndexCallback and findChildIndexCallback. '
'Use findItemIndexCallback as findChildIndexCallback is deprecated.',
),
childrenDelegate = SliverChildBuilderDelegate(
(BuildContext context, int index) {
final int itemIndex = index ~/ 2;
if (index.isEven) {
return itemBuilder(context, itemIndex);
}
return separatorBuilder(context, itemIndex);
},
findChildIndexCallback: findItemIndexCallback != null
? (Key key) {
final int? itemIndex = findItemIndexCallback(key);
return itemIndex == null ? null : itemIndex * 2;
}
: findChildIndexCallback,
childCount: _computeActualChildCount(itemCount),
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
semanticIndexCallback: (Widget widget, int index) {
return index.isEven ? index ~/ 2 : null;
},
),
super(semanticChildCount: itemCount, reverse: true);
final SliverChildDelegate childrenDelegate;
@override
Widget buildChildLayout(BuildContext context) {
return SliverChatList(delegate: childrenDelegate);
}
static int _computeActualChildCount(int itemCount) {
return math.max(0, itemCount * 2 - 1);
}
}
class SliverChatList extends SliverMultiBoxAdaptorWidget {
const SliverChatList({super.key, required super.delegate});
@override
SliverMultiBoxAdaptorElement createElement() =>
SliverMultiBoxAdaptorElement(this, replaceMovedChildren: true);
@override
RenderSliverChatList createRenderObject(BuildContext context) {
final element = context as SliverMultiBoxAdaptorElement;
return RenderSliverChatList(childManager: element);
}
}
class RenderSliverChatList extends RenderSliverMultiBoxAdaptor
with ExtendedRenderObjectMixin {
RenderSliverChatList({required super.childManager});
@override
void performLayout() {
final SliverConstraints constraints = this.constraints;
childManager
..didStartLayout()
..setDidUnderflow(false);
final double scrollOffset =
constraints.scrollOffset + constraints.cacheOrigin;
assert(scrollOffset >= 0.0);
final double remainingExtent = constraints.remainingCacheExtent;
assert(remainingExtent >= 0.0);
final double targetEndScrollOffset = scrollOffset + remainingExtent;
final BoxConstraints childConstraints = constraints.asBoxConstraints();
var leadingGarbage = 0;
var trailingGarbage = 0;
var reachedEnd = false;
if (firstChild == null) {
if (!addInitialChild()) {
geometry = SliverGeometry.zero;
childManager.didFinishLayout();
return;
}
}
///
handleCloseToTrailingBegin();
RenderBox? leadingChildWithLayout, trailingChildWithLayout;
RenderBox? earliestUsefulChild = firstChild;
if (childScrollOffset(firstChild!) == null) {
var leadingChildrenWithoutLayoutOffset = 0;
while (earliestUsefulChild != null &&
childScrollOffset(earliestUsefulChild) == null) {
earliestUsefulChild = childAfter(earliestUsefulChild);
leadingChildrenWithoutLayoutOffset += 1;
}
collectGarbage(leadingChildrenWithoutLayoutOffset, 0);
if (firstChild == null) {
if (!addInitialChild()) {
geometry = SliverGeometry.zero;
childManager.didFinishLayout();
return;
}
}
}
earliestUsefulChild = firstChild;
for (
double earliestScrollOffset = childScrollOffset(earliestUsefulChild!)!;
earliestScrollOffset > scrollOffset;
earliestScrollOffset = childScrollOffset(earliestUsefulChild)!
) {
earliestUsefulChild = insertAndLayoutLeadingChild(
childConstraints,
parentUsesSize: true,
);
if (earliestUsefulChild == null) {
final childParentData =
firstChild!.parentData! as SliverMultiBoxAdaptorParentData;
childParentData.layoutOffset = 0.0;
if (scrollOffset == 0.0) {
firstChild!.layout(childConstraints, parentUsesSize: true);
earliestUsefulChild = firstChild;
leadingChildWithLayout = earliestUsefulChild;
trailingChildWithLayout ??= earliestUsefulChild;
break;
} else {
geometry = SliverGeometry(scrollOffsetCorrection: -scrollOffset);
return;
}
}
final double firstChildScrollOffset =
earliestScrollOffset - paintExtentOf(firstChild!);
if (firstChildScrollOffset < -precisionErrorTolerance) {
geometry = SliverGeometry(
scrollOffsetCorrection: -firstChildScrollOffset,
);
final childParentData =
firstChild!.parentData! as SliverMultiBoxAdaptorParentData;
childParentData.layoutOffset = 0.0;
return;
}
final childParentData =
earliestUsefulChild.parentData! as SliverMultiBoxAdaptorParentData;
childParentData.layoutOffset = firstChildScrollOffset;
assert(earliestUsefulChild == firstChild);
leadingChildWithLayout = earliestUsefulChild;
trailingChildWithLayout ??= earliestUsefulChild;
}
assert(childScrollOffset(firstChild!)! > -precisionErrorTolerance);
if (scrollOffset < precisionErrorTolerance) {
while (indexOf(firstChild!) > 0) {
final double earliestScrollOffset = childScrollOffset(firstChild!)!;
earliestUsefulChild = insertAndLayoutLeadingChild(
childConstraints,
parentUsesSize: true,
);
assert(earliestUsefulChild != null);
final double firstChildScrollOffset =
earliestScrollOffset - paintExtentOf(firstChild!);
final childParentData =
firstChild!.parentData! as SliverMultiBoxAdaptorParentData;
childParentData.layoutOffset = 0.0;
if (firstChildScrollOffset < -precisionErrorTolerance) {
geometry = SliverGeometry(
scrollOffsetCorrection: -firstChildScrollOffset,
);
return;
}
}
}
assert(earliestUsefulChild == firstChild);
assert(childScrollOffset(earliestUsefulChild!)! <= scrollOffset);
if (leadingChildWithLayout == null) {
earliestUsefulChild!.layout(childConstraints, parentUsesSize: true);
leadingChildWithLayout = earliestUsefulChild;
trailingChildWithLayout = earliestUsefulChild;
}
var inLayoutRange = true;
var child = earliestUsefulChild;
int index = indexOf(child!);
double endScrollOffset = childScrollOffset(child)! + paintExtentOf(child);
bool advance() {
assert(child != null);
if (child == trailingChildWithLayout) {
inLayoutRange = false;
}
child = childAfter(child!);
if (child == null) {
inLayoutRange = false;
}
index += 1;
if (!inLayoutRange) {
if (child == null || indexOf(child!) != index) {
child = insertAndLayoutChild(
childConstraints,
after: trailingChildWithLayout,
parentUsesSize: true,
);
if (child == null) {
return false;
}
} else {
child!.layout(childConstraints, parentUsesSize: true);
}
trailingChildWithLayout = child;
}
assert(child != null);
final childParentData =
child!.parentData! as SliverMultiBoxAdaptorParentData;
childParentData.layoutOffset = endScrollOffset;
assert(childParentData.index == index);
endScrollOffset = childScrollOffset(child!)! + paintExtentOf(child!);
return true;
}
while (endScrollOffset < scrollOffset) {
leadingGarbage += 1;
if (!advance()) {
assert(leadingGarbage == childCount);
assert(child == null);
collectGarbage(leadingGarbage - 1, 0);
assert(firstChild == lastChild);
final double extent =
childScrollOffset(lastChild!)! + paintExtentOf(lastChild!);
geometry = SliverGeometry(scrollExtent: extent, maxPaintExtent: extent);
return;
}
}
while (endScrollOffset < targetEndScrollOffset) {
if (!advance()) {
reachedEnd = true;
break;
}
}
if (child != null) {
child = childAfter(child!);
while (child != null) {
trailingGarbage += 1;
child = childAfter(child!);
}
}
collectGarbage(leadingGarbage, trailingGarbage);
assert(debugAssertChildListIsNonEmptyAndContiguous());
final double estimatedMaxScrollOffset;
///
endScrollOffset = handleCloseToTrailingEnd(endScrollOffset);
if (reachedEnd) {
estimatedMaxScrollOffset = endScrollOffset;
} else {
estimatedMaxScrollOffset = childManager.estimateMaxScrollOffset(
constraints,
firstIndex: indexOf(firstChild!),
lastIndex: indexOf(lastChild!),
leadingScrollOffset: childScrollOffset(firstChild!),
trailingScrollOffset: endScrollOffset,
);
assert(
estimatedMaxScrollOffset >=
endScrollOffset - childScrollOffset(firstChild!)!,
);
}
final double firstChildScrollOffset = childScrollOffset(firstChild!)!;
double paintExtent = calculatePaintOffset(
constraints,
from: firstChildScrollOffset,
to: endScrollOffset,
);
final double cacheExtent = calculateCacheOffset(
constraints,
from: firstChildScrollOffset,
to: endScrollOffset,
);
final double targetEndScrollOffsetForPaint =
constraints.scrollOffset + constraints.remainingPaintExtent;
///
paintExtent += _closeToTrailingDistance;
geometry = SliverGeometry(
scrollExtent: estimatedMaxScrollOffset,
paintExtent: paintExtent,
cacheExtent: cacheExtent,
maxPaintExtent: estimatedMaxScrollOffset,
hasVisualOverflow:
endScrollOffset > targetEndScrollOffsetForPaint ||
constraints.scrollOffset > 0.0,
);
if (estimatedMaxScrollOffset == endScrollOffset) {
childManager.setDidUnderflow(true);
}
childManager.didFinishLayout();
}
}
const double kChatListPadding = 14.0;
/// from https://github.com/fluttercandies/extended_list
mixin ExtendedRenderObjectMixin on RenderSliverMultiBoxAdaptor {
void handleCloseToTrailingBegin() {
_closeToTrailingDistance = 0.0;
}
double handleCloseToTrailingEnd(double endScrollOffset) {
final extent = constraints.remainingPaintExtent - kChatListPadding;
if (endScrollOffset < extent) {
_closeToTrailingDistance = extent - endScrollOffset;
return extent;
}
return endScrollOffset;
}
double _closeToTrailingDistance = 0.0;
@override
double? childScrollOffset(RenderObject child) {
return (super.childScrollOffset(child) ?? 0.0) + _closeToTrailingDistance;
}
}

View File

@@ -20,7 +20,7 @@ import 'dart:math' as math;
import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' hide DraggableScrollableSheet;
/// Controls a [DraggableScrollableSheet].
///
@@ -112,11 +112,10 @@ class DraggableScrollableController extends ChangeNotifier {
_assertAttached();
assert(size >= 0 && size <= 1);
assert(duration != Duration.zero);
final AnimationController animationController =
AnimationController.unbounded(
vsync: _attachedController!.position.context.vsync,
value: _attachedController!.extent.currentSize,
);
final animationController = AnimationController.unbounded(
vsync: _attachedController!.position.context.vsync,
value: _attachedController!.extent.currentSize,
);
_animationControllers.add(animationController);
_attachedController!.position.goIdle();
// This disables any snapping until the next user interaction with the sheet.
@@ -583,7 +582,7 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
}
List<double> _impliedSnapSizes() {
for (int index = 0; index < (widget.snapSizes?.length ?? 0); index += 1) {
for (var index = 0; index < (widget.snapSizes?.length ?? 0); index += 1) {
final double snapSize = widget.snapSizes![index];
assert(
snapSize >= widget.minChildSize && snapSize <= widget.maxChildSize,
@@ -684,11 +683,11 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
// have changed when the widget was updated.
WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) {
for (
int index = 0;
var index = 0;
index < _scrollController.positions.length;
index++
) {
final _DraggableScrollableSheetScrollPosition position =
final position =
_scrollController.positions.elementAt(index)
as _DraggableScrollableSheetScrollPosition;
position.goBallistic(0);
@@ -702,7 +701,7 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
.asMap()
.keys
.map((int index) {
final String snapSizeString = widget.snapSizes![index].toString();
final snapSizeString = widget.snapSizes![index].toString();
if (index == invalidIndex) {
return '>>> $snapSizeString <<<';
}
@@ -917,14 +916,10 @@ class _DraggableScrollableSheetScrollPosition
);
}
final AnimationController ballisticController =
AnimationController.unbounded(
debugLabel: objectRuntimeType(
this,
'_DraggableScrollableSheetPosition',
),
vsync: context.vsync,
);
final ballisticController = AnimationController.unbounded(
debugLabel: objectRuntimeType(this, '_DraggableScrollableSheetPosition'),
vsync: context.vsync,
);
_ballisticControllers.add(ballisticController);
double lastPosition = extent.currentPixels;
@@ -1080,8 +1075,7 @@ class _InheritedResetNotifier extends InheritedNotifier<_ResetNotifier> {
return false;
}
assert(widget is _InheritedResetNotifier);
final _InheritedResetNotifier inheritedNotifier =
widget as _InheritedResetNotifier;
final inheritedNotifier = widget as _InheritedResetNotifier;
final bool wasCalled = inheritedNotifier.notifier!._wasCalled;
inheritedNotifier.notifier!._wasCalled = false;
return wasCalled;
@@ -1158,6 +1152,10 @@ class _SnappingSimulation extends Simulation {
return pixelSnapSizes.first;
}
final double nextSize = pixelSnapSizes[indexOfNextSize];
// If already snapped - keep this as target size
if (nextSize == position) {
return nextSize;
}
final double previousSize = pixelSnapSizes[indexOfNextSize - 1];
if (initialVelocity.abs() <= tolerance.velocity) {
// If velocity is zero, snap to the nearest snap size with the minimum velocity.

Some files were not shown because too many files have changed in this diff Show More