1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-20 00:35:17 +00:00

Get custom emojies from server

This commit is contained in:
2020-04-28 18:47:47 +02:00
parent c42fe7f806
commit 032b247080
7 changed files with 101 additions and 16 deletions

View File

@ -0,0 +1,17 @@
import 'package:comunic/lists/abstract_list.dart';
import 'package:comunic/models/custom_emoji.dart';
/// Custom emojies list
///
/// @author Pierre HUBERT
class CustomEmojiesList extends AbstractList<CustomEmoji> {
/// Serialize this list
List<Map<String, dynamic>> toSerializableList() =>
map((f) => f.toMap()).toList();
/// Un-serialize this list
static CustomEmojiesList fromSerializedList(List<dynamic> list) =>
CustomEmojiesList()
..addAll(list.map((f) => CustomEmoji.fromMap(f)).toList());
}