Last ONe
This commit is contained in:
parent
249e2d8e9c
commit
d2987cf262
3 changed files with 23 additions and 70 deletions
|
|
@ -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<BudgetScreen>
|
|||
|
||||
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),
|
||||
|
|
|
|||
|
|
@ -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<FinTrackHomePage>
|
|||
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<FinTrackHomePage>
|
|||
|
||||
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(),
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,12 @@ class StatisticsState extends State<Statistics> 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,7 +718,7 @@ class StatisticsState extends State<Statistics> with TickerProviderStateMixin {
|
|||
accentColor: accentColor,
|
||||
primaryColor: primaryColor,
|
||||
cardColor: cardColor,
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue