From 49ef1f39a502d775e2d560007c1cbcced4ec5bd3 Mon Sep 17 00:00:00 2001 From: ygit Date: Wed, 8 May 2024 07:05:52 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Automated=20Format=20and=20Fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hms_room_kit/lib/src/meeting/meeting_store.dart | 11 ++++++----- .../model/whiteboard/hms_whiteboard_controller.dart | 13 ++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart index 5eddf6bc1..cf43e2ce9 100644 --- a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart +++ b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart @@ -2415,17 +2415,18 @@ class MeetingStore extends ChangeNotifier notifyListeners(); } - void toggleWhiteboard() async{ + void toggleWhiteboard() async { if (isWhiteboardEnabled) { if (localPeer?.peerId == whiteboardModel?.owner?.peerId) { - HMSException? error = await HMSWhiteboardController.stop(); - if(error != null){ + HMSException? error = await HMSWhiteboardController.stop(); + if (error != null) { log("HMSWhiteboardController.stop error: ${error.description}"); } } } else if (!isScreenShareOn && screenShareCount == 0) { - HMSException? error = await HMSWhiteboardController.start(title: "Whiteboard From Flutter"); - if(error != null){ + HMSException? error = + await HMSWhiteboardController.start(title: "Whiteboard From Flutter"); + if (error != null) { log("HMSWhiteboardController.start error: ${error.description}"); } } diff --git a/packages/hmssdk_flutter/lib/src/model/whiteboard/hms_whiteboard_controller.dart b/packages/hmssdk_flutter/lib/src/model/whiteboard/hms_whiteboard_controller.dart index 8dadd549e..95d253cde 100644 --- a/packages/hmssdk_flutter/lib/src/model/whiteboard/hms_whiteboard_controller.dart +++ b/packages/hmssdk_flutter/lib/src/model/whiteboard/hms_whiteboard_controller.dart @@ -2,8 +2,7 @@ import 'package:hmssdk_flutter/hmssdk_flutter.dart'; import 'package:hmssdk_flutter/src/service/platform_service.dart'; class HMSWhiteboardController { - static Future start( - {required String title}) async { + static Future start({required String title}) async { var result = await PlatformService.invokeMethod( PlatformMethod.startWhiteboard, arguments: {"title": title}); @@ -19,11 +18,11 @@ class HMSWhiteboardController { var result = await PlatformService.invokeMethod(PlatformMethod.stopWhiteboard); - if (result != null) { - return HMSException.fromMap(result["error"]); - } else { - return null; - } + if (result != null) { + return HMSException.fromMap(result["error"]); + } else { + return null; + } } static void addHMSWhiteboardUpdateListener(