diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 972c5ab..1ffa568 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -217,6 +217,7 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -231,6 +232,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/lib/screens/clients/clients.dart b/lib/screens/clients/clients.dart index f411da9..f64f3fd 100644 --- a/lib/screens/clients/clients.dart +++ b/lib/screens/clients/clients.dart @@ -104,6 +104,7 @@ class _ClientsWidgetState extends State with TickerProviderStateM title: Text(AppLocalizations.of(context)!.clients), pinned: true, floating: true, + centerTitle: false, forceElevated: innerBoxIsScrolled, actions: [ if (serversProvider.clients.loadStatus == 1) ...[ diff --git a/lib/screens/clients/tags_modal.dart b/lib/screens/clients/tags_modal.dart index b8d0afe..42843b1 100644 --- a/lib/screens/clients/tags_modal.dart +++ b/lib/screens/clients/tags_modal.dart @@ -68,20 +68,54 @@ class _TagsModalState extends State { child: ListView.builder( shrinkWrap: true, itemCount: widget.tags.length, - itemBuilder: (context, index) => CheckboxListTile( - title: Text( - widget.tags[index], - style: TextStyle( - fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onSurface + itemBuilder: (context, index) => Material( + color: Colors.transparent, + child: InkWell( + onTap: () => checkUncheckTag(!selectedTags.contains(widget.tags[index]), widget.tags[index]), + child: Container( + 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( - borderRadius: BorderRadius.circular(5) - ), - onChanged: (value) => checkUncheckTag(value!, widget.tags[index]) - ) + ), + // itemBuilder: (context, index) => CheckboxListTile( + // title: Text( + // 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: [ diff --git a/lib/screens/filters/add_list_modal.dart b/lib/screens/filters/add_list_modal.dart index d76d55b..196cda1 100644 --- a/lib/screens/filters/add_list_modal.dart +++ b/lib/screens/filters/add_list_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -69,7 +71,7 @@ class _AddListModalState extends State { return Padding( padding: MediaQuery.of(context).viewInsets, child: Container( - height: 370, + height: Platform.isIOS ? 386 : 370, decoration: BoxDecoration( borderRadius: const BorderRadius.only( topLeft: Radius.circular(28), @@ -81,7 +83,7 @@ class _AddListModalState extends State { children: [ Expanded( child: ListView( - physics: 410 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -192,7 +194,8 @@ class _AddListModalState extends State { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ), diff --git a/lib/screens/filters/blocked_services_scren.dart b/lib/screens/filters/blocked_services_screen.dart similarity index 97% rename from lib/screens/filters/blocked_services_scren.dart rename to lib/screens/filters/blocked_services_screen.dart index 710a714..fba09d2 100644 --- a/lib/screens/filters/blocked_services_scren.dart +++ b/lib/screens/filters/blocked_services_screen.dart @@ -146,7 +146,12 @@ class _BlockedServicesScreenStateWidget extends State with TickerProviderStateM pinned: true, floating: true, forceElevated: innerBoxIsScrolled, + centerTitle: false, actions: serversProvider.filtering.loadStatus == 1 ? [ IconButton( onPressed: enableDisableFiltering, diff --git a/lib/screens/filters/list_details_screen.dart b/lib/screens/filters/list_details_screen.dart index eccb130..ebf6aca 100644 --- a/lib/screens/filters/list_details_screen.dart +++ b/lib/screens/filters/list_details_screen.dart @@ -1,5 +1,7 @@ // ignore_for_file: use_build_context_synchronously +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:provider/provider.dart'; @@ -301,7 +303,7 @@ class _ListDetailsScreenState extends State { curve: Curves.easeInOut, bottom: fabVisible ? appConfigProvider.showingSnackbar - ? 70 : 20 + ? 70 : (Platform.isIOS ? 40 : 20) : -70, right: 20, child: FloatingActionButton( diff --git a/lib/screens/filters/update_interval_lists_modal.dart b/lib/screens/filters/update_interval_lists_modal.dart index c471c96..1779bf9 100644 --- a/lib/screens/filters/update_interval_lists_modal.dart +++ b/lib/screens/filters/update_interval_lists_modal.dart @@ -42,7 +42,7 @@ class _UpdateIntervalListsModalState extends State { return Padding( padding: mediaQueryData.viewInsets, child: Container( - height: 390, + height: Platform.isIOS ? 406 : 390, decoration: BoxDecoration( color: Theme.of(context).dialogBackgroundColor, borderRadius: const BorderRadius.only( @@ -55,7 +55,7 @@ class _UpdateIntervalListsModalState extends State { children: [ Expanded( child: ListView( - physics: 410 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -298,7 +298,8 @@ class _UpdateIntervalListsModalState extends State { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ), diff --git a/lib/screens/home/management_modal.dart b/lib/screens/home/management_modal.dart index 3852e0e..15664c5 100644 --- a/lib/screens/home/management_modal.dart +++ b/lib/screens/home/management_modal.dart @@ -1,5 +1,7 @@ // ignore_for_file: use_build_context_synchronously +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -123,7 +125,7 @@ class ManagementModal extends StatelessWidget { return Container( width: double.maxFinite, - height: 540, + height: Platform.isIOS ? 556 : 540, decoration: BoxDecoration( color: Theme.of(context).dialogBackgroundColor, borderRadius: const BorderRadius.only( @@ -135,7 +137,7 @@ class ManagementModal extends StatelessWidget { children: [ Expanded( child: ListView( - physics: 540 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 556 : 540) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -202,7 +204,8 @@ class ManagementModal extends StatelessWidget { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ); diff --git a/lib/screens/logs/clients_modal.dart b/lib/screens/logs/clients_modal.dart index c8c157d..f9b9099 100644 --- a/lib/screens/logs/clients_modal.dart +++ b/lib/screens/logs/clients_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -48,15 +50,22 @@ class _ClientsModalState extends State { child: InkWell( onTap: () => onChanged(), child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8), + padding: const EdgeInsets.only( + left: 24, + top: 8, + right: 12, + bottom: 8 + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - label, - style: TextStyle( - fontSize: 16, - color: Theme.of(context).colorScheme.onSurface + Flexible( + child: Text( + label, + style: TextStyle( + fontSize: 16, + color: Theme.of(context).colorScheme.onSurface + ), ), ), Checkbox( @@ -88,7 +97,7 @@ class _ClientsModalState extends State { return Container( height: height >= (logsProvider.clients!.length*64) == true ? logsProvider.clients!.length*64 - : height-25, + : height-50, decoration: BoxDecoration( borderRadius: const BorderRadius.only( topLeft: Radius.circular(28), @@ -164,7 +173,8 @@ class _ClientsModalState extends State { ) ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ); diff --git a/lib/screens/logs/filter_status_modal.dart b/lib/screens/logs/filter_status_modal.dart index 371f3ab..16d9c5c 100644 --- a/lib/screens/logs/filter_status_modal.dart +++ b/lib/screens/logs/filter_status_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -82,8 +84,8 @@ class _FilterStatusModalState extends State { } return Container( - height: height >= 720 == true - ? 720 + height: height >= (Platform.isIOS ? 736 : 720) == true + ? (Platform.isIOS ? 736 : 720) : height-25, decoration: BoxDecoration( borderRadius: const BorderRadius.only( @@ -183,7 +185,8 @@ class _FilterStatusModalState extends State { ) ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ); diff --git a/lib/screens/logs/logs.dart b/lib/screens/logs/logs.dart index f57460e..a70abfa 100644 --- a/lib/screens/logs/logs.dart +++ b/lib/screens/logs/logs.dart @@ -379,6 +379,7 @@ class _LogsWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.logs), + centerTitle: false, actions: [ logsProvider.loadStatus == 1 ? IconButton( diff --git a/lib/screens/logs/logs_config_modal.dart b/lib/screens/logs/logs_config_modal.dart index 7fd4a67..9a33dbf 100644 --- a/lib/screens/logs/logs_config_modal.dart +++ b/lib/screens/logs/logs_config_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -122,7 +124,7 @@ class _LogsConfigModalWidgetState extends State { children: [ Expanded( child: ListView( - physics: 420 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 436 : 420) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -178,54 +180,61 @@ class _LogsConfigModalWidgetState extends State { ), ), const SizedBox(height: 16), - Material( - color: Colors.transparent, - child: InkWell( - onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 30), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - AppLocalizations.of(context)!.anonymizeClientIp, - style: const TextStyle( - fontSize: 16 + Padding( + padding: const EdgeInsets.symmetric(horizontal: 14), + child: Column( + children: [ + Material( + color: Colors.transparent, + child: InkWell( + onTap: () => setState(() => anonymizeClientIp = !anonymizeClientIp), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 30), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + 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), - child: DropdownButtonFormField( - items: retentionItems.map>((Map item) { - return DropdownMenuItem( - value: item['value'].toString(), - child: Text(item['label']), - ); - }).toList(), - value: retentionTime, - onChanged: (value) => setState(() => retentionTime = value), - decoration: InputDecoration( - border: const OutlineInputBorder( - borderRadius: BorderRadius.all( - Radius.circular(10) - ) + const SizedBox(height: 16), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 24), + child: DropdownButtonFormField( + items: retentionItems.map>((Map item) { + return DropdownMenuItem( + value: item['value'].toString(), + child: Text(item['label']), + ); + }).toList(), + value: retentionTime, + onChanged: (value) => setState(() => retentionTime = value), + decoration: InputDecoration( + 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 { ) ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ); @@ -310,7 +320,7 @@ class _LogsConfigModalWidgetState extends State { } return Container( - height: 420, + height: Platform.isIOS ? 436 : 420, decoration: BoxDecoration( borderRadius: const BorderRadius.only( topLeft: Radius.circular(28), diff --git a/lib/screens/logs/logs_filters_modal.dart b/lib/screens/logs/logs_filters_modal.dart index 073cdea..ecc23c7 100644 --- a/lib/screens/logs/logs_filters_modal.dart +++ b/lib/screens/logs/logs_filters_modal.dart @@ -1,5 +1,7 @@ // ignore_for_file: use_build_context_synchronously +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -283,7 +285,8 @@ class _LogsFiltersModalWidgetState extends State { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ), diff --git a/lib/screens/servers/servers.dart b/lib/screens/servers/servers.dart index a8423b3..9e98e29 100644 --- a/lib/screens/servers/servers.dart +++ b/lib/screens/servers/servers.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:expandable/expandable.dart'; import 'package:flutter/rendering.dart'; @@ -69,6 +71,7 @@ class _ServersState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.servers), + centerTitle: false, ), body: Stack( children: [ @@ -83,7 +86,7 @@ class _ServersState extends State { curve: Curves.easeInOut, bottom: isVisible ? appConfigProvider.showingSnackbar - ? 70 : 20 + ? 70 : (Platform.isIOS ? 40 : 20) : -70, right: 20, child: FloatingActionButton( diff --git a/lib/screens/settings/access_settings/access_settings.dart b/lib/screens/settings/access_settings/access_settings.dart index f6db465..08f96a2 100644 --- a/lib/screens/settings/access_settings/access_settings.dart +++ b/lib/screens/settings/access_settings/access_settings.dart @@ -87,6 +87,7 @@ class _AccessSettingsWidgetState extends State with Ticker title: Text(AppLocalizations.of(context)!.accessSettings), pinned: true, floating: true, + centerTitle: false, forceElevated: innerBoxIsScrolled, bottom: TabBar( controller: tabController, @@ -112,45 +113,35 @@ class _AccessSettingsWidgetState extends State with Ticker ) ]; }), - body: Container( - decoration: BoxDecoration( - color: Theme.of(context).scaffoldBackgroundColor, - border: Border( - top: BorderSide( - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1) - ) - ) - ), - child: TabBarView( - controller: tabController, - children: [ - ClientsList( - type: 'allowed', - scrollController: scrollController, - loadStatus: serversProvider.clients.loadStatus, - data: serversProvider.clients.loadStatus == 1 - ? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [], - fetchClients: fetchClients - ), - ClientsList( - type: 'disallowed', - scrollController: scrollController, - loadStatus: serversProvider.clients.loadStatus, - data: serversProvider.clients.loadStatus == 1 - ? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [], - fetchClients: fetchClients - ), - ClientsList( - type: 'domains', - scrollController: scrollController, - loadStatus: serversProvider.clients.loadStatus, - data: serversProvider.clients.loadStatus == 1 - ? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [], - fetchClients: fetchClients - ), - ] - ) - ), + body: TabBarView( + controller: tabController, + children: [ + ClientsList( + type: 'allowed', + scrollController: scrollController, + loadStatus: serversProvider.clients.loadStatus, + data: serversProvider.clients.loadStatus == 1 + ? serversProvider.clients.data!.clientsAllowedBlocked!.allowedClients : [], + fetchClients: fetchClients + ), + ClientsList( + type: 'disallowed', + scrollController: scrollController, + loadStatus: serversProvider.clients.loadStatus, + data: serversProvider.clients.loadStatus == 1 + ? serversProvider.clients.data!.clientsAllowedBlocked!.disallowedClients : [], + fetchClients: fetchClients + ), + ClientsList( + type: 'domains', + scrollController: scrollController, + loadStatus: serversProvider.clients.loadStatus, + data: serversProvider.clients.loadStatus == 1 + ? serversProvider.clients.data!.clientsAllowedBlocked!.blockedHosts : [], + fetchClients: fetchClients + ), + ] + ) ) ), ); diff --git a/lib/screens/settings/access_settings/add_client_modal.dart b/lib/screens/settings/access_settings/add_client_modal.dart index 2aa91e6..385409b 100644 --- a/lib/screens/settings/access_settings/add_client_modal.dart +++ b/lib/screens/settings/access_settings/add_client_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -66,7 +68,7 @@ class _AddClientModalState extends State { return Padding( padding: MediaQuery.of(context).viewInsets, child: Container( - height: 305, + height: Platform.isIOS ? 321 : 305, padding: const EdgeInsets.all(24), decoration: BoxDecoration( color: Theme.of(context).dialogBackgroundColor, @@ -79,7 +81,7 @@ class _AddClientModalState extends State { children: [ Expanded( child: ListView( - physics: 322 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 338 : 322) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -146,7 +148,8 @@ class _AddClientModalState extends State { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ), diff --git a/lib/screens/settings/access_settings/clients_list.dart b/lib/screens/settings/access_settings/clients_list.dart index 9efcaa7..2d6f787 100644 --- a/lib/screens/settings/access_settings/clients_list.dart +++ b/lib/screens/settings/access_settings/clients_list.dart @@ -1,5 +1,7 @@ // ignore_for_file: use_build_context_synchronously +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:provider/provider.dart'; @@ -317,7 +319,7 @@ class _ClientsListState extends State { curve: Curves.easeInOut, bottom: isVisible ? appConfigProvider.showingSnackbar - ? 70 : 20 + ? 70 : (Platform.isIOS ? 40 : 20) : -70, right: 20, child: FloatingActionButton( @@ -341,7 +343,7 @@ class _ClientsListState extends State { case 2: return SizedBox( width: double.maxFinite, - height: MediaQuery.of(context).size.height-171, + height: MediaQuery.of(context).size.height-101, child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/screens/settings/advanced_setings.dart b/lib/screens/settings/advanced_setings.dart index b0cbc5a..f1da7f5 100644 --- a/lib/screens/settings/advanced_setings.dart +++ b/lib/screens/settings/advanced_setings.dart @@ -39,6 +39,7 @@ class AdvancedSettings extends StatelessWidget { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.advancedSettings), + centerTitle: false, ), body: ListView( children: [ diff --git a/lib/screens/settings/customization/customization.dart b/lib/screens/settings/customization/customization.dart index 9f6abe2..e955323 100644 --- a/lib/screens/settings/customization/customization.dart +++ b/lib/screens/settings/customization/customization.dart @@ -59,6 +59,7 @@ class _CustomizationWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.customization), + centerTitle: false, ), body: ListView( children: [ diff --git a/lib/screens/settings/dhcp/dhcp.dart b/lib/screens/settings/dhcp/dhcp.dart index 8c4bb94..3ba3b68 100644 --- a/lib/screens/settings/dhcp/dhcp.dart +++ b/lib/screens/settings/dhcp/dhcp.dart @@ -765,6 +765,7 @@ class _DhcpWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.dhcpSettings), + centerTitle: false, actions: selectedInterface != null ? [ IconButton( onPressed: checkDataValid() == true diff --git a/lib/screens/settings/dhcp/select_interface_modal.dart b/lib/screens/settings/dhcp/select_interface_modal.dart index 49b5957..202281c 100644 --- a/lib/screens/settings/dhcp/select_interface_modal.dart +++ b/lib/screens/settings/dhcp/select_interface_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -137,20 +139,15 @@ class SelectInterfaceModal extends StatelessWidget { if (interfaces[index].ipv4Addresses.isNotEmpty) ...[ Row( children: [ - Text( - "${AppLocalizations.of(context)!.ipv4addresses}: ", - style: TextStyle( - fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant + Flexible( + child: Text( + "${AppLocalizations.of(context)!.ipv4addresses}: ${interfaces[index].ipv4Addresses.join(', ')}", + style: TextStyle( + 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), @@ -158,20 +155,15 @@ class SelectInterfaceModal extends StatelessWidget { if (interfaces[index].ipv6Addresses.isNotEmpty) ...[ Row( children: [ - Text( - "${AppLocalizations.of(context)!.ipv4addresses}: ", - style: TextStyle( - fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant + Flexible( + child: Text( + "${AppLocalizations.of(context)!.ipv6addresses}: ${interfaces[index].ipv6Addresses.join(', ')}", + style: TextStyle( + 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) ], ), ); diff --git a/lib/screens/settings/dns_rewrites/add_dns_rewrite_modal.dart b/lib/screens/settings/dns_rewrites/add_dns_rewrite_modal.dart index 3009553..53bc3b2 100644 --- a/lib/screens/settings/dns_rewrites/add_dns_rewrite_modal.dart +++ b/lib/screens/settings/dns_rewrites/add_dns_rewrite_modal.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -51,7 +53,7 @@ class _AddDnsRewriteModalState extends State { return Padding( padding: MediaQuery.of(context).viewInsets, child: Container( - height: 400, + height: Platform.isIOS ? 416 : 400, decoration: BoxDecoration( borderRadius: const BorderRadius.only( topLeft: Radius.circular(28), @@ -63,7 +65,7 @@ class _AddDnsRewriteModalState extends State { children: [ Expanded( child: ListView( - physics: 410 < MediaQuery.of(context).size.height + physics: (Platform.isIOS ? 426 : 410) < MediaQuery.of(context).size.height ? const NeverScrollableScrollPhysics() : null, children: [ @@ -155,7 +157,8 @@ class _AddDnsRewriteModalState extends State { ), ], ), - ) + ), + if (Platform.isIOS) const SizedBox(height: 16) ], ), ), diff --git a/lib/screens/settings/dns_rewrites/dns_rewrites.dart b/lib/screens/settings/dns_rewrites/dns_rewrites.dart index 05407bf..119da4c 100644 --- a/lib/screens/settings/dns_rewrites/dns_rewrites.dart +++ b/lib/screens/settings/dns_rewrites/dns_rewrites.dart @@ -283,6 +283,7 @@ class _DnsRewritesWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.dnsRewrites), + centerTitle: false, ), body: generateBody(), floatingActionButton: FloatingActionButton( diff --git a/lib/screens/settings/encryption/encryption.dart b/lib/screens/settings/encryption/encryption.dart index 2c136fe..120dab3 100644 --- a/lib/screens/settings/encryption/encryption.dart +++ b/lib/screens/settings/encryption/encryption.dart @@ -630,6 +630,7 @@ class _EncryptionSettingsWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.encryptionSettings), + centerTitle: false, actions: [ IconButton( onPressed: certKeyValidApi == 2 && validDataError != null diff --git a/lib/screens/settings/general_settings.dart b/lib/screens/settings/general_settings.dart index cf27e34..afad45e 100644 --- a/lib/screens/settings/general_settings.dart +++ b/lib/screens/settings/general_settings.dart @@ -57,7 +57,8 @@ class GeneralSettings extends StatelessWidget { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.generalSettings) , + title: Text(AppLocalizations.of(context)!.generalSettings), + centerTitle: false, ), body: ListView( children: [ diff --git a/lib/screens/settings/server_info/server_info.dart b/lib/screens/settings/server_info/server_info.dart index 35abb52..607e822 100644 --- a/lib/screens/settings/server_info/server_info.dart +++ b/lib/screens/settings/server_info/server_info.dart @@ -179,6 +179,7 @@ class _ServerInformationWidgetState extends State { return Scaffold( appBar: AppBar( title: Text(AppLocalizations.of(context)!.serverInformation), + centerTitle: false, ), body: generateBody() ); diff --git a/lib/screens/settings/settings.dart b/lib/screens/settings/settings.dart index 0031768..21dff92 100644 --- a/lib/screens/settings/settings.dart +++ b/lib/screens/settings/settings.dart @@ -57,7 +57,10 @@ class Settings extends StatelessWidget { } return Scaffold( - appBar: const SettingsAppBar(), + appBar: AppBar( + title: Text(AppLocalizations.of(context)!.settings), + centerTitle: false, + ), body: ListView( children: [ if (serversProvider.selectedServer != null) ...[ diff --git a/lib/widgets/custom_list_tile.dart b/lib/widgets/custom_list_tile.dart index 629d7a7..34a7c80 100644 --- a/lib/widgets/custom_list_tile.dart +++ b/lib/widgets/custom_list_tile.dart @@ -85,7 +85,7 @@ class CustomListTile extends StatelessWidget { ), ), if (trailing != null) ...[ - const SizedBox(width: 10), + const SizedBox(width: 16), trailing! ] ],