diff --git a/Frontend/monarch/lib/budget.dart b/Frontend/monarch/lib/budget.dart index b07d3b1..6689071 100644 --- a/Frontend/monarch/lib/budget.dart +++ b/Frontend/monarch/lib/budget.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:monarch/static.dart'; class BudgetScreen extends StatefulWidget { const BudgetScreen({super.key}); @@ -107,7 +108,12 @@ class _BudgetScreenState extends State Widget _buildBackButton(BuildContext context) { return GestureDetector( - onTap: () => Navigator.pop(context), + onTap: () => Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const Statistics(), + ), + ), child: Container( width: _responsiveWidth(44, context), height: _responsiveWidth(44, context), diff --git a/Frontend/monarch/lib/homepage.dart b/Frontend/monarch/lib/homepage.dart index 47b8d87..1e49212 100644 --- a/Frontend/monarch/lib/homepage.dart +++ b/Frontend/monarch/lib/homepage.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; +import 'package:monarch/add.dart'; import 'package:monarch/navbar.dart'; //import 'package:monarch/static.dart'; @@ -253,8 +254,13 @@ class _FinTrackHomePageState extends State Expanded( child: GestureDetector( onTap: () { - HapticFeedback.lightImpact(); - // Navigate to Add Expense + HapticFeedback.heavyImpact(); + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const AddExpenseScreen(), + ), + ); }, child: Container( padding: const EdgeInsets.all(20), @@ -600,70 +606,6 @@ class _FinTrackHomePageState extends State const SizedBox(height: 32), - // AI Insight Card - Container( - padding: const EdgeInsets.all(20), - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Colors.purple.withOpacity(0.1), - Colors.blue.withOpacity(0.1), - ], - ), - borderRadius: BorderRadius.circular(20), - border: Border.all( - color: Colors.purple.withOpacity(0.2), - width: 1, - ), - ), - child: Row( - children: [ - Container( - width: 48, - height: 48, - decoration: BoxDecoration( - color: Colors.purple.withOpacity(0.2), - borderRadius: BorderRadius.circular(12), - ), - child: const Icon( - Icons.psychology, - color: Colors.purple, - size: 24, - ), - ), - const SizedBox(width: 16), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Smart Insight', - style: GoogleFonts.inter( - color: primaryColor, - fontSize: 16, - fontWeight: FontWeight.w600, - ), - ), - const SizedBox(height: 4), - Text( - 'Your food expenses increased by 15% this month. Consider meal planning to save more!', - style: GoogleFonts.inter( - color: textSecondary, - fontSize: 14, - fontWeight: FontWeight.w400, - ), - ), - ], - ), - ), - ], - ), - ), - - const SizedBox(height: 32), - // Recent Transactions _buildRecentTransactions(), diff --git a/Frontend/monarch/lib/static.dart b/Frontend/monarch/lib/static.dart index dff9a10..f66492c 100644 --- a/Frontend/monarch/lib/static.dart +++ b/Frontend/monarch/lib/static.dart @@ -172,7 +172,12 @@ class StatisticsState extends State with TickerProviderStateMixin { borderRadius: BorderRadius.circular(responsiveWidth(22)), child: InkWell( borderRadius: BorderRadius.circular(responsiveWidth(22)), - onTap: () => Navigator.pop(context), + onTap: () => Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => const AddExpenseScreen(), + ), + ), child: Icon( Icons.arrow_back_ios_rounded, color: primaryColor, @@ -713,8 +718,8 @@ class StatisticsState extends State with TickerProviderStateMixin { accentColor: accentColor, primaryColor: primaryColor, cardColor: cardColor, - floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, - ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + ), ); } }