Skip to content

Commit

Permalink
Add leg to calendar item circle
Browse files Browse the repository at this point in the history
  • Loading branch information
Process-ing committed Oct 26, 2024
1 parent 2578f64 commit 5d83e14
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions packages/uni_ui/lib/calendar/calendar_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,37 @@ class CalendarItem extends StatelessWidget {
fontSize: 11,
),
),
Container(
margin: EdgeInsets.only(top: 5),
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Theme.of(context).colorScheme.primary,
width: 4.0,
Stack(
alignment: Alignment.bottomCenter,
children: [
Container(
margin: EdgeInsets.only(top: 5, bottom: 12),
width: 20,
height: 20,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Theme.of(context).colorScheme.primary,
width: 4.0,
)
),
),
Container(
width: 6,
height: 14,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(3),
bottomRight: Radius.circular(3)
),
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor,
),
)
),
],
),
Container(
margin: const EdgeInsets.all(10),
margin: const EdgeInsets.only(left: 5, right: 5, bottom: 10),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 15),
width: 140,
decoration: ShapeDecoration(
Expand Down Expand Up @@ -90,7 +107,7 @@ class CalendarItem extends StatelessWidget {
? "${start.day} ${monthToString(start.month)}."
: "${start.day}-${end.day} ${monthToString(start.month)}.";
} else {
return "${start.day} ${monthToString(start.month)}. - ${end.day} ${monthToString(end.month)}.";
return "${start.day} ${monthToString(start.month)} - ${end.day} ${monthToString(end.month)}";
}
}
}

0 comments on commit 5d83e14

Please sign in to comment.