mirror of
https://github.com/Iconica-Development/flutter_nested_categories.git
synced 2025-05-19 07:43:45 +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),
|
2: theme.textTheme.titleLarge?.copyWith(color: Colors.blue),
|
||||||
},
|
},
|
||||||
defaultStyle:
|
defaultStyle:
|
||||||
theme.textTheme.titleLarge?.copyWith(color: Colors.green),
|
theme.textTheme.titleLarge!.copyWith(color: Colors.green),
|
||||||
),
|
),
|
||||||
content: [
|
content: [
|
||||||
Category(
|
Category(
|
||||||
|
|
|
@ -4,15 +4,15 @@ import "package:flutter/widgets.dart";
|
||||||
/// The headers are the names of the categories.
|
/// The headers are the names of the categories.
|
||||||
class CategoryHeaderStyling {
|
class CategoryHeaderStyling {
|
||||||
const 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
|
/// The default style for the headers. This will be used if the depth
|
||||||
/// is not found in the [headerStyles].
|
/// 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 Map<int, TextStyle?> headerStyles;
|
||||||
final TextStyle? defaultStyle;
|
final TextStyle defaultStyle;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue