dlcodns / OSP_Prediction

GNU General Public License v2.0
1 stars 2 forks source link

참고) flutter mypage, setting 세로길이 고정합니다 #51

Closed dlcodns closed 1 year ago

dlcodns commented 1 year ago
  1. Appbar 세로 길이 100 height

  2. mediaquery로 만들면 화면에 따라 글씨가 튀어나올 수 있기 때문에 설정과 마이페이지는 세로길이 고정하기로 했습니다.

도움말, 내 정보, 설정은 모두 같은 디자인이니까 아래 코드 복붙해서 써주세요!(초보라 코드가 별로긴 합니다...)

(버튼 height = 40, 실선 height = 1)

ListView(
      children: [
        Expanded(
          child: SizedBox(
            height: 45,

              child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Flexible(
                      flex: 1,
                      child: SizedBox(),
                    ),
                    Flexible(
                      flex: 17,
                      child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: const [
                          Text('    내 정보',
                              style: TextStyle(
                                color: Color(0xff918E9F),
                                  fontWeight: FontWeight.bold,
                                  fontSize: 13
                              )
                          ),
                          Align(
                              child: Icon(Icons.arrow_forward_ios,color: Color(0xffE3DCFF),)
                          )
                        ],
                      ),
                    )
                  ]
              ),
          ),
        ),
        Expanded(
          child: SizedBox(
              height: 1,
              child: Container(
                decoration: BoxDecoration(
                    color: Color(0xffD3CCEC)
                ),
              )
          ),
        ),

        Expanded(
          child: SizedBox(
            height: 45,
              child: ElevatedButton(
                onPressed: (){
                  //회원정보수정
                },
                style: ElevatedButton.styleFrom(
                    backgroundColor: Color(0xffE3DCFF),
                ),
                child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                    Flexible(
                      flex: 1,
                      child: SizedBox(),
                    ),
                    Flexible(
                      flex: 17,
                      child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: const [
                        Text('회원 정보 수정',
                            style: TextStyle(
                                color: Color(0xff404040),
                                fontSize: 15
                            )
                        ),
                      Align(
                        child: Icon(Icons.arrow_forward_ios,color: Color(0xff726F7A),)
                      )
                  ],
                ),
                    )
    ]
              ),
          ),
        ),
        ),
        Expanded(
          child: SizedBox(height: 1,
              child: Container(decoration: BoxDecoration(color: Color(0xffD3CCEC)),)),
        ),

        Expanded(
          child: SizedBox(
            height: 45,
            child: ElevatedButton(
              onPressed: (){
                //비밀번호 설정
              },
              style: ElevatedButton.styleFrom(
                backgroundColor: Color(0xffE3DCFF),
              ),
              child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Flexible(
                      flex: 1,
                      child: SizedBox(),
                    ),
                    Flexible(
                      flex: 17,
                      child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: const [
                          Text('비밀번호 설정',
                              style: TextStyle(
                                color: Color(0xff404040),
                                  fontSize: 15
                              )
                          ),
                          Align(
                              child: Icon(Icons.arrow_forward_ios,color: Color(0xff726F7A),)
                          )
                        ],
                      ),
                    )
                  ]
              ),
            ),
          ),
        ),
    ]
  )

위 코드는 이 부분입니다 image