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

@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.19 2.33008H7.81C4.17 2.33008 2 4.51008 2 8.15008V16.5201C2 20.1601 4.17 22.3301 7.81 22.3301H16.18C19.82 22.3301 21.99 20.1601 21.99 16.5201V8.15008C22 4.51008 19.83 2.33008 16.19 2.33008ZM11.57 17.1201C11.57 17.4201 11.42 17.6901 11.16 17.8501C11.02 17.9401 10.87 17.9801 10.71 17.9801C10.58 17.9801 10.45 17.9501 10.32 17.8901L6.82 16.1401C6.32 15.8801 6 15.3701 6 14.8001V11.4901C6 11.1901 6.15 10.9201 6.41 10.7601C6.67 10.6001 6.98 10.5901 7.25 10.7201L10.75 12.4701C11.26 12.7301 11.58 13.2401 11.58 13.8101V17.1201H11.57ZM11.36 11.7701L7.6 9.74008C7.33 9.59008 7.16 9.30008 7.16 8.97008C7.16 8.65008 7.33 8.35008 7.6 8.20008L11.36 6.17008C11.76 5.96008 12.23 5.96008 12.63 6.17008L16.39 8.20008C16.66 8.35008 16.83 8.64008 16.83 8.97008C16.83 9.30008 16.66 9.59008 16.39 9.74008L12.63 11.7701C12.43 11.8801 12.21 11.9301 11.99 11.9301C11.77 11.9301 11.56 11.8801 11.36 11.7701ZM18 14.8001C18 15.3701 17.68 15.8901 17.17 16.1401L13.67 17.8901C13.55 17.9501 13.42 17.9801 13.28 17.9801C13.12 17.9801 12.97 17.9401 12.83 17.8501C12.57 17.6901 12.42 17.4201 12.42 17.1201V13.8101C12.42 13.2401 12.74 12.7201 13.25 12.4701L16.75 10.7201C17.02 10.5901 17.33 10.6001 17.59 10.7601C17.85 10.9201 18 11.1901 18 11.4901V14.8001Z"
fill="#FFFFFF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

View File

@@ -14,6 +14,7 @@ class RootPage extends GetView<RootLogic> {
backgroundColor: AppColor.bgLight,
appBar: RAppBar(
title: 'رصدطیور',
iconTitle: Assets.vec.chickenSvg.path,
titleTextStyle:AppFonts.yekan16Bold.copyWith(color: Colors.white),
centerTitle: true,
hasBack: false,
@@ -107,7 +108,7 @@ class RootPage extends GetView<RootLogic> {
child: _informationLabelCard(
title: 'داخل استان',
description: '2،225،256',
iconPath: Assets.vec.cubeSearchSvg.path,
iconPath: Assets.vec.a3dCubeSquareSvg.path,
iconColor: const Color(0xFF6C5D60),
bgDescriptionColor: const Color(0xFFEDDCE0),
bgLabelColor: const Color(0xFFDDC0C7),

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