import 'dart:async'; import 'package:openmediacentermobile/db/settings_db.dart'; class TokenT { String token; String domain; TokenT(this.token, this.domain); } Future getToken() async { final settings = await SettingsDB.getInstance().getSettings(); if (settings.token == "" || settings.domain == "") { return null; } else { return TokenT(settings.token, settings.domain); } }