fix : some ui bug

This commit is contained in:
2025-09-22 11:25:50 +03:30
parent 338dd8f681
commit a5da59b5dd
4 changed files with 26 additions and 29 deletions

View File

@@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
class RBottomNavigation extends StatefulWidget {
RBottomNavigation({super.key, required this.items,this.mainAxisAlignment});
const RBottomNavigation({super.key, required this.items, this.mainAxisAlignment});
final List<RBottomNavigationItem> items;
MainAxisAlignment? mainAxisAlignment;
final MainAxisAlignment? mainAxisAlignment;
@override
State<RBottomNavigation> createState() => _RBottomNavigationState();
@@ -15,8 +15,9 @@ class _RBottomNavigationState extends State<RBottomNavigation> {
@override
Widget build(BuildContext context) {
return Container(
height: 100.h,
padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 18.h),
height: 80.h,
padding: EdgeInsets.fromLTRB(11.w, 4.h, 11.w, 6.h),
decoration: BoxDecoration(
color: AppColor.blueNormal,
borderRadius: const BorderRadius.only(
@@ -25,7 +26,7 @@ class _RBottomNavigationState extends State<RBottomNavigation> {
),
),
child: Row(
mainAxisAlignment: widget.mainAxisAlignment??MainAxisAlignment.spaceBetween,
mainAxisAlignment: widget.mainAxisAlignment ?? MainAxisAlignment.spaceBetween,
children: widget.items,
),
);
@@ -49,11 +50,7 @@ class RBottomNavigationItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
constraints: BoxConstraints(
minWidth: 70.h,
minHeight: 70.h,
maxHeight: 70.h
),
constraints: BoxConstraints(minWidth: 70.h, minHeight: 70.h, maxHeight: 70.h),
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: isSelected ? Colors.white.withAlpha(208) : Colors.transparent,
@@ -65,8 +62,8 @@ class RBottomNavigationItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgGenImage.vec(icon).svg(
width: 40.w,
height: 40.h,
width: (isSelected ? 40 : 36).w,
height: (isSelected ? 40 : 36).h,
colorFilter: ColorFilter.mode(
isSelected ? AppColor.blueNormal : Colors.white,
BlendMode.srcIn,
@@ -75,9 +72,9 @@ class RBottomNavigationItem extends StatelessWidget {
SizedBox(height: 5.h),
Text(
label,
style: AppFonts.yekan10.copyWith(
color: isSelected ? AppColor.blueNormal : Colors.white,
),
style: isSelected
? AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal)
: AppFonts.yekan10.copyWith(color: Colors.white),
),
],
),