emoji_selector 0.0.6 copy "emoji_selector: ^0.0.6" to clipboard
emoji_selector: ^0.0.6 copied to clipboard

An Emoji picker component for Flutter with the latest set of emojis. The current version supports Emoji version 15.

example/lib/main.dart

import 'package:emoji_selector/emoji_selector.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      darkTheme: ThemeData(
        brightness: Brightness.dark,
        primaryColor: Colors.blue,
      ),
      themeMode: ThemeMode.system,
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  EmojiData? emojiData;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Emojis Selector Example'),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget>[
          Padding(
            padding: const EdgeInsets.only(top: 30),
            child: Text(
              emojiData?.id == null
                  ? 'No emoji selected'
                  : 'Selected Emoji: ${emojiData?.char}',
              style: const TextStyle(
                fontSize: 24,
              ),
            ),
          ),
          EmojiSelector(
            padding: const EdgeInsets.all(20),
            onSelected: (emoji) {
              setState(
                () {
                  emojiData = emoji;
                },
              );
            },
          ),
        ],
      ),
    );
  }
}
26
likes
140
pub points
84%
popularity

Publisher

unverified uploader

An Emoji picker component for Flutter with the latest set of emojis. The current version supports Emoji version 15.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on emoji_selector