From 8575261d3720fc182d810dc880a7dced2844e609 Mon Sep 17 00:00:00 2001 From: Andrew Brogdon Date: Tue, 14 May 2024 07:44:48 -0700 Subject: [PATCH] Adds missing READMEs to dynamic_theme, gemini_tasks (#2288) Adds `README.md` files to the dynamic_theme and gemini_tasks projects. Also removes a block of commented-out code from one of them. --- dynamic_theme/README.md | 21 +++++++++++++++++++++ dynamic_theme/lib/main.dart | 4 ---- gemini_tasks/README.md | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 dynamic_theme/README.md create mode 100644 gemini_tasks/README.md diff --git a/dynamic_theme/README.md b/dynamic_theme/README.md new file mode 100644 index 000000000..3d3b57cc6 --- /dev/null +++ b/dynamic_theme/README.md @@ -0,0 +1,21 @@ +# Flutter Dynamic Theme Sample + +A developer sample demonstrating how to call on-device Flutter APIs based on +output from the Gemini API. Allows the user to dynamically change font scale, +colors, and other theme properties inside a running app using natural language. + +## Goals + +* Show how to use the Gemini API for a chat session. +* Demonstrate how to use functions calls with the Gemini API. +* Show how to tie responses from Gemini to specific local API calls. + +## Questions/issues + +If you have a general question about any of the techniques you see in +the sample, Flutter's open source community is a great place to find answers. +You can find links to online and local groups at +[https://flutter.dev/community]! + +If you run into an issue with the sample itself, please file an issue +in the [main Flutter repo](https://github.com/flutter/flutter/issues). diff --git a/dynamic_theme/lib/main.dart b/dynamic_theme/lib/main.dart index f80110a3c..50f7f85d4 100644 --- a/dynamic_theme/lib/main.dart +++ b/dynamic_theme/lib/main.dart @@ -172,10 +172,6 @@ class _ExampleState extends State { loading.value = true; try { final prompt = StringBuffer(); - // prompt.writeln( - // 'If the following is not a question assume' - // 'it is a new task to be added:', - // ); prompt.writeln(message); final response = await callWithActions([Content.text(prompt.toString())]); if (response.text != null) { diff --git a/gemini_tasks/README.md b/gemini_tasks/README.md new file mode 100644 index 000000000..721710432 --- /dev/null +++ b/gemini_tasks/README.md @@ -0,0 +1,20 @@ +# Flutter Todo List Sample + +Developer sample written in Flutter demonstrating how to interact with a to-do +list in natural language using the Gemini API. + +## Goals + +* Show how to use the Gemini API for a chat session. +* Demonstrate how to use functions calls with the Gemini API. +* Show how to manage the state of a list using Gemini. + +## Questions/issues + +If you have a general question about any of the techniques you see in +the sample, Flutter's open source community is a great place to find answers. +You can find links to online and local groups at +[https://flutter.dev/community]! + +If you run into an issue with the sample itself, please file an issue +in the [main Flutter repo](https://github.com/flutter/samples/issues).