import 'package:flutter/material.dart'; import 'package:touch_demonstrator/ui/pageTouchPoints/uiComponents.dart'; import 'package:touch_demonstrator/ui/pageTouchPoints/Logo.dart'; EdgeInsets devicePadding; class StartPage extends StatelessWidget { @override Widget build(BuildContext context) { devicePadding = MediaQuery.of(context).padding; return Scaffold( appBar: AppBar( leading: null, title: Text('Demo App'), ), body: SafeArea(child: OrientationBuilder(builder: (context, orientation) { return orientation == Orientation.portrait ? _buildVerticalLayout(context) : _buildHorizontalLayout(context); })), ); } } const heightLogo = 100.0; _buildVerticalLayout(BuildContext context) => Padding( padding: const EdgeInsets.only(left: 10.0, right: 10.0), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ Container( height: devicePadding.top, ), TextAboveLogo(), Logo(heightLogo), TouchPad(), // Sensor(), Button(), ], ), ), ); _buildHorizontalLayout(BuildContext context) => Padding( padding: const EdgeInsets.only(left: 10.0, right: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ TouchPad(), // Sensor(), Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ TextAboveLogo(), Logo(heightLogo), Button(), ], ), ), ], ));