Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e5ae754
Update main.dart
toly1994328 Apr 20, 2020
e9b09cd
删除无用代码
toly1994328 Apr 20, 2020
6e63ec3
冲突
toly1994328 Apr 20, 2020
98bb07c
使用无边线NoBorderExpansionTile
toly1994328 Apr 20, 2020
068d99c
优化收藏集显示
toly1994328 Apr 20, 2020
10369c1
图标
toly1994328 Apr 20, 2020
a853c7d
🎉完成收藏夹创建和删除
toly1994328 Apr 21, 2020
b139de5
:tada: Initial commit.
toly1994328 Apr 21, 2020
97308f2
:pencil: Initial commit.
toly1994328 Apr 21, 2020
b41b128
:pencil: 添加注释说明
toly1994328 Apr 21, 2020
810f9af
🏷️ MIT 协议
toly1994328 Apr 21, 2020
7f7a566
:sparkles: 收藏夹完成
toly1994328 Apr 23, 2020
84f2458
:sparkles: 收藏夹修改完成
toly1994328 Apr 23, 2020
23d02c5
:pencil: 修改文档
toly1994328 Apr 24, 2020
8c070f0
:art: 优化展示组件代码的存在形式
toly1994328 Apr 25, 2020
b178162
:art: 优化展示组件代码的存在形式
toly1994328 Apr 26, 2020
ef21901
:art: 优化展示组件代码的存在形式,stateless重构完毕
toly1994328 Apr 27, 2020
36a65f4
:art: 优化结构,调整包位置
toly1994328 Apr 27, 2020
da87301
:ambulance: ios白屏问题fix
toly1994328 Apr 28, 2020
b4d1f78
:pencil: 添加运行环境
toly1994328 Apr 28, 2020
548199c
:sparkles: item样式切换支持优化
toly1994328 Apr 28, 2020
fc84531
:ambulance: hero组件异常
toly1994328 Apr 29, 2020
60eb0f0
:art: stateful组件重构完毕
toly1994328 Apr 29, 2020
b58de9d
:art: 当前组件结构重构完毕
toly1994328 Apr 30, 2020
c0ff2b5
:zap: 优化详情
toly1994328 May 3, 2020
6446160
:pencil: 临时提交
toly1994328 May 3, 2020
9a7b642
:pencil: 临时提交
toly1994328 May 3, 2020
69cff81
:pencil: 修改文档
toly1994328 May 4, 2020
88c2a06
:pencil: 修改文档
toly1994328 May 6, 2020
43ad645
:pencil: 修改文档
toly1994328 May 6, 2020
7d065f1
:zap: 使用Flutter1.17
toly1994328 May 7, 2020
6bbbfd6
:pencil: 修改文档
toly1994328 May 7, 2020
fcf85cc
:pencil: 修改文档
toly1994328 May 9, 2020
2cc2e1d
:bug: 修复详情页右侧滑和linkto的冲突。优化代码结构
toly1994328 May 10, 2020
7db01d8
:pencil: 修改文档
toly1994328 May 10, 2020
d93a82c
:pencil: 修改文档
toly1994328 May 10, 2020
8a9f97c
:pencil: 修改文档
toly1994328 May 10, 2020
cc71231
Update README.md
toly1994328 May 14, 2020
7e02d23
:ambulance: 侧栏菜单跳转异常
toly1994328 May 27, 2020
88c7855
:sparkles: 添加CustomSingleChildLayout组件
toly1994328 Jun 3, 2020
b55f618
:sparkles: 添加CustomMultiChildLayout、LayoutId组件
toly1994328 Jun 6, 2020
6bb6bbc
:pencil: 文档更新
toly1994328 Jun 11, 2020
46addef
:art: 优化代码
toly1994328 Jun 15, 2020
3cc2418
:sparkles: 添加NestedScrollView、SliverOverlapAbsorber、SliverOverlapInje…
toly1994328 Jun 16, 2020
5fe4ca9
:pencil: 文档更新
toly1994328 Jun 16, 2020
ee14c6e
:sparkles: 添加应用版本检查页
toly1994328 Jun 16, 2020
375a903
:pencil: 更新文档
toly1994328 Jun 16, 2020
3ee66b1
:pencil: 更新文档
toly1994328 Jun 16, 2020
eed1773
:pencil: 要点集录初测
toly1994328 Jun 19, 2020
f9d679d
:sparkles: 开启性能浮层、CupertinoSegmentedControl组件
toly1994328 Jun 30, 2020
1bc7014
:sparkles: 开启性能浮层、CupertinoSegmentedControl组件
toly1994328 Jun 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
📝 修改文档
  • Loading branch information
toly1994328 committed May 6, 2020
commit 88c2a06fdf456b7deb3e6f55ad5c7f6997ec61a9
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Tools • Dart 2.7.0

#### Flutter Unit 周边

- 🔥 [Flutter Unit 更新记录 ](http://blog.toly1994.com/FlutterUnit_update.html)
- 🔥 [Flutter Unit 更新记录 ](http://king.toly1994.com/FlutterUnit_update.html)


---
Expand Down
21 changes: 17 additions & 4 deletions lib/views/pages/category/collect_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import 'package:flutter_unit/views/items/collect_widget_list_item.dart';

import 'category_page.dart';

class CollectPage extends StatelessWidget {
class CollectPage extends StatefulWidget {
@override
_CollectPageState createState() => _CollectPageState();
}

class _CollectPageState extends State<CollectPage> with AutomaticKeepAliveClientMixin{
final gridDelegate = const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10,
Expand All @@ -19,9 +24,10 @@ class CollectPage extends StatelessWidget {

final _tabs = ['收藏集录','默认收藏', ];


@override
Widget build(BuildContext context) {
print('-------CollectPage-------build-------');

var _topContext = context;
return Scaffold(
backgroundColor: BlocProvider.of<HomeBloc>(context).state.homeColor.withAlpha(11),
Expand All @@ -43,9 +49,12 @@ class CollectPage extends StatelessWidget {
children: <Widget>[
CategoryPage(),
BlocBuilder<CollectBloc, CollectState>(
builder: (_, state) => CustomScrollView(
builder: (_, state) {
// print('-------BlocBuilder-------build-------');
return CustomScrollView(
slivers: <Widget>[_buildContent(context, state)],
)),
);
}),
],
),
),
Expand Down Expand Up @@ -136,4 +145,8 @@ class CollectPage extends StatelessWidget {
BlocProvider.of<DetailBloc>(context).add(FetchWidgetDetail(model));
Navigator.pushNamed(context, Router.widget_detail, arguments: model);
}

@override
// TODO: implement wantKeepAlive
bool get wantKeepAlive => true;
}
7 changes: 6 additions & 1 deletion lib/views/pages/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HomePage extends StatefulWidget {
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin{
ScrollController _ctrl;
double _limitY = 35;
double _height = kToolbarHeight * 2 - 20;
Expand All @@ -31,6 +31,7 @@ class _HomePageState extends State<HomePage> {

@override
Widget build(BuildContext context) {
print('-------HomePage-------build-------');
var color = BlocProvider.of<HomeBloc>(context).state.homeColor;
var showBg = BlocProvider.of<GlobalBloc>(context).state.showBackGround;
return Scaffold(
Expand Down Expand Up @@ -92,4 +93,8 @@ class _HomePageState extends State<HomePage> {
BlocProvider.of<DetailBloc>(context).add(FetchWidgetDetail(model));
Navigator.pushNamed(context, Router.widget_detail, arguments: model);
}

@override
// TODO: implement wantKeepAlive
bool get wantKeepAlive => true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ class _PlayBezier3PageState extends State<PlayBezier3Page> {
_pos.add(Offset(-120, -40));
}


@override
Widget build(BuildContext context) {
return Container(
height: 200,
width: MediaQuery.of(context).size.width,
child: CustomPaint(
painter: BezierPainter(pos: _pos, selectPos: selectPos),
),

return Container(
height: 200,
width: MediaQuery.of(context).size.width,
child: CustomPaint(
painter: BezierPainter(pos: _pos, selectPos: selectPos),
),
);
}
}
Expand Down Expand Up @@ -85,12 +83,12 @@ class BezierPainter extends CustomPainter {
_drawGrid(canvas, size); //绘制格线
_drawAxis(canvas, size); //绘制轴线

_mainPath.moveTo(pos[0].dx, pos[0].dy);
_mainPath.cubicTo(pos[1].dx, pos[1].dy, pos[2].dx, pos[2].dy, pos[3].dx, pos[3].dy);
canvas.drawPath(_mainPath, _mainPaint);
_drawHelp(canvas);
_drawSelectPos(canvas);

_mainPath.moveTo(pos[0].dx, pos[0].dy);
_mainPath.cubicTo(
pos[1].dx, pos[1].dy, pos[2].dx, pos[2].dy, pos[3].dx, pos[3].dy);
canvas.drawPath(_mainPath, _mainPaint);
_drawHelp(canvas);
_drawSelectPos(canvas);
}

@override
Expand Down Expand Up @@ -170,4 +168,4 @@ class BezierPainter extends CustomPainter {
..color = Colors.green
..strokeWidth = 2);
}
}
}