buildWidget method
Implementation
Widget buildWidget(BuildContext context) {
final Map<String, dynamic> creationParams = <String, dynamic>{};
if (Platform.isAndroid) {
return SizedBox(
height: max(height, 1),
width: double.infinity,
child: Container(
// decoration: const BoxDecoration(color: Colors.yellow),
padding: const EdgeInsets.all(0),
child: AndroidView(
viewType: viewType,
onPlatformViewCreated: (int id) =>
_createCardCollectController(id),
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
),
),
);
} else if (Platform.isIOS) {
return SizedBox(
height: max(height, 170),
width: double.infinity,
child: Container(
// decoration: const BoxDecoration(color: Colors.black26),
padding: const EdgeInsets.all(0),
child: UiKitView(
viewType: viewType,
onPlatformViewCreated: (int id) =>
_createCardCollectController(id),
layoutDirection: TextDirection.ltr,
creationParams: creationParams,
creationParamsCodec: const StandardMessageCodec(),
),
),
);
}
return const SizedBox(height: 20, width: double.infinity);
}