APP_NEW/lib/Component/AppBar/diagnosis_result_app_bar.dart
2025-03-11 21:17:14 +08:00

44 lines
1.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class DiagnosisResultAppBar extends StatelessWidget
implements PreferredSizeWidget {
final Function()? shareFunc;
DiagnosisResultAppBar({
super.key,
this.shareFunc,
});
final height = 45.sp; // musr be greater than logo height
@override
Widget build(BuildContext context) {
return AppBar(
toolbarHeight: height,
title: Text(
'診斷報告',
style: TextStyle(
fontSize: 20.sp,
letterSpacing: 1.5,
fontWeight: FontWeight.normal,
),
),
actions: [
Padding(
padding: EdgeInsets.only(right: 18.sp),
child: GestureDetector(
onTap: shareFunc,
child: const Icon(Icons.share),
),
),
],
surfaceTintColor: Colors.transparent,
shadowColor: Colors.black,
);
}
@override
Size get preferredSize => Size.fromHeight(height); // + _dividerHeight);
}