2022-11-01 09:46:23 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Iconica
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2022-08-26 09:04:08 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-08-24 13:32:35 +02:00
|
|
|
|
|
|
|
class TableTheme {
|
2022-08-26 09:04:08 +02:00
|
|
|
/// The [TableTheme] to style the [Table] with. Configure the line, text
|
|
|
|
/// and offsets here.
|
2022-08-24 13:32:35 +02:00
|
|
|
const TableTheme({
|
|
|
|
this.lineColor = const Color(0x809E9E9E),
|
2022-11-18 15:26:26 +01:00
|
|
|
this.lineStrokeWidth = 2,
|
2022-08-26 09:04:08 +02:00
|
|
|
this.tableTextOffset = 5,
|
2022-11-08 10:33:48 +01:00
|
|
|
this.lineDashDistance = 10,
|
|
|
|
this.lineDashLength = 10,
|
2022-09-01 12:05:37 +02:00
|
|
|
this.timeStyle,
|
|
|
|
this.tablePaddingStart = 10,
|
|
|
|
this.tablePaddingEnd = 15,
|
|
|
|
this.blockPaddingBetween = 0,
|
2022-08-24 13:32:35 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
/// The color of the lines.
|
|
|
|
final Color lineColor;
|
|
|
|
|
|
|
|
/// The height of the lines.
|
2022-11-18 15:26:26 +01:00
|
|
|
final double lineStrokeWidth;
|
2022-08-24 13:32:35 +02:00
|
|
|
|
2022-11-08 10:33:48 +01:00
|
|
|
/// The distance between dashes on the line.
|
|
|
|
final double lineDashDistance;
|
|
|
|
|
|
|
|
/// The length of the dashes on the line.
|
|
|
|
final double lineDashLength;
|
2022-08-26 09:04:08 +02:00
|
|
|
|
|
|
|
/// Distance between the time text and the line.
|
|
|
|
final double tableTextOffset;
|
|
|
|
|
2022-08-24 13:32:35 +02:00
|
|
|
/// The style of the time text.
|
2022-09-01 12:05:37 +02:00
|
|
|
final TextStyle? timeStyle;
|
|
|
|
|
|
|
|
/// The padding between the table markings and the first block.
|
|
|
|
final double tablePaddingStart;
|
|
|
|
|
|
|
|
/// The padding between the last block and the end of the table.
|
|
|
|
final double tablePaddingEnd;
|
|
|
|
|
|
|
|
/// The padding between two blocks.
|
|
|
|
final double blockPaddingBetween;
|
2022-08-24 13:32:35 +02:00
|
|
|
}
|