mod: bottomSheet样式
This commit is contained in:
@ -49,7 +49,10 @@ class FollowItem extends StatelessWidget {
|
||||
child: TextButton(
|
||||
onPressed: () async {
|
||||
await showFlexibleBottomSheet(
|
||||
bottomSheetColor: Colors.transparent,
|
||||
bottomSheetBorderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
minHeight: 1,
|
||||
initHeight: 1,
|
||||
maxHeight: 1,
|
||||
|
@ -519,7 +519,10 @@ class VideoIntroController extends GetxController {
|
||||
// 设置关注分组
|
||||
void setFollowGroup() {
|
||||
showFlexibleBottomSheet(
|
||||
bottomSheetColor: Colors.transparent,
|
||||
bottomSheetBorderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
minHeight: 0.6,
|
||||
initHeight: 0.6,
|
||||
maxHeight: 1,
|
||||
|
@ -230,7 +230,10 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
|
||||
void _showFavPanel() {
|
||||
showFlexibleBottomSheet(
|
||||
bottomSheetColor: Colors.transparent,
|
||||
bottomSheetBorderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
minHeight: 0.6,
|
||||
initHeight: 0.6,
|
||||
maxHeight: 1,
|
||||
|
@ -26,16 +26,7 @@ class _FavPanelState extends State<FavPanel> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
return Column(
|
||||
children: [
|
||||
AppBar(
|
||||
centerTitle: false,
|
||||
@ -61,19 +52,18 @@ class _FavPanelState extends State<FavPanel> {
|
||||
return Obx(
|
||||
() => ListView.builder(
|
||||
controller: widget.scrollController,
|
||||
itemCount:
|
||||
widget.ctr!.favFolderData.value.list!.length,
|
||||
itemCount: widget.ctr!.favFolderData.value.list!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item =
|
||||
widget.ctr!.favFolderData.value.list![index];
|
||||
return ListTile(
|
||||
onTap: () => widget.ctr!
|
||||
.onChoose(item.favState != 1, index),
|
||||
onTap: () =>
|
||||
widget.ctr!.onChoose(item.favState != 1, index),
|
||||
dense: true,
|
||||
leading: const Icon(Icons.folder_outlined),
|
||||
minLeadingWidth: 0,
|
||||
title: Text(widget.ctr!.favFolderData.value
|
||||
.list![index].title!),
|
||||
title: Text(widget
|
||||
.ctr!.favFolderData.value.list![index].title!),
|
||||
subtitle: Text(
|
||||
'${item.mediaCount}个内容 ',
|
||||
),
|
||||
@ -123,9 +113,8 @@ class _FavPanelState extends State<FavPanel> {
|
||||
onPressed: () => Get.back(),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.only(left: 30, right: 30),
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.onInverseSurface, // 设置按钮背景色
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.onInverseSurface, // 设置按钮背景色
|
||||
),
|
||||
child: const Text('取消'),
|
||||
),
|
||||
@ -141,13 +130,12 @@ class _FavPanelState extends State<FavPanel> {
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.primary, // 设置按钮背景色
|
||||
),
|
||||
child: const Text('确认选择'),
|
||||
child: const Text('确认'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -54,16 +54,7 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
AppBar(
|
||||
centerTitle: false,
|
||||
@ -71,8 +62,7 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
leading: IconButton(
|
||||
onPressed: () => Get.back(),
|
||||
icon: const Icon(Icons.close_outlined)),
|
||||
title:
|
||||
Text('设置关注分组', style: Theme.of(context).textTheme.titleMedium),
|
||||
title: Text('设置关注分组', style: Theme.of(context).textTheme.titleMedium),
|
||||
),
|
||||
Expanded(
|
||||
child: Material(
|
||||
@ -108,8 +98,8 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
value: data['data'][index].checked,
|
||||
onChanged: (bool? checkValue) {
|
||||
data['data'][index].checked = checkValue;
|
||||
showDefault = !data['data']
|
||||
.any((e) => e.checked == true);
|
||||
showDefault =
|
||||
!data['data'].any((e) => e.checked == true);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
@ -159,7 +149,6 @@ class _GroupPanelState extends State<GroupPanel> {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user