feat : app bar in app and inner state icon
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_color.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_fonts.dart';
|
||||
|
||||
class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
final String title;
|
||||
final String? iconTitle;
|
||||
final Color backgroundColor;
|
||||
final Color iconColor;
|
||||
final bool hasBack;
|
||||
@@ -20,6 +22,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
const RAppBar({
|
||||
super.key,
|
||||
required this.title,
|
||||
this.iconTitle,
|
||||
this.backgroundColor = AppColor.blueNormal,
|
||||
this.iconColor = Colors.white,
|
||||
this.titleTextStyle,
|
||||
@@ -42,13 +45,26 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
scrolledUnderElevation: 0,
|
||||
centerTitle: centerTitle,
|
||||
|
||||
titleTextStyle:
|
||||
titleTextStyle ?? AppFonts.yekan16.copyWith(color: Colors.white),
|
||||
title: Text(title),
|
||||
titleTextStyle: titleTextStyle ?? AppFonts.yekan16.copyWith(color: Colors.white),
|
||||
title: 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,
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
]),
|
||||
leadingWidth: leadingWidth?.toDouble(),
|
||||
leading: leading != null
|
||||
? Padding(padding: const EdgeInsets.only(right: 16), child: leading)
|
||||
: null,
|
||||
leading: leading != null ? Padding(padding: const EdgeInsets.only(right: 16), child: leading) : null,
|
||||
titleSpacing: 8,
|
||||
actions: [
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
|
||||
Reference in New Issue
Block a user