본문 바로가기
귀펀치토끼는 부서지지 않는다.
주소(D)
영웅은 공부 따원 안 한다네/플러터

[Flutter] 내용 아래에 탭

class LoungeDetailView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: DefaultTabController(
        length: 2,
        child: Scaffold(
          appBar: AppBar(
            title: Text('Appbar'),
          ),
          body: Column(
            children: [
              // Board Title
              Container(
                padding: EdgeInsets.all(16.0),
                child: Text(
                  'Board Title',
                  style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
                ),
              ),
              // Board Content
              Container(
                padding: EdgeInsets.all(16.0),
                child: Text('Board Content'),
              ),
              // Tabs
              Container(
                child: TabBar(
                  tabs: [
                    Tab(text: 'Tab1'),
                    Tab(text: 'Tab2'),
                  ],
                ),
              ),
              // Tab Content
              Expanded(
                child: TabBarView(
                  children: [
                    // Tab1 Content
                    Column(
                      children: [
                        Container(
                          padding: EdgeInsets.all(16.0),
                          child: Text('Tab1 Content'),
                        ),
                      ],
                    ),
                    // Tab2 Content
                    Column(
                      children: [
                        Container(
                          padding: EdgeInsets.all(16.0),
                          child: Text('Tab2 Content'),
                        ),
                      ],
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
완료
내 컴퓨터