build method
Widget
build(
- BuildContext context, {
- EdgeInsets margin = const EdgeInsets.all(0),
- Axis orientation = Axis.horizontal,
- bool compact = false,
- 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),
),
);
}
}