From 4c0d758dd142623f038861924022bc18972caa4b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 12 May 2024 10:09:28 +0300 Subject: [PATCH] Zoom updates --- lib/config/config.dart | 3 - lib/pages/conference/zoom/call_screen.dart | 151 +++++++++------------ lib/pages/conference/zoom/video_view.dart | 12 +- lib/pages/landing/home_page_2.dart | 8 +- pubspec.yaml | 1 + 5 files changed, 79 insertions(+), 96 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 3793f0ab..8a4f4399 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -24,10 +24,7 @@ var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; // var BASE_URL = 'http://10.50.100.198:4422/'; var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/'; -//var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; -//var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; diff --git a/lib/pages/conference/zoom/call_screen.dart b/lib/pages/conference/zoom/call_screen.dart index c7a640e6..de316c6d 100644 --- a/lib/pages/conference/zoom/call_screen.dart +++ b/lib/pages/conference/zoom/call_screen.dart @@ -153,7 +153,8 @@ class _CallScreenState extends State { var muted = await mySelf.audioStatus?.isMuted(); var videoOn = await mySelf.videoStatus?.isOn(); var speakerOn = await zoom.audioHelper.getSpeakerStatus(); - fullScreenUser.value = mySelf; + // fullScreenUser.value = mySelf; + fullScreenUser.value = remoteUsers![0]; remoteUsers?.insert(0, mySelf); users.value = remoteUsers!; isMuted.value = muted!; @@ -1152,13 +1153,7 @@ class _CallScreenState extends State { void onLeaveSession(bool isEndSession) async { await zoom.leaveSession(isEndSession); Navigator.pop(context); - // if (context.mounted) { - // await Navigator.popAndPushNamed( - // context, - // "Join", - // arguments: JoinArguments(!isEndSession, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), - // ); - // } + Navigator.pop(context); } void showLeaveOptions() async { @@ -1225,7 +1220,7 @@ class _CallScreenState extends State { showCupertinoModalPopup( context: context, builder: (context) => CupertinoActionSheet( - message: const Text('Are you sure that you want to leave the session?'), + message: const Text('Are you sure that you want to leave the call?'), actions: options, cancelButton: cancel, ), @@ -1278,36 +1273,49 @@ class _CallScreenState extends State { smallView = Container( height: 110, margin: const EdgeInsets.only(left: 20, right: 20), - alignment: Alignment.center, - child: ListView.separated( - scrollDirection: Axis.horizontal, - itemCount: users.value.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () async { - onSelectedUser(users.value[index]); - }, - onDoubleTap: () async { - onSelectedUserVolume(users.value[index]); - }, - child: Center( - child: VideoView( - user: users.value[index], - hasMultiCamera: false, - sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[index].userId, - preview: false, - focused: false, - multiCameraIndex: "0", - videoAspect: VideoAspect.Original, - fullScreen: false, - resolution: VideoResolution.Resolution180, - isPiPView: false, - ), - ), - ); - }, - separatorBuilder: (BuildContext context, int index) => const Divider(), + alignment: Alignment.bottomLeft, + child: VideoView( + user: users.value[0], + hasMultiCamera: false, + sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[0].userId, + preview: false, + focused: false, + multiCameraIndex: "0", + videoAspect: VideoAspect.Original, + fullScreen: false, + resolution: VideoResolution.Resolution180, + isPiPView: false, ), + + // ListView.separated( + // scrollDirection: Axis.horizontal, + // itemCount: users.value.length, + // itemBuilder: (BuildContext context, int index) { + // return InkWell( + // onTap: () async { + // onSelectedUser(users.value[index]); + // }, + // onDoubleTap: () async { + // onSelectedUserVolume(users.value[index]); + // }, + // child: Center( + // child: VideoView( + // user: users.value[index], + // hasMultiCamera: false, + // sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[index].userId, + // preview: false, + // focused: false, + // multiCameraIndex: "0", + // videoAspect: VideoAspect.Original, + // fullScreen: false, + // resolution: VideoResolution.Resolution180, + // isPiPView: false, + // ), + // ), + // ); + // }, + // separatorBuilder: (BuildContext context, int index) => const Divider(), + // ), ); } else { fullScreenView = Container( @@ -1480,12 +1488,12 @@ class _CallScreenState extends State { ) ], ), - Container( - alignment: Alignment.centerRight, - child: Image.asset( - "assets/icons/unlocked@2x.png", - height: 22, - )), + // Container( + // alignment: Alignment.centerRight, + // child: Image.asset( + // "assets/icons/unlocked@2x.png", + // height: 22, + // )), ], ), ), @@ -1519,62 +1527,33 @@ class _CallScreenState extends State { children: [ IconButton( onPressed: onPressAudio, - icon: isMuted.value ? Image.asset("assets/icons/unmute@2x.png") : Image.asset("assets/icons/mute@2x.png"), + icon: isMuted.value ? Image.asset("assets/images/new/zoom/unmute@2x.png") : Image.asset("assets/images/new/zoom/mute@2x.png"), iconSize: circleButtonSize, tooltip: isMuted.value == true ? "Unmute" : "Mute", ), - IconButton( - onPressed: onPressShare, - icon: isSharing.value ? Image.asset("assets/icons/share-off@2x.png") : Image.asset("assets/icons/share-on@2x.png"), - iconSize: circleButtonSize, - ), + // IconButton( + // onPressed: onPressShare, + // icon: isSharing.value ? Image.asset("assets/images/new/zoom/share-off@2x.png") : Image.asset("assets/images/new/zoom/share-on@2x.png"), + // iconSize: circleButtonSize, + // ), IconButton( onPressed: onPressVideo, iconSize: circleButtonSize, - icon: isVideoOn.value ? Image.asset("assets/icons/video-off@2x.png") : Image.asset("assets/icons/video-on@2x.png"), + icon: isVideoOn.value ? Image.asset("assets/images/new/zoom/video-off@2x.png") : Image.asset("assets/images/new/zoom/video-on@2x.png"), ), IconButton( onPressed: onPressCameraChange, iconSize: circleButtonSize, - icon: const Icon(Icons.cameraswitch_sharp, size: 65.0), - ), - IconButton( - onPressed: onPressMore, - icon: Image.asset("assets/icons/more@2x.png"), - iconSize: circleButtonSize, + icon: const Icon(Icons.cameraswitch_sharp, size: 45.0, color: Colors.white,), ), + // IconButton( + // onPressed: onPressMore, + // icon: Image.asset("assets/icons/more@2x.png"), + // iconSize: circleButtonSize, + // ), ], ), ), - // Container( - // margin: const EdgeInsets.only(left: 16, right: 16, bottom: 40, top: 10), - // alignment: Alignment.bottomCenter, - // child: SizedBox( - // height: MediaQuery.of(context).viewInsets.bottom == 0 ? 65 : MediaQuery.of(context).viewInsets.bottom + 18, - // child: TextField( - // maxLines: 1, - // textAlign: TextAlign.left, - // style: TextStyle(color: chatTextColor), - // cursorColor: chatTextColor, - // textAlignVertical: TextAlignVertical.center, - // controller: chatMessageController, - // decoration: InputDecoration( - // contentPadding: const EdgeInsets.only(left: 16, top: 10, bottom: 10, right: 16), - // enabledBorder: OutlineInputBorder( - // borderSide: BorderSide(width: 1, color: chatTextColor), //<-- SEE HERE - // ), - // hintText: 'Type comment', - // hintStyle: TextStyle( - // fontSize: 14.0, - // color: chatTextColor, - // ), - // ), - // onSubmitted: (String str) { - // sendChatMessage(str); - // }, - // ), - // ), - // ), Container( alignment: Alignment.bottomLeft, margin: const EdgeInsets.only(bottom: 120), diff --git a/lib/pages/conference/zoom/video_view.dart b/lib/pages/conference/zoom/video_view.dart index 088379cd..5a53cad2 100644 --- a/lib/pages/conference/zoom/video_view.dart +++ b/lib/pages/conference/zoom/video_view.dart @@ -73,11 +73,11 @@ class VideoView extends FlutterZoomView.ZoomView { ImageIcon audioStatusIcon; if (isTalking.value) { audioStatusIcon = const ImageIcon( - AssetImage("assets/icons/talking@2x.png"), + AssetImage("assets/images/new/zoom/talking@2x.png"), ); } else if (isMuted.value) { audioStatusIcon = const ImageIcon( - AssetImage("assets/icons/muted@2x.png"), + AssetImage("assets/images/new/zoom/muted@2x.png"), ); } // Pass parameters to the platform side. @@ -118,7 +118,7 @@ class VideoView extends FlutterZoomView.ZoomView { child: Container( alignment: Alignment.center, child: const Image( - image: AssetImage("assets/icons/default-avatar.png"), + image: AssetImage("assets/images/new/zoom/default-avatar.png"), )), ); } @@ -182,7 +182,7 @@ class VideoView extends FlutterZoomView.ZoomView { child: Image( height: 12, width: 12, - image: isMuted.value ? const AssetImage("assets/icons/muted@2x.png") : const AssetImage("assets/icons/talking@2x.png"), + image: isMuted.value ? const AssetImage("assets/images/new/zoom/muted@2x.png") : const AssetImage("assets/images/new/zoom/talking@2x.png"), fit: BoxFit.cover, ), ) @@ -213,7 +213,7 @@ class VideoView extends FlutterZoomView.ZoomView { child: const Image( height: 60, width: 60, - image: AssetImage("assets/icons/default-avatar.png"), + image: AssetImage("assets/images/new/zoom/default-avatar.png"), )), ), Align( @@ -245,7 +245,7 @@ class VideoView extends FlutterZoomView.ZoomView { child: Image( height: 12, width: 12, - image: isMuted.value ? const AssetImage("assets/icons/muted@2x.png") : const AssetImage("assets/icons/talking@2x.png"), + image: isMuted.value ? const AssetImage("assets/images/new/zoom/muted@2x.png") : const AssetImage("assets/images/new/zoom/talking@2x.png"), fit: BoxFit.cover, ), ), diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart index b6294922..9d9086f6 100644 --- a/lib/pages/landing/home_page_2.dart +++ b/lib/pages/landing/home_page_2.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -48,7 +49,12 @@ class _HomePageState2 extends State { HomePageFragment2( model, onLoginClick: () { - widget.onLoginClick!(); + // widget.onLoginClick!(); + Navigator.pushNamed( + context, + "zoom_call_page", + arguments: CallArguments("hoover-dam-4", "", "Patient", "40", "0", true), + ); }, onPharmacyClick: () { // getPharmacyToken(model); diff --git a/pubspec.yaml b/pubspec.yaml index 851f41d6..8dfd227a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -209,6 +209,7 @@ flutter: - assets/payment_options/ - assets/images/new/ + - assets/images/new/zoom/ - assets/images/new/inpatient/ - assets/images/new/mass/ - assets/images/new/bottom_nav/