ALIOTHX Developers
ALIOTHXMANAGER
  • 😈DEMO App 설치
  • 크로스플랫폼 개발환경
    • ⚙️Flutter 개발환경
    • 🧑‍💻Flutter 시작하기
    • 📲폰에서 실행
    • 개발가이드
    • 🚀솔루션 설치
    • 🚦코드가이드
      • 명명 규칙및 주석처리
      • 코딩 컨벤션
      • 디렉토리 생성및 관리
      • 페이지 작성
    • 🏭Flutter 아키텍쳐
      • 채널링
      • 웹뷰
        • 웹뷰 설정
        • 웹뷰 연동
      • 보안 (Security)
        • 대칭키 암호알고리즘
        • 비대칭키 암호알고리즘
        • 메시지 다이제스트
        • 탈옥및 루팅 탐지및 차단
        • 앱 위/변조 탐지및 차단
        • 코드 난독화
    • 🖥️관리시스템
    • 🎆협업도구
  • UIUX 컴포넌트
    • UI/UX
      • 테마 적용
      • 화면방향전환
      • 토스트 (Toast)
      • 버튼 (Button)
      • 텍스트 (Text)
      • 탭바 (TabBar)
      • 이미지뷰 (ImageView)
      • 카메라/이미지
      • 페이지 트랜지션
      • 입력필드 (TextField)
      • 체크박스 (CheckBox)
      • 라디오버튼 (RadioButton)
      • 로딩바 (Loading Indicator)
      • 바텀시트 (BottomSheet)
      • 리스트뷰 (ListView)
      • 슬리버 (Sliver)
      • 사운드 (Sound)
      • 애니메이션 (Animation)
      • 위치 및 정렬
      • 커스텀 키보드
      • 카드 (Card)
      • 토글 버튼 (Toggle Button)
      • 다이얼로그 (Dialog)
      • QR코드
      • 페이지뷰 (PageView)
  • Common 컴포넌트
    • 공통모듈
      • 데이터통신과 JSON 파싱
      • 인증 연동
      • 채널링
      • 네비게이션
      • 푸시 메시지
      • SMS 인증
      • 예외처리
  • Security 컴포넌트
    • 보안모듈
      • 메시지 다이제스트
      • 암/복호화
  • Option 컴포넌트
    • 옵션모듈
      • 동영상 플레이어
      • 유튜브 연동
      • 차트
      • SNS 공유
      • 지도
      • 로컬 DB
  • 🎁라이센스및 기술지원
  • 🏢고객사
Powered by GitBook
On this page
  • 기본 다이얼로그
  • Simple Dialog
  • Alert Dialog
  • Rectangle AlertDialog
  • TextField in AlertDialog
  • 라디오버튼 다이얼로그
  • RadioButton Dialog
  • 체크박스 다이얼로그
  • CheckBox Dialog
  • 커스텀 다이얼로그
  • Circle Avatar Dialog
  • Divided Dialog
  • 쿠퍼티노 다이얼로그
  • Cupertino Dialog
  • 시간 & 날짜 다이얼로그
  • Time Picker Dialog
  • Date Picker Dialog
  • Date Range Picker Dialog
  1. UIUX 컴포넌트
  2. UI/UX

다이얼로그 (Dialog)

앱에서 사용자와 상호 작용하고 정보를 표시하기 위해 사용하는 다이얼로그 위젯은 매우 유용합니다. 다이얼로그 위젯을 사용하여 간단한 정보 제공부터 중요한 결정을 요구하는 상황까지 다양한 시나리오를 다룰 수 있습니다.

Previous토글 버튼 (Toggle Button)NextQR코드

Last updated 1 year ago

기본 다이얼로그

Simple Dialog

간단한 정보 또는 단일 옵션을 제공하는 다이얼로그입니다.

SimpleDialog(
  title: const Text(
    'Simple Dialog',
    textAlign: TextAlign.center,
  ),
  children: <Widget>[
    SimpleDialogOption(
      onPressed: () {},
      child: const Text(
        'Close',
        textAlign: TextAlign.center,
      ),
    ),
  ],
);

Alert Dialog

중요한 정보를 표시하거나 사용자의 결정을 요구하는 다이얼로그입니다.

AlertDialog(
  title: const Text(
    'Alert Dialog',
    textAlign: TextAlign.center,
  ),
  content: const Text(
    'description',
    textAlign: TextAlign.center,
  ),
  actions: <Widget>[
    TextButton(
      onPressed: () => Navigator.pop(context, 'Cancel'),
      child: const Text('Cancel'),
    ),
    TextButton(
      onPressed: () => Navigator.pop(context, 'OK'),
      child: const Text('OK'),
    ),
  ],
);

Rectangle AlertDialog

기본 알림 다이얼로그와 동일하지만 모서리가 직사각형인 다이얼로그입니다.

AlertDialog(
  title: const Text(
    'Rectangle Alert Dialog',
    textAlign: TextAlign.center,
  ),
  content: const Text(
    'description',
    textAlign: TextAlign.center,
  ),
  actions: <Widget>[
    TextButton(
      onPressed: () => Navigator.pop(context, 'Cancel'),
      child: const Text('Cancel'),
    ),
    TextButton(
      onPressed: () => Navigator.pop(context, 'OK'),
      child: const Text('OK'),
    ),
  ],
  shape: RoundedRectangleBorder(),
);

TextField in AlertDialog

알림 다이얼로그에 텍스트 입력 필드를 추가하는 예제입니다.

AlertDialog(
  title: Text(
    'TextField in Alert Dialog',
    textAlign: TextAlign.center,
  ),
  content: TextField(
    onChanged: (value) {},
    decoration: InputDecoration(hintText: "add text"),
  ),
  actions: <Widget>[
    TextButton(
      onPressed: () => Navigator.pop(context, 'Cancel'),
      child: const Text('Cancel'),
    ),
    TextButton(
      onPressed: () => Navigator.pop(context, 'OK'),
      child: const Text('OK'),
    ),
  ],
);

다이얼로그 위젯은 앱에서 다양한 상황에 맞게 사용자와 소통할 수 있는 강력한 도구입니다. 이러한 예제를 사용하여 앱의 사용자 경험을 향상시킬 수 있습니다.

라디오버튼 다이얼로그

RadioButton Dialog

RadioButtonDialog(
          title: Text('RadioButton Dialog', textAlign: TextAlign.center),
          actions: <Widget>[
            TextButton(
                onPressed: () => Navigator.pop(context, 'Cancel'),
                child: const Text('Cancel')),
            TextButton(
                onPressed: () => Navigator.pop(context, 'OK'),
                child: const Text('OK')),],
          itemCount: 10,
          radiobuttonlist: [...],);

체크박스 다이얼로그

CheckBox Dialog

CheckBoxDialog(
          title: Text('Checkbox Dialog', textAlign: TextAlign.center),
          actions: <Widget>[
            TextButton(
                onPressed: () => Navigator.pop(context, 'Cancel'),
                child: const Text('Cancel')),
            TextButton(
                onPressed: () => Navigator.pop(context, 'OK'),
                child: const Text('OK')),],
          itemCount: 10,
          checkboxlist: {
            ...},);

커스텀 다이얼로그

Circle Avatar Dialog

CircleAvatarDialog(
          title: Text('Circle Avatar Dialog', textAlign: TextAlign.center),
          actions: <Widget>[
            TextButton(
                onPressed: () => Navigator.pop(context, 'Cancel'),
                child: const Text('Cancel')),
            TextButton(
                onPressed: () => Navigator.pop(context, 'OK'),
                child: const Text('OK')),],
          content: const Text(
            'description',
            textAlign: TextAlign.center,),
          circleForegroundColor: theme.primaryColorDark,
          circleBackgroundColor: theme.primaryColor,
          child: Icon(Icons.help),);

Divided Dialog

DividedDialog(
          title: Text(
            'Divided Dialog',
            style: TextStyle(fontWeight: FontWeight.bold),),
          buttonText: 'Close',
          topColor: Colors.white,
          bottomColor: theme.primaryColor,
          buttonColor: Colors.white,
          buttonTextColor: Colors.black,
          height: 200,
          content: const Text(
            'description',
            textAlign: TextAlign.center,),
          onPressed: () => {Navigator.of(context).pop()},);

쿠퍼티노 다이얼로그

Cupertino Dialog

CupertinoAlertDialog(
          title: const Text('Cupertino Dialog'),
          content: const Text('description'),
          actions: <CupertinoDialogAction>[
            CupertinoDialogAction(
              isDestructiveAction: true,
              onPressed: () {
                Navigator.pop(context, null);},
              child: const Text('Cancel'),),
            CupertinoDialogAction(
              isDefaultAction: true,
              onPressed: () {
                Navigator.pop(context, null);},
              child: const Text('OK'),
            ),],);

시간 & 날짜 다이얼로그

Time Picker Dialog

TimePickerDialog(
          initialTime:
              TimeOfDay(
                  hour: DateTime.now().hour, minute: DateTime.now().minute),);

Date Picker Dialog

DatePickerDialog(
            initialDate: DateTime.now(),
            firstDate: DateTime(1900),
            lastDate: DateTime(2100));

Date Range Picker Dialog

DateRangePickerDialog(
                  firstDate: DateTime(1900), lastDate: DateTime(2100));

그 외에도 다양한 다이얼로그 위젯이 있습니다. RadioButton, CheckBox, Circle Avatar, Divided, Cupertino 스타일의 다이얼로그, 시간 선택, 날짜 선택 및 날짜 범위 선택 다이얼로그 등 다양한 유형의 다이얼로그를 활용하여 앱의 사용자 경험을 향상시킬 수 있습니다.

다이얼로그 위젯은 앱의 상황에 따라 다양한 상호 작용 및 정보 전달에 활용됩니다. 이러한 예제를 사용하여 다이얼로그를 효과적으로 활용하여 사용자와의 상호 작용을 개선해보세요.

Page cover image