mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +02:00
feat: finishup 4.0.0
This commit is contained in:
parent
d5b7183df5
commit
91420fde78
30 changed files with 25 additions and 82 deletions
2
.github/workflows/melos-ci.yml
vendored
2
.github/workflows/melos-ci.yml
vendored
|
@ -12,4 +12,4 @@ jobs:
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
with:
|
with:
|
||||||
subfolder: '.' # add optional subfolder to run workflow in
|
subfolder: '.' # add optional subfolder to run workflow in
|
||||||
flutter_version: 3.19.6
|
flutter_version: 3.24.3
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2022 Iconica, All rights reserved.
|
Copyright (c) 2024 Iconica, All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
## 0.0.1
|
|
||||||
|
|
||||||
* TODO: Describe initial release.
|
|
1
packages/chat_repository_interface/CHANGELOG.md
Symbolic link
1
packages/chat_repository_interface/CHANGELOG.md
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../CHANGELOG.md
|
|
@ -10,25 +10,25 @@ class LocalUserRepository implements UserRepositoryInterface {
|
||||||
BehaviorSubject<List<UserModel>>();
|
BehaviorSubject<List<UserModel>>();
|
||||||
|
|
||||||
final List<UserModel> _users = [
|
final List<UserModel> _users = [
|
||||||
UserModel(
|
const UserModel(
|
||||||
id: "1",
|
id: "1",
|
||||||
firstName: "John",
|
firstName: "John",
|
||||||
lastName: "Doe",
|
lastName: "Doe",
|
||||||
imageUrl: "https://picsum.photos/200/300",
|
imageUrl: "https://picsum.photos/200/300",
|
||||||
),
|
),
|
||||||
UserModel(
|
const UserModel(
|
||||||
id: "2",
|
id: "2",
|
||||||
firstName: "Jane",
|
firstName: "Jane",
|
||||||
lastName: "Doe",
|
lastName: "Doe",
|
||||||
imageUrl: "https://picsum.photos/200/300",
|
imageUrl: "https://picsum.photos/200/300",
|
||||||
),
|
),
|
||||||
UserModel(
|
const UserModel(
|
||||||
id: "3",
|
id: "3",
|
||||||
firstName: "Frans",
|
firstName: "Frans",
|
||||||
lastName: "Timmermans",
|
lastName: "Timmermans",
|
||||||
imageUrl: "https://picsum.photos/200/300",
|
imageUrl: "https://picsum.photos/200/300",
|
||||||
),
|
),
|
||||||
UserModel(
|
const UserModel(
|
||||||
id: "4",
|
id: "4",
|
||||||
firstName: "Hendrik-Jan",
|
firstName: "Hendrik-Jan",
|
||||||
lastName: "De derde",
|
lastName: "De derde",
|
||||||
|
|
|
@ -188,9 +188,8 @@ class ChatService {
|
||||||
/// Returns a [Stream] of [int].
|
/// Returns a [Stream] of [int].
|
||||||
Stream<int> getUnreadMessagesCount({
|
Stream<int> getUnreadMessagesCount({
|
||||||
required String userId,
|
required String userId,
|
||||||
}) {
|
}) =>
|
||||||
return chatRepository.getUnreadMessagesCount(userId: userId);
|
chatRepository.getUnreadMessagesCount(userId: userId);
|
||||||
}
|
|
||||||
|
|
||||||
/// Upload an image with the given parameters.
|
/// Upload an image with the given parameters.
|
||||||
/// [path] is the image path.
|
/// [path] is the image path.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: chat_repository_interface
|
name: chat_repository_interface
|
||||||
description: "A new Flutter package project."
|
description: "A new Flutter package project."
|
||||||
version: 1.0.0
|
version: 4.0.0
|
||||||
homepage: "https://github.com/Iconica-Development"
|
homepage: "https://github.com/Iconica-Development"
|
||||||
|
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub/
|
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub/
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
## 0.0.1
|
|
||||||
|
|
||||||
* TODO: Describe initial release.
|
|
1
packages/firebase_chat_repository/CHANGELOG.md
Symbolic link
1
packages/firebase_chat_repository/CHANGELOG.md
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../CHANGELOG.md
|
|
@ -1,2 +1,2 @@
|
||||||
export 'src/firebase_chat_repository.dart';
|
export "src/firebase_chat_repository.dart";
|
||||||
export 'src/firebase_user_repository.dart';
|
export "src/firebase_user_repository.dart";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: firebase_chat_repository
|
name: firebase_chat_repository
|
||||||
description: "A new Flutter package project."
|
description: "A new Flutter package project."
|
||||||
version: 1.0.0
|
version: 4.0.0
|
||||||
homepage: "https://github.com/Iconica-Development"
|
homepage: "https://github.com/Iconica-Development"
|
||||||
|
|
||||||
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub/
|
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub/
|
||||||
|
@ -15,7 +15,7 @@ dependencies:
|
||||||
|
|
||||||
chat_repository_interface:
|
chat_repository_interface:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
||||||
version: ^1.0.0
|
version: ^4.0.0
|
||||||
|
|
||||||
firebase_storage: any
|
firebase_storage: any
|
||||||
cloud_firestore: any
|
cloud_firestore: any
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
## 0.0.1
|
|
||||||
|
|
||||||
* TODO: Describe initial release.
|
|
|
@ -1 +0,0 @@
|
||||||
TODO: Add your license here.
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1,39 +0,0 @@
|
||||||
<!--
|
|
||||||
This README describes the package. If you publish this package to pub.dev,
|
|
||||||
this README's contents appear on the landing page for your package.
|
|
||||||
|
|
||||||
For information about how to write a good package README, see the guide for
|
|
||||||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
|
|
||||||
|
|
||||||
For general information about developing packages, see the Dart guide for
|
|
||||||
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
|
|
||||||
and the Flutter guide for
|
|
||||||
[developing packages and plugins](https://flutter.dev/developing-packages).
|
|
||||||
-->
|
|
||||||
|
|
||||||
TODO: Put a short description of the package here that helps potential users
|
|
||||||
know whether this package might be useful for them.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
TODO: List what your package can do. Maybe include images, gifs, or videos.
|
|
||||||
|
|
||||||
## Getting started
|
|
||||||
|
|
||||||
TODO: List prerequisites and provide or point to information on how to
|
|
||||||
start using the package.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
TODO: Include short and useful examples for package users. Add longer examples
|
|
||||||
to `/example` folder.
|
|
||||||
|
|
||||||
```dart
|
|
||||||
const like = 'sample';
|
|
||||||
```
|
|
||||||
|
|
||||||
## Additional information
|
|
||||||
|
|
||||||
TODO: Tell users more about the package: where to find more information, how to
|
|
||||||
contribute to the package, how to file issues, what response they can expect
|
|
||||||
from the package authors, and more.
|
|
|
@ -117,7 +117,9 @@ class _NavigatorWrapper extends StatelessWidget {
|
||||||
route(context, chatProfileScreen(context, user, null)),
|
route(context, chatProfileScreen(context, user, null)),
|
||||||
onUploadImage: (data) async {
|
onUploadImage: (data) async {
|
||||||
var path = await chatService.uploadImage(
|
var path = await chatService.uploadImage(
|
||||||
path: "chats/${chat.id}-$userId-${DateTime.now()}", image: data);
|
path: "chats/${chat.id}-$userId-${DateTime.now()}",
|
||||||
|
image: data,
|
||||||
|
);
|
||||||
|
|
||||||
await chatService.sendMessage(
|
await chatService.sendMessage(
|
||||||
messageId: "${chat.id}-$userId-${DateTime.now()}",
|
messageId: "${chat.id}-$userId-${DateTime.now()}",
|
||||||
|
@ -191,7 +193,9 @@ class _NavigatorWrapper extends StatelessWidget {
|
||||||
String? path;
|
String? path;
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
path = await chatService.uploadImage(
|
path = await chatService.uploadImage(
|
||||||
path: "groups/$title", image: image);
|
path: "groups/$title",
|
||||||
|
image: image,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
var chat = await createGroupChat(
|
var chat = await createGroupChat(
|
||||||
users,
|
users,
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ChatProfileScreen extends StatelessWidget {
|
||||||
|
|
||||||
return options.builders.baseScreenBuilder!.call(
|
return options.builders.baseScreenBuilder!.call(
|
||||||
context,
|
context,
|
||||||
this.mapScreenType,
|
mapScreenType,
|
||||||
_AppBar(
|
_AppBar(
|
||||||
user: userModel,
|
user: userModel,
|
||||||
chat: chatModel,
|
chat: chatModel,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class ChatScreen extends StatelessWidget {
|
||||||
|
|
||||||
return chatOptions.builders.baseScreenBuilder!.call(
|
return chatOptions.builders.baseScreenBuilder!.call(
|
||||||
context,
|
context,
|
||||||
this.mapScreenType,
|
mapScreenType,
|
||||||
_AppBar(
|
_AppBar(
|
||||||
userId: userId,
|
userId: userId,
|
||||||
chatOptions: chatOptions,
|
chatOptions: chatOptions,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class NewGroupChatOverview extends StatelessWidget {
|
||||||
|
|
||||||
return options.builders.baseScreenBuilder!.call(
|
return options.builders.baseScreenBuilder!.call(
|
||||||
context,
|
context,
|
||||||
this.mapScreenType,
|
mapScreenType,
|
||||||
_AppBar(
|
_AppBar(
|
||||||
options: options,
|
options: options,
|
||||||
),
|
),
|
||||||
|
|
|
@ -22,7 +22,7 @@ dependencies:
|
||||||
version: ^1.6.0
|
version: ^1.6.0
|
||||||
chat_repository_interface:
|
chat_repository_interface:
|
||||||
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
||||||
version: ^1.0.0
|
version: ^4.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../CHANGELOG.md
|
|
|
@ -1 +0,0 @@
|
||||||
../../LICENSE
|
|
|
@ -1 +0,0 @@
|
||||||
../../README.md
|
|
Loading…
Reference in a new issue