lib/main.dart
import 'package:flutter/material.dart';
void main() {
runApp(BasicAppbar());
}
class BasicAppbar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
// backgroundColor: Colors.white,
leading: Padding(
padding: EdgeInsets.only(left: 12),
child: IconButton(
icon: Icon(Icons.list),
onPressed: () {
print('Click leading');
},
),
),
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
children:[
Text('Basic AppBar'),
]
),
actions: [
IconButton(
icon: Icon(Icons.search),
onPressed: () {
print('Click search');
},
),
IconButton(
icon: Icon(Icons.star),
onPressed: () {
print('Click start');
},
),
],
),
body: Container(
decoration: BoxDecoration(color: Colors.grey),
)));
}
}
There are 0 comments