Files
CloudHome-Ops/lib/utils/constants.dart

31 lines
1.0 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// 全局常量定义。
class AppConstants {
AppConstants._();
/// 应用名称。
static const String appName = '云定制主页运营助手';
/// 是否使用 mock 数据。
///
/// - `false`(默认):对接真实「云定制后台」(PHP/CodeIgniter);
/// - `true`:由 [MockInterceptor] 本地返回示例数据,供无后端时演示。
static const bool useMock = false;
/// 接口统一前缀。
///
/// 后端 origin 与环境相关配置已迁移至 `lib/config/*`
/// ([AppEnvironment] / [AppConfig] / [TestConfig] / [StagingConfig]),
/// 默认锁定测试环境,禁止任何生产切换。
static const String apiPrefix = '/api';
/// mock 登录账号(仅 useMock=true 时演示用)。
static const String mockAccount = 'admin';
static const String mockPassword = '123456';
/// 请求超时时间。
static const Duration apiTimeout = Duration(seconds: 10);
/// 设备列表分页默认每页条数。
static const int deviceListPageSize = 100;
}