at_invitation_flutter 1.0.1
at_invitation_flutter: ^1.0.1 copied to clipboard

A Flutter package to invite contacts into apps that use @protocol.

Now for some internet optimism. #

at_invitation_flutter #

A Flutter package to share data and invite contacts using SMS or email to the @platform.

Getting Started #

This package can be used to generate the invite link with passcode and handle connecting the invitee to the inviter on the @platform. Please refer to documentation.

Sample usage #

It is expected that the app will first create an AtClientService instance and authenticate an atsign.

The invitation service needs to be initialised with the AtClientService instance, current atsign, a global navigator key and a url of web page to use for launching and redirection.

        navkey: scaffoldKey,
        atClientInstance: clientSdkService.atClientServiceInstance?.atClient,
        currentAtSign: activeAtSign,
        webPage: 'https://xxxx',
        rootDomain: MixedConstants.ROOT_DOMAIN);

The app also needs to handle deep links and handle incoming link with parameters. The uni_links package can be used for this.

Webpage requirements #

A webpage with app information like store links will be required. It also needs to have the javascript functions provided in this file. The function checkAndWriteCookie needs to be called on the onLoad event of the webpage.

Caveats #

  • This will not work if the the user disables cookies in browser.
  • In Android, Chrome browser does not support automatic redirection back to app. User will have to tap on the link at top of the page to return to the app.