fix: move changelog into app item custom card (#294)

This commit is contained in:
afn 2022-09-24 14:49:02 -04:00 committed by GitHub
parent 6ac901f1d6
commit 6d1427e01e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,16 @@ class _ApplicationItemState extends State<ApplicationItem>
@override
Widget build(BuildContext context) {
ExpandableController expController = ExpandableController();
return ExpandablePanel(
return Container(
margin: const EdgeInsets.only(bottom: 16.0),
child: CustomCard(
onTap: () {
expController.toggle();
_animationController.isCompleted
? _animationController.reverse()
: _animationController.forward();
},
child: ExpandablePanel(
controller: expController,
theme: const ExpandableThemeData(
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
@ -60,16 +69,7 @@ class _ApplicationItemState extends State<ApplicationItem>
hasIcon: false,
animationDuration: Duration(milliseconds: 450),
),
header: Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: CustomCard(
onTap: () {
expController.toggle();
_animationController.isCompleted
? _animationController.reverse()
: _animationController.forward();
},
child: Row(
header: Row(
children: <Widget>[
SizedBox(
width: 40,
@ -82,8 +82,8 @@ class _ApplicationItemState extends State<ApplicationItem>
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
widget.name.length > 9
? '${widget.name.substring(0, 9)}...'
widget.name.length > 12
? '${widget.name.substring(0, 12)}...'
: widget.name,
style: const TextStyle(
fontSize: 16,
@ -96,13 +96,14 @@ class _ApplicationItemState extends State<ApplicationItem>
),
const Spacer(),
RotationTransition(
turns:
Tween(begin: 0.0, end: 0.50).animate(_animationController),
turns: Tween(begin: 0.0, end: 0.50)
.animate(_animationController),
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.arrow_drop_down),
),
),
const SizedBox(width: 8),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
@ -117,11 +118,9 @@ class _ApplicationItemState extends State<ApplicationItem>
),
],
),
),
),
collapsed: const SizedBox(),
expanded: Padding(
padding: const EdgeInsets.all(16.0).copyWith(top: 0.0),
padding: const EdgeInsets.only(top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -137,6 +136,8 @@ class _ApplicationItemState extends State<ApplicationItem>
],
),
),
),
)
);
}
}