test_screen_01.dart 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * router
  3. * A Posse Production
  4. * http://goposse.com
  5. * Copyright (c) 2017 Posse Productions LLC. All rights reserved.
  6. * See LICENSE for distribution and usage details.
  7. */
  8. import 'package:flutter/material.dart';
  9. import 'package:router_example/helpers/color_helpers.dart';
  10. class TestScreen01 extends StatelessWidget {
  11. TestScreen01({String message = "Testing", Color color = const Color(0xFFFFFFFF)})
  12. : this.message = message,
  13. this.color = color;
  14. final String message;
  15. final Color color;
  16. @override
  17. Widget build(BuildContext context) {
  18. return new Material(
  19. color: color,
  20. child: new Column(
  21. mainAxisAlignment: MainAxisAlignment.center,
  22. children: [
  23. new Image(
  24. image: new AssetImage("assets/images/acc_boom.png"),
  25. color: ColorHelpers.blackOrWhiteContrastColor(color),
  26. width: 350.0,
  27. ),
  28. new Padding(
  29. padding: new EdgeInsets.only(left: 50.0, right: 50.0, top: 15.0),
  30. child: new Text(
  31. message,
  32. textAlign: TextAlign.center,
  33. style: new TextStyle(
  34. color: ColorHelpers.blackOrWhiteContrastColor(color),
  35. height: 2.0,
  36. ),
  37. ),
  38. ),
  39. new Padding(
  40. padding: new EdgeInsets.only(top: 15.0),
  41. child: new FlatButton(
  42. onPressed: () {
  43. Navigator.pop(context);
  44. },
  45. child: new Text(
  46. "OK",
  47. style: new TextStyle(
  48. fontSize: 18.0,
  49. color: ColorHelpers.blackOrWhiteContrastColor(color),
  50. ),
  51. ),
  52. ),
  53. ),
  54. ],
  55. ),
  56. );
  57. }
  58. }