attachView method

  1. @override
Future<bool> attachView(
  1. String childId,
  2. String parentId,
  3. int index
)
override

Attach a child view to a parent at the specified index

Implementation

@override
Future<bool> attachView(String childId, String parentId, int index) async {
  try {
    final result = await bridgeChannel.invokeMethod<bool>('attachView', {
      'childId': childId,
      'parentId': parentId,
      'index': index,
    });
    return result ?? false;
  } catch (e) {
    debugPrint('Method channel attachView error: $e');
    return false;
  }
}