본문 바로가기
TIL

202307017 TIL

by 김빵그 2023. 7. 17.

Today 요약  

[] 프로그래머스 코딩테스트 3문제

[] flutter 코드 챌린지 2개

[] flutter 강의 2개

 


 

배운 점

 

1) js Array.prototype.reduce()

  • reduce() 메서드는 배열의 각 요소에 대해 주어진 함수를 실행하고, 하나의 결과값을 반환
  • acc 누산기 : 콜백의 반환값을 누적
  • cur 현재 값
  • idx 현재 인덱스
  • src 원본 배열
 arr.reduce(callback[, initialValue])

2) flutter  positioned()

Stack(
	clipBehavior : Clip.none,
	children:[
    	CircleAvatar (
        	radius 25, 
            foregroundImage: NetworkImage()...
        ), 
        Positioned(
        	bottom:-5, 
            right:-10, 
            child : Container(
            	width:25, 
                height:25, 
                decoration:BoxDecoration(
                	color:Colors.green, 
                    shape:BoxShape.circle, 
                    border:Border.all(
                    	color:Colors.white, 
                        width:10,
                    )
                )
            )
        )
    ]
)
  • shape : BoxShape.circle : border-radius 를  따로 주지 않아도 shape를 써주면 원형이 된다
  • positioned 사용시 기존  박스에서 넘어가기만 하면 이미지가 짤리는데 이때 써줘야 하는거 
  • clipBehavior :Clip.none, 또는 overflow :Overflow.visible을 써준다

3) TextField()

TextField(
	controllder : _textEditingController,
    decoration : InputDecoration(
    	hintText: "입력하세요.." //placeholder, 
        filled : true , 
    	fillColor:Colors.white , // input 배경색
        border :OutlineInputBorder(
        	... inputborder
        ), 
        borderSide: BorderSide.none, // input 아웃라인
        sufiixIcon :..  input 뒤 아이콘
        prefixIcon : .. input 앞 아이콘
    )
)

'TIL' 카테고리의 다른 글

20230731 TIL  (0) 2023.07.31
20230718 TIL  (1) 2023.07.18
202307016 TIL  (0) 2023.07.16
202307015 TIL  (0) 2023.07.15
202307012 TIL  (0) 2023.07.12