class Crutter::Widget
- Crutter::Widget
- Reference
- Object
Defined in:
crutter.crConstructors
-
.new(type : String)
type is a Flutter Widget type (eg scaffold)
Instance Method Summary
-
#args : Hash(String, Crutter::Widget | String)
Widget args
-
#children : Array(Crutter::Widget)
Widget children.
- #listen : Array(String)
-
#to_h : Hash(String, String | Array(String) | Crutter::Widget | Nil | Array(Crutter::Widget) | Hash(String, Crutter::Widget | String))
Widget to Hash
-
#to_json : String
Widget to JSON
-
#to_pretty_json : String
Widget to pretty JSON
Constructor Detail
Instance Method Detail
def args : Hash(String, Crutter::Widget | String)
#
Widget args
Example:
Container(
height: 56.0, // <- this is an arg
child: ...
);
WARNING Above code is in Dart
def children : Array(Crutter::Widget)
#
Widget children.
If only one child is provided then instead of "children" (Array(Crutter::Widget)
) it becomes "child" (Crutter::Widget
).
Example:
Container(
...
child: Center(...)
);
WARNING Above code is in Dart
def to_h : Hash(String, String | Array(String) | Crutter::Widget | Nil | Array(Crutter::Widget) | Hash(String, Crutter::Widget | String))
#
Widget to Hash