-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathusage_example.dart
More file actions
41 lines (37 loc) · 913 Bytes
/
usage_example.dart
File metadata and controls
41 lines (37 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import 'package:flutter/material.dart';
import 'package:pigment/pigment.dart';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Pigment Example',
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
backgroundColor: Pigment.fromString("blue"),
appBar: new AppBar(
title: new Text("Pigment Example"),
),
body: new Center(
child: new Text(
'Hello, World!',
style: new TextStyle(
color: Pigment.fromCSSColor(CSSColor.lightgoldenrodyellow),
),
),
),
);
}
}