From ec2b01d2f9de26a951a2dc63bc784873aebc22d1 Mon Sep 17 00:00:00 2001 From: "redev.rx" Date: Wed, 25 Sep 2024 20:33:39 +0700 Subject: [PATCH] update sdk version --- .flutter-plugins-dependencies | 1 + example_app/openai_app/lib/screen/chatbot/chatbot.dart | 1 + example_app/openai_app/lib/screen/splash/loading_screen.dart | 1 + lib/chat_gpt_sdk.dart | 2 +- .../model/message/response/{ContentV2.dart => content_v2.dart} | 0 lib/src/model/message/response/create_message_v2_response.dart | 2 +- 6 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .flutter-plugins-dependencies rename lib/src/model/message/response/{ContentV2.dart => content_v2.dart} (100%) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..47b095e --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"/Users/redev.rx/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/redev.rx/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"/Users/redev.rx/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/redev.rx/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/redev.rx/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-09-25 20:31:58.039746","version":"3.24.3","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/example_app/openai_app/lib/screen/chatbot/chatbot.dart b/example_app/openai_app/lib/screen/chatbot/chatbot.dart index a26fd61..c4770ca 100644 --- a/example_app/openai_app/lib/screen/chatbot/chatbot.dart +++ b/example_app/openai_app/lib/screen/chatbot/chatbot.dart @@ -35,6 +35,7 @@ class _ChatBotScreenState extends State { ///setup openai sdk void initOpenAISDK() { Future.delayed(const Duration(milliseconds: 200), () { + if (!mounted) return; BlocProvider.of(context, listen: false).initOpenAISdk(); }); } diff --git a/example_app/openai_app/lib/screen/splash/loading_screen.dart b/example_app/openai_app/lib/screen/splash/loading_screen.dart index 06c2e90..ce7a112 100644 --- a/example_app/openai_app/lib/screen/splash/loading_screen.dart +++ b/example_app/openai_app/lib/screen/splash/loading_screen.dart @@ -16,6 +16,7 @@ class SplashScreen extends StatefulWidget { class _SplashScreenState extends State { void countDownTime({required BuildContext context}) { Future.delayed(const Duration(seconds: 3), () { + if (!context.mounted) return; BlocProvider.of(context, listen: false).isFirstSetting( success: () { ///navigate to preview screen diff --git a/lib/chat_gpt_sdk.dart b/lib/chat_gpt_sdk.dart index 8b164a3..8ecade8 100644 --- a/lib/chat_gpt_sdk.dart +++ b/lib/chat_gpt_sdk.dart @@ -72,6 +72,6 @@ export 'src/model/run/response/message_creation.dart'; export 'src/model/run/response/step_detail.dart'; export 'src/model/audio/request/speech_request.dart'; export 'src/model/audio/enum/audio_format.dart'; -export 'src/model/message/response/ContentV2.dart'; +export 'src/model/message/response/content_v2.dart'; export 'src/model/message/response/create_message_v2_response.dart'; export 'src/model/message/response/message_data_response.dart'; diff --git a/lib/src/model/message/response/ContentV2.dart b/lib/src/model/message/response/content_v2.dart similarity index 100% rename from lib/src/model/message/response/ContentV2.dart rename to lib/src/model/message/response/content_v2.dart diff --git a/lib/src/model/message/response/create_message_v2_response.dart b/lib/src/model/message/response/create_message_v2_response.dart index d08dfb1..c97957c 100644 --- a/lib/src/model/message/response/create_message_v2_response.dart +++ b/lib/src/model/message/response/create_message_v2_response.dart @@ -1,4 +1,4 @@ -import 'package:chat_gpt_sdk/src/model/message/response/ContentV2.dart'; +import 'package:chat_gpt_sdk/src/model/message/response/content_v2.dart'; class CreateMessageV2Response { String id;