Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Logo.dart 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import 'dart:ui';
  2. import 'package:flutter/material.dart';
  3. import 'package:touch_demonstrator/src/blocs/BlocProvider.dart'; //bloc:
  4. class LogoWithText extends StatelessWidget {
  5. final _heightLogo;
  6. LogoWithText(this._heightLogo);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Column(
  10. children: <Widget>[
  11. TextAboveLogo(),
  12. Logo(_heightLogo),
  13. ],
  14. );
  15. }
  16. }
  17. class Logo extends StatelessWidget {
  18. final _heightLogo;
  19. Logo(this._heightLogo);
  20. _buildLogo() {
  21. // returns Logo of PolyIC
  22. return Container(
  23. key: Key('Logo'), // for integration test
  24. height: _heightLogo,
  25. child: Center(
  26. child: Image.asset(
  27. 'assets/PolyIC/PolyIC_Logo.png',
  28. ),
  29. ),
  30. );
  31. }
  32. @override
  33. Widget build(BuildContext context) {
  34. final debugBloc = BlocProvider.of(context).debugBlocGetter;
  35. return Hero(
  36. tag: 'logoHero',
  37. child: Padding(
  38. padding: EdgeInsets.all(10.0),
  39. child: GestureDetector(
  40. onTap: () => debugBloc.debugCounterIncrement.add(null),
  41. // onLongPress: () => debugBloc.debugEnable.add(null),
  42. child: _buildLogo()),
  43. ),
  44. );
  45. }
  46. }
  47. class TextAboveLogo extends StatelessWidget {
  48. /// Line of text above the logo that adds information to it.
  49. static const _textStyle = TextStyle(fontSize: 18);
  50. static const _buildText = Text('Touchpad Demonstrator by',
  51. textDirection: TextDirection.ltr, style: _textStyle);
  52. @override
  53. Widget build(BuildContext context) => _buildText;
  54. }