@@ -5,13 +5,15 @@ import 'package:flutter/material.dart';
5
5
6
6
class MyApp extends StatelessWidget {
7
7
const MyApp ({super .key});
8
+ static const _appTitle = 'GenUI Example' ;
8
9
9
10
@override
10
11
Widget build (BuildContext context) {
11
12
return MaterialApp (
12
- title: 'GenUI Example' ,
13
+ debugShowCheckedModeBanner: false ,
14
+ title: _appTitle,
13
15
theme: ThemeData (
14
- colorScheme: ColorScheme .fromSeed (seedColor: Colors .white ),
16
+ colorScheme: ColorScheme .fromSeed (seedColor: Colors .deepPurple ),
15
17
),
16
18
home: const _MyHomePage (),
17
19
);
@@ -32,9 +34,27 @@ class _MyHomePageState extends State<_MyHomePage> {
32
34
33
35
@override
34
36
Widget build (BuildContext context) {
35
- return GenUi .invitation (
36
- initialPrompt: 'Invite user to create a vacation travel itinerary.' ,
37
- controller: _controller,
37
+ return Scaffold (
38
+ appBar: AppBar (
39
+ leading: Icon (Icons .menu),
40
+ title: Row (
41
+ children: const < Widget > [
42
+ Icon (Icons .chat_bubble_outline),
43
+ SizedBox (width: 8.0 ), // Add spacing between icon and text
44
+ Text ('Chat' ),
45
+ ],
46
+ ),
47
+ actions: [Icon (Icons .person_outline), SizedBox (width: 8.0 )],
48
+ ),
49
+ body: Padding (
50
+ padding: const EdgeInsets .all (16.0 ),
51
+ child: Center (
52
+ child: GenUi .invitation (
53
+ initialPrompt: 'Invite user to create a vacation travel itinerary.' ,
54
+ controller: _controller,
55
+ ),
56
+ ),
57
+ ),
38
58
);
39
59
}
40
60
0 commit comments