-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathTestFreeLayout2.dart
38 lines (32 loc) · 1.07 KB
/
TestFreeLayout2.dart
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
//Test Code: TestFreeLayout1
import 'package:rikulo_ui/view.dart';
void main() {
final View mainView = new View()..addToDocument();
mainView.style.backgroundColor = "#cca";
View view = new View();
view.style.backgroundColor = "#ddb";
view.style.border = "5px solid #885";
view.profile.anchor = "parent";
view.profile.location = "center center";
view.profile.width = "70%";
view.profile.height = "80%";
mainView.addChild(view);
TextView txt = new TextView("child (right top)");
txt.style.border = "1px solid #555";
txt.profile.anchorView = view;
txt.profile.location = "right top";
txt.profile.width = "flex";
view.addChild(txt);
txt = new TextView("child (left bottom)");
txt.style.border = "1px solid #555";
txt.profile.anchorView = view;
txt.profile.location = "left bottom";
txt.profile.width = "flex";
view.addChild(txt);
txt = new TextView("sibling (left center)");
txt.style.border = "1px solid #555";
txt.profile.anchorView = view;
txt.profile.location = "left center";
txt.profile.width = "flex";
mainView.addChild(txt);
}