修改文档

This commit is contained in:
toly
2021-01-27 13:25:11 +08:00
parent c4f36f0596
commit 994b2c0a1e
8 changed files with 28 additions and 26 deletions

View File

@@ -14,8 +14,8 @@
|------|------------|------|------------|
| Android版 | http://toly1994.com/file/FlutterUnit.apk |[flutter_unit](https://github.com/toly1994328/FlutterUnit)| [《FlutterUnit食用指南》](https://juejin.im/post/6844904147045597191)|
| iOS版 | 暂未提供,可自己下载项目运行 |[flutter_unit](https://github.com/toly1994328/FlutterUnit)| [《FlutterUnit 食用指南》](https://juejin.im/post/6844904147045597191)|
| MacOS版 | http://toly1994.com/file/flutter_unit_mac.zip |[flutter_unit_mac](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_mac)| [《mac版闪亮登场》](https://juejin.im/post/6844904147817332743)|
| Windows版 |http://toly1994.com/file/FlutterUnitWin.zip | [flutter_unit_windows](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_windows) | [《win版闪亮登场》](https://juejin.im/post/6847902222626488327)|
| MacOS版 | http://toly1994.com/file/flutter_unit_mac.zip |[flutter_unit_desk](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_desk)| [《mac版闪亮登场》](https://juejin.im/post/6844904147817332743)|
| Windows版 |http://toly1994.com/file/FlutterUnitWin.zip | [flutter_unit_desk](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_desk) | [《win版闪亮登场》](https://juejin.im/post/6847902222626488327)|
| Web版 | http://toly1994328.gitee.io/flutter_web | [ flutter_unit_web ](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_web) | [《web版闪亮登场》](https://juejin.im/post/6859888713980182541)|
---

View File

@@ -8,7 +8,7 @@ import 'package:flutter_unit/app/res/style_unit.dart';
class EmptyShower extends StatelessWidget {
final String message;
EmptyShower({Key key, this.message = "数据为空"}) : super(key: key);
const EmptyShower({Key key, this.message = "数据为空"}) : super(key: key);
@override
Widget build(BuildContext context) {

View File

@@ -8,6 +8,8 @@ import 'package:flutter_unit/views/components/permanent/loading/planet_loading.d
/// 说明: 默认 加载视图
class LoadingShower extends StatelessWidget {
const LoadingShower({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -27,4 +29,6 @@ class LoadingShower extends StatelessWidget {
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -20,7 +19,6 @@ class UnitSplash extends StatefulWidget {
class _UnitSplashState extends State<UnitSplash> with TickerProviderStateMixin {
AnimationController _controller;
// double _factor;
Animation _curveAnim;
bool _animEnd = false;
@@ -29,15 +27,17 @@ class _UnitSplashState extends State<UnitSplash> with TickerProviderStateMixin {
void initState() {
super.initState();
SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemUiOverlayStyle systemUiOverlayStyle =
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
_controller =
AnimationController(duration: Duration(milliseconds: 1000), vsync: this)
..addStatusListener(_listenStatus)..forward();
_curveAnim = CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn);
_controller = AnimationController(
duration: const Duration(milliseconds: 1000), vsync: this)
..addStatusListener(_listenStatus)
..forward();
_curveAnim =
CurvedAnimation(parent: _controller, curve: Curves.fastOutSlowIn);
}
@override
@@ -46,12 +46,11 @@ class _UnitSplashState extends State<UnitSplash> with TickerProviderStateMixin {
super.dispose();
}
void _listenStatus(AnimationStatus status) {
if (status == AnimationStatus.completed) {
setState(() {
_animEnd = true;
Future.delayed(Duration(milliseconds: 500)).then((e) {
Future.delayed(const Duration(milliseconds: 500)).then((e) {
Navigator.of(context).pushReplacementNamed(UnitRouter.nav);
});
});
@@ -125,7 +124,7 @@ class _UnitSplashState extends State<UnitSplash> with TickerProviderStateMixin {
opacity: _controller,
child: Container(
height: 120,
child: FlutterLogo(
child: const FlutterLogo(
size: 60,
),
)),

View File

@@ -13,7 +13,6 @@ import 'package:flutter_unit/views/components/project/unit_drawer_header.dart';
/// contact me by email 1981462002@qq.com
/// 说明:
class CategoryEndDrawer extends StatelessWidget {
final WidgetModel widget;
@@ -32,7 +31,7 @@ class CategoryEndDrawer extends StatelessWidget {
Circle(
color: widget.color,
),
SizedBox(
const SizedBox(
width: 10,
),
Text(widget.name)
@@ -64,8 +63,8 @@ class CategoryEndDrawer extends StatelessWidget {
color: Theme.of(context).primaryColor,
radius: 5,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Text(
'当前组件收藏情况',
style: TextStyle(fontSize: 16, shadows: [

View File

@@ -6,13 +6,13 @@ class BackgroundShower extends StatelessWidget {
return Opacity(
opacity: 0.05,
child: Container(
decoration: BoxDecoration(
decoration: const BoxDecoration(
image: DecorationImage(
image: const AssetImage('assets/images/sabar.webp'),
image: AssetImage('assets/images/sabar.webp'),
fit: BoxFit.cover),
borderRadius: const BorderRadius.only(
bottomRight: const Radius.circular(400),
topLeft: const Radius.circular(400))),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(400),
topLeft: Radius.circular(400))),
),
);
}

View File

@@ -51,7 +51,7 @@ class HomeDrawer extends StatelessWidget {
Icons.extension,
color: Theme.of(context).primaryColor,
),
title: Text('Flutter 集录'),
title: const Text('Flutter 集录'),
children: <Widget>[
_buildItem(context, TolyIcon.icon_tag, '属性集录', UnitRouter.attr),
_buildItem(context, Icons.palette, '绘画集录', UnitRouter.galley),

View File

@@ -82,7 +82,7 @@ class _HomePageState extends State<HomePage>
Widget _buildContent(WidgetsState state) {
if (state is WidgetsLoading) {
return SliverFillRemaining(
return const SliverFillRemaining(
child: LoadingShower(),
);
}
@@ -90,7 +90,7 @@ class _HomePageState extends State<HomePage>
if (state is WidgetsLoaded) {
List<WidgetModel> items = state.widgets;
if (items.isEmpty)
return SliverFillRemaining(
return const SliverFillRemaining(
child: EmptyShower(
message: "没数据,哥也没办法\n(≡ _ ≡)/~┴┴",
),