fluro/example/lib/components/demo/demo_simple_component.dart

62 lines
1.7 KiB
Dart
Raw Normal View History

2017-05-14 00:28:28 -04:00
/*
2017-05-14 01:01:02 -04:00
* fluro
2017-05-14 00:28:28 -04:00
* A Posse Production
* http://goposse.com
* Copyright (c) 2017 Posse Productions LLC. All rights reserved.
* See LICENSE for distribution and usage details.
*/
import '../../helpers/color_helpers.dart';
2017-05-14 00:28:28 -04:00
import 'package:flutter/material.dart';
class DemoSimpleComponent extends StatelessWidget {
2017-05-14 00:28:28 -04:00
DemoSimpleComponent({String message = "Testing", Color color = const Color(0xFFFFFFFF)})
2017-05-14 00:28:28 -04:00
: this.message = message,
this.color = color;
final String message;
final Color color;
@override
Widget build(BuildContext context) {
return new Material(
color: color,
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
new Image(
image: new AssetImage("assets/images/acc_boom.png"),
color: ColorHelpers.blackOrWhiteContrastColor(color),
width: 350.0,
),
new Padding(
padding: new EdgeInsets.only(left: 50.0, right: 50.0, top: 15.0),
child: new Text(
message,
textAlign: TextAlign.center,
style: new TextStyle(
color: ColorHelpers.blackOrWhiteContrastColor(color),
height: 2.0,
),
),
),
new Padding(
padding: new EdgeInsets.only(top: 15.0),
child: new FlatButton(
onPressed: () {
Navigator.pop(context);
},
child: new Text(
"OK",
style: new TextStyle(
fontSize: 18.0,
color: ColorHelpers.blackOrWhiteContrastColor(color),
),
),
),
),
],
),
);
}
}