Compare commits
6 Commits
fc6f64a271
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
f4294e0e11
|
|||
|
78614bd021
|
|||
|
f1d7d31a3c
|
|||
|
6a9da33283
|
|||
| 35930d188c | |||
| 51cb8868a3 |
6
.vscode/launch.json
vendored
@@ -5,18 +5,18 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "tunas",
|
"name": "krezus",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "dart"
|
"type": "dart"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tunas (profile mode)",
|
"name": "krezus (profile mode)",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "dart",
|
"type": "dart",
|
||||||
"flutterMode": "profile"
|
"flutterMode": "profile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tunas (release mode)",
|
"name": "krezus (release mode)",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "dart",
|
"type": "dart",
|
||||||
"flutterMode": "release"
|
"flutterMode": "release"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Tunas
|
# Krezus (tunas)
|
||||||
|
|
||||||
A very complicated tool that should have been an excel sheet.
|
A very complicated tool that should have been an excel sheet.
|
||||||
@@ -23,7 +23,7 @@ if (flutterVersionName == null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.example.tunas"
|
namespace "sx.glt.krezus"
|
||||||
compileSdkVersion flutter.compileSdkVersion
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
ndkVersion flutter.ndkVersion
|
ndkVersion flutter.ndkVersion
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.tunas"
|
applicationId "sx.glt.krezus"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion flutter.minSdkVersion
|
minSdkVersion flutter.minSdkVersion
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<application
|
<application
|
||||||
android:label="tunas"
|
android:label="krezus"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/launcher_icon">
|
android:icon="@mipmap/launcher_icon">
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.tunas
|
package sx.glt.krezus
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
BIN
assets/icon/krezus.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/icon/krezus2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
@@ -367,7 +367,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -402,7 +402,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@@ -545,7 +545,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -567,7 +567,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 10 KiB |
@@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Tunas</string>
|
<string>Krezus</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>tunas</string>
|
<string>krezus</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
|
|||||||
12
lib/app.dart
@@ -2,11 +2,11 @@ import 'package:dynamic_color/dynamic_color.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:tunas/clients/storage/json_storage_client.dart';
|
import 'package:krezus/clients/storage/json_storage_client.dart';
|
||||||
import 'package:tunas/pages/home/home_page.dart';
|
import 'package:krezus/pages/home/home_page.dart';
|
||||||
import 'package:tunas/repositories/json/json_repository.dart';
|
import 'package:krezus/repositories/json/json_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
|
|
||||||
class App extends StatefulWidget {
|
class App extends StatefulWidget {
|
||||||
const App({super.key});
|
const App({super.key});
|
||||||
@@ -78,7 +78,7 @@ class _AppViewState extends State<AppView> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Tunas',
|
title: 'Krezus',
|
||||||
theme: ThemeData(colorScheme: lightColorScheme),
|
theme: ThemeData(colorScheme: lightColorScheme),
|
||||||
darkTheme: ThemeData(colorScheme: darkColorScheme),
|
darkTheme: ThemeData(colorScheme: darkColorScheme),
|
||||||
themeMode: _metadataRepository.getSettings().themeMode,
|
themeMode: _metadataRepository.getSettings().themeMode,
|
||||||
|
|||||||
@@ -20,11 +20,17 @@ class JsonStorageClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<File> _getJson(String filename) async {
|
Future<File> _getJson(String filename) async {
|
||||||
final dir = await getApplicationDocumentsDirectory();
|
final rootDirectory = Platform.isAndroid ? await getExternalStorageDirectory() : await getApplicationDocumentsDirectory();
|
||||||
final file = File('${dir.path}/$filename');
|
|
||||||
if (!file.existsSync()) {
|
final appDirectory = Directory('${rootDirectory!.path}/krezus');
|
||||||
file.createSync();
|
if (!appDirectory.existsSync()) {
|
||||||
|
appDirectory.createSync();
|
||||||
}
|
}
|
||||||
return file;
|
|
||||||
|
final targetFile = File('${rootDirectory.path}/krezus/$filename');
|
||||||
|
if (!targetFile.existsSync()) {
|
||||||
|
targetFile.createSync();
|
||||||
|
}
|
||||||
|
return targetFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,11 @@ import 'package:csv/csv.dart';
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/account.dart';
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
part 'account_event.dart';
|
part 'account_event.dart';
|
||||||
@@ -75,7 +75,7 @@ class AccountBloc extends Bloc<AccountEvent, AccountState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onAccountImportCSV(AccountImportCSV event, Emitter<AccountState> emit) async {
|
_onAccountImportCSV(AccountImportCSV event, Emitter<AccountState> emit) async {
|
||||||
int colorIndex = 0;
|
// int colorIndex = 0;
|
||||||
FilePickerResult? result = await FilePicker.platform.pickFiles();
|
FilePickerResult? result = await FilePicker.platform.pickFiles();
|
||||||
|
|
||||||
final csvPath = result?.files.first.path;
|
final csvPath = result?.files.first.path;
|
||||||
@@ -172,7 +172,7 @@ class AccountBloc extends Bloc<AccountEvent, AccountState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onAccountEditLabel(AccountEditLabel event, Emitter<AccountState> emit) {
|
_onAccountEditLabel(AccountEditLabel event, Emitter<AccountState> emit) {
|
||||||
Account account = event.account;
|
// Account account = event.account;
|
||||||
// TODO check for existance, rename every transaction
|
// TODO check for existance, rename every transaction
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
|
|
||||||
part 'budget_event.dart';
|
part 'budget_event.dart';
|
||||||
part 'budget_state.dart';
|
part 'budget_state.dart';
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import 'dart:ui';
|
|||||||
|
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
part 'category_event.dart';
|
part 'category_event.dart';
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/models/month_totals.dart';
|
import 'package:krezus/domains/charts/models/month_totals.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_line.dart';
|
import 'package:krezus/domains/transaction/models/transaction_line.dart';
|
||||||
import 'package:tunas/domains/charts/models/chart_item.dart';
|
import 'package:krezus/domains/charts/models/chart_item.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
|
|
||||||
part 'chart_event.dart';
|
part 'chart_event.dart';
|
||||||
part 'chart_state.dart';
|
part 'chart_state.dart';
|
||||||
@@ -95,6 +95,8 @@ class ChartBloc extends Bloc<ChartEvent, ChartState> {
|
|||||||
categoriesTotals[transaction.category] = categoryTotal;
|
categoriesTotals[transaction.category] = categoryTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
accountsTotals.removeWhere((key, value) => value.round() == 0);
|
||||||
|
|
||||||
return _computeStateScopedStats(state.copyWith(
|
return _computeStateScopedStats(state.copyWith(
|
||||||
transactionsLines: transactionsLines,
|
transactionsLines: transactionsLines,
|
||||||
globalTotal: globalTotal,
|
globalTotal: globalTotal,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import 'dart:async';
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/settings.dart';
|
import 'package:krezus/repositories/metadata/models/settings.dart';
|
||||||
|
|
||||||
part 'settings_event.dart';
|
part 'settings_event.dart';
|
||||||
part 'settings_state.dart';
|
part 'settings_state.dart';
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
|
|
||||||
class TransactionLine {
|
class TransactionLine extends Equatable{
|
||||||
Transaction transaction;
|
final Transaction transaction;
|
||||||
double subTotal;
|
final double subTotal;
|
||||||
|
|
||||||
TransactionLine({
|
const TransactionLine({
|
||||||
required this.transaction,
|
required this.transaction,
|
||||||
required this.subTotal,
|
required this.subTotal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [transaction, subTotal];
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:formz/formz.dart';
|
import 'package:formz/formz.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_account.dart';
|
import 'package:krezus/domains/transaction/models/transaction_account.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_category.dart';
|
import 'package:krezus/domains/transaction/models/transaction_category.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_date.dart';
|
import 'package:krezus/domains/transaction/models/transaction_date.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_description.dart';
|
import 'package:krezus/domains/transaction/models/transaction_description.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_line.dart';
|
import 'package:krezus/domains/transaction/models/transaction_line.dart';
|
||||||
import 'package:tunas/domains/transaction/models/transaction_value.dart';
|
import 'package:krezus/domains/transaction/models/transaction_value.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
part 'transaction_event.dart';
|
part 'transaction_event.dart';
|
||||||
@@ -33,18 +36,20 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
on<TransactionSetCurrent>(_onTransactionSetCurrent);
|
on<TransactionSetCurrent>(_onTransactionSetCurrent);
|
||||||
on<TransactionDeleteCurrent>(_onTransactionDeleteCurrent);
|
on<TransactionDeleteCurrent>(_onTransactionDeleteCurrent);
|
||||||
on<TransactionFilterCategory>(_onTransactionFilterCategory);
|
on<TransactionFilterCategory>(_onTransactionFilterCategory);
|
||||||
|
on<TransactionFilterAccount>(_onTransactionFilterAccount);
|
||||||
|
on<TransactionResetSnackBar>(_onTransactionResetSnackBar);
|
||||||
|
|
||||||
_transactionsRepository
|
_transactionsRepository
|
||||||
.getTransactionsStream()
|
.getTransactionsStream()
|
||||||
.listen((transactions) => add(TransactionsLoad(transactions)));
|
.listen((transactions) => add(TransactionsLoad(transactions)));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onAccountLoad(TransactionsLoad event, Emitter<TransactionState> emit) {
|
FutureOr<void> _onAccountLoad(TransactionsLoad event, Emitter<TransactionState> emit) {
|
||||||
var computeResult = _computeTransactionLine(event.transactions);
|
var computeResult = _computeTransactionLine(event.transactions);
|
||||||
emit(state.copyWith(
|
emit(state.copyWith(
|
||||||
transactions: event.transactions,
|
transactions: event.transactions,
|
||||||
transactionsLines: computeResult.list,
|
transactionsLines: computeResult.list,
|
||||||
transactionsLinesFiltered: _applyCategoryFilter(computeResult.list),
|
transactionsLinesFiltered: _applyFilters(computeResult.list),
|
||||||
globalTotal: computeResult.globalTotal,
|
globalTotal: computeResult.globalTotal,
|
||||||
accountsTotals: computeResult.accountsTotals,
|
accountsTotals: computeResult.accountsTotals,
|
||||||
));
|
));
|
||||||
@@ -73,7 +78,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
return (list: output, globalTotal: globalTotal, accountsTotals: accountsTotals, categories: categories.toList());
|
return (list: output, globalTotal: globalTotal, accountsTotals: accountsTotals, categories: categories.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionDateChange(
|
FutureOr<void> _onTransactionDateChange(
|
||||||
TransactionDateChange event, Emitter<TransactionState> emit
|
TransactionDateChange event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
final transactionDate = TransactionDate.dirty(event.date);
|
final transactionDate = TransactionDate.dirty(event.date);
|
||||||
@@ -83,7 +88,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionCategoryChange(
|
FutureOr<void> _onTransactionCategoryChange(
|
||||||
TransactionCategoryChange event, Emitter<TransactionState> emit
|
TransactionCategoryChange event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
final transactionCategory = TransactionCategory.dirty(event.category);
|
final transactionCategory = TransactionCategory.dirty(event.category);
|
||||||
@@ -93,7 +98,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionDescriptionChange(
|
FutureOr<void> _onTransactionDescriptionChange(
|
||||||
TransactionDescriptionChange event, Emitter<TransactionState> emit
|
TransactionDescriptionChange event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
final transactionDescription = TransactionDescription.dirty(event.description);
|
final transactionDescription = TransactionDescription.dirty(event.description);
|
||||||
@@ -103,7 +108,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionAccountChange(
|
FutureOr<void> _onTransactionAccountChange(
|
||||||
TransactionAccountChange event, Emitter<TransactionState> emit
|
TransactionAccountChange event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
final transactionAccount = TransactionAccount.dirty(event.account);
|
final transactionAccount = TransactionAccount.dirty(event.account);
|
||||||
@@ -113,7 +118,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionValueChange(
|
FutureOr<void> _onTransactionValueChange(
|
||||||
TransactionValueChange event, Emitter<TransactionState> emit
|
TransactionValueChange event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
@@ -131,19 +136,19 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionOpenAddDialog(
|
FutureOr<void> _onTransactionOpenAddDialog(
|
||||||
TransactionOpenAddDialog event, Emitter<TransactionState> emit
|
TransactionOpenAddDialog event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
emit(state.copyWith(showAddDialog: true));
|
emit(state.copyWith(showAddDialog: true));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionHideAddDialog(
|
FutureOr<void> _onTransactionHideAddDialog(
|
||||||
TransactionHideAddDialog event, Emitter<TransactionState> emit
|
TransactionHideAddDialog event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
emit(state.copyWith(showAddDialog: false));
|
emit(state.copyWith(showAddDialog: false));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionAddDialog(
|
FutureOr<void> _onTransactionAddDialog(
|
||||||
TransactionAdd event, Emitter<TransactionState> emit
|
TransactionAdd event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
if (state.isValid) {
|
if (state.isValid) {
|
||||||
@@ -167,21 +172,24 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
|
|
||||||
emit(state.copyWith(
|
emit(state.copyWith(
|
||||||
currentTransaction: null,
|
currentTransaction: null,
|
||||||
transactionDate: const TransactionDate.pure(),
|
// transactionDate: const TransactionDate.pure(),
|
||||||
transactionCategory: const TransactionCategory.pure(),
|
// transactionCategory: const TransactionCategory.pure(),
|
||||||
transactionDescription: const TransactionDescription.pure(),
|
// transactionDescription: const TransactionDescription.pure(),
|
||||||
transactionAccount: const TransactionAccount.pure(),
|
// transactionAccount: const TransactionAccount.pure(),
|
||||||
transactionValue: const TransactionValue.pure(),
|
// transactionValue: const TransactionValue.pure(),
|
||||||
transactions: transactions,
|
transactions: transactions,
|
||||||
transactionsLines: computeResult.list,
|
transactionsLines: computeResult.list,
|
||||||
transactionsLinesFiltered: _applyCategoryFilter(computeResult.list),
|
transactionsLinesFiltered: _applyFilters(computeResult.list),
|
||||||
globalTotal: computeResult.globalTotal,
|
globalTotal: computeResult.globalTotal,
|
||||||
accountsTotals: computeResult.accountsTotals,
|
accountsTotals: computeResult.accountsTotals,
|
||||||
|
showSnackBar: true,
|
||||||
|
snackBarIsError: false,
|
||||||
|
snackBarMessage: 'Transaction ${currentTransaction == null ? 'added' : 'updated'} !',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionSetCurrent(
|
FutureOr<void> _onTransactionSetCurrent(
|
||||||
TransactionSetCurrent event, Emitter<TransactionState> emit
|
TransactionSetCurrent event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
Transaction? transaction = event.transaction;
|
Transaction? transaction = event.transaction;
|
||||||
@@ -206,7 +214,7 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTransactionDeleteCurrent(
|
FutureOr<void> _onTransactionDeleteCurrent(
|
||||||
TransactionDeleteCurrent event, Emitter<TransactionState> emit
|
TransactionDeleteCurrent event, Emitter<TransactionState> emit
|
||||||
) {
|
) {
|
||||||
Transaction? currentTransaction = state.currentTransaction;
|
Transaction? currentTransaction = state.currentTransaction;
|
||||||
@@ -224,33 +232,83 @@ class TransactionBloc extends Bloc<TransactionEvent, TransactionState> {
|
|||||||
transactionValue: const TransactionValue.pure(),
|
transactionValue: const TransactionValue.pure(),
|
||||||
transactions: transactions,
|
transactions: transactions,
|
||||||
transactionsLines: computeResult.list,
|
transactionsLines: computeResult.list,
|
||||||
transactionsLinesFiltered: _applyCategoryFilter(computeResult.list),
|
transactionsLinesFiltered: _applyFilters(computeResult.list),
|
||||||
globalTotal: computeResult.globalTotal,
|
globalTotal: computeResult.globalTotal,
|
||||||
accountsTotals: computeResult.accountsTotals,
|
accountsTotals: computeResult.accountsTotals,
|
||||||
|
showSnackBar: true,
|
||||||
|
snackBarIsError: false,
|
||||||
|
snackBarMessage: 'Transaction removed !',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_onTransactionFilterCategory(TransactionFilterCategory event, Emitter<TransactionState> emit) {
|
FutureOr<void> _onTransactionFilterCategory(TransactionFilterCategory event, Emitter<TransactionState> emit) {
|
||||||
List<TransactionLine> transactionsLinesFiltered = state.transactionsLines;
|
emit(TransactionState(
|
||||||
String? categoryLabel = event.category?.label;
|
globalTotal: state.globalTotal,
|
||||||
if (categoryLabel != null) {
|
accountsTotals: state.accountsTotals,
|
||||||
transactionsLinesFiltered = state.transactionsLines.where((transaction) => transaction.transaction.category == categoryLabel).toList();
|
transactions: state.transactions,
|
||||||
}
|
transactionsLines: state.transactionsLines,
|
||||||
|
transactionsLinesFiltered: state.transactionsLinesFiltered,
|
||||||
|
transactionDate: state.transactionDate,
|
||||||
|
transactionCategory: state.transactionCategory,
|
||||||
|
transactionDescription: state.transactionDescription,
|
||||||
|
transactionAccount: state.transactionAccount,
|
||||||
|
transactionValue: state.transactionValue,
|
||||||
|
isValid: state.isValid,
|
||||||
|
showAddDialog: state.showAddDialog,
|
||||||
|
currentTransaction: state.currentTransaction,
|
||||||
|
categoryFilter: event.category,
|
||||||
|
accountFilter: state.accountFilter,
|
||||||
|
));
|
||||||
|
|
||||||
emit(state.copyWith(
|
emit(state.copyWith(
|
||||||
transactionsLinesFiltered: transactionsLinesFiltered,
|
transactionsLinesFiltered: _applyFilters(state.transactionsLines),
|
||||||
categoryFilter: event.category,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<TransactionLine> _applyCategoryFilter(List<TransactionLine> transactionsLines) {
|
FutureOr<void> _onTransactionFilterAccount(TransactionFilterAccount event, Emitter<TransactionState> emit) {
|
||||||
|
emit(TransactionState(
|
||||||
|
globalTotal: state.globalTotal,
|
||||||
|
accountsTotals: state.accountsTotals,
|
||||||
|
transactions: state.transactions,
|
||||||
|
transactionsLines: state.transactionsLines,
|
||||||
|
transactionsLinesFiltered: state.transactionsLinesFiltered,
|
||||||
|
transactionDate: state.transactionDate,
|
||||||
|
transactionCategory: state.transactionCategory,
|
||||||
|
transactionDescription: state.transactionDescription,
|
||||||
|
transactionAccount: state.transactionAccount,
|
||||||
|
transactionValue: state.transactionValue,
|
||||||
|
isValid: state.isValid,
|
||||||
|
showAddDialog: state.showAddDialog,
|
||||||
|
currentTransaction: state.currentTransaction,
|
||||||
|
categoryFilter: state.categoryFilter,
|
||||||
|
accountFilter: event.account,
|
||||||
|
));
|
||||||
|
emit(state.copyWith(
|
||||||
|
transactionsLinesFiltered: _applyFilters(state.transactionsLines),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<TransactionLine> _applyFilters(List<TransactionLine> transactionsLines) {
|
||||||
List<TransactionLine> transactionsLinesFiltered = transactionsLines;
|
List<TransactionLine> transactionsLinesFiltered = transactionsLines;
|
||||||
String? categoryLabel = state.categoryFilter?.label;
|
String? categoryLabel = state.categoryFilter?.label;
|
||||||
if (categoryLabel != null) {
|
if (categoryLabel != null) {
|
||||||
transactionsLinesFiltered = state.transactionsLines.where((transaction) => transaction.transaction.category == categoryLabel).toList();
|
transactionsLinesFiltered = transactionsLinesFiltered.where((transaction) => transaction.transaction.category == categoryLabel).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String? accountLabel = state.accountFilter?.label;
|
||||||
|
if (accountLabel != null) {
|
||||||
|
transactionsLinesFiltered = transactionsLinesFiltered.where((transaction) => transaction.transaction.account == accountLabel).toList();
|
||||||
|
}
|
||||||
|
|
||||||
return transactionsLinesFiltered;
|
return transactionsLinesFiltered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FutureOr<void> _onTransactionResetSnackBar(TransactionResetSnackBar event, Emitter<TransactionState> emit) {
|
||||||
|
emit(state.copyWith(
|
||||||
|
showSnackBar: false,
|
||||||
|
snackBarIsError: false,
|
||||||
|
snackBarMessage: '',
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -77,4 +77,14 @@ final class TransactionFilterCategory extends TransactionEvent {
|
|||||||
final Category? category;
|
final Category? category;
|
||||||
|
|
||||||
const TransactionFilterCategory(this.category);
|
const TransactionFilterCategory(this.category);
|
||||||
|
}
|
||||||
|
|
||||||
|
final class TransactionFilterAccount extends TransactionEvent {
|
||||||
|
final Account? account;
|
||||||
|
|
||||||
|
const TransactionFilterAccount(this.account);
|
||||||
|
}
|
||||||
|
|
||||||
|
final class TransactionResetSnackBar extends TransactionEvent {
|
||||||
|
const TransactionResetSnackBar();
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ final class TransactionState extends Equatable {
|
|||||||
final List<TransactionLine> transactionsLines;
|
final List<TransactionLine> transactionsLines;
|
||||||
final List<TransactionLine> transactionsLinesFiltered;
|
final List<TransactionLine> transactionsLinesFiltered;
|
||||||
final Category? categoryFilter;
|
final Category? categoryFilter;
|
||||||
|
final Account? accountFilter;
|
||||||
|
|
||||||
final TransactionDate transactionDate;
|
final TransactionDate transactionDate;
|
||||||
final TransactionCategory transactionCategory;
|
final TransactionCategory transactionCategory;
|
||||||
@@ -19,6 +20,10 @@ final class TransactionState extends Equatable {
|
|||||||
|
|
||||||
final Transaction? currentTransaction;
|
final Transaction? currentTransaction;
|
||||||
|
|
||||||
|
final bool showSnackBar;
|
||||||
|
final String snackBarMessage;
|
||||||
|
final bool snackBarIsError;
|
||||||
|
|
||||||
const TransactionState({
|
const TransactionState({
|
||||||
this.globalTotal = 0,
|
this.globalTotal = 0,
|
||||||
this.accountsTotals = const <String, double>{},
|
this.accountsTotals = const <String, double>{},
|
||||||
@@ -34,6 +39,10 @@ final class TransactionState extends Equatable {
|
|||||||
this.showAddDialog = false,
|
this.showAddDialog = false,
|
||||||
this.currentTransaction,
|
this.currentTransaction,
|
||||||
this.categoryFilter,
|
this.categoryFilter,
|
||||||
|
this.accountFilter,
|
||||||
|
this.showSnackBar = false,
|
||||||
|
this.snackBarMessage = '',
|
||||||
|
this.snackBarIsError = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
TransactionState copyWith({
|
TransactionState copyWith({
|
||||||
@@ -51,6 +60,10 @@ final class TransactionState extends Equatable {
|
|||||||
bool? showAddDialog,
|
bool? showAddDialog,
|
||||||
Transaction? currentTransaction,
|
Transaction? currentTransaction,
|
||||||
Category? categoryFilter,
|
Category? categoryFilter,
|
||||||
|
Account? accountFilter,
|
||||||
|
bool? showSnackBar,
|
||||||
|
String? snackBarMessage,
|
||||||
|
bool? snackBarIsError,
|
||||||
}) {
|
}) {
|
||||||
return TransactionState(
|
return TransactionState(
|
||||||
globalTotal: globalTotal ?? this.globalTotal,
|
globalTotal: globalTotal ?? this.globalTotal,
|
||||||
@@ -66,12 +79,19 @@ final class TransactionState extends Equatable {
|
|||||||
isValid: isValid ?? this.isValid,
|
isValid: isValid ?? this.isValid,
|
||||||
showAddDialog: showAddDialog ?? this.showAddDialog,
|
showAddDialog: showAddDialog ?? this.showAddDialog,
|
||||||
currentTransaction: currentTransaction ?? this.currentTransaction,
|
currentTransaction: currentTransaction ?? this.currentTransaction,
|
||||||
categoryFilter: categoryFilter,
|
categoryFilter: categoryFilter ?? this.categoryFilter,
|
||||||
|
accountFilter: accountFilter ?? this.accountFilter,
|
||||||
|
showSnackBar: showSnackBar ?? this.showSnackBar,
|
||||||
|
snackBarMessage: snackBarMessage ?? this.snackBarMessage,
|
||||||
|
snackBarIsError: snackBarIsError ?? this.snackBarIsError,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object?> get props => [
|
List<Object?> get props => [
|
||||||
|
transactions,
|
||||||
|
transactionsLines,
|
||||||
|
transactionsLinesFiltered,
|
||||||
transactionDate,
|
transactionDate,
|
||||||
transactionCategory,
|
transactionCategory,
|
||||||
transactionDescription,
|
transactionDescription,
|
||||||
@@ -81,6 +101,10 @@ final class TransactionState extends Equatable {
|
|||||||
showAddDialog,
|
showAddDialog,
|
||||||
currentTransaction,
|
currentTransaction,
|
||||||
categoryFilter,
|
categoryFilter,
|
||||||
|
accountFilter,
|
||||||
|
showSnackBar,
|
||||||
|
snackBarMessage,
|
||||||
|
snackBarIsError,
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/date_symbol_data_local.dart';
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
import 'package:tunas/app.dart';
|
import 'package:krezus/app.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
initializeDateFormatting('fr_FR', null);
|
initializeDateFormatting('fr_FR', null);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budgets_actions.dart';
|
import 'package:krezus/pages/budgets/widgets/budgets_actions.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/month_distribution.dart';
|
import 'package:krezus/pages/budgets/widgets/month_distribution.dart';
|
||||||
|
|
||||||
class BudgetsPage extends StatelessWidget {
|
class BudgetsPage extends StatelessWidget {
|
||||||
const BudgetsPage({super.key});
|
const BudgetsPage({super.key});
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
|
|
||||||
class BudgetCards extends StatelessWidget {
|
class BudgetCards extends StatelessWidget {
|
||||||
const BudgetCards({super.key});
|
const BudgetCards({super.key});
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_cards.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_cards.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_compare_selector.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_compare_selector.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_radar.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_radar.dart';
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
|
||||||
|
|
||||||
class BudgetComparator extends StatelessWidget {
|
class BudgetComparator extends StatelessWidget {
|
||||||
const BudgetComparator({super.key});
|
const BudgetComparator({super.key});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
|
|
||||||
class BudgetCompareSelector extends StatelessWidget {
|
class BudgetCompareSelector extends StatelessWidget {
|
||||||
const BudgetCompareSelector({super.key});
|
const BudgetCompareSelector({super.key});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
|
|
||||||
class BudgetLine extends StatelessWidget {
|
class BudgetLine extends StatelessWidget {
|
||||||
final Budget budget;
|
final Budget budget;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_line.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_line.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
|
|
||||||
class BudgetMaker extends StatelessWidget {
|
class BudgetMaker extends StatelessWidget {
|
||||||
const BudgetMaker({super.key});
|
const BudgetMaker({super.key});
|
||||||
@@ -25,7 +25,7 @@ class BudgetMaker extends StatelessWidget {
|
|||||||
keyboardType: const TextInputType.numberWithOptions(decimal: false),
|
keyboardType: const TextInputType.numberWithOptions(decimal: false),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.euro),
|
icon: const Icon(Icons.euro),
|
||||||
hintText: '\$\$\$',
|
label: const Text('Revenu par mois'),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
),
|
),
|
||||||
|
|||||||
22
lib/pages/budgets/widgets/budget_projection.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
|
|
||||||
|
class BudgetProjection extends StatelessWidget {
|
||||||
|
const BudgetProjection({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<BudgetBloc, BudgetState>(
|
||||||
|
builder: (context, state) => TitledContainer(
|
||||||
|
title: 'Projection',
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:fl_chart/fl_chart.dart';
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
|
|
||||||
class BudgetRadar extends StatelessWidget {
|
class BudgetRadar extends StatelessWidget {
|
||||||
const BudgetRadar({super.key});
|
const BudgetRadar({super.key});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
|
|
||||||
class BudgetsActions extends StatelessWidget {
|
class BudgetsActions extends StatelessWidget {
|
||||||
const BudgetsActions({super.key});
|
const BudgetsActions({super.key});
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_comparator.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_comparator.dart';
|
||||||
import 'package:tunas/pages/budgets/widgets/budget_maker.dart';
|
import 'package:krezus/pages/budgets/widgets/budget_maker.dart';
|
||||||
|
|
||||||
class MonthDistribution extends StatelessWidget {
|
class MonthDistribution extends StatelessWidget {
|
||||||
const MonthDistribution({super.key});
|
const MonthDistribution({super.key});
|
||||||
|
|||||||
100
lib/pages/common/editable_color.dart
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EditableColor extends StatelessWidget {
|
||||||
|
final Color color;
|
||||||
|
final ValueChanged<Color>? onChanged;
|
||||||
|
|
||||||
|
const EditableColor({super.key, required this.color, this.onChanged});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IconButton(
|
||||||
|
onPressed: () => EditableColorDialog.show(context, color, onChanged),
|
||||||
|
icon: const Icon(Icons.palette),
|
||||||
|
color: color,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EditableColorDialog extends StatefulWidget {
|
||||||
|
final Color initialColor;
|
||||||
|
final ValueChanged<Color>? onChanged;
|
||||||
|
|
||||||
|
const EditableColorDialog({super.key, required this.initialColor, this.onChanged});
|
||||||
|
|
||||||
|
static void show(BuildContext context, Color color, ValueChanged<Color>? onChanged) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: false,
|
||||||
|
useRootNavigator: false,
|
||||||
|
builder: (context) => EditableColorDialog(initialColor: color, onChanged: onChanged)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hide(BuildContext context) => Navigator.pop(context);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<EditableColorDialog> createState() => _EditableColorDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EditableColorDialogState extends State<EditableColorDialog> {
|
||||||
|
Color? color;
|
||||||
|
|
||||||
|
List<Widget> _buildColorList() {
|
||||||
|
return colors.map((color) => IconButton(
|
||||||
|
onPressed: () => setState(() => this.color = color),
|
||||||
|
icon: Icon(
|
||||||
|
color.value == this.color?.value ? Icons.radio_button_checked : Icons.radio_button_off,
|
||||||
|
color: color,
|
||||||
|
)
|
||||||
|
)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
color ??= widget.initialColor;
|
||||||
|
return AlertDialog(
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => EditableColorDialog.hide(context),
|
||||||
|
icon: const Icon(Icons.close)
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
EditableColorDialog.hide(context);
|
||||||
|
if (color != null && widget.onChanged != null) {
|
||||||
|
widget.onChanged!(color!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.save)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
title: const Text('Edit color'),
|
||||||
|
content: Row(
|
||||||
|
children: _buildColorList(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const List<Color> colors = [
|
||||||
|
Colors.black,
|
||||||
|
Colors.white,
|
||||||
|
Colors.red,
|
||||||
|
Colors.pink,
|
||||||
|
Colors.purple,
|
||||||
|
Colors.indigo,
|
||||||
|
Colors.blue,
|
||||||
|
Colors.lightBlue,
|
||||||
|
Colors.cyan,
|
||||||
|
Colors.teal,
|
||||||
|
Colors.green,
|
||||||
|
Colors.lime,
|
||||||
|
Colors.yellow,
|
||||||
|
Colors.amber,
|
||||||
|
Colors.orange,
|
||||||
|
Colors.deepOrange,
|
||||||
|
Colors.brown,
|
||||||
|
Colors.grey,
|
||||||
|
Colors.blueGrey,
|
||||||
|
];
|
||||||
74
lib/pages/common/editable_label.dart
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EditableLabel extends StatefulWidget {
|
||||||
|
final String initialValue;
|
||||||
|
final String? hintText;
|
||||||
|
final ValueChanged<String>? onChanged;
|
||||||
|
final TextInputType? keyboardType;
|
||||||
|
|
||||||
|
const EditableLabel({super.key, required this.initialValue, this.onChanged, this.hintText, this.keyboardType});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<EditableLabel> createState() => _EditableLabelState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EditableLabelState extends State<EditableLabel> {
|
||||||
|
bool editMode = false;
|
||||||
|
String? value;
|
||||||
|
|
||||||
|
Widget _editMode() {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 50,
|
||||||
|
child: TextFormField(
|
||||||
|
keyboardType: widget.keyboardType,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: widget.hintText,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
initialValue: widget.initialValue,
|
||||||
|
onChanged: (value) => this.value = value,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => setState(() {
|
||||||
|
editMode = !editMode;
|
||||||
|
}),
|
||||||
|
icon: const Icon(Icons.close),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => setState(() {
|
||||||
|
editMode = !editMode;
|
||||||
|
if (value != null && widget.onChanged != null) {
|
||||||
|
widget.onChanged!(value!);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
icon: const Icon(Icons.save),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _readMode() {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Text(widget.initialValue),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () => setState(() {
|
||||||
|
editMode = !editMode;
|
||||||
|
}),
|
||||||
|
icon: const Icon(Icons.edit),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return editMode ? _editMode() : _readMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tunas/pages/data/widgets/account_settings.dart';
|
import 'package:krezus/pages/data/widgets/account_settings.dart';
|
||||||
import 'package:tunas/pages/data/widgets/categories_settings.dart';
|
import 'package:krezus/pages/data/widgets/categories_settings.dart';
|
||||||
import 'package:tunas/pages/data/widgets/import_settings.dart';
|
import 'package:krezus/pages/data/widgets/import_settings.dart';
|
||||||
import 'package:tunas/pages/data/widgets/settings_settings.dart';
|
import 'package:krezus/pages/data/widgets/settings_settings.dart';
|
||||||
|
|
||||||
class DataPage extends StatelessWidget {
|
class DataPage extends StatelessWidget {
|
||||||
const DataPage({super.key});
|
const DataPage({super.key});
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
import 'package:krezus/pages/common/editable_color.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/account.dart';
|
import 'package:krezus/pages/common/editable_label.dart';
|
||||||
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
|
|
||||||
class AccountSettings extends StatelessWidget {
|
class AccountSettings extends StatelessWidget {
|
||||||
const AccountSettings({super.key});
|
const AccountSettings({super.key});
|
||||||
@@ -10,10 +12,9 @@ class AccountSettings extends StatelessWidget {
|
|||||||
List<Widget> _computeCategoryList(BuildContext context, List<Account> accounts) {
|
List<Widget> _computeCategoryList(BuildContext context, List<Account> accounts) {
|
||||||
return accounts.map((account) => Row(
|
return accounts.map((account) => Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
EditableColor(
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.palette),
|
|
||||||
color: account.rgbToColor(),
|
color: account.rgbToColor(),
|
||||||
|
onChanged: (color) => context.read<AccountBloc>().add(AccountEditColor(account, color.value.toRadixString(16).toUpperCase().padLeft(8, '0'))),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => context.read<AccountBloc>().add(AccountEditSaving(account, !account.saving)),
|
onPressed: () => context.read<AccountBloc>().add(AccountEditSaving(account, !account.saving)),
|
||||||
@@ -22,11 +23,12 @@ class AccountSettings extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Container(width: 5),
|
Container(width: 5),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(account.label)
|
child: EditableLabel(
|
||||||
),
|
initialValue: account.label,
|
||||||
IconButton(
|
onChanged: (value) => context.read<AccountBloc>().add(AccountEditLabel(account, value)),
|
||||||
onPressed: () {},
|
hintText: 'Acount name',
|
||||||
icon: const Icon(Icons.edit),
|
keyboardType: TextInputType.text,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => context.read<AccountBloc>().add(AccountRemove(account)),
|
onPressed: () => context.read<AccountBloc>().add(AccountRemove(account)),
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
import 'package:krezus/pages/common/editable_color.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/pages/common/editable_label.dart';
|
||||||
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
|
|
||||||
class CategoriesSettings extends StatelessWidget {
|
class CategoriesSettings extends StatelessWidget {
|
||||||
const CategoriesSettings({super.key});
|
const CategoriesSettings({super.key});
|
||||||
@@ -10,10 +12,9 @@ class CategoriesSettings extends StatelessWidget {
|
|||||||
List<Widget> _computeCategoryList(BuildContext context, List<Category> categories) {
|
List<Widget> _computeCategoryList(BuildContext context, List<Category> categories) {
|
||||||
return categories.map((category) => Row(
|
return categories.map((category) => Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
EditableColor(
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(Icons.palette),
|
|
||||||
color: category.rgbToColor(),
|
color: category.rgbToColor(),
|
||||||
|
onChanged: (color) => context.read<CategoryBloc>().add(CategoryEditColor(category, color.value.toRadixString(16).toUpperCase().padLeft(8, '0'))),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => context.read<CategoryBloc>().add(CategoryEditTransfert(category, !category.transfert)),
|
onPressed: () => context.read<CategoryBloc>().add(CategoryEditTransfert(category, !category.transfert)),
|
||||||
@@ -27,11 +28,12 @@ class CategoriesSettings extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Container(width: 5),
|
Container(width: 5),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(category.label)
|
child: EditableLabel(
|
||||||
),
|
initialValue: category.label,
|
||||||
IconButton(
|
onChanged: (value) => context.read<CategoryBloc>().add(CategoryEditLabel(category, value)),
|
||||||
onPressed: () {},
|
hintText: 'Acount name',
|
||||||
icon: const Icon(Icons.edit),
|
keyboardType: TextInputType.text,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => context.read<CategoryBloc>().add(CategoryRemove(category)),
|
onPressed: () => context.read<CategoryBloc>().add(CategoryRemove(category)),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
|
|
||||||
class ImportSettings extends StatelessWidget {
|
class ImportSettings extends StatelessWidget {
|
||||||
const ImportSettings({super.key});
|
const ImportSettings({super.key});
|
||||||
@@ -16,7 +16,7 @@ class ImportSettings extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
FilledButton.icon(
|
FilledButton.icon(
|
||||||
onPressed: () => context.read<AccountBloc>().add(const ClearData()),
|
onPressed: () => context.read<AccountBloc>().add(const ClearData()),
|
||||||
label: const Text('ClearData'),
|
label: const Text('Clear all data'),
|
||||||
icon: const Icon(Icons.delete_forever),
|
icon: const Icon(Icons.delete_forever),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/settings/settings_bloc.dart';
|
import 'package:krezus/domains/settings/settings_bloc.dart';
|
||||||
import 'package:tunas/pages/common/titled_container.dart';
|
import 'package:krezus/pages/common/titled_container.dart';
|
||||||
|
|
||||||
class SettingsSettings extends StatelessWidget {
|
class SettingsSettings extends StatelessWidget {
|
||||||
const SettingsSettings({super.key});
|
const SettingsSettings({super.key});
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
import 'package:tunas/domains/budget/budget_bloc.dart';
|
import 'package:krezus/domains/budget/budget_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/chart_bloc.dart';
|
import 'package:krezus/domains/charts/chart_bloc.dart';
|
||||||
import 'package:tunas/domains/settings/settings_bloc.dart';
|
import 'package:krezus/domains/settings/settings_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/pages/budgets/budgets_page.dart';
|
import 'package:krezus/pages/budgets/budgets_page.dart';
|
||||||
import 'package:tunas/pages/data/data_page.dart';
|
import 'package:krezus/pages/data/data_page.dart';
|
||||||
import 'package:tunas/pages/stats/stats_page.dart';
|
import 'package:krezus/pages/stats/stats_page.dart';
|
||||||
import 'package:tunas/pages/transactions/transactions_page.dart';
|
import 'package:krezus/pages/transactions/transactions_page.dart';
|
||||||
import 'package:tunas/repositories/metadata/metadata_repository.dart';
|
import 'package:krezus/repositories/metadata/metadata_repository.dart';
|
||||||
import 'package:tunas/repositories/transactions/transactions_repository.dart';
|
import 'package:krezus/repositories/transactions/transactions_repository.dart';
|
||||||
|
|
||||||
class HomePage extends StatelessWidget {
|
class HomePage extends StatelessWidget {
|
||||||
const HomePage({super.key});
|
const HomePage({super.key});
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/chart_bloc.dart';
|
import 'package:krezus/domains/charts/chart_bloc.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/account_counters.dart';
|
import 'package:krezus/pages/stats/widgets/account_counters.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/categories_totals_chart.dart';
|
import 'package:krezus/pages/stats/widgets/categories_totals_chart.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/global_counter.dart';
|
import 'package:krezus/pages/stats/widgets/global_counter.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/monthly_categories_total_chart.dart';
|
import 'package:krezus/pages/stats/widgets/monthly_categories_total_chart.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/global_total_chart.dart';
|
import 'package:krezus/pages/stats/widgets/global_total_chart.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/profit_indicator.dart';
|
import 'package:krezus/pages/stats/widgets/profit_indicator.dart';
|
||||||
import 'package:tunas/pages/stats/widgets/year_selector.dart';
|
import 'package:krezus/pages/stats/widgets/year_selector.dart';
|
||||||
|
|
||||||
class StatsPage extends StatelessWidget {
|
class StatsPage extends StatelessWidget {
|
||||||
const StatsPage({super.key});
|
const StatsPage({super.key});
|
||||||
@@ -80,6 +80,8 @@ class StatsPage extends StatelessWidget {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 450,
|
height: 450,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
CategoriesTotalsChart(categoriesTotals: state.scopedCategoriesPositiveTotals, categoriesTotalsPercents: state.scopedSimplifiedCategoriesPositiveTotalsPercents),
|
CategoriesTotalsChart(categoriesTotals: state.scopedCategoriesPositiveTotals, categoriesTotalsPercents: state.scopedSimplifiedCategoriesPositiveTotalsPercents),
|
||||||
CategoriesTotalsChart(categoriesTotals: state.scopedCategoriesNegativeTotals, categoriesTotalsPercents: state.scopedSimplifiedCategoriesNegativeTotalsPercents),
|
CategoriesTotalsChart(categoriesTotals: state.scopedCategoriesNegativeTotals, categoriesTotalsPercents: state.scopedSimplifiedCategoriesNegativeTotalsPercents),
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import 'package:fl_chart/fl_chart.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/models/chart_item.dart';
|
import 'package:krezus/domains/charts/models/chart_item.dart';
|
||||||
|
|
||||||
class CategoriesTotalsChart extends StatelessWidget {
|
class CategoriesTotalsChart extends StatelessWidget {
|
||||||
final List<ChartItem> categoriesTotals;
|
final List<ChartItem> categoriesTotals;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class GlobalTotalChart extends StatelessWidget {
|
|||||||
lineTouchData: LineTouchData(
|
lineTouchData: LineTouchData(
|
||||||
touchTooltipData: LineTouchTooltipData(
|
touchTooltipData: LineTouchTooltipData(
|
||||||
maxContentWidth: 100,
|
maxContentWidth: 100,
|
||||||
tooltipBgColor: Theme.of(context).colorScheme.primaryContainer,
|
getTooltipColor: (LineBarSpot _) => Theme.of(context).colorScheme.primaryContainer,
|
||||||
getTooltipItems: (touchedSpots) {
|
getTooltipItems: (touchedSpots) {
|
||||||
return touchedSpots.map((LineBarSpot touchedSpot) {
|
return touchedSpots.map((LineBarSpot touchedSpot) {
|
||||||
final textStyle = TextStyle(
|
final textStyle = TextStyle(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import 'package:fl_chart/fl_chart.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/models/month_totals.dart';
|
import 'package:krezus/domains/charts/models/month_totals.dart';
|
||||||
|
|
||||||
class MonthlyCategoriesTotalChart extends StatelessWidget {
|
class MonthlyCategoriesTotalChart extends StatelessWidget {
|
||||||
final Map<int, MonthTotals> categoriesMonthlyTotals;
|
final Map<int, MonthTotals> categoriesMonthlyTotals;
|
||||||
@@ -94,7 +94,8 @@ class MonthlyCategoriesTotalChart extends StatelessWidget {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
handleBuiltInTouches: false,
|
handleBuiltInTouches: false,
|
||||||
touchTooltipData: BarTouchTooltipData(
|
touchTooltipData: BarTouchTooltipData(
|
||||||
tooltipBgColor: Colors.transparent,
|
// tooltipBgColor: Colors.transparent,
|
||||||
|
getTooltipColor: (BarChartGroupData _) => Colors.transparent,
|
||||||
tooltipMargin: 0,
|
tooltipMargin: 0,
|
||||||
getTooltipItem:(group, groupIndex, rod, rodIndex) {
|
getTooltipItem:(group, groupIndex, rod, rodIndex) {
|
||||||
String value = NumberFormat("#00").format(rod.toY);
|
String value = NumberFormat("#00").format(rod.toY);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/charts/chart_bloc.dart';
|
import 'package:krezus/domains/charts/chart_bloc.dart';
|
||||||
|
|
||||||
class YearSelector extends StatelessWidget {
|
class YearSelector extends StatelessWidget {
|
||||||
const YearSelector({super.key});
|
const YearSelector({super.key});
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transactions_actions.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transactions_header.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transactions_list.dart';
|
import 'package:krezus/pages/transactions/widgets/transactions_actions.dart';
|
||||||
|
import 'package:krezus/pages/transactions/widgets/transactions_header.dart';
|
||||||
|
import 'package:krezus/pages/transactions/widgets/transactions_list.dart';
|
||||||
|
|
||||||
class TransactionsPage extends StatelessWidget {
|
class TransactionsPage extends StatelessWidget {
|
||||||
const TransactionsPage({super.key});
|
const TransactionsPage({super.key});
|
||||||
@@ -9,20 +11,34 @@ class TransactionsPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
MediaQueryData mediaQuery = MediaQuery.of(context);
|
MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||||
return Center(
|
return BlocListener<TransactionBloc, TransactionState>(
|
||||||
child: Container(
|
listenWhen: (previous, current) => previous.showSnackBar != current.showSnackBar,
|
||||||
constraints: const BoxConstraints(
|
listener: (context, state) {
|
||||||
maxWidth: 1000
|
if (state.showSnackBar) {
|
||||||
|
ScaffoldMessenger
|
||||||
|
.of(context)
|
||||||
|
.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
backgroundColor: state.snackBarIsError ? Colors.red : Colors.green,
|
||||||
|
content: Text(state.snackBarMessage),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
context.read<TransactionBloc>().add(const TransactionResetSnackBar());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 1000),
|
||||||
|
padding: mediaQuery.padding,
|
||||||
|
child: const Column(
|
||||||
|
children: [
|
||||||
|
TransactionsActions(),
|
||||||
|
TransactionsHeader(),
|
||||||
|
TransactionsList(),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
padding: mediaQuery.padding,
|
),
|
||||||
child: const Column(
|
|
||||||
children: [
|
|
||||||
TransactionsActions(),
|
|
||||||
TransactionsHeader(),
|
|
||||||
TransactionsList(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
lib/pages/transactions/widgets/account_filter.dart
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
|
|
||||||
|
class AccountFilter extends StatelessWidget {
|
||||||
|
const AccountFilter({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final accountState = context.watch<AccountBloc>().state;
|
||||||
|
|
||||||
|
return BlocBuilder<TransactionBloc, TransactionState>(
|
||||||
|
buildWhen: (previous, current) => previous.accountFilter != current.accountFilter,
|
||||||
|
builder: (context, state) => SizedBox(
|
||||||
|
width: 300,
|
||||||
|
child: DropdownButtonFormField<Account>(
|
||||||
|
value: state.accountFilter,
|
||||||
|
onChanged: (value) => context.read<TransactionBloc>().add(TransactionFilterAccount(value!)),
|
||||||
|
items: accountState.accounts.map((e) => DropdownMenuItem(value: e, child: Text(e.label))).toList(),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: const Icon(Icons.filter_alt_off),
|
||||||
|
onPressed: () => context.read<TransactionBloc>().add(const TransactionFilterAccount(null)),
|
||||||
|
),
|
||||||
|
hintText: 'Account',
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart' as tunas_category;
|
import 'package:krezus/repositories/metadata/models/category.dart' as krezus_category;
|
||||||
|
|
||||||
class CategoryFilter extends StatelessWidget {
|
class CategoryFilter extends StatelessWidget {
|
||||||
const CategoryFilter({super.key});
|
const CategoryFilter({super.key});
|
||||||
@@ -10,11 +10,12 @@ class CategoryFilter extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final categoryState = context.watch<CategoryBloc>().state;
|
final categoryState = context.watch<CategoryBloc>().state;
|
||||||
|
|
||||||
return BlocBuilder<TransactionBloc, TransactionState>(
|
return BlocBuilder<TransactionBloc, TransactionState>(
|
||||||
buildWhen: (previous, current) => previous.categoryFilter != current.categoryFilter,
|
buildWhen: (previous, current) => previous.categoryFilter != current.categoryFilter,
|
||||||
builder: (context, state) => SizedBox(
|
builder: (context, state) => SizedBox(
|
||||||
width: 500,
|
width: 300,
|
||||||
child: DropdownButtonFormField<tunas_category.Category>(
|
child: DropdownButtonFormField<krezus_category.Category>(
|
||||||
value: state.categoryFilter,
|
value: state.categoryFilter,
|
||||||
onChanged: (value) => context.read<TransactionBloc>().add(TransactionFilterCategory(value!)),
|
onChanged: (value) => context.read<TransactionBloc>().add(TransactionFilterCategory(value!)),
|
||||||
items: categoryState.categories.map((e) => DropdownMenuItem(value: e, child: Text(e.label))).toList(),
|
items: categoryState.categories.map((e) => DropdownMenuItem(value: e, child: Text(e.label))).toList(),
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transaction_form.dart';
|
import 'package:krezus/pages/transactions/widgets/transaction_form.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
|
|
||||||
class TransactionAddDialog extends StatelessWidget {
|
class TransactionAddDialog extends StatelessWidget {
|
||||||
const TransactionAddDialog({super.key});
|
const TransactionAddDialog({super.key});
|
||||||
@@ -21,8 +21,8 @@ class TransactionAddDialog extends StatelessWidget {
|
|||||||
BlocProvider.value(value: BlocProvider.of<CategoryBloc>(context)),
|
BlocProvider.value(value: BlocProvider.of<CategoryBloc>(context)),
|
||||||
BlocProvider.value(value: BlocProvider.of<AccountBloc>(context)),
|
BlocProvider.value(value: BlocProvider.of<AccountBloc>(context)),
|
||||||
],
|
],
|
||||||
child: const TransactionAddDialog()
|
child: const TransactionAddDialog(),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,18 +32,18 @@ class TransactionAddDialog extends StatelessWidget {
|
|||||||
final actions = [
|
final actions = [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => TransactionAddDialog.hide(context),
|
onPressed: () => TransactionAddDialog.hide(context),
|
||||||
icon: const Icon(Icons.close)
|
icon: const Icon(Icons.close),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => context.read<TransactionBloc>().add(const TransactionAdd()),
|
onPressed: () => context.read<TransactionBloc>().add(const TransactionAdd()),
|
||||||
icon: const Icon(Icons.save)
|
icon: const Icon(Icons.save),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (currentTransaction != null) {
|
if (currentTransaction != null) {
|
||||||
actions.add(IconButton(
|
actions.add(IconButton(
|
||||||
onPressed: () => context.read<TransactionBloc>().add(const TransactionDeleteCurrent()),
|
onPressed: () => context.read<TransactionBloc>().add(const TransactionDeleteCurrent()),
|
||||||
icon: const Icon(Icons.delete)
|
icon: const Icon(Icons.delete),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ class TransactionAddDialog extends StatelessWidget {
|
|||||||
builder: (context, state) => AlertDialog(
|
builder: (context, state) => AlertDialog(
|
||||||
title: Text(state.currentTransaction == null ? 'Add Transaction' : 'Edit Transaction'),
|
title: Text(state.currentTransaction == null ? 'Add Transaction' : 'Edit Transaction'),
|
||||||
actions: _computeActions(context, state.currentTransaction),
|
actions: _computeActions(context, state.currentTransaction),
|
||||||
content: const TransactionForm()
|
content: const TransactionForm(),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/domains/account/account_bloc.dart';
|
import 'package:krezus/domains/account/account_bloc.dart';
|
||||||
import 'package:tunas/domains/category/category_bloc.dart';
|
import 'package:krezus/domains/category/category_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
|
|
||||||
class TransactionForm extends StatelessWidget {
|
class TransactionForm extends StatelessWidget {
|
||||||
|
|
||||||
@@ -15,13 +15,13 @@ class TransactionForm extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_TransactionDateInput(),
|
_TransactionDateInput(),
|
||||||
const SizedBox(height: 10,),
|
const SizedBox(height: 35,),
|
||||||
_TransactionCategoryInput(),
|
_TransactionCategoryInput(),
|
||||||
const SizedBox(height: 10,),
|
const SizedBox(height: 35,),
|
||||||
_TransactionDescriptionInput(),
|
_TransactionDescriptionInput(),
|
||||||
const SizedBox(height: 10,),
|
const SizedBox(height: 35,),
|
||||||
_TransactionAccountInput(),
|
_TransactionAccountInput(),
|
||||||
const SizedBox(height: 10,),
|
const SizedBox(height: 35,),
|
||||||
_TransactionValueInput()
|
_TransactionValueInput()
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -37,8 +37,11 @@ class _TransactionDateInput extends StatelessWidget {
|
|||||||
builder: (context, state) => SizedBox(
|
builder: (context, state) => SizedBox(
|
||||||
width: 500,
|
width: 500,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
initialValue: DateFormat('dd-MM-yyyy', 'fr_FR').format(state.transactionDate.value ?? DateTime.now()),
|
|
||||||
keyboardType: TextInputType.datetime,
|
keyboardType: TextInputType.datetime,
|
||||||
|
readOnly: true,
|
||||||
|
controller: TextEditingController(
|
||||||
|
text: DateFormat('dd-MM-yyyy', 'fr_FR').format(state.transactionDate.value ?? DateTime.now()),
|
||||||
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusScope.of(context).requestFocus(FocusNode());
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
showDatePicker(
|
showDatePicker(
|
||||||
@@ -53,7 +56,7 @@ class _TransactionDateInput extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.calendar_month),
|
icon: const Icon(Icons.calendar_month),
|
||||||
hintText: 'Date',
|
label: const Text('Date'),
|
||||||
errorText: state.transactionDate.isNotValid ? state.transactionDate.error?.message : null,
|
errorText: state.transactionDate.isNotValid ? state.transactionDate.error?.message : null,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -79,7 +82,7 @@ class _TransactionCategoryInput extends StatelessWidget {
|
|||||||
items: categoryState.categories.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
items: categoryState.categories.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.category),
|
icon: const Icon(Icons.category),
|
||||||
hintText: 'Category',
|
label: const Text('Category'),
|
||||||
errorText: state.transactionCategory.isNotValid ? state.transactionCategory.error?.message : null,
|
errorText: state.transactionCategory.isNotValid ? state.transactionCategory.error?.message : null,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -101,7 +104,7 @@ class _TransactionDescriptionInput extends StatelessWidget {
|
|||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.description),
|
icon: const Icon(Icons.description),
|
||||||
hintText: 'Description',
|
label: const Text('Description'),
|
||||||
errorText: state.transactionDescription.isNotValid ? state.transactionDescription.error?.message : null,
|
errorText: state.transactionDescription.isNotValid ? state.transactionDescription.error?.message : null,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -129,7 +132,7 @@ class _TransactionAccountInput extends StatelessWidget {
|
|||||||
items: accountState.accounts.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
items: accountState.accounts.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.account_box),
|
icon: const Icon(Icons.account_box),
|
||||||
hintText: 'Account',
|
label: const Text('Account'),
|
||||||
errorText: state.transactionAccount.isNotValid ? state.transactionAccount.error?.message : null,
|
errorText: state.transactionAccount.isNotValid ? state.transactionAccount.error?.message : null,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -152,7 +155,7 @@ class _TransactionValueInput extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.euro),
|
icon: const Icon(Icons.euro),
|
||||||
hintText: '\$\$\$',
|
label: const Text('\$\$\$'),
|
||||||
errorText: state.transactionValue.isNotValid ? state.transactionValue.error?.message : null,
|
errorText: state.transactionValue.isNotValid ? state.transactionValue.error?.message : null,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transaction_add_dialog.dart';
|
import 'package:krezus/pages/transactions/widgets/transaction_add_dialog.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
|
|
||||||
class TransactionLine extends StatelessWidget {
|
class TransactionLine extends StatelessWidget {
|
||||||
final Transaction transaction;
|
final Transaction transaction;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/category_filter.dart';
|
import 'package:krezus/pages/transactions/widgets/account_filter.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transaction_add_dialog.dart';
|
import 'package:krezus/pages/transactions/widgets/category_filter.dart';
|
||||||
|
import 'package:krezus/pages/transactions/widgets/transaction_add_dialog.dart';
|
||||||
|
|
||||||
class TransactionsActions extends StatelessWidget {
|
class TransactionsActions extends StatelessWidget {
|
||||||
const TransactionsActions({super.key});
|
const TransactionsActions({super.key});
|
||||||
@@ -31,6 +32,7 @@ class TransactionsActions extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const CategoryFilter(),
|
const CategoryFilter(),
|
||||||
|
const AccountFilter(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -47,6 +49,7 @@ class TransactionsActions extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const CategoryFilter(),
|
const CategoryFilter(),
|
||||||
|
const AccountFilter(),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => TransactionAddDialog.show(context, null),
|
onPressed: () => TransactionAddDialog.show(context, null),
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:tunas/domains/transaction/transaction_bloc.dart';
|
import 'package:krezus/domains/transaction/transaction_bloc.dart';
|
||||||
import 'package:tunas/pages/transactions/widgets/transaction_line.dart';
|
import 'package:krezus/pages/transactions/widgets/transaction_line.dart';
|
||||||
|
|
||||||
class TransactionsList extends StatelessWidget {
|
class TransactionsList extends StatelessWidget {
|
||||||
const TransactionsList({super.key});
|
const TransactionsList({super.key});
|
||||||
@@ -15,10 +15,10 @@ class TransactionsList extends StatelessWidget {
|
|||||||
itemCount: state.transactionsLinesFiltered.length,
|
itemCount: state.transactionsLinesFiltered.length,
|
||||||
itemBuilder: (context, index) => TransactionLine(
|
itemBuilder: (context, index) => TransactionLine(
|
||||||
transaction: state.transactionsLinesFiltered[index].transaction,
|
transaction: state.transactionsLinesFiltered[index].transaction,
|
||||||
subTotal: state.transactionsLinesFiltered[index].subTotal
|
subTotal: state.transactionsLinesFiltered[index].subTotal,
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:tunas/clients/storage/json_storage_client.dart';
|
import 'package:krezus/clients/storage/json_storage_client.dart';
|
||||||
import 'package:tunas/repositories/json/models/json.dart';
|
import 'package:krezus/repositories/json/models/json.dart';
|
||||||
|
|
||||||
class JsonRepository {
|
class JsonRepository {
|
||||||
String accountFile = 'tunas_main_account.json';
|
String accountFile = 'krezus_main_account.json';
|
||||||
|
|
||||||
final JsonStorageClient _storageClient;
|
final JsonStorageClient _storageClient;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'package:rxdart/subjects.dart';
|
import 'package:rxdart/subjects.dart';
|
||||||
import 'package:tunas/repositories/json/json_repository.dart';
|
import 'package:krezus/repositories/json/json_repository.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/account.dart';
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/metadata.dart';
|
import 'package:krezus/repositories/metadata/models/metadata.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/settings.dart';
|
import 'package:krezus/repositories/metadata/models/settings.dart';
|
||||||
|
|
||||||
class MetadataRepository {
|
class MetadataRepository {
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ class Account {
|
|||||||
String label;
|
String label;
|
||||||
String color;
|
String color;
|
||||||
bool saving;
|
bool saving;
|
||||||
|
double interest;
|
||||||
|
|
||||||
Account({
|
Account({
|
||||||
this.label = '',
|
this.label = '',
|
||||||
this.color = '',
|
this.color = '',
|
||||||
this.saving = false,
|
this.saving = false,
|
||||||
|
this.interest = 0.0,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Account.fromJson(Map<String, dynamic> json) {
|
factory Account.fromJson(Map<String, dynamic> json) {
|
||||||
@@ -16,6 +18,7 @@ class Account {
|
|||||||
label: json['label'],
|
label: json['label'],
|
||||||
color: json['color'],
|
color: json['color'],
|
||||||
saving: bool.parse(json['saving']),
|
saving: bool.parse(json['saving']),
|
||||||
|
interest: double.parse(json['intereset']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +26,7 @@ class Account {
|
|||||||
'label': label,
|
'label': label,
|
||||||
'color': color,
|
'color': color,
|
||||||
'saving': saving.toString(),
|
'saving': saving.toString(),
|
||||||
|
'intereset': interest.toString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
Color rgbToColor() {
|
Color rgbToColor() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:tunas/repositories/metadata/models/budget.dart';
|
import 'package:krezus/repositories/metadata/models/budget.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/category.dart';
|
import 'package:krezus/repositories/metadata/models/category.dart';
|
||||||
import 'package:tunas/repositories/json/models/json.dart';
|
import 'package:krezus/repositories/json/models/json.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/account.dart';
|
import 'package:krezus/repositories/metadata/models/account.dart';
|
||||||
import 'package:tunas/repositories/metadata/models/settings.dart';
|
import 'package:krezus/repositories/metadata/models/settings.dart';
|
||||||
|
|
||||||
class Metadata implements Json {
|
class Metadata implements Json {
|
||||||
List<Budget> budgets;
|
List<Budget> budgets;
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
class Transaction {
|
class Transaction extends Equatable {
|
||||||
String uuid;
|
final String uuid;
|
||||||
DateTime date;
|
final DateTime date;
|
||||||
String category;
|
final String category;
|
||||||
String description;
|
final String description;
|
||||||
String account;
|
final String account;
|
||||||
double value;
|
final double value;
|
||||||
|
|
||||||
Transaction({
|
const Transaction({
|
||||||
required this.uuid,
|
required this.uuid,
|
||||||
required this.date,
|
required this.date,
|
||||||
required this.category,
|
required this.category,
|
||||||
@@ -36,4 +37,7 @@ class Transaction {
|
|||||||
'account': account,
|
'account': account,
|
||||||
'value': value.toString(),
|
'value': value.toString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [uuid, date, category, description, account, value];
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:tunas/repositories/json/models/json.dart';
|
import 'package:krezus/repositories/json/models/json.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
|
|
||||||
class Transactions implements Json {
|
class Transactions implements Json {
|
||||||
List<Transaction> transactions;
|
List<Transaction> transactions;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:rxdart/subjects.dart';
|
import 'package:rxdart/subjects.dart';
|
||||||
import 'package:tunas/repositories/json/json_repository.dart';
|
import 'package:krezus/repositories/json/json_repository.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transaction.dart';
|
import 'package:krezus/repositories/transactions/models/transaction.dart';
|
||||||
import 'package:tunas/repositories/transactions/models/transactions.dart';
|
import 'package:krezus/repositories/transactions/models/transactions.dart';
|
||||||
|
|
||||||
class TransactionsRepository {
|
class TransactionsRepository {
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ project(runner LANGUAGES CXX)
|
|||||||
|
|
||||||
# The name of the executable created for the application. Change this to change
|
# The name of the executable created for the application. Change this to change
|
||||||
# the on-disk name of your application.
|
# the on-disk name of your application.
|
||||||
set(BINARY_NAME "tunas")
|
set(BINARY_NAME "krezus")
|
||||||
# The unique GTK application identifier for this application. See:
|
# The unique GTK application identifier for this application. See:
|
||||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||||
set(APPLICATION_ID "com.example.tunas")
|
set(APPLICATION_ID "sx.glt.krezus")
|
||||||
|
|
||||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||||
# versions of CMake.
|
# versions of CMake.
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
|
|||||||
if (use_header_bar) {
|
if (use_header_bar) {
|
||||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||||
gtk_header_bar_set_title(header_bar, "tunas");
|
gtk_header_bar_set_title(header_bar, "krezus");
|
||||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||||
} else {
|
} else {
|
||||||
gtk_window_set_title(window, "tunas");
|
gtk_window_set_title(window, "krezus");
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_window_set_default_size(window, 1280, 720);
|
gtk_window_set_default_size(window, 1280, 720);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
33CC10ED2044A3C60003C045 /* tunas.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tunas.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
33CC10ED2044A3C60003C045 /* krezus.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "krezus.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
33CC10EE2044A3C60003C045 /* Products */ = {
|
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
33CC10ED2044A3C60003C045 /* tunas.app */,
|
33CC10ED2044A3C60003C045 /* krezus.app */,
|
||||||
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
@@ -217,7 +217,7 @@
|
|||||||
);
|
);
|
||||||
name = Runner;
|
name = Runner;
|
||||||
productName = Runner;
|
productName = Runner;
|
||||||
productReference = 33CC10ED2044A3C60003C045 /* tunas.app */;
|
productReference = 33CC10ED2044A3C60003C045 /* krezus.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
@@ -384,10 +384,10 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tunas.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/tunas";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/krezus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/krezus";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -398,10 +398,10 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tunas.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/tunas";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/krezus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/krezus";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -412,10 +412,10 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tunas.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/tunas";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/krezus.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/krezus";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "tunas.app"
|
BuildableName = "krezus.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "tunas.app"
|
BuildableName = "krezus.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "tunas.app"
|
BuildableName = "krezus.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "tunas.app"
|
BuildableName = "krezus.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 842 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -5,10 +5,10 @@
|
|||||||
// 'flutter create' template.
|
// 'flutter create' template.
|
||||||
|
|
||||||
// The application's name. By default this is also the title of the Flutter window.
|
// The application's name. By default this is also the title of the Flutter window.
|
||||||
PRODUCT_NAME = tunas
|
PRODUCT_NAME = krezus
|
||||||
|
|
||||||
// The application's bundle identifier
|
// The application's bundle identifier
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.tunas
|
PRODUCT_BUNDLE_IDENTIFIER = sx.glt.krezus
|
||||||
|
|
||||||
// The copyright displayed in application information
|
// The copyright displayed in application information
|
||||||
PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
|
PRODUCT_COPYRIGHT = Copyright © 2023 sx.glt. All rights reserved.
|
||||||
|
|||||||
112
pubspec.lock
@@ -5,18 +5,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: archive
|
name: archive
|
||||||
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
|
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.4.10"
|
version: "3.6.1"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: args
|
name: args
|
||||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.5.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -29,10 +29,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: bloc
|
name: bloc
|
||||||
sha256: f53a110e3b48dcd78136c10daa5d51512443cea5e1348c9d80a320095fa2db9e
|
sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.3"
|
version: "8.1.4"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -81,14 +81,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.18.0"
|
||||||
convert:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: convert
|
name: cross_file
|
||||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
version: "0.3.3+8"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -101,26 +101,26 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: csv
|
name: csv
|
||||||
sha256: "63ed2871dd6471193dffc52c0e6c76fb86269c00244d244297abbb355c84a86e"
|
sha256: c6aa2679b2a18cb57652920f674488d89712efaf4d3fdf2e537215b35fc19d6c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.1"
|
version: "6.0.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
|
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.6"
|
version: "1.0.8"
|
||||||
dynamic_color:
|
dynamic_color:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: dynamic_color
|
name: dynamic_color
|
||||||
sha256: a866f1f8947bfdaf674d7928e769eac7230388a2e7a2542824fad4bb5b87be3b
|
sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.9"
|
version: "1.7.0"
|
||||||
equatable:
|
equatable:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -149,10 +149,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: file_picker
|
name: file_picker
|
||||||
sha256: "4e42aacde3b993c5947467ab640882c56947d9d27342a5b6f2895b23956954a6"
|
sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.1"
|
version: "8.0.0+1"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -165,26 +165,26 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: fl_chart
|
name: fl_chart
|
||||||
sha256: "00b74ae680df6b1135bdbea00a7d1fc072a9180b7c3f3702e4b19a9943f5ed7d"
|
sha256: d0f0d49112f2f4b192481c16d05b6418bd7820e021e265a3c22db98acf7ed7fb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.66.2"
|
version: "0.68.0"
|
||||||
flex_color_picker:
|
flex_color_picker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flex_color_picker
|
name: flex_color_picker
|
||||||
sha256: "0871edc170153cfc3de316d30625f40a85daecfa76ce541641f3cc0ec7757cbf"
|
sha256: "5c846437069fb7afdd7ade6bf37e628a71d2ab0787095ddcb1253bf9345d5f3a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.1"
|
version: "3.4.1"
|
||||||
flex_seed_scheme:
|
flex_seed_scheme:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flex_seed_scheme
|
name: flex_seed_scheme
|
||||||
sha256: "29c12aba221eb8a368a119685371381f8035011d18de5ba277ad11d7dfb8657f"
|
sha256: "4cee2f1d07259f77e8b36f4ec5f35499d19e74e17c7dce5b819554914082bc01"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.5.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -194,10 +194,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_bloc
|
name: flutter_bloc
|
||||||
sha256: "87325da1ac757fcc4813e6b34ed5dd61169973871fdf181d6c2109dd6935ece1"
|
sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.4"
|
version: "8.1.6"
|
||||||
flutter_keyboard_visibility:
|
flutter_keyboard_visibility:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -258,10 +258,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
|
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "4.0.0"
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -271,10 +271,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_plugin_android_lifecycle
|
name: flutter_plugin_android_lifecycle
|
||||||
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
|
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.17"
|
version: "2.0.19"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -305,10 +305,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: image
|
name: image
|
||||||
sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e"
|
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.7"
|
version: "4.2.0"
|
||||||
intl:
|
intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -317,30 +317,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.18.1"
|
version: "0.18.1"
|
||||||
js:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: js
|
|
||||||
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.1"
|
|
||||||
json_annotation:
|
json_annotation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: json_annotation
|
name: json_annotation
|
||||||
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
|
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.8.1"
|
version: "4.9.0"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "4.0.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -393,18 +385,18 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: path_provider
|
name: path_provider
|
||||||
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
|
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
path_provider_android:
|
path_provider_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.2.4"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -449,10 +441,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "3.1.5"
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -465,10 +457,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: pointer_interceptor
|
name: pointer_interceptor
|
||||||
sha256: bd18321519718678d5fa98ad3a3359cbc7a31f018554eab80b73d08a7f0c165a
|
sha256: d0a8e660d1204eaec5bd34b34cc92174690e076d2e4f893d9d68c486a13b07c4
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.1"
|
version: "0.10.1+1"
|
||||||
pointer_interceptor_ios:
|
pointer_interceptor_ios:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -493,22 +485,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.1+2"
|
version: "0.10.1+2"
|
||||||
pointycastle:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pointycastle
|
|
||||||
sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.7.4"
|
|
||||||
provider:
|
provider:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: provider
|
name: provider
|
||||||
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
|
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.1"
|
version: "6.1.2"
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -590,10 +574,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: uuid
|
name: uuid
|
||||||
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
|
sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.3.3"
|
version: "4.4.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
21
pubspec.yaml
@@ -1,8 +1,7 @@
|
|||||||
name: tunas
|
name: krezus
|
||||||
description: "A very complicated tool that should have been an excel sheet."
|
description: "A very complicated tool that should have been an excel sheet."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
|
|
||||||
version: 1.0.0+1
|
version: 1.0.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
@@ -13,28 +12,28 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
fl_chart: ^0.66.2
|
fl_chart: ^0.68.0
|
||||||
logging: ^1.2.0
|
logging: ^1.2.0
|
||||||
flutter_bloc: ^8.1.4
|
flutter_bloc: ^8.1.6
|
||||||
path_provider: ^2.1.1
|
path_provider: ^2.1.1
|
||||||
equatable: ^2.0.5
|
equatable: ^2.0.5
|
||||||
rxdart: ^0.27.7
|
rxdart: ^0.27.7
|
||||||
file_picker: ^6.1.1
|
file_picker: ^8.0.0+1
|
||||||
csv: ^5.1.1
|
csv: ^6.0.0
|
||||||
flutter_localizations:
|
|
||||||
sdk: flutter
|
|
||||||
intl: any
|
|
||||||
formz: ^0.7.0
|
formz: ^0.7.0
|
||||||
uuid: ^4.3.2
|
uuid: ^4.3.2
|
||||||
flutter_typeahead: ^5.2.0
|
flutter_typeahead: ^5.2.0
|
||||||
flex_color_picker: ^3.3.1
|
flex_color_picker: ^3.3.1
|
||||||
dynamic_color: ^1.6.9
|
dynamic_color: ^1.6.9
|
||||||
|
flutter_localizations:
|
||||||
|
sdk: flutter
|
||||||
|
intl: any
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
flutter_lints: ^3.0.1
|
flutter_lints: ^4.0.0
|
||||||
flutter_launcher_icons: "^0.13.1"
|
flutter_launcher_icons: "^0.13.1"
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
@@ -53,7 +52,7 @@ flutter:
|
|||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
android: "launcher_icon"
|
android: "launcher_icon"
|
||||||
ios: true
|
ios: true
|
||||||
image_path: "assets/icon/tunas.png"
|
image_path: "assets/icon/krezus2.png"
|
||||||
min_sdk_android: 21
|
min_sdk_android: 21
|
||||||
web:
|
web:
|
||||||
generate: true
|
generate: true
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:tunas/app.dart';
|
import 'package:krezus/app.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||||
|
|||||||