bottomSheet抖动导致拖动错误

时间:2019-08-08 07:12:57

标签: flutter dart

代码:

@override
Widget build(BuildContext context) {
  return Scaffold(
    bottomSheet: BottomSheet(
      onClosing: () => print("not getting called"),
      builder: (_) => Container(color: Colors.blue, height: 200),
    ),
  );
}

错误(在向下拖动时):

When the exception was thrown, this was the stack:
flutter: #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
flutter: #1      _BottomSheetState._dismissUnderway (package:flutter/src/material/bottom_sheet.dart:145:59)
flutter: #2      _BottomSheetState._handleDragUpdate (package:flutter/src/material/bottom_sheet.dart:149:9)
...

我知道我可以使用showBottomSheet()函数并且它可以正常工作,但是我只是想知道为什么BottomSheet小部件无法正常工作。

0 个答案:

没有答案