FlutterTransferManager class final
Ready-to-use Android/iOS transfer manager with durable storage and native background engines.
- Mixed-in types
Constructors
- FlutterTransferManager.custom(TransferManager manager, TransferManagerPlatform _platform)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- manager → TransferManager
-
final
-
notificationTaps
→ Stream<
TransferNotificationTap> -
Notification taps for custom in-app routing.
no setter
-
platformCapabilities
→ Future<
PlatformTransferCapabilities> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
didChangeAccessibilityFeatures(
) → void -
Called when the system changes the set of currently active accessibility
features.
inherited
-
didChangeAppLifecycleState(
AppLifecycleState state) → void -
Called when the system puts the app in the background or returns
the app to the foreground.
override
-
didChangeLocales(
List< Locale> ? locales) → void -
Called when the system tells the app that the user's locale has
changed. For example, if the user changes the system language
settings.
inherited
-
didChangeMetrics(
) → void -
Called when the application's dimensions change. For example,
when a phone is rotated.
inherited
-
didChangePlatformBrightness(
) → void -
Called when the platform brightness changes.
inherited
-
didChangeTextScaleFactor(
) → void -
Called when the platform's text scale factor changes.
inherited
-
didChangeViewFocus(
ViewFocusEvent event) → void -
Called whenever the PlatformDispatcher receives a notification that the
focus state on a view has changed.
inherited
-
didHaveMemoryPressure(
) → void -
Called when the system is running low on memory.
inherited
-
didPopRoute(
) → Future< bool> -
Called when the system tells the app to pop the current route, such as
after a system back button press or back gesture.
inherited
-
didPushRoute(
String route) → Future< bool> -
Called when the host tells the application to push a new route onto the
navigator.
inherited
-
didPushRouteInformation(
RouteInformation routeInformation) → Future< bool> -
Called when the host tells the application to push a new
RouteInformation and a restoration state onto the router.
inherited
-
didRequestAppExit(
) → Future< AppExitResponse> -
Called when a request is received from the system to exit the application.
inherited
-
download(
Uri source, {required String fileName, TransferDestination? destination, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, ExistingFilePolicy existingFilePolicy = ExistingFilePolicy.replace}) → Future<TransferTask> - Queues a download with optional completion notification behavior.
-
handleCancelBackGesture(
) → void -
Called when a predictive back gesture is canceled, indicating that no
navigation should occur.
inherited
-
handleCommitBackGesture(
) → void -
Called when a predictive back gesture is finished successfully, indicating
that the current route should be popped.
inherited
-
handleStartBackGesture(
PredictiveBackEvent backEvent) → bool -
Called at the start of a predictive back gesture.
inherited
-
handleStatusBarTap(
) → void -
Called when the user taps the status bar on iOS, to scroll a scroll
view to the top.
inherited
-
handleUpdateBackGestureProgress(
PredictiveBackEvent backEvent) → void -
Called when a predictive back gesture moves.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notificationsEnabled(
) → Future< bool> -
pickAndUpload(
Uri destination, {String fieldName = 'file', String method = 'POST', List< String> ? allowedExtensions, List<String> ? allowedMimeTypes, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<TransferTask?> - Prompts the user to select a file using the system file picker and enqueues a multipart upload for the selected file.
-
pickAndUploadMedia(
Uri destination, {TransferMediaType mediaType = TransferMediaType.any, String fieldName = 'file', String method = 'POST', UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<TransferTask?> - Prompts the user to select a media file (photo/video) using the system photo picker and enqueues a multipart upload for the selected file.
-
pickAndUploadMediaTus(
Uri endpoint, {TransferMediaType mediaType = TransferMediaType.any, int chunkSize = 5 * 1024 * 1024, Map< String, String> metadata = const {}, String? authScope, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy}) → Future<TransferTask?> - Prompts the user to select a media file (photo/video) using the system photo picker and enqueues a resumable TUS 1.0 upload for the selected file.
-
pickAndUploadMultipleFiles(
Uri destination, {String fieldName = 'file', String method = 'POST', List< String> ? allowedExtensions, List<String> ? allowedMimeTypes, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<List< TransferTask> > - Prompts the user to select one or more files using the system file picker and enqueues multipart uploads for all selected files.
-
pickAndUploadMultipleFilesTus(
Uri endpoint, {List< String> ? allowedExtensions, List<String> ? allowedMimeTypes, int chunkSize = 5 * 1024 * 1024, Map<String, String> metadata = const {}, String? authScope, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy}) → Future<List< TransferTask> > - Prompts the user to select one or more files using the system file picker and enqueues resumable TUS 1.0 uploads for all selected files.
-
pickAndUploadMultipleImages(
Uri destination, {int? maxItems, String fieldName = 'file', String method = 'POST', UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<List< TransferTask> > - Convenience method to pick multiple photos/images and enqueue multipart uploads.
-
pickAndUploadMultipleMedia(
Uri destination, {TransferMediaType mediaType = TransferMediaType.any, int? maxItems, String fieldName = 'file', String method = 'POST', UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<List< TransferTask> > - Prompts the user to select one or more media files (photos/videos) using the system photo picker and enqueues multipart uploads for all selected files.
-
pickAndUploadMultipleMediaTus(
Uri endpoint, {TransferMediaType mediaType = TransferMediaType.any, int? maxItems, int chunkSize = 5 * 1024 * 1024, Map< String, String> metadata = const {}, String? authScope, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy}) → Future<List< TransferTask> > - Prompts the user to select one or more media files (photos/videos) using the system photo picker and enqueues resumable TUS 1.0 uploads for all selected files.
-
pickAndUploadMultipleVideos(
Uri destination, {int? maxItems, String fieldName = 'file', String method = 'POST', UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<List< TransferTask> > - Convenience method to pick multiple videos and enqueue multipart uploads.
-
pickAndUploadTus(
Uri endpoint, {List< String> ? allowedExtensions, List<String> ? allowedMimeTypes, int chunkSize = 5 * 1024 * 1024, Map<String, String> metadata = const {}, String? authScope, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.copyToManagedStorage, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy}) → Future<TransferTask?> - Prompts the user to select a file using the system file picker and enqueues a resumable TUS 1.0 upload for the selected file.
-
pickFile(
{List< String> ? allowedExtensions, List<String> ? allowedMimeTypes}) → Future<TransferPickedFile?> - Prompts the user to select a single file using the system file picker.
-
pickFiles(
{List< String> ? allowedExtensions, List<String> ? allowedMimeTypes, bool allowMultiple = true}) → Future<List< TransferPickedFile> > - Prompts the user to select one or more files using the system file picker.
-
pickImage(
) → Future< TransferPickedFile?> - Convenience method to prompt the user to select a single photo/image.
-
pickMedia(
{TransferMediaType mediaType = TransferMediaType.any}) → Future< TransferPickedFile?> - Prompts the user to select a single photo or video using the system photo picker.
-
pickMultipleImages(
{int? maxItems}) → Future< List< TransferPickedFile> > - Convenience method to prompt the user to select multiple photos/images.
-
pickMultipleMedia(
{TransferMediaType mediaType = TransferMediaType.any, int? maxItems}) → Future< List< TransferPickedFile> > - Prompts the user to select one or more photos or videos using the system photo picker.
-
pickMultipleVideos(
{int? maxItems}) → Future< List< TransferPickedFile> > - Convenience method to prompt the user to select multiple videos.
-
pickVideo(
) → Future< TransferPickedFile?> - Convenience method to prompt the user to select a single video.
-
requestNotificationPermission(
) → Future< bool> -
takeInitialNotificationTap(
) → Future< TransferNotificationTap?> - Returns the cold-start tap once, when manual handling is needed.
-
task(
String taskId) → TransferTask? -
tasks(
{Set< TransferState> ? states}) → Future<List< TransferTask> > -
toString(
) → String -
A string representation of this object.
inherited
-
upload(
Uri destination, {required String sourcePath, String fieldName = 'file', String method = 'POST', UploadSourcePolicy sourcePolicy = UploadSourcePolicy.reference, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map< String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy, Checksum? checksum, String? expectedChecksum}) → Future<TransferTask> - Queues a multipart upload with optional notification behavior.
-
uploadTus(
Uri endpoint, {required String sourcePath, int chunkSize = 5 * 1024 * 1024, Map< String, String> metadata = const {}, String? authScope, UploadSourcePolicy sourcePolicy = UploadSourcePolicy.reference, bool showNotification = true, NotificationOpenType openFromNotification = NotificationOpenType.open, bool showLiveActivity = false, LiveActivityStyle liveActivityStyle = LiveActivityStyle.system, bool allowPauseFromLiveActivity = true, bool allowCancelFromLiveActivity = true, TransferNotification? notification, Map<String, String> headers = const {}, NetworkPolicy? networkPolicy, RetryPolicy? retryPolicy}) → Future<TransferTask> - Queues a resumable TUS 1.0 upload with optional notification behavior.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{TransferConfiguration configuration = const TransferConfiguration(), TransferAuthProvider? authProvider, bool requestNotificationPermission = false}) → Future< FlutterTransferManager>