feat : app bar in app and inner state icon

This commit is contained in:
2025-06-15 09:08:09 +03:30
parent 964f94cb32
commit 50be255f42
5 changed files with 36 additions and 7 deletions

View File

@@ -15,6 +15,9 @@ import 'package:vector_graphics/vector_graphics.dart' as _vg;
class $AssetsIconsGen {
const $AssetsIconsGen();
/// File path: assets/icons/3d_cube_square.svg
SvgGenImage get a3dCubeSquare => const SvgGenImage('assets/icons/3d_cube_square.svg');
/// File path: assets/icons/add.svg
SvgGenImage get add => const SvgGenImage('assets/icons/add.svg');
@@ -170,6 +173,7 @@ class $AssetsIconsGen {
/// List of all assets
List<SvgGenImage> get values => [
a3dCubeSquare,
add,
arrowLeft,
arrowRight,
@@ -256,6 +260,9 @@ class $AssetsLogosGen {
class $AssetsVecGen {
const $AssetsVecGen();
/// File path: assets/vec/3d_cube_square.svg.vec
SvgGenImage get a3dCubeSquareSvg => const SvgGenImage.vec('assets/vec/3d_cube_square.svg.vec');
/// File path: assets/vec/add.svg.vec
SvgGenImage get addSvg => const SvgGenImage.vec('assets/vec/add.svg.vec');
@@ -411,6 +418,7 @@ class $AssetsVecGen {
/// List of all assets
List<SvgGenImage> get values => [
a3dCubeSquareSvg,
addSvg,
arrowLeftSvg,
arrowRightSvg,

View File

@@ -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!,