feat : app bar in app and inner state icon
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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