mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-18 18:13:46 +02:00
feat: add option to set postCreationFloatingActionButtonColor to override floatingbuttoncolor
This commit is contained in:
parent
2c8d523f32
commit
24c779d43b
4 changed files with 15 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
),
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue