2024-04-01 08:41:52 +08:00
|
|
|
import 'package:flutter/material.dart';
|
2024-04-01 14:59:20 +08:00
|
|
|
import 'package:sk_base_mobile/util/util.dart';
|
2024-04-01 08:41:52 +08:00
|
|
|
|
|
|
|
class SkAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|
|
|
final String title;
|
2024-04-01 14:27:44 +08:00
|
|
|
final List<Widget>? action;
|
|
|
|
const SkAppbar({super.key, required this.title, this.action});
|
2024-04-01 08:41:52 +08:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-04-01 14:27:44 +08:00
|
|
|
return AppBar(
|
2024-04-01 14:59:20 +08:00
|
|
|
title: Text(
|
|
|
|
title,
|
2024-04-01 17:35:34 +08:00
|
|
|
style: TextStyle(fontSize: ScreenAdaper.height(30)),
|
2024-04-01 14:59:20 +08:00
|
|
|
),
|
2024-04-01 14:27:44 +08:00
|
|
|
actions: action,
|
|
|
|
);
|
2024-04-01 08:41:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
|
|
|
}
|