working on the user setting screen
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
@@ -22,34 +23,48 @@ class Floatingnavbar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Get the bottom padding to account for system navigation bar
|
||||
final bottomPadding = MediaQuery.of(context).padding.bottom;
|
||||
|
||||
return Container(
|
||||
height: 70,
|
||||
margin: EdgeInsets.only(
|
||||
bottom: 10 + bottomPadding, // Add system padding to our margin
|
||||
left: 28,
|
||||
right: 28,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: (const Color(0xFFE9E9E9)),
|
||||
borderRadius: BorderRadius.circular(45),
|
||||
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: items.asMap().entries.map((entry) {
|
||||
final index = entry.key;
|
||||
final item = entry.value;
|
||||
final isSelected = selectedIndex == index;
|
||||
|
||||
return _NavBarItemTile(
|
||||
item: item,
|
||||
isSelected: isSelected,
|
||||
onTap: () => onTap(index),
|
||||
);
|
||||
}).toList(),
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(45),
|
||||
|
||||
child: BackdropFilter(
|
||||
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: 100,
|
||||
sigmaY: 35,
|
||||
|
||||
),
|
||||
|
||||
child: Container(
|
||||
height: 70,
|
||||
margin: EdgeInsets.only(
|
||||
bottom: 10 + bottomPadding,
|
||||
left: 28,
|
||||
right: 28,
|
||||
),
|
||||
|
||||
/// ⭐ Restored white container (same as your original design)
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFE9E9E9), // White navbar restored
|
||||
borderRadius: BorderRadius.circular(45),
|
||||
),
|
||||
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: items.asMap().entries.map((entry) {
|
||||
final index = entry.key;
|
||||
final item = entry.value;
|
||||
final isSelected = selectedIndex == index;
|
||||
|
||||
return _NavBarItemTile(
|
||||
item: item,
|
||||
isSelected: isSelected,
|
||||
onTap: () => onTap(index),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -83,18 +98,20 @@ class _NavBarItemTile extends StatelessWidget {
|
||||
width: 30,
|
||||
height: 30,
|
||||
colorFilter: ColorFilter.mode(
|
||||
isSelected ? const Color(0xFF177046) : Colors.black,
|
||||
isSelected ? const Color(0xFF177046) : Colors.black,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 6),
|
||||
|
||||
Text(
|
||||
item.label,
|
||||
style: TextStyle(
|
||||
color: isSelected ? const Color(0xFF177046) : Colors.black,
|
||||
color: isSelected ? const Color(0xFF177046) : Colors.black,
|
||||
fontSize: 15,
|
||||
fontFamily: 'AbdEriady', // Using the custom font family
|
||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w400, // Using specific weights
|
||||
fontFamily: 'AbdEriady',
|
||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -103,4 +120,4 @@ class _NavBarItemTile extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user