Visitar URL original
[animations] OpenContainer demo and polish by goderbauer · Pull Request #79 · flutter/packages · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create List item container demo
  • Loading branch information
shihaohong authored and goderbauer committed Feb 3, 2020
commit c802c26b904b06fd8f9708ecf6c9ff7d2b7ba8f9
17 changes: 16 additions & 1 deletion packages/animations/example/lib/container_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class _OpenContainerTransformDemoState extends State<OpenContainerTransformDemo>
),
],
),
const Padding(
const Padding(
padding: EdgeInsets.symmetric(vertical: 8.0),
),
Row(
Expand Down Expand Up @@ -111,6 +111,21 @@ const Padding(
),
],
),
...List<Widget>.generate(10, (int index) {
return _OpenContainerWrapper(
closedBuilder: (BuildContext context, VoidCallback openContainer) {
return ListTile(
leading: Image.asset(
'assets/avatar_logo.png',
width: 40,
),
onTap: openContainer,
title: Text('List item ${index + 1}'),
subtitle: const Text('Secondary text'),
);
},
);
}),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A catalog containing example animations from package:animations.
version: 0.0.1

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.3.0 <3.0.0"

dependencies:
flutter:
Expand Down