laraigo_chat

Last updated:

0 purchases

laraigo_chat Image
laraigo_chat Images
Add to Cart

Description:

laraigo chat

Laraigo Chat #
Flutter dependency that implements Laraigo's services.
Features #

Real time comunication
Online chat customization
Multimedia files picker
Share location
Multiple kinds of interactions (Text, Buttons, and Carousels)

Getting started #
You should ensure that you add the router as a dependency in your flutter project.
dependencies:
laraigo_chat: ^1.0.9+48
copied to clipboard
Like the project uses Geolocator for sharing location is necessary to add the corresponding permissions for it. Following the Geolocator guide
Also is necessary to add the MultiDex to your Android folder
multiDexEnabled true
copied to clipboard
Set the minSdk to 20
minsdk 20
copied to clipboard
And if you want to use the Google Maps functionality to show your maps when a location is shared, you need to specify your API key in the application manifest android/app/src/main/AndroidManifest.xml
<manifest ...
<application ...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR KEY HERE"/>
copied to clipboard
If you find a specific issue on integration related to Google Maps please review the Google Maps Flutter documentation for further assistance
You should then run flutter packages upgrade or update your packages in IntelliJ.
Example Project #
There is an example project in the example folder. Check it out. Otherwise, keep reading to get up and running.
Usage #
Need to include the import of the package to the dart file where it will be used, use the below command,
import 'package:laraigo_chat/socket_action_button.dart';
copied to clipboard
Custom Container
SocketContainer(
child: widget,
integrationId: "Your Integration Id",
customMessage: "Hola"),
copied to clipboard
Floating Action Button
floatingActionButton: SocketActionButton(
integrationId: 'Your Integration Id',
)
copied to clipboard
Elevated Button
SocketElevatedButton(
width: 80,
height: 80,
integrationId: "Your Integration Id",
child: Container(
width: 80,
height: 80,
padding: const EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: const [Icon(Icons.chat), Text("Soporte")]),
),
copied to clipboard
Floating Action Button
SocketTextButton(
customMessage: "Hola",
integrationId: "Your Integration Id",
child: const Text("Iniciar conversación"),
)
copied to clipboard
Complete example
import 'package:laraigo_chat/core/widget/socket_action_button.dart';
import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;

@override
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;

void _incrementCounter() {
setState(() {
_counter++;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: SocketActionButton(
integrationId: 'Your Integration Id',
));
}
}

copied to clipboard
Creditos: Lino Mac Kay y Jean Aguirre

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.