mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-29 05:41:04 +00:00
fix: make inkwells visible (#205)
This commit is contained in:
@@ -61,6 +61,12 @@ class _ApplicationItemState extends State<ApplicationItem>
|
||||
animationDuration: Duration(milliseconds: 450),
|
||||
),
|
||||
header: CustomCard(
|
||||
onTap: () {
|
||||
expController.toggle();
|
||||
_animationController.isCompleted
|
||||
? _animationController.reverse()
|
||||
: _animationController.forward();
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
@@ -87,20 +93,11 @@ class _ApplicationItemState extends State<ApplicationItem>
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 5.0),
|
||||
child: RotationTransition(
|
||||
turns:
|
||||
Tween(begin: 0.0, end: 0.50).animate(_animationController),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
expController.toggle();
|
||||
_animationController.isCompleted
|
||||
? _animationController.reverse()
|
||||
: _animationController.forward();
|
||||
},
|
||||
icon: const Icon(Icons.arrow_drop_down),
|
||||
),
|
||||
RotationTransition(
|
||||
turns: Tween(begin: 0.0, end: 0.50).animate(_animationController),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Icon(Icons.arrow_drop_down),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
@@ -118,7 +115,7 @@ class _ApplicationItemState extends State<ApplicationItem>
|
||||
],
|
||||
),
|
||||
),
|
||||
collapsed: const Text(''),
|
||||
collapsed: const SizedBox(),
|
||||
expanded: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
|
||||
child: Column(
|
||||
|
||||
@@ -3,30 +3,33 @@ import 'package:flutter/material.dart';
|
||||
class CustomCard extends StatelessWidget {
|
||||
final bool isFilled;
|
||||
final Widget child;
|
||||
final Function()? onTap;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
|
||||
const CustomCard({
|
||||
Key? key,
|
||||
this.isFilled = true,
|
||||
required this.child,
|
||||
this.onTap,
|
||||
this.padding,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
return Material(
|
||||
type: isFilled ? MaterialType.card : MaterialType.transparency,
|
||||
color: isFilled
|
||||
? Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.4)
|
||||
: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: isFilled
|
||||
? Theme.of(context).colorScheme.secondaryContainer.withOpacity(0.40)
|
||||
: Colors.transparent,
|
||||
border: isFilled
|
||||
? null
|
||||
: Border.all(
|
||||
width: 1,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
child: Padding(
|
||||
padding: padding ?? const EdgeInsets.all(20.0),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user