37 lines
786 B
Dart
37 lines
786 B
Dart
import 'package:flutter/material.dart';
|
|||
|
|
|
||
|
|
import '../../Utils/color_constants.dart';
|
||
|
|
import '../../theme/app_style.dart';
|
||
|
|
|
||
|
|
|
||
|
|
// ignore: must_be_immutable
|
||
|
|
class AppbarTitle extends StatelessWidget {
|
||
|
|
AppbarTitle({required this.text, this.margin, this.onTap});
|
||
|
|
|
||
|
|
String text;
|
||
|
|
|
||
|
|
EdgeInsetsGeometry? margin;
|
||
|
|
|
||
|
|
Function? onTap;
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return GestureDetector(
|
||
|
|
onTap: () {
|
||
|
|
onTap?.call();
|
||
|
|
},
|
||
|
|
child: Padding(
|
||
|
|
padding: margin ?? EdgeInsets.zero,
|
||
|
|
child: Text(
|
||
|
|
text,
|
||
|
|
overflow: TextOverflow.ellipsis,
|
||
|
|
textAlign: TextAlign.left,
|
||
|
|
style: AppStyle.txtGilroySemiBold24.copyWith(
|
||
|
|
color: ColorConstant.blueGray900,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|