mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 09:07:47 +01:00
fix: move changelog into app item custom card (#294)
This commit is contained in:
parent
6ac901f1d6
commit
6d1427e01e
1 changed files with 82 additions and 81 deletions
|
@ -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>
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue