🐞 flutter err ; Expanded μœ„μ ―

보둜꼬리·2022λ…„ 9μ›” 15일
1

Flutter

λͺ©λ‘ 보기
4/8
post-thumbnail

err:

════════ Exception caught by widgets library ═══════════════════════════════════ Incorrect use of ParentDataWidget.

계속 λ– μ„œ
곡뢀해야할

[Programming/Flutter] κΈ°λ³Έ μœ„μ ― (Widgets)

Flutter둜 κ°œλ°œν•˜κΈ°(01) - μœ„μ ― μ†Œκ°œ

μˆ˜μ • μ „

appBar: AppBar(
          backgroundColor: Colors.transparent,
          bottomOpacity: 0.0,
          elevation: 0.0,
          centerTitle: true,
          iconTheme: IconThemeData(
              color: Colors.black,
              size: 100 // This isn't performing any changes
              ),
          title: Container(
            child: Expanded(
              child: Text(
                '곡지사항',
                style: TextStyle(
                  color: Colors.black,
                  fontWeight: FontWeight.bold,
                  fontSize: 20.0,
                ),
              ),
            ),
          ),
        ),

Expandedκ°€ λ¬Έμ œμ˜€μŒ

ExpandedλŠ” μ•ˆμ— 2κ°œμ΄μƒμ΄ μžˆμ–΄μ•Ό μ œλŒ€λ‘œ μž‘λ™ν•˜λŠ”λ° μ•ˆμ— Textν•˜λ‚˜λ§Œ μžˆμ–΄μ„œ μ œλŒ€λ‘œ μž‘λ™μ΄ μ•ˆλ˜μžˆλ˜κ²ƒ(μœ„μ˜ 였λ₯˜λ₯Ό λ³Ό 수 있던 것)

Expandedλ₯Ό μ§€μš°κ±°λ‚˜ Container둜 λ°”κΎΈκ±°λ‚˜, children이 λ“€μ–΄κ°€λŠ” Columnμ΄λ‚˜ Rowμ•ˆμ—μ„œ Expandedλ₯Ό μ‚¬μš©ν•˜λ©΄ ν•΄κ²°λœλ‹€.

μˆ˜μ • ν›„

appBar: AppBar(
          backgroundColor: Colors.transparent,
          bottomOpacity: 0.0,
          elevation: 0.0,
          centerTitle: true,
          iconTheme: IconThemeData(
              color: Colors.black,
              size: 100 // This isn't performing any changes
              ),
          title: Column(
            children:[
              Expanded(
                child: Text(
                  '곡지사항',
                  style: TextStyle(
                    color: Colors.black,
                    fontWeight: FontWeight.bold,
                    fontSize: 20.0,
                  ),
                ),
              ),
               Text(
                 '곡지사항1',
                 style: TextStyle(
                   color: Colors.black,
                   fontWeight: FontWeight.bold,
                   fontSize: 20.0,
                 ),
               ),
            ]
          ),
        ),
profile
1. λ‚˜λŠ” 무엇을 λͺ¨λ₯΄λŠ”κ±ΈκΉŒ 2. μ‚¬μ†Œν•œ 것도 λˆ„κ΅°κ°€μ—κ²ŒλŠ” 도움이 λœλ‹€

0개의 λŒ“κΈ€