build method
Widget
build({
- required BuildContext context,
- required Map<
String, dynamic> creationParams, - required FeedViewPlatformCallbacksHandler feedViewPlatformCallbacksHandler,
- FeedViewPlatformCreatedCallback? onFeedViewPlatformCreated,
- Set<
Factory< ? gestureRecognizers,OneSequenceGestureRecognizer> >
Implementation
@override
Widget build({
required BuildContext context,
required Map<String, dynamic> creationParams,
required FeedViewPlatformCallbacksHandler feedViewPlatformCallbacksHandler,
FeedViewPlatformCreatedCallback? onFeedViewPlatformCreated,
Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
}) {
return GestureDetector(
// We prevent text selection by intercepting the long press event.
// This is a temporary stop gap due to issues with text selection on Android:
// https://github.com/flutter/flutter/issues/24585 - the text selection
// dialog is not responding to touch events.
// https://github.com/flutter/flutter/issues/24584 - the text selection
// handles are not showing.
// TODO(amirh): remove this when the issues above are fixed.
onLongPress: () {},
excludeFromSemantics: true,
child: AndroidView(
viewType: kFeedViewType,
gestureRecognizers: gestureRecognizers ??
const <Factory<OneSequenceGestureRecognizer>>{},
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
onPlatformViewCreated: (id) {
if (onFeedViewPlatformCreated == null) {
return;
}
onFeedViewPlatformCreated(MethodChannelFeedViewPlatform(
id,
feedViewPlatformCallbacksHandler,
));
},
),
);
}