[Flutter] bottom sheet 둥근 모서리, 딜레이 추가

Taehyun Nam·2021년 12월 9일
0
post-thumbnail

예시

방법


Future.delayed(Duration(milliseconds: 1000)).then((_) {		// 1초 뒤에 동작
  showModalBottomSheet(
    context: context,
    isScrollControlled: true,			// 추가
    backgroundColor: Colors.transparent,	// 추가
    builder: (context) => Container(
      height: MediaQuery.of(context).size.height * 0.75,	// 반응형 사이즈(숫자 조절)
      decoration: new BoxDecoration(
        color: Colors.white,
        borderRadius: new BorderRadius.only(
          topLeft: const Radius.circular(25.0),		// 적절히 조절 
          topRight: const Radius.circular(25.0),	// 적절히 조절
        ),
      ),
      child: Center(
        child: Text("Modal content goes here"),
      ),
    ),
  );
});

참고

https://stackoverflow.com/a/60072706

profile
Frontend Developer

0개의 댓글