Move default server to constants file

This commit is contained in:
Roland Geider
2021-03-18 11:15:13 +01:00
parent 81b94d976c
commit 1ad4e5aebb
3 changed files with 9 additions and 2 deletions

View File

@@ -16,4 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/// Size for the "smaller" icons, e.g. when they belong to less important items
/// and we don't want to fill the whole screen
const double ICON_SIZE_SMALL = 20;
/// Default wger server during login
final DEFAULT_SERVER = 'https://wger.rge.uber.space';
//final DEFAULT_SERVER = 'http://localhost:8000';

View File

@@ -28,12 +28,11 @@ import 'package:flutter/widgets.dart';
import 'package:http/http.dart' as http;
import 'package:package_info/package_info.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:wger/helpers/consts.dart';
import 'package:wger/models/http_exception.dart';
import 'helpers.dart';
final DEFAULT_SERVER = 'https://wger.rge.uber.space';
class Auth with ChangeNotifier {
String token;
String serverUrl;
@@ -209,6 +208,7 @@ class Auth with ChangeNotifier {
log('logging out');
token = null;
serverUrl = null;
dataInit = false;
// _userId = null;
// _expiryDate = null;
// if (_authTimer != null) {

View File

@@ -19,6 +19,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:provider/provider.dart';
import 'package:wger/helpers/consts.dart';
import 'package:wger/helpers/ui.dart';
import 'package:wger/models/http_exception.dart';