Blame view

lib/common/widgets/we_app_bar.dart 818 Bytes
2a29701f   liangchengyou   feat:提交代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  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??''),
a117a5a3   liangchengyou   feat:更新代码
22
        backgroundColor: backgroundColor??Theme.of(context).colorScheme.inversePrimary,
2a29701f   liangchengyou   feat:提交代码
23
24
25
26
27
28
29
30
      );
    }
  
    @override
    // TODO: implement preferredSize
    Size get preferredSize => Size.fromHeight(
        kToolbarHeight + (bottom == null ? 0.0 : bottom!.preferredSize.height));
  }