2022-09-01 12:16:14 +02:00
|
|
|
import 'package:animations/animations.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class OpenContainerWrapper extends StatelessWidget {
|
|
|
|
const OpenContainerWrapper({
|
2023-11-11 13:07:32 +01:00
|
|
|
super.key,
|
2022-09-01 12:16:14 +02:00
|
|
|
required this.openBuilder,
|
|
|
|
required this.closedBuilder,
|
2023-11-11 13:07:32 +01:00
|
|
|
});
|
2023-01-30 13:35:06 +01:00
|
|
|
final OpenContainerBuilder openBuilder;
|
|
|
|
final CloseContainerBuilder closedBuilder;
|
2022-09-01 12:16:14 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return OpenContainer(
|
|
|
|
openBuilder: openBuilder,
|
|
|
|
closedBuilder: closedBuilder,
|
|
|
|
transitionDuration: const Duration(milliseconds: 400),
|
|
|
|
openColor: Theme.of(context).colorScheme.primary,
|
|
|
|
closedColor: Colors.transparent,
|
|
|
|
closedShape: RoundedRectangleBorder(
|
2022-09-05 04:32:36 +02:00
|
|
|
borderRadius: BorderRadius.circular(16),
|
2022-09-01 12:16:14 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|