Skip to content

Replace deprecated bodyText1 with bodyLarge #19

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _SimpleMultiSelectContainerState<T>

@override
void didUpdateWidget(MultiSelectContainer<T> oldWidget) {
_addInitiallySelectedItemsToSelectedList();
_setPerpetualSelectedItemsCount();
if (widget.controller != null) {
widget.controller!.deselectAll = oldWidget.controller!.deselectAll;
widget.controller!.getSelectedItems =
Expand All @@ -140,6 +140,13 @@ class _SimpleMultiSelectContainerState<T>
setState(() {});
}

// find perpetual selected items count
void _setPerpetualSelectedItemsCount() {
_perpetualSelectedItemsCount =
_items.where((item) => item.perpetualSelected).length;
setState(() {});
}

// Deselect all selected items excluding Perpetual Selected Items
// for controller deselect call back
void _deSelectAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ class CheckListViewInitialTS extends MultiSelectTextStyles {
@override
TextStyle getTextStyle(BuildContext context) {
final theme = Theme.of(context);
final TextStyle style = theme.textTheme.bodyText1!;
final TextStyle style = theme.textTheme.bodyLarge!;
return textStyle ?? style;
}

@override
TextStyle getSelectedTextStyle(BuildContext context) {
final theme = Theme.of(context);
final TextStyle style = theme.textTheme.bodyText1!;
final TextStyle style = theme.textTheme.bodyLarge!;
return selectedTextStyle ?? style;
}

@override
TextStyle getDisabledTextStyle(BuildContext context) {
final theme = Theme.of(context);
final TextStyle style = theme.textTheme.bodyText1!;
final TextStyle style = theme.textTheme.bodyLarge!;
final Color? color = theme.textTheme.caption!.color;
return disabledTextStyle ?? style.copyWith(color: color);
}
Expand Down