flutter 공부 < Flutter 공부 > – docs:Layout

  • 터치 했을 때 상태 변경

    onTap: () {
        setState(() {
            if (alreadySaved) {
                _saved.remove(pair);
            } else {
                _saved.add(pair);
            }
        });
    },
    
  • 탭에 ‘좋아요’ 아이콘 추가 (Icons.check_box 하면 체크박스 나옴. 다른 아이콘 알아봐라 )

    trailing: Icon(
        alreadySaved ? Icons.favorite : Icons.favorite_border,
        color: alreadySaved ? Colors.red : null,
    ),
    
  • Route : 여러 페이지들의 상관관계

  • 앱 바에 메뉴 추가

=> actions property를 추가하고 리스트 버튼을 추가

=>새로운 페이지를 만든것으로 추정

< Flutter 공부 > - docs:Layout

  • Container : Use a Container when you want to add padding, margins, borders, or background color, to name some of its capabilities.