导航栏-1

导航栏-1

 

 

import 'package:flutter/material.dart';
class AppBarDemoPage extends StatelessWidget {   const AppBarDemoPage({Key? key}) : super(key: key);
  @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text("AppBarDemoPage"),         // backgroundColor: Colors.red,  // 背景颜色         centerTitle: true, // 文字居中         leading: IconButton(           icon: Icon(Icons.menu),           onPressed: () {             print('menu');           },         ),         actions: [           IconButton(             icon: Icon(Icons.search),             onPressed: () {               print('search');             },           ),           IconButton(             icon: Icon(Icons.settings),             onPressed: () {               print('settings');             },           ),         ],       ),       body: Text('登录页面'),     );   } }
上一篇:【Flutter之旅】容器类组件介绍


下一篇:Element UI中的图标