mirror of
https://github.com/we-promise/sure.git
synced 2026-04-12 00:27:21 +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>
64 lines
1.7 KiB
Dart
64 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'dashboard_screen.dart';
|
|
import 'chat_list_screen.dart';
|
|
import 'more_screen.dart';
|
|
import 'settings_screen.dart';
|
|
|
|
class MainNavigationScreen extends StatefulWidget {
|
|
const MainNavigationScreen({super.key});
|
|
|
|
@override
|
|
State<MainNavigationScreen> createState() => _MainNavigationScreenState();
|
|
}
|
|
|
|
class _MainNavigationScreenState extends State<MainNavigationScreen> {
|
|
int _currentIndex = 0;
|
|
|
|
final List<Widget> _screens = [
|
|
const DashboardScreen(),
|
|
const ChatListScreen(),
|
|
const MoreScreen(),
|
|
const SettingsScreen(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: IndexedStack(
|
|
index: _currentIndex,
|
|
children: _screens,
|
|
),
|
|
bottomNavigationBar: NavigationBar(
|
|
selectedIndex: _currentIndex,
|
|
onDestinationSelected: (index) {
|
|
setState(() {
|
|
_currentIndex = index;
|
|
});
|
|
},
|
|
destinations: const [
|
|
NavigationDestination(
|
|
icon: Icon(Icons.home_outlined),
|
|
selectedIcon: Icon(Icons.home),
|
|
label: 'Home',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.chat_bubble_outline),
|
|
selectedIcon: Icon(Icons.chat_bubble),
|
|
label: 'AI Chat',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.more_horiz),
|
|
selectedIcon: Icon(Icons.more_horiz),
|
|
label: 'More',
|
|
),
|
|
NavigationDestination(
|
|
icon: Icon(Icons.settings_outlined),
|
|
selectedIcon: Icon(Icons.settings),
|
|
label: 'Settings',
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|