Unverified Commit e3cf62bc authored by Yegor's avatar Yegor Committed by GitHub

modernize corners & borders in animation demo (#13352)

parent fd7853fa
...@@ -216,12 +216,8 @@ class _AllSectionsLayout extends MultiChildLayoutDelegate { ...@@ -216,12 +216,8 @@ class _AllSectionsLayout extends MultiChildLayoutDelegate {
final Rect cardRect = _interpolateRect(columnCardRect, rowCardRect).shift(offset); final Rect cardRect = _interpolateRect(columnCardRect, rowCardRect).shift(offset);
final String cardId = 'card$index'; final String cardId = 'card$index';
if (hasChild(cardId)) { if (hasChild(cardId)) {
// Add a small horizontal gap between the cards. layoutChild(cardId, new BoxConstraints.tight(cardRect.size));
final Rect insetRect = new Rect.fromLTWH( positionChild(cardId, cardRect.topLeft);
cardRect.left + 0.5, cardRect.top, cardRect.width - 1.0, cardRect.height
);
layoutChild(cardId, new BoxConstraints.tight(insetRect.size));
positionChild(cardId, insetRect.topLeft);
} }
// Layout the title for index. // Layout the title for index.
...@@ -549,7 +545,7 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> { ...@@ -549,7 +545,7 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> {
final double screenHeight = mediaQueryData.size.height; final double screenHeight = mediaQueryData.size.height;
final double appBarMaxHeight = screenHeight - statusBarHeight; final double appBarMaxHeight = screenHeight - statusBarHeight;
// The scrolloffset that reveals the appBarMidHeight appbar. // The scroll offset that reveals the appBarMidHeight appbar.
final double appBarMidScrollOffset = statusBarHeight + appBarMaxHeight - _kAppBarMidHeight; final double appBarMidScrollOffset = statusBarHeight + appBarMaxHeight - _kAppBarMidHeight;
return new SizedBox.expand( return new SizedBox.expand(
......
...@@ -19,11 +19,8 @@ class SectionCard extends StatelessWidget { ...@@ -19,11 +19,8 @@ class SectionCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Padding( return new DecoratedBox(
padding: const EdgeInsets.only(bottom: 1.0),
child: new DecoratedBox(
decoration: new BoxDecoration( decoration: new BoxDecoration(
borderRadius: new BorderRadius.circular(4.0),
gradient: new LinearGradient( gradient: new LinearGradient(
begin: Alignment.centerLeft, begin: Alignment.centerLeft,
end: Alignment.centerRight, end: Alignment.centerRight,
...@@ -40,7 +37,6 @@ class SectionCard extends StatelessWidget { ...@@ -40,7 +37,6 @@ class SectionCard extends StatelessWidget {
colorBlendMode: BlendMode.modulate, colorBlendMode: BlendMode.modulate,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
),
); );
} }
} }
......
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