Skip to content
Snippets Groups Projects
Commit 910cf1a6 authored by MichelleKehl's avatar MichelleKehl
Browse files

changes

parent cf0c5b57
Branches
No related tags found
No related merge requests found
import 'package:flutter/material.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:trackeroo/frontend/utils/transaction_listtile.dart';
import 'package:trackeroo/frontend/views/onboarding_view.dart';
import 'package:trackeroo/logic/models/transaction.dart';
enum Timespan { daily, weekly, monthly, yearly, all }
List<String> items = [
'C1',
'C2',
'C3',
'C4'
];
String? selectedValue;
class DetailsView extends StatefulWidget {
const DetailsView({super.key});
......@@ -20,23 +29,30 @@ class _DetailsViewState extends State<DetailsView> {
Transaction trn = Transaction(title: "Bus Ticket VVS", amount: -5.32, categoryId: 'food_and_groceries', dueDate: DateTime.now());
Transaction trp = Transaction(title: "Gehalt", amount: 1300, categoryId: 'leisure_and_entertainment', dueDate: DateTime.now());
Timespan timespanView = Timespan.monthly;
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
/* backgroundColor: Colors.blueGrey[900],*/
padding: EdgeInsets.all(16.0),
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
const Row(
children: [
Text(
'Datails chart',
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.bold
),
),
]
),
const SizedBox(height: 20.0),
Center(
child : SizedBox(
......@@ -123,6 +139,53 @@ class _DetailsViewState extends State<DetailsView> {
),
)
),
const SizedBox(height: 10.0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
FilterChip(
onSelected: (value) => setState(() {
timespanView = Timespan.daily;
}),
label: const Text('Daily'),
selected: timespanView == Timespan.daily,
showCheckmark: false
),
FilterChip(
onSelected: (value) => setState(() {
timespanView = Timespan.weekly;
}),
label: const Text('Weekly'),
selected: timespanView == Timespan.weekly,
showCheckmark: false
),
FilterChip(
onSelected: (value) => setState(() {
timespanView = Timespan.monthly;
}),
label: const Text('Montly'),
selected: timespanView == Timespan.monthly,
showCheckmark: false
),
FilterChip(
onSelected: (value) => setState(() {
timespanView = Timespan.yearly;
}),
label: const Text('Yearly'),
selected: timespanView == Timespan.yearly,
showCheckmark: false
),
FilterChip(
onSelected: (value) => setState(() {
timespanView = Timespan.all;
}),
label: const Text('All'),
selected: timespanView == Timespan.all,
showCheckmark: false
)
],
),
const SizedBox(height: 20.0),
const Text(
'Transactions',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment