show static method

Future<void> show(
  1. BuildContext context, {
  2. required FeatureRequestItem item,
  3. ValueChanged<FeatureRequestItem>? onVoteChange,
})

Implementation

static Future<void> show(
  BuildContext context, {
  required FeatureRequestItem item,
  ValueChanged<FeatureRequestItem>? onVoteChange,
}) {
  final client = CupThreadTheme.clientOf(context);
  final token = CupThreadTheme.userTokenOf(context);

  return showModalBottomSheet(
    context: context,
    isScrollControlled: true,
    backgroundColor: Colors.transparent,
    builder: (ctx) => CupThreadTheme(
      client: client,
      userToken: token,
      child: DraggableScrollableSheet(
        initialChildSize: 0.85,
        minChildSize: 0.5,
        maxChildSize: 0.95,
        builder: (sheetCtx, scrollController) => Container(
          decoration: BoxDecoration(
            color: CupThreadTheme.of(sheetCtx).background,
            borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
          ),
          child: FeatureRequestDetailSheet(
            item: item,
            onVoteChange: onVoteChange,
          ),
        ),
      ),
    ),
  );
}