mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-15 02:05:58 -07:00
feat: Sync offline/online playback when able (#431)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
15ac3566e2
commit
092836328f
42 changed files with 1002 additions and 497 deletions
24
lib/widgets/shared/animated_visibility.dart
Normal file
24
lib/widgets/shared/animated_visibility.dart
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedVisibility extends StatelessWidget {
|
||||
final Widget? child;
|
||||
final bool visible;
|
||||
final Duration duration;
|
||||
const AnimatedVisibility(
|
||||
{required this.child, required this.visible, this.duration = const Duration(milliseconds: 250), super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedOpacity(
|
||||
duration: duration,
|
||||
opacity: visible ? 1 : 0,
|
||||
child: IgnorePointer(
|
||||
ignoring: !visible,
|
||||
child: SizedBox(
|
||||
height: visible ? null : 16,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue