build method

  1. @override
Widget build(
  1. BuildContext context, {
  2. EdgeInsets margin = const EdgeInsets.all(0),
  3. Axis orientation = Axis.horizontal,
  4. bool compact = false,
  5. bool floating = false,
})
override

Implementation

@override
Widget build(
  BuildContext context, {
  EdgeInsets margin = const EdgeInsets.all(0),
  Axis orientation = Axis.horizontal,
  bool compact = false,
  bool floating = false,
}) {
  final theme = Theme.of(context);
  if (orientation == Axis.horizontal) {
    return SizedBox(
      height: length,
      child: VerticalDivider(
        color: theme.colorScheme.onSurface.withValues(alpha: 0.5),
      ),
    );
  } else {
    return SizedBox(
      width: length,
      child: Divider(
        color: theme.colorScheme.onSurface.withValues(alpha: 0.5),
      ),
    );
  }
}