desktop
This commit is contained in:
@@ -733,7 +733,7 @@ class EasyAnnouncementPicker extends StatelessWidget {
|
||||
label: entry.shortName,
|
||||
onPressed: () {
|
||||
LiveInformation liveInformation = LiveInformation();
|
||||
liveInformation.announcementModule.queueAnnounementByInfoIndex(
|
||||
liveInformation.announcementModule.queueAnnouncementByInfoIndex(
|
||||
infoIndex: liveInformation.announcementModule.manualAnnouncements.indexOf(entry),
|
||||
sendToServer: true
|
||||
);
|
||||
@@ -1431,6 +1431,10 @@ class _FullscreenDisplayState extends State<FullscreenDisplay> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
// Get the current screen orientation
|
||||
final Orientation orientation = MediaQuery.of(context).orientation;
|
||||
|
||||
|
||||
// Make the screen landscape
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeRight,
|
||||
@@ -1440,9 +1444,18 @@ class _FullscreenDisplayState extends State<FullscreenDisplay> {
|
||||
return PopScope(
|
||||
onPopInvoked: (isPop) {
|
||||
if (isPop) {
|
||||
SystemChrome.setPreferredOrientations([
|
||||
// SystemChrome.setPreferredOrientations([
|
||||
// DeviceOrientation.portraitUp,
|
||||
// DeviceOrientation.portraitDown
|
||||
// ]);
|
||||
|
||||
// Set the orientation back to whatever it was before
|
||||
SystemChrome.setPreferredOrientations(orientation == Orientation.portrait ? [
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown
|
||||
] : [
|
||||
DeviceOrientation.landscapeRight,
|
||||
DeviceOrientation.landscapeLeft
|
||||
]);
|
||||
}
|
||||
},
|
||||
@@ -1460,12 +1473,17 @@ class _FullscreenDisplayState extends State<FullscreenDisplay> {
|
||||
hasBorder: false,
|
||||
),
|
||||
),
|
||||
ShadButton.ghost(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
padding: const EdgeInsets.all(8),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
Container(
|
||||
|
||||
alignment: Alignment.bottomRight,
|
||||
|
||||
child: ShadButton.ghost(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
padding: const EdgeInsets.all(8),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user