-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
43 lines (38 loc) · 1.39 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import 'package:cognigy_flutterchat/chat_widget/theme.dart';
import 'package:cognigy_flutterchat/chat_widget/widgets/chat.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// Import required files for Cognigy.AI connection
import 'package:flutter_simple_dependency_injection/injector.dart';
import 'package:cognigy_flutterchat/chat_widget/cognigy/app_initializer.dart';
import 'package:cognigy_flutterchat/chat_widget/cognigy/dependency_injection.dart';
// Create Injector
Injector injector;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
DependencyInjection().initialise(Injector.getInjector());
injector = Injector.getInjector();
await AppInitializer().initialise(injector);
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Cognigy.AI',
debugShowCheckedModeBanner: false,
theme: theme,
home: Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(5.0), // here the desired height
child: AppBar(
elevation: 0,
backgroundColor: Colors.transparent,
brightness: Brightness.light)),
// appBar: AppBar(elevation: 0, backgroundColor: Colors.white),
body: Chat(),
),
);
}
}