其他分享
首页 > 其他分享> > 导航栏-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('登录页面'),     );   } }

标签:Icons,onPressed,IconButton,print,导航,AppBarDemoPage,Icon
来源: https://www.cnblogs.com/eric-share/p/15095890.html