Daisy c3d55d225b 1,新增门锁日志日历组件源文件
2,优化门锁日志UI参考米家
2024-01-26 14:28:02 +08:00

37 lines
877 B
Dart

part of 'widget.dart';
/// Week day names line.
class WeekDays extends StatelessWidget {
const WeekDays({
Key? key,
this.weekNames = const <String>['', '', '', '', '', '', ''],
this.style,
required this.keepLineSize,
}) : assert(weekNames.length == 7, '`weekNames` must have length 7'),
super(key: key);
/// Week day names.
final List<String> weekNames;
/// Text style.
final TextStyle? style;
final bool keepLineSize;
@override
Widget build(BuildContext context) {
return DefaultTextStyle(
style: style!,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: List.generate(weekNames.length, (index) {
return DateBox(
child: Text(weekNames[index]),
);
}),
),
);
}
}