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: 앱바 오른쪽에 배치