slangit_ragaas 1.0.6
slangit_ragaas: ^1.0.6 copied to clipboard
Slangit RAG as a service
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:slangit_ragaas/slangit_ragaas.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(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: Scaffold(
floatingActionButton: SlangitConversation(
spaceId: 0,
token: "",
theme: ThemeData(
progressIndicatorTheme: const ProgressIndicatorThemeData(
color: Color(0xFF008182),
),
colorScheme: ColorScheme.fromSeed(
primary: const Color(0xFF008182),
surface: const Color(0xFF008182),
onSurface: Colors.white,
seedColor: const Color(0xFF008182),
),
switchTheme: SwitchThemeData(
trackColor: MaterialStateProperty.all(const Color(0xFF008182)),
thumbColor: MaterialStateProperty.all(Colors.white),
),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
backgroundColor: Color(0xFF008182),
foregroundColor: Colors.white,
),
textTheme: const TextTheme(
bodyLarge: TextStyle(
color: Color(0xFF008182),
fontSize: 20,
fontWeight: FontWeight.bold,
),
bodyMedium: TextStyle(
color: Color(0xFF008182),
fontSize: 16,
fontWeight: FontWeight.normal,
),
),
useMaterial3: true,
),
),
body: Center(
child: Column(
children: const [
Text('Hello'),
],
),
),
),
);
}
}