2a29701f
liangchengyou
feat:提交代码
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import 'package:flutter/material.dart';
class WEAppBar extends StatelessWidget implements PreferredSizeWidget {
final String? titleText;
final bool? centerTitle;
final VoidCallback? onBack;
final Color? backgroundColor;
final PreferredSizeWidget? bottom;
const WEAppBar({
this.titleText,
this.centerTitle = true,
this.onBack,
this.backgroundColor,
this.bottom,
super.key});
@override
Widget build(BuildContext context) {
return AppBar(
centerTitle: centerTitle,
title: Text(titleText??''),
backgroundColor: backgroundColor,
);
}
@override
// TODO: implement preferredSize
Size get preferredSize => Size.fromHeight(
kToolbarHeight + (bottom == null ? 0.0 : bottom!.preferredSize.height));
}
|