mirror of
https://github.com/amigan/calls.git
synced 2025-01-31 05:22:37 -05:00
safearea
This commit is contained in:
parent
c411a007e6
commit
3a6ac88685
5 changed files with 23 additions and 18 deletions
|
@ -7,6 +7,7 @@ class Player {
|
||||||
final player = AudioPlayer();
|
final player = AudioPlayer();
|
||||||
Player();
|
Player();
|
||||||
Future<void> play(Call call) {
|
Future<void> play(Call call) {
|
||||||
|
// TODO make a queue
|
||||||
return player.play(BytesSource(Uint8List.fromList(call.audio)));
|
return player.play(BytesSource(Uint8List.fromList(call.audio)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,21 +95,23 @@ class _LoginState extends State<Login> {
|
||||||
userController.text,
|
userController.text,
|
||||||
passwordController.text)
|
passwordController.text)
|
||||||
.then((result) {
|
.then((result) {
|
||||||
if (result == true && mounted) {
|
if (result == true) {
|
||||||
Navigator.pushReplacement(
|
if (context.mounted) {
|
||||||
context,
|
Navigator.pushReplacement(
|
||||||
PageRouteBuilder(
|
context,
|
||||||
pageBuilder: (context, animation,
|
PageRouteBuilder(
|
||||||
secondaryAnimation) =>
|
pageBuilder: (context, animation,
|
||||||
const CallsHome(),
|
secondaryAnimation) =>
|
||||||
transitionsBuilder: (context, animation,
|
const CallsHome(),
|
||||||
secondaryAnimation, child) {
|
transitionsBuilder: (context, animation,
|
||||||
return child;
|
secondaryAnimation, child) {
|
||||||
},
|
return child;
|
||||||
transitionDuration:
|
},
|
||||||
const Duration(milliseconds: 0),
|
transitionDuration:
|
||||||
),
|
const Duration(milliseconds: 0),
|
||||||
);
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -14,7 +14,8 @@ class MainRadio extends StatefulWidget {
|
||||||
class _MainRadioState extends State<MainRadio> {
|
class _MainRadioState extends State<MainRadio> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Scaffold(
|
return const SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 500.0,
|
width: 500.0,
|
||||||
|
@ -27,6 +28,6 @@ class _MainRadioState extends State<MainRadio> {
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.2"
|
version: "5.0.2"
|
||||||
audioplayers_linux:
|
audioplayers_linux:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: audioplayers_linux
|
name: audioplayers_linux
|
||||||
sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e"
|
sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e"
|
||||||
|
|
|
@ -43,6 +43,7 @@ dependencies:
|
||||||
audioplayers: ^5.2.1
|
audioplayers: ^5.2.1
|
||||||
flutter_secure_storage: ^9.2.2
|
flutter_secure_storage: ^9.2.2
|
||||||
http: ^1.2.2
|
http: ^1.2.2
|
||||||
|
audioplayers_linux: ^3.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
Loading…
Reference in a new issue