mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: move changelog into app item custom card (#294)
This commit is contained in:
parent
6ac901f1d6
commit
6d1427e01e
@ -50,7 +50,16 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ExpandableController expController = ExpandableController();
|
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,
|
controller: expController,
|
||||||
theme: const ExpandableThemeData(
|
theme: const ExpandableThemeData(
|
||||||
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
@ -60,16 +69,7 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
hasIcon: false,
|
hasIcon: false,
|
||||||
animationDuration: Duration(milliseconds: 450),
|
animationDuration: Duration(milliseconds: 450),
|
||||||
),
|
),
|
||||||
header: Padding(
|
header: Row(
|
||||||
padding: const EdgeInsets.only(bottom: 16.0),
|
|
||||||
child: CustomCard(
|
|
||||||
onTap: () {
|
|
||||||
expController.toggle();
|
|
||||||
_animationController.isCompleted
|
|
||||||
? _animationController.reverse()
|
|
||||||
: _animationController.forward();
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40,
|
width: 40,
|
||||||
@ -82,8 +82,8 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
widget.name.length > 9
|
widget.name.length > 12
|
||||||
? '${widget.name.substring(0, 9)}...'
|
? '${widget.name.substring(0, 12)}...'
|
||||||
: widget.name,
|
: widget.name,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -96,13 +96,14 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
RotationTransition(
|
RotationTransition(
|
||||||
turns:
|
turns: Tween(begin: 0.0, end: 0.50)
|
||||||
Tween(begin: 0.0, end: 0.50).animate(_animationController),
|
.animate(_animationController),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
child: Icon(Icons.arrow_drop_down),
|
child: Icon(Icons.arrow_drop_down),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
@ -117,11 +118,9 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
collapsed: const SizedBox(),
|
collapsed: const SizedBox(),
|
||||||
expanded: Padding(
|
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(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -137,6 +136,8 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user