chatscreen 0.0.1+2

  • Readme
  • Changelog
  • Installing
  • 49

Chat Screen - Flutter #

This project only supports group chats for now. Open to contributions.

Available for

Screenshots #

IMPORTANT: Check github for screenshots

Demo 1

NOTE: Video player doesn't work on IOS Simulators

Set up for Parse Server #

  • Make sure you initialize Parse
await Parse().initialize(
        keyApplicationId,
        keyParseServerUrl
);
  • Make sure LiveQuery server is initialized
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);
  • Each user has a name or username

  • Profile picture - Feature in progress

How to open Group chat screen #

Navigator.push(
  context,
  MaterialPageRoute(
    builder: (context) => ChatScreen(
      messageProvider: ParseServerMessageProvider(
        "className",
        roomId,
      ),
      currentUserId: parseUser.objectId,
      currentUserName: parseUser.get("name"),
      currentUserProfilePicture: parseUser.get("profilePicture"),
    ),
  ),
);
  • Make sure you add the class names when you initialize ParseServer
var api = new ParseServer({

  // List of classes to support for query subscriptions
  liveQuery: {
    classNames: [
      "ForniteMessages",
      "PUBGMessages",
    ],
  },
});

Set up for Cloud firestore #

  • Make sure you initialize FirebaseApp
final FirebaseApp firebaseApp = await FirebaseApp.configure(
  name: 'projectName',
  options: FirebaseOptions(
    googleAppID: Platform.isIOS
        ? 'appIdForIOS'
        : 'appIdForAndroid',
    gcmSenderID: 'gcmSenderID',
    apiKey: 'apiKey',
    projectID: 'projectId',
    storageBucket: 'storageBucketUrl',
  ),
)
  • Make sure you add index for each class

Example index

  • Each user has a name or username

  • Profile picture - Feature in progress

How to open group chat #

Navigator.push(
  MaterialPageRoute(
    builder: (context) => ChatScreen(
      messageProvider: CloudFirestoreMessageProvider(
        "PUBGMessages",
        roomId,
        firebaseApp,
      ),

      currentUserId: userId,
      currentUserName: name,
      currentUserProfilePicture: profilePictureUrl,
    ),
  ),
);

A look at data under the hood #

  • In Parse Server

Example index

  • In cloud firestore

Example index

0.0.1 - 7 May 2020 #

  • Basic version
  • Send Text messages
  • Send photos
  • Send Videos
  • For Cloud firestore and Parse Server

0.0.1+1 #

  • Dependencies fixed

0.0.1+2 #

  • Health suggestions - FIXED
  • Document updated

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  chatscreen: ^0.0.1+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:chatscreen/chatscreen.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on Jul 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Android

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/image_message_bubble.dart that imports:
  • package:chatscreen/components/gallery_photo_wrapper.dart that imports:
  • package:cached_network_image/cached_network_image.dart that imports:
  • package:cached_network_image/src/image_provider/cached_network_image_provider.dart that imports:
  • package:cached_network_image/src/image_provider/_image_provider_io.dart that imports:
  • package:flutter_cache_manager/flutter_cache_manager.dart that imports:
  • package:flutter_cache_manager/src/cache_manager.dart that imports:
  • package:path_provider/path_provider.dart that imports:
  • package:path_provider_linux/path_provider_linux.dart that declares support for platforms: Linux

Package does not support Flutter platform Linux

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/video_message_bubble.dart that imports:
  • package:chatscreen/components/video_player_widget.dart that imports:
  • package:video_player/video_player.dart that declares support for platforms: Android, iOS, Web

Package does not support Flutter platform Web

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/image_message_bubble.dart that imports:
  • package:chatscreen/components/gallery_photo_wrapper.dart that imports:
  • package:cached_network_image/cached_network_image.dart that imports:
  • package:cached_network_image/src/image_provider/cached_network_image_provider.dart that imports:
  • package:cached_network_image/src/image_provider/_image_provider_web.dart that imports:
  • package:flutter_cache_manager/flutter_cache_manager.dart that imports:
  • package:flutter_cache_manager/src/web/web_helper.dart that imports:
  • package:flutter_cache_manager/src/cache_store.dart that imports:
  • package:sqflite/sqflite.dart that declares support for platforms: Android, iOS, macOS

Package does not support Flutter platform Windows

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/video_message_bubble.dart that imports:
  • package:chatscreen/components/video_player_widget.dart that imports:
  • package:video_player/video_player.dart that declares support for platforms: Android, iOS, Web

Package does not support Flutter platform iOS

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/image_message_bubble.dart that imports:
  • package:chatscreen/components/gallery_photo_wrapper.dart that imports:
  • package:cached_network_image/cached_network_image.dart that imports:
  • package:cached_network_image/src/image_provider/cached_network_image_provider.dart that imports:
  • package:cached_network_image/src/image_provider/_image_provider_io.dart that imports:
  • package:flutter_cache_manager/flutter_cache_manager.dart that imports:
  • package:flutter_cache_manager/src/cache_manager.dart that imports:
  • package:path_provider/path_provider.dart that imports:
  • package:path_provider_linux/path_provider_linux.dart that declares support for platforms: Linux

Package does not support Flutter platform macOS

Because:

  • package:chatscreen/chatscreen.dart that imports:
  • package:chatscreen/components/messagebubble/video_message_bubble.dart that imports:
  • package:chatscreen/components/video_player_widget.dart that imports:
  • package:video_player/video_player.dart that declares support for platforms: Android, iOS, Web

Package not compatible with SDK dart

Because:

  • chatscreen that is a package requiring null.

Health suggestions

Fix lib/components/add_attachment_sheet.dart. (-1.49 points)

Analysis of lib/components/add_attachment_sheet.dart reported 3 hints:

line 172 col 36: 'pickImage' is deprecated and shouldn't be used. Use imagePicker.getImage() method instead..

line 199 col 36: 'pickVideo' is deprecated and shouldn't be used. Use imagePicker.getVideo() method instead..

line 222 col 36: 'pickImage' is deprecated and shouldn't be used. Use imagePicker.getImage() method instead..

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and chatscreen.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cached_network_image ^2.1.0+1 2.2.0+1 2.3.0-rc
cloud_firestore ^0.13.5 0.13.7 0.14.0-dev.1
firebase_core ^0.4.4+3 0.4.5 0.5.0-dev.1
firebase_database ^3.1.5 3.1.6
firebase_storage ^3.1.5 3.1.6
flutter 0.0.0
flutter_icons ^1.0.0+1 1.1.0
image_picker ^0.6.4 0.6.7+4
parse_server_sdk ^1.0.26 1.0.26
permission_handler ^5.0.0+hotfix.3 5.0.1+1
photo_view ^0.9.1 0.9.2
pull_to_refresh ^1.5.8 1.6.0
shimmer ^1.1.0 1.1.1
uuid ^2.0.4 2.2.0
video_player ^0.10.8+1 0.10.11+2
video_thumbnail ^0.2.0 0.2.2
Transitive dependencies
async 2.4.2
charcode 1.1.3
clock 1.0.1
cloud_firestore_platform_interface 1.1.2 2.0.0-dev.1
cloud_firestore_web 0.1.1+2 0.2.0-dev.1
collection 1.14.12 1.14.13
connectivity 0.4.9
connectivity_for_web 0.3.0
connectivity_macos 0.1.0+3
connectivity_platform_interface 1.0.6
convert 2.1.1
crypto 2.1.5
devicelocale 0.2.3 0.3.1
file 5.2.1
firebase 7.3.0
firebase_core_platform_interface 1.0.4 2.0.0-dev.1
firebase_core_web 0.1.1+2 0.2.0-dev.1
flutter_cache_manager 1.4.1
flutter_plugin_android_lifecycle 1.0.8
flutter_web_plugins 0.0.0
http 0.12.1
http_parser 3.1.4
image_picker_platform_interface 1.1.0
intl 0.16.1
js 0.6.2
matcher 0.12.8
meta 1.1.8 1.2.2
package_info 0.4.1
path 1.7.0
path_provider 1.6.11
path_provider_linux 0.0.1+2
path_provider_macos 0.0.4+3
path_provider_platform_interface 1.0.2
pedantic 1.9.0 1.9.2
permission_handler_platform_interface 2.0.1
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
quiver 2.1.3
rxdart 0.24.1
sembast 2.4.7+4
shared_preferences 0.5.8
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_span 1.7.0
sqflite 1.3.1
sqflite_common 1.0.2+1
stack_trace 1.9.5
stream_channel 2.0.0
string_scanner 1.0.5
synchronized 2.2.0+1
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
video_player_platform_interface 2.0.2
video_player_web 0.1.3+2
web_socket_channel 1.1.0
xdg_directories 0.1.0
xxtea 2.0.3
Dev dependencies
flutter_test