Skip to content

Commit

Permalink
Update Example
Browse files Browse the repository at this point in the history
  • Loading branch information
khubaib-zeepalm committed Aug 26, 2024
1 parent 99c58ec commit 0109b40
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 65 deletions.
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class _MyHomePageState extends State<MyHomePage> {
} else {
List<DocumentSnapshot> items = snapshot.data!.docs;
var messages =
items.map((i) => ChatMessage.fromJson(i.data()!)).toList();
items.map((i) => ChatMessage.fromJson(i.data()! as Map<String, dynamic>)).toList();
return DashChat(
key: _chatViewKey,
inverted: false,
Expand Down Expand Up @@ -190,7 +190,7 @@ class _MyHomePageState extends State<MyHomePage> {
icon: Icon(Icons.photo),
onPressed: () async {
final picker = ImagePicker();
PickedFile? result = await picker.getImage(
XFile? result = await picker.pickImage(
source: ImageSource.gallery,
imageQuality: 80,
maxHeight: 400,
Expand Down
Loading

0 comments on commit 0109b40

Please sign in to comment.