math correctly (#20368)

This commit is contained in:
Jonah Williams
2018-08-09 09:45:44 -07:00
committed by GitHub
parent e5432a2843
commit e4b989bf3d
2 changed files with 10 additions and 10 deletions

View File

@@ -31,17 +31,17 @@ class _AccountPictures extends StatelessWidget {
end: 0.0,
child: new Row(
children: (otherAccountsPictures ?? <Widget>[]).take(3).map((Widget picture) {
return new Container(
margin: const EdgeInsetsDirectional.only(start: 8.0),
width: 48.0,
height: 48.0,
return new Padding(
padding: const EdgeInsetsDirectional.only(start: 8.0),
child: new Semantics(
container: true,
child: new Padding(
child: new Container(
padding: const EdgeInsets.only(left: 8.0, bottom: 8.0),
width: 48.0,
height: 48.0,
child: picture,
padding: const EdgeInsets.all(4.0),
),
),
),
)
);
}).toList(),
),

View File

@@ -98,8 +98,8 @@ void main() {
expect(avatarATopLeft.dx - topLeft.dx, equals(16.0 + 10.0)); // left padding
expect(avatarATopLeft.dy - topLeft.dy, equals(16.0 + 20.0)); // add top padding
expect(topRight.dx - avatarDTopRight.dx, equals(16.0 + 34.0)); // right padding
expect(avatarDTopRight.dy - topRight.dy, equals(16.0 + 24.0)); // add top padding
expect(topRight.dx - avatarDTopRight.dx, equals(16.0 + 30.0)); // right padding
expect(avatarDTopRight.dy - topRight.dy, equals(16.0 + 20.0)); // add top padding
expect(avatarDTopRight.dx - avatarCTopRight.dx, equals(40.0 + 16.0)); // size + space between
});