selfprivacy.org.app/lib/utils/show_jobs_modal.dart
Inex Code a490f5391b refactor: Unify calls to show jobs modal sheets
Also open a jobs modal sheet when starting nix collect garbage

Closes #541
2024-08-14 07:53:02 +03:00

20 lines
623 B
Dart

import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/components/jobs_content/jobs_content.dart';
Future<T?> showModalJobsSheet<T>({
required final BuildContext context,
}) =>
showModalBottomSheet<T>(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (final BuildContext context) => DraggableScrollableSheet(
expand: false,
maxChildSize: 0.9,
minChildSize: 0.4,
initialChildSize: 0.6,
builder: (final context, final scrollController) =>
JobsContent(controller: scrollController),
),
);