Ui improvements and iOS improvements

This commit is contained in:
Juan Gilsanz Polo 2023-03-16 23:29:18 +01:00
parent 156b6a12e3
commit a736516e7b
29 changed files with 245 additions and 161 deletions

View file

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 50; objectVersion = 54;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
@ -217,6 +217,7 @@
}; };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
@ -231,6 +232,7 @@
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );

View file

@ -104,6 +104,7 @@ class _ClientsWidgetState extends State<ClientsWidget> with TickerProviderStateM
title: Text(AppLocalizations.of(context)!.clients), title: Text(AppLocalizations.of(context)!.clients),
pinned: true, pinned: true,
floating: true, floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled, forceElevated: innerBoxIsScrolled,
actions: [ actions: [
if (serversProvider.clients.loadStatus == 1) ...[ if (serversProvider.clients.loadStatus == 1) ...[

View file

@ -68,20 +68,54 @@ class _TagsModalState extends State<TagsModal> {
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
itemCount: widget.tags.length, itemCount: widget.tags.length,
itemBuilder: (context, index) => CheckboxListTile( itemBuilder: (context, index) => Material(
title: Text( color: Colors.transparent,
widget.tags[index], child: InkWell(
style: TextStyle( onTap: () => checkUncheckTag(!selectedTags.contains(widget.tags[index]), widget.tags[index]),
fontWeight: FontWeight.normal, child: Container(
color: Theme.of(context).colorScheme.onSurface padding: const EdgeInsets.only(
left: 24,
top: 8,
bottom: 8,
right: 12
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
widget.tags[index],
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Theme.of(context).colorScheme.onSurface,
),
),
Checkbox(
value: selectedTags.contains(widget.tags[index]),
onChanged: (value) => checkUncheckTag(value!, widget.tags[index]),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5)
),
)
],
),
), ),
), ),
value: selectedTags.contains(widget.tags[index]), ),
checkboxShape: RoundedRectangleBorder( // itemBuilder: (context, index) => CheckboxListTile(
borderRadius: BorderRadius.circular(5) // title: Text(
), // widget.tags[index],
onChanged: (value) => checkUncheckTag(value!, widget.tags[index]) // style: TextStyle(
) // fontWeight: FontWeight.normal,
// color: Theme.of(context).colorScheme.onSurface
// ),
// ),
// value: selectedTags.contains(widget.tags[index]),
// checkboxShape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(5)
// ),
// onChanged: (value) => checkUncheckTag(value!, widget.tags[index])
// )
), ),
), ),
actions: [ actions: [

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -69,7 +71,7 @@ class _AddListModalState extends State<AddListModal> {
return Padding( return Padding(
padding: MediaQuery.of(context).viewInsets, padding: MediaQuery.of(context).viewInsets,
child: Container( child: Container(
height: 370, height: Platform.isIOS ? 386 : 370,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(28), topLeft: Radius.circular(28),
@ -81,7 +83,7 @@ class _AddListModalState extends State<AddListModal> {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 410 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -192,7 +194,8 @@ class _AddListModalState extends State<AddListModal> {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
), ),

View file

@ -146,7 +146,12 @@ class _BlockedServicesScreenStateWidget extends State<BlockedServicesScreenWidge
serversProvider.blockedServicesList.services![index] serversProvider.blockedServicesList.services![index]
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 5), padding: const EdgeInsets.only(
top: 6,
bottom: 6,
right: 12,
left: 24
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

View file

@ -5,9 +5,9 @@ import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:adguard_home_manager/screens/filters/filters_list.dart'; import 'package:adguard_home_manager/screens/filters/filters_list.dart';
import 'package:adguard_home_manager/screens/filters/blocked_services_scren.dart';
import 'package:adguard_home_manager/screens/filters/check_host_modal.dart'; import 'package:adguard_home_manager/screens/filters/check_host_modal.dart';
import 'package:adguard_home_manager/screens/filters/custom_rules_list.dart'; import 'package:adguard_home_manager/screens/filters/custom_rules_list.dart';
import 'package:adguard_home_manager/screens/filters/blocked_services_screen.dart';
import 'package:adguard_home_manager/screens/filters/update_interval_lists_modal.dart'; import 'package:adguard_home_manager/screens/filters/update_interval_lists_modal.dart';
import 'package:adguard_home_manager/functions/snackbar.dart'; import 'package:adguard_home_manager/functions/snackbar.dart';
@ -235,6 +235,7 @@ class _FiltersWidgetState extends State<FiltersWidget> with TickerProviderStateM
pinned: true, pinned: true,
floating: true, floating: true,
forceElevated: innerBoxIsScrolled, forceElevated: innerBoxIsScrolled,
centerTitle: false,
actions: serversProvider.filtering.loadStatus == 1 ? [ actions: serversProvider.filtering.loadStatus == 1 ? [
IconButton( IconButton(
onPressed: enableDisableFiltering, onPressed: enableDisableFiltering,

View file

@ -1,5 +1,7 @@
// ignore_for_file: use_build_context_synchronously // ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -301,7 +303,7 @@ class _ListDetailsScreenState extends State<ListDetailsScreen> {
curve: Curves.easeInOut, curve: Curves.easeInOut,
bottom: fabVisible ? bottom: fabVisible ?
appConfigProvider.showingSnackbar appConfigProvider.showingSnackbar
? 70 : 20 ? 70 : (Platform.isIOS ? 40 : 20)
: -70, : -70,
right: 20, right: 20,
child: FloatingActionButton( child: FloatingActionButton(

View file

@ -42,7 +42,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
return Padding( return Padding(
padding: mediaQueryData.viewInsets, padding: mediaQueryData.viewInsets,
child: Container( child: Container(
height: 390, height: Platform.isIOS ? 406 : 390,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).dialogBackgroundColor, color: Theme.of(context).dialogBackgroundColor,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
@ -55,7 +55,7 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 410 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -298,7 +298,8 @@ class _UpdateIntervalListsModalState extends State<UpdateIntervalListsModal> {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
), ),

View file

@ -1,5 +1,7 @@
// ignore_for_file: use_build_context_synchronously // ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -123,7 +125,7 @@ class ManagementModal extends StatelessWidget {
return Container( return Container(
width: double.maxFinite, width: double.maxFinite,
height: 540, height: Platform.isIOS ? 556 : 540,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).dialogBackgroundColor, color: Theme.of(context).dialogBackgroundColor,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
@ -135,7 +137,7 @@ class ManagementModal extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 540 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 556 : 540) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -202,7 +204,8 @@ class ManagementModal extends StatelessWidget {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
); );

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -48,15 +50,22 @@ class _ClientsModalState extends State<ClientsModal> {
child: InkWell( child: InkWell(
onTap: () => onChanged(), onTap: () => onChanged(),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8), padding: const EdgeInsets.only(
left: 24,
top: 8,
right: 12,
bottom: 8
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Flexible(
label, child: Text(
style: TextStyle( label,
fontSize: 16, style: TextStyle(
color: Theme.of(context).colorScheme.onSurface fontSize: 16,
color: Theme.of(context).colorScheme.onSurface
),
), ),
), ),
Checkbox( Checkbox(
@ -88,7 +97,7 @@ class _ClientsModalState extends State<ClientsModal> {
return Container( return Container(
height: height >= (logsProvider.clients!.length*64) == true height: height >= (logsProvider.clients!.length*64) == true
? logsProvider.clients!.length*64 ? logsProvider.clients!.length*64
: height-25, : height-50,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(28), topLeft: Radius.circular(28),
@ -164,7 +173,8 @@ class _ClientsModalState extends State<ClientsModal> {
) )
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
); );

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -82,8 +84,8 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
} }
return Container( return Container(
height: height >= 720 == true height: height >= (Platform.isIOS ? 736 : 720) == true
? 720 ? (Platform.isIOS ? 736 : 720)
: height-25, : height-25,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
@ -183,7 +185,8 @@ class _FilterStatusModalState extends State<FilterStatusModal> {
) )
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
); );

View file

@ -379,6 +379,7 @@ class _LogsWidgetState extends State<LogsWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.logs), title: Text(AppLocalizations.of(context)!.logs),
centerTitle: false,
actions: [ actions: [
logsProvider.loadStatus == 1 logsProvider.loadStatus == 1
? IconButton( ? IconButton(

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -122,7 +124,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 420 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 436 : 420) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -178,54 +180,61 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
), ),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
Material( Padding(
color: Colors.transparent, padding: const EdgeInsets.symmetric(horizontal: 14),
child: InkWell( child: Column(
onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp), children: [
child: Padding( Material(
padding: const EdgeInsets.symmetric(horizontal: 30), color: Colors.transparent,
child: Row( child: InkWell(
mainAxisAlignment: MainAxisAlignment.spaceBetween, onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp),
children: [ child: Padding(
Text( padding: const EdgeInsets.symmetric(horizontal: 30),
AppLocalizations.of(context)!.anonymizeClientIp, child: Row(
style: const TextStyle( mainAxisAlignment: MainAxisAlignment.spaceBetween,
fontSize: 16 children: [
Text(
AppLocalizations.of(context)!.anonymizeClientIp,
style: const TextStyle(
fontSize: 16
),
),
Switch(
value: anonymizeClientIp,
onChanged: (value) => setState(() => anonymizeClientIp = value),
activeColor: Theme.of(context).colorScheme.primary,
)
],
), ),
), ),
Switch( ),
value: anonymizeClientIp,
onChanged: (value) => setState(() => anonymizeClientIp = value),
activeColor: Theme.of(context).colorScheme.primary,
)
],
), ),
), const SizedBox(height: 16),
), Padding(
), padding: const EdgeInsets.symmetric(horizontal: 24),
const SizedBox(height: 16), child: DropdownButtonFormField(
Padding( items: retentionItems.map<DropdownMenuItem<String>>((Map<String, dynamic> item) {
padding: const EdgeInsets.symmetric(horizontal: 24), return DropdownMenuItem<String>(
child: DropdownButtonFormField( value: item['value'].toString(),
items: retentionItems.map<DropdownMenuItem<String>>((Map<String, dynamic> item) { child: Text(item['label']),
return DropdownMenuItem<String>( );
value: item['value'].toString(), }).toList(),
child: Text(item['label']), value: retentionTime,
); onChanged: (value) => setState(() => retentionTime = value),
}).toList(), decoration: InputDecoration(
value: retentionTime, border: const OutlineInputBorder(
onChanged: (value) => setState(() => retentionTime = value), borderRadius: BorderRadius.all(
decoration: InputDecoration( Radius.circular(10)
border: const OutlineInputBorder( )
borderRadius: BorderRadius.all( ),
Radius.circular(10) label: Text(AppLocalizations.of(context)!.retentionTime)
) ),
borderRadius: BorderRadius.circular(20),
),
), ),
label: Text(AppLocalizations.of(context)!.retentionTime) ],
),
borderRadius: BorderRadius.circular(20),
), ),
), )
], ],
), ),
), ),
@ -272,7 +281,8 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
) )
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
); );
@ -310,7 +320,7 @@ class _LogsConfigModalWidgetState extends State<LogsConfigModalWidget> {
} }
return Container( return Container(
height: 420, height: Platform.isIOS ? 436 : 420,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(28), topLeft: Radius.circular(28),

View file

@ -1,5 +1,7 @@
// ignore_for_file: use_build_context_synchronously // ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -283,7 +285,8 @@ class _LogsFiltersModalWidgetState extends State<LogsFiltersModalWidget> {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
), ),

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:expandable/expandable.dart'; import 'package:expandable/expandable.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -69,6 +71,7 @@ class _ServersState extends State<Servers> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.servers), title: Text(AppLocalizations.of(context)!.servers),
centerTitle: false,
), ),
body: Stack( body: Stack(
children: [ children: [
@ -83,7 +86,7 @@ class _ServersState extends State<Servers> {
curve: Curves.easeInOut, curve: Curves.easeInOut,
bottom: isVisible ? bottom: isVisible ?
appConfigProvider.showingSnackbar appConfigProvider.showingSnackbar
? 70 : 20 ? 70 : (Platform.isIOS ? 40 : 20)
: -70, : -70,
right: 20, right: 20,
child: FloatingActionButton( child: FloatingActionButton(

View file

@ -87,6 +87,7 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
title: Text(AppLocalizations.of(context)!.accessSettings), title: Text(AppLocalizations.of(context)!.accessSettings),
pinned: true, pinned: true,
floating: true, floating: true,
centerTitle: false,
forceElevated: innerBoxIsScrolled, forceElevated: innerBoxIsScrolled,
bottom: TabBar( bottom: TabBar(
controller: tabController, controller: tabController,
@ -112,45 +113,35 @@ class _AccessSettingsWidgetState extends State<AccessSettingsWidget> with Ticker
) )
]; ];
}), }),
body: Container( body: TabBarView(
decoration: BoxDecoration( controller: tabController,
color: Theme.of(context).scaffoldBackgroundColor, children: [
border: Border( ClientsList(
top: BorderSide( type: 'allowed',
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1) scrollController: scrollController,
) loadStatus: serversProvider.clients.loadStatus,
) data: serversProvider.clients.loadStatus == 1
), ? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [],
child: TabBarView( fetchClients: fetchClients
controller: tabController, ),
children: [ ClientsList(
ClientsList( type: 'disallowed',
type: 'allowed', scrollController: scrollController,
scrollController: scrollController, loadStatus: serversProvider.clients.loadStatus,
loadStatus: serversProvider.clients.loadStatus, data: serversProvider.clients.loadStatus == 1
data: serversProvider.clients.loadStatus == 1 ? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [],
? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [], fetchClients: fetchClients
fetchClients: fetchClients ),
), ClientsList(
ClientsList( type: 'domains',
type: 'disallowed', scrollController: scrollController,
scrollController: scrollController, loadStatus: serversProvider.clients.loadStatus,
loadStatus: serversProvider.clients.loadStatus, data: serversProvider.clients.loadStatus == 1
data: serversProvider.clients.loadStatus == 1 ? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [],
? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [], fetchClients: fetchClients
fetchClients: fetchClients ),
), ]
ClientsList( )
type: 'domains',
scrollController: scrollController,
loadStatus: serversProvider.clients.loadStatus,
data: serversProvider.clients.loadStatus == 1
? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [],
fetchClients: fetchClients
),
]
)
),
) )
), ),
); );

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -66,7 +68,7 @@ class _AddClientModalState extends State<AddClientModal> {
return Padding( return Padding(
padding: MediaQuery.of(context).viewInsets, padding: MediaQuery.of(context).viewInsets,
child: Container( child: Container(
height: 305, height: Platform.isIOS ? 321 : 305,
padding: const EdgeInsets.all(24), padding: const EdgeInsets.all(24),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).dialogBackgroundColor, color: Theme.of(context).dialogBackgroundColor,
@ -79,7 +81,7 @@ class _AddClientModalState extends State<AddClientModal> {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 322 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 338 : 322) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -146,7 +148,8 @@ class _AddClientModalState extends State<AddClientModal> {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
), ),

View file

@ -1,5 +1,7 @@
// ignore_for_file: use_build_context_synchronously // ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -317,7 +319,7 @@ class _ClientsListState extends State<ClientsList> {
curve: Curves.easeInOut, curve: Curves.easeInOut,
bottom: isVisible ? bottom: isVisible ?
appConfigProvider.showingSnackbar appConfigProvider.showingSnackbar
? 70 : 20 ? 70 : (Platform.isIOS ? 40 : 20)
: -70, : -70,
right: 20, right: 20,
child: FloatingActionButton( child: FloatingActionButton(
@ -341,7 +343,7 @@ class _ClientsListState extends State<ClientsList> {
case 2: case 2:
return SizedBox( return SizedBox(
width: double.maxFinite, width: double.maxFinite,
height: MediaQuery.of(context).size.height-171, height: MediaQuery.of(context).size.height-101,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

View file

@ -39,6 +39,7 @@ class AdvancedSettings extends StatelessWidget {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.advancedSettings), title: Text(AppLocalizations.of(context)!.advancedSettings),
centerTitle: false,
), ),
body: ListView( body: ListView(
children: [ children: [

View file

@ -59,6 +59,7 @@ class _CustomizationWidgetState extends State<CustomizationWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.customization), title: Text(AppLocalizations.of(context)!.customization),
centerTitle: false,
), ),
body: ListView( body: ListView(
children: [ children: [

View file

@ -765,6 +765,7 @@ class _DhcpWidgetState extends State<DhcpWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.dhcpSettings), title: Text(AppLocalizations.of(context)!.dhcpSettings),
centerTitle: false,
actions: selectedInterface != null ? [ actions: selectedInterface != null ? [
IconButton( IconButton(
onPressed: checkDataValid() == true onPressed: checkDataValid() == true

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -137,20 +139,15 @@ class SelectInterfaceModal extends StatelessWidget {
if (interfaces[index].ipv4Addresses.isNotEmpty) ...[ if (interfaces[index].ipv4Addresses.isNotEmpty) ...[
Row( Row(
children: [ children: [
Text( Flexible(
"${AppLocalizations.of(context)!.ipv4addresses}: ", child: Text(
style: TextStyle( "${AppLocalizations.of(context)!.ipv4addresses}: ${interfaces[index].ipv4Addresses.join(', ')}",
fontSize: 14, style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
), ),
), )
Text(
interfaces[index].ipv4Addresses.join(', '),
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
], ],
), ),
const SizedBox(height: 5), const SizedBox(height: 5),
@ -158,20 +155,15 @@ class SelectInterfaceModal extends StatelessWidget {
if (interfaces[index].ipv6Addresses.isNotEmpty) ...[ if (interfaces[index].ipv6Addresses.isNotEmpty) ...[
Row( Row(
children: [ children: [
Text( Flexible(
"${AppLocalizations.of(context)!.ipv4addresses}: ", child: Text(
style: TextStyle( "${AppLocalizations.of(context)!.ipv6addresses}: ${interfaces[index].ipv6Addresses.join(', ')}",
fontSize: 14, style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
), ),
), )
Text(
interfaces[index].ipv6Addresses.join(', '),
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
], ],
), ),
] ]
@ -195,7 +187,8 @@ class SelectInterfaceModal extends StatelessWidget {
) )
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
); );

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -51,7 +53,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
return Padding( return Padding(
padding: MediaQuery.of(context).viewInsets, padding: MediaQuery.of(context).viewInsets,
child: Container( child: Container(
height: 400, height: Platform.isIOS ? 416 : 400,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topLeft: Radius.circular(28), topLeft: Radius.circular(28),
@ -63,7 +65,7 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
children: [ children: [
Expanded( Expanded(
child: ListView( child: ListView(
physics: 410 < MediaQuery.of(context).size.height physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()
: null, : null,
children: [ children: [
@ -155,7 +157,8 @@ class _AddDnsRewriteModalState extends State<AddDnsRewriteModal> {
), ),
], ],
), ),
) ),
if (Platform.isIOS) const SizedBox(height: 16)
], ],
), ),
), ),

View file

@ -283,6 +283,7 @@ class _DnsRewritesWidgetState extends State<DnsRewritesWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.dnsRewrites), title: Text(AppLocalizations.of(context)!.dnsRewrites),
centerTitle: false,
), ),
body: generateBody(), body: generateBody(),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(

View file

@ -630,6 +630,7 @@ class _EncryptionSettingsWidgetState extends State<EncryptionSettingsWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.encryptionSettings), title: Text(AppLocalizations.of(context)!.encryptionSettings),
centerTitle: false,
actions: [ actions: [
IconButton( IconButton(
onPressed: certKeyValidApi == 2 && validDataError != null onPressed: certKeyValidApi == 2 && validDataError != null

View file

@ -57,7 +57,8 @@ class GeneralSettings extends StatelessWidget {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.generalSettings) , title: Text(AppLocalizations.of(context)!.generalSettings),
centerTitle: false,
), ),
body: ListView( body: ListView(
children: [ children: [

View file

@ -179,6 +179,7 @@ class _ServerInformationWidgetState extends State<ServerInformationWidget> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(AppLocalizations.of(context)!.serverInformation), title: Text(AppLocalizations.of(context)!.serverInformation),
centerTitle: false,
), ),
body: generateBody() body: generateBody()
); );

View file

@ -57,7 +57,10 @@ class Settings extends StatelessWidget {
} }
return Scaffold( return Scaffold(
appBar: const SettingsAppBar(), appBar: AppBar(
title: Text(AppLocalizations.of(context)!.settings),
centerTitle: false,
),
body: ListView( body: ListView(
children: [ children: [
if (serversProvider.selectedServer != null) ...[ if (serversProvider.selectedServer != null) ...[

View file

@ -85,7 +85,7 @@ class CustomListTile extends StatelessWidget {
), ),
), ),
if (trailing != null) ...[ if (trailing != null) ...[
const SizedBox(width: 10), const SizedBox(width: 16),
trailing! trailing!
] ]
], ],