102 lines
2.9 KiB
Dart
102 lines
2.9 KiB
Dart
// ignore_for_file: non_constant_identifier_names, file_names, prefer_const_constructors
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
|
@override
|
|
Size get preferredSize => Size.fromHeight(height);
|
|
const CommonAppbar(
|
|
{Key? key,
|
|
required this.titleTxt,
|
|
this.showLeading = true,
|
|
this.customBack,
|
|
this.aifBack,
|
|
this.profileverifyback,
|
|
|
|
this.backPageName = '',
|
|
this.height = 105})
|
|
: super(key: key);
|
|
|
|
final String titleTxt;
|
|
final bool? showLeading;
|
|
final bool? customBack;
|
|
final bool? aifBack;
|
|
|
|
final String? backPageName;
|
|
final double height;
|
|
final bool? profileverifyback;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return PreferredSize(
|
|
preferredSize: Size.fromHeight(130),
|
|
child: AppBar(
|
|
scrolledUnderElevation: 0.0,
|
|
backgroundColor: Color(0xFFFFF3E4),
|
|
elevation: 0,
|
|
leadingWidth: 56.w,
|
|
leading: Padding(
|
|
padding: EdgeInsets.only(left: 16.w, top: 20.h),
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
// aifBack == true
|
|
// ?
|
|
// Get.back()
|
|
// :
|
|
// customBack ?? false ? Get.toNamed(backPageName!) :
|
|
// profileverifyback == true
|
|
// ?
|
|
// Get.offNamed(
|
|
// RouteName.investorprofile)
|
|
// :
|
|
Get.back();
|
|
},
|
|
child: Container(
|
|
height: 40.h,
|
|
width: 40.w,
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFFFFE3BF),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Padding(
|
|
padding: EdgeInsets.only(left: 8.w),
|
|
child: Icon(
|
|
Icons.arrow_back_ios,
|
|
color: Colors.black,
|
|
size: 25.r,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
flexibleSpace: FlexibleSpaceBar(
|
|
centerTitle: false,
|
|
titlePadding: EdgeInsets.all(0),
|
|
title: Padding(
|
|
padding: EdgeInsets.only(left: 16.w),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
Text(
|
|
titleTxt,
|
|
style: TextStyle(
|
|
color: Color(0xFF1A1A1A),
|
|
fontSize: 22,
|
|
fontFamily: 'Georgia'),
|
|
maxLines: 2,
|
|
softWrap: true,
|
|
),
|
|
// newTextfield(
|
|
// FontWeight.w400, 0)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|