Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve lint warnings as per latest Stable flutter release #1567

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ name: Android Release
on:
# 2
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

# # 3
# workflow_dispatch:

# 4
jobs:

build_with_signing:
runs-on: macos-latest

Expand Down
10 changes: 5 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version: 0.1
cli:
version: 1.14.2
version: 1.15.0
plugins:
sources:
- id: trunk
ref: v1.2.2
ref: v1.2.3
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- trivy@0.44.1
- trufflehog@3.54.3
- trivy@0.45.0
- trufflehog@3.55.1
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -22,7 +22,7 @@ lint:
- [email protected]
- [email protected]
- [email protected]
- ktlint@0.50.0
- ktlint@1.0.0
runtimes:
enabled:
- [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import live.hms.hmssdk_flutter.Constants
import live.hms.hmssdk_flutter.methods.HMSPipAction

class MainActivity : FlutterActivity() {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
override fun onActivityResult(
requestCode: Int,
resultCode: Int,
data: Intent?,
) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constants.SCREEN_SHARE_INTENT_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
data?.action = Constants.HMSSDK_RECEIVER
Expand Down
9 changes: 1 addition & 8 deletions packages/hms_room_kit/lib/src/assets/icons/exit_room.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions packages/hms_room_kit/lib/src/assets/icons/login.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 1 addition & 16 deletions packages/hms_room_kit/lib/src/assets/icons/wave_hand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class HLSPlayerStore extends ChangeNotifier {

///This variable stores whether the chat is opened or not
///The initial value is taken from the [HMSRoomLayout.chatData]
bool isChatOpened = (HMSRoomLayout.chatData?.isOpenInitially??false) && (HMSRoomLayout.chatData?.isOverlay??false);
bool isChatOpened = (HMSRoomLayout.chatData?.isOpenInitially ?? false) &&
(HMSRoomLayout.chatData?.isOverlay ?? false);

///This variable stores whether the timer is active or not
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ class HLSViewerBottomNavigationBar extends StatelessWidget {
})),
);
}),

if (HMSRoomLayout.chatData != null)
const SizedBox(
width: 24,
),
const SizedBox(
width: 24,
),

///Menu Button
HMSEmbeddedButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class _HLSViewerPageState extends State<HLSViewerPage> {
meetingStore.isRoomEnded,
meetingStore.hmsException,
meetingStore.isEndRoomCalled,
meetingStore.localPeer?.role.permissions.hlsStreaming??false),
meetingStore.localPeer?.role.permissions.hlsStreaming ?? false),
builder: (_, failureData, __) {
if (failureData.item1) {
WidgetsBinding.instance.addPostFrameCallback((_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ class Elements {
brb = null;
return;
}
chat = (json.containsKey('chat') && json['chat'] != null) ? Chat.fromJson(json['chat']) : null;
chat = (json.containsKey('chat') && json['chat'] != null)
? Chat.fromJson(json['chat'])
: null;
participantList = json['participant_list'];
videoTileLayout = json.containsKey('video_tile_layout')
? VideoTileLayout.fromJson(json['video_tile_layout']['grid'])
Expand Down
10 changes: 6 additions & 4 deletions packages/hms_room_kit/lib/src/layout_api/hms_room_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,18 @@ class HMSRoomLayout {
isParticipantsListEnabled = roleLayoutData
?.screens?.conferencing?.defaultConf?.elements?.participantList !=
null;
isBRBEnabled = roleLayoutData?.screens?.conferencing?.defaultConf
?.elements?.brb != null;
isBRBEnabled =
roleLayoutData?.screens?.conferencing?.defaultConf?.elements?.brb !=
null;
} else {
chatData = roleLayoutData
?.screens?.conferencing?.hlsLiveStreaming?.elements?.chat;
isParticipantsListEnabled = roleLayoutData?.screens?.conferencing
?.hlsLiveStreaming?.elements?.participantList !=
null;
isBRBEnabled = roleLayoutData?.screens?.conferencing?.hlsLiveStreaming
?.elements?.brb != null;
isBRBEnabled = roleLayoutData
?.screens?.conferencing?.hlsLiveStreaming?.elements?.brb !=
null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,67 +152,67 @@ class _MeetingBottomNavigationBarState
}),

///Chat Button
if(HMSRoomLayout.chatData != null)
Selector<MeetingStore, Tuple2>(
selector: (_, meetingStore) => Tuple2(
meetingStore.isNewMessageReceived,
meetingStore.isOverlayChatOpened),
builder: (_, chatState, __) {
return HMSEmbeddedButton(
onTap: () => {
if (HMSRoomLayout.chatData?.isOverlay ?? false)
{context.read<MeetingStore>().toggleChatOverlay()}
else
{
context.read<MeetingStore>().getSessionMetadata(
SessionStoreKeyValues.getNameFromMethod(
SessionStoreKey.pinnedMessageSessionKey)),
context.read<MeetingStore>().setNewMessageFalse(),
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: HMSThemeColors.surfaceDim,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16)),
),
context: context,
builder: (ctx) => ChangeNotifierProvider.value(
value: context.read<MeetingStore>(),
child: HMSRoomLayout.isParticipantsListEnabled
? const ChatParticipantsTabBar(
tabIndex: 0,
)
: const ChatOnlyBottomSheet()),
)
}
},
onColor: HMSThemeColors.backgroundDim,
isActive: !(chatState.item2 &&
(HMSRoomLayout.chatData?.isOverlay ?? false)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: chatState.item1 && !chatState.item2
? Badge(
backgroundColor: HMSThemeColors.primaryDefault,
child: SvgPicture.asset(
if (HMSRoomLayout.chatData != null)
Selector<MeetingStore, Tuple2>(
selector: (_, meetingStore) => Tuple2(
meetingStore.isNewMessageReceived,
meetingStore.isOverlayChatOpened),
builder: (_, chatState, __) {
return HMSEmbeddedButton(
onTap: () => {
if (HMSRoomLayout.chatData?.isOverlay ?? false)
{context.read<MeetingStore>().toggleChatOverlay()}
else
{
context.read<MeetingStore>().getSessionMetadata(
SessionStoreKeyValues.getNameFromMethod(
SessionStoreKey.pinnedMessageSessionKey)),
context.read<MeetingStore>().setNewMessageFalse(),
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: HMSThemeColors.surfaceDim,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16)),
),
context: context,
builder: (ctx) => ChangeNotifierProvider.value(
value: context.read<MeetingStore>(),
child: HMSRoomLayout.isParticipantsListEnabled
? const ChatParticipantsTabBar(
tabIndex: 0,
)
: const ChatOnlyBottomSheet()),
)
}
},
onColor: HMSThemeColors.backgroundDim,
isActive: !(chatState.item2 &&
(HMSRoomLayout.chatData?.isOverlay ?? false)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: chatState.item1 && !chatState.item2
? Badge(
backgroundColor: HMSThemeColors.primaryDefault,
child: SvgPicture.asset(
"packages/hms_room_kit/lib/src/assets/icons/message_badge_off.svg",
semanticsLabel: "chat_button",
colorFilter: ColorFilter.mode(
HMSThemeColors.onSurfaceHighEmphasis,
BlendMode.srcIn),
),
)
: SvgPicture.asset(
"packages/hms_room_kit/lib/src/assets/icons/message_badge_off.svg",
semanticsLabel: "chat_button",
colorFilter: ColorFilter.mode(
HMSThemeColors.onSurfaceHighEmphasis,
BlendMode.srcIn),
semanticsLabel: "chat_button",
),
)
: SvgPicture.asset(
"packages/hms_room_kit/lib/src/assets/icons/message_badge_off.svg",
colorFilter: ColorFilter.mode(
HMSThemeColors.onSurfaceHighEmphasis,
BlendMode.srcIn),
semanticsLabel: "chat_button",
),
),
);
}),
),
);
}),

///Menu Button
HMSEmbeddedButton(
Expand Down
Loading