✨ Call on large screen able to full screen
This commit is contained in:
parent
fdc71475fc
commit
6ad0a34645
@ -13,8 +13,13 @@ import 'package:livekit_client/livekit_client.dart' as livekit;
|
|||||||
|
|
||||||
class CallScreen extends StatefulWidget {
|
class CallScreen extends StatefulWidget {
|
||||||
final bool hideAppBar;
|
final bool hideAppBar;
|
||||||
|
final bool isExpandable;
|
||||||
|
|
||||||
const CallScreen({super.key, this.hideAppBar = false});
|
const CallScreen({
|
||||||
|
super.key,
|
||||||
|
this.hideAppBar = false,
|
||||||
|
this.isExpandable = false,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CallScreen> createState() => _CallScreenState();
|
State<CallScreen> createState() => _CallScreenState();
|
||||||
@ -308,6 +313,15 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
if (widget.isExpandable)
|
||||||
|
IconButton(
|
||||||
|
icon: const Icon(Icons.fullscreen),
|
||||||
|
onPressed: () {
|
||||||
|
ctrl.gotoScreen(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: _layoutMode == 0
|
icon: _layoutMode == 0
|
||||||
? const Icon(Icons.view_list)
|
? const Icon(Icons.view_list)
|
||||||
@ -317,6 +331,8 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
).paddingOnly(left: 20, right: 16),
|
).paddingOnly(left: 20, right: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -141,7 +141,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
switch (state) {
|
switch (state) {
|
||||||
case AppLifecycleState.resumed:
|
case AppLifecycleState.resumed:
|
||||||
if (_isOutOfSyncSince == null) break;
|
if (_isOutOfSyncSince == null) break;
|
||||||
if (DateTime.now().difference(_isOutOfSyncSince!).inSeconds < 60) break;
|
if (DateTime.now().difference(_isOutOfSyncSince!).inSeconds < 30) break;
|
||||||
_keepUpdateWithServer();
|
_keepUpdateWithServer();
|
||||||
break;
|
break;
|
||||||
case AppLifecycleState.paused:
|
case AppLifecycleState.paused:
|
||||||
@ -269,26 +269,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_isOutOfSyncSince != null)
|
|
||||||
ListTile(
|
|
||||||
contentPadding: const EdgeInsets.only(left: 16, right: 8),
|
|
||||||
tileColor:
|
|
||||||
Theme.of(context).colorScheme.surfaceContainerLow,
|
|
||||||
leading: const Icon(Icons.history_toggle_off),
|
|
||||||
title: Text('messageOutOfSync'.tr),
|
|
||||||
subtitle: Text('messageOutOfSyncCaption'.tr),
|
|
||||||
trailing: IconButton(
|
|
||||||
icon: const Icon(Icons.close),
|
|
||||||
onPressed: () {
|
|
||||||
setState(() => _isOutOfSyncSince = null);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
onTap: _isBusy
|
|
||||||
? null
|
|
||||||
: () {
|
|
||||||
_keepUpdateWithServer();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Obx(() {
|
Obx(() {
|
||||||
if (_chatController.isLoading.isTrue) {
|
if (_chatController.isLoading.isTrue) {
|
||||||
return const LinearProgressIndicator().animate().slideY();
|
return const LinearProgressIndicator().animate().slideY();
|
||||||
@ -331,7 +311,10 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
VerticalDivider(width: 0.3, thickness: 0.3),
|
VerticalDivider(width: 0.3, thickness: 0.3),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: CallScreen(hideAppBar: true),
|
child: CallScreen(
|
||||||
|
hideAppBar: true,
|
||||||
|
isExpandable: true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user