Commit f64b7c33 authored by 杜欣's avatar 杜欣

add activity

parent 2a6ef164
.DS_Store
.history
.dart_tool/
.packages
......
......@@ -37,20 +37,13 @@ class _AnimatedListSampleState extends State<AnimatedListSample> {
_listKey.currentState.insertItem(length, duration: Duration(milliseconds: seconds));
});
});
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: Text('${_list.length}')
),
body: new Padding(
return Padding(
padding: const EdgeInsets.all(16.0),
child: new AnimatedList(
key: _listKey,
initialItemCount: _list.length,
itemBuilder: _buildItem,
),
),
),
);
}
......@@ -69,14 +62,14 @@ class CardItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
TextStyle textStyle = Theme.of(context).textTheme.display1;
return new Padding(
return Padding(
padding: const EdgeInsets.all(2.0),
child: new SizeTransition(
child: SizeTransition(
axis: Axis.vertical,
sizeFactor: animation,
child:SizedBox(
child: SizedBox(
height: 100,
child: Text('Item ${item['b']}', style: textStyle),
child: Text('Item $item', style: textStyle),
)
)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment