50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:intl/intl.dart';
|
|
import 'package:tunas/domains/budget/budget_bloc.dart';
|
|
import 'package:tunas/pages/budgets/widgets/budget_cards.dart';
|
|
import 'package:tunas/pages/budgets/widgets/budget_compare_selector.dart';
|
|
import 'package:tunas/pages/budgets/widgets/budget_radar.dart';
|
|
import 'package:tunas/pages/common/titled_container.dart';
|
|
|
|
class BudgetComparator extends StatelessWidget {
|
|
const BudgetComparator({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
bool smallVerticalScreen = MediaQuery.sizeOf(context).width < 800;
|
|
return BlocBuilder<BudgetBloc, BudgetState>(
|
|
builder: (context, state) => TitledContainer(
|
|
title: 'Compare',
|
|
child: smallVerticalScreen
|
|
? const Column(
|
|
children: [
|
|
BudgetCompareSelector(),
|
|
SizedBox(
|
|
height: 500,
|
|
child: BudgetRadar(),
|
|
),
|
|
SizedBox(
|
|
height: 10,
|
|
),
|
|
SizedBox(
|
|
height: 500,
|
|
child: BudgetCards(),
|
|
),
|
|
],
|
|
)
|
|
: const Column(
|
|
children: [
|
|
BudgetCompareSelector(),
|
|
Row(
|
|
children: [
|
|
BudgetCards(),
|
|
BudgetRadar(),
|
|
],
|
|
)
|
|
]
|
|
),
|
|
)
|
|
);
|
|
}
|
|
} |