본문 바로가기

UserInterface2

Flutter 플러터에서 모달 바텀 시트를 프로그래밍 방식으로 닫는 방법, Close modal bottom sheet programmatically in flutter 질문 저는 showModalBottomSheet()를 통해 BottomSheet를 표시하고 여러 위젯과 GestureDetector 내부에서 작동합니다. BottomSheet를 바깥쪽을 터치하여 닫는 것뿐만 아니라, GestureDetector 내부의 onTap 이벤트 후에도 닫히기를 원합니다. 그러나 GestureDetector가 터치 이벤트를 전달하지 않는 것 같습니다. 그래서 ModalBottomSheet를 프로그래밍 방식으로 닫거나 GestureDetector가 터치 이벤트를 전달하도록 지시하는 방법이 있는지 궁금합니다. 업데이트 (2018-04-12): 더 잘 이해하기 위해 코드 스니펫을 따릅니다. "아이템 1" 또는 "아이템 2"를 탭할 때 ModalBottomSheet가 닫히지 않는 문제가 .. 2023. 5. 31.
Flutter에서 "frosted glass" 효과를 어떻게 구현하나요?, How do I do the "frosted glass" effect in Flutter? 질문 I'm writing a Flutter app, and I'd like to use/implement the "frosted glass" effect that's common on iOS. How do I do this? 저는 플러터 앱을 작성하고 있으며, iOS에서 일반적인 "프로스트드 글래스" 효과를 사용/구현하고 싶습니다. 이를 어떻게 할 수 있을까요? 답변 이 효과를 달성하려면 BackdropFilter 위젯을 사용할 수 있습니다. import 'dart:ui'; import 'package:flutter/material.dart'; void main() { runApp(new MaterialApp(home: new FrostedDemo())); } class FrostedDemo exten.. 2023. 5. 18.