Fix Debug Layout Issue in AddContact
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
1bd2195be4
commit
bee3ae6e7b
|
@ -52,11 +52,7 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
|
|
||||||
/// We display a different number of tabs depending on the experiment setup
|
/// We display a different number of tabs depending on the experiment setup
|
||||||
bool groupsEnabled = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment);
|
bool groupsEnabled = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment);
|
||||||
return Scrollbar(
|
return Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) {
|
||||||
isAlwaysShown: true,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
child: Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) {
|
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: groupsEnabled ? 2 : 1,
|
length: groupsEnabled ? 2 : 1,
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
|
@ -71,7 +67,7 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
: [addPeerTab()]),
|
: [addPeerTab()]),
|
||||||
)),
|
)),
|
||||||
]));
|
]));
|
||||||
})));
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _copyOnion() {
|
void _copyOnion() {
|
||||||
|
@ -109,7 +105,10 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
/// The Add Peer Tab allows a peer to add a specific non-group peer to their contact lists
|
/// The Add Peer Tab allows a peer to add a specific non-group peer to their contact lists
|
||||||
/// We also provide a convenient way to copy their onion.
|
/// We also provide a convenient way to copy their onion.
|
||||||
Widget addPeerTab() {
|
Widget addPeerTab() {
|
||||||
return Container(
|
return Scrollbar(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: Container(
|
||||||
margin: EdgeInsets.all(30),
|
margin: EdgeInsets.all(30),
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: Form(
|
child: Form(
|
||||||
|
@ -169,7 +168,7 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
},
|
},
|
||||||
hintText: '',
|
hintText: '',
|
||||||
)
|
)
|
||||||
])));
|
])))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO Add Group Pane
|
/// TODO Add Group Pane
|
||||||
|
@ -179,7 +178,10 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
return Text(AppLocalizations.of(context)!.addServerFirst);
|
return Text(AppLocalizations.of(context)!.addServerFirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container(
|
return Scrollbar(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: Container(
|
||||||
margin: EdgeInsets.all(30),
|
margin: EdgeInsets.all(30),
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: Form(
|
child: Form(
|
||||||
|
@ -243,7 +245,7 @@ class _AddContactViewState extends State<AddContactView> {
|
||||||
child: Text(AppLocalizations.of(context)!.createGroupBtn),
|
child: Text(AppLocalizations.of(context)!.createGroupBtn),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)));
|
)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO Manage Servers Tab
|
/// TODO Manage Servers Tab
|
||||||
|
|
|
@ -106,14 +106,10 @@ class _TorStatusView extends State<TorStatusView> {
|
||||||
if (port > 0 && port < 65536) {
|
if (port > 0 && port < 65536) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return AppLocalizations.of(
|
return AppLocalizations.of(context)!.torSettingsErrorSettingPort;
|
||||||
context)!
|
|
||||||
.torSettingsErrorSettingPort;
|
|
||||||
}
|
}
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
return AppLocalizations.of(
|
return AppLocalizations.of(context)!.torSettingsErrorSettingPort;
|
||||||
context)!
|
|
||||||
.torSettingsErrorSettingPort;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChanged: (String socksPort) {
|
onChanged: (String socksPort) {
|
||||||
|
@ -141,22 +137,17 @@ class _TorStatusView extends State<TorStatusView> {
|
||||||
if (port > 0 && port < 65536) {
|
if (port > 0 && port < 65536) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return AppLocalizations.of(
|
return AppLocalizations.of(context)!.torSettingsErrorSettingPort;
|
||||||
context)!
|
|
||||||
.torSettingsErrorSettingPort;
|
|
||||||
}
|
}
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
return AppLocalizations.of(
|
return AppLocalizations.of(context)!.torSettingsErrorSettingPort;
|
||||||
context)!
|
|
||||||
.torSettingsErrorSettingPort;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChanged: (String controlPort) {
|
onChanged: (String controlPort) {
|
||||||
try {
|
try {
|
||||||
var port = int.parse(controlPort);
|
var port = int.parse(controlPort);
|
||||||
if (port > 0 && port < 65536) {
|
if (port > 0 && port < 65536) {
|
||||||
settings.controlPort =
|
settings.controlPort = int.parse(controlPort);
|
||||||
int.parse(controlPort);
|
|
||||||
saveSettings(context);
|
saveSettings(context);
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
|
@ -51,9 +51,7 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
||||||
: widget.number
|
: widget.number
|
||||||
? TextInputType.number
|
? TextInputType.number
|
||||||
: TextInputType.text,
|
: TextInputType.text,
|
||||||
inputFormatters: widget.number ? <TextInputFormatter>[
|
inputFormatters: widget.number ? <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly] : null,
|
||||||
FilteringTextInputFormatter.digitsOnly
|
|
||||||
] : null,
|
|
||||||
maxLines: widget.multiLine ? null : 1,
|
maxLines: widget.multiLine ? null : 1,
|
||||||
scrollController: _scrollController,
|
scrollController: _scrollController,
|
||||||
enableIMEPersonalizedLearning: false,
|
enableIMEPersonalizedLearning: false,
|
||||||
|
@ -66,11 +64,7 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
|
||||||
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)),
|
||||||
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||||
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(color: theme.current().textfieldErrorColor, fontWeight: FontWeight.bold, overflow: TextOverflow.visible),
|
||||||
color: theme.current().textfieldErrorColor,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
overflow: TextOverflow.visible
|
|
||||||
),
|
|
||||||
fillColor: theme.current().textfieldBackgroundColor,
|
fillColor: theme.current().textfieldBackgroundColor,
|
||||||
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
||||||
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))),
|
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))),
|
||||||
|
|
Loading…
Reference in New Issue