ElPositioned.directional constructor

ElPositioned.directional({
  1. Key? key,
  2. required TextDirection textDirection,
  3. required Object id,
  4. int index = 0,
  5. double? start,
  6. double? top,
  7. double? end,
  8. double? bottom,
  9. double? width,
  10. double? height,
  11. required Widget child,
})

Implementation

factory ElPositioned.directional({
  Key? key,
  required TextDirection textDirection,
  required Object id,
  int index = 0,
  double? start,
  double? top,
  double? end,
  double? bottom,
  double? width,
  double? height,
  required Widget child,
}) {
  final (double? left, double? right) = switch (textDirection) {
    TextDirection.rtl => (end, start),
    TextDirection.ltr => (start, end),
  };
  return ElPositioned(
    key: key,
    id: id,
    index: index,
    left: left,
    top: top,
    right: right,
    bottom: bottom,
    width: width,
    height: height,
    child: child,
  );
}