https://github.com/hadesptit/flutter_url_shortener
🍁🍁🍁 URL shortener built with Flutter using Bitly API service
https://github.com/hadesptit/flutter_url_shortener
bitly bitly-v4 flutter flutter-library pubdev url-shortener
Last synced: 2 months ago
JSON representation
🍁🍁🍁 URL shortener built with Flutter using Bitly API service
- Host: GitHub
- URL: https://github.com/hadesptit/flutter_url_shortener
- Owner: HadesPTIT
- License: mit
- Created: 2021-10-03T15:23:27.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-10-18T20:52:08.000Z (almost 4 years ago)
- Last Synced: 2025-02-27T04:24:15.543Z (8 months ago)
- Topics: bitly, bitly-v4, flutter, flutter-library, pubdev, url-shortener
- Language: Dart
- Homepage: https://pub.dev/packages/flutter_url_shortener
- Size: 67.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_url_shortener
A URL shortener built with Flutter using [Bitly API service](https://dev.bitly.com/api-reference)
## Getting Started
First, you need to register account and get token from [here](https://bitly.com/)
* 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.
~~~dart
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.
~~~dart
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
}
~~~