1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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: <Widget>[
- 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: <Widget>[
- TouchPad(),
- // Sensor(),
- Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- TextAboveLogo(),
- Logo(heightLogo),
- Button(),
- ],
- ),
- ),
- ],
- ));
|