showThreadStorageSaveSurface function
Future<void>
showThreadStorageSaveSurface(
- BuildContext context, {
- required RoomClient room,
- required String title,
- required String suggestedFileName,
- required String fileNameLabel,
- required ThreadStorageSaveContentType contentType,
- required Future<
FileContent> loadContent(), - String initialFolderPath = '',
- ThreadStorageSaveSurfacePresenter? mobilePresenter,
Implementation
Future<void> showThreadStorageSaveSurface(
BuildContext context, {
required RoomClient room,
required String title,
required String suggestedFileName,
required String fileNameLabel,
required ThreadStorageSaveContentType contentType,
required Future<FileContent> Function() loadContent,
String initialFolderPath = '',
ThreadStorageSaveSurfacePresenter? mobilePresenter,
}) async {
if (mobilePresenter != null) {
await mobilePresenter(
context,
ThreadStorageSaveSurfaceRequest(
room: room,
title: title,
suggestedFileName: suggestedFileName,
fileNameLabel: fileNameLabel,
contentType: contentType,
loadContent: loadContent,
initialFolderPath: initialFolderPath,
),
);
return;
}
if (_usesNativeMobileReactionFlowDialog(context)) {
await showModalBottomSheet<void>(
context: context,
backgroundColor: Colors.transparent,
isScrollControlled: true,
useSafeArea: false,
builder: (dialogContext) => _ThreadStorageSaveFlowDialog(
room: room,
title: title,
suggestedFileName: suggestedFileName,
fileNameLabel: fileNameLabel,
loadContent: loadContent,
),
);
return;
}
await showShadDialog<void>(
context: context,
builder: (dialogContext) => _ThreadStorageSaveDesktopDialog(
room: room,
title: title,
suggestedFileName: suggestedFileName,
fileNameLabel: fileNameLabel,
loadContent: loadContent,
),
);
}