已完成用户APP首期功能开发
交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
// 功能:装配用户端主题与路由,并让桌面 Web 预览保持产品图手机画布宽度。
|
||||
// 版本:1.1.0。
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
import '../ui/core/app_theme.dart';
|
||||
import 'dependencies.dart';
|
||||
@@ -19,10 +23,28 @@ class _UserClientAppState extends State<UserClientApp> {
|
||||
@override
|
||||
Widget build(BuildContext context) => MaterialApp.router(
|
||||
title: '瓶安芯',
|
||||
// 首期面向中文用户,系统日期与时间控件统一使用简体中文。
|
||||
locale: const Locale('zh', 'CN'),
|
||||
supportedLocales: const [Locale('zh', 'CN')],
|
||||
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.light(),
|
||||
darkTheme: AppTheme.dark(),
|
||||
themeMode: ThemeMode.system,
|
||||
routerConfig: _router,
|
||||
builder: (context, child) {
|
||||
if (!kIsWeb) return child ?? const SizedBox.shrink();
|
||||
// 产品设计宽853像素按2倍密度绘制;Web预览以427 CSS像素展示同一手机画布。
|
||||
return ColoredBox(
|
||||
color: const Color(0xFFEFF2F7),
|
||||
child: Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 427),
|
||||
child: SizedBox(width: double.infinity, child: child),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user