show static method
Implementation
static Future<DateTime?> show(
BuildContext context, {
DateTime? initialDate,
DateTime? firstDate,
DateTime? lastDate,
String cancelText = 'Cancel',
String applyText = 'Apply',
String previousMonthTooltip = 'Previous month',
String nextMonthTooltip = 'Next month',
String barrierLabel = 'Dismiss',
}) async {
final fluffyTheme = context.fluffyTheme;
final pickedDate = await showGeneralDialog(
context: context,
barrierDismissible: true,
barrierLabel: barrierLabel,
barrierColor: FluffyColors.barrier,
transitionDuration: FluffyDurations.dialogTransition,
transitionBuilder: (context, anim1, anim2, child) {
return FadeTransition(
opacity: anim1,
child: ScaleTransition(
scale: Tween<double>(begin: 0.95, end: 1.0).animate(
CurvedAnimation(parent: anim1, curve: Curves.easeOutCubic),
),
child: child,
),
);
},
pageBuilder: (context, anim1, anim2) {
return FluffyTheme(
data: fluffyTheme,
child: _DatePickerDialog(
initialDate: initialDate,
firstDate: firstDate,
lastDate: lastDate,
cancelText: cancelText,
applyText: applyText,
previousMonthTooltip: previousMonthTooltip,
nextMonthTooltip: nextMonthTooltip,
),
);
},
);
return pickedDate is DateTime ? pickedDate : null;
}