mirror of
https://github.com/Iconica-Development/flutter_nested_categories.git
synced 2025-05-18 23:33:44 +02:00
feat(header_style): add default header style requirement
This commit is contained in:
parent
8a6adbbee3
commit
6ddabf3ed7
2 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ class MyApp extends StatelessWidget {
|
|||
2: theme.textTheme.titleLarge?.copyWith(color: Colors.blue),
|
||||
},
|
||||
defaultStyle:
|
||||
theme.textTheme.titleLarge?.copyWith(color: Colors.green),
|
||||
theme.textTheme.titleLarge!.copyWith(color: Colors.green),
|
||||
),
|
||||
content: [
|
||||
Category(
|
||||
|
|
|
@ -4,15 +4,15 @@ import "package:flutter/widgets.dart";
|
|||
/// The headers are the names of the categories.
|
||||
class CategoryHeaderStyling {
|
||||
const CategoryHeaderStyling({
|
||||
/// The styles for the headers. The key is the depth of the category.
|
||||
/// The value is the text style for the header.
|
||||
required this.headerStyles,
|
||||
|
||||
/// The default style for the headers. This will be used if the depth
|
||||
/// is not found in the [headerStyles].
|
||||
this.defaultStyle,
|
||||
required this.defaultStyle,
|
||||
|
||||
/// The styles for the headers. The key is the depth of the category.
|
||||
/// The value is the text style for the header.
|
||||
this.headerStyles = const {},
|
||||
});
|
||||
|
||||
final Map<int, TextStyle?> headerStyles;
|
||||
final TextStyle? defaultStyle;
|
||||
final TextStyle defaultStyle;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue