Skip to content

Commit

Permalink
new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockchainViper committed Feb 25, 2024
1 parent 43ba7aa commit db82c97
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/routes/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ class _SettingsPageState extends State<SettingsPage> {
var _successMessage = '';
var denomination;
var symbol;
var urlController = TextEditingController();
GlobalKey<FormState> _formKey = GlobalKey();
bool? isUserLoggedIn;
@override
void initState() {
_rebuild();
super.initState();
setBackendUrl();
isUserLoggedIn = Authentication.currentAccount.email != null;
if (isUserLoggedIn == true) {
Authentication.getAccount().then((account) {
Expand All @@ -42,10 +39,6 @@ class _SettingsPageState extends State<SettingsPage> {
}
}

void setBackendUrl() {
urlController.text = Client.apiUri.toString();
}

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -63,7 +56,7 @@ class _SettingsPageState extends State<SettingsPage> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_EditUrlLink(),
_EditUrlLink(context),
if (isUserLoggedIn == true) _SelectCurrencyLink(context),
if (isUserLoggedIn == true) _BusinessInfoLink(context),
if (isUserLoggedIn == true) _AddressesLink(context),
Expand All @@ -81,7 +74,7 @@ class _SettingsPageState extends State<SettingsPage> {
);
}

Widget _EditUrlLink() {
Widget _EditUrlLink(context) {
return Container(
margin: EdgeInsets.all(10.0),
child: GestureDetector(
Expand Down

0 comments on commit db82c97

Please sign in to comment.