mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-31 11:52:16 +00:00
Ui fixes
This commit is contained in:
parent
ee91277041
commit
5a12311c88
15 changed files with 124 additions and 180 deletions
|
@ -570,5 +570,6 @@
|
|||
"downloadingUpdate": "Downloading",
|
||||
"completed": "completed",
|
||||
"permissionNotGranted": "Permission not granted",
|
||||
"inputSearchTerm": "Input a search term."
|
||||
"inputSearchTerm": "Input a search term.",
|
||||
"answers": "Answers"
|
||||
}
|
|
@ -570,5 +570,6 @@
|
|||
"downloadingUpdate": "Descargando",
|
||||
"completed": "completado",
|
||||
"permissionNotGranted": "Permiso no concedido",
|
||||
"inputSearchTerm": "Introduce un término de búsqueda."
|
||||
"inputSearchTerm": "Introduce un término de búsqueda.",
|
||||
"answers": "Respuestas"
|
||||
}
|
|
@ -83,7 +83,7 @@ class ManagementModal extends StatelessWidget {
|
|||
: null,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 35,
|
||||
horizontal: 44,
|
||||
vertical: 8
|
||||
),
|
||||
child: Row(
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:adguard_home_manager/widgets/custom_list_tile.dart';
|
||||
import 'package:adguard_home_manager/widgets/section_label.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -119,17 +121,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.status,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.status),
|
||||
LogListTile(
|
||||
icon: Icons.shield_rounded,
|
||||
title: AppLocalizations.of(context)!.result,
|
||||
|
@ -165,17 +157,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
title: AppLocalizations.of(context)!.time,
|
||||
subtitle: formatTimestampUTCFromAPI(log.time, 'HH:mm:ss')
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.request,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.request),
|
||||
LogListTile(
|
||||
icon: Icons.domain_rounded,
|
||||
title: AppLocalizations.of(context)!.domain,
|
||||
|
@ -191,17 +173,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
title: AppLocalizations.of(context)!.clas,
|
||||
subtitle: log.question.questionClass
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.response,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.response),
|
||||
if (log.upstream != '') LogListTile(
|
||||
icon: Icons.dns_rounded,
|
||||
title: AppLocalizations.of(context)!.dnsServer,
|
||||
|
@ -217,17 +189,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
title: AppLocalizations.of(context)!.responseCode,
|
||||
subtitle: log.status
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.client,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.client),
|
||||
LogListTile(
|
||||
icon: Icons.smartphone_rounded,
|
||||
title: AppLocalizations.of(context)!.deviceIp,
|
||||
|
@ -239,17 +201,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
subtitle: log.clientInfo!.name
|
||||
),
|
||||
if (log.rules.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 10),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.rules,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.rules),
|
||||
...log.rules.map((rule) => LogListTile(
|
||||
icon: Icons.rule_rounded,
|
||||
title: rule.text,
|
||||
|
@ -257,17 +209,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
)).toList()
|
||||
],
|
||||
if (log.answer.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.answer,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).primaryColor
|
||||
),
|
||||
),
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.answers),
|
||||
...log.answer.map((a) => LogListTile(
|
||||
icon: Icons.download_rounded,
|
||||
title: a.value,
|
||||
|
|
|
@ -64,7 +64,7 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
children: [
|
||||
SectionLabel(
|
||||
label: AppLocalizations.of(context)!.theme,
|
||||
padding: const EdgeInsets.only(top: 10, left: 25, right: 25, bottom: 5),
|
||||
padding: const EdgeInsets.only(top: 10, left: 16, right: 16, bottom: 5),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
|
@ -108,7 +108,7 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
|
|||
),
|
||||
SectionLabel(
|
||||
label: AppLocalizations.of(context)!.color,
|
||||
padding: const EdgeInsets.only(top: 45, left: 25, right: 25, bottom: 5),
|
||||
padding: const EdgeInsets.only(top: 45, left: 16, right: 16, bottom: 5),
|
||||
),
|
||||
if (appConfigProvider.androidDeviceInfo != null && appConfigProvider.androidDeviceInfo!.version.sdkInt! >= 31) CustomSwitchListTile(
|
||||
value: dynamicColor,
|
||||
|
|
|
@ -27,63 +27,60 @@ class ThemeModeButton extends StatelessWidget {
|
|||
? const Color.fromRGBO(130, 130, 130, 1)
|
||||
: const Color.fromRGBO(100, 100, 100, 1);
|
||||
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: InkWell(
|
||||
onTap: disabled == null || disabled == false
|
||||
? () => onChanged(value)
|
||||
: null,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: AnimatedContainer(
|
||||
padding: const EdgeInsets.all(10),
|
||||
width: 150,
|
||||
height: 150,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
: greyBackgroundColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
: greyBackgroundColor,
|
||||
border: Border.all(
|
||||
color: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
: greyBackgroundColor
|
||||
)
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
return ElevatedButton(
|
||||
onPressed: disabled == null || disabled == false
|
||||
? () => onChanged(value)
|
||||
: null,
|
||||
style: ButtonStyle(
|
||||
elevation: MaterialStateProperty.all(0),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
)
|
||||
),
|
||||
backgroundColor: MaterialStateProperty.all(
|
||||
value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
: greyBackgroundColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.withOpacity(0.1)
|
||||
: greyBackgroundColor,
|
||||
)
|
||||
),
|
||||
child: AnimatedContainer(
|
||||
width: 118,
|
||||
height: 150,
|
||||
curve: Curves.easeInOut,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
: greyIconColor,
|
||||
size: 30,
|
||||
),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? null
|
||||
: greyIconColor,
|
||||
size: 30,
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor
|
||||
: greyIconColor,
|
||||
fontSize: 18
|
||||
),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: value == selected
|
||||
? disabled == null || disabled == false
|
||||
? Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white
|
||||
: greyIconColor
|
||||
: disabled == null || disabled == false
|
||||
? null
|
||||
: greyIconColor,
|
||||
fontSize: 18
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -375,8 +375,8 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 10,
|
||||
left: 24,
|
||||
right: 24
|
||||
left: 16,
|
||||
right: 16
|
||||
),
|
||||
child: Material(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
|
@ -433,7 +433,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
label: AppLocalizations.of(context)!.ipv4settings,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv4StartRangeController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv4StartRangeError', AppLocalizations.of(context)!.ipNotValid),
|
||||
|
@ -452,7 +452,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv4EndRangeController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv4EndRangeError', AppLocalizations.of(context)!.ipNotValid),
|
||||
|
@ -471,7 +471,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv4SubnetMaskController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv4SubnetMaskError', AppLocalizations.of(context)!.subnetMaskNotValid),
|
||||
|
@ -490,7 +490,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv4GatewayController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv4GatewayError', AppLocalizations.of(context)!.gatewayNotValid),
|
||||
|
@ -509,7 +509,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv4LeaseTimeController,
|
||||
onChanged: (value) {
|
||||
|
@ -539,7 +539,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
label: AppLocalizations.of(context)!.ipv6settings,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv6StartRangeController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv6StartRangeError', AppLocalizations.of(context)!.ipNotValid),
|
||||
|
@ -558,7 +558,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv6EndRangeController,
|
||||
onChanged: (value) => validateIpV4(value, 'ipv6EndRangeError', AppLocalizations.of(context)!.ipNotValid),
|
||||
|
@ -577,7 +577,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: ipv6LeaseTimeController,
|
||||
onChanged: (value) {
|
||||
|
@ -618,7 +618,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
));
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 20),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
@ -651,7 +651,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
|
|||
));
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 20),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
|
|
@ -134,7 +134,7 @@ class _BootstrapDnsScreenState extends State<BootstrapDnsScreen> {
|
|||
children: [
|
||||
Card(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 24, right: 24, bottom: 20
|
||||
left: 16, right: 16, bottom: 20
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
|
@ -177,13 +177,13 @@ class _BootstrapDnsScreenState extends State<BootstrapDnsScreen> {
|
|||
),
|
||||
...bootstrapControllers.map((c) => Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24, right: 10, bottom: 20
|
||||
left: 16, right: 6, bottom: 20
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-90,
|
||||
width: MediaQuery.of(context).size.width-74,
|
||||
child: TextFormField(
|
||||
controller: c['controller'],
|
||||
onChanged: (value) => validateIp(c, value),
|
||||
|
|
|
@ -128,7 +128,7 @@ class _CacheConfigDnsScreenState extends State<CacheConfigDnsScreen> {
|
|||
required void Function(String) onChanged,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
|
|
|
@ -188,7 +188,7 @@ class _DnsServerSettingsScreenState extends State<DnsServerSettingsScreen> {
|
|||
padding: const EdgeInsets.only(top: 10),
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFormField(
|
||||
controller: limitRequestsController,
|
||||
onChanged: (value) {
|
||||
|
|
|
@ -167,17 +167,17 @@ class _PrivateReverseDnsServersScreenState extends State<PrivateReverseDnsServer
|
|||
children: [
|
||||
Card(
|
||||
margin: const EdgeInsets.only(
|
||||
left: 24, right: 24, bottom: 10
|
||||
left: 16, right: 16, bottom: 10
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_rounded,
|
||||
color: Theme.of(context).listTileTheme.iconColor,
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
const SizedBox(width: 16),
|
||||
Flexible(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.privateReverseDnsServersDescription,
|
||||
|
@ -224,13 +224,13 @@ class _PrivateReverseDnsServersScreenState extends State<PrivateReverseDnsServer
|
|||
const SizedBox(height: 20),
|
||||
...reverseResolversControllers.map((c) => Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24, right: 10, bottom: 20
|
||||
left: 16, right: 6, bottom: 20
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-90,
|
||||
width: MediaQuery.of(context).size.width-74,
|
||||
child: TextFormField(
|
||||
controller: c['controller'],
|
||||
onChanged: (value) => validateAddress(c, value),
|
||||
|
|
|
@ -185,13 +185,13 @@ class _UpstreamDnsScreenState extends State<UpstreamDnsScreen> {
|
|||
),
|
||||
...dnsServers.map((item) => Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 24, right: 10, bottom: 20
|
||||
left: 16, right: 6, bottom: 20
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if (item['controller'] != null) SizedBox(
|
||||
width: MediaQuery.of(context).size.width-90,
|
||||
width: MediaQuery.of(context).size.width-74,
|
||||
child: TextFormField(
|
||||
controller: item['controller'],
|
||||
onChanged: (_) => checkValidValues(),
|
||||
|
@ -257,6 +257,7 @@ class _UpstreamDnsScreenState extends State<UpstreamDnsScreen> {
|
|||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.dnsMode),
|
||||
CustomRadioListTile(
|
||||
groupValue: upstreamMode,
|
||||
|
|
|
@ -28,17 +28,12 @@ class CustomRadioListTile extends StatelessWidget {
|
|||
onTap: () => onChanged(value),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24,
|
||||
horizontal: 16,
|
||||
vertical: 12
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CustomRadio(
|
||||
value: value,
|
||||
groupValue: groupValue,
|
||||
backgroundColor: radioBackgroundColor,
|
||||
),
|
||||
const SizedBox(width: 24),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -66,7 +61,14 @@ class CustomRadioListTile extends StatelessWidget {
|
|||
),
|
||||
]
|
||||
],
|
||||
)
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
CustomRadio(
|
||||
value: value,
|
||||
groupValue: groupValue,
|
||||
backgroundColor: radioBackgroundColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -26,17 +26,16 @@ class CustomSwitchListTile extends StatelessWidget {
|
|||
: () => onChanged(!value),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 12, left: 24, right: 12, bottom: 12
|
||||
top: 12, left: 16, right: 18, bottom: 16
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-110,
|
||||
child: Text(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
|
@ -45,24 +44,25 @@ class CustomSwitchListTile extends StatelessWidget {
|
|||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (subtitle != null) ... [
|
||||
const SizedBox(height: 5),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-110,
|
||||
child: Text(
|
||||
subtitle!,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: disabled != null && disabled == true
|
||||
? Theme.of(context).listTileTheme.textColor!.withOpacity(0.38)
|
||||
: Theme.of(context).listTileTheme.textColor
|
||||
if (subtitle != null) ... [
|
||||
const SizedBox(height: 5),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width-110,
|
||||
child: Text(
|
||||
subtitle!,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: disabled != null && disabled == true
|
||||
? Theme.of(context).listTileTheme.textColor!.withOpacity(0.38)
|
||||
: Theme.of(context).listTileTheme.textColor
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Switch(
|
||||
value: value,
|
||||
onChanged: disabled != null && disabled == true
|
||||
|
|
|
@ -16,7 +16,7 @@ class SectionLabel extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: padding ?? const EdgeInsets.all(24),
|
||||
padding: padding ?? const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue