first commit
This commit is contained in:
131
lib/common/resources.dart
Normal file
131
lib/common/resources.dart
Normal file
@@ -0,0 +1,131 @@
|
||||
// Flutter imports:
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
///
|
||||
/// Константы
|
||||
///
|
||||
abstract class Const {}
|
||||
|
||||
abstract class Storage {
|
||||
///
|
||||
/// Хранилище авторизации
|
||||
///
|
||||
static const String storageAuth = 'auth';
|
||||
|
||||
///
|
||||
/// Хранилище языка
|
||||
///
|
||||
static const String hiveLang = 'lang';
|
||||
|
||||
///
|
||||
/// Ключ для хранилища [ThemeMode]
|
||||
///
|
||||
static const String hiveThemeMode = 'hive_theme_mode';
|
||||
}
|
||||
|
||||
///
|
||||
/// Высчитываемые константы
|
||||
///
|
||||
abstract class Compute {
|
||||
///
|
||||
/// Денежный форматтер
|
||||
///
|
||||
static final NumberFormat currency = NumberFormat.currency(
|
||||
locale: 'ru_RU',
|
||||
symbol: 'руб.',
|
||||
decimalDigits: 0,
|
||||
);
|
||||
}
|
||||
|
||||
///
|
||||
/// Имена ключей хранилищ
|
||||
///
|
||||
abstract class StorageKeys {
|
||||
///
|
||||
/// Ключ хранения токена авторизации
|
||||
///
|
||||
static const String accessToken = 'access.token';
|
||||
|
||||
///
|
||||
/// Ключ хранения токена обновления
|
||||
///
|
||||
static const String refreshToken = 'refresh.token';
|
||||
|
||||
///
|
||||
/// Ключ хранения кода языка
|
||||
///
|
||||
static const String langCode = 'lang.code';
|
||||
|
||||
///
|
||||
/// Ключ хранения темы приложения
|
||||
///
|
||||
static const String themeKey = 'theme_key';
|
||||
|
||||
///
|
||||
/// Ключ хранения селфа
|
||||
///
|
||||
static const String profile = 'profile';
|
||||
}
|
||||
|
||||
///
|
||||
/// Описание некоторых значений по-умолчанию
|
||||
///
|
||||
abstract class Defaults {
|
||||
///
|
||||
/// Длительность анимаций
|
||||
///
|
||||
static const Duration animationDur = Duration(milliseconds: 300);
|
||||
}
|
||||
|
||||
///
|
||||
/// Цвета приложения
|
||||
///
|
||||
abstract class AppColors {
|
||||
static const Color white = Color(0xFFFFFFFF);
|
||||
static const Color bg = Color(0xfFEFEFF4);
|
||||
static const Color primary = Color(0xFF4633BF);
|
||||
static const Color disabled = Color(0xFF8B8B8B);
|
||||
static const Color gray = Color(0xFFE0E0E0);
|
||||
static const Color body_text = Color(0xFF080514);
|
||||
|
||||
static const Color secondary = Color(0xFF1F1F1F);
|
||||
static const Color navigationL = Color(0xFF5C5C5C);
|
||||
static const Color navigationD = Color(0xFFE6E6E6);
|
||||
static const Gradient primaryGradient = LinearGradient(
|
||||
stops: <double>[0.52, 1.0],
|
||||
colors: <Color>[Color(0xFFFFD12D), Color(0xFFFF922D)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
);
|
||||
static const Color black = Color(0xFF282828);
|
||||
static const Color secondaryL = Color(0xFF282828);
|
||||
static const Color green = Color(0xFF3EBF81);
|
||||
static const Color yellowText = Color(0xFFCEBC13);
|
||||
static const Color purple = Color(0xFF923EFF);
|
||||
static const Color red = Color(0xFFDA4E4E);
|
||||
static const Color blueL = Color(0xFFE1F1FD);
|
||||
static const Color blueD = Color(0xFF22333F);
|
||||
static const Color greenD = Color(0xFF24372E);
|
||||
static const Color purpleD = Color(0xFF2B2235);
|
||||
static const Color redD = Color(0xFF3B2626);
|
||||
static const Color yellowD = Color(0xFF413A21);
|
||||
static const Color greenL = Color(0xFFE2F5EC);
|
||||
static const Color purpleL = Color(0xFFF4ECFF);
|
||||
static const Color redL = Color(0xFFF9E4E4);
|
||||
static const Color yellowL = Color(0xFFFFF8E0);
|
||||
static const Color backgroundLD1 = Color(0xFFF2F2F2);
|
||||
static const Color backgroundL = Color(0xFFF8F8F8);
|
||||
static const Color secondaryLL1 = Color(0xFF303030);
|
||||
static const Color backgroundLL1 = Color(0xFFFBFBFB);
|
||||
|
||||
static const Color app_blue = Color(0xFF0b84f6);
|
||||
static const Color app_grey = Color(0xFFF7F7F9);
|
||||
static const Color app_dark_grey = Color(0xFF7C7C7C);
|
||||
static const Color app_border = Color(0xFFE5E5E8);
|
||||
static const Color app_dark_blue = Color(0xFF888B98);
|
||||
static const Color app_err = Color(0xFFFF4D49);
|
||||
static const Color app_overlay = Color(0xFFF3F3FF);
|
||||
}
|
||||
Reference in New Issue
Block a user