showVoiceRecordOverlay function

Future<String?> showVoiceRecordOverlay({
  1. required BuildContext context,
  2. Color? themeColor,
  3. int maxDuration = 60,
  4. bool useGlobalService = true,
})

显示底部半透明语音录入面板(Siri 风格动效)。

Implementation

Future<String?> showVoiceRecordOverlay({
  required BuildContext context,
  Color? themeColor,
  int maxDuration = 60,
  bool useGlobalService = true,
}) {
  return showModalBottomSheet<String>(
    context: context,
    isDismissible: false,
    enableDrag: false,
    isScrollControlled: true,
    backgroundColor: Colors.transparent,
    builder: (context) {
      return _VoiceRecordOverlay(
        themeColor: themeColor,
        maxDuration: maxDuration,
        useGlobalService: useGlobalService,
      );
    },
  );
}