1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import 'dart:ui';
- import 'package:flutter/material.dart';
- import 'package:touch_demonstrator/src/blocs/BlocProvider.dart'; //bloc:
-
- class LogoWithText extends StatelessWidget {
- final _heightLogo;
-
- LogoWithText(this._heightLogo);
-
- @override
- Widget build(BuildContext context) {
- return Column(
- children: <Widget>[
- TextAboveLogo(),
- Logo(_heightLogo),
- ],
- );
- }
- }
-
- class Logo extends StatelessWidget {
- final _heightLogo;
-
- Logo(this._heightLogo);
-
- _buildLogo() {
- // returns Logo of PolyIC
- return Container(
- key: Key('Logo'), // for integration test
- height: _heightLogo,
- child: Center(
- child: Image.asset(
- 'assets/PolyIC/PolyIC_Logo.png',
- ),
- ),
- );
- }
-
- @override
- Widget build(BuildContext context) {
- final debugBloc = BlocProvider.of(context).debugBlocGetter;
- return Hero(
- tag: 'logoHero',
- child: Padding(
- padding: EdgeInsets.all(10.0),
- child: GestureDetector(
- onTap: () => debugBloc.debugCounterIncrement.add(null),
- // onLongPress: () => debugBloc.debugEnable.add(null),
- child: _buildLogo()),
- ),
- );
- }
- }
-
- class TextAboveLogo extends StatelessWidget {
- /// Line of text above the logo that adds information to it.
- static const _textStyle = TextStyle(fontSize: 18);
- static const _buildText = Text('Touchpad Demonstrator by',
- textDirection: TextDirection.ltr, style: _textStyle);
-
- @override
- Widget build(BuildContext context) => _buildText;
- }
-
|