fix ios issues

er_location
jammal 4 years ago
parent 0fceca8f3e
commit 57f938aa09

@ -0,0 +1,91 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
# pod 'FBSDKCoreKit'
# pod 'FBSDKLoginKit'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Flutter View Controller--> <!--Flutter View Controller-->
@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view> </view>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="96" y="-21"/>
</scene> </scene>
</scenes> </scenes>
</document> </document>

@ -21,6 +21,8 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/>
<key>io.flutter.embedded_views_preview</key>
<true/> <true/>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>

@ -1,388 +1,388 @@
// import 'dart:async'; import 'dart:async';
//
// import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart'; import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart';
// import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart';
// import 'package:diplomaticquarterapp/pages/conference/conference_room.dart'; import 'package:diplomaticquarterapp/pages/conference/conference_room.dart';
// import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart'; import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart';
// import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart'; import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart';
// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart';
// import 'package:diplomaticquarterapp/pages/conference/widgets/platform_alert_dialog.dart'; import 'package:diplomaticquarterapp/pages/conference/widgets/platform_alert_dialog.dart';
// import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
// import 'package:wakelock/wakelock.dart'; import 'package:wakelock/wakelock.dart';
//
// class ConferencePage extends StatefulWidget { class ConferencePage extends StatefulWidget {
// final RoomModel roomModel; final RoomModel roomModel;
//
// const ConferencePage({Key key, this.roomModel}) : super(key: key); const ConferencePage({Key key, this.roomModel}) : super(key: key);
//
// @override @override
// _ConferencePageState createState() => _ConferencePageState(); _ConferencePageState createState() => _ConferencePageState();
// } }
//
// class _ConferencePageState extends State<ConferencePage> { class _ConferencePageState extends State<ConferencePage> {
// final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast(); final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast();
// final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast(); final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast();
// ConferenceRoom _conferenceRoom; ConferenceRoom _conferenceRoom;
// StreamSubscription _onConferenceRoomException; StreamSubscription _onConferenceRoomException;
//
// @override @override
// void initState() { void initState() {
// super.initState(); super.initState();
// _lockInPortrait(); _lockInPortrait();
// // _connectToRoom(); _connectToRoom();
// _wakeLock(true); _wakeLock(true);
// } }
//
// // void _connectToRoom() async { void _connectToRoom() async {
// // try { try {
// // final conferenceRoom = ConferenceRoom( final conferenceRoom = ConferenceRoom(
// // name: widget.roomModel.name, name: widget.roomModel.name,
// // token: widget.roomModel.token, token: widget.roomModel.token,
// // identity: widget.roomModel.identity, identity: widget.roomModel.identity,
// // ); );
// // await conferenceRoom.connect(); await conferenceRoom.connect();
// // setState(() { setState(() {
// // _conferenceRoom = conferenceRoom; _conferenceRoom = conferenceRoom;
// // _onConferenceRoomException = _conferenceRoom.onException.listen((err) async { _onConferenceRoomException = _conferenceRoom.onException.listen((err) async {
// // await PlatformAlertDialog( await PlatformAlertDialog(
// // title: err is PlatformException ? err.message : 'An error occured', title: err is PlatformException ? err.message : 'An error occured',
// // content: err is PlatformException ? err.details : err.toString(), content: err is PlatformException ? err.details : err.toString(),
// // defaultActionText: 'OK', defaultActionText: 'OK',
// // ).show(context); ).show(context);
// // }); });
// // _conferenceRoom.addListener(_conferenceRoomUpdated); _conferenceRoom.addListener(_conferenceRoomUpdated);
// // }); });
// // } catch (err) { } catch (err) {
// // print(err); print(err);
// // await PlatformAlertDialog( await PlatformAlertDialog(
// // title: err is PlatformException ? err.message : 'An error occured', title: err is PlatformException ? err.message : 'An error occured',
// // content: err is PlatformException ? err.details : err.toString(), content: err is PlatformException ? err.details : err.toString(),
// // defaultActionText: 'OK', defaultActionText: 'OK',
// // ).show(context); ).show(context);
// //
// // Navigator.of(context).pop(); Navigator.of(context).pop();
// // } }
// // } }
//
// Future<void> _lockInPortrait() async { Future<void> _lockInPortrait() async {
// await SystemChrome.setPreferredOrientations(<DeviceOrientation>[ await SystemChrome.setPreferredOrientations(<DeviceOrientation>[
// DeviceOrientation.portraitUp, DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown, DeviceOrientation.portraitDown,
// ]); ]);
// } }
//
// @override @override
// void dispose() { void dispose() {
// _freePortraitLock(); _freePortraitLock();
// _wakeLock(false); _wakeLock(false);
// _disposeStreamsAndSubscriptions(); _disposeStreamsAndSubscriptions();
// if (_conferenceRoom != null) _conferenceRoom.removeListener(_conferenceRoomUpdated); if (_conferenceRoom != null) _conferenceRoom.removeListener(_conferenceRoomUpdated);
// super.dispose(); super.dispose();
// } }
//
// Future<void> _freePortraitLock() async { Future<void> _freePortraitLock() async {
// await SystemChrome.setPreferredOrientations(<DeviceOrientation>[ await SystemChrome.setPreferredOrientations(<DeviceOrientation>[
// DeviceOrientation.landscapeRight, DeviceOrientation.landscapeRight,
// DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeLeft,
// DeviceOrientation.portraitUp, DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown, DeviceOrientation.portraitDown,
// ]); ]);
// } }
//
// Future<void> _disposeStreamsAndSubscriptions() async { Future<void> _disposeStreamsAndSubscriptions() async {
// if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close(); if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close();
// if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close(); if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close();
// if (_onConferenceRoomException != null) await _onConferenceRoomException.cancel(); if (_onConferenceRoomException != null) await _onConferenceRoomException.cancel();
// } }
//
// @override @override
// Widget build(BuildContext context) { Widget build(BuildContext context) {
// return WillPopScope( return WillPopScope(
// onWillPop: () async => false, onWillPop: () async => false,
// child: Scaffold( child: Scaffold(
// backgroundColor: Colors.black, backgroundColor: Colors.black,
// body: _conferenceRoom == null ? showProgress() : buildLayout(), body: _conferenceRoom == null ? showProgress() : buildLayout(),
// ), ),
// ); );
// } }
//
// LayoutBuilder buildLayout() { LayoutBuilder buildLayout() {
// return LayoutBuilder( return LayoutBuilder(
// builder: (BuildContext context, BoxConstraints constraints) { builder: (BuildContext context, BoxConstraints constraints) {
// return Stack( return Stack(
// children: <Widget>[ children: <Widget>[
// _buildParticipants(context, constraints.biggest, _conferenceRoom), _buildParticipants(context, constraints.biggest, _conferenceRoom),
// ConferenceButtonBar( ConferenceButtonBar(
// audioEnabled: _conferenceRoom.onAudioEnabled, audioEnabled: _conferenceRoom.onAudioEnabled,
// videoEnabled: _conferenceRoom.onVideoEnabled, videoEnabled: _conferenceRoom.onVideoEnabled,
// onAudioEnabled: _conferenceRoom.toggleAudioEnabled, onAudioEnabled: _conferenceRoom.toggleAudioEnabled,
// onVideoEnabled: _conferenceRoom.toggleVideoEnabled, onVideoEnabled: _conferenceRoom.toggleVideoEnabled,
// onHangup: _onHangup, onHangup: _onHangup,
// onSwitchCamera: _conferenceRoom.switchCamera, onSwitchCamera: _conferenceRoom.switchCamera,
// onPersonAdd: _onPersonAdd, onPersonAdd: _onPersonAdd,
// onPersonRemove: _onPersonRemove, onPersonRemove: _onPersonRemove,
// onHeight: _onHeightBar, onHeight: _onHeightBar,
// onShow: _onShowBar, onShow: _onShowBar,
// onHide: _onHideBar, onHide: _onHideBar,
// ), ),
// ], ],
// ); );
// }, },
// ); );
// } }
//
// Widget showProgress() { Widget showProgress() {
// return Column( return Column(
// mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[ children: <Widget>[
// Center(child: CircularProgressIndicator()), Center(child: CircularProgressIndicator()),
// SizedBox( SizedBox(
// height: 10, height: 10,
// ), ),
// Text( Text(
// 'Connecting to the call...', 'Connecting to the call...',
// style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
// ), ),
// ], ],
// ); );
// } }
//
// Future<void> _onHangup() async { Future<void> _onHangup() async {
// print('onHangup'); print('onHangup');
// await _conferenceRoom.disconnect(); await _conferenceRoom.disconnect();
// Navigator.of(context).pop(); Navigator.of(context).pop();
// } }
//
// void _onPersonAdd() { void _onPersonAdd() {
// print('onPersonAdd'); print('onPersonAdd');
// try { try {
// _conferenceRoom.addDummy( _conferenceRoom.addDummy(
// child: Stack( child: Stack(
// children: <Widget>[ children: <Widget>[
// const Placeholder(), const Placeholder(),
// Center( Center(
// child: Text( child: Text(
// (_conferenceRoom.participants.length + 1).toString(), (_conferenceRoom.participants.length + 1).toString(),
// style: const TextStyle( style: const TextStyle(
// shadows: <Shadow>[ shadows: <Shadow>[
// Shadow( Shadow(
// blurRadius: 3.0, blurRadius: 3.0,
// color: Color.fromARGB(255, 0, 0, 0), color: Color.fromARGB(255, 0, 0, 0),
// ), ),
// Shadow( Shadow(
// blurRadius: 8.0, blurRadius: 8.0,
// color: Color.fromARGB(255, 255, 255, 255), color: Color.fromARGB(255, 255, 255, 255),
// ), ),
// ], ],
// fontSize: 80, fontSize: 80,
// ), ),
// ), ),
// ), ),
// ], ],
// ), ),
// ); );
// } on PlatformException catch (err) { } on PlatformException catch (err) {
// PlatformAlertDialog( PlatformAlertDialog(
// title: err.message, title: err.message,
// content: err.details, content: err.details,
// defaultActionText: 'OK', defaultActionText: 'OK',
// ).show(context); ).show(context);
// } }
// } }
//
// void _onPersonRemove() { void _onPersonRemove() {
// print('onPersonRemove'); print('onPersonRemove');
// _conferenceRoom.removeDummy(); _conferenceRoom.removeDummy();
// } }
//
// Widget _buildParticipants(BuildContext context, Size size, ConferenceRoom conferenceRoom) { Widget _buildParticipants(BuildContext context, Size size, ConferenceRoom conferenceRoom) {
// final children = <Widget>[]; final children = <Widget>[];
// final length = conferenceRoom.participants.length; final length = conferenceRoom.participants.length;
//
// if (length <= 2) { if (length <= 2) {
// _buildOverlayLayout(context, size, children); _buildOverlayLayout(context, size, children);
// return Stack(children: children); return Stack(children: children);
// } }
//
// void buildInCols(bool removeLocalBeforeChunking, bool moveLastOfEachRowToNextRow, int columns) { void buildInCols(bool removeLocalBeforeChunking, bool moveLastOfEachRowToNextRow, int columns) {
// _buildLayoutInGrid( _buildLayoutInGrid(
// context, context,
// size, size,
// children, children,
// removeLocalBeforeChunking: removeLocalBeforeChunking, removeLocalBeforeChunking: removeLocalBeforeChunking,
// moveLastOfEachRowToNextRow: moveLastOfEachRowToNextRow, moveLastOfEachRowToNextRow: moveLastOfEachRowToNextRow,
// columns: columns, columns: columns,
// ); );
// } }
//
// // if (length <= 3) { // if (length <= 3) {
// // buildInCols(true, false, 1); // buildInCols(true, false, 1);
// // } else if (length == 5) { // } else if (length == 5) {
// // buildInCols(false, true, 2); // buildInCols(false, true, 2);
// // } else if (length <= 6 || length == 8) { // } else if (length <= 6 || length == 8) {
// // buildInCols(false, false, 2); // buildInCols(false, false, 2);
// // } else if (length == 7 || length == 9) { // } else if (length == 7 || length == 9) {
// // buildInCols(true, false, 2); // buildInCols(true, false, 2);
// // } else if (length == 10) { // } else if (length == 10) {
// // buildInCols(false, true, 3); // buildInCols(false, true, 3);
// // } else if (length == 13 || length == 16) { // } else if (length == 13 || length == 16) {
// // buildInCols(true, false, 3); // buildInCols(true, false, 3);
// // } else if (length <= 18) { // } else if (length <= 18) {
// // buildInCols(false, false, 3); // buildInCols(false, false, 3);
// // } // }
//
// return Column( return Column(
// children: children, children: children,
// ); );
// } }
//
// void _buildOverlayLayout(BuildContext context, Size size, List<Widget> children) { void _buildOverlayLayout(BuildContext context, Size size, List<Widget> children) {
// final participants = _conferenceRoom.participants; final participants = _conferenceRoom.participants;
// if (participants.length == 1) { if (participants.length == 1) {
// children.add(_buildNoiseBox()); children.add(_buildNoiseBox());
// } else { } else {
// final remoteParticipant = participants.firstWhere((ParticipantWidget participant) => participant.isRemote, orElse: () => null); final remoteParticipant = participants.firstWhere((ParticipantWidget participant) => participant.isRemote, orElse: () => null);
// if (remoteParticipant != null) { if (remoteParticipant != null) {
// children.add(remoteParticipant); children.add(remoteParticipant);
// } }
// } }
//
// final localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); final localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null);
// if (localParticipant != null) { if (localParticipant != null) {
// children.add(DraggablePublisher( children.add(DraggablePublisher(
// key: Key('publisher'), key: Key('publisher'),
// child: localParticipant, child: localParticipant,
// availableScreenSize: size, availableScreenSize: size,
// onButtonBarVisible: _onButtonBarVisibleStreamController.stream, onButtonBarVisible: _onButtonBarVisibleStreamController.stream,
// onButtonBarHeight: _onButtonBarHeightStreamController.stream, onButtonBarHeight: _onButtonBarHeightStreamController.stream,
// )); ));
// } }
// } }
//
// void _buildLayoutInGrid( void _buildLayoutInGrid(
// BuildContext context, BuildContext context,
// Size size, Size size,
// List<Widget> children, { List<Widget> children, {
// bool removeLocalBeforeChunking = false, bool removeLocalBeforeChunking = false,
// bool moveLastOfEachRowToNextRow = false, bool moveLastOfEachRowToNextRow = false,
// int columns = 2, int columns = 2,
// }) { }) {
// final participants = _conferenceRoom.participants; final participants = _conferenceRoom.participants;
// ParticipantWidget localParticipant; ParticipantWidget localParticipant;
// if (removeLocalBeforeChunking) { if (removeLocalBeforeChunking) {
// localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null);
// if (localParticipant != null) { if (localParticipant != null) {
// participants.remove(localParticipant); participants.remove(localParticipant);
// } }
// } }
// final chunkedParticipants = chunk(array: participants, size: columns); final chunkedParticipants = chunk(array: participants, size: columns);
// if (localParticipant != null) { if (localParticipant != null) {
// chunkedParticipants.last.add(localParticipant); chunkedParticipants.last.add(localParticipant);
// participants.add(localParticipant); participants.add(localParticipant);
// } }
//
// if (moveLastOfEachRowToNextRow) { if (moveLastOfEachRowToNextRow) {
// for (var i = 0; i < chunkedParticipants.length - 1; i++) { for (var i = 0; i < chunkedParticipants.length - 1; i++) {
// var participant = chunkedParticipants[i].removeLast(); var participant = chunkedParticipants[i].removeLast();
// chunkedParticipants[i + 1].insert(0, participant); chunkedParticipants[i + 1].insert(0, participant);
// } }
// } }
//
// for (final participantChunk in chunkedParticipants) { for (final participantChunk in chunkedParticipants) {
// final rowChildren = <Widget>[]; final rowChildren = <Widget>[];
// for (final participant in participantChunk) { for (final participant in participantChunk) {
// rowChildren.add( rowChildren.add(
// Container( Container(
// width: size.width / participantChunk.length, width: size.width / participantChunk.length,
// height: size.height / chunkedParticipants.length, height: size.height / chunkedParticipants.length,
// child: participant, child: participant,
// ), ),
// ); );
// } }
// children.add( children.add(
// Container( Container(
// height: size.height / chunkedParticipants.length, height: size.height / chunkedParticipants.length,
// child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: rowChildren, children: rowChildren,
// ), ),
// ), ),
// ); );
// } }
// } }
//
// NoiseBox _buildNoiseBox() { NoiseBox _buildNoiseBox() {
// return NoiseBox( return NoiseBox(
// density: NoiseBoxDensity.xLow, density: NoiseBoxDensity.xLow,
// backgroundColor: Colors.grey.shade900, backgroundColor: Colors.grey.shade900,
// child: Center( child: Center(
// child: Container( child: Container(
// color: Colors.black54, color: Colors.black54,
// width: double.infinity, width: double.infinity,
// height: 40, height: 40,
// child: Center( child: Center(
// child: Text( child: Text(
// 'Waiting for another participant to connect to the call...', 'Waiting for another participant to connect to the call...',
// key: Key('text-wait'), key: Key('text-wait'),
// textAlign: TextAlign.center, textAlign: TextAlign.center,
// style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
// ), ),
// ), ),
// ), ),
// ), ),
// ); );
// } }
//
// List<List<T>> chunk<T>({@required List<T> array, @required int size}) { List<List<T>> chunk<T>({@required List<T> array, @required int size}) {
// final result = <List<T>>[]; final result = <List<T>>[];
// if (array.isEmpty || size <= 0) { if (array.isEmpty || size <= 0) {
// return result; return result;
// } }
// var first = 0; var first = 0;
// var last = size; var last = size;
// final totalLoop = array.length % size == 0 ? array.length ~/ size : array.length ~/ size + 1; final totalLoop = array.length % size == 0 ? array.length ~/ size : array.length ~/ size + 1;
// for (var i = 0; i < totalLoop; i++) { for (var i = 0; i < totalLoop; i++) {
// if (last > array.length) { if (last > array.length) {
// result.add(array.sublist(first, array.length)); result.add(array.sublist(first, array.length));
// } else { } else {
// result.add(array.sublist(first, last)); result.add(array.sublist(first, last));
// } }
// first = last; first = last;
// last = last + size; last = last + size;
// } }
// return result; return result;
// } }
//
// void _onHeightBar(double height) { void _onHeightBar(double height) {
// _onButtonBarHeightStreamController.add(height); _onButtonBarHeightStreamController.add(height);
// } }
//
// void _onShowBar() { void _onShowBar() {
// setState(() { setState(() {
// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]); SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
// }); });
// _onButtonBarVisibleStreamController.add(true); _onButtonBarVisibleStreamController.add(true);
// } }
//
// void _onHideBar() { void _onHideBar() {
// setState(() { setState(() {
// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
// }); });
// _onButtonBarVisibleStreamController.add(false); _onButtonBarVisibleStreamController.add(false);
// } }
//
// Future<void> _wakeLock(bool enable) async { Future<void> _wakeLock(bool enable) async {
// try { try {
// return await (enable ? Wakelock.enable() : Wakelock.disable()); return await (enable ? Wakelock.enable() : Wakelock.disable());
// } catch (err) { } catch (err) {
// print('Unable to change the Wakelock and set it to $enable'); print('Unable to change the Wakelock and set it to $enable');
// print(err); print(err);
// } }
// } }
//
// void _conferenceRoomUpdated() { void _conferenceRoomUpdated() {
// setState(() {}); setState(() {});
// } }
// } }

File diff suppressed because it is too large Load Diff

@ -78,35 +78,35 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print(route.settings.name); print(route.settings.name);
} }
// setState(() { setState(() {
// print("didChangeAppLifecycleState"); print("didChangeAppLifecycleState");
// print('state = $state'); print('state = $state');
// AppGlobal.context = context; AppGlobal.context = context;
// if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
// print(LandingPage.isOpenCallPage); print(LandingPage.isOpenCallPage);
// if (LandingPage.isOpenCallPage) { if (LandingPage.isOpenCallPage) {
// if (!isPageNavigated) { if (!isPageNavigated) {
// isPageNavigated = true; isPageNavigated = true;
// Navigator.push( Navigator.push(
// context, context,
// MaterialPageRoute( MaterialPageRoute(
// builder: (context) => IncomingCall( builder: (context) => IncomingCall(
// incomingCallData: LandingPage.incomingCallData))) incomingCallData: LandingPage.incomingCallData)))
// .then((value) { .then((value) {
// isPageNavigated = false; isPageNavigated = false;
// }); });
// } }
// } }
// } }
//
// if (state == AppLifecycleState.paused) { if (state == AppLifecycleState.paused) {
// isPageNavigated = false; isPageNavigated = false;
// } }
//
// if (state == AppLifecycleState.inactive) { if (state == AppLifecycleState.inactive) {
// isPageNavigated = false; isPageNavigated = false;
// } }
// }); });
} }
@override @override

@ -213,13 +213,13 @@ class _IncomingCallState extends State<IncomingCall>
token: widget.incomingCallData.sessionId, token: widget.incomingCallData.sessionId,
identity: widget.incomingCallData.identity); identity: widget.incomingCallData.identity);
// await Navigator.of(context).push( await Navigator.of(context).push(
// MaterialPageRoute<ConferencePage>( MaterialPageRoute<ConferencePage>(
// fullscreenDialog: true, fullscreenDialog: true,
// builder: (BuildContext context) => builder: (BuildContext context) =>
// ConferencePage(roomModel: roomModel), ConferencePage(roomModel: roomModel),
// ), ),
// ); );
} catch (err) { } catch (err) {
print(err); print(err);
await PlatformExceptionAlertDialog( await PlatformExceptionAlertDialog(

@ -144,7 +144,7 @@ dependencies:
# recase: ^3.0.0 # recase: ^3.0.0
wakelock: ^0.1.4 wakelock: ^0.1.4
after_layout: ^1.0.7 after_layout: ^1.0.7
#twilio_programmable_video: ^0.5.0+3 twilio_programmable_video: ^0.5.0+3
flutter_tts: ^1.2.6 flutter_tts: ^1.2.6
speech_to_text: speech_to_text:

Loading…
Cancel
Save