Skip to content

Commit

Permalink
fix: wrong migration (flutter#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanv8060 authored Mar 30, 2022
1 parent 93d406a commit d30749b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/pages/category_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class _CategoryListItemState extends State<CategoryListItem>
late Animation<EdgeInsetsGeometry> _headerMargin;
late Animation<EdgeInsetsGeometry> _headerImagePadding;
late Animation<EdgeInsetsGeometry> _childrenPadding;
late Animation<BorderRadius> _headerBorderRadius;
late Animation<BorderRadius?> _headerBorderRadius;

@override
void initState() {
Expand Down Expand Up @@ -76,7 +76,7 @@ class _CategoryListItemState extends State<CategoryListItem>
_headerBorderRadius = BorderRadiusTween(
begin: BorderRadius.circular(10),
end: BorderRadius.zero,
).animate(_controller) as Animation<BorderRadius>;
).animate(_controller);

if (widget.initiallyExpanded) {
_controller.value = 1.0;
Expand Down Expand Up @@ -121,7 +121,7 @@ class _CategoryListItemState extends State<CategoryListItem>
_CategoryHeader(
margin: _headerMargin.value,
imagePadding: _headerImagePadding.value,
borderRadius: _headerBorderRadius.value,
borderRadius: _headerBorderRadius.value!,
height: _headerHeight.value,
chevronOpacity: _headerChevronOpacity.value,
imageString: widget.imageString,
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/settings_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class _SettingsListItemState<T> extends State<SettingsListItem<T?>>
late Animation<EdgeInsetsGeometry> _headerMargin;
late Animation<EdgeInsetsGeometry> _headerPadding;
late Animation<EdgeInsetsGeometry> _childrenPadding;
late Animation<BorderRadius> _headerBorderRadius;
late Animation<BorderRadius?> _headerBorderRadius;

// For ease of use. Correspond to the keys and values of `widget.optionsMap`.
late Iterable<T?> _options;
Expand Down Expand Up @@ -139,7 +139,7 @@ class _SettingsListItemState<T> extends State<SettingsListItem<T?>>
_headerBorderRadius = BorderRadiusTween(
begin: settingItemBorderRadius,
end: BorderRadius.zero,
).animate(_controller) as Animation<BorderRadius>;
).animate(_controller);

if (widget.isExpanded) {
_controller.value = 1.0;
Expand Down Expand Up @@ -174,7 +174,7 @@ class _SettingsListItemState<T> extends State<SettingsListItem<T?>>
_CategoryHeader(
margin: _headerMargin.value,
padding: _headerPadding.value,
borderRadius: _headerBorderRadius.value,
borderRadius: _headerBorderRadius.value!,
subtitleHeight: _headerSubtitleHeight,
chevronRotation: _headerChevronRotation,
title: widget.title,
Expand Down

0 comments on commit d30749b

Please sign in to comment.