diff --git a/lib/pages/chat_page.dart b/lib/pages/chat_page.dart index 16d6c99..e7e61a8 100644 --- a/lib/pages/chat_page.dart +++ b/lib/pages/chat_page.dart @@ -17,19 +17,31 @@ class ChatPage extends StatelessWidget { appBar: AppBar( title: const Text('Sydney Chat'), actions: [ + Obx(() => IconButton( + icon: const Icon(Icons.add_box_outlined), + onPressed: controller.isGenerating.value + ? null + : () { + controller.newConversation(); + Get.back(); + }, + )), + const SizedBox(width: 8), IconButton( - onPressed: () => Get.dialog(const SettingsDialog(), - barrierDismissible: false), - icon: const Icon(Icons.settings)) + icon: const Icon(Icons.settings), + onPressed: () => + Get.dialog(const SettingsDialog(), barrierDismissible: false), + ), + const SizedBox(width: 8) ], ), drawer: const ChatDrawer(), body: const Padding( - padding: EdgeInsets.all(16.0), + padding: EdgeInsets.all(16), child: Column( children: [ MessageList(), - SizedBox(height: 16.0), + SizedBox(height: 16), PromptInput(), ], ))); diff --git a/pubspec.lock b/pubspec.lock index 1a16517..9328d69 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -171,10 +171,10 @@ packages: dependency: transitive description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -635,26 +635,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.10+1" + version: "1.1.11+1" vector_math: dependency: transitive description: