Scaffold AppBar

황훈주·2022년 11월 8일
0
class MyPage extends StatelessWidge{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AppBar icon'),
        centerTitle: true,
        elevation: 0.0,
        leading: IconButton(
          icon: Icon(Icons.menu),
          onPressed: () { print('menu button')},
        ),
        actions: [
          IconButton(
            Icon(Icons.search),          	
            onPressed: () { print('search button')}
          ),
          IconButton(
            Icon(Icons.shopping_cart),          	
            onPressed: () { print('cart button')}
          ),
      ),
    );
  }
}

AppBar leading: 앱바 왼쪽에 배치
AppBar actions: 앱바 오른쪽에 배치

profile
끄적끄적

0개의 댓글

관련 채용 정보