提交 8b3aa5e3 authored 作者: shixiaochen's avatar shixiaochen

1、appbar增加foregroundColor;2、修改sdk最小版本为2.12.0

上级 77959f7d
...@@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; ...@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
final String? title; final String? title;
final Color? backgroundColor; final Color? backgroundColor;
final Color? foregroundColor;
final bool showBack; final bool showBack;
final bool primary; final bool primary;
final Function()? onBack; final Function()? onBack;
...@@ -15,6 +16,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -15,6 +16,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
Key? key, Key? key,
this.title, this.title,
this.backgroundColor, this.backgroundColor,
this.foregroundColor,
this.showBack = true, this.showBack = true,
this.primary = true, this.primary = true,
this.onBack, this.onBack,
...@@ -29,8 +31,9 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -29,8 +31,9 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar( return AppBar(
key: key, key: key,
centerTitle: true, centerTitle: true,
title: Text(title ?? ""), title: Text(title ?? "", style: TextStyle(color: foregroundColor)),
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
foregroundColor: foregroundColor,
primary: primary, primary: primary,
actions: actions, actions: actions,
leading: leading, leading: leading,
......
...@@ -4,7 +4,7 @@ version: 1.0.2 ...@@ -4,7 +4,7 @@ version: 1.0.2
homepage: http://t.clxkj.cn/clx-android/flutter_clx_base.git homepage: http://t.clxkj.cn/clx-android/flutter_clx_base.git
environment: environment:
sdk: ">=2.17.6 <3.0.0" sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.5.0" flutter: ">=2.5.0"
dependencies: dependencies:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论