Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36c7ad8b43 |
@@ -66,3 +66,6 @@ backend/gencode
|
|||||||
|
|
||||||
# iOS 证书私钥(绝不入库)
|
# iOS 证书私钥(绝不入库)
|
||||||
.ios-certs/
|
.ios-certs/
|
||||||
|
|
||||||
|
# brainstorming visual companion
|
||||||
|
.superpowers/
|
||||||
|
|||||||
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.61] - 2026-06-20
|
||||||
|
|
||||||
|
### 改进
|
||||||
|
- 全平台应用名统一为「岩美酒库」:macOS 此前窗口标题与应用名显示为 jiu_client,现与各端一致
|
||||||
|
- 应用图标更新为最新品牌图标,覆盖 Windows 桌面 / 任务栏 / 标题栏 / 快捷方式及 macOS、iOS、Android、网页各端
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- 修复设备管理中 Windows 设备「平台」显示为「未知 桌面端」的问题,更新本版本并重新登录后正确显示为 Windows
|
||||||
|
|
||||||
## [1.0.60] - 2026-06-20
|
## [1.0.60] - 2026-06-20
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -553,7 +553,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
@@ -610,7 +610,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
|||||||
@@ -1,122 +1 @@
|
|||||||
{
|
{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}}
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 764 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -23,7 +23,7 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>jiu_client</string>
|
<string>岩美酒库</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../auth/auth_state.dart';
|
import '../auth/auth_state.dart';
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
import '../config/app_constants.dart';
|
||||||
import '../config/license_copy.dart';
|
import '../config/license_copy.dart';
|
||||||
import '../errors/error_reporter.dart';
|
import '../errors/error_reporter.dart';
|
||||||
import '../../providers/connectivity_provider.dart';
|
import '../../providers/connectivity_provider.dart';
|
||||||
@@ -15,8 +16,8 @@ final _publicDio = _buildPublicDio();
|
|||||||
Dio _buildPublicDio() {
|
Dio _buildPublicDio() {
|
||||||
final dio = Dio(BaseOptions(
|
final dio = Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
connectTimeout: const Duration(seconds: 8),
|
connectTimeout: AppConstants.publicConnectTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 15),
|
receiveTimeout: AppConstants.publicReceiveTimeout,
|
||||||
));
|
));
|
||||||
dio.interceptors.add(RetryInterceptor(dio));
|
dio.interceptors.add(RetryInterceptor(dio));
|
||||||
return dio;
|
return dio;
|
||||||
@@ -102,8 +103,8 @@ class ApiClient {
|
|||||||
_onAuthFailed = onAuthFailed;
|
_onAuthFailed = onAuthFailed;
|
||||||
_dio = Dio(BaseOptions(
|
_dio = Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
connectTimeout: const Duration(seconds: 8),
|
connectTimeout: AppConstants.publicConnectTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 15),
|
receiveTimeout: AppConstants.publicReceiveTimeout,
|
||||||
headers: {
|
headers: {
|
||||||
if (token != null) 'Authorization': 'Bearer $token',
|
if (token != null) 'Authorization': 'Bearer $token',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import '../config/app_constants.dart';
|
||||||
|
|
||||||
/// 网络层错误自动重试拦截器。
|
/// 网络层错误自动重试拦截器。
|
||||||
///
|
///
|
||||||
@@ -16,11 +17,7 @@ class RetryInterceptor extends Interceptor {
|
|||||||
|
|
||||||
RetryInterceptor(
|
RetryInterceptor(
|
||||||
this.dio, {
|
this.dio, {
|
||||||
this.delays = const [
|
this.delays = AppConstants.retryBackoffs,
|
||||||
Duration(seconds: 1),
|
|
||||||
Duration(seconds: 2),
|
|
||||||
Duration(seconds: 4),
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
static const _attemptKey = 'retry_attempt';
|
static const _attemptKey = 'retry_attempt';
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
import '../config/app_constants.dart';
|
||||||
|
|
||||||
const _kAccessToken = 'access_token';
|
const _kAccessToken = 'access_token';
|
||||||
const _kRefreshToken = 'refresh_token';
|
const _kRefreshToken = 'refresh_token';
|
||||||
@@ -153,8 +154,8 @@ class AuthNotifier extends StateNotifier<AuthState> {
|
|||||||
try {
|
try {
|
||||||
await Dio(BaseOptions(
|
await Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
connectTimeout: const Duration(seconds: 4),
|
connectTimeout: AppConstants.authProbeTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 4),
|
receiveTimeout: AppConstants.authProbeTimeout,
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
)).post('/auth/logout');
|
)).post('/auth/logout');
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
/// 全局业务常量集中地。
|
||||||
|
///
|
||||||
|
/// 收口此前散落在各处的「业务魔数」:网络超时、轮询间隔、重试退避、输入防抖、
|
||||||
|
/// 分页大小、业务上限等可调参数。**不**收 UI 尺寸/间距/字号等纯样式常量
|
||||||
|
/// (那些保留在各自 widget / 主题里,离使用点最近更易维护)。
|
||||||
|
///
|
||||||
|
/// 新增需要复用或可能调整的业务数值时,统一加到这里,避免再写裸字面量。
|
||||||
|
abstract final class AppConstants {
|
||||||
|
// ── 网络超时 ──
|
||||||
|
/// 未登录公共 Dio(登录/刷新)连接超时
|
||||||
|
static const Duration publicConnectTimeout = Duration(seconds: 8);
|
||||||
|
|
||||||
|
/// 未登录公共 Dio 读取超时
|
||||||
|
static const Duration publicReceiveTimeout = Duration(seconds: 15);
|
||||||
|
|
||||||
|
/// 登录态探测/轻量请求超时
|
||||||
|
static const Duration authProbeTimeout = Duration(seconds: 4);
|
||||||
|
|
||||||
|
/// 异常上报请求超时
|
||||||
|
static const Duration errorReportTimeout = Duration(seconds: 5);
|
||||||
|
|
||||||
|
/// 检查更新请求超时
|
||||||
|
static const Duration updateCheckTimeout = Duration(seconds: 5);
|
||||||
|
|
||||||
|
/// 连通性探测请求超时
|
||||||
|
static const Duration connectivityTimeout = Duration(seconds: 15);
|
||||||
|
|
||||||
|
/// 批量导入(Excel 上传)发送超时
|
||||||
|
static const Duration importSendTimeout = Duration(seconds: 120);
|
||||||
|
|
||||||
|
/// 批量导入(Excel 解析入库)读取超时
|
||||||
|
static const Duration importReceiveTimeout = Duration(seconds: 300);
|
||||||
|
|
||||||
|
// ── 重试 / 退避 ──
|
||||||
|
/// 网络层错误自动重试的递增间隔(1s → 2s → 4s)
|
||||||
|
static const List<Duration> retryBackoffs = [
|
||||||
|
Duration(seconds: 1),
|
||||||
|
Duration(seconds: 2),
|
||||||
|
Duration(seconds: 4),
|
||||||
|
];
|
||||||
|
|
||||||
|
/// 连通性探测的多轮预算(4s → 8s → 12s)
|
||||||
|
static const List<Duration> connectivityBudgets = [
|
||||||
|
Duration(seconds: 4),
|
||||||
|
Duration(seconds: 8),
|
||||||
|
Duration(seconds: 12),
|
||||||
|
];
|
||||||
|
|
||||||
|
/// 连通性探测单轮(不重试)预算
|
||||||
|
static const List<Duration> connectivitySingleBudget = [Duration(seconds: 4)];
|
||||||
|
|
||||||
|
/// 连通性探测每轮失败后的退避步长(600ms × 轮次)
|
||||||
|
static const Duration connectivityRetryStep = Duration(milliseconds: 600);
|
||||||
|
|
||||||
|
// ── 轮询间隔 ──
|
||||||
|
/// 会话心跳上报间隔
|
||||||
|
static const Duration heartbeatInterval = Duration(seconds: 30);
|
||||||
|
|
||||||
|
/// 在线时连通性轮询间隔
|
||||||
|
static const Duration connectivityOnlinePoll = Duration(seconds: 30);
|
||||||
|
|
||||||
|
/// 离线时连通性轮询间隔
|
||||||
|
static const Duration connectivityOfflinePoll = Duration(minutes: 1);
|
||||||
|
|
||||||
|
/// 后台检查更新轮询间隔
|
||||||
|
static const Duration updatePollInterval = Duration(hours: 1);
|
||||||
|
|
||||||
|
/// 启动后首次检查更新前的延迟
|
||||||
|
static const Duration updateInitialDelay = Duration(seconds: 3);
|
||||||
|
|
||||||
|
// ── 输入防抖 / 交互延迟 ──
|
||||||
|
/// 下拉框失焦自动收起延迟
|
||||||
|
static const Duration dropdownCloseDelay = Duration(milliseconds: 150);
|
||||||
|
|
||||||
|
/// 搜索输入防抖
|
||||||
|
static const Duration searchDebounce = Duration(milliseconds: 300);
|
||||||
|
|
||||||
|
/// 自更新流程各步骤间的过渡延迟
|
||||||
|
static const Duration updaterStepDelay = Duration(milliseconds: 400);
|
||||||
|
|
||||||
|
// ── 分页 ──
|
||||||
|
/// 列表默认每页条数
|
||||||
|
static const int defaultPageSize = 20;
|
||||||
|
|
||||||
|
/// 入库选货弹窗一次性拉取的库存条数
|
||||||
|
static const int stockInPickerPageSize = 500;
|
||||||
|
|
||||||
|
/// 出库选货弹窗一次性拉取的库存条数
|
||||||
|
static const int stockOutPickerPageSize = 1000;
|
||||||
|
|
||||||
|
/// 盘点拉取库存的每页条数
|
||||||
|
static const int inventoryCheckPageSize = 200;
|
||||||
|
|
||||||
|
// ── 业务上限 ──
|
||||||
|
/// 授权未返回时的默认设备上限
|
||||||
|
static const int defaultMaxDevices = 3;
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import 'package:package_info_plus/package_info_plus.dart';
|
|||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
import '../config/app_constants.dart';
|
||||||
|
|
||||||
class ErrorType {
|
class ErrorType {
|
||||||
static const flutterError = 'flutter_error';
|
static const flutterError = 'flutter_error';
|
||||||
@@ -29,8 +30,8 @@ class ErrorReporter {
|
|||||||
Dio get _client {
|
Dio get _client {
|
||||||
_dio ??= Dio(BaseOptions(
|
_dio ??= Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
connectTimeout: const Duration(seconds: 5),
|
connectTimeout: AppConstants.errorReportTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 5),
|
receiveTimeout: AppConstants.errorReportTimeout,
|
||||||
));
|
));
|
||||||
return _dio!;
|
return _dio!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
import '../config/app_constants.dart';
|
||||||
|
|
||||||
// 桌面/原生平台的应用内更新实现。Web 版见 app_updater_web.dart。
|
// 桌面/原生平台的应用内更新实现。Web 版见 app_updater_web.dart。
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ Future<void> downloadAndInstall(
|
|||||||
await dio.download(url, exe, onReceiveProgress: prog);
|
await dio.download(url, exe, onReceiveProgress: prog);
|
||||||
// 启动 Inno Setup 安装包后退出本应用,让其覆盖安装。
|
// 启动 Inno Setup 安装包后退出本应用,让其覆盖安装。
|
||||||
await Process.start(exe, const [], mode: ProcessStartMode.detached);
|
await Process.start(exe, const [], mode: ProcessStartMode.detached);
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 400));
|
await Future<void>.delayed(AppConstants.updaterStepDelay);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ else
|
|||||||
fi
|
fi
|
||||||
''');
|
''');
|
||||||
await Process.start('/bin/sh', [script], mode: ProcessStartMode.detached);
|
await Process.start('/bin/sh', [script], mode: ProcessStartMode.detached);
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 400));
|
await Future<void>.delayed(AppConstants.updaterStepDelay);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import '../core/config/app_constants.dart';
|
||||||
|
|
||||||
class LicenseInfo {
|
class LicenseInfo {
|
||||||
final int id;
|
final int id;
|
||||||
final String type; // trial | monthly | annual | lifetime
|
final String type; // trial | monthly | annual | lifetime
|
||||||
@@ -20,7 +22,8 @@ class LicenseInfo {
|
|||||||
id: (json['id'] as num?)?.toInt() ?? 0,
|
id: (json['id'] as num?)?.toInt() ?? 0,
|
||||||
type: json['type'] as String? ?? 'trial',
|
type: json['type'] as String? ?? 'trial',
|
||||||
isActive: json['is_active'] as bool? ?? false,
|
isActive: json['is_active'] as bool? ?? false,
|
||||||
maxDevices: (json['max_devices'] as num?)?.toInt() ?? 3,
|
maxDevices:
|
||||||
|
(json['max_devices'] as num?)?.toInt() ?? AppConstants.defaultMaxDevices,
|
||||||
expiresAt: json['expires_at'] != null
|
expiresAt: json['expires_at'] != null
|
||||||
? DateTime.tryParse(json['expires_at'] as String)
|
? DateTime.tryParse(json['expires_at'] as String)
|
||||||
: null,
|
: null,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/config/app_config.dart';
|
import '../core/config/app_config.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
|
|
||||||
/// 每次从离线恢复到在线时自增。
|
/// 每次从离线恢复到在线时自增。
|
||||||
/// 数据 provider 通过 watch 此值实现网络恢复后自动刷新。
|
/// 数据 provider 通过 watch 此值实现网络恢复后自动刷新。
|
||||||
@@ -44,27 +45,25 @@ class ConnectivityNotifier extends StateNotifier<bool> {
|
|||||||
// 独立轻量 Dio:无拦截器。连接预算用 Future.timeout 逐次控制,
|
// 独立轻量 Dio:无拦截器。连接预算用 Future.timeout 逐次控制,
|
||||||
// 故 BaseOptions 超时放宽到 15s 作为兜底。
|
// 故 BaseOptions 超时放宽到 15s 作为兜底。
|
||||||
final _dio = Dio(BaseOptions(
|
final _dio = Dio(BaseOptions(
|
||||||
connectTimeout: const Duration(seconds: 15),
|
connectTimeout: AppConstants.connectivityTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 15),
|
receiveTimeout: AppConstants.connectivityTimeout,
|
||||||
));
|
));
|
||||||
|
|
||||||
/// 每次尝试的超时预算,逐次拉长(越来越长)。
|
/// 每次尝试的超时预算,逐次拉长(越来越长)。
|
||||||
static const _budgets = <Duration>[
|
static const _budgets = AppConstants.connectivityBudgets;
|
||||||
Duration(seconds: 4),
|
|
||||||
Duration(seconds: 8),
|
|
||||||
Duration(seconds: 12),
|
|
||||||
];
|
|
||||||
|
|
||||||
/// 在线时:每 30 秒轻量检测一次(单次,不重试)
|
/// 在线时:轻量检测一次(单次,不重试)
|
||||||
void _startOnlineTimer() {
|
void _startOnlineTimer() {
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer.periodic(const Duration(seconds: 30), (_) => _check());
|
_timer =
|
||||||
|
Timer.periodic(AppConstants.connectivityOnlinePoll, (_) => _check());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 离线时:每 1 分钟嗅探一次,降低频率节省资源
|
/// 离线时:降低频率嗅探,节省资源
|
||||||
void _startOfflineTimer() {
|
void _startOfflineTimer() {
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer.periodic(const Duration(minutes: 1), (_) => _check());
|
_timer =
|
||||||
|
Timer.periodic(AppConstants.connectivityOfflinePoll, (_) => _check());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 立即触发一次检测(供外部调用,如 API 请求失败 / 启动时)。单次,不重试。
|
/// 立即触发一次检测(供外部调用,如 API 请求失败 / 启动时)。单次,不重试。
|
||||||
@@ -92,14 +91,14 @@ class ConnectivityNotifier extends StateNotifier<bool> {
|
|||||||
|
|
||||||
/// 连通性检测。[withRetry]=true 时按 [_budgets] 退避重试,间隔递增。
|
/// 连通性检测。[withRetry]=true 时按 [_budgets] 退避重试,间隔递增。
|
||||||
Future<bool> _check({bool withRetry = false}) async {
|
Future<bool> _check({bool withRetry = false}) async {
|
||||||
final budgets = withRetry ? _budgets : const [Duration(seconds: 4)];
|
final budgets = withRetry ? _budgets : AppConstants.connectivitySingleBudget;
|
||||||
var ok = false;
|
var ok = false;
|
||||||
for (var i = 0; i < budgets.length; i++) {
|
for (var i = 0; i < budgets.length; i++) {
|
||||||
ok = await _ping(budgets[i]);
|
ok = await _ping(budgets[i]);
|
||||||
if (ok) break;
|
if (ok) break;
|
||||||
// 最后一次失败后不再等待;中间失败按递增间隔退避(0.6s, 1.2s…)
|
// 最后一次失败后不再等待;中间失败按递增间隔退避(0.6s, 1.2s…)
|
||||||
if (i < budgets.length - 1) {
|
if (i < budgets.length - 1) {
|
||||||
await Future.delayed(Duration(milliseconds: 600 * (i + 1)));
|
await Future.delayed(AppConstants.connectivityRetryStep * (i + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/finance.dart';
|
import '../models/finance.dart';
|
||||||
import '../repositories/finance_repository.dart';
|
import '../repositories/finance_repository.dart';
|
||||||
@@ -16,7 +17,7 @@ final financeListProvider =
|
|||||||
|
|
||||||
class FinanceListNotifier extends AsyncNotifier<PageResult<FinanceRecord>> {
|
class FinanceListNotifier extends AsyncNotifier<PageResult<FinanceRecord>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
String _type = '';
|
String _type = '';
|
||||||
String _month = '';
|
String _month = '';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/inventory.dart';
|
import '../models/inventory.dart';
|
||||||
import '../repositories/inventory_repository.dart';
|
import '../repositories/inventory_repository.dart';
|
||||||
@@ -17,7 +18,7 @@ final inventoryListProvider =
|
|||||||
|
|
||||||
class InventoryListNotifier extends AsyncNotifier<PageResult<Inventory>> {
|
class InventoryListNotifier extends AsyncNotifier<PageResult<Inventory>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
int? _warehouseId;
|
int? _warehouseId;
|
||||||
String _keyword = '';
|
String _keyword = '';
|
||||||
List<String> _series = [];
|
List<String> _series = [];
|
||||||
@@ -106,7 +107,7 @@ final inventoryLogProvider =
|
|||||||
|
|
||||||
class InventoryLogNotifier extends AsyncNotifier<PageResult<InventoryLog>> {
|
class InventoryLogNotifier extends AsyncNotifier<PageResult<InventoryLog>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
PageResult<InventoryLog>? _cache;
|
PageResult<InventoryLog>? _cache;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/partner.dart';
|
import '../models/partner.dart';
|
||||||
import '../repositories/partner_repository.dart';
|
import '../repositories/partner_repository.dart';
|
||||||
@@ -25,7 +26,7 @@ final customerListProvider =
|
|||||||
class PartnerListNotifier extends AsyncNotifier<PageResult<Partner>> {
|
class PartnerListNotifier extends AsyncNotifier<PageResult<Partner>> {
|
||||||
final String? type;
|
final String? type;
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
String _keyword = '';
|
String _keyword = '';
|
||||||
PageResult<Partner>? _cache;
|
PageResult<Partner>? _cache;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/product.dart';
|
import '../models/product.dart';
|
||||||
import '../repositories/product_repository.dart';
|
import '../repositories/product_repository.dart';
|
||||||
@@ -17,7 +18,7 @@ final productListProvider =
|
|||||||
|
|
||||||
class ProductListNotifier extends AsyncNotifier<PageResult<Product>> {
|
class ProductListNotifier extends AsyncNotifier<PageResult<Product>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
String _keyword = '';
|
String _keyword = '';
|
||||||
int? _categoryId;
|
int? _categoryId;
|
||||||
PageResult<Product>? _cache;
|
PageResult<Product>? _cache;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import 'license_provider.dart';
|
import 'license_provider.dart';
|
||||||
|
|
||||||
/// 登录态心跳:已登录时每 30s 执行一次 **单个** POST /auth/ping:
|
/// 登录态心跳:已登录时每 30s 执行一次 **单个** POST /auth/ping:
|
||||||
@@ -27,7 +28,7 @@ class SessionHeartbeat {
|
|||||||
|
|
||||||
void start() {
|
void start() {
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer.periodic(const Duration(seconds: 30), (_) => _ping());
|
_timer = Timer.periodic(AppConstants.heartbeatInterval, (_) => _ping());
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _ping() async {
|
Future<void> _ping() async {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/stock_in.dart';
|
import '../models/stock_in.dart';
|
||||||
import '../repositories/stock_in_repository.dart';
|
import '../repositories/stock_in_repository.dart';
|
||||||
@@ -18,7 +19,7 @@ final stockInListProvider =
|
|||||||
|
|
||||||
class StockInListNotifier extends AsyncNotifier<PageResult<StockInOrder>> {
|
class StockInListNotifier extends AsyncNotifier<PageResult<StockInOrder>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
String _status = '';
|
String _status = '';
|
||||||
String? _startDate;
|
String? _startDate;
|
||||||
String? _endDate;
|
String? _endDate;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../core/api/api_client.dart';
|
import '../core/api/api_client.dart';
|
||||||
import '../core/auth/auth_state.dart';
|
import '../core/auth/auth_state.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
import '../core/models/page_result.dart';
|
import '../core/models/page_result.dart';
|
||||||
import '../models/stock_out.dart';
|
import '../models/stock_out.dart';
|
||||||
import '../repositories/stock_out_repository.dart';
|
import '../repositories/stock_out_repository.dart';
|
||||||
@@ -18,7 +19,7 @@ final stockOutListProvider =
|
|||||||
|
|
||||||
class StockOutListNotifier extends AsyncNotifier<PageResult<StockOutOrder>> {
|
class StockOutListNotifier extends AsyncNotifier<PageResult<StockOutOrder>> {
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
String _status = '';
|
String _status = '';
|
||||||
String? _startDate;
|
String? _startDate;
|
||||||
String? _endDate;
|
String? _endDate;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../core/config/app_config.dart';
|
import '../core/config/app_config.dart';
|
||||||
|
import '../core/config/app_constants.dart';
|
||||||
|
|
||||||
// ── 数据模型 ────────────────────────────────────────────────
|
// ── 数据模型 ────────────────────────────────────────────────
|
||||||
class AppUpdateInfo {
|
class AppUpdateInfo {
|
||||||
@@ -40,8 +41,8 @@ class UpdateNotifier extends AsyncNotifier<AppUpdateInfo?> {
|
|||||||
bool _dismissed = false; // 用户已手动关闭非强制更新提示
|
bool _dismissed = false; // 用户已手动关闭非强制更新提示
|
||||||
|
|
||||||
final _dio = Dio(BaseOptions(
|
final _dio = Dio(BaseOptions(
|
||||||
connectTimeout: const Duration(seconds: 5),
|
connectTimeout: AppConstants.updateCheckTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 5),
|
receiveTimeout: AppConstants.updateCheckTimeout,
|
||||||
));
|
));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -51,12 +52,12 @@ class UpdateNotifier extends AsyncNotifier<AppUpdateInfo?> {
|
|||||||
_dio.close(force: true);
|
_dio.close(force: true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 启动后 3 秒延迟首次检查(避免与登录请求竞争)
|
// 启动后延迟首次检查(避免与登录请求竞争)
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
await Future.delayed(AppConstants.updateInitialDelay);
|
||||||
final result = await _check();
|
final result = await _check();
|
||||||
|
|
||||||
// 每小时检查一次
|
// 定期检查更新
|
||||||
_timer = Timer.periodic(const Duration(hours: 1), (_) async {
|
_timer = Timer.periodic(AppConstants.updatePollInterval, (_) async {
|
||||||
_dismissed = false;
|
_dismissed = false;
|
||||||
final r = await _check();
|
final r = await _check();
|
||||||
state = AsyncValue.data(r);
|
state = AsyncValue.data(r);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:go_router/go_router.dart';
|
|||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import '../../core/auth/auth_state.dart';
|
import '../../core/auth/auth_state.dart';
|
||||||
import '../../core/config/app_config.dart';
|
import '../../core/config/app_config.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../core/theme/app_theme.dart';
|
import '../../core/theme/app_theme.dart';
|
||||||
import '../../core/storage/login_history.dart';
|
import '../../core/storage/login_history.dart';
|
||||||
import '../../providers/connectivity_provider.dart';
|
import '../../providers/connectivity_provider.dart';
|
||||||
@@ -73,7 +74,8 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
} else {
|
} else {
|
||||||
// 延迟关闭:让候选词的 onTap(pointer-up)先执行,再关闭下拉框
|
// 延迟关闭:让候选词的 onTap(pointer-up)先执行,再关闭下拉框
|
||||||
_closeHotelTimer?.cancel();
|
_closeHotelTimer?.cancel();
|
||||||
_closeHotelTimer = Timer(const Duration(milliseconds: 150), _closeHotel);
|
_closeHotelTimer =
|
||||||
|
Timer(AppConstants.dropdownCloseDelay, _closeHotel);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_usernameFocus.addListener(() {
|
_usernameFocus.addListener(() {
|
||||||
@@ -88,7 +90,8 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
_closeUsernameTimer?.cancel();
|
_closeUsernameTimer?.cancel();
|
||||||
_closeUsernameTimer = Timer(const Duration(milliseconds: 150), _closeUsername);
|
_closeUsernameTimer =
|
||||||
|
Timer(AppConstants.dropdownCloseDelay, _closeUsername);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../../core/responsive/responsive.dart';
|
import '../../core/responsive/responsive.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../core/theme/app_theme.dart';
|
import '../../core/theme/app_theme.dart';
|
||||||
import '../../models/finance.dart';
|
import '../../models/finance.dart';
|
||||||
import '../../providers/finance_provider.dart';
|
import '../../providers/finance_provider.dart';
|
||||||
@@ -49,7 +50,7 @@ class _FinanceTab extends ConsumerStatefulWidget {
|
|||||||
class _FinanceTabState extends ConsumerState<_FinanceTab> {
|
class _FinanceTabState extends ConsumerState<_FinanceTab> {
|
||||||
late String _month;
|
late String _month;
|
||||||
int _page = 1;
|
int _page = 1;
|
||||||
int _pageSize = 20;
|
int _pageSize = AppConstants.defaultPageSize;
|
||||||
|
|
||||||
late Future<List<FinanceRecord>> _future;
|
late Future<List<FinanceRecord>> _future;
|
||||||
List<FinanceRecord> _allRecords = [];
|
List<FinanceRecord> _allRecords = [];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:go_router/go_router.dart';
|
|||||||
import '../../core/theme/app_theme.dart';
|
import '../../core/theme/app_theme.dart';
|
||||||
import '../../models/inventory.dart';
|
import '../../models/inventory.dart';
|
||||||
import '../../models/warehouse.dart';
|
import '../../models/warehouse.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../providers/inventory_provider.dart';
|
import '../../providers/inventory_provider.dart';
|
||||||
import '../../providers/warehouse_provider.dart';
|
import '../../providers/warehouse_provider.dart';
|
||||||
|
|
||||||
@@ -51,7 +52,8 @@ class _InventoryCheckScreenState extends ConsumerState<InventoryCheckScreen> {
|
|||||||
try {
|
try {
|
||||||
final result = await ref
|
final result = await ref
|
||||||
.read(inventoryRepositoryProvider)
|
.read(inventoryRepositoryProvider)
|
||||||
.listInventory(warehouseId: wh.id, pageSize: 200);
|
.listInventory(
|
||||||
|
warehouseId: wh.id, pageSize: AppConstants.inventoryCheckPageSize);
|
||||||
final items = result.data
|
final items = result.data
|
||||||
.where((inv) => inv.productId != null)
|
.where((inv) => inv.productId != null)
|
||||||
.map((inv) => _CheckItem(inventory: inv))
|
.map((inv) => _CheckItem(inventory: inv))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import '../../core/config/app_config.dart';
|
import '../../core/config/app_config.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../core/responsive/responsive.dart';
|
import '../../core/responsive/responsive.dart';
|
||||||
import '../../core/theme/app_theme.dart';
|
import '../../core/theme/app_theme.dart';
|
||||||
import '../../models/inventory.dart';
|
import '../../models/inventory.dart';
|
||||||
@@ -165,8 +166,8 @@ class _InventoryListScreenState extends ConsumerState<InventoryListScreen> {
|
|||||||
final token = ref.read(authStateProvider).user?.accessToken ?? '';
|
final token = ref.read(authStateProvider).user?.accessToken ?? '';
|
||||||
final dio = Dio(BaseOptions(
|
final dio = Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
sendTimeout: const Duration(seconds: 120),
|
sendTimeout: AppConstants.importSendTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 300),
|
receiveTimeout: AppConstants.importReceiveTimeout,
|
||||||
));
|
));
|
||||||
dio.options.headers['Authorization'] = 'Bearer $token';
|
dio.options.headers['Authorization'] = 'Bearer $token';
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import '../../core/models/page_result.dart';
|
import '../../core/models/page_result.dart';
|
||||||
import '../../core/responsive/responsive.dart';
|
import '../../core/responsive/responsive.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../core/theme/app_theme.dart';
|
import '../../core/theme/app_theme.dart';
|
||||||
import '../../models/partner.dart';
|
import '../../models/partner.dart';
|
||||||
import '../../providers/partner_provider.dart';
|
import '../../providers/partner_provider.dart';
|
||||||
@@ -77,7 +78,7 @@ class _PartnersScreenState extends ConsumerState<PartnersScreen> {
|
|||||||
searchCtrl: _supplierSearchCtrl,
|
searchCtrl: _supplierSearchCtrl,
|
||||||
onSearchChanged: (v) {
|
onSearchChanged: (v) {
|
||||||
_supplierDebounce?.cancel();
|
_supplierDebounce?.cancel();
|
||||||
_supplierDebounce = Timer(const Duration(milliseconds: 300), () {
|
_supplierDebounce = Timer(AppConstants.searchDebounce, () {
|
||||||
ref.read(supplierListProvider.notifier).setKeyword(v);
|
ref.read(supplierListProvider.notifier).setKeyword(v);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -120,7 +121,7 @@ class _PartnersScreenState extends ConsumerState<PartnersScreen> {
|
|||||||
searchCtrl: _customerSearchCtrl,
|
searchCtrl: _customerSearchCtrl,
|
||||||
onSearchChanged: (v) {
|
onSearchChanged: (v) {
|
||||||
_customerDebounce?.cancel();
|
_customerDebounce?.cancel();
|
||||||
_customerDebounce = Timer(const Duration(milliseconds: 300), () {
|
_customerDebounce = Timer(AppConstants.searchDebounce, () {
|
||||||
ref.read(customerListProvider.notifier).setKeyword(v);
|
ref.read(customerListProvider.notifier).setKeyword(v);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||||||
import '../../core/auth/auth_state.dart';
|
import '../../core/auth/auth_state.dart';
|
||||||
import '../../widgets/write_guard.dart';
|
import '../../widgets/write_guard.dart';
|
||||||
import '../../core/config/app_config.dart';
|
import '../../core/config/app_config.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../core/config/app_info.dart';
|
import '../../core/config/app_info.dart';
|
||||||
import '../../core/config/license_copy.dart';
|
import '../../core/config/license_copy.dart';
|
||||||
import '../../core/responsive/responsive.dart';
|
import '../../core/responsive/responsive.dart';
|
||||||
@@ -1375,8 +1376,8 @@ class _BatchImportWidgetState extends ConsumerState<_BatchImportWidget> {
|
|||||||
|
|
||||||
final dio = Dio(BaseOptions(
|
final dio = Dio(BaseOptions(
|
||||||
baseUrl: AppConfig.apiBaseUrl,
|
baseUrl: AppConfig.apiBaseUrl,
|
||||||
sendTimeout: const Duration(seconds: 120),
|
sendTimeout: AppConstants.importSendTimeout,
|
||||||
receiveTimeout: const Duration(seconds: 300),
|
receiveTimeout: AppConstants.importReceiveTimeout,
|
||||||
));
|
));
|
||||||
dio.options.headers['Authorization'] = 'Bearer $token';
|
dio.options.headers['Authorization'] = 'Bearer $token';
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import '../../core/auth/auth_state.dart';
|
|||||||
import '../../core/utils/print_util.dart';
|
import '../../core/utils/print_util.dart';
|
||||||
import '../../core/utils/date_util.dart';
|
import '../../core/utils/date_util.dart';
|
||||||
import '../../models/stock_in.dart';
|
import '../../models/stock_in.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../providers/partner_provider.dart';
|
import '../../providers/partner_provider.dart';
|
||||||
import '../../providers/product_option_provider.dart';
|
import '../../providers/product_option_provider.dart';
|
||||||
import '../../providers/product_provider.dart';
|
import '../../providers/product_provider.dart';
|
||||||
@@ -196,7 +197,9 @@ class _StockInFormScreenState extends ConsumerState<StockInFormScreen> {
|
|||||||
try {
|
try {
|
||||||
final result = await ref
|
final result = await ref
|
||||||
.read(inventoryRepositoryProvider)
|
.read(inventoryRepositoryProvider)
|
||||||
.listInventory(warehouseId: warehouseId, pageSize: 500);
|
.listInventory(
|
||||||
|
warehouseId: warehouseId,
|
||||||
|
pageSize: AppConstants.stockInPickerPageSize);
|
||||||
setState(() {
|
setState(() {
|
||||||
_inventoryMap = {
|
_inventoryMap = {
|
||||||
for (final inv in result.data.where((inv) => inv.productId != null))
|
for (final inv in result.data.where((inv) => inv.productId != null))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import '../../core/utils/print_util.dart';
|
|||||||
import '../../core/utils/date_util.dart';
|
import '../../core/utils/date_util.dart';
|
||||||
import '../../models/stock_out.dart';
|
import '../../models/stock_out.dart';
|
||||||
import '../../widgets/date_picker_field.dart';
|
import '../../widgets/date_picker_field.dart';
|
||||||
|
import '../../core/config/app_constants.dart';
|
||||||
import '../../providers/inventory_provider.dart';
|
import '../../providers/inventory_provider.dart';
|
||||||
import '../../providers/partner_provider.dart';
|
import '../../providers/partner_provider.dart';
|
||||||
import '../../providers/stock_out_provider.dart';
|
import '../../providers/stock_out_provider.dart';
|
||||||
@@ -153,7 +154,9 @@ class _StockOutFormScreenState extends ConsumerState<StockOutFormScreen> {
|
|||||||
try {
|
try {
|
||||||
final result = await ref
|
final result = await ref
|
||||||
.read(inventoryRepositoryProvider)
|
.read(inventoryRepositoryProvider)
|
||||||
.listInventory(warehouseId: warehouseId, pageSize: 1000);
|
.listInventory(
|
||||||
|
warehouseId: warehouseId,
|
||||||
|
pageSize: AppConstants.stockOutPickerPageSize);
|
||||||
final Map<int, _PickerItem> productMap = {};
|
final Map<int, _PickerItem> productMap = {};
|
||||||
for (final inv in result.data.where((inv) => inv.productId != null)) {
|
for (final inv in result.data.where((inv) => inv.productId != null)) {
|
||||||
final pid = inv.productId!;
|
final pid = inv.productId!;
|
||||||
|
|||||||
@@ -489,7 +489,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.jiuClient.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.yanmei.jiu.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
||||||
@@ -504,7 +504,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.jiuClient.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.yanmei.jiu.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
||||||
@@ -519,7 +519,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.jiuClient.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.yanmei.jiu.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/jiu_client.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/jiu_client";
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"info": {
|
||||||
{
|
"version": 1,
|
||||||
"size" : "16x16",
|
"author": "xcode"
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "app_icon_16.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
},
|
||||||
{
|
"images": [
|
||||||
"size" : "16x16",
|
{
|
||||||
"idiom" : "mac",
|
"size": "16x16",
|
||||||
"filename" : "app_icon_32.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_16.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "32x32",
|
{
|
||||||
"idiom" : "mac",
|
"size": "16x16",
|
||||||
"filename" : "app_icon_32.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_32.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "32x32",
|
{
|
||||||
"idiom" : "mac",
|
"size": "32x32",
|
||||||
"filename" : "app_icon_64.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_32.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "128x128",
|
{
|
||||||
"idiom" : "mac",
|
"size": "32x32",
|
||||||
"filename" : "app_icon_128.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_64.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "128x128",
|
{
|
||||||
"idiom" : "mac",
|
"size": "128x128",
|
||||||
"filename" : "app_icon_256.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_128.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "256x256",
|
{
|
||||||
"idiom" : "mac",
|
"size": "128x128",
|
||||||
"filename" : "app_icon_256.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_256.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "256x256",
|
{
|
||||||
"idiom" : "mac",
|
"size": "256x256",
|
||||||
"filename" : "app_icon_512.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_256.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "512x512",
|
{
|
||||||
"idiom" : "mac",
|
"size": "256x256",
|
||||||
"filename" : "app_icon_512.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_512.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "512x512",
|
{
|
||||||
"idiom" : "mac",
|
"size": "512x512",
|
||||||
"filename" : "app_icon_1024.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_512.png",
|
||||||
}
|
"scale": "1x"
|
||||||
],
|
},
|
||||||
"info" : {
|
{
|
||||||
"version" : 1,
|
"size": "512x512",
|
||||||
"author" : "xcode"
|
"idiom": "mac",
|
||||||
}
|
"filename": "app_icon_1024.png",
|
||||||
}
|
"scale": "2x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -8,7 +8,7 @@
|
|||||||
PRODUCT_NAME = jiu_client
|
PRODUCT_NAME = jiu_client
|
||||||
|
|
||||||
// The application's bundle identifier
|
// The application's bundle identifier
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.jiuClient
|
PRODUCT_BUNDLE_IDENTIFIER = com.yanmei.jiu
|
||||||
|
|
||||||
// The copyright displayed in application information
|
// The copyright displayed in application information
|
||||||
PRODUCT_COPYRIGHT = Copyright © 2026 com.example. All rights reserved.
|
PRODUCT_COPYRIGHT = Copyright © 2026 岩美技术有限公司. All rights reserved.
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>$(PRODUCT_NAME)</string>
|
<string>岩美酒库</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>岩美酒库</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
|
|||||||
@@ -65,6 +65,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.0"
|
version: "2.4.0"
|
||||||
|
checked_yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: checked_yaml
|
||||||
|
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.4"
|
||||||
|
cli_util:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cli_util
|
||||||
|
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.4.2"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -206,6 +222,14 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_launcher_icons:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: flutter_launcher_icons
|
||||||
|
sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.14.4"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -381,6 +405,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
|
json_annotation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: json_annotation
|
||||||
|
sha256: "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.12.0"
|
||||||
leak_tracker:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -37,6 +37,25 @@ dev_dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^4.0.0
|
flutter_lints: ^4.0.0
|
||||||
http_mock_adapter: ^0.6.1
|
http_mock_adapter: ^0.6.1
|
||||||
|
flutter_launcher_icons: ^0.14.1
|
||||||
|
|
||||||
|
# 全平台启动图标,单一源图 assets/brand/logo_mark.png(512×512),
|
||||||
|
# 跑 `dart run flutter_launcher_icons` 重生成 android/ios/web/windows/macos 所有图标
|
||||||
|
flutter_launcher_icons:
|
||||||
|
image_path: "assets/brand/logo_mark.png"
|
||||||
|
android: true
|
||||||
|
ios: true
|
||||||
|
remove_alpha_ios: true
|
||||||
|
background_color_ios: "#FFFFFF"
|
||||||
|
web:
|
||||||
|
generate: true
|
||||||
|
background_color: "#FFFFFF"
|
||||||
|
theme_color: "#2563AC"
|
||||||
|
windows:
|
||||||
|
generate: true
|
||||||
|
icon_size: 256
|
||||||
|
macos:
|
||||||
|
generate: true
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 17 KiB |
@@ -30,13 +30,13 @@
|
|||||||
<!-- iOS meta tags & icons -->
|
<!-- iOS meta tags & icons -->
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
<meta name="apple-mobile-web-app-title" content="岩美">
|
<meta name="apple-mobile-web-app-title" content="岩美酒库">
|
||||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||||
|
|
||||||
<title>岩美</title>
|
<title>岩美酒库</title>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "岩美",
|
"name": "岩美酒库",
|
||||||
"short_name": "岩美",
|
"short_name": "岩美酒库",
|
||||||
"start_url": ".",
|
"start_url": ".",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "#2563AC",
|
"background_color": "#2563AC",
|
||||||
@@ -32,4 +32,4 @@
|
|||||||
"purpose": "maskable"
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -89,13 +89,13 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904e4"
|
BLOCK "040904e4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "com.yanmei" "\0"
|
VALUE "CompanyName", "岩美技术有限公司" "\0"
|
||||||
VALUE "FileDescription", "jiu_client" "\0"
|
VALUE "FileDescription", "岩美酒库" "\0"
|
||||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||||
VALUE "InternalName", "jiu_client" "\0"
|
VALUE "InternalName", "jiu_client" "\0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2026 com.yanmei. All rights reserved." "\0"
|
VALUE "LegalCopyright", "Copyright (C) 2026 岩美技术有限公司. All rights reserved." "\0"
|
||||||
VALUE "OriginalFilename", "jiu_client.exe" "\0"
|
VALUE "OriginalFilename", "jiu_client.exe" "\0"
|
||||||
VALUE "ProductName", "jiu_client" "\0"
|
VALUE "ProductName", "岩美酒库" "\0"
|
||||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 6.9 KiB |