Files
FlutterUnit/lib/views/widgets/StatefulWidget/AppBar/node1_base.dart
2020-05-03 23:05:53 +08:00

50 lines
1.5 KiB
Dart
Executable File

import 'package:flutter/material.dart';
import '../PopupMenuButton/node1_base.dart';
/// create by 张风捷特烈 on 2020-03-23
/// contact me by email 1981462002@qq.com
/// 说明:
// {
// "widgetId": 57,
// "name": 'AppBar基本使用',
// "priority": 1,
// "subtitle":
// "【leading】 : 左侧组件 【Widget】\n"
// "【title】 : 中间组件 【Widget】\n"
// "【actions】 : 右侧组件 【List<Widget>】\n"
// "【elevation】 : 影深 【double】\n"
// "【shape】 : 形状 【ShapeBorder】\n"
// "【backgroundColor】 : 影深 【背景色】\n"
// "【centerTitle】 : 中间是否居中 【bool】",
// }
class CustomAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppBar(
title: Text('风雅六社'),
leading: BackButton(),
backgroundColor: Colors.amber[500],
elevation: 2,
centerTitle: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
topRight: Radius.circular(5),
bottomLeft: Radius.circular(5),
)),
actions: <Widget>[
IconButton(
icon: Icon(Icons.star),
tooltip: 'like',
onPressed: () {
// do nothing
}),
CustomPopupMenuButton()
],
);
}
}