Skip to main content

install

  1. first you need to await v chat init in main.dart before runApp() method
WidgetsFlutterBinding.ensureInitialized();
await VChatController.instance.init(
baseUrl: Uri.parse("https://test.vchatsdk.com"),
appName: "test_v_chat",
vChatNotificationType: VChatNotificationType.none,
//widgetsBuilder: VChatCustomWidgets(),
enableLogger: true,
maxMediaUploadSize: 50 * 1000 * 1000,
passwordHashKey: "passwordHashKey",
maxGroupChatUsers: 512,
);
  1. baseUrl => your node js server ip
  2. appName => to save files in internal storage with this folder name internalStorage/documents/{appName}
  3. widgetsBuilder => set your custom widget by make class extends VChatWidgetBuilder and override the widgets you want to change
  4. vChatNotificationType => set to firebase if firebase supported in your country, and your project connected to firebase project set to none if you want to test onesignal not supported yet
  5. enableLogger => if true vchat will print the warning in console in release mode it will disable automatically
  6. maxMediaUploadSize =>(optional) to set max files in chat don't forget to update .env in server code also
  7. passwordHashKey => password hash Key it must be same in flutter and .env in backend code
  8. maxGroupChatUsers => set max group users count bigger number will need high server
  9. Example