TinyUrlShortener class

class to work with TinyUrl links

Example to create a simple short link:--

try{
  final shortener = TinyUrlShortener(
    accessToken: "YOUR_TOKEN",
  );
  final linkData=await shortener.generateShortLink(longUrl: 'ANY_URL');
  print(linkData.shortUrl);
}
on TinyUrlException catch(e){ // For handling TinyUrlException
  print(e);
}

Check out official documentation for more info.

Constructors

TinyUrlShortener({required String accessToken, String? alias, String? domain, List<String>? tags})
class to work with TinyUrl links

Properties

accessToken String
Access Token is required and must not be null or empty
getter/setter pair
alias String?
Alias
getter/setter pair
domain String?
The domain you would like the TinyURL to use.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<String>?
A short string of characters to use in the TinyURL. If omitted, one will be randomly generated. When using a branded domain,
getter/setter pair

Methods

Official Documentation:- Create a new TinyUrl.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateLinkParameters(String? newDomain, String? newAlias, List<String>? newTags, bool? newStats) Future<TinyUrlLinkData>
Official Documentation:- Create a new TinyUrl.
Official Documentation:- Create a new TinyUrl.

Operators

operator ==(Object other) bool
The equality operator.
inherited