You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aku_new_community/lib/widget/bee_divider.dart

57 lines
1.4 KiB

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class BeeDivider extends StatelessWidget {
4 years ago
final double? thickness;
final double? indent;
final double? endIndent;
final Color? color;
final bool? isHorizontal;
3 years ago
BeeDivider(
4 years ago
{Key? key,
this.thickness,
this.indent,
this.endIndent,
this.color,
this.isHorizontal = true})
: super(key: key);
3 years ago
BeeDivider.horizontal({
4 years ago
Key? key,
this.indent,
this.endIndent,
}) : thickness = 1.w,
color = Color(0xFFE8E8E8),
isHorizontal = true,
super(key: key);
3 years ago
BeeDivider.vertical({
4 years ago
Key? key,
this.indent,
this.endIndent,
}) : thickness = 1.w,
color = Color(0xFFE8E8E8),
isHorizontal = false,
super(key: key);
3 years ago
@override
Widget build(BuildContext context) {
4 years ago
return isHorizontal!
? Divider(
height: 0,
thickness: this.thickness ?? 1.w,
indent: this.indent ?? 0,
endIndent: this.endIndent ?? 0,
color: this.color ?? Color(0xFFE8E8E8),
)
: VerticalDivider(
width: 0,
thickness: this.thickness ?? 1.w,
indent: this.indent ?? 0,
endIndent: this.endIndent ?? 0,
color: this.color ?? Color(0xFFE8E8E8),
);
}
}