flyerhq / flutter_chat_types Goto Github PK
View Code? Open in Web Editor NEWUtility library for the flutter_chat_ui and flutter_firebase_chat_core libraries which contains shared type declarations.
License: MIT License
Utility library for the flutter_chat_ui and flutter_firebase_chat_core libraries which contains shared type declarations.
License: MIT License
In ImageMessage, is it possible to add the possibility of adding headers for the uri.
Indeed, I wish to retrieve images from an endpoint that requires authentication, which means i have to pass a header such as "Authorization: Bearer ".
Alternatively, is it possible to create an ImageMessage that takes a NetworkImage as an image (and not a path or an URI)?
Thank you very much,
i want a custome message type which can show lottie animations. but cannot find any example for introducing how to define a custom message. could anyone help?
Consider the code -
user = types.User(
id: Uuid().v4(),
firstName: "Test",
imageUrl: "https:// .... ",
);
updatedUser = user.copyWith(
lastSeen: DateTime.now()
);
The newUser contains only id and lastSeen fields. Other fields are null.
Expectation -
updatedUser should also contain all existing non-null fields from the previous User object
Hi,
I'm using your plugin and added some attributes to User and Room by extending them. However I can't do that now with the new update since the constructors are private. Only the factory constructor is available.
Br,
Rippan
Hello,
I am wondering if there is any file where each atribute is described. For example, I cannot find what an "agent" role for a room is.
Congratulations, good library, Thanks,
Pablo
We are evaluating using Flyer (it looks fantastic so far) for a project we are working on. I have one question about Message Types... I see that currently File, Image, and Text are supported. Can the Types be extended easily if we plan to add additional features and use our own backend? If so, is there a suggested way of doing this that will fall in line with future updates to the package?
Thanks for taking the time to answer this :)
writing custom types is a pain currently for me how can it do that can someone reference me please?
When copyWith is used on a Message Object, the roomId
gets set to null.
This seems to occur because of the way copyWith is implemented:
@override
Message copyWith({
User? author,
dynamic createdAt = _Unset,
String? id,
dynamic metadata = _Unset,
dynamic previewData = _Unset,
dynamic remoteId = _Unset,
dynamic repliedMessage = _Unset,
dynamic roomId,
dynamic showStatus = _Unset,
dynamic status = _Unset,
String? text,
dynamic updatedAt = _Unset,
}) => _TextMessage(
author: author ?? this.author,
createdAt: createdAt == _Unset ? this.createdAt : createdAt as int?,
id: id ?? this.id,
metadata: metadata == _Unset
? this.metadata
: metadata as Map<String, dynamic>?,
previewData: previewData == _Unset
? this.previewData
: previewData as PreviewData?,
remoteId: remoteId == _Unset ? this.remoteId : remoteId as String?,
repliedMessage: repliedMessage == _Unset
? this.repliedMessage
: repliedMessage as Message?,
roomId: roomId == _Unset ? this.roomId : roomId as String?,
showStatus:
showStatus == _Unset ? this.showStatus : showStatus as bool?,
status: status == _Unset ? this.status : status as Status?,
text: text ?? this.text,
updatedAt: updatedAt == _Unset ? this.updatedAt : updatedAt as int?,
);
When used, roomId is null and not _Unset. In that case it gets set to null.
roomId should not be set to null when copyWith is used.
Please specify the flutter, flutter-chat-ui versions.
flutter: 3.19.4
flutter-chat-ui: 1.6.12
All Platforms
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.