Positioned constructor

Positioned({
  1. num? left,
  2. num? top,
  3. num? right,
  4. num? bottom,
  5. num? width,
  6. num? height,
  7. required BloomNode child,
})

Creates an absolutely positioned child within a Stack.

Positioned(left: 4, top: 4, child: StyledText('Badge'));

Implementation

Positioned(
    {num? left,
    num? top,
    num? right,
    num? bottom,
    num? width,
    num? height,
    required BloomNode child})
    : super('div',
          children: [child],
          style: _css([
            'position: absolute',
            if (left != null) 'left: ${_px(left)}',
            if (top != null) 'top: ${_px(top)}',
            if (right != null) 'right: ${_px(right)}',
            if (bottom != null) 'bottom: ${_px(bottom)}',
            if (width != null) 'width: ${_px(width)}',
            if (height != null) 'height: ${_px(height)}'
          ]));