mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-10-29 17:24:50 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			767 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			767 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
| import 'package:flutter/material.dart';
 | |
| 
 | |
| /// Single custom emoji information
 | |
| ///
 | |
| /// @author Pierre Hubert
 | |
| 
 | |
| class CustomEmoji {
 | |
|   final int id;
 | |
|   final int userID;
 | |
|   final String shortcut;
 | |
|   final String url;
 | |
| 
 | |
|   const CustomEmoji({
 | |
|     @required this.id,
 | |
|     @required this.userID,
 | |
|     @required this.shortcut,
 | |
|     @required this.url,
 | |
|   })  : assert(id != null),
 | |
|         assert(userID != null),
 | |
|         assert(shortcut != null),
 | |
|         assert(url != null);
 | |
| 
 | |
|   Map<String, dynamic> toMap() => {
 | |
|         "id": id,
 | |
|         "userID": userID,
 | |
|         "shortcut": shortcut,
 | |
|         "url": url,
 | |
|       };
 | |
| 
 | |
|   CustomEmoji.fromMap(Map<String, dynamic> map)
 | |
|       : id = map["id"],
 | |
|         userID = map["userID"],
 | |
|         shortcut = map["shortcut"],
 | |
|         url = map["url"];
 | |
| }
 |