flutter_cohere 0.0.2 flutter_cohere: ^0.0.2 copied to clipboard
Flutter Cohere SDK. Cohere empowers every developer and enterprise to build amazing products and capture true business value with language AI.
import 'package:example/chat_screen.dart';
import 'package:example/generate_screen.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Flutter Cohere Demo')),
body: ListView(
children: <Widget>[
ListTile(
title: Text('Generate Screen'),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const GenerateScreen()),
);
},
),
ListTile(
title: Text('Chat Screen'),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ChatScreen()),
);
},
),
],
),
);
}
}