undo: flutter version 3.22.1 -> 3.19.1

This commit is contained in:
guozhigq
2024-06-12 23:37:29 +08:00
parent b511519323
commit 513c9b94a9
23 changed files with 47 additions and 44 deletions

View File

@ -305,7 +305,7 @@ class VideoContent extends StatelessWidget {
if (source == 'later') ...[
IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => onPressedFn?.call(),
icon: Icon(

View File

@ -232,11 +232,11 @@ class _BangumiInfoState extends State<BangumiInfo> {
height: 34,
child: IconButton(
style: ButtonStyle(
padding:
WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(
EdgeInsets.zero),
backgroundColor:
WidgetStateProperty.resolveWith(
(Set<WidgetState> states) {
MaterialStateProperty.resolveWith(
(Set<MaterialState> states) {
return t.colorScheme.primaryContainer
.withOpacity(0.7);
}),

View File

@ -139,7 +139,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
height: 34,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
widget.bangumiIntroController?.bottomSheetController =

View File

@ -162,7 +162,7 @@ class _DynamicsPageState extends State<DynamicsPage>
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.surfaceContainerHighest
.surfaceVariant
.withOpacity(0.7),
borderRadius: BorderRadius.circular(20),
),

View File

@ -82,7 +82,7 @@ class AuthorPanel extends StatelessWidget {
height: 32,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
showModalBottomSheet(

View File

@ -217,7 +217,7 @@ class VideoContent extends StatelessWidget {
bottom: -4,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
showDialog(

View File

@ -217,10 +217,11 @@ class HistoryItem extends StatelessWidget {
curve: Curves.easeInOut,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(
padding: MaterialStateProperty.all(
EdgeInsets.zero),
backgroundColor:
WidgetStateProperty.resolveWith(
MaterialStateProperty
.resolveWith(
(states) {
return Colors.white
.withOpacity(0.8);

View File

@ -124,7 +124,7 @@ class _BottomControlState extends State<BottomControl> {
height: 34,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () async {
bool canUsePiP = false;

View File

@ -249,7 +249,8 @@ class _LoginPageState extends State<LoginPage> {
IconButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.resolveWith((states) {
MaterialStateProperty.resolveWith(
(states) {
return Theme.of(context)
.colorScheme
.primary
@ -339,7 +340,8 @@ class _LoginPageState extends State<LoginPage> {
IconButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.resolveWith((states) {
MaterialStateProperty.resolveWith(
(states) {
return Theme.of(context)
.colorScheme
.primary

View File

@ -178,10 +178,10 @@ class _MediaPageState extends State<MediaPage>
child: Center(
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(
padding: MaterialStateProperty.all(
EdgeInsets.zero),
backgroundColor:
WidgetStateProperty.resolveWith(
MaterialStateProperty.resolveWith(
(states) {
return Theme.of(context)
.colorScheme

View File

@ -104,7 +104,7 @@ class SearchVideoPanel extends StatelessWidget {
height: 32,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => controller.onShowFilterSheet(ctr),
icon: Icon(

View File

@ -240,10 +240,10 @@ class _ExtraSettingState extends State<ExtraSetting> {
alignment: Alignment.centerRight,
scale: 0.8,
child: Switch(
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
(Set<WidgetState> states) {
thumbIcon: MaterialStateProperty.resolveWith<Icon?>(
(Set<MaterialState> states) {
if (states.isNotEmpty &&
states.first == WidgetState.selected) {
states.first == MaterialState.selected) {
return const Icon(Icons.done);
}
return null; // All other states will use the default thumbIcon.

View File

@ -69,10 +69,10 @@ class _StyleSettingState extends State<StyleSetting> {
alignment: Alignment.centerRight,
scale: 0.8,
child: Switch(
thumbIcon: WidgetStateProperty.resolveWith<Icon?>(
(Set<WidgetState> states) {
thumbIcon: MaterialStateProperty.resolveWith<Icon?>(
(Set<MaterialState> states) {
if (states.isNotEmpty &&
states.first == WidgetState.selected) {
states.first == MaterialState.selected) {
return const Icon(Icons.done);
}
return null; // All other states will use the default thumbIcon.

View File

@ -70,9 +70,9 @@ class _SetSwitchItemState extends State<SetSwitchItem> {
alignment: Alignment.centerRight, // 缩放Switch的大小后保持右侧对齐, 避免右侧空隙过大
scale: 0.8,
child: Switch(
thumbIcon:
WidgetStateProperty.resolveWith<Icon?>((Set<WidgetState> states) {
if (states.isNotEmpty && states.first == WidgetState.selected) {
thumbIcon: MaterialStateProperty.resolveWith<Icon?>(
(Set<MaterialState> states) {
if (states.isNotEmpty && states.first == MaterialState.selected) {
return const Icon(Icons.done);
}
return null; // All other states will use the default thumbIcon.

View File

@ -106,7 +106,7 @@ class _PagesPanelState extends State<PagesPanel> {
height: 34,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
widget.videoIntroCtr.bottomSheetController =

View File

@ -27,8 +27,8 @@ class ToolbarIconButton extends StatelessWidget {
? Theme.of(context).colorScheme.onSecondaryContainer
: Theme.of(context).colorScheme.outline,
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
backgroundColor: WidgetStateProperty.resolveWith((states) {
padding: MaterialStateProperty.all(EdgeInsets.zero),
backgroundColor: MaterialStateProperty.resolveWith((states) {
return selected
? Theme.of(context).colorScheme.secondaryContainer
: null;

View File

@ -268,7 +268,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
size: 22),
label: const Text('转发到动态'),
style: ButtonStyle(
foregroundColor: WidgetStateProperty.all(
foregroundColor: MaterialStateProperty.all(
isForward.value
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.outline,

View File

@ -1255,7 +1255,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 34,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => showShootDanmakuSheet(),
child: const Text(
@ -1270,7 +1270,7 @@ class _HeaderControlState extends State<HeaderControl> {
child: Obx(
() => IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
_.isOpenDanmu.value = !_.isOpenDanmu.value;
@ -1293,7 +1293,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 34,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () async {
bool canUsePiP = false;
@ -1337,7 +1337,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 34,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => showSetSpeedSheet(),
child: Text(

View File

@ -281,7 +281,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
widget.showEposideCb?.call();
},
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
child: const Text(
'选集',
@ -296,7 +296,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
child: TextButton(
onPressed: () => _.toggleVideoFit(),
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
child: Obx(
() => Text(
@ -313,7 +313,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
height: 34,
child: TextButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {},
child: Obx(

View File

@ -17,7 +17,7 @@ class ComBtn extends StatelessWidget {
height: 34,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () {
fuc!();

View File

@ -68,7 +68,7 @@ class PlayOrPauseButtonState extends State<PlayOrPauseButton>
height: 34,
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: player.playOrPause,
color: Colors.white,

View File

@ -39,7 +39,7 @@ Future imageSaveDialog(context, videoItem, closeFn) {
const BorderRadius.all(Radius.circular(20))),
child: IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => closeFn!(),
icon: const Icon(

View File

@ -762,10 +762,10 @@ packages:
dependency: transitive
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.19.0"
version: "0.18.1"
io:
dependency: transitive
description:
@ -1467,10 +1467,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.0"
version: "0.6.1"
timing:
dependency: transitive
description: