user setting screen is finishe
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:coda_project/screens/user_settings_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../screens/notifications_screen.dart';
|
||||
import '../widgets/app_background.dart';
|
||||
import '../widgets/floatingnavbar.dart';
|
||||
import '../widgets/settings_bar.dart';
|
||||
@@ -43,25 +44,37 @@ class _MainPageState extends State<MainPage> {
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
SettingsBar(
|
||||
selectedIndex: _settingsIndex,
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
_settingsIndex = index;
|
||||
});
|
||||
SettingsBar(
|
||||
selectedIndex: _settingsIndex,
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
_settingsIndex = index;
|
||||
});
|
||||
|
||||
// 🟢 If user clicked the first icon (user.svg), open settings screen
|
||||
if (index == 0) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => const UserSettingsScreen()),
|
||||
);
|
||||
}
|
||||
},
|
||||
showBackButton: false,
|
||||
iconPaths: _settingsIconPaths,
|
||||
),
|
||||
// 🟢 If user clicked the first icon (user.svg), open settings screen
|
||||
if (index == 0) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const UserSettingsScreen(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 🔔 Ball icon → Notifications screen
|
||||
if (index == 1) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
(_) => const NotificationsScreen(), // placeholder
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
showBackButton: false,
|
||||
iconPaths: _settingsIconPaths,
|
||||
),
|
||||
|
||||
// Main content area
|
||||
Expanded(
|
||||
@@ -69,7 +82,6 @@ class _MainPageState extends State<MainPage> {
|
||||
),
|
||||
|
||||
// const SizedBox(height: 20),
|
||||
|
||||
Floatingnavbar(
|
||||
items: _navItems,
|
||||
selectedIndex: _currentIndex,
|
||||
|
||||
Reference in New Issue
Block a user