-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
close #48 - added hoverTextStyle property #49
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f6767f7
close #48 - added hoverTextStyle property
MaurizioSodano 26d138f
Merge branch 'release/0.0.1'
MaurizioSodano 61b199b
#48 -format
MaurizioSodano f29aef2
Merge tag 'v0.0.1' into develop
MaurizioSodano c52a289
Fix format workflow
Frezyx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"git-blame.gitWebUrl": "" | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SidebarXTheme { | ||
const SidebarXTheme({ | ||
this.width = 70, | ||
this.height = double.infinity, | ||
this.padding = EdgeInsets.zero, | ||
this.margin = EdgeInsets.zero, | ||
this.decoration, | ||
this.iconTheme, | ||
this.selectedIconTheme, | ||
this.textStyle, | ||
this.selectedTextStyle, | ||
this.itemDecoration, | ||
this.selectedItemDecoration, | ||
this.itemMargin, | ||
this.selectedItemMargin, | ||
this.itemPadding, | ||
this.selectedItemPadding, | ||
this.itemTextPadding, | ||
this.selectedItemTextPadding, | ||
this.hoverColor, | ||
}); | ||
const SidebarXTheme( | ||
{this.width = 70, | ||
this.height = double.infinity, | ||
this.padding = EdgeInsets.zero, | ||
this.margin = EdgeInsets.zero, | ||
this.decoration, | ||
this.iconTheme, | ||
this.selectedIconTheme, | ||
this.textStyle, | ||
this.selectedTextStyle, | ||
this.itemDecoration, | ||
this.selectedItemDecoration, | ||
this.itemMargin, | ||
this.selectedItemMargin, | ||
this.itemPadding, | ||
this.selectedItemPadding, | ||
this.itemTextPadding, | ||
this.selectedItemTextPadding, | ||
this.hoverColor, | ||
this.hoverTextStyle}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add comma here |
||
|
||
/// [SidebarX] width | ||
final double width; | ||
|
@@ -77,6 +77,10 @@ class SidebarXTheme { | |
/// cursor hover over an item | ||
final Color? hoverColor; | ||
|
||
/// [SidebarXItem] text style when the mouse | ||
/// cursor hover over an item | ||
final TextStyle? hoverTextStyle; | ||
|
||
/// Method to get default flutter theme settings | ||
SidebarXTheme mergeFlutterTheme(BuildContext context) { | ||
final theme = Theme.of(context); | ||
|
@@ -101,6 +105,8 @@ class SidebarXTheme { | |
itemTextPadding: itemTextPadding, | ||
selectedItemTextPadding: selectedItemTextPadding, | ||
hoverColor: hoverColor ?? theme.hoverColor, | ||
hoverTextStyle: hoverTextStyle ?? | ||
theme.textTheme.bodyMedium?.copyWith(color: theme.primaryColor), | ||
); | ||
return mergedTheme; | ||
} | ||
|
@@ -130,6 +136,7 @@ class SidebarXTheme { | |
selectedItemDecoration: | ||
selectedItemDecoration ?? theme.selectedItemDecoration, | ||
hoverColor: hoverColor ?? theme.hoverColor, | ||
hoverTextStyle: hoverTextStyle ?? theme.hoverTextStyle, | ||
); | ||
} | ||
|
||
|
@@ -153,28 +160,29 @@ class SidebarXTheme { | |
EdgeInsets? itemTextPadding, | ||
EdgeInsets? selectedItemTextPadding, | ||
Color? hoverColor, | ||
TextStyle? hoverTextStyle, | ||
}) { | ||
return SidebarXTheme( | ||
width: width ?? this.width, | ||
height: height ?? this.height, | ||
padding: padding ?? this.padding, | ||
margin: margin ?? this.margin, | ||
decoration: decoration ?? this.decoration, | ||
iconTheme: iconTheme ?? this.iconTheme, | ||
selectedIconTheme: selectedIconTheme ?? this.selectedIconTheme, | ||
textStyle: textStyle ?? this.textStyle, | ||
selectedTextStyle: selectedTextStyle ?? this.selectedTextStyle, | ||
itemDecoration: itemDecoration ?? this.itemDecoration, | ||
selectedItemDecoration: | ||
selectedItemDecoration ?? this.selectedItemDecoration, | ||
itemMargin: itemMargin ?? this.itemMargin, | ||
selectedItemMargin: selectedItemMargin ?? this.selectedItemMargin, | ||
itemPadding: itemPadding ?? this.itemPadding, | ||
selectedItemPadding: selectedItemPadding ?? this.selectedItemPadding, | ||
itemTextPadding: itemTextPadding ?? this.itemTextPadding, | ||
selectedItemTextPadding: | ||
selectedItemTextPadding ?? this.selectedItemTextPadding, | ||
hoverColor: hoverColor ?? this.hoverColor, | ||
); | ||
width: width ?? this.width, | ||
height: height ?? this.height, | ||
padding: padding ?? this.padding, | ||
margin: margin ?? this.margin, | ||
decoration: decoration ?? this.decoration, | ||
iconTheme: iconTheme ?? this.iconTheme, | ||
selectedIconTheme: selectedIconTheme ?? this.selectedIconTheme, | ||
textStyle: textStyle ?? this.textStyle, | ||
selectedTextStyle: selectedTextStyle ?? this.selectedTextStyle, | ||
itemDecoration: itemDecoration ?? this.itemDecoration, | ||
selectedItemDecoration: | ||
selectedItemDecoration ?? this.selectedItemDecoration, | ||
itemMargin: itemMargin ?? this.itemMargin, | ||
selectedItemMargin: selectedItemMargin ?? this.selectedItemMargin, | ||
itemPadding: itemPadding ?? this.itemPadding, | ||
selectedItemPadding: selectedItemPadding ?? this.selectedItemPadding, | ||
itemTextPadding: itemTextPadding ?? this.itemTextPadding, | ||
selectedItemTextPadding: | ||
selectedItemTextPadding ?? this.selectedItemTextPadding, | ||
hoverColor: hoverColor ?? this.hoverColor, | ||
hoverTextStyle: hoverTextStyle ?? this.hoverTextStyle); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add comma here |
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this changes from pr?