mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 23:04:49 +00:00
Calendar View: Monthly calendar displaying daily balance changes for selected account Account selection dropdown to switch between different accounts Month navigation with previous/next buttons Visual indicators (green for income, red for expenses) Monthly profit/loss summary at the top Auto-calculation of daily transaction totals Recent Transactions: View recent N transactions across all accounts Configurable display limit (10/20/50/100 transactions) Pull-to-refresh functionality Transaction details including account name, date, amount, and notes Visual distinction between income and expenses Sorted by date (most recent first) Implementation details: Created MoreScreen as menu hub for new features Replaced PlaceholderScreen with functional MoreScreen Leverages existing Provider pattern for state management Uses offline-first approach with existing data providers Full Chinese localization Material Design 3 compliant UI Files added: mobile/lib/screens/more_screen.dart mobile/lib/screens/calendar_screen.dart mobile/lib/screens/recent_transactions_screen.dart Files modified: mobile/lib/screens/main_navigation_screen.dart Signed-off-by: Lazy Bone <89256478+dwvwdv@users.noreply.github.com> Co-authored-by: dwvwdv <dwvwdv@protonmail.com>
89 lines
2.3 KiB
Dart
89 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'calendar_screen.dart';
|
|
import 'recent_transactions_screen.dart';
|
|
|
|
class MoreScreen extends StatelessWidget {
|
|
const MoreScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('More'),
|
|
),
|
|
body: ListView(
|
|
children: [
|
|
_buildMenuItem(
|
|
context: context,
|
|
icon: Icons.calendar_month,
|
|
title: 'Account Calendar',
|
|
subtitle: 'View monthly balance changes by account',
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const CalendarScreen(),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
Divider(height: 1, color: colorScheme.outlineVariant),
|
|
_buildMenuItem(
|
|
context: context,
|
|
icon: Icons.receipt_long,
|
|
title: 'Recent Transactions',
|
|
subtitle: 'View recent transactions across all accounts',
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const RecentTransactionsScreen(),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildMenuItem({
|
|
required BuildContext context,
|
|
required IconData icon,
|
|
required String title,
|
|
required String subtitle,
|
|
required VoidCallback onTap,
|
|
}) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
|
|
return ListTile(
|
|
leading: Container(
|
|
padding: const EdgeInsets.all(8),
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.primaryContainer,
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: Icon(
|
|
icon,
|
|
color: colorScheme.onPrimaryContainer,
|
|
),
|
|
),
|
|
title: Text(
|
|
title,
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
),
|
|
subtitle: Text(
|
|
subtitle,
|
|
style: TextStyle(color: colorScheme.onSurfaceVariant),
|
|
),
|
|
trailing: Icon(
|
|
Icons.chevron_right,
|
|
color: colorScheme.onSurfaceVariant,
|
|
),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|