portrait mode the margins around the "Origin" field are bit tight. To fix it, if the orientation is portrait set the horizontal padding to `12` and in landscape it will be `8`.
The helper text was getting truncated after adding the padding. Inorder to fix that used `Text` widget. Signed-off-by: Shan Shaji <[email protected]> --- lib/proxmox_login_form.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart index 9e95f27..c3781db 100644 --- a/lib/proxmox_login_form.dart +++ b/lib/proxmox_login_form.dart @@ -72,11 +72,12 @@ class _ProxmoxLoginFormState extends State<ProxmoxLoginForm> { if (widget.accessDomains == null) { return TextFormField( decoration: const InputDecoration( - icon: Icon(Icons.vpn_lock), - labelText: 'Origin', - hintText: 'e.g. 192.168.1.2', - helperText: - 'Protocol (https) and default port (8006 or 443) implied'), + icon: Icon(Icons.vpn_lock), + labelText: 'Origin', + hintText: 'e.g. 192.168.1.2', + helper: + Text('Protocol (https) and default port (8006 or 443) implied'), + ), textInputAction: TextInputAction.next, controller: widget.originController, validator: widget.originValidator, @@ -322,7 +323,12 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> { height: MediaQuery.of(context).size.height), child: SafeArea( child: Padding( - padding: const EdgeInsets.all(8.0), + padding: EdgeInsets.symmetric( + horizontal: MediaQuery.maybeOrientationOf(context) == + Orientation.portrait + ? 12 + : 8, + ), child: FutureBuilder<List<PveAccessDomainModel?>?>( future: _accessDomains, builder: (context, snapshot) { -- 2.50.1 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
