"Added url_launcher_ios pod, modified Firebase API to remove permission request, updated AI chat page and message bar widgets with platform-specific conditions for audio handling and recording."
This commit is contained in:
parent
bfabecef45
commit
dcb7e6b0da
|
|
@ -140,6 +140,8 @@ PODS:
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- SwiftyGif (5.4.5)
|
- SwiftyGif (5.4.5)
|
||||||
- TOCropViewController (2.6.1)
|
- TOCropViewController (2.6.1)
|
||||||
|
- url_launcher_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
- video_player_avfoundation (0.0.1):
|
- video_player_avfoundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
@ -167,6 +169,7 @@ DEPENDENCIES:
|
||||||
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
|
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
|
||||||
- rive_common (from `.symlinks/plugins/rive_common/ios`)
|
- rive_common (from `.symlinks/plugins/rive_common/ios`)
|
||||||
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
||||||
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
||||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||||
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||||
|
|
@ -226,6 +229,8 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/rive_common/ios"
|
:path: ".symlinks/plugins/rive_common/ios"
|
||||||
sqflite:
|
sqflite:
|
||||||
:path: ".symlinks/plugins/sqflite/darwin"
|
:path: ".symlinks/plugins/sqflite/darwin"
|
||||||
|
url_launcher_ios:
|
||||||
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
video_player_avfoundation:
|
video_player_avfoundation:
|
||||||
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
|
|
@ -267,6 +272,7 @@ SPEC CHECKSUMS:
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
|
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
|
||||||
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
|
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
|
||||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ class FirebaseApi {
|
||||||
static String? fcmToken;
|
static String? fcmToken;
|
||||||
|
|
||||||
Future<void> initNotification() async {
|
Future<void> initNotification() async {
|
||||||
await _firebaseMessaging.requestPermission();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fcmToken = await _firebaseMessaging.getToken();
|
fcmToken = await _firebaseMessaging.getToken();
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
// ignore_for_file: library_private_types_in_public_api, deprecated_member_use, depend_on_referenced_packages
|
// ignore_for_file: library_private_types_in_public_api, deprecated_member_use, depend_on_referenced_packages
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:didvan/config/design_config.dart';
|
import 'package:didvan/config/design_config.dart';
|
||||||
import 'package:didvan/config/theme_data.dart';
|
import 'package:didvan/config/theme_data.dart';
|
||||||
|
|
@ -423,7 +425,7 @@ class _AiChatPageState extends State<AiChatPage> {
|
||||||
children: [
|
children: [
|
||||||
if (message.role.toString().contains('user') &&
|
if (message.role.toString().contains('user') &&
|
||||||
file != null)
|
file != null)
|
||||||
file.isAudio()
|
(file.isAudio() && (!kIsWeb && !Platform.isIOS))
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 16, vertical: 8),
|
horizontal: 16, vertical: 8),
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ class _AiMessageBarState extends State<AiMessageBar> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (!kIsWeb || !Platform.isIOS)
|
if (!kIsWeb && !Platform.isIOS)
|
||||||
if (historyState.bot!.attachmentType!
|
if (historyState.bot!.attachmentType!
|
||||||
.contains('audio'))
|
.contains('audio'))
|
||||||
attachBtn(
|
attachBtn(
|
||||||
|
|
@ -342,7 +342,9 @@ class _AiMessageBarState extends State<AiMessageBar> {
|
||||||
state.update();
|
state.update();
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: (!kIsWeb || !Platform.isIOS) &&
|
: (!kIsWeb &&
|
||||||
|
!Platform
|
||||||
|
.isIOS) &&
|
||||||
widget.bot
|
widget.bot
|
||||||
.attachmentType!
|
.attachmentType!
|
||||||
.contains(
|
.contains(
|
||||||
|
|
@ -382,7 +384,7 @@ class _AiMessageBarState extends State<AiMessageBar> {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(
|
print(
|
||||||
'Error starting recording: $e');
|
'Error starting recording: $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -441,6 +443,9 @@ class _AiMessageBarState extends State<AiMessageBar> {
|
||||||
fileName: state
|
fileName: state
|
||||||
.file
|
.file
|
||||||
?.basename,
|
?.basename,
|
||||||
|
fileLocal:
|
||||||
|
state
|
||||||
|
.file,
|
||||||
finished:
|
finished:
|
||||||
true,
|
true,
|
||||||
role: 'user',
|
role: 'user',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue