Skip to content

Commit

Permalink
fix: Simplify table border configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshub024 committed Jan 21, 2025
1 parent ff847ad commit a2481a4
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 328 deletions.
7 changes: 2 additions & 5 deletions examples/mirai_gallery/assets/json/table_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
"value": 1
},
"border": {
"type": "tableBorder",
"borderSide": {
"color": "#000000",
"width": 1.0
}
"color": "#000000",
"width": 1.0
},
"children": [
{
Expand Down
11 changes: 4 additions & 7 deletions packages/mirai/lib/src/parsers/mirai_table/mirai_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ class MiraiTableRow with _$MiraiTableRow {
@freezed
class MiraiTableBorder with _$MiraiTableBorder {
const factory MiraiTableBorder({
MiraiBorderSide? top,
MiraiBorderSide? right,
MiraiBorderSide? bottom,
MiraiBorderSide? left,
MiraiBorderSide? horizontalInside,
MiraiBorderSide? verticalInside,
MiraiBorderRadius? borderRadius,
@Default('#000000') String color,
@Default(1.0) double width,
@Default(BorderStyle.solid) BorderStyle style,
@Default(MiraiBorderRadius()) MiraiBorderRadius borderRadius,
}) = _MiraiTableBorder;

factory MiraiTableBorder.fromJson(Map<String, dynamic> json) =>
Expand Down
Loading

0 comments on commit a2481a4

Please sign in to comment.