ruut_flutter 0.0.2+patch ruut_flutter: ^0.0.2+patch copied to clipboard
The official Flutter SDK for Ruut Chat,this SDK provides developers with a seamless way to integrate the Ruut chat widget into their Flutter applications.
import 'package:ruut_flutter/ruut_flutter.dart';
import 'package:ruut_flutter/ui/ruut_home.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
fontFamily: "TTHoves-Pro",
primarySwatch: Colors.blue,
),
home: MyHomePage(
title: 'Flutter Demo Home Page',
),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({required this.title}) : super();
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return RuutChat(
inboxIdentifier: 'RoiUX1BCasL2igC45gsrpvNi',
blogUrl: "",
logoUrl:
"https://app.ruut.chat/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbklCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--55013a96eceb11d31a0f32f1437224376d16a3d1/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lKYW5CbFp3WTZCa1ZVT2hOeVpYTnBlbVZmZEc5ZlptbHNiRnNIYVFINk1BPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--5f3375fec9a9cd47682f6a1c0ccf7a892184cef2/Logo.jpeg",
theme: RuutChatTheme(
userAvatarNameColors: [Colors.black, Colors.white],
userNameTextStyle: TextStyle(color: Colors.black),
attachmentButtonIcon: Icon(Icons.image_outlined, color: Colors.grey),
primaryColor: Color(0xff9B6EE3),
secondaryColor: Colors.white,
backgroundColor: Colors.grey.shade100,
),
user: RuutUser(
identifier: "test@test.com",
name: "Tester test",
email: "test@test.com",
),
);
}
}