From 638de041cb72ee023d297ff6ee45f83fb2fad0c5 Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:57:54 +0000 Subject: [PATCH] Updating to latest FlutterFlow output. --- README.md | 2 + android/app/src/main/AndroidManifest.xml | 1 + ios/Runner.xcodeproj/project.pbxproj | 12 +- ios/Runner/Info.plist | 3 +- ios/Runner/en.lproj/InfoPlist.strings | 2 +- lib/app_state.dart | 6 + lib/backend/api_requests/api_calls.dart | 1528 +++++++++++++++++ .../create_task_edit_model.dart | 2 - .../create_task_edit_widget.dart | 2 - .../create_task_new_model.dart | 2 - .../create_task_new_widget.dart | 2 - .../empty_list_tasks_model.dart | 2 - .../empty_list_tasks_widget.dart | 2 - .../actions/fetch_speech_and_play.dart | 2 +- lib/flutter_flow/flutter_flow_util.dart | 20 + lib/flutter_flow/internationalization.dart | 5 + lib/flutter_flow/nav/nav.dart | 2 +- lib/main.dart | 6 +- .../change_password_model.dart | 2 - .../change_password_widget.dart | 11 - lib/pages/chat/chat_model.dart | 2 - lib/pages/chat/chat_widget.dart | 11 - .../completed_tasks_model.dart | 2 - .../completed_tasks_widget.dart | 25 +- .../edit_profile/edit_profile_model.dart | 2 - .../edit_profile/edit_profile_widget.dart | 18 +- lib/pages/login/login_model.dart | 2 - lib/pages/login/login_widget.dart | 11 - lib/pages/my_profile/my_profile_model.dart | 2 - lib/pages/my_profile/my_profile_widget.dart | 20 +- lib/pages/my_tasks/my_tasks_model.dart | 2 - lib/pages/my_tasks/my_tasks_widget.dart | 25 +- lib/pages/register/register_model.dart | 3 - lib/pages/register/register_widget.dart | 19 - .../splash_screen/splash_screen_model.dart | 2 - .../splash_screen/splash_screen_widget.dart | 11 - .../task_details/task_details_model.dart | 2 - .../task_details/task_details_widget.dart | 31 +- pubspec.yaml | 3 +- 39 files changed, 1612 insertions(+), 195 deletions(-) diff --git a/README.md b/README.md index cc5b5cf..54b1e85 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ A new Flutter project. +## Getting Started +FlutterFlow projects are built to run on the Flutter _stable_ release. diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index db6d8f2..678475f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools"> + - + NSMicrophoneUsageDescription + Allow microphone to use voice assistant UILaunchStoryboardName diff --git a/ios/Runner/en.lproj/InfoPlist.strings b/ios/Runner/en.lproj/InfoPlist.strings index 8b13789..4e0c704 100644 --- a/ios/Runner/en.lproj/InfoPlist.strings +++ b/ios/Runner/en.lproj/InfoPlist.strings @@ -1 +1 @@ - +NSMicrophoneUsageDescription = "Allow microphone to use voice assistant"; diff --git a/lib/app_state.dart b/lib/app_state.dart index d47631f..b431f47 100644 --- a/lib/app_state.dart +++ b/lib/app_state.dart @@ -41,4 +41,10 @@ class FFAppState extends ChangeNotifier { set timerValue(int _value) { _timerValue = _value; } + + String _apiKey = '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'; + String get apiKey => _apiKey; + set apiKey(String _value) { + _apiKey = _value; + } } diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index 0b0ff6e..294572b 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -8,6 +8,1534 @@ export 'api_manager.dart' show ApiCallResponse; const _kPrivateApiFunctionName = 'ffPrivateApiCall'; +/// Start OpenAI API Group Code + +class OpenAIAPIGroup { + static String baseUrl = 'https://api.openai.com/v1'; + static Map headers = {}; + static CreateChatCompletionCall createChatCompletionCall = + CreateChatCompletionCall(); + static CreateCompletionCall createCompletionCall = CreateCompletionCall(); + static CreateImageCall createImageCall = CreateImageCall(); + static CreateImageEditCall createImageEditCall = CreateImageEditCall(); + static CreateImageVariationCall createImageVariationCall = + CreateImageVariationCall(); + static CreateEmbeddingCall createEmbeddingCall = CreateEmbeddingCall(); + static CreateSpeechCall createSpeechCall = CreateSpeechCall(); + static CreateTranscriptionCall createTranscriptionCall = + CreateTranscriptionCall(); + static CreateTranslationCall createTranslationCall = CreateTranslationCall(); + static ListFilesCall listFilesCall = ListFilesCall(); + static CreateFileCall createFileCall = CreateFileCall(); + static DeleteFileCall deleteFileCall = DeleteFileCall(); + static RetrieveFileCall retrieveFileCall = RetrieveFileCall(); + static DownloadFileCall downloadFileCall = DownloadFileCall(); + static CreateFineTuningJobCall createFineTuningJobCall = + CreateFineTuningJobCall(); + static ListPaginatedFineTuningJobsCall listPaginatedFineTuningJobsCall = + ListPaginatedFineTuningJobsCall(); + static RetrieveFineTuningJobCall retrieveFineTuningJobCall = + RetrieveFineTuningJobCall(); + static ListFineTuningEventsCall listFineTuningEventsCall = + ListFineTuningEventsCall(); + static CancelFineTuningJobCall cancelFineTuningJobCall = + CancelFineTuningJobCall(); + static ListModelsCall listModelsCall = ListModelsCall(); + static RetrieveModelCall retrieveModelCall = RetrieveModelCall(); + static DeleteModelCall deleteModelCall = DeleteModelCall(); + static CreateModerationCall createModerationCall = CreateModerationCall(); + static ListAssistantsCall listAssistantsCall = ListAssistantsCall(); + static CreateAssistantCall createAssistantCall = CreateAssistantCall(); + static GetAssistantCall getAssistantCall = GetAssistantCall(); + static ModifyAssistantCall modifyAssistantCall = ModifyAssistantCall(); + static DeleteAssistantCall deleteAssistantCall = DeleteAssistantCall(); + static CreateThreadCall createThreadCall = CreateThreadCall(); + static GetThreadCall getThreadCall = GetThreadCall(); + static ModifyThreadCall modifyThreadCall = ModifyThreadCall(); + static DeleteThreadCall deleteThreadCall = DeleteThreadCall(); + static ListMessagesCall listMessagesCall = ListMessagesCall(); + static CreateMessageCall createMessageCall = CreateMessageCall(); + static GetMessageCall getMessageCall = GetMessageCall(); + static ModifyMessageCall modifyMessageCall = ModifyMessageCall(); + static CreateThreadAndRunCall createThreadAndRunCall = + CreateThreadAndRunCall(); + static ListRunsCall listRunsCall = ListRunsCall(); + static CreateRunCall createRunCall = CreateRunCall(); + static GetRunCall getRunCall = GetRunCall(); + static ModifyRunCall modifyRunCall = ModifyRunCall(); + static SubmitToolOuputsToRunCall submitToolOuputsToRunCall = + SubmitToolOuputsToRunCall(); + static CancelRunCall cancelRunCall = CancelRunCall(); + static ListRunStepsCall listRunStepsCall = ListRunStepsCall(); + static GetRunStepCall getRunStepCall = GetRunStepCall(); + static ListAssistantFilesCall listAssistantFilesCall = + ListAssistantFilesCall(); + static CreateAssistantFileCall createAssistantFileCall = + CreateAssistantFileCall(); + static GetAssistantFileCall getAssistantFileCall = GetAssistantFileCall(); + static DeleteAssistantFileCall deleteAssistantFileCall = + DeleteAssistantFileCall(); + static ListMessageFilesCall listMessageFilesCall = ListMessageFilesCall(); + static GetMessageFileCall getMessageFileCall = GetMessageFileCall(); +} + +class CreateChatCompletionCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "messages": [ + "" + ], + "model": "gpt-3.5-turbo", + "frequency_penalty": 0, + "logit_bias": {}, + "logprobs": false, + "top_logprobs": 0, + "max_tokens": 0, + "n": 1, + "presence_penalty": 0, + "response_format": { + "type": "json_object" + }, + "seed": 0, + "stop": "", + "stream": false, + "temperature": 1, + "top_p": 1, + "tools": [ + { + "type": "function", + "function": { + "description": "", + "name": "", + "parameters": {} + } + } + ], + "tool_choice": "", + "user": "user-1234", + "function_call": "", + "functions": [ + { + "description": "", + "name": "", + "parameters": {} + } + ] +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createChatCompletion', + apiUrl: '${OpenAIAPIGroup.baseUrl}/chat/completions', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateCompletionCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "model": "", + "prompt": "", + "best_of": 0, + "echo": false, + "frequency_penalty": 0, + "logit_bias": {}, + "logprobs": 0, + "max_tokens": 16, + "n": 1, + "presence_penalty": 0, + "seed": 0, + "stop": "", + "stream": false, + "suffix": "test.", + "temperature": 1, + "top_p": 1, + "user": "user-1234" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createCompletion', + apiUrl: '${OpenAIAPIGroup.baseUrl}/completions', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateImageCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "prompt": "A cute baby sea otter", + "model": "dall-e-3", + "n": 1, + "quality": "standard", + "response_format": "url", + "size": "1024x1024", + "style": "vivid", + "user": "user-1234" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createImage', + apiUrl: '${OpenAIAPIGroup.baseUrl}/images/generations', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateImageEditCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'createImageEdit', + apiUrl: '${OpenAIAPIGroup.baseUrl}/images/edits', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.MULTIPART, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateImageVariationCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'createImageVariation', + apiUrl: '${OpenAIAPIGroup.baseUrl}/images/variations', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.MULTIPART, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateEmbeddingCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "input": "The quick brown fox jumped over the lazy dog", + "model": "text-embedding-3-small", + "encoding_format": "float", + "dimensions": 0, + "user": "user-1234" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createEmbedding', + apiUrl: '${OpenAIAPIGroup.baseUrl}/embeddings', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateSpeechCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "model": "", + "input": "", + "voice": "alloy", + "response_format": "mp3", + "speed": 0 +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createSpeech', + apiUrl: '${OpenAIAPIGroup.baseUrl}/audio/speech', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateTranscriptionCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'createTranscription', + apiUrl: '${OpenAIAPIGroup.baseUrl}/audio/transcriptions', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.MULTIPART, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateTranslationCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'createTranslation', + apiUrl: '${OpenAIAPIGroup.baseUrl}/audio/translations', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.MULTIPART, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListFilesCall { + Future call({ + String? purpose = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listFiles', + apiUrl: '${OpenAIAPIGroup.baseUrl}/files', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'purpose': purpose, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateFileCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'createFile', + apiUrl: '${OpenAIAPIGroup.baseUrl}/files', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.MULTIPART, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DeleteFileCall { + Future call({ + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'deleteFile', + apiUrl: '${OpenAIAPIGroup.baseUrl}/files/${fileId}', + callType: ApiCallType.DELETE, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class RetrieveFileCall { + Future call({ + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'retrieveFile', + apiUrl: '${OpenAIAPIGroup.baseUrl}/files/${fileId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DownloadFileCall { + Future call({ + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'downloadFile', + apiUrl: '${OpenAIAPIGroup.baseUrl}/files/${fileId}/content', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateFineTuningJobCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "model": "gpt-3.5-turbo", + "training_file": "file-abc123", + "hyperparameters": { + "batch_size": "", + "learning_rate_multiplier": "", + "n_epochs": "" + }, + "suffix": "", + "validation_file": "file-abc123" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createFineTuningJob', + apiUrl: '${OpenAIAPIGroup.baseUrl}/fine_tuning/jobs', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListPaginatedFineTuningJobsCall { + Future call({ + String? after = '', + int? limit, + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listPaginatedFineTuningJobs', + apiUrl: '${OpenAIAPIGroup.baseUrl}/fine_tuning/jobs', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'after': after, + 'limit': limit, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class RetrieveFineTuningJobCall { + Future call({ + String? fineTuningJobId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'retrieveFineTuningJob', + apiUrl: '${OpenAIAPIGroup.baseUrl}/fine_tuning/jobs/${fineTuningJobId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListFineTuningEventsCall { + Future call({ + String? fineTuningJobId = '', + String? after = '', + int? limit, + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listFineTuningEvents', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/fine_tuning/jobs/${fineTuningJobId}/events', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'after': after, + 'limit': limit, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CancelFineTuningJobCall { + Future call({ + String? fineTuningJobId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'cancelFineTuningJob', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/fine_tuning/jobs/${fineTuningJobId}/cancel', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListModelsCall { + Future call({ + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listModels', + apiUrl: '${OpenAIAPIGroup.baseUrl}/models', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class RetrieveModelCall { + Future call({ + String? model = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'retrieveModel', + apiUrl: '${OpenAIAPIGroup.baseUrl}/models/${model}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DeleteModelCall { + Future call({ + String? model = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'deleteModel', + apiUrl: '${OpenAIAPIGroup.baseUrl}/models/${model}', + callType: ApiCallType.DELETE, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateModerationCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "input": "", + "model": "text-moderation-stable" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createModeration', + apiUrl: '${OpenAIAPIGroup.baseUrl}/moderations', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListAssistantsCall { + Future call({ + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listAssistants', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateAssistantCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "model": "", + "name": "", + "description": "", + "instructions": "", + "tools": [ + "" + ], + "file_ids": [ + "" + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createAssistant', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetAssistantCall { + Future call({ + String? assistantId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getAssistant', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ModifyAssistantCall { + Future call({ + String? assistantId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "model": "", + "name": "", + "description": "", + "instructions": "", + "tools": [ + "" + ], + "file_ids": [ + "" + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'modifyAssistant', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DeleteAssistantCall { + Future call({ + String? assistantId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'deleteAssistant', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}', + callType: ApiCallType.DELETE, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateThreadCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "messages": [ + { + "role": "user", + "content": "", + "file_ids": [ + "" + ], + "metadata": {} + } + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createThread', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetThreadCall { + Future call({ + String? threadId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getThread', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ModifyThreadCall { + Future call({ + String? threadId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'modifyThread', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DeleteThreadCall { + Future call({ + String? threadId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'deleteThread', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}', + callType: ApiCallType.DELETE, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListMessagesCall { + Future call({ + String? threadId = '', + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listMessages', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateMessageCall { + Future call({ + String? threadId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "role": "user", + "content": "", + "file_ids": [ + "" + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createMessage', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetMessageCall { + Future call({ + String? threadId = '', + String? messageId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getMessage', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages/${messageId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ModifyMessageCall { + Future call({ + String? threadId = '', + String? messageId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'modifyMessage', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages/${messageId}', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateThreadAndRunCall { + Future call({ + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "assistant_id": "", + "thread": { + "messages": [ + { + "role": "user", + "content": "", + "file_ids": [ + "" + ], + "metadata": {} + } + ], + "metadata": {} + }, + "model": "", + "instructions": "", + "tools": [ + "" + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createThreadAndRun', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/runs', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListRunsCall { + Future call({ + String? threadId = '', + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listRuns', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateRunCall { + Future call({ + String? threadId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "assistant_id": "", + "model": "", + "instructions": "", + "additional_instructions": "", + "tools": [ + "" + ], + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createRun', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetRunCall { + Future call({ + String? threadId = '', + String? runId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getRun', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ModifyRunCall { + Future call({ + String? threadId = '', + String? runId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "metadata": {} +}'''; + return ApiManager.instance.makeApiCall( + callName: 'modifyRun', + apiUrl: '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class SubmitToolOuputsToRunCall { + Future call({ + String? threadId = '', + String? runId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "tool_outputs": [ + { + "tool_call_id": "", + "output": "" + } + ] +}'''; + return ApiManager.instance.makeApiCall( + callName: 'submitToolOuputsToRun', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}/submit_tool_outputs', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CancelRunCall { + Future call({ + String? threadId = '', + String? runId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'cancelRun', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}/cancel', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListRunStepsCall { + Future call({ + String? threadId = '', + String? runId = '', + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listRunSteps', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}/steps', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetRunStepCall { + Future call({ + String? threadId = '', + String? runId = '', + String? stepId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getRunStep', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/runs/${runId}/steps/${stepId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListAssistantFilesCall { + Future call({ + String? assistantId = '', + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listAssistantFiles', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}/files', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class CreateAssistantFileCall { + Future call({ + String? assistantId = '', + String? apiKeyAuth = '', + }) async { + final ffApiRequestBody = ''' +{ + "file_id": "" +}'''; + return ApiManager.instance.makeApiCall( + callName: 'createAssistantFile', + apiUrl: '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}/files', + callType: ApiCallType.POST, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + body: ffApiRequestBody, + bodyType: BodyType.JSON, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetAssistantFileCall { + Future call({ + String? assistantId = '', + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getAssistantFile', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}/files/${fileId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class DeleteAssistantFileCall { + Future call({ + String? assistantId = '', + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'deleteAssistantFile', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/assistants/${assistantId}/files/${fileId}', + callType: ApiCallType.DELETE, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class ListMessageFilesCall { + Future call({ + String? threadId = '', + String? messageId = '', + int? limit, + String? order = '', + String? after = '', + String? before = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'listMessageFiles', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages/${messageId}/files', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: { + 'limit': limit, + 'order': order, + 'after': after, + 'before': before, + }, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +class GetMessageFileCall { + Future call({ + String? threadId = '', + String? messageId = '', + String? fileId = '', + String? apiKeyAuth = '', + }) async { + return ApiManager.instance.makeApiCall( + callName: 'getMessageFile', + apiUrl: + '${OpenAIAPIGroup.baseUrl}/threads/${threadId}/messages/${messageId}/files/${fileId}', + callType: ApiCallType.GET, + headers: { + 'Authorization': 'Bearer ${apiKeyAuth}', + }, + params: {}, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + alwaysAllowBody: false, + ); + } +} + +/// End OpenAI API Group Code + class GetResponseCall { static Future call({ String? apiKeyAuth = '', diff --git a/lib/components/create_task_edit/create_task_edit_model.dart b/lib/components/create_task_edit/create_task_edit_model.dart index ab481f8..77e9c8c 100644 --- a/lib/components/create_task_edit/create_task_edit_model.dart +++ b/lib/components/create_task_edit/create_task_edit_model.dart @@ -8,8 +8,6 @@ import 'create_task_edit_widget.dart' show CreateTaskEditWidget; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/components/create_task_edit/create_task_edit_widget.dart b/lib/components/create_task_edit/create_task_edit_widget.dart index b8bd272..5b5058c 100644 --- a/lib/components/create_task_edit/create_task_edit_widget.dart +++ b/lib/components/create_task_edit/create_task_edit_widget.dart @@ -7,8 +7,6 @@ import 'dart:ui'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'create_task_edit_model.dart'; diff --git a/lib/components/create_task_new/create_task_new_model.dart b/lib/components/create_task_new/create_task_new_model.dart index b77a59a..06ac864 100644 --- a/lib/components/create_task_new/create_task_new_model.dart +++ b/lib/components/create_task_new/create_task_new_model.dart @@ -8,8 +8,6 @@ import 'create_task_new_widget.dart' show CreateTaskNewWidget; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/components/create_task_new/create_task_new_widget.dart b/lib/components/create_task_new/create_task_new_widget.dart index 9b6f529..a88ef03 100644 --- a/lib/components/create_task_new/create_task_new_widget.dart +++ b/lib/components/create_task_new/create_task_new_widget.dart @@ -7,8 +7,6 @@ import 'dart:ui'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'create_task_new_model.dart'; diff --git a/lib/components/empty_list_tasks/empty_list_tasks_model.dart b/lib/components/empty_list_tasks/empty_list_tasks_model.dart index aa7d96c..893064f 100644 --- a/lib/components/empty_list_tasks/empty_list_tasks_model.dart +++ b/lib/components/empty_list_tasks/empty_list_tasks_model.dart @@ -4,8 +4,6 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'empty_list_tasks_widget.dart' show EmptyListTasksWidget; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/components/empty_list_tasks/empty_list_tasks_widget.dart b/lib/components/empty_list_tasks/empty_list_tasks_widget.dart index 6f11299..e42ac34 100644 --- a/lib/components/empty_list_tasks/empty_list_tasks_widget.dart +++ b/lib/components/empty_list_tasks/empty_list_tasks_widget.dart @@ -3,8 +3,6 @@ import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'empty_list_tasks_model.dart'; diff --git a/lib/custom_code/actions/fetch_speech_and_play.dart b/lib/custom_code/actions/fetch_speech_and_play.dart index 181d74a..9f83347 100644 --- a/lib/custom_code/actions/fetch_speech_and_play.dart +++ b/lib/custom_code/actions/fetch_speech_and_play.dart @@ -29,7 +29,7 @@ Future fetchSpeechAndPlay( // Set up the POST request body. String body = json.encode( - {'model': 'tts-1', 'input': promptText, 'voice': 'onyx', 'speed': '1.1'}); + {'model': 'tts-1', 'input': promptText, 'voice': 'nova', 'speed': '1'}); // Make the POST request to fetch the speech audio. final response = await http.post( diff --git a/lib/flutter_flow/flutter_flow_util.dart b/lib/flutter_flow/flutter_flow_util.dart index e1f5c05..4239c9c 100644 --- a/lib/flutter_flow/flutter_flow_util.dart +++ b/lib/flutter_flow/flutter_flow_util.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:collection/collection.dart'; import 'package:from_css_color/from_css_color.dart'; import 'package:intl/intl.dart'; @@ -348,3 +349,22 @@ extension StatefulWidgetExtensions on State { } } } + +// For iOS 16 and below, set the status bar color to match the app's theme. +// https://github.com/flutter/flutter/issues/41067 +Brightness? _lastBrightness; +void fixStatusBarOniOS16AndBelow(BuildContext context) { + if (!isiOS) { + return; + } + final brightness = Theme.of(context).brightness; + if (_lastBrightness != brightness) { + _lastBrightness = brightness; + SystemChrome.setSystemUIOverlayStyle( + SystemUiOverlayStyle( + statusBarBrightness: brightness, + systemStatusBarContrastEnforced: true, + ), + ); + } +} diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 3edccb7..1b74972 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -565,6 +565,11 @@ final kTranslationsMap = >>[ }, // Miscellaneous { + 'xl6xdiqf': { + 'en': 'Allow microphone to use voice assistant', + 'hi': '', + 'kn': '', + }, '1267bfvs': { 'en': '', 'hi': '', diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 97a17a1..c0cca6d 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:go_router/go_router.dart'; import 'package:page_transition/page_transition.dart'; import 'package:provider/provider.dart'; @@ -324,6 +323,7 @@ class FFRoute { return null; }, pageBuilder: (context, state) { + fixStatusBarOniOS16AndBelow(context); final ffParams = FFParameters(state, asyncParams); final page = ffParams.hasFutures ? FutureBuilder( diff --git a/lib/main.dart b/lib/main.dart index 9bc719a..cc41c4e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -12,7 +12,6 @@ import 'backend/firebase/firebase_config.dart'; import 'flutter_flow/flutter_flow_theme.dart'; import 'flutter_flow/flutter_flow_util.dart'; import 'flutter_flow/internationalization.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'flutter_flow/nav/nav.dart'; import 'index.dart'; @@ -24,8 +23,6 @@ void main() async { await FlutterFlowTheme.initialize(); - await FFLocalizations.initialize(); - final appState = FFAppState(); // Initialize FFAppState await appState.initializePersistedState(); @@ -45,7 +42,7 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - Locale? _locale = FFLocalizations.getStoredLocale(); + Locale? _locale; ThemeMode _themeMode = FlutterFlowTheme.themeMode; late Stream userStream; @@ -79,7 +76,6 @@ class _MyAppState extends State { void setLocale(String language) { setState(() => _locale = createLocale(language)); - FFLocalizations.storeLocale(language); } void setThemeMode(ThemeMode mode) => setState(() { diff --git a/lib/pages/change_password/change_password_model.dart b/lib/pages/change_password/change_password_model.dart index 6ac4582..c3db3e1 100644 --- a/lib/pages/change_password/change_password_model.dart +++ b/lib/pages/change_password/change_password_model.dart @@ -6,8 +6,6 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'change_password_widget.dart' show ChangePasswordWidget; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/change_password/change_password_widget.dart b/lib/pages/change_password/change_password_widget.dart index 5e28b15..22df913 100644 --- a/lib/pages/change_password/change_password_widget.dart +++ b/lib/pages/change_password/change_password_widget.dart @@ -5,8 +5,6 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'change_password_model.dart'; @@ -49,15 +47,6 @@ class _ChangePasswordWidgetState extends State { @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( diff --git a/lib/pages/chat/chat_model.dart b/lib/pages/chat/chat_model.dart index 0687872..06cb14f 100644 --- a/lib/pages/chat/chat_model.dart +++ b/lib/pages/chat/chat_model.dart @@ -4,8 +4,6 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import '/custom_code/actions/index.dart' as actions; import 'chat_widget.dart' show ChatWidget; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/chat/chat_widget.dart b/lib/pages/chat/chat_widget.dart index f2120b1..b504a5d 100644 --- a/lib/pages/chat/chat_widget.dart +++ b/lib/pages/chat/chat_widget.dart @@ -3,8 +3,6 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import '/custom_code/actions/index.dart' as actions; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'chat_model.dart'; @@ -42,15 +40,6 @@ class _ChatWidgetState extends State { @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return GestureDetector( diff --git a/lib/pages/completed_tasks/completed_tasks_model.dart b/lib/pages/completed_tasks/completed_tasks_model.dart index d622a6f..afe4763 100644 --- a/lib/pages/completed_tasks/completed_tasks_model.dart +++ b/lib/pages/completed_tasks/completed_tasks_model.dart @@ -10,9 +10,7 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'completed_tasks_widget.dart' show CompletedTasksWidget; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/completed_tasks/completed_tasks_widget.dart b/lib/pages/completed_tasks/completed_tasks_widget.dart index 9fb2112..b401b3f 100644 --- a/lib/pages/completed_tasks/completed_tasks_widget.dart +++ b/lib/pages/completed_tasks/completed_tasks_widget.dart @@ -9,9 +9,7 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import 'package:provider/provider.dart'; @@ -77,15 +75,6 @@ class _CompletedTasksWidgetState extends State @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( @@ -175,9 +164,10 @@ class _CompletedTasksWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), @@ -186,9 +176,10 @@ class _CompletedTasksWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), diff --git a/lib/pages/edit_profile/edit_profile_model.dart b/lib/pages/edit_profile/edit_profile_model.dart index 8a2ce78..ad0e20d 100644 --- a/lib/pages/edit_profile/edit_profile_model.dart +++ b/lib/pages/edit_profile/edit_profile_model.dart @@ -7,8 +7,6 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'edit_profile_widget.dart' show EditProfileWidget; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/edit_profile/edit_profile_widget.dart b/lib/pages/edit_profile/edit_profile_widget.dart index ca87b1b..f7064e2 100644 --- a/lib/pages/edit_profile/edit_profile_widget.dart +++ b/lib/pages/edit_profile/edit_profile_widget.dart @@ -6,8 +6,6 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'edit_profile_model.dart'; @@ -53,15 +51,6 @@ class _EditProfileWidgetState extends State { @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return StreamBuilder>( @@ -77,9 +66,10 @@ class _EditProfileWidgetState extends State { child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), diff --git a/lib/pages/login/login_model.dart b/lib/pages/login/login_model.dart index 77fd493..bf7476a 100644 --- a/lib/pages/login/login_model.dart +++ b/lib/pages/login/login_model.dart @@ -4,8 +4,6 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'login_widget.dart' show LoginWidget; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/login/login_widget.dart b/lib/pages/login/login_widget.dart index 3a76faf..2760265 100644 --- a/lib/pages/login/login_widget.dart +++ b/lib/pages/login/login_widget.dart @@ -3,8 +3,6 @@ import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'login_model.dart'; @@ -45,15 +43,6 @@ class _LoginWidgetState extends State { @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( diff --git a/lib/pages/my_profile/my_profile_model.dart b/lib/pages/my_profile/my_profile_model.dart index 5e1b593..d0c2977 100644 --- a/lib/pages/my_profile/my_profile_model.dart +++ b/lib/pages/my_profile/my_profile_model.dart @@ -8,9 +8,7 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'my_profile_widget.dart' show MyProfileWidget; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/my_profile/my_profile_widget.dart b/lib/pages/my_profile/my_profile_widget.dart index 8b683a7..400df67 100644 --- a/lib/pages/my_profile/my_profile_widget.dart +++ b/lib/pages/my_profile/my_profile_widget.dart @@ -7,9 +7,7 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'my_profile_model.dart'; @@ -82,15 +80,6 @@ class _MyProfileWidgetState extends State @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return StreamBuilder( @@ -104,9 +93,10 @@ class _MyProfileWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), @@ -594,7 +584,7 @@ class _MyProfileWidgetState extends State Align( alignment: AlignmentDirectional(-1.0, 0.0), child: FlutterFlowLanguageSelector( - width: 420.0, + width: double.infinity, backgroundColor: FlutterFlowTheme.of(context) .secondaryBackground, borderColor: Colors.transparent, diff --git a/lib/pages/my_tasks/my_tasks_model.dart b/lib/pages/my_tasks/my_tasks_model.dart index 9d799f1..ad4b77c 100644 --- a/lib/pages/my_tasks/my_tasks_model.dart +++ b/lib/pages/my_tasks/my_tasks_model.dart @@ -10,9 +10,7 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'my_tasks_widget.dart' show MyTasksWidget; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/my_tasks/my_tasks_widget.dart b/lib/pages/my_tasks/my_tasks_widget.dart index c3d9048..ac32941 100644 --- a/lib/pages/my_tasks/my_tasks_widget.dart +++ b/lib/pages/my_tasks/my_tasks_widget.dart @@ -9,9 +9,7 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import 'package:provider/provider.dart'; @@ -77,15 +75,6 @@ class _MyTasksWidgetState extends State @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( @@ -195,9 +184,10 @@ class _MyTasksWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), @@ -206,9 +196,10 @@ class _MyTasksWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), diff --git a/lib/pages/register/register_model.dart b/lib/pages/register/register_model.dart index 4fbd5ee..f24b93b 100644 --- a/lib/pages/register/register_model.dart +++ b/lib/pages/register/register_model.dart @@ -1,12 +1,9 @@ import '/auth/firebase_auth/auth_util.dart'; -import '/backend/backend.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'register_widget.dart' show RegisterWidget; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/register/register_widget.dart b/lib/pages/register/register_widget.dart index 1d2c7f4..6353c12 100644 --- a/lib/pages/register/register_widget.dart +++ b/lib/pages/register/register_widget.dart @@ -1,11 +1,8 @@ import '/auth/firebase_auth/auth_util.dart'; -import '/backend/backend.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'register_model.dart'; @@ -52,15 +49,6 @@ class _RegisterWidgetState extends State { @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( @@ -386,13 +374,6 @@ class _RegisterWidgetState extends State { return; } - await UsersRecord.collection - .doc(user.uid) - .update(createUsersRecordData( - displayName: - _model.fullNameController.text, - )); - context.goNamedAuth( 'myTasks', context.mounted); }, diff --git a/lib/pages/splash_screen/splash_screen_model.dart b/lib/pages/splash_screen/splash_screen_model.dart index bbf9590..8f2213d 100644 --- a/lib/pages/splash_screen/splash_screen_model.dart +++ b/lib/pages/splash_screen/splash_screen_model.dart @@ -5,9 +5,7 @@ import '/flutter_flow/flutter_flow_widgets.dart'; import 'splash_screen_widget.dart' show SplashScreenWidget; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/splash_screen/splash_screen_widget.dart b/lib/pages/splash_screen/splash_screen_widget.dart index b9eba13..e5bbd0d 100644 --- a/lib/pages/splash_screen/splash_screen_widget.dart +++ b/lib/pages/splash_screen/splash_screen_widget.dart @@ -4,9 +4,7 @@ import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'splash_screen_model.dart'; @@ -104,15 +102,6 @@ class _SplashScreenWidgetState extends State @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return Scaffold( diff --git a/lib/pages/task_details/task_details_model.dart b/lib/pages/task_details/task_details_model.dart index 1705573..5383349 100644 --- a/lib/pages/task_details/task_details_model.dart +++ b/lib/pages/task_details/task_details_model.dart @@ -14,9 +14,7 @@ import 'task_details_widget.dart' show TaskDetailsWidget; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:lottie/lottie.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/task_details/task_details_widget.dart b/lib/pages/task_details/task_details_widget.dart index 05fb1eb..4bcb9c4 100644 --- a/lib/pages/task_details/task_details_widget.dart +++ b/lib/pages/task_details/task_details_widget.dart @@ -13,9 +13,7 @@ import 'package:stop_watch_timer/stop_watch_timer.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; -import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:lottie/lottie.dart'; import 'package:provider/provider.dart'; @@ -86,15 +84,6 @@ class _TaskDetailsWidgetState extends State @override Widget build(BuildContext context) { - if (isiOS) { - SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle( - statusBarBrightness: Theme.of(context).brightness, - systemStatusBarContrastEnforced: true, - ), - ); - } - context.watch(); return StreamBuilder( @@ -108,9 +97,10 @@ class _TaskDetailsWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation( + FlutterFlowTheme.of(context).primary, + ), ), ), ), @@ -240,11 +230,14 @@ class _TaskDetailsWidgetState extends State child: SizedBox( width: 50.0, height: 50.0, - child: SpinKitWanderingCubes( - color: FlutterFlowTheme.of( - context) - .primary, - size: 50.0, + child: + CircularProgressIndicator( + valueColor: + AlwaysStoppedAnimation< + Color>( + FlutterFlowTheme.of(context) + .primary, + ), ), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 4ff9c91..24c95b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.0+12 +version: 1.0.0+1 environment: sdk: ">=3.0.0 <4.0.0" @@ -44,7 +44,6 @@ dependencies: firebase_performance_web: 0.1.4+16 flutter_animate: 4.1.1+1 flutter_cache_manager: 3.3.1 - flutter_spinkit: 5.2.0 font_awesome_flutter: 10.6.0 from_css_color: 2.0.0 go_router: 7.1.1