flutter_shortener 0.1.3 flutter_shortener: ^0.1.3 copied to clipboard
A library for generating short links from multiple providers. Supported vendors:- Bit.ly
flutter_shortener #
A Library for generating short links. It provides methods to generate/update short links from multiple providers. Currently only supports Bit.ly.
More Providers Coming Soon...
Providers Supported #
- Bit.ly
- More Coming Soon
Bit.Ly Example #
try{
final shortener = BitLyShortener(
accessToken: "YOUR_TOKEN",
);
BitLyLinkData linkData=await shortener.generateShortLink(
longUrl: 'ANY_URL',
);
print(linkData.link);
}
on BitLyException catch(e){ //For handling BitLyException
print(e);
}
on Exception catch(e){ // For handling other Exceptions related to http package
print(e);
}