show<T> static method
Future<T?>
show<T>(
- BuildContext context, {
- required Widget child,
- String? title,
- double width = 480,
Implementation
static Future<T?> show<T>(
BuildContext context, {
required Widget child,
String? title,
double width = 480,
}) {
return showGeneralDialog<T>(
context: context,
barrierDismissible: true,
barrierLabel: 'CLSheet',
barrierColor: Colors.black.withValues(alpha: 0.4),
transitionDuration: const Duration(milliseconds: 250),
pageBuilder: (context, animation, secondaryAnimation) =>
_CLSheetWidget(title: title, width: width, child: child),
transitionBuilder: (context, animation, secondaryAnimation, child) {
final offset = Tween<Offset>(
begin: const Offset(1.0, 0.0),
end: Offset.zero,
).animate(CurvedAnimation(parent: animation, curve: Curves.easeOut));
return SlideTransition(position: offset, child: child);
},
);
}