esysberlin / esys-flutter-share

A Flutter plugin for sharing files & text with other applications.
Apache License 2.0
130 stars 147 forks source link

Return result after the share action is completed. #71

Open Ashotjlavyan opened 4 years ago

Ashotjlavyan commented 4 years ago

Is it possible add completion for share action? In iOS must be set completionWithItemsHandler for a ActivityViewController

    activityViewController.completionWithItemsHandler = ^(NSString *activityType,
                                                          BOOL completed,
                                                          NSArray *returnedItems,
                                                          NSError *error) {

        if (error) {
            result(@-2);
        } else if (completed) {
            // user shared an item
            result(@0);
        } else {
            // user cancelled
            result(@-1);
        }
    };