class Crutter::Widget

Defined in:

crutter.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : String) #

type is a Flutter Widget type (eg scaffold)


[View source]

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


[View source]
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


[View source]
def listen : Array(String) #

[View source]
def to_h : Hash(String, String | Array(String) | Crutter::Widget | Nil | Array(Crutter::Widget) | Hash(String, Crutter::Widget | String)) #

Widget to Hash


[View source]
def to_json : String #

Widget to JSON


[View source]
def to_pretty_json : String #

Widget to pretty JSON


[View source]