feat: add option to set postCreationFloatingActionButtonColor to override floatingbuttoncolor

This commit is contained in:
Freek van de Ven 2024-05-17 14:57:01 +02:00
parent 2c8d523f32
commit 24c779d43b
4 changed files with 15 additions and 2 deletions

View file

@ -5,6 +5,7 @@
- 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
- Set an optional max length on the default post title input field
- Add a postCreationFloatingActionButtonColor to the timeline theme to set the color of the floating action button
## 3.0.1

View file

@ -44,7 +44,11 @@ List<GoRoute> getTimelineStoryRoutes({
);
var button = FloatingActionButton(
backgroundColor: const Color(0xff71C6D1),
backgroundColor: config
.optionsBuilder(context)
.theme
.postCreationFloatingActionButtonColor ??
const Color(0xff71C6D1),
onPressed: () async => context.push(
TimelineUserStoryRoutes.timelineCategorySelection,
),

View file

@ -65,7 +65,11 @@ Widget _timelineScreenRoute({
);
var button = FloatingActionButton(
backgroundColor: const Color(0xff71C6D1),
backgroundColor: config
.optionsBuilder(context)
.theme
.postCreationFloatingActionButtonColor ??
const Color(0xff71C6D1),
onPressed: () async => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => _postCategorySelectionScreen(

View file

@ -16,6 +16,7 @@ class TimelineTheme {
this.moreIcon,
this.deleteIcon,
this.categorySelectionBorderColor,
this.postCreationFloatingActionButtonColor,
this.textStyles = const TimelineTextStyles(),
});
@ -44,4 +45,7 @@ class TimelineTheme {
/// The color of the border around the category in the selection screen
final Color? categorySelectionBorderColor;
/// The color of the floating action button on the overview screen
final Color? postCreationFloatingActionButtonColor;
}