mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 10:33:44 +02:00
fix: filter out timeline categories with key null when creating a new one
This commit is contained in:
parent
13960c4f1c
commit
8d13e4af27
3 changed files with 9 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
- Add a serviceBuilder to the userstory configuration
|
||||
- Add a listHeaderBuilder for showing a header at the top of the list of posts in the timeline
|
||||
- Add a getUserId function to retrieve the userId when needed in the userstory configuration
|
||||
- Fix the timelinecategory selection by removing the categories with key null
|
||||
|
||||
## 3.0.1
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ class TimelineTheme {
|
|||
this.sendIcon,
|
||||
this.moreIcon,
|
||||
this.deleteIcon,
|
||||
this.categorySelectionBorderColor,
|
||||
this.textStyles = const TimelineTextStyles(),
|
||||
});
|
||||
|
||||
|
@ -38,5 +39,9 @@ class TimelineTheme {
|
|||
/// The icon for delete action (delete post)
|
||||
final Widget? deleteIcon;
|
||||
|
||||
/// The text style overrides for all the texts in the timeline
|
||||
final TimelineTextStyles textStyles;
|
||||
|
||||
/// The color of the border around the category in the selection screen
|
||||
final Color? categorySelectionBorderColor;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class TimelineSelectionScreen extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 4),
|
||||
for (var category in categories.where(
|
||||
(element) => element.canCreate,
|
||||
(element) => element.canCreate && element.key != null,
|
||||
)) ...[
|
||||
options.categorySelectorButtonBuilder?.call(
|
||||
context,
|
||||
|
@ -55,7 +55,8 @@ class TimelineSelectionScreen extends StatelessWidget {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(
|
||||
color: const Color(0xff71C6D1),
|
||||
color: options.theme.categorySelectionBorderColor ??
|
||||
const Color(0xff71C6D1),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue