Avatars class
The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.
Constructors
- Avatars.new(Client client)
- Initializes a Avatars service
Properties
Methods
-
getBrowser(
{required Browser code, int? width, int? height, int? quality}) → Future< Uint8List> - You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user GET /account/sessions endpoint. Use width, height and quality arguments to change the output settings.
-
getCreditCard(
{required CreditCard code, int? width, int? height, int? quality}) → Future< Uint8List> - The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.
-
getFavicon(
{required String url}) → Future< Uint8List> - Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
-
getFlag(
{required Flag code, int? width, int? height, int? quality}) → Future< Uint8List> - You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the ISO 3166-1 standard.
-
getImage(
{required String url, int? width, int? height}) → Future< Uint8List> - Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
-
getInitials(
{String? name, int? width, int? height, String? background}) → Future< Uint8List> - Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.
-
getQR(
{required String text, int? size, int? margin, bool? download}) → Future< Uint8List> - Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited