flutter_emoji_gif_picker 0.1.6 copy "flutter_emoji_gif_picker: ^0.1.6" to clipboard
flutter_emoji_gif_picker: ^0.1.6 copied to clipboard

The same emoji-gif picker as whatsapp. Takes the same size as your keyboard(Mobile).

example/lib/main.dart

// ignore_for_file: deprecated_member_use

import 'package:flutter/material.dart';
// ignore: depend_on_referenced_packages
import 'package:flutter_emoji_gif_picker/flutter_emoji_gif_picker.dart';

void main() {
  EmojiGifPickerPanel.setup(
      giphyApiKey: "kPBosXOgMBPUQQLSlKXQbKFn7EU2sh6p", mode: Mode.light);
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      builder: (context, child) {
        return Stack(
          children: [
            child!,
            const EmojiGifMenuStack(),
          ],
        );
      },
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  TextEditingController controller = TextEditingController();
  @override
  Widget build(BuildContext context) {
    return WillPopScope(
        onWillPop: (() async {
          return EmojiGifPickerPanel.onWillPop();
        }),
        child: Scaffold(
            resizeToAvoidBottomInset: true,
            body: EmojiGifMenuLayout(
              child:
                  Row(mainAxisAlignment: MainAxisAlignment.center, children: [
                EmojiGifPickerIcon(
                  id: "1",
                  onGifSelected: (gif) {},
                  fromStack: false,
                  controller: controller,
                  viewEmoji: true,
                  viewGif: true,
                  icon: const Icon(Icons.emoji_emotions),
                ),
                EmojiGifPickerBuilder(
                  id: "1",
                  builder: ((isMenuOpened) {
                    return const SizedBox();
                  }),
                ),
                SizedBox(
                    width: MediaQuery.of(context).size.width * 0.6,
                    child: EmojiGifTextField(
                      id: "1",
                      decoration: InputDecoration(
                        enabledBorder: OutlineInputBorder(
                            borderSide: const BorderSide(color: Colors.black),
                            borderRadius: BorderRadius.circular(30)),
                        focusedBorder: OutlineInputBorder(
                            borderSide: const BorderSide(color: Colors.blue),
                            borderRadius: BorderRadius.circular(30)),
                      ),
                    )),
              ]),
            )));
  }
}
39
likes
120
pub points
85%
popularity

Publisher

verified publisherflutterway.net

The same emoji-gif picker as whatsapp. Takes the same size as your keyboard(Mobile).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

emoji_picker_flutter, flutter, flutter_keyboard_size, get, http, meta, platform_info

More

Packages that depend on flutter_emoji_gif_picker