full_chat 0.0.3 full_chat: ^0.0.3 copied to clipboard
This package provides a catalog of widgets ready to create a chat, and allows a high level of customization.
import 'package:flutter/material.dart';
import 'package:full_chat/full_chat.dart';
main()async{
runApp(const MyApp());
}
class MyApp extends StatefulWidget{
const MyApp({super.key});
@override
State<MyApp> createState() => MyAppState();
}
class MyAppState extends State<MyApp>{
TextEditingController controller = TextEditingController();
@override
Widget build(BuildContext context){
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Full Chat',
home: Scaffold(
body: FullChat(
appBar: PreferredSize(
preferredSize: const Size(double.infinity, 35),
child: AppBar(
backgroundColor: Colors.grey.withOpacity(0.2)
)
),
leadingWidget: IconButton(
icon: Icon(Icons.add, color: Colors.blue[400]),
onPressed: ()=>print("add"),
),
inputController: controller,
trailingWidget: Row(
children: [
SizedBox(
width:40,
height:40,
child: IconButton(
icon: Icon(Icons.camera_alt,color: Colors.blue[400],),
onPressed: ()=>print("camera"),
),
),
Container(
margin: const EdgeInsets.only(left: 5),
width:40,
height:40,
child: IconButton(
icon: Icon(Icons.mic, color: Colors.blue[400],),
onPressed: ()=>print("mic"),
),
),],
),
),
),
);
}
}