new project stable version

This commit is contained in:
2026-05-10 19:11:31 +03:00
commit 3616f84556
391 changed files with 23857 additions and 0 deletions

93
lib/core/app_colors.dart Normal file
View File

@@ -0,0 +1,93 @@
import 'package:flutter/material.dart';
class AppColors {
// --------------------------
// ФОНЫ ЭКРАНОВ
// --------------------------
/// Градиент PhoneScreen (ввод телефона)
static const LinearGradient phoneScreenBg = LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFF293A69),
Color(0xFF202741),
],
);
/// Градиент PhoneLoginScreen & PinLoginScreen
static const LinearGradient authScreenBg = LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFF0D1A44),
Color(0xFF091233),
],
);
// --------------------------
// КНОПКИ
// --------------------------
/// Активная кнопка — бирюзово-зелёный градиент
static const LinearGradient activeButtonGradient = LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFF75FBF0),
Color(0xFF8BFFAA),
],
);
/// Неактивная кнопка — тёмно-синий
static const Color disabledButtonColor = Color(0xFF2A3A6A);
/// Активный текст кнопки
static const Color activeButtonText = Color(0xFF000032);
/// Неактивный текст кнопки
static const Color disabledButtonText = Color(0x99FFFFFF);
// --------------------------
// ЦВЕТА ДЛЯ TOGGLE / CHECKBOX
// --------------------------
/// Бордер неактивного чекбокса
static const Color checkboxBorder = Colors.white70;
/// Бордер чекбокса с ошибкой
static const Color checkboxErrorBorder = Color(0xFFBA1A1A);
/// Цвет заливки активного чекбокса
static const Color checkboxFill = Color(0xFF8BFFAA);
// --------------------------
// PIN / CODE INPUT
// --------------------------
/// Цвет цифры в SMS-коде (PhoneLoginScreen)
static const Color smsDigit = Color(0xFF75FBF0);
/// Цвет точки-плейсхолдера
static const Color digitPlaceholder = Color(0x66FFFFFF);
/// Цвет правильного PIN
static const Color pinSuccess = Color(0xFF66FF99);
/// Цвет неверного PIN
static const Color pinError = Color(0xFFFF4F4F);
// --------------------------
// ТЕКСТ
// --------------------------
static const Color whiteText = Colors.white;
static const Color white70 = Colors.white70;
static const Color hint = Colors.white54;
// --------------------------
// ПРОЧЕЕ
// --------------------------
static const Color darkBlue = Color(0xFF000032);
}

29
lib/core/failures.dart Normal file
View File

@@ -0,0 +1,29 @@
sealed class EntityFailure {
final String? message;
const EntityFailure(this.message);
}
class AuthFailure extends EntityFailure {
final int attemptsLeft;
const AuthFailure(this.attemptsLeft, {String? message}) : super(message);
}
class AuthBlockFailure extends EntityFailure {
const AuthBlockFailure(super.message);
}
class WrongZoneFailure extends EntityFailure {
const WrongZoneFailure(super.message);
}
class ScooterNotFoundFailure extends EntityFailure {
const ScooterNotFoundFailure(super.message);
}
class RouteHistoryNotFoundFailure extends EntityFailure {
const RouteHistoryNotFoundFailure(super.message);
}
class UnknownFailure extends EntityFailure {
const UnknownFailure(super.message);
}

13
lib/core/result.dart Normal file
View File

@@ -0,0 +1,13 @@
import 'failures.dart';
sealed class Result<T> {}
class Success<T> extends Result<T> {
final T? data;
Success(this.data);
}
class Failure<T> extends Result<T> {
final EntityFailure failure;
Failure(this.failure);
}