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.

62 lines
1.5 KiB

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
///自定义分割线
class AkuDiveder {
final bool isReverse; //颜色方向反转
const AkuDiveder({Key key, this.isReverse = false});
Widget verticalDivider(double height) {
return Container(
width: 1.w,
height: height,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: isReverse
? [
Color(0xFFE8E8E8),
Color(0xFFFFFFFF),
]
: [
Color(0xFFFFFFFF),
Color(0xFFE8E8E8),
])),
);
}
Widget horizontalDivider(double width) {
return Container(
width: width,
height: 1.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: isReverse
? [
Color(0xFFE8E8E8),
Color(0xFFFFFFFF),
]
: [
Color(0xFFFFFFFF),
Color(0xFFE8E8E8),
])),
);
}
}
class AkuBox {
static h(double height) {
return SizedBox(
height: height.w,
);
}
static w(double width) {
return SizedBox(
width: width.w,
);
}
}