mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 14:29:35 +00:00
一堆乱七八糟的修改
播放页面增加桌面版
This commit is contained in:
parent
aee1fbde88
commit
3ba35b31b8
116 changed files with 1238 additions and 2592 deletions
|
|
@ -0,0 +1,56 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
|
||||
class NavigationWithSwitchTile extends AbstractSettingsTile {
|
||||
const NavigationWithSwitchTile({
|
||||
this.leading,
|
||||
// this.trailing,
|
||||
required this.value,
|
||||
required this.title,
|
||||
this.description,
|
||||
this.descriptionInlineIos = false,
|
||||
this.onPressed,
|
||||
this.enabled = true,
|
||||
this.backgroundColor,
|
||||
super.key,
|
||||
this.onToggle,
|
||||
});
|
||||
|
||||
final Widget title;
|
||||
final Widget? description;
|
||||
final Color? backgroundColor;
|
||||
final bool descriptionInlineIos;
|
||||
final bool enabled;
|
||||
final Widget? leading;
|
||||
final Function(BuildContext)? onPressed;
|
||||
final bool value;
|
||||
final Function(bool)? onToggle;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsTile.navigation(
|
||||
title: title,
|
||||
description: description,
|
||||
backgroundColor: backgroundColor,
|
||||
descriptionInlineIos: descriptionInlineIos,
|
||||
enabled: enabled,
|
||||
leading: leading,
|
||||
onPressed: onPressed,
|
||||
trailing: IntrinsicHeight(
|
||||
child: Row(
|
||||
children: [
|
||||
VerticalDivider(
|
||||
color: Theme.of(context).dividerColor.withValues(alpha: 0.5),
|
||||
indent: 8.0,
|
||||
endIndent: 8.0,
|
||||
),
|
||||
Switch.adaptive(
|
||||
value: value,
|
||||
onChanged: onToggle,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue