fix : Appbar chicken
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -18,7 +17,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
|
||||
const RAppBar({
|
||||
super.key,
|
||||
this.title,
|
||||
this.title,
|
||||
this.iconTitle,
|
||||
this.backgroundColor = AppColor.blueNormal,
|
||||
this.iconColor = Colors.white,
|
||||
@@ -41,29 +40,33 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
excludeHeaderSemantics: true,
|
||||
scrolledUnderElevation: 0,
|
||||
centerTitle: centerTitle,
|
||||
|
||||
titleTextStyle: titleTextStyle ?? AppFonts.yekan16.copyWith(color: Colors.white),
|
||||
title:title != null ? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(title!),
|
||||
if (iconTitle != null) ...{const SizedBox(width: 8)},
|
||||
if (iconTitle != null) ...{SvgGenImage.vec(iconTitle!).svg(width: 24, height: 24)},
|
||||
],
|
||||
): null,
|
||||
title: title != null
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(title!),
|
||||
if (iconTitle != null) ...{const SizedBox(width: 8)},
|
||||
if (iconTitle != null) ...{SvgGenImage.vec(iconTitle!).svg(width: 24, height: 24)},
|
||||
],
|
||||
)
|
||||
: null,
|
||||
leadingWidth: leadingWidth?.toDouble(),
|
||||
leading: leading != null ? Padding(padding: const EdgeInsets.only(right: 6), child: leading) : null,
|
||||
titleSpacing: 8,
|
||||
actions: [
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
if (hasBack) ...{
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: IconButton(
|
||||
onPressed: onBackPressed ?? () => Get.back(),
|
||||
icon: const Icon(CupertinoIcons.chevron_back),
|
||||
color: iconColor,
|
||||
GestureDetector(
|
||||
onTap: onBackPressed ?? () => Get.back(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(10, 0, 2, 0),
|
||||
child: Assets.vec.arrowLeftSvg.svg(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user