chore: 1.0.0 release (#31)

Reviewed-on: #31
This commit is contained in:
Matyáš Caras 2024-02-10 16:27:32 +01:00
commit 3acf5b2899
69 changed files with 1887 additions and 853 deletions

@ -1 +1 @@
Subproject commit c1df7d07ac60336309bae9dd2d48e7cb8844ec98
Subproject commit b7e7d46a046ba8a22897a514bf2311a0f81ab198

View file

@ -27,6 +27,13 @@ the three dots > 'About' or in app info in your device's setting
### What actually happened
<!-- Here describe what ACTUALLY happened -->
### Relevant logs
```
Paste your logs here
Make sure it is a codebloc
```
### Steps to reproduce
<!--
Enter the exact steps that you made when you encountered the bug,

View file

@ -1,4 +1,24 @@
# 1.0.0
- Change icon
- Placeholder text is now inserted into the field in setup, instead of showing as label
- Show version text in about dialog
- Added tessdata license text into about dialog
- Added sorting by oldest
- Moved search into three-dot menu
- Make search case-insensitive
- Added titles above graphs
- Some extra optimization for iOS
- Fix starting balance not saving
- Fix overlay disabling tappig on edit/delete buttons on home view
- Allow changing dates on entries
- Graph view now uses tabs
- Graphs now display correct tooltips when displaying only income or only expenses
- Change graph container style when using light mode
- Make pie chart values more visible by adding the category's corresponding color as background
- Welcome text on Setup view is now centered
- Editing entries is now done by tapping the entry, instead of a dedicated button
# 1.0.0-alpha+5
- Add tests
- Add searching through entries to homepage

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -1,3 +1,15 @@
buildscript {
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View file

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

View file

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

44
ios/Podfile Normal file
View file

@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

77
ios/Podfile.lock Normal file
View file

@ -0,0 +1,77 @@
PODS:
- Flutter (1.0.0)
- flutter_file_dialog (0.0.1):
- Flutter
- flutter_keyboard_visibility (0.0.1):
- Flutter
- flutter_tesseract_ocr (0.3.4):
- Flutter
- SwiftyTesseract
- fluttertoast (0.0.2):
- Flutter
- Toast
- integration_test (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SwiftyTesseract (3.1.3)
- Toast (4.1.0)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_file_dialog (from `.symlinks/plugins/flutter_file_dialog/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- flutter_tesseract_ocr (from `.symlinks/plugins/flutter_tesseract_ocr/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- SwiftyTesseract
- Toast
EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_file_dialog:
:path: ".symlinks/plugins/flutter_file_dialog/ios"
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_tesseract_ocr:
:path: ".symlinks/plugins/flutter_tesseract_ocr/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_file_dialog: 4c014a45b105709a27391e266c277d7e588e9299
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_tesseract_ocr: c01971df9e5817a08563298b8ce571fa10e164f1
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
integration_test: 13825b8a9334a850581300559b8839134b124670
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
SwiftyTesseract: 1f3d96668ae92dc2208d9842c8a59bea9fad2cbb
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
COCOAPODS: 1.13.0

View file

@ -8,12 +8,14 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
27C13A219C72D10CF1B85F6B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 994C9DA5FEE9CD99D93E4648 /* Pods_Runner.framework */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
4A5BC0C55FF0637EADEA4623 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E794546B4010524D367E1DF /* Pods_RunnerTests.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -40,11 +42,18 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0E9CD450BDF6FBBDD2648144 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
13828E8DFD40CA39D8C8CB47 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
17ABB7090CB6BE30852FCD6C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5E794546B4010524D367E1DF /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
77C260DE7FCBF4A81053C399 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
@ -53,21 +62,48 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
994C9DA5FEE9CD99D93E4648 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B68E4862A35101CA30515D78 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
E5D806F9D018078A8C462DC6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
718F82C14172C3E11888290F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4A5BC0C55FF0637EADEA4623 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
27C13A219C72D10CF1B85F6B /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
4BAAA9A11BE10483369792BF /* Frameworks */ = {
isa = PBXGroup;
children = (
994C9DA5FEE9CD99D93E4648 /* Pods_Runner.framework */,
5E794546B4010524D367E1DF /* Pods_RunnerTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@ -79,14 +115,6 @@
name = Flutter;
sourceTree = "<group>";
};
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
@ -94,6 +122,8 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
B47522B456F585175CCE9181 /* Pods */,
4BAAA9A11BE10483369792BF /* Frameworks */,
);
sourceTree = "<group>";
};
@ -121,6 +151,19 @@
path = Runner;
sourceTree = "<group>";
};
B47522B456F585175CCE9181 /* Pods */ = {
isa = PBXGroup;
children = (
17ABB7090CB6BE30852FCD6C /* Pods-Runner.debug.xcconfig */,
77C260DE7FCBF4A81053C399 /* Pods-Runner.release.xcconfig */,
E5D806F9D018078A8C462DC6 /* Pods-Runner.profile.xcconfig */,
0E9CD450BDF6FBBDD2648144 /* Pods-RunnerTests.debug.xcconfig */,
B68E4862A35101CA30515D78 /* Pods-RunnerTests.release.xcconfig */,
13828E8DFD40CA39D8C8CB47 /* Pods-RunnerTests.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -128,9 +171,10 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
C2D4A53BE26B74B847987117 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807E294A63A400263BE5 /* Frameworks */,
331C807F294A63A400263BE5 /* Resources */,
718F82C14172C3E11888290F /* Frameworks */,
);
buildRules = (
);
@ -146,12 +190,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
FE41F3D3363ED41B1220D8E1 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
E32B5E26E58AE86205FDFCFA /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -169,7 +215,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
@ -254,6 +300,67 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
C2D4A53BE26B74B847987117 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E32B5E26E58AE86205FDFCFA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
FE41F3D3363ED41B1220D8E1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -345,7 +452,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -358,15 +465,19 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ARCHS = x86_64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Prasule;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = cafe.caras.prasule;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -377,7 +488,7 @@
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
baseConfigurationReference = 0E9CD450BDF6FBBDD2648144 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -395,7 +506,7 @@
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
baseConfigurationReference = B68E4862A35101CA30515D78 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -411,7 +522,7 @@
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
baseConfigurationReference = 13828E8DFD40CA39D8C8CB47 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@ -472,7 +583,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -521,7 +632,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -536,11 +647,14 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ARCHS = x86_64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Prasule;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -558,15 +672,19 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ARCHS = x86_64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Prasule;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = cafe.caras.prasule;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View file

@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
@ -24,6 +26,12 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Used for data import from pictures</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used for data import from pictures</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -41,13 +49,16 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used for data import from pictures</string>
<key>NSCameraUsageDescription</key>
<string>Used for data import from pictures</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string></string>
<key>UTTypeIconFiles</key>
<array/>
<key>UTTypeTagSpecification</key>
<dict/>
</dict>
</array>
</dict>
</plist>

View file

@ -14,7 +14,7 @@ class WalletCategory {
required this.color,
});
/// Connects generated fromJson method
/// Connects the generated fromJson method
factory WalletCategory.fromJson(Map<String, dynamic> json) =>
_$WalletCategoryFromJson(json);
@ -32,7 +32,7 @@ class WalletCategory {
@JsonKey(fromJson: _colorFromJson, toJson: _colorToJson)
Color color;
/// Connects generated toJson method
/// Connects the generated toJson method
Map<String, dynamic> toJson() => _$WalletCategoryToJson(this);
@override

View file

@ -7,7 +7,7 @@ class EntryData {
/// Contains raw data
EntryData({required this.name, required this.amount, this.description = ""});
/// Connects generated fromJson method
/// Connects the generated fromJson method
factory EntryData.fromJson(Map<String, dynamic> json) =>
_$EntryDataFromJson(json);
@ -20,6 +20,6 @@ class EntryData {
/// Amount for entry
double amount;
/// Connects generated toJson method
/// Connects the generated toJson method
Map<String, dynamic> toJson() => _$EntryDataToJson(this);
}

View file

@ -20,11 +20,11 @@ class RecurringWalletEntry extends WalletSingleEntry {
this.repeatAfter = 1,
});
/// Connects generated fromJson method
/// Connects the generated fromJson method
factory RecurringWalletEntry.fromJson(Map<String, dynamic> json) =>
_$RecurringWalletEntryFromJson(json);
/// Connects generated toJson method
/// Connects the generated toJson method
@override
Map<String, dynamic> toJson() => _$RecurringWalletEntryToJson(this);

View file

@ -30,7 +30,7 @@ class Wallet {
this.starterBalance = 0,
});
/// Connects generated fromJson method
/// Connects the generated fromJson method
factory Wallet.fromJson(Map<String, dynamic> json) => _$WalletFromJson(json);
/// A list of all [RecurringWalletEntry]s
@ -54,7 +54,7 @@ class Wallet {
@JsonKey(fromJson: _currencyFromJson)
final Currency currency;
/// Connects generated toJson method
/// Connects the generated toJson method
Map<String, dynamic> toJson() => _$WalletToJson(this);
/// Getter for the next unused unique number ID in the wallet's **entry** list
@ -163,7 +163,7 @@ class Wallet {
/// Returns the current balance
///
/// Basically just takes *starterBalance* and adds all the entries to it
double calculateCurrentBalance() {
double get currentBalance {
var toAdd = 0.0;
for (final e in entries) {
toAdd += (e.type == EntryType.income) ? e.data.amount : -e.data.amount;

View file

@ -17,7 +17,7 @@ class WalletSingleEntry {
required this.id,
});
/// Connects generated fromJson method
/// Connects the generated fromJson method
factory WalletSingleEntry.fromJson(Map<String, dynamic> json) =>
_$WalletSingleEntryFromJson(json);
@ -36,6 +36,6 @@ class WalletSingleEntry {
/// Unique entry ID
int id;
/// Connects generated toJson method
/// Connects the generated toJson method
Map<String, dynamic> toJson() => _$WalletSingleEntryToJson(this);
}

View file

@ -93,7 +93,7 @@ class WalletManager {
if (!await FlutterFileDialog.isPickDirectorySupported()) {
File("${(await getApplicationDocumentsDirectory()).path}/wallets/$n")
.copySync(
"${await getApplicationDocumentsDirectory()}/export_${n.replaceAll(RegExp('[|\\?*<":>+\[\]/\' ]+'), '_')}_${DateFormat("dd_MM_yyyy").format(DateTime.now())}.json",
"${await getApplicationDocumentsDirectory()}/export_${n.replaceAll(RegExp('[|\\?*<":>+[]/\' ]+'), '_')}_${DateFormat("dd_MM_yyyy").format(DateTime.now())}.json",
);
return;
}
@ -105,7 +105,7 @@ class WalletManager {
File("${(await getApplicationDocumentsDirectory()).path}/wallets/$n")
.readAsBytesSync(),
fileName:
"export_${n.replaceAll(RegExp('[|\\?*<":>+\[\]/\' ]+'), '_')}_${DateFormat("dd_MM_yyyy").format(DateTime.now())}.json",
"export_${n.replaceAll(RegExp('[|\\?*<":>+[]/\' ]+'), '_')}_${DateFormat("dd_MM_yyyy").format(DateTime.now())}.json",
mimeType: "application/json",
);
}

View file

@ -7,7 +7,7 @@
"next": "Další",
"back": "Zpět",
"finish": "Dokončit",
"errorEmptyName": "Název nemůže být prázdný!",
"errorEmptyName": "Název peněženky nemůže být prázdný!",
"welcome": "Vítejte!",
"welcomeAboutPrasule": "Prašule je správce výdajů navržený pro lidi, kteří nechtějí vyplňovat každý malý detail.",
"welcomeInstruction": "Na této obrazovce si nastavíte svoji 'peněženku', ve které budou zaznamenány vaše výdaje uspořádané do kategorií, které si nastavíte hned potom.",
@ -53,7 +53,7 @@
"langDownloadDialog": "Stahuji {lang}, vyčkejte prosím...",
"langDownloadProgress": "Postup: {progress} %",
"addingFromOcr": "Přidat skrz OCR",
"license":"©️ 2023 Matyáš Caras\nVydáno pod licencí GNU AGPL license verze 3",
"license":"©️ 2023 Matyáš Caras\nVydáno pod licencí GNU AGPL license verze 3\nObsahuje tessdata_fast OCR data pro angličtinu ©️ tessdata_fast / Tesseract přispěvatelé, použito pod licencí Apache 2.0",
"description":"Popis",
"newWallet":"Přidat novou peněženku",
"walletExists":"Peněženka s tímto názvem již existuje!",
@ -104,5 +104,23 @@
"selectExportWallet":"Zvolte peněženku k exportování",
"exportError":"Při exportování peněženky nastala chyba",
"exportCompleted":"Export dokončen",
"importCompleted":"Import dokončen"
"importCompleted":"Import dokončen",
"setup":"Prvotní nastavení",
"sourceCode":"Zdrojový kód",
"sortNewest":"Nejnovější první",
"sortOldest":"Nejstarší první",
"sort":"Seřadit",
"search":"Prohledat",
"expensesPerYear":"Výdaje za měsíc v roce {year}",
"expensesPerMonth":"Výdaje za den během měsíce {monthYear}",
"date":"Datum",
"incomePlural":"Příjmy",
"incomePerYear":"Příjmy za měsíc v roce {year}",
"incomePerMonth":"Příjmy za den během měsíce {monthYear}",
"expensesPerMonthCategory":"Výdaje podle kategorie během měsíce {monthYear}",
"expensesPerYearCategory":"Výdaje podle kategorie za rok {year}",
"incomePerYearCategory":"Příjmy podle kategorie za rok {year}",
"incomePerMonthCategory":"Příjmy podle kategorie za měsíc {monthYear}",
"selectYear":"Zvolte rok",
"selectMonth":"Zvolte měsíc a rok"
}

View file

@ -7,7 +7,7 @@
"next": "Next",
"back": "Back",
"finish": "Finish",
"errorEmptyName": "Name cannot be empty",
"errorEmptyName": "Wallet name cannot be empty",
"welcome": "Welcome!",
"welcomeAboutPrasule": "Prašule is an expense tracker tool designed for people, who don't want to spend too much time filling in all the little details.",
"welcomeInstruction": "On this screen you will set up your 'wallet', in which you will track your expenses categorized under categories, which you can later set in the settings menu.",
@ -89,7 +89,7 @@
}
},
"addingFromOcr": "Add from OCR",
"license": "©️ 2023 Matyáš Caras\nReleased under the GNU AGPL license version 3",
"license": "©️ 2023 Matyáš Caras\nReleased under the GNU AGPL license version 3\nIncludes the tessdata_fast English trained data, ©️ tessdata_fast / Tesseract contributors, used under the Apache 2.0 license",
"description": "Description",
"newWallet": "Add new wallet",
"walletExists": "A wallet with this name already exists!",
@ -220,5 +220,98 @@
"selectExportWallet":"Select a wallet to export",
"exportError":"An error occured trying to export wallet",
"exportCompleted":"Export completed",
"importCompleted":"Import completed"
"importCompleted":"Import completed",
"setup":"Setup",
"sourceCode":"Source code",
"sortNewest":"Newest first",
"sortOldest":"Oldest first",
"sort":"Sort",
"search":"Search",
"expensesPerYear":"Expenses per month in {year}",
"@expensesPerYear":{
"placeholders": {
"year":{
"description": "The year of the monthly expense sum",
"example": "2024",
"type": "int"
}
}
},
"expensesPerMonth":"Expenses per day during {monthYear}",
"@expensesPerMonth":{
"placeholders": {
"monthYear":{
"description": "Month and year formatted through DateFormat class",
"example": "June, 2024",
"type": "String"
}
}
},
"incomePerYear":"Income per month in {year}",
"@incomePerYear":{
"placeholders": {
"year":{
"description": "The year of the monthly expense sum",
"example": "2024",
"type": "int"
}
}
},
"incomePerMonth":"Income per day during {monthYear}",
"@incomePerMonth":{
"placeholders": {
"monthYear":{
"description": "Month and year formatted through DateFormat class",
"example": "June, 2024",
"type": "String"
}
}
},
"date":"Date",
"incomePlural":"Income",
"@incomePlural":{
"description": "Plural form of 'Income'"
},
"expensesPerMonthCategory":"Expenses per category during {monthYear}",
"@expensesPerMonthCategory":{
"placeholders": {
"monthYear":{
"description": "Month and year formatted through DateFormat class",
"example": "June, 2024",
"type": "String"
}
}
},
"expensesPerYearCategory":"Expenses per category in {year}",
"@expensesPerYearCategory":{
"placeholders": {
"year":{
"description": "The year",
"example": "2024",
"type": "int"
}
}
},
"incomePerMonthCategory":"Income per category during {monthYear}",
"@incomePerMonthCategory":{
"placeholders": {
"monthYear":{
"description": "Month and year formatted through DateFormat class",
"example": "June, 2024",
"type": "String"
}
}
},
"incomePerYearCategory":"Income per category in {year}",
"@incomePerYearCategory":{
"placeholders": {
"year":{
"description": "The year",
"example": "2024",
"type": "int"
}
}
},
"selectYear":"Select a year",
"selectMonth":"Select a month and year"
}

View file

@ -23,6 +23,8 @@ class PlatformField extends PlatformWidget<TextField, CupertinoTextField> {
this.maxLines = 1,
this.focusNode,
this.inputBorder = const OutlineInputBorder(),
this.suffix,
this.prefix,
});
final TextEditingController? controller;
final bool? enabled;
@ -38,6 +40,8 @@ class PlatformField extends PlatformWidget<TextField, CupertinoTextField> {
final int? maxLines;
final InputBorder inputBorder;
final FocusNode? focusNode;
final Widget? suffix;
final Widget? prefix;
@override
TextField createAndroidWidget(BuildContext context) => TextField(
@ -48,6 +52,8 @@ class PlatformField extends PlatformWidget<TextField, CupertinoTextField> {
decoration: InputDecoration(
labelText: labelText,
border: inputBorder,
suffix: suffix,
prefix: prefix,
),
autocorrect: autocorrect,
keyboardType: keyboardType,
@ -74,5 +80,7 @@ class PlatformField extends PlatformWidget<TextField, CupertinoTextField> {
focusNode: focusNode,
maxLines: maxLines,
style: textStyle,
prefix: prefix,
suffix: suffix,
);
}

View file

@ -71,12 +71,14 @@ class ExpensesLineChart extends StatelessWidget {
LineChartData(
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Theme.of(context).colorScheme.secondaryContainer,
getTooltipItems: (spots) => List<LineTooltipItem>.generate(
spots.length,
(index) => LineTooltipItem(
// Changes what's rendered on the tooltip
// when clicked in the chart
(spots[index].barIndex == 0) // income chart
(spots[index].barIndex == 0 &&
incomeData.isNotEmpty) // income chart
? (yearly
? AppLocalizations.of(context).incomeForMonth(
DateFormat.MMMM(locale).format(
@ -121,14 +123,11 @@ class ExpensesLineChart extends StatelessWidget {
)),
TextStyle(color: spots[index].bar.color),
children: [
TextSpan(
text: "\n${yearly ? DateFormat.MMMM(locale).format(
DateTime(
date.year,
index + 1,
),
) : DateFormat.yMMMMd(locale).format(DateTime(date.year, date.month, spots[index].spotIndex + 1))}",
),
if (!yearly)
TextSpan(
text:
"\n${DateFormat.yMMMMd(locale).format(DateTime(date.year, date.month, spots[index].spotIndex + 1))}",
),
],
),
),
@ -136,12 +135,11 @@ class ExpensesLineChart extends StatelessWidget {
),
maxY: maxY,
maxX: yearly
? 12
? 11
: date.lastDay.toDouble() -
1, // remove 1 because we are indexing from 0
minY: 0,
minX: 0,
backgroundColor: Theme.of(context).colorScheme.background,
lineBarsData: [
if (incomeData.isNotEmpty)
LineChartBarData(
@ -185,14 +183,16 @@ class ExpensesLineChart extends StatelessWidget {
topTitles: const AxisTitles(),
leftTitles: AxisTitles(
sideTitles: SideTitles(
reservedSize: (NumberFormat.compact()
.format(expenseDataSorted.last)
.length >=
5 ||
NumberFormat.compact()
.format(incomeDataSorted.last)
.length >=
5)
reservedSize: ((expenseDataSorted.isNotEmpty &&
NumberFormat.compact(locale: locale)
.format(expenseDataSorted.last)
.length >=
5) ||
(incomeDataSorted.isNotEmpty &&
NumberFormat.compact(locale: locale)
.format(incomeDataSorted.last)
.length >=
5))
? 50
: 25,
showTitles: true,
@ -289,7 +289,7 @@ class ExpensesBarChart extends StatelessWidget {
getTooltipItem: (group, groupIndex, rod, rodIndex) =>
yearly // create custom tooltips for graph bars
? BarTooltipItem(
(rodIndex == 1)
(rodIndex == 1 || incomeData.isEmpty) // expense
? AppLocalizations.of(context).expensesForMonth(
DateFormat.MMMM(locale).format(
DateTime(date.year, groupIndex + 1),
@ -301,6 +301,7 @@ class ExpensesBarChart extends StatelessWidget {
).format(rod.toY),
)
: AppLocalizations.of(context).incomeForMonth(
// income
DateFormat.MMMM(locale).format(
DateTime(date.year, groupIndex + 1),
),
@ -391,6 +392,7 @@ class CategoriesPieChart extends StatefulWidget {
required this.entries,
required this.categories,
required this.symbol,
required this.locale,
super.key,
});
@ -403,6 +405,9 @@ class CategoriesPieChart extends StatefulWidget {
/// Currency symbol displayed on the chart
final String symbol;
/// User locale
final String locale;
@override
State<CategoriesPieChart> createState() => _CategoriesPieChartState();
}
@ -439,7 +444,9 @@ class _CategoriesPieChartState extends State<CategoriesPieChart> {
const SizedBox(
height: 5,
),
Expanded(
LimitedBox(
maxHeight: MediaQuery.of(context).size.height * 0.23,
maxWidth: MediaQuery.of(context).size.width * 0.9,
child: PieChart(
PieChartData(
centerSpaceRadius: double.infinity,
@ -462,8 +469,10 @@ class _CategoriesPieChartState extends State<CategoriesPieChart> {
sections: List<PieChartSectionData>.generate(
widget.categories.length,
(index) => PieChartSectionData(
title: NumberFormat.compactCurrency(symbol: widget.symbol)
.format(
title: NumberFormat.compactCurrency(
symbol: widget.symbol,
locale: widget.locale,
).format(
widget.entries
.where(
(element) =>
@ -480,6 +489,7 @@ class _CategoriesPieChartState extends State<CategoriesPieChart> {
color:
widget.categories[index].color.calculateTextColor(),
fontWeight: FontWeight.bold,
backgroundColor: widget.categories[index].color,
),
color: widget.categories[index].color,
value: widget.entries

58
lib/util/sorting.dart Normal file
View file

@ -0,0 +1,58 @@
import 'package:grouped_list/grouped_list.dart';
import 'package:intl/intl.dart';
/// Sorts [GroupedListView]'s group by newest group
int groupSortNewest(String a, String b, String locale) {
// TODO: better sorting algorithm lol
final yearA = RegExp(r'\d+').firstMatch(a);
if (yearA == null) return 0;
final yearB = RegExp(r'\d+').firstMatch(b);
if (yearB == null) return 0;
final compareYears = int.parse(yearB.group(0)!).compareTo(
int.parse(yearA.group(0)!),
);
if (compareYears != 0) {
return compareYears;
}
final months = List<String>.generate(
12,
(index) => DateFormat.MMMM(locale).format(
DateTime(2023, index + 1),
),
);
final monthA = RegExp('[^0-9 ]+').firstMatch(a);
if (monthA == null) return 0;
final monthB = RegExp('[^0-9 ]+').firstMatch(b);
if (monthB == null) return 0;
return months.indexOf(monthB.group(0)!).compareTo(
months.indexOf(monthA.group(0)!),
);
}
/// Sorts [GroupedListView]'s group by oldest group
int groupSortOldest(String a, String b, String locale) {
// TODO: better sorting algorithm lol
final yearA = RegExp(r'\d+').firstMatch(a);
if (yearA == null) return 0;
final yearB = RegExp(r'\d+').firstMatch(b);
if (yearB == null) return 0;
final compareYears = int.parse(yearA.group(0)!).compareTo(
int.parse(yearB.group(0)!),
);
if (compareYears != 0) {
return compareYears;
}
final months = List<String>.generate(
12,
(index) => DateFormat.MMMM(locale).format(
DateTime(2023, index + 1),
),
);
final monthA = RegExp('[^0-9 ]+').firstMatch(a);
if (monthA == null) return 0;
final monthB = RegExp('[^0-9 ]+').firstMatch(b);
if (monthB == null) return 0;
return months.indexOf(monthA.group(0)!).compareTo(
months.indexOf(monthB.group(0)!),
);
}

38
lib/util/utils.dart Normal file
View file

@ -0,0 +1,38 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:prasule/pw/platformbutton.dart';
import 'package:url_launcher/url_launcher_string.dart';
/// Shows an [AboutDialog] with all the data filled,
/// so I don't have to copypaste the same function everywhere
void showAbout(BuildContext context) {
showAboutDialog(
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
applicationVersion: "1.0.0",
applicationIcon: const CircleAvatar(
backgroundImage: AssetImage("assets/icon/full_ico.png"),
),
children: [
PlatformButton(
text: "Tessdata",
onPressed: () {
unawaited(
launchUrlString(
"https://github.com/tesseract-ocr/tessdata_fast",
),
);
},
),
PlatformButton(
text: AppLocalizations.of(context).sourceCode,
onPressed: () {
unawaited(launchUrlString("https://git.mnau.xyz/hernik/prasule"));
},
),
],
);
}

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:intl/intl.dart';
import 'package:prasule/api/category.dart';
import 'package:prasule/api/entry_data.dart';
import 'package:prasule/api/wallet.dart';
@ -13,7 +14,11 @@ import 'package:prasule/util/show_message.dart';
/// Used when user wants to add new entry
class CreateSingleEntryView extends StatefulWidget {
/// Used when user wants to add new entry
const CreateSingleEntryView({required this.w, super.key, this.editEntry});
const CreateSingleEntryView({
required this.w,
required this.locale, super.key,
this.editEntry,
});
/// The wallet, where the entry will be saved to
final Wallet w;
@ -23,6 +28,8 @@ class CreateSingleEntryView extends StatefulWidget {
/// Is null unless we are editing an existing entry
final WalletSingleEntry? editEntry;
final String locale;
@override
State createState() => _CreateSingleEntryViewState();
}
@ -184,6 +191,33 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
},
),
),
const SizedBox(
height: 20,
),
Text(AppLocalizations.of(context).date),
PlatformButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
Theme.of(context).colorScheme.primary,
),
foregroundColor: MaterialStateProperty.all(
Theme.of(context).colorScheme.onPrimary,
),
),
text: DateFormat.yMMMMd(widget.locale).format(newEntry.date),
onPressed: () async {
final date = await showDatePicker(
initialDate: newEntry.date,
context: context,
firstDate: DateTime.now()
.subtract(const Duration(days: 20 * 365)),
lastDate: DateTime.now().add(const Duration(days: 365)),
);
if (date == null) return;
newEntry.date = date;
setState(() {});
},
),
const SizedBox(
height: 15,
),

View file

@ -7,13 +7,14 @@ import 'package:prasule/api/category.dart';
import 'package:prasule/api/wallet.dart';
import 'package:prasule/api/wallet_manager.dart';
import 'package:prasule/main.dart';
import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/graphs.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/setup.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:wheel_chooser/wheel_chooser.dart';
/// Shows data from a [Wallet] in graphs
class GraphView extends StatefulWidget {
@ -29,9 +30,7 @@ class _GraphViewState extends State<GraphView> {
Wallet? selectedWallet;
List<Wallet> wallets = [];
String? locale;
Set<String> yearlyBtnSet = {"monthly"};
Set<String> graphTypeSet = {"expense", "income"};
bool get yearly => yearlyBtnSet.contains("yearly");
bool yearly = true;
@override
void didChangeDependencies() {
@ -66,6 +65,8 @@ class _GraphViewState extends State<GraphView> {
return data;
}
final availableYears = <WheelChoice<int>>[];
Future<void> loadWallet() async {
wallets = await WalletManager.listWallets();
if (wallets.isEmpty && mounted) {
@ -76,6 +77,17 @@ class _GraphViewState extends State<GraphView> {
return;
}
selectedWallet = wallets.first;
availableYears.clear();
for (final entry in selectedWallet!.entries) {
if (!availableYears.any((element) => element.value == entry.date.year)) {
availableYears.add(
WheelChoice<int>(
value: entry.date.year,
title: entry.date.year.toString(),
),
);
}
}
setState(() {});
}
@ -92,258 +104,611 @@ class _GraphViewState extends State<GraphView> {
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: Tooltip(
message: AppLocalizations.of(context).changeDate,
child: PlatformButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
Theme.of(context).colorScheme.primary,
),
foregroundColor: MaterialStateProperty.all(
Theme.of(context).colorScheme.onPrimary,
),
),
text: yearly
? DateFormat.y(locale).format(_selectedDate)
: DateFormat.yMMMM(locale).format(_selectedDate),
onPressed: () async {
final firstDate = (selectedWallet!.entries
..sort(
(a, b) => a.date.compareTo(b.date),
))
.first
.date;
final newDate = await showDatePicker(
context: context,
initialDate: DateTime(
_selectedDate.year,
_selectedDate.month,
),
firstDate: firstDate,
lastDate: DateTime.now(),
initialEntryMode: yearly
? DatePickerEntryMode.input
: DatePickerEntryMode.calendar,
initialDatePickerMode:
yearly ? DatePickerMode.year : DatePickerMode.day,
);
if (newDate == null) return;
_selectedDate = newDate;
setState(() {});
},
),
),
appBar: AppBar(
title: DropdownButton<int>(
value:
(selectedWallet == null) ? -1 : wallets.indexOf(selectedWallet!),
items: [
...wallets.map(
(e) => DropdownMenuItem(
value: wallets.indexOf(
e,
),
child: Text(e.name),
),
),
DropdownMenuItem(
value: -1,
child: Text(AppLocalizations.of(context).newWallet),
),
],
onChanged: (v) async {
if (v == null || v == -1) {
await Navigator.of(context).push(
platformRoute(
(c) => const SetupView(
newWallet: true,
return DefaultTabController(
length: 2,
child: Scaffold(
floatingActionButton: Tooltip(
message: AppLocalizations.of(context).changeDate,
child: FloatingActionButton(
child: const Icon(Icons.calendar_month),
onPressed: () async {
var selectedYear = _selectedDate.year;
var selectedMonth = _selectedDate.month;
await showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
title: Text(
yearly
? AppLocalizations.of(context).selectYear
: AppLocalizations.of(context).selectMonth,
),
content: LimitedBox(
maxHeight: MediaQuery.of(context).size.width * 0.7,
maxWidth: MediaQuery.of(context).size.width * 0.8,
child: Wrap(
alignment: WrapAlignment.center,
spacing: 5,
children: [
if (!yearly)
SizedBox(
width: 120,
height: 100,
child: WheelChooser<int>.choices(
onChoiceChanged: (v) {
selectedMonth = v as int;
},
startPosition: _selectedDate.month - 1,
choices: List<WheelChoice<int>>.generate(
12,
(index) => WheelChoice(
value: index + 1,
title: DateFormat.MMMM(locale ?? "en").format(
DateTime(
_selectedDate.year,
index + 1,
),
),
),
),
),
),
SizedBox(
height: 100,
width: 80,
child: WheelChooser<int>.choices(
startPosition: availableYears.indexWhere(
(element) => element.value == _selectedDate.year,
),
onChoiceChanged: (v) {
selectedYear = v as int;
},
choices: availableYears,
),
),
],
),
),
actions: [
TextButton(
onPressed: () {
_selectedDate = DateTime(selectedYear, selectedMonth);
Navigator.of(c).pop();
},
child: Text(AppLocalizations.of(context).ok),
),
],
),
);
wallets = await WalletManager.listWallets();
logger.i(wallets.length);
selectedWallet = wallets.last;
setState(() {});
return;
}
selectedWallet = wallets[v];
setState(() {});
},
),
actions: [
PopupMenuButton(
itemBuilder: (context) => [
AppLocalizations.of(context).settings,
AppLocalizations.of(context).about,
].map((e) => PopupMenuItem(value: e, child: Text(e))).toList(),
onSelected: (value) {
if (value == AppLocalizations.of(context).settings) {
Navigator.of(context)
.push(
platformRoute(
(context) => const SettingsView(),
),
)
.then((value) async {
selectedWallet =
await WalletManager.loadWallet(selectedWallet!.name);
final s = await SharedPreferences.getInstance();
chartType = s.getInt("monthlygraph") ?? 2;
setState(() {});
});
} else if (value == AppLocalizations.of(context).about) {
showAboutDialog(
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
}
},
),
],
),
drawer: makeDrawer(context, 2),
body: SingleChildScrollView(
child: Center(
child: (selectedWallet == null)
? const CircularProgressIndicator(
strokeWidth: 5,
)
: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SegmentedButton<String>(
segments: [
ButtonSegment<String>(
value: "expense",
label: Text(AppLocalizations.of(context).expenses),
),
ButtonSegment<String>(
value: "income",
label: Text(AppLocalizations.of(context).income),
),
],
selected: graphTypeSet,
multiSelectionEnabled: true,
onSelectionChanged: (selection) {
graphTypeSet = selection;
setState(() {});
},
),
const SizedBox(
height: 5,
),
SegmentedButton<String>(
segments: [
ButtonSegment<String>(
value: "yearly",
label: Text(AppLocalizations.of(context).yearly),
),
ButtonSegment<String>(
value: "monthly",
label: Text(AppLocalizations.of(context).monthly),
),
],
selected: yearlyBtnSet,
onSelectionChanged: (selection) async {
yearlyBtnSet = selection;
final s = await SharedPreferences.getInstance();
chartType = yearly
? (s.getInt("yearlygraph") ?? 1)
: (s.getInt("monthlygraph") ?? 2);
setState(() {});
},
),
const SizedBox(height: 5),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color:
Theme.of(context).colorScheme.secondaryContainer,
),
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.9,
height:
MediaQuery.of(context).size.height * 0.35,
child: (chartType == null)
? const CircularProgressIndicator()
: (chartType == 1)
? ExpensesBarChart(
currency: selectedWallet!.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData: (graphTypeSet
.contains("expense"))
? generateChartData(
EntryType.expense,
)
: [],
incomeData: (graphTypeSet
.contains("income"))
? generateChartData(
EntryType.income,
)
: [],
)
: Padding(
padding: const EdgeInsets.all(8),
child: ExpensesLineChart(
currency:
selectedWallet!.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData: (graphTypeSet
.contains("expense"))
? generateChartData(
EntryType.expense,
)
: [],
incomeData: (graphTypeSet
.contains("income"))
? generateChartData(
EntryType.income,
)
: [],
),
),
),
],
),
),
),
const SizedBox(
height: 25,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color:
Theme.of(context).colorScheme.secondaryContainer,
),
width: MediaQuery.of(context).size.width * 0.95,
height: MediaQuery.of(context).size.height * 0.35,
child: Padding(
padding: const EdgeInsets.all(8),
child: CategoriesPieChart(
symbol: selectedWallet!.currency.symbol,
entries: selectedWallet!.entries,
categories: selectedWallet!.categories,
),
),
),
],
),
appBar: AppBar(
bottom: TabBar(
tabs: [
Tab(
child: Text(AppLocalizations.of(context).expenses),
),
Tab(
child: Text(AppLocalizations.of(context).incomePlural),
),
],
),
title: DropdownButton<int>(
value: (selectedWallet == null)
? -1
: wallets.indexOf(selectedWallet!),
items: [
...wallets.map(
(e) => DropdownMenuItem(
value: wallets.indexOf(
e,
),
child: Text(e.name),
),
),
DropdownMenuItem(
value: -1,
child: Text(AppLocalizations.of(context).newWallet),
),
],
onChanged: (v) async {
if (v == null || v == -1) {
await Navigator.of(context).push(
platformRoute(
(c) => const SetupView(
newWallet: true,
),
),
);
wallets = await WalletManager.listWallets();
logger.i(wallets.length);
selectedWallet = wallets.last;
setState(() {});
return;
}
selectedWallet = wallets[v];
setState(() {});
},
),
actions: [
PopupMenuButton(
itemBuilder: (context) => [
AppLocalizations.of(context).settings,
AppLocalizations.of(context).about,
].map((e) => PopupMenuItem(value: e, child: Text(e))).toList(),
onSelected: (value) {
if (value == AppLocalizations.of(context).settings) {
Navigator.of(context)
.push(
platformRoute(
(context) => const SettingsView(),
),
)
.then((value) async {
selectedWallet =
await WalletManager.loadWallet(selectedWallet!.name);
final s = await SharedPreferences.getInstance();
chartType = s.getInt("monthlygraph") ?? 2;
setState(() {});
});
} else if (value == AppLocalizations.of(context).about) {
showAbout(context);
}
},
),
],
),
drawer: makeDrawer(context, 2),
body: TabBarView(
children: [
// EXPENSE TAB
SingleChildScrollView(
child: Center(
child: (selectedWallet == null)
? const CircularProgressIndicator(
strokeWidth: 5,
)
: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 200,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
AppLocalizations.of(context).monthly,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
Switch.adaptive(
value: yearly,
onChanged: (v) async {
yearly = v;
final s =
await SharedPreferences.getInstance();
chartType = yearly
? (s.getInt("yearlygraph") ?? 1)
: (s.getInt("monthlygraph") ?? 2);
setState(() {});
},
),
Text(
AppLocalizations.of(context).yearly,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: (MediaQuery.of(context)
.platformBrightness ==
Brightness.light)
? [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: const Offset(
0,
3,
),
),
]
: null,
color: (MediaQuery.of(context)
.platformBrightness ==
Brightness.dark)
? Theme.of(context)
.colorScheme
.secondaryContainer
: Theme.of(context).colorScheme.background,
),
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(
children: [
Text(
yearly
? AppLocalizations.of(context)
.expensesPerYear(
_selectedDate.year,
)
: AppLocalizations.of(context)
.expensesPerMonth(
DateFormat.yMMMM(locale)
.format(_selectedDate),
),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 15,
),
SizedBox(
width: MediaQuery.of(context).size.width *
0.9,
height:
MediaQuery.of(context).size.height *
0.35,
child: (chartType == null)
? const CircularProgressIndicator()
: (chartType == 1)
? ExpensesBarChart(
currency:
selectedWallet!.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData:
generateChartData(
EntryType.expense,
),
incomeData: const [],
)
: Padding(
padding:
const EdgeInsets.all(8),
child: ExpensesLineChart(
currency: selectedWallet!
.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData:
generateChartData(
EntryType.expense,
),
incomeData: const [],
),
),
),
],
),
),
),
const SizedBox(
height: 25,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: (MediaQuery.of(context)
.platformBrightness ==
Brightness.light)
? [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: const Offset(
0,
3,
),
),
]
: null,
color: (MediaQuery.of(context)
.platformBrightness ==
Brightness.dark)
? Theme.of(context)
.colorScheme
.secondaryContainer
: Theme.of(context).colorScheme.background,
),
width: MediaQuery.of(context).size.width * 0.95,
height: MediaQuery.of(context).size.height * 0.4,
child: Column(
children: [
const SizedBox(
height: 10,
),
Flexible(
child: Text(
textAlign: TextAlign.center,
yearly
? AppLocalizations.of(context)
.expensesPerYearCategory(
_selectedDate.year,
)
: AppLocalizations.of(context)
.expensesPerMonthCategory(
DateFormat.yMMMM(locale)
.format(_selectedDate),
),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.all(6),
child: CategoriesPieChart(
// TODO: better size adaptivity without overflow
locale: locale ?? "en",
symbol: selectedWallet!.currency.symbol,
entries: selectedWallet!.entries
.where(
(element) =>
((!yearly)
? element.date.month ==
_selectedDate
.month &&
element.date.year ==
_selectedDate.year
: element.date.year ==
_selectedDate.year) &&
element.type ==
EntryType.expense,
)
.toList(),
categories: selectedWallet!.categories,
),
),
],
),
),
],
),
),
),
), // Expense Tab END
SingleChildScrollView(
child: Center(
child: (selectedWallet == null)
? const CircularProgressIndicator(
strokeWidth: 5,
)
: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 200,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
AppLocalizations.of(context).monthly,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
Switch.adaptive(
value: yearly,
onChanged: (v) async {
yearly = v;
final s =
await SharedPreferences.getInstance();
chartType = yearly
? (s.getInt("yearlygraph") ?? 1)
: (s.getInt("monthlygraph") ?? 2);
setState(() {});
},
),
Text(
AppLocalizations.of(context).yearly,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: (MediaQuery.of(context)
.platformBrightness ==
Brightness.light)
? [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: const Offset(
0,
3,
),
),
]
: null,
color: (MediaQuery.of(context)
.platformBrightness ==
Brightness.dark)
? Theme.of(context)
.colorScheme
.secondaryContainer
: Theme.of(context).colorScheme.background,
),
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(
children: [
Text(
yearly
? AppLocalizations.of(context)
.incomePerYear(
_selectedDate.year,
)
: AppLocalizations.of(context)
.incomePerMonth(
DateFormat.yMMMM(locale)
.format(_selectedDate),
),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 15,
),
SizedBox(
width: MediaQuery.of(context).size.width *
0.9,
height:
MediaQuery.of(context).size.height *
0.35,
child: (chartType == null)
? const CircularProgressIndicator()
: (chartType == 1)
? ExpensesBarChart(
currency:
selectedWallet!.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData: const [],
incomeData: generateChartData(
EntryType.income,
),
)
: Padding(
padding:
const EdgeInsets.all(8),
child: ExpensesLineChart(
currency: selectedWallet!
.currency,
date: _selectedDate,
locale: locale ?? "en",
yearly: yearly,
expenseData: const [],
incomeData:
generateChartData(
EntryType.income,
),
),
),
),
],
),
),
),
const SizedBox(
height: 25,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: (MediaQuery.of(context)
.platformBrightness ==
Brightness.light)
? [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 3,
blurRadius: 7,
offset: const Offset(
0,
3,
),
),
]
: null,
color: (MediaQuery.of(context)
.platformBrightness ==
Brightness.dark)
? Theme.of(context)
.colorScheme
.secondaryContainer
: Theme.of(context).colorScheme.background,
),
width: MediaQuery.of(context).size.width * 0.95,
height: MediaQuery.of(context).size.height * 0.4,
child: Column(
children: [
const SizedBox(
height: 10,
),
Flexible(
child: Text(
yearly
? AppLocalizations.of(context)
.incomePerYearCategory(
_selectedDate.year,
)
: AppLocalizations.of(context)
.incomePerMonthCategory(
DateFormat.yMMMM(locale)
.format(_selectedDate),
),
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.all(6),
child: CategoriesPieChart(
locale: locale ?? "en",
symbol: selectedWallet!.currency.symbol,
entries: selectedWallet!.entries
.where(
(element) =>
((!yearly)
? element.date.month ==
_selectedDate
.month &&
element.date.year ==
_selectedDate.year
: element.date.year ==
_selectedDate.year) &&
element.type ==
EntryType.income,
)
.toList(),
categories: selectedWallet!.categories,
),
),
],
),
),
],
),
),
),
), // Income Tab END
],
),
),
);

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'dart:async';
import 'package:dynamic_color/dynamic_color.dart';
@ -24,7 +22,9 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/sorting.dart';
import 'package:prasule/util/text_color.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/create_entry.dart';
import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/settings/tessdata_list.dart';
@ -40,13 +40,16 @@ class HomeView extends StatefulWidget {
}
class _HomeViewState extends State<HomeView> {
Wallet? selectedWallet;
List<Wallet> wallets = [];
Wallet? selectedWallet; // current wallet
List<Wallet> wallets = []; // all available wallets
DateTime? prevDate;
late String locale;
var _searchActive = false;
var _filter = "";
late String locale; // user's locale
var _searchActive = false; // whether search field is shown
var _filter = ""; // search filter
final searchFocus = FocusNode();
SortType sort = SortType.newest;
OverlayEntry? overlayEntry;
@override
void didChangeDependencies() {
super.didChangeDependencies();
@ -83,11 +86,15 @@ class _HomeViewState extends State<HomeView> {
if (b) return;
_searchActive = false;
_filter = "";
overlayEntry?.remove();
setState(() {});
},
child: Scaffold(
drawer: makeDrawer(context, 1),
floatingActionButton: SpeedDial(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16)),
),
icon: Icons.add,
activeIcon: Icons.close,
children: [
@ -113,7 +120,10 @@ class _HomeViewState extends State<HomeView> {
onTap: () async {
final sw = await Navigator.of(context).push<Wallet>(
MaterialPageRoute(
builder: (c) => CreateSingleEntryView(w: selectedWallet!),
builder: (c) => CreateSingleEntryView(
w: selectedWallet!,
locale: locale,
),
),
);
if (sw != null) {
@ -190,44 +200,93 @@ class _HomeViewState extends State<HomeView> {
},
),
),
actions: [
if (!_searchActive)
IconButton(
onPressed: () {
_searchActive = true;
setState(() {});
},
icon: const Icon(Icons.search),
),
if (!_searchActive)
PopupMenuButton(
itemBuilder: (context) => [
AppLocalizations.of(context).settings,
AppLocalizations.of(context).about,
].map((e) => PopupMenuItem(value: e, child: Text(e))).toList(),
onSelected: (value) {
if (value == AppLocalizations.of(context).settings) {
Navigator.of(context)
.push(
platformRoute(
(context) => const SettingsView(),
),
)
.then((value) async {
wallets = await WalletManager.listWallets();
selectedWallet =
await WalletManager.loadWallet(selectedWallet!.name);
});
} else if (value == AppLocalizations.of(context).about) {
showAboutDialog(
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
}
},
),
],
actions: _searchActive
? []
: [
PopupMenuButton(
tooltip: AppLocalizations.of(context).sort,
icon: const Icon(Icons.sort_rounded),
itemBuilder: (context) => [
AppLocalizations.of(context).sortNewest,
AppLocalizations.of(context).sortOldest,
]
.map(
(e) => PopupMenuItem(
value: e,
child: Text(e),
),
)
.toList(),
onSelected: (value) {
if (value == AppLocalizations.of(context).sortNewest) {
sort = SortType.newest;
setState(() {});
} else if (value ==
AppLocalizations.of(context).sortOldest) {
sort = SortType.oldest;
setState(() {});
}
},
),
PopupMenuButton(
itemBuilder: (context) => [
AppLocalizations.of(context).settings,
AppLocalizations.of(context).search,
AppLocalizations.of(context).about,
]
.map((e) => PopupMenuItem(value: e, child: Text(e)))
.toList(),
onSelected: (value) {
if (value == AppLocalizations.of(context).settings) {
Navigator.of(context)
.push(
platformRoute(
(context) => const SettingsView(),
),
)
.then((value) async {
wallets = await WalletManager.listWallets();
selectedWallet = await WalletManager.loadWallet(
selectedWallet!.name,);
});
} else if (value == AppLocalizations.of(context).about) {
showAbout(context);
} else if (value == AppLocalizations.of(context).search) {
_searchActive = !_searchActive;
if (!_searchActive) {
_filter = "";
} else {
overlayEntry = OverlayEntry(
builder: (context) => Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
width: MediaQuery.of(context).size.width,
height:
MediaQuery.of(context).size.height - 100,
child: GestureDetector(
onTap: () {
if (!searchFocus.hasFocus) {
_searchActive = false;
_filter = "";
overlayEntry?.remove();
setState(() {});
return;
}
searchFocus.unfocus();
},
),
),
),
);
Overlay.of(context).insert(
overlayEntry!,
);
}
setState(() {});
}
},
),
],
),
body: Center(
child: SizedBox(
@ -268,7 +327,7 @@ class _HomeViewState extends State<HomeView> {
locale: locale,
symbol: selectedWallet!.currency.symbol,
).format(
selectedWallet!.calculateCurrentBalance(),
selectedWallet!.currentBalance,
),
style: const TextStyle(
fontWeight: FontWeight.bold,
@ -291,6 +350,11 @@ class _HomeViewState extends State<HomeView> {
TextSpan(
text: AppLocalizations.of(context)
.balanceStatusA,
style: TextStyle(
color: Theme.of(context)
.colorScheme
.onBackground,
),
),
TextSpan(
style: TextStyle(
@ -336,6 +400,11 @@ class _HomeViewState extends State<HomeView> {
TextSpan(
text: AppLocalizations.of(context)
.balanceStatusB,
style: TextStyle(
color: Theme.of(context)
.colorScheme
.onBackground,
),
),
],
),
@ -355,87 +424,27 @@ class _HomeViewState extends State<HomeView> {
),
),
elements: selectedWallet!.entries
.where((element) =>
element.data.name.contains(_filter))
.where(
(element) => element.data.name
.toLowerCase()
.contains(_filter.toLowerCase()),
)
.toList(),
itemComparator: (a, b) =>
b.date.compareTo(a.date),
(sort == SortType.newest)
? b.date.compareTo(a.date)
: a.date.compareTo(b.date),
groupBy: (e) =>
DateFormat.yMMMM(locale).format(e.date),
groupComparator: (a, b) {
// TODO: better sorting algorithm lol
final yearA =
RegExp(r'\d+').firstMatch(a);
if (yearA == null) return 0;
final yearB =
RegExp(r'\d+').firstMatch(b);
if (yearB == null) return 0;
final compareYears =
int.parse(yearB.group(0)!).compareTo(
int.parse(yearA.group(0)!),
);
if (compareYears != 0) {
return compareYears;
}
final months = List<String>.generate(
12,
(index) =>
DateFormat.MMMM(locale).format(
DateTime(2023, index + 1),
),
);
final monthA =
RegExp('[^0-9 ]+').firstMatch(a);
if (monthA == null) return 0;
final monthB =
RegExp('[^0-9 ]+').firstMatch(b);
if (monthB == null) return 0;
return months
.indexOf(monthB.group(0)!)
.compareTo(
months.indexOf(monthA.group(0)!),
);
},
groupComparator: (a, b) =>
(sort == SortType.newest)
? groupSortNewest(a, b, locale)
: groupSortOldest(a, b, locale),
itemBuilder: (context, element) => Slidable(
endActionPane: ActionPane(
extentRatio: 0.3,
motion: const ScrollMotion(),
children: [
SlidableAction(
onPressed: (c) {
Navigator.of(context)
.push<WalletSingleEntry>(
MaterialPageRoute(
builder: (c) =>
CreateSingleEntryView(
w: selectedWallet!,
editEntry: element,
),
),
)
.then(
(editedEntry) {
if (editedEntry == null) {
return;
}
selectedWallet!.entries
.remove(element);
selectedWallet!.entries
.add(editedEntry);
WalletManager.saveWallet(
selectedWallet!,
);
setState(() {});
},
);
},
backgroundColor: Theme.of(context)
.colorScheme
.secondary,
foregroundColor: Theme.of(context)
.colorScheme
.onSecondary,
icon: Icons.edit,
),
SlidableAction(
backgroundColor: Theme.of(context)
.colorScheme
@ -445,7 +454,7 @@ class _HomeViewState extends State<HomeView> {
.onError,
icon: Icons.delete,
onPressed: (c) {
showAdaptiveDialog(
showAdaptiveDialog<void>(
context: context,
builder: (cx) =>
AlertDialog.adaptive(
@ -495,6 +504,34 @@ class _HomeViewState extends State<HomeView> {
],
),
child: ListTile(
onTap: () {
Navigator.of(context)
.push<WalletSingleEntry>(
MaterialPageRoute(
builder: (c) =>
CreateSingleEntryView(
locale: locale,
w: selectedWallet!,
editEntry: element,
),
),
)
.then(
(editedEntry) {
if (editedEntry == null) {
return;
}
selectedWallet!.entries
.remove(element);
selectedWallet!.entries
.add(editedEntry);
WalletManager.saveWallet(
selectedWallet!,
);
setState(() {});
},
);
},
leading: Container(
decoration: BoxDecoration(
borderRadius:
@ -565,24 +602,6 @@ class _HomeViewState extends State<HomeView> {
],
),
),
OverlayEntry(
builder: (context) => SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: GestureDetector(
onTap: () {
if (!_searchActive) return;
if (!searchFocus.hasFocus) {
_searchActive = false;
_filter = "";
setState(() {});
return;
}
searchFocus.unfocus();
},
),
),
),
],
),
),
@ -595,7 +614,7 @@ class _HomeViewState extends State<HomeView> {
final availableLanguages = await TessdataApi.getDownloadedData();
if (availableLanguages.isEmpty) {
if (!mounted) return;
await showAdaptiveDialog(
await showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context).missingOcr),
@ -628,7 +647,7 @@ class _HomeViewState extends State<HomeView> {
List<bool>.filled(availableLanguages.length, false);
selectedLanguages[0] = true;
await showAdaptiveDialog(
await showAdaptiveDialog<void>(
context: context,
builder: (c) => StatefulBuilder(
builder: (ctx, setState) => AlertDialog.adaptive(
@ -636,9 +655,11 @@ class _HomeViewState extends State<HomeView> {
TextButton(
onPressed: () async {
final filePath = await FlutterFileDialog.pickFile(
params: OpenFileDialogParams(
dialogType: OpenFileDialogType.image,
sourceType: sourceType));
params: OpenFileDialogParams(
dialogType: OpenFileDialogType.image,
sourceType: sourceType,
),
);
if (filePath == null) {
if (mounted) Navigator.of(context).pop();
return;
@ -696,6 +717,7 @@ class _HomeViewState extends State<HomeView> {
await Navigator.of(context).push<WalletSingleEntry>(
platformRoute<WalletSingleEntry>(
(c) => CreateSingleEntryView(
locale: locale,
w: selectedWallet!,
editEntry: WalletSingleEntry(
data: EntryData(
@ -759,3 +781,12 @@ class _HomeViewState extends State<HomeView> {
);
}
}
/// Represents entry sorting type
enum SortType {
/// Sort newest first
newest,
/// Sort oldest first
oldest
}

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'dart:async';
import 'package:flutter/material.dart';
@ -14,6 +12,7 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/drawer.dart';
import 'package:prasule/util/text_color.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/create_recur_entry.dart';
import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/setup.dart';
@ -117,18 +116,13 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
await WalletManager.loadWallet(selectedWallet!.name);
});
} else if (value == AppLocalizations.of(context).about) {
showAboutDialog(
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
showAbout(context);
}
},
),
],
),
floatingActionButton: FloatingActionButton(
shape: const CircleBorder(),
child: const Icon(Icons.add),
onPressed: () {
Navigator.of(context).push(
@ -173,38 +167,8 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
itemBuilder: (c, i) => Slidable(
endActionPane: ActionPane(
motion: const ScrollMotion(),
extentRatio: 0.3,
children: [
SlidableAction(
onPressed: (c) {
Navigator.of(context)
.push<RecurringWalletEntry>(
MaterialPageRoute(
builder: (c) => CreateRecurringEntryView(
w: selectedWallet!,
locale: locale,
editEntry:
selectedWallet!.recurringEntries[i],
),
),
)
.then(
(editedEntry) {
if (editedEntry == null) return;
selectedWallet!.entries.remove(
selectedWallet!.recurringEntries[i],
);
selectedWallet!.entries.add(editedEntry);
WalletManager.saveWallet(selectedWallet!);
setState(() {});
},
);
},
backgroundColor:
Theme.of(context).colorScheme.secondary,
foregroundColor:
Theme.of(context).colorScheme.onSecondary,
icon: Icons.edit,
),
SlidableAction(
backgroundColor:
Theme.of(context).colorScheme.error,
@ -212,7 +176,7 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
Theme.of(context).colorScheme.onError,
icon: Icons.delete,
onPressed: (c) {
showDialog(
showDialog<void>(
context: context,
builder: (cx) => AlertDialog.adaptive(
title: Text(
@ -250,6 +214,30 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
],
),
child: ListTile(
onTap: () {
Navigator.of(context)
.push<RecurringWalletEntry>(
MaterialPageRoute(
builder: (c) => CreateRecurringEntryView(
w: selectedWallet!,
locale: locale,
editEntry:
selectedWallet!.recurringEntries[i],
),
),
)
.then(
(editedEntry) {
if (editedEntry == null) return;
selectedWallet!.entries.remove(
selectedWallet!.recurringEntries[i],
);
selectedWallet!.entries.add(editedEntry);
WalletManager.saveWallet(selectedWallet!);
setState(() {});
},
);
},
leading: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'dart:async';
import 'package:dynamic_color/dynamic_color.dart';
@ -15,6 +13,7 @@ import 'package:prasule/pw/platformbutton.dart';
import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/text_color.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/settings/settings.dart';
import 'package:prasule/views/setup.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -106,11 +105,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
),
);
} else if (value == AppLocalizations.of(context).about) {
showAboutDialog(
context: context,
applicationLegalese: AppLocalizations.of(context).license,
applicationName: "Prašule",
);
showAbout(context);
}
},
),
@ -125,6 +120,27 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
AppLocalizations.of(context).setupCategoriesEditHint,
textAlign: TextAlign.center,
),
IconButton(
onPressed: () async {
selectedWallet!.categories.add(
WalletCategory(
name: AppLocalizations.of(context)
.setupWalletNamePlaceholder,
id: selectedWallet!.nextCategoryId,
icon: IconData(
Icons.question_mark.codePoint,
fontFamily: 'MaterialIcons',
),
color: Colors.blueGrey.harmonizeWith(
Theme.of(context).colorScheme.primary,
),
),
);
await WalletManager.saveWallet(selectedWallet!);
setState(() {});
},
icon: const Icon(Icons.add),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.64,
child: ListView.builder(
@ -134,8 +150,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
: ListTile(
leading: GestureDetector(
onTap: () async {
final icon =
await FlutterIconPicker.showIconPicker(
final icon = await showIconPicker(
context,
);
if (icon != null) {
@ -146,7 +161,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
.getBool("useMaterialYou") ??
false;
if (!context.mounted) return;
await showAdaptiveDialog(
await showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
actions: [
@ -158,7 +173,8 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
),
],
title: Text(
AppLocalizations.of(context).pickColor),
AppLocalizations.of(context).pickColor,
),
content: Column(
children: [
ColorPicker(
@ -214,7 +230,7 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
final controller = TextEditingController(
text: selectedWallet!.categories[i].name,
);
showAdaptiveDialog(
showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
actions: [
@ -242,8 +258,10 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
),
),
],
title: Text(AppLocalizations.of(context)
.setupCategoriesEditingName),
title: Text(
AppLocalizations.of(context)
.setupCategoriesEditingName,
),
content: SizedBox(
width: 400,
child:
@ -263,27 +281,6 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
itemCount: selectedWallet!.categories.length,
),
),
IconButton(
onPressed: () async {
selectedWallet!.categories.add(
WalletCategory(
name: AppLocalizations.of(context)
.setupWalletNamePlaceholder,
id: selectedWallet!.nextCategoryId,
icon: IconData(
Icons.question_mark.codePoint,
fontFamily: 'MaterialIcons',
),
color: Colors.blueGrey.harmonizeWith(
Theme.of(context).colorScheme.primary,
),
),
);
await WalletManager.saveWallet(selectedWallet!);
setState(() {});
},
icon: const Icon(Icons.add),
),
],
),
);

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:settings_ui/settings_ui.dart';
@ -49,53 +47,56 @@ class _GraphTypeSettingsViewState extends State<GraphTypeSettingsView> {
? AppLocalizations.of(context).barChart
: AppLocalizations.of(context).lineChart,
),
onPressed: (c) => showAdaptiveDialog(
onPressed: (c) => showAdaptiveDialog<void>(
context: c,
builder: (ctx) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context).selectType),
content: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
content: SizedBox(
height: 80,
child: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 1);
_yearly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 1);
_yearly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
SizedBox(
width: MediaQuery.of(context).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 2);
_yearly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("yearlygraph", 2);
_yearly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
],
],
),
),
),
),
@ -107,53 +108,56 @@ class _GraphTypeSettingsViewState extends State<GraphTypeSettingsView> {
? AppLocalizations.of(context).barChart
: AppLocalizations.of(context).lineChart,
),
onPressed: (c) => showDialog(
onPressed: (c) => showAdaptiveDialog<void>(
context: c,
builder: (ctx) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context).selectType),
content: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
content: SizedBox(
height: 80,
child: Column(
children: [
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).barChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 1);
_monthly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 1);
_monthly = 1;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
SizedBox(
width: MediaQuery.of(ctx).size.width,
child: InkWell(
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
AppLocalizations.of(context).lineChart,
textAlign: TextAlign.center,
),
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 2);
_monthly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
onTap: () async {
final s = await SharedPreferences.getInstance();
await s.setInt("monthlygraph", 2);
_monthly = 2;
if (!ctx.mounted) return;
Navigator.of(ctx).pop();
setState(() {});
},
),
),
],
],
),
),
),
),

View file

@ -107,190 +107,192 @@ class _SettingsViewState extends State<SettingsView> {
),
],
),
SettingsSection(
title: Text(AppLocalizations.of(context).settingsData),
tiles: [
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).exportSingle),
description:
Text(AppLocalizations.of(context).exportSingleDesc),
onPressed: (ctx) async {
final all = await WalletManager.listWallets();
if (!ctx.mounted) return;
final w = await showAdaptiveDialog<String>(
context: ctx,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).selectExportWallet,
),
actions: [
PlatformButton(
text: AppLocalizations.of(context).cancel,
onPressed: () => Navigator.of(ctx).pop(),
if (!Platform.isIOS)
SettingsSection(
//! TODO: Find a replacement for iOS
title: Text(AppLocalizations.of(context).settingsData),
tiles: [
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).exportSingle),
description:
Text(AppLocalizations.of(context).exportSingleDesc),
onPressed: (ctx) async {
final all = await WalletManager.listWallets();
if (!ctx.mounted) return;
final w = await showAdaptiveDialog<String>(
context: ctx,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).selectExportWallet,
),
],
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.3,
child: ListView.builder(
itemBuilder: (con, i) => InkWell(
onTap: () => Navigator.of(ctx).pop(all[i].name),
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
all[i].name,
textAlign: TextAlign.center,
actions: [
PlatformButton(
text: AppLocalizations.of(context).cancel,
onPressed: () => Navigator.of(ctx).pop(),
),
],
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.3,
child: ListView.builder(
itemBuilder: (con, i) => InkWell(
onTap: () => Navigator.of(ctx).pop(all[i].name),
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
all[i].name,
textAlign: TextAlign.center,
),
),
),
shrinkWrap: true,
itemCount: all.length,
),
),
),
);
if (w == null) return;
try {
await WalletManager.exportWallet(name: w);
} catch (e) {
if (!context.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
),
),
),
shrinkWrap: true,
itemCount: all.length,
),
),
),
);
if (w == null) return;
try {
await WalletManager.exportWallet(name: w);
} catch (e) {
if (!context.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
),
),
),
),
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showMessage(
AppLocalizations.of(ctx).exportCompleted,
ctx,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).exportArchive),
description:
Text(AppLocalizations.of(context).exportArchiveDesc),
onPressed: (ctx) async {
try {
await WalletManager.exportAllWallets();
} catch (e) {
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
showMessage(
AppLocalizations.of(ctx).exportCompleted,
ctx,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).exportArchive),
description:
Text(AppLocalizations.of(context).exportArchiveDesc),
onPressed: (ctx) async {
try {
await WalletManager.exportAllWallets();
} catch (e) {
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
),
),
),
),
),
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showMessage(
AppLocalizations.of(ctx).exportCompleted,
context,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).importSingle),
description:
Text(AppLocalizations.of(context).importSingleDesc),
onPressed: (ctx) async {
try {
await WalletManager.importWallet();
} catch (e) {
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
showMessage(
AppLocalizations.of(ctx).exportCompleted,
context,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).importSingle),
description:
Text(AppLocalizations.of(context).importSingleDesc),
onPressed: (ctx) async {
try {
await WalletManager.importWallet();
} catch (e) {
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
),
),
),
),
),
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showMessage(
AppLocalizations.of(ctx).importCompleted,
context,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).importArchive),
description:
Text(AppLocalizations.of(context).importArchiveDesc),
onPressed: (ctx) async {
try {
await WalletManager.importArchive();
} catch (e) {
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
showMessage(
AppLocalizations.of(ctx).importCompleted,
context,
),
);
},
),
SettingsTile.navigation(
title: Text(AppLocalizations.of(context).importArchive),
description:
Text(AppLocalizations.of(context).importArchiveDesc),
onPressed: (ctx) async {
try {
await WalletManager.importArchive();
} catch (e) {
if (!ctx.mounted) return;
unawaited(
showAdaptiveDialog(
context: context,
builder: (ctx) => AlertDialog.adaptive(
title: Text(
AppLocalizations.of(context).exportError,
),
content: SingleChildScrollView(
child: Flexible(
child: Text(e.toString()),
),
),
),
),
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showMessage(
AppLocalizations.of(ctx).importCompleted,
context,
),
);
logger.e(e);
return;
}
if (!ctx.mounted) return;
unawaited(
showMessage(
AppLocalizations.of(ctx).importCompleted,
context,
),
);
},
),
],
),
},
),
],
),
],
),
);

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'dart:async';
import 'dart:io';
@ -61,7 +59,7 @@ class _TessdataListViewState extends State<TessdataListView> {
final lang = _tessdata[i].keys.first;
if (_tessdata[i][lang]!) {
// deleting data
await showAdaptiveDialog(
await showAdaptiveDialog<void>(
context: context,
builder: (context) => AlertDialog.adaptive(
title:
@ -101,8 +99,10 @@ class _TessdataListViewState extends State<TessdataListView> {
showAdaptiveDialog(
context: context,
builder: (c) => AlertDialog.adaptive(
title: Text(AppLocalizations.of(context)
.langDownloadDialog(lang)),
title: Text(
AppLocalizations.of(context)
.langDownloadDialog(lang),
),
content: StreamBuilder(
builder: (context, snapshot) {
if (snapshot.connectionState ==
@ -152,6 +152,7 @@ class _TessdataListViewState extends State<TessdataListView> {
/// so we can show it to the user
Future<void> loadAllTessdata() async {
final tessDir = Directory(await FlutterTesseractOcr.getTessdataPath());
if (!tessDir.existsSync()) tessDir.createSync(recursive: true);
final d = await TessdataApi.getAvailableData();
final dataStatus = <Map<String, bool>>[];
for (final data in d) {

View file

@ -1,5 +1,3 @@
// ignore_for_file: inference_failure_on_function_invocation
import 'dart:async';
import 'package:currency_picker/currency_picker.dart';
@ -18,6 +16,7 @@ import 'package:prasule/pw/platformfield.dart';
import 'package:prasule/pw/platformroute.dart';
import 'package:prasule/util/show_message.dart';
import 'package:prasule/util/text_color.dart';
import 'package:prasule/util/utils.dart';
import 'package:prasule/views/home.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -50,12 +49,13 @@ class _SetupViewState extends State<SetupView> {
);
List<WalletCategory> categories = <WalletCategory>[];
String name = "";
double balance = 0;
final _balanceController = TextEditingController(text: "0.0");
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (categories.isEmpty) {
name = AppLocalizations.of(context).setupNamePlaceholder;
categories = [
WalletCategory(
name: AppLocalizations.of(context).noCategory,
@ -107,6 +107,20 @@ class _SetupViewState extends State<SetupView> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context).setup),
actions: [
Tooltip(
message: AppLocalizations.of(context).about,
child: IconButton(
onPressed: () {
showAbout(context);
},
icon: const Icon(Icons.info_outline),
),
),
],
),
body: Center(
child: SizedBox(
width: MediaQuery.of(context).size.width,
@ -139,10 +153,10 @@ class _SetupViewState extends State<SetupView> {
return;
}
final wallet = Wallet(
name: name,
currency: _selectedCurrency,
categories: categories,
);
name: name,
currency: _selectedCurrency,
categories: categories,
starterBalance: double.parse(_balanceController.text),);
await WalletManager.saveWallet(wallet);
if (widget.newWallet && context.mounted) {
@ -181,15 +195,17 @@ class _SetupViewState extends State<SetupView> {
Flexible(
child: Text(
AppLocalizations.of(context).welcomeAboutPrasule,
textAlign: TextAlign.center,
),
),
if (!widget.newWallet)
const SizedBox(
height: 5,
height: 8,
),
Flexible(
child: Text(
AppLocalizations.of(context).welcomeInstruction,
textAlign: TextAlign.center,
),
),
],
@ -215,8 +231,10 @@ class _SetupViewState extends State<SetupView> {
SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
child: PlatformField(
labelText:
AppLocalizations.of(context).setupNamePlaceholder,
controller: TextEditingController(
text:
AppLocalizations.of(context).setupNamePlaceholder,
),
onChanged: (t) {
name = t;
},
@ -249,16 +267,16 @@ class _SetupViewState extends State<SetupView> {
keyboardType: const TextInputType.numberWithOptions(
decimal: true,
),
controller: _balanceController,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(r'\d+[\.,]{0,1}\d{0,}'),
),
],
onChanged: (t) {
final b = double.tryParse(t);
if (b == null) return;
balance = b;
},
prefix: Padding(
padding: const EdgeInsets.only(right: 4),
child: Text(_selectedCurrency.symbol),
),
),
),
],
@ -285,6 +303,32 @@ class _SetupViewState extends State<SetupView> {
AppLocalizations.of(context).setupCategoriesEditHint,
textAlign: TextAlign.center,
),
IconButton(
onPressed: () {
var id = 0;
while (categories
.where((element) => element.id == id)
.isNotEmpty) {
id++; // create unique ID
}
categories.add(
WalletCategory(
name: AppLocalizations.of(context)
.setupWalletNamePlaceholder,
id: id,
icon: IconData(
Icons.question_mark.codePoint,
fontFamily: 'MaterialIcons',
),
color: Colors.blueGrey.harmonizeWith(
Theme.of(context).colorScheme.primary,
),
),
);
setState(() {});
},
icon: const Icon(Icons.add),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.64,
child: ListView.builder(
@ -294,8 +338,7 @@ class _SetupViewState extends State<SetupView> {
: ListTile(
leading: GestureDetector(
onTap: () async {
final icon =
await FlutterIconPicker.showIconPicker(
final icon = await showIconPicker(
context,
);
if (icon != null) categories[i].icon = icon;
@ -304,7 +347,7 @@ class _SetupViewState extends State<SetupView> {
.getBool("useMaterialYou") ??
false;
if (!context.mounted) return;
await showAdaptiveDialog(
await showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
actions: [
@ -371,7 +414,7 @@ class _SetupViewState extends State<SetupView> {
final controller = TextEditingController(
text: categories[i].name,
);
showAdaptiveDialog(
showAdaptiveDialog<void>(
context: context,
builder: (c) => AlertDialog.adaptive(
actions: [
@ -422,32 +465,6 @@ class _SetupViewState extends State<SetupView> {
itemCount: categories.length,
),
),
IconButton(
onPressed: () {
var id = 0;
while (categories
.where((element) => element.id == id)
.isNotEmpty) {
id++; // create unique ID
}
categories.add(
WalletCategory(
name: AppLocalizations.of(context)
.setupWalletNamePlaceholder,
id: id,
icon: IconData(
Icons.question_mark.codePoint,
fontFamily: 'MaterialIcons',
),
color: Colors.blueGrey.harmonizeWith(
Theme.of(context).colorScheme.primary,
),
),
);
setState(() {});
},
icon: const Icon(Icons.add),
),
],
),
),

View file

@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49"
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
version: "65.0.0"
version: "67.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
version: "6.3.0"
version: "6.4.1"
archive:
dependency: "direct main"
description:
@ -93,10 +93,10 @@ packages:
dependency: transitive
description:
name: build_runner_core
sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185
sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799"
url: "https://pub.dev"
source: hosted
version: "7.2.11"
version: "7.3.0"
built_collection:
dependency: transitive
description:
@ -109,10 +109,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309
sha256: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6
url: "https://pub.dev"
source: hosted
version: "8.8.1"
version: "8.9.0"
characters:
dependency: transitive
description:
@ -253,10 +253,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.2"
file:
dependency: transitive
description:
@ -277,10 +277,10 @@ packages:
dependency: "direct main"
description:
name: fl_chart
sha256: fe6fec7d85975a99c73b9515a69a6e291364accfa0e4a5b3ce6de814d74b9a1c
sha256: b5e2b0f13d93f8c532b5a2786bfb44580de1f50b927bf95813fa1af617e9caf8
url: "https://pub.dev"
source: hosted
version: "0.66.0"
version: "0.66.1"
flex_color_picker:
dependency: "direct main"
description:
@ -319,10 +319,10 @@ packages:
dependency: "direct main"
description:
name: flutter_iconpicker
sha256: a51d1c8ed5447334652d6fe6d004f1d361184d124e982762373f9be6a78a18b6
sha256: ad21bb678fd315f5c4f4eab2c9489779f818a3cbb77e20a7460d685bc44ddaf4
url: "https://pub.dev"
source: hosted
version: "3.2.4"
version: "3.3.3"
flutter_keyboard_visibility:
dependency: transitive
description:
@ -438,10 +438,10 @@ packages:
dependency: transitive
description:
name: font_awesome_flutter
sha256: "52671aea66da73b58d42ec6d0912b727a42248dd9a7c76d6c20f275783c48c08"
sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f"
url: "https://pub.dev"
source: hosted
version: "10.6.0"
version: "10.7.0"
frontend_server_client:
dependency: transitive
description:
@ -499,10 +499,10 @@ packages:
dependency: transitive
description:
name: image
sha256: "004a2e90ce080f8627b5a04aecb4cdfac87d2c3f3b520aa291260be5a32c033d"
sha256: "49a0d4b0c12402853d3f227fe7c315601b238d126aa4caa5dbb2dcf99421aa4a"
url: "https://pub.dev"
source: hosted
version: "4.1.4"
version: "4.1.6"
integration_test:
dependency: "direct dev"
description: flutter
@ -632,10 +632,10 @@ packages:
dependency: transitive
description:
name: mime
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
nested:
dependency: transitive
description:
@ -1017,6 +1017,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c
url: "https://pub.dev"
source: hosted
version: "6.2.4"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
url: "https://pub.dev"
source: hosted
version: "6.2.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
url: "https://pub.dev"
source: hosted
version: "3.1.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev"
source: hosted
version: "3.1.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f
url: "https://pub.dev"
source: hosted
version: "2.3.1"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
url: "https://pub.dev"
source: hosted
version: "2.2.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
url: "https://pub.dev"
source: hosted
version: "3.1.1"
vector_math:
dependency: transitive
description:
@ -1081,6 +1145,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.1"
wheel_chooser:
dependency: "direct main"
description:
name: wheel_chooser
sha256: "3fee36f081f321c58a0b7b4afcdd92599f2ca520b3a1420084774e6b19cca1d8"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
win32:
dependency: transitive
description:
@ -1106,7 +1178,7 @@ packages:
source: hosted
version: "6.5.0"
yaml:
dependency: transitive
dependency: "direct dev"
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
@ -1114,5 +1186,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.2.0 <4.0.0"
dart: ">=3.3.0-279.1.beta <4.0.0"
flutter: ">=3.16.0"

View file

@ -1,7 +1,7 @@
name: prasule
description: Open-source private expense tracker
version: 1.0.0-alpha+5
version: 1.0.0+6
environment:
sdk: '>=3.1.0-262.2.beta <4.0.0'
@ -39,6 +39,8 @@ dependencies:
path_provider: ^2.0.15
settings_ui: ^2.0.2
shared_preferences: ^2.2.2
url_launcher: ^6.2.4
wheel_chooser: ^1.1.2
dev_dependencies:
build_runner: ^2.4.6
@ -56,6 +58,7 @@ dev_dependencies:
sdk: flutter
test: ^1.24.6
very_good_analysis: ^5.1.0
yaml: ^3.1.2
flutter_launcher_icons:
android: true
@ -87,6 +90,7 @@ flutter:
assets:
- assets/tessdata_config.json
- assets/tessdata/eng.traineddata
- assets/icon/full_ico.png
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg