有默认值参数的多参数重载函数导出会报错!
danyow opened this issue · 2 comments
danyow commented
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = null, ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, SliverChildDelegate childrenDelegate = null, float? cacheExtent = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start);
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = null, ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = null, List<Widget> children = null);
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = null, ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, SliverGridDelegate gridDelegate = null, IndexedWidgetBuilder itemBuilder = null, int? itemCount = null, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = null);
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = null, ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, int? crossAxisCount = null, float mainAxisSpacing = 0, float crossAxisSpacing = 0, float childAspectRatio = 1, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, float? cacheExtent = null, List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start);
public GridView(Key key = null, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController controller = null, bool? primary = null, ScrollPhysics physics = null, bool shrinkWrap = false, EdgeInsets padding = null, float? maxCrossAxisExtent = null, float mainAxisSpacing = 0, float crossAxisSpacing = 0, float childAspectRatio = 1, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, List<Widget> children = null, DragStartBehavior dragStartBehavior = DragStartBehavior.start);
错误信息:
error CS0121: The call is ambiguous between the following methods or properties: 'GridView.GridView(Key, Axis, bool, ScrollController, bool?, ScrollPhysics, bool, EdgeInsets, SliverGridDelegate, bool, bool, float?, List<Widget>)' and 'GridView.GridView(Key, Axis, bool, ScrollController, bool?, ScrollPhysics, bool, EdgeInsets, SliverGridDelegate, IndexedWidgetBuilder, int?, bool, bool, float?)'
没找到对应的解决方案
topameng commented
lua 参数匹配没什么问题,就是你的调用函数+默认参数情况下,造成c#两个函数二义性了,你在c#那么调用他也会二义性
danyow commented
那请问下有什么解决方案吗?