mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-29 08:16:28 +00:00
Ready to implement calls screen
This commit is contained in:
parent
f227209e9b
commit
0a03f581d1
@ -102,6 +102,17 @@ class _ConversationRouteState extends State<ConversationRoute> {
|
|||||||
_conversationName == null ? tr("Loading") : _conversationName,
|
_conversationName == null ? tr("Loading") : _conversationName,
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
|
// Start call (if possible)
|
||||||
|
_conversation == null ||
|
||||||
|
_conversation.callCapabilities == CallCapabilities.NONE
|
||||||
|
? Container()
|
||||||
|
: IconButton(
|
||||||
|
icon: Icon(Icons.phone),
|
||||||
|
onPressed: () => MainController.of(context)
|
||||||
|
.startCall(widget.conversationID),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Edit conversation settings
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.settings),
|
icon: Icon(Icons.settings),
|
||||||
onPressed: _openSettings,
|
onPressed: _openSettings,
|
||||||
|
@ -2,6 +2,7 @@ import 'package:comunic/helpers/account_helper.dart';
|
|||||||
import 'package:comunic/ui/routes/account_settings/account_settings_route.dart';
|
import 'package:comunic/ui/routes/account_settings/account_settings_route.dart';
|
||||||
import 'package:comunic/ui/routes/app_settings_route.dart';
|
import 'package:comunic/ui/routes/app_settings_route.dart';
|
||||||
import 'package:comunic/ui/routes/conversation_route.dart';
|
import 'package:comunic/ui/routes/conversation_route.dart';
|
||||||
|
import 'package:comunic/ui/screens/call_screen.dart';
|
||||||
import 'package:comunic/ui/screens/conversations_list_screen.dart';
|
import 'package:comunic/ui/screens/conversations_list_screen.dart';
|
||||||
import 'package:comunic/ui/screens/friends_list_screen.dart';
|
import 'package:comunic/ui/screens/friends_list_screen.dart';
|
||||||
import 'package:comunic/ui/screens/group_screen.dart';
|
import 'package:comunic/ui/screens/group_screen.dart';
|
||||||
@ -75,6 +76,9 @@ abstract class MainController extends State<MainRoute> {
|
|||||||
|
|
||||||
/// Open a conversation
|
/// Open a conversation
|
||||||
void openConversation(int convID);
|
void openConversation(int convID);
|
||||||
|
|
||||||
|
/// Start a call for a given conversation
|
||||||
|
void startCall(int convID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Private implementation of HomeController
|
/// Private implementation of HomeController
|
||||||
@ -287,4 +291,9 @@ class _MainRouteState extends MainController {
|
|||||||
hideNavBar: true,
|
hideNavBar: true,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void startCall(int convID) {
|
||||||
|
push(CallScreen(convID: convID), hideNavBar: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
24
lib/ui/screens/call_screen.dart
Normal file
24
lib/ui/screens/call_screen.dart
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/// Call screen
|
||||||
|
///
|
||||||
|
/// @author Pierre Hubert
|
||||||
|
|
||||||
|
class CallScreen extends StatefulWidget {
|
||||||
|
final int convID;
|
||||||
|
|
||||||
|
const CallScreen({Key key, @required this.convID})
|
||||||
|
: assert(convID != null),
|
||||||
|
assert(convID > 0),
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_CallScreenState createState() => _CallScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CallScreenState extends State<CallScreen> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user