mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 18:19:25 +01:00
Move default server to constants file
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user