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

ui update

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