flutter_giphy_picker 1.0.3 copy "flutter_giphy_picker: ^1.0.3" to clipboard
flutter_giphy_picker: ^1.0.3 copied to clipboard

A Flutter package for interacting with the Giphy API and a full-featured GIF picker UI, enabling seamless search and selection of GIFs, stickers, and emojis.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_giphy_picker/giphy_ui.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Giphy Test',
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: [
        Locale("en"),
        Locale("fr"),
      ],
      locale: Locale("fr"),
      home: Scaffold(
        body: TestApp(),
      ),
    );
  }
}

class TestApp extends StatefulWidget {
  const TestApp({super.key});

  @override
  State<TestApp> createState() => _TestApp();
}

class _TestApp extends State<TestApp> {
  GiphyResult? gifUrl;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Test Flutter Giphy'),
      ),
      body: Column(
        children: [
          if (gifUrl != null)
            Center(
              child: Image.network(
                gifUrl!.url,
                fit: BoxFit.contain,
              ),
            ),
          Center(
            child: TextButton(
              onPressed: () async {
                final config = GiphyUIConfig(
                  apiKey: "YOUR_API_KEY",
                );

                final result = await showGiphyPicker(
                  context,
                  config,
                );

                setState(() {
                  gifUrl = result;
                });
              },
              child: const Text("Open giphy UI"),
            ),
          ),
        ],
      ),
    );
  }
}
6
likes
0
points
85
downloads

Publisher

verified publisherpieteraerens.eu

Weekly Downloads

A Flutter package for interacting with the Giphy API and a full-featured GIF picker UI, enabling seamless search and selection of GIFs, stickers, and emojis.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_localizations, flutter_staggered_grid_view, focus_detector_v2, http, intl, shared_preferences

More

Packages that depend on flutter_giphy_picker