An opinionated yet customizable Flutter package for searching and selecting from a list of GIFs/Stickers from the Tenor GIF search API.
Show some ❤️ and star the repo to support this package.
- In order to start using Tenor Flutter you must obtain an API key by registering your project with Tenor.
- Tenor requires proper attribution for projects using their API. This package enables "Powered By Tenor" and "Search Tenor" by default. You are only required to have one.
- Log in to the Google Cloud Console
- Create a new project
- Go to the Google Cloud Marketplace and find the Tenor API
- Click
Enable
to activate it - In the navigation menu, go to the
APIs & Services
tab and select Credentials - Click
+ Create Credentials
and chooseAPI key
- Copy the generated API key
- Provide this API key as a parameter to
Tenor(apiKey: 'YOUR_API_KEY')
flutter pub add tenor_flutter
Having trouble? Read the pub.dev installation page.
Import the package into the dart file where it will be used:
import 'package:tenor_flutter/tenor_flutter.dart';
You must pass in a valid apiKey
provided by Tenor. It's strongly recommended to also pass in a clientKey
as this will help you distinguish which project is making the requests.
final tenorClient = Tenor(apiKey: 'YOUR_API_KEY', clientKey: 'YOUR_PROJECT_NAME');
For more elaborate examples feel free to check out example/lib/main.dart.
Here's how to display the UI as a bottom sheet and then print the user's selection. If null
is returned, it means the user closed the sheet without choosing a GIF.
final tenorClient = Tenor(apiKey: 'YOUR_API_KEY', clientKey: 'YOUR_PROJECT_NAME');
final TenorResult? result = await tenorClient.showAsBottomSheet(context: context);
print(result?.media.tinygif?.url);
If you're seeking a solution that allows for full customization without the need of dependencies then consider Tenor Dart.
Flyclops is a independent mobile games studio specializing in casual multi-player games, both asynchronous turn-based, and real-time. Flyclops’s games have been played by millions across the globe. |
Domino! is super addictive, fast-paced, multiplayer dominoes done right for iOS and Android. This easy-to-learn but impossible-to-master strategy game is beautifully designed and endlessly entertaining! |
- Documentation
- Tests (Contributions welcome) ^_^
- Further improvements