flutter_url_shortener 2.0.0 copy "flutter_url_shortener: ^2.0.0" to clipboard
flutter_url_shortener: ^2.0.0 copied to clipboard

This is a package that using bitly API service for generate shorten url. They could begin with the bit.ly domain or your own custom branded short domain (BSD)

flutter_url_shortener #

A URL shortener built with Flutter using Bitly API service

Getting Started #

First, you need to register account and get token from here

  • Converts a long url to a Bitlink.
  • Converts a long url to a Bitlink and sets additional parameters.

Example #

Converts a long url to a Bitlink and sets additional parameters.

try {
      FShort.instance
          .generateShortenURL(longUrl: 'https://www.google.com.vn/')
          .then((value) {
        setState(() {
          _shortenURL = value.link;
        });
      });
    } on BitlyException catch (e) {
      // TODO
    } on Exception catch (e) {
      // TODO
    }

Converts a long url to a Bitlink.

try {
      FShort.instance
          .createBitLink(
              params: BitlyParams(
        longUrl: "https://dev.bitly.com",
        domain: 'bit.ly',
        tags: ['ver1.1', 'ver1.2'],
        deeplinks: [
          DeeplinkParams(
            appId: 'com.hades.test',
            appUriPath: '/store?id=123456',
            installUrl:
                'https://play.google.com/store/apps/details?id=com.hades.test&hl=en_US',
            installType: 'promote_install',
          ),
        ],
      ))
          .then((value) {
        setState(() {
          _customURL = value.link;
        });
      });
    } on BitlyException catch (e) {
      // TODO
    } on Exception catch (e) {
      // TODO
    }
8
likes
130
pub points
83%
popularity

Publisher

unverified uploader

This is a package that using bitly API service for generate shorten url. They could begin with the bit.ly domain or your own custom branded short domain (BSD)

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_url_shortener