minor fixes
This commit is contained in:
parent
a8bab93035
commit
4690fac4f6
2 changed files with 7 additions and 4 deletions
|
@ -36,7 +36,7 @@ class SectionHeader extends StatelessWidget {
|
||||||
padding: padding,
|
padding: padding,
|
||||||
constraints: BoxConstraints(minHeight: leadingDimension),
|
constraints: BoxConstraints(minHeight: leadingDimension),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => _toggleSectionSelection(context),
|
onTap: selectable ? () => _toggleSectionSelection(context) : null,
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
|
@ -53,7 +53,7 @@ class SectionHeader extends StatelessWidget {
|
||||||
child: leading,
|
child: leading,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
onPressed: () => _toggleSectionSelection(context),
|
onPressed: selectable ? () => _toggleSectionSelection(context) : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import 'dart:math';
|
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:aves/theme/durations.dart';
|
import 'package:aves/theme/durations.dart';
|
||||||
|
@ -153,7 +152,11 @@ class _GridScaleGestureDetectorState<T> extends State<GridScaleGestureDetector<T
|
||||||
final appBarHeight = widget.appBarHeightNotifier.value;
|
final appBarHeight = widget.appBarHeightNotifier.value;
|
||||||
final scrollOffset = tileRect.top + (tileRect.height - scrollableHeight) / 2 + appBarHeight;
|
final scrollOffset = tileRect.top + (tileRect.height - scrollableHeight) / 2 + appBarHeight;
|
||||||
|
|
||||||
PrimaryScrollController.of(context)?.jumpTo(max(.0, scrollOffset));
|
final controller = PrimaryScrollController.of(context);
|
||||||
|
if (controller != null) {
|
||||||
|
final maxScrollExtent = controller.position.maxScrollExtent;
|
||||||
|
controller.jumpTo(scrollOffset.clamp(.0, maxScrollExtent));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue