feature: Added LibMDK video player backend (#162)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-11-22 18:53:31 +01:00 committed by GitHub
parent 6e32018183
commit da354437e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 1499 additions and 1006 deletions

View file

@ -14,35 +14,43 @@ class FlatButton extends ConsumerWidget {
final Color? splashColor;
final double elevation;
final Clip clipBehavior;
const FlatButton(
{this.child,
this.onTap,
this.onLongPress,
this.onDoubleTap,
this.onSecondaryTapDown,
this.borderRadiusGeometry,
this.splashColor,
this.elevation = 0,
this.clipBehavior = Clip.none,
super.key});
const FlatButton({
this.child,
this.onTap,
this.onLongPress,
this.onDoubleTap,
this.onSecondaryTapDown,
this.borderRadiusGeometry,
this.splashColor,
this.elevation = 0,
this.clipBehavior = Clip.none,
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Material(
color: Colors.transparent,
clipBehavior: clipBehavior,
borderRadius: borderRadiusGeometry ?? FladderTheme.defaultShape.borderRadius,
elevation: 0,
child: InkWell(
onTap: onTap,
onLongPress: onLongPress,
onDoubleTap: onDoubleTap,
onSecondaryTapDown: onSecondaryTapDown,
borderRadius: borderRadiusGeometry ?? BorderRadius.circular(10),
splashColor: splashColor ?? Theme.of(context).colorScheme.primary.withOpacity(0.5),
splashFactory: InkSparkle.splashFactory,
child: child ?? Container(),
),
return Stack(
fit: StackFit.passthrough,
children: [
child ?? Container(),
Positioned.fill(
child: Material(
color: Colors.transparent,
clipBehavior: clipBehavior,
borderRadius: borderRadiusGeometry ?? FladderTheme.defaultShape.borderRadius,
elevation: 0,
child: InkWell(
onTap: onTap,
onLongPress: onLongPress,
onDoubleTap: onDoubleTap,
onSecondaryTapDown: onSecondaryTapDown,
borderRadius: borderRadiusGeometry ?? BorderRadius.circular(10),
splashColor: splashColor ?? Theme.of(context).colorScheme.primary.withOpacity(0.5),
splashFactory: InkSparkle.splashFactory,
),
),
),
],
);
}
}