release 1.0.1
This commit is contained in:
parent
3e889ea960
commit
b7d0775b0b
6 changed files with 23 additions and 14 deletions
|
|
@ -5,3 +5,7 @@ Initial release
|
|||
## 1.0.0+1
|
||||
|
||||
Fixup readme
|
||||
|
||||
## 1.0.1
|
||||
|
||||
Remove dependency on `fast_immutable_collections` for users
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class EmojiController extends AsyncNotifier<IList<EmojiCategory>> {
|
|||
(entry) => .new(
|
||||
icon: entry.value.first.emoji.widget,
|
||||
name: entry.key,
|
||||
emojis: .new(entry.value.map((e) => e.emoji)),
|
||||
emojis: entry.value.map((e) => e.emoji).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:material_emoji_picker/src/models/emoji.dart";
|
||||
import "package:flutter/widgets.dart";
|
||||
|
|
@ -8,5 +7,5 @@ part "emoji_category.freezed.dart";
|
|||
class EmojiCategory({
|
||||
required final Widget icon,
|
||||
required final String name,
|
||||
required final IList<Emoji> emojis,
|
||||
required final List<Emoji> emojis,
|
||||
}) with _$EmojiCategory;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ abstract mixin class $EmojiCategoryCopyWith<$Res> {
|
|||
factory $EmojiCategoryCopyWith(EmojiCategory value, $Res Function(EmojiCategory) _then) = _$EmojiCategoryCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
Widget icon, String name, IList<Emoji> emojis
|
||||
Widget icon, String name, List<Emoji> emojis
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ class _$EmojiCategoryCopyWithImpl<$Res>
|
|||
icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as Widget,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,emojis: null == emojis ? _self.emojis : emojis // ignore: cast_nullable_to_non_nullable
|
||||
as IList<Emoji>,
|
||||
as List<Emoji>,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -85,12 +85,18 @@ as IList<Emoji>,
|
|||
|
||||
|
||||
class _EmojiCategory extends EmojiCategory {
|
||||
_EmojiCategory({required this.icon, required this.name, required this.emojis}): super(icon: icon, name: name, emojis: emojis);
|
||||
_EmojiCategory({required this.icon, required this.name, required List<Emoji> emojis}): _emojis = emojis,super(icon: icon, name: name, emojis: emojis);
|
||||
|
||||
|
||||
@override final Widget icon;
|
||||
@override final String name;
|
||||
@override final IList<Emoji> emojis;
|
||||
final List<Emoji> _emojis;
|
||||
@override List<Emoji> get emojis {
|
||||
if (_emojis is EqualUnmodifiableListView) return _emojis;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_emojis);
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of EmojiCategory
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -102,13 +108,13 @@ _$EmojiCategoryCopyWith<_EmojiCategory> get copyWith => __$EmojiCategoryCopyWith
|
|||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EmojiCategory&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.name, name) || other.name == name)&&const DeepCollectionEquality().equals(other.emojis, emojis));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _EmojiCategory&&(identical(other.icon, icon) || other.icon == icon)&&(identical(other.name, name) || other.name == name)&&const DeepCollectionEquality().equals(other.emojis, _emojis));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hash(runtimeType,icon,name,const DeepCollectionEquality().hash(emojis));
|
||||
return Object.hash(runtimeType,icon,name,const DeepCollectionEquality().hash(_emojis));
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -124,7 +130,7 @@ abstract mixin class _$EmojiCategoryCopyWith<$Res> implements $EmojiCategoryCopy
|
|||
factory _$EmojiCategoryCopyWith(_EmojiCategory value, $Res Function(_EmojiCategory) _then) = __$EmojiCategoryCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
Widget icon, String name, IList<Emoji> emojis
|
||||
Widget icon, String name, List<Emoji> emojis
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -145,8 +151,8 @@ class __$EmojiCategoryCopyWithImpl<$Res>
|
|||
return _then(_EmojiCategory(
|
||||
icon: null == icon ? _self.icon : icon // ignore: cast_nullable_to_non_nullable
|
||||
as Widget,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String,emojis: null == emojis ? _self.emojis : emojis // ignore: cast_nullable_to_non_nullable
|
||||
as IList<Emoji>,
|
||||
as String,emojis: null == emojis ? _self._emojis : emojis // ignore: cast_nullable_to_non_nullable
|
||||
as List<Emoji>,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ final class const EmojiPicker({
|
|||
) ||
|
||||
emoji.tags.join().contains(search.value),
|
||||
)
|
||||
.toIList();
|
||||
.toList();
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: material_emoji_picker
|
||||
description: A generic but configurable emoji picker for Flutter
|
||||
version: 1.0.0+1
|
||||
version: 1.0.1
|
||||
repository: https://git.federated.nexus/Henry-Hiles/material_emoji_picker
|
||||
issue_tracker: https://git.federated.nexus/Henry-Hiles/material_emoji_picker/issues
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue