Wallpaper-Genie/lib/common/components/navigation_bar/title_bar_widget.dart
2024-07-12 16:04:47 +08:00

41 lines
1019 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wallpaperx/res/themes/app_sizes.dart';
class TitleBarWidget extends StatelessWidget {
const TitleBarWidget(
this.title, {
super.key,
this.fontSize,
this.backGroundColor,
});
final String title;
final double? fontSize;
final Color? backGroundColor;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
color: backGroundColor??Colors.transparent,
child: SizedBox(
height: titleBarHeight,
child: Row(
mainAxisAlignment: MainAxisAlignment. center,
children: [
Text(
title,
style: TextStyle(
color: Colors.black87,
fontSize: fontSize??32.sp,
fontWeight: FontWeight.w600,
),
),
],
),
),
);
}
}