Unify Input. Remove hardcoded style (tcp tunnel)
This commit is contained in:
parent
de6b8547f2
commit
f180c7d645
@ -11,7 +11,7 @@ import 'package:wakelock/wakelock.dart';
|
|||||||
|
|
||||||
const double _kColumn1Width = 30;
|
const double _kColumn1Width = 30;
|
||||||
const double _kColumn4Width = 100;
|
const double _kColumn4Width = 100;
|
||||||
const double _kRowHeight = 50;
|
const double _kRowHeight = 60;
|
||||||
const double _kTextLeftMargin = 20;
|
const double _kTextLeftMargin = 20;
|
||||||
|
|
||||||
class _PortForward {
|
class _PortForward {
|
||||||
@ -183,8 +183,6 @@ class _PortForwardPageState extends State<PortForwardPage>
|
|||||||
controller: remotePortController,
|
controller: remotePortController,
|
||||||
inputFormatters: portInputFormatter),
|
inputFormatters: portInputFormatter),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
elevation: 0, side: const BorderSide(color: MyTheme.border)),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
int? localPort = int.tryParse(localPortController.text);
|
int? localPort = int.tryParse(localPortController.text);
|
||||||
int? remotePort = int.tryParse(remotePortController.text);
|
int? remotePort = int.tryParse(remotePortController.text);
|
||||||
@ -208,7 +206,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
|||||||
child: Text(
|
child: Text(
|
||||||
translate('Add'),
|
translate('Add'),
|
||||||
),
|
),
|
||||||
).marginAll(10),
|
).marginSymmetric(horizontal: 10),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -217,26 +215,15 @@ class _PortForwardPageState extends State<PortForwardPage>
|
|||||||
{required TextEditingController controller,
|
{required TextEditingController controller,
|
||||||
List<TextInputFormatter>? inputFormatters,
|
List<TextInputFormatter>? inputFormatters,
|
||||||
String? hint}) {
|
String? hint}) {
|
||||||
final textColor = Theme.of(context).textTheme.titleLarge?.color;
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: TextField(
|
child: Padding(
|
||||||
controller: controller,
|
padding: const EdgeInsets.all(10.0),
|
||||||
inputFormatters: inputFormatters,
|
child: TextField(
|
||||||
cursorColor: textColor,
|
controller: controller,
|
||||||
cursorHeight: 20,
|
inputFormatters: inputFormatters,
|
||||||
cursorWidth: 1,
|
decoration: InputDecoration(
|
||||||
decoration: InputDecoration(
|
hintText: hint,
|
||||||
border: OutlineInputBorder(
|
))),
|
||||||
borderSide: BorderSide(color: MyTheme.color(context).border!)),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(color: MyTheme.color(context).border!)),
|
|
||||||
fillColor: Theme.of(context).colorScheme.background,
|
|
||||||
contentPadding: const EdgeInsets.all(10),
|
|
||||||
hintText: hint,
|
|
||||||
hintStyle:
|
|
||||||
TextStyle(color: Theme.of(context).hintColor, fontSize: 16)),
|
|
||||||
style: TextStyle(color: textColor, fontSize: 16),
|
|
||||||
).marginAll(10),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user