You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class ApiConsts {
|
|
static String chatServerBaseUrl = "https://apiderichat.hmg.com/";
|
|
static String chatServerBaseApiUrl = chatServerBaseUrl + "api/";
|
|
static String chatLoginTokenUrl = chatServerBaseApiUrl + "user/";
|
|
static String chatHubConnectionUrl = chatServerBaseUrl + "ConnectionChatHub";
|
|
}
|
|
|
|
class AppSharedPrefs {
|
|
SharedPreferences? sharedPref;
|
|
|
|
init() async {
|
|
sharedPref = await SharedPreferences.getInstance();
|
|
}
|
|
|
|
Future<void> setStringFromPrefs(String key, String value) async {
|
|
sharedPref!.setString(key, value);
|
|
}
|
|
|
|
Future<String> getStringFromPrefs(String key) async {
|
|
return await sharedPref!.getString(key) ?? "";
|
|
}
|
|
}
|
|
|
|
class MyColors {
|
|
static const Color backgroundColor = Color(0xffF8F8F8);
|
|
static const Color grey41Color = Color(0xff414141);
|
|
static const Color grey57Color = Color(0xff575757);
|
|
static const Color grey67Color = Color(0xff676767);
|
|
static const Color grey77Color = Color(0xff777777);
|
|
static const Color greyF7Color = Color(0xffF7F7F7);
|
|
static const Color white = Color(0xffffffff);
|
|
static const Color redA3Color = Color(0xffCA3332);
|
|
static const Color textMixColor = Color(0xff2BB8A6);
|
|
}
|