Skip to content

Commit

Permalink
Merge pull request #48 from vicolo-dev/fix-theme_duplicate-scroll
Browse files Browse the repository at this point in the history
Fix screen scrolling to top when duplicating a theme
  • Loading branch information
AhsanSarwar45 authored Dec 17, 2023
2 parents f518b35 + 2465a8e commit bf148b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ android {
dev {
dimension "app"
resValue "string", "app_name","Chrono Dev"
versionNameSuffix "-dev",
// versionNameSuffix "-dev",
applicationIdSuffix ".free"
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/common/widgets/list/custom_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ class _CustomListViewState<Item extends ListItem>
// if (_scrollController.offset == 0) {
// _scrollController.jumpTo(1);
// }
print(_controller.computeItemBox(0));
if (_itemCardHeight == 0) return;
_scrollController.animateTo(index * _itemCardHeight,
duration: const Duration(milliseconds: 250), curve: Curves.easeIn);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/theme/widgets/theme_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import 'package:flutter/material.dart';

class ThemeCard<Item extends ThemeItem> extends StatelessWidget {
const ThemeCard({
Key? key,
super.key,
required this.themeItem,
required this.onPressEdit,
required this.isSelected,
required this.getThemeFromItem,
required this.onPressDelete,
required this.onPressDuplicate,
}) : super(key: key);
});

final Item themeItem;
final VoidCallback onPressEdit;
Expand Down

0 comments on commit bf148b9

Please sign in to comment.