import 'package:bus_infotainment/pages/components/ibus_display.dart'; import 'package:bus_infotainment/pages/tfl_dataset_test.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; class pages_Display extends StatefulWidget { final TfL_Dataset_TestState _tfL_Dataset_TestState; pages_Display(this._tfL_Dataset_TestState, {Key? key}) : super(key: key); @override State createState() => _pages_DisplayState(); } class _pages_DisplayState extends State { @override Widget build(BuildContext context) { return Container( decoration: BoxDecoration( color: widget._tfL_Dataset_TestState.hideUI ? Colors.black : Theme.of(context).colorScheme.background ), width: double.infinity, child: Stack( children: [ Positioned.fill( child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( child: RotatedBox( quarterTurns: 1, child: Stack( alignment: Alignment.center, children: [ ibus_display( hasBorder: false, ), if (widget._tfL_Dataset_TestState.hideUI) Container( alignment: Alignment.bottomLeft, height: double.infinity, width: double.infinity, margin: EdgeInsets.all(5), ) ], ), ), ) ], ), ), Positioned.fill( child: Container( alignment: Alignment.bottomRight, child: IconButton( icon: Icon(Icons.fullscreen), onPressed: () { // Hide the app bar and nav bar widget._tfL_Dataset_TestState.setState(() { widget._tfL_Dataset_TestState.hideUI = !widget._tfL_Dataset_TestState.hideUI; }); setState(() { }); // Hide the notification bar and make the app full screen and display over notch }, ), ), ) ], ) ); } }