mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-02 16:50:13 +08:00
opt scrollable gesture
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:PiliPlus/models_new/video/video_ai_conclusion/model_result.dart'
|
||||
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
|
||||
import 'package:PiliPlus/pages/video/controller.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -166,30 +165,21 @@ class _AiDetailState extends State<AiConclusionPanel>
|
||||
}
|
||||
|
||||
late Key _key;
|
||||
late bool _isNested;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final controller = PrimaryScrollController.of(context);
|
||||
_isNested = controller is ExtendedNestedScrollController;
|
||||
_key = ValueKey(controller.hashCode);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget buildList(ThemeData theme) {
|
||||
final child = AiConclusionPanel.buildContent(
|
||||
return AiConclusionPanel.buildContent(
|
||||
context,
|
||||
theme,
|
||||
widget.item,
|
||||
key: _key,
|
||||
);
|
||||
if (_isNested) {
|
||||
return ExtendedVisibilityDetector(
|
||||
uniqueKey: const Key('ai-conclusion'),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user