dynamic chat bubbles implemented along with conversation support. currently only hard-coded dummy data.
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
import 'dart:convert';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Chat {
|
||||
final String content;
|
||||
final bool role;
|
||||
@@ -9,14 +5,5 @@ class Chat {
|
||||
// Most basic chat, text from server or from user.
|
||||
Chat(this.content, this.role);
|
||||
|
||||
String toJson() {
|
||||
Map<String, dynamic> c = {
|
||||
"content": content,
|
||||
"role": role,
|
||||
};
|
||||
|
||||
return json.encode(c);
|
||||
}
|
||||
|
||||
// TODO: Overload constructors to allow for multimedia.
|
||||
}
|
||||
Reference in New Issue
Block a user