emoji_picker 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 96

Flutter Emoji Keyboard #

pub package

A Flutter package that provides an Emoji Keyboard widget.

Key Features #

  • View and select 390 emojis
  • 6 categories
  • Optionally add keywords to recommend emojis
  • Material Design and Cupertino mode
  • Emojis that cannot be displayed are filtered out (Android Only)

Usage #

To use this plugin, add emoji_picker as dependency in your pubspec.yaml file.

Sample Usage #

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

void main() => runApp(MainApp());

class MainApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Flutter Emoji Picker Example",
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter Emoji Picker Example"),
        ),
        body: MainPage(),
      ),
    );
  }
}

class MainPage extends StatefulWidget {
  @override
  MainPageState createState() => new MainPageState();
}

class MainPageState extends State<MainPage> {
  @override
  Widget build(BuildContext context) {
    return EmojiPicker(
      rows: 3,
      columns: 7,
      recommendKeywords: ["racing", "horse"],
      numRecommended: 10,
      onEmojiSelected: (emoji, category) {
        print(emoji);
      },
    );
  }
}

See the example directory for the complete sample app.

[0.1.0] = 09/01/2020 #

  • Added documentation

[0.0.3] - 08/01/2020 #

  • Keyboard now removes emojis that aren't displayed correctly
  • Buffering placeholder while keyboard loads

[0.0.2] - 21/04/2019 #

  • Removed NeverScrollableScrollPhysics class
  • Improved scroll performance

[0.0.1] - 06/04/2019 #

  • View and select emojis
  • 6 categories
  • Optionally add keywords to recommend emojis
  • Material design and Cupertino mode

example/lib/main.dart

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

void main() => runApp(MainApp());

class MainApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Test",
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: Text("Emoji Picker Test"),
        ),
        body: MainPage(),
      ),
    );
  }

}

class MainPage extends StatefulWidget {

  @override
  MainPageState createState() => new MainPageState();

}

class MainPageState extends State<MainPage> {

  @override
  Widget build(BuildContext context) {


    return EmojiPicker(
      rows: 3,
      columns: 7,
      buttonMode: ButtonMode.MATERIAL,
      recommendKeywords: ["racing", "horse"],
      numRecommended: 10,
      onEmojiSelected: (emoji, category) {
        print(emoji);
      },
    );

  }

}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  emoji_picker: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:emoji_picker/emoji_picker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
93
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
96
Learn more about scoring.

We analyzed this package on Jul 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:emoji_picker/emoji_picker.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:emoji_picker/emoji_picker.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:emoji_picker/emoji_picker.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:emoji_picker/emoji_picker.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [emoji_picker] that is in a package requiring null.

Health suggestions

Fix lib/emoji_picker.dart. (-0.50 points)

Analysis of lib/emoji_picker.dart reported 1 hint:

line 49 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: EmojiPicker.columns, EmojiPicker.rows, EmojiPicker.selectedCategory, EmojiPicker.onEmojiSelected, EmojiPicker.bgColor, EmojiPicker.indicatorColor, EmojiPicker._defaultBgColor, EmojiPicker.recommendKeywords, EmojiPicker.numRecommended, EmojiPicker.noRecommendationsText, EmojiPicker.noRecommendationsStyle, EmojiPicker.noRecentsText, EmojiPicker.noRecentsStyle, EmojiPicker.categoryIcons, EmojiPicker.buttonMode

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
shared_preferences ^0.5.4+1 0.5.7+3
Transitive dependencies
collection 1.14.12 1.14.13
flutter_web_plugins 0.0.0
meta 1.1.8 1.2.1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test