|
|
|
|
@ -49,7 +49,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
|
|
|
|
|
void dispose() {
|
|
|
|
|
_animationController.dispose();
|
|
|
|
|
player.stop();
|
|
|
|
|
_controller.dispose();
|
|
|
|
|
// _controller.dispose();
|
|
|
|
|
disposeAudioResources();
|
|
|
|
|
super.dispose();
|
|
|
|
|
}
|
|
|
|
|
@ -62,17 +62,17 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
|
|
|
|
|
body: FutureBuilder<void>(
|
|
|
|
|
future: _initializeControllerFuture,
|
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
|
if (snapshot.connectionState == ConnectionState.done) {
|
|
|
|
|
// if (snapshot.connectionState == ConnectionState.done) {
|
|
|
|
|
return Stack(
|
|
|
|
|
alignment: FractionalOffset.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
new Positioned.fill(
|
|
|
|
|
child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
|
|
|
|
|
),
|
|
|
|
|
// new Positioned.fill(
|
|
|
|
|
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
|
|
|
|
|
// ),
|
|
|
|
|
new Positioned.fill(
|
|
|
|
|
child: new ClipRect(
|
|
|
|
|
child: new BackdropFilter(
|
|
|
|
|
filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
|
|
|
|
// child: new BackdropFilter(
|
|
|
|
|
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
|
|
|
|
child: new Container(
|
|
|
|
|
decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -191,29 +191,18 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return const Center(child: CircularProgressIndicator());
|
|
|
|
|
}
|
|
|
|
|
// } else {
|
|
|
|
|
// return const Center(child: CircularProgressIndicator());
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _runAnimation() async {
|
|
|
|
|
final cameras = await availableCameras();
|
|
|
|
|
final firstCamera = cameras[1];
|
|
|
|
|
|
|
|
|
|
_controller = CameraController(
|
|
|
|
|
// Get a specific camera from the list of available cameras.
|
|
|
|
|
firstCamera,
|
|
|
|
|
// Define the resolution to use.
|
|
|
|
|
ResolutionPreset.medium,
|
|
|
|
|
);
|
|
|
|
|
_initializeControllerFuture = _controller.initialize();
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
isCameraReady = true;
|
|
|
|
|
});
|
|
|
|
|
@ -229,7 +218,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
|
|
|
|
|
try {
|
|
|
|
|
// backToHome();
|
|
|
|
|
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
|
|
|
|
|
await _controller.dispose();
|
|
|
|
|
// await _controller.dispose();
|
|
|
|
|
changeCallStatusAPI(4);
|
|
|
|
|
await Navigator.of(context).pushReplacement(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|