laraigo_chat 1.0.4+19 laraigo_chat: ^1.0.4+19 copied to clipboard
An easy flutter implementation of Laraigo's real time chat services with custom designed bots.
// ignore_for_file: prefer_final_fields
import 'package:flutter/material.dart';
import 'package:laraigo_chat/core/widget/socket_container.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;
@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.headlineMedium,
),
],
),
),
floatingActionButton: SocketContainer(
width: 100,
height: 80,
customMessage: "Hola",
circularProgressIndicatorColor: Colors.amber,
integrationId: '63d8224c5c8a9dde22652275',
child: Container(
decoration: BoxDecoration(
color: Colors.red, borderRadius: BorderRadius.circular(10)),
child: Material(
borderRadius: BorderRadius.circular(10),
elevation: 10,
child: Container(
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(10)),
child: Column(
children: const [Text("PRUEBA"), Icon(Icons.read_more)],
),
),
),
)));
}
}