Commit 4af04766 authored by 杜欣's avatar 杜欣

ui update

parent c8bc2d44
......@@ -510,7 +510,7 @@ class _AnimationCharacterState extends State<AnimationCharacter>
AnimationController _animationController;
var _timer;
List peopleList;
double margin = 0;
double margin = 10;
@override
void initState() {
......@@ -548,7 +548,7 @@ class _AnimationCharacterState extends State<AnimationCharacter>
if (percent < frist) {
double tempPercent = percent / frist;
nowValue = (target * tempPercent).ceil();
margin = ScreenUtil().setWidth(6.0 + (29 * nowValue).ceil());
margin = ScreenUtil().setWidth(10.0 + (25.8 * nowValue).ceil());
if (index != nowValue) {
item['url'] = 'images/dark_grey_person.png';
} else {
......@@ -574,9 +574,14 @@ class _AnimationCharacterState extends State<AnimationCharacter>
}
Widget _peopleViewUI(BuildContext context, item) {
return IMAGE.Image.asset(item['url'],
var index = peopleList.indexOf(item);
return Container(
margin: index != 0 ? EdgeInsets.only(left: ScreenUtil().setWidth(12)) : EdgeInsets.all(0),
child: IMAGE.Image.asset(item['url'],
width: ScreenUtil().setWidth(item['width']),
height: ScreenUtil().setHeight(item['height']));
height: ScreenUtil().setHeight(item['height'])
)
);
}
@override
......@@ -588,7 +593,7 @@ class _AnimationCharacterState extends State<AnimationCharacter>
children: <Widget>[
_youContainer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: peopleList.map((item) {
return _peopleViewUI(context, item);
}).toList())
......
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