Adjustments on servers screen

This commit is contained in:
Juan Gilsanz Polo 2022-11-04 01:22:57 +01:00
parent ea3606b762
commit 248107fcf9
2 changed files with 45 additions and 42 deletions

View file

@ -61,8 +61,8 @@ class _AddServerModalState extends State<AddServerModal> {
Widget sectionLabel(String label) {
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20,
vertical: 30
horizontal: 24,
vertical: 24
),
child: Text(
label,
@ -87,7 +87,7 @@ class _AddServerModalState extends State<AddServerModal> {
String? helperText
}) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.symmetric(horizontal: 24),
child: TextFormField(
controller: controller,
onChanged: onChanged,
@ -465,7 +465,6 @@ class _AddServerModalState extends State<AddServerModal> {
appBar: AppBar(
systemOverlayStyle: systemUiOverlayStyleConfig(context),
title: Text(AppLocalizations.of(context)!.createConnection),
elevation: 5,
actions: [
Padding(
padding: const EdgeInsets.only(right: 10),
@ -493,9 +492,9 @@ class _AddServerModalState extends State<AddServerModal> {
Container(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
margin: const EdgeInsets.only(
top: 30,
left: 20,
right: 20
top: 24,
left: 24,
right: 24
),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor.withOpacity(0.05),
@ -601,7 +600,7 @@ class _AddServerModalState extends State<AddServerModal> {
? () => setState(() => defaultServer = !defaultServer)
: null,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -629,7 +628,7 @@ class _AddServerModalState extends State<AddServerModal> {
child: InkWell(
onTap: () => setState(() => homeAssistant = !homeAssistant),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [

View file

@ -218,44 +218,48 @@ class _ServersListState extends State<ServersList> with SingleTickerProviderStat
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 48,
margin: const EdgeInsets.only(right: 12),
child: leadingIcon(servers[index]),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
child: Row(
children: [
Text(
"${server.connectionMethod}://${server.domain}${server.path ?? ""}${server.port != null ? ':${server.port}' : ""}",
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 18,
Container(
margin: const EdgeInsets.only(right: 16),
child: leadingIcon(servers[index]),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${server.connectionMethod}://${server.domain}${server.path ?? ""}${server.port != null ? ':${server.port}' : ""}",
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400
),
),
Column(
children: [
const SizedBox(height: 3),
Text(
servers[index].name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: Theme.of(context).listTileTheme.iconColor
),
)
],
)
],
),
),
Column(
children: [
const SizedBox(height: 5),
Text(
servers[index].name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Theme.of(context).listTileTheme.iconColor
),
)
],
)
],
),
),
Padding(
padding: const EdgeInsets.only(right: 10),
child: RotationTransition(
turns: animation,
child: const Icon(Icons.keyboard_arrow_down_rounded),
),
RotationTransition(
turns: animation,
child: const Icon(Icons.keyboard_arrow_down_rounded),
),
],
);
@ -383,7 +387,7 @@ class _ServersListState extends State<ServersList> with SingleTickerProviderStat
child: InkWell(
onTap: () => widget.onChange(index),
child: Padding(
padding: const EdgeInsets.all(10),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: topRow(servers[index], index),
),
),
@ -393,7 +397,7 @@ class _ServersListState extends State<ServersList> with SingleTickerProviderStat
child: InkWell(
onTap: () => widget.onChange(index),
child: Padding(
padding: const EdgeInsets.all(10),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Column(
children: [
topRow(servers[index], index),