Compare commits
1 commit
cdbd355c91
...
fb16b7b0a8
Author | SHA1 | Date | |
---|---|---|---|
fb16b7b0a8 |
13 changed files with 69 additions and 82 deletions
|
@ -1,11 +1,3 @@
|
|||
# 1.1.1
|
||||
- Removed deprecated code
|
||||
- Updated dependencies
|
||||
- Fix wrong graph type upon opening graph view
|
||||
- Fix text fields behaving unexpectedly
|
||||
- Fix `Add new wallet` showing in the app bar when returning from another view
|
||||
- Fix new wallet name being rewritten to the default placeholder
|
||||
|
||||
# 1.1.0
|
||||
- Fix indicators for Pie Chart
|
||||
- Fix entries not showing up immediately after creation
|
||||
|
|
|
@ -20,9 +20,11 @@ const lightColorScheme = ColorScheme(
|
|||
errorContainer: Color(0xFFFFDAD6),
|
||||
onError: Color(0xFFFFFFFF),
|
||||
onErrorContainer: Color(0xFF410002),
|
||||
background: Color(0xFFFBFDF8),
|
||||
onBackground: Color(0xFF191C19),
|
||||
surface: Color(0xFFFBFDF8),
|
||||
onSurface: Color(0xFF191C19),
|
||||
surfaceContainerHighest: Color(0xFFDCE5DB),
|
||||
surfaceVariant: Color(0xFFDCE5DB),
|
||||
onSurfaceVariant: Color(0xFF414942),
|
||||
outline: Color(0xFF717971),
|
||||
onInverseSurface: Color(0xFFF0F1EC),
|
||||
|
@ -52,9 +54,11 @@ const darkColorScheme = ColorScheme(
|
|||
errorContainer: Color(0xFF93000A),
|
||||
onError: Color(0xFF690005),
|
||||
onErrorContainer: Color(0xFFFFDAD6),
|
||||
background: Color(0xFF191C19),
|
||||
onBackground: Color(0xFFE1E3DE),
|
||||
surface: Color(0xFF191C19),
|
||||
onSurface: Color(0xFFE1E3DE),
|
||||
surfaceContainerHighest: Color(0xFF414942),
|
||||
surfaceVariant: Color(0xFF414942),
|
||||
onSurfaceVariant: Color(0xFFC0C9BF),
|
||||
outline: Color(0xFF8B938A),
|
||||
onInverseSurface: Color(0xFF191C19),
|
||||
|
|
|
@ -71,8 +71,7 @@ class ExpensesLineChart extends StatelessWidget {
|
|||
LineChartData(
|
||||
lineTouchData: LineTouchData(
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
getTooltipColor: (group) =>
|
||||
Theme.of(context).colorScheme.secondaryContainer,
|
||||
tooltipBgColor: Theme.of(context).colorScheme.secondaryContainer,
|
||||
getTooltipItems: (spots) => List<LineTooltipItem>.generate(
|
||||
spots.length,
|
||||
(index) => LineTooltipItem(
|
||||
|
|
|
@ -12,7 +12,7 @@ void showAbout(BuildContext context) {
|
|||
context: context,
|
||||
applicationLegalese: AppLocalizations.of(context).license,
|
||||
applicationName: "Prašule",
|
||||
applicationVersion: "1.1.1",
|
||||
applicationVersion: "1.1.0",
|
||||
applicationIcon: const CircleAvatar(
|
||||
backgroundImage: AssetImage("assets/icon/full_ico.png"),
|
||||
),
|
||||
|
|
|
@ -16,8 +16,7 @@ class CreateSingleEntryView extends StatefulWidget {
|
|||
/// Used when user wants to add new entry
|
||||
const CreateSingleEntryView({
|
||||
required this.w,
|
||||
required this.locale,
|
||||
super.key,
|
||||
required this.locale, super.key,
|
||||
this.editEntry,
|
||||
});
|
||||
|
||||
|
@ -29,7 +28,6 @@ class CreateSingleEntryView extends StatefulWidget {
|
|||
/// Is null unless we are editing an existing entry
|
||||
final WalletSingleEntry? editEntry;
|
||||
|
||||
/// Locale as set on user's system
|
||||
final String locale;
|
||||
|
||||
@override
|
||||
|
@ -38,9 +36,6 @@ class CreateSingleEntryView extends StatefulWidget {
|
|||
|
||||
class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
||||
late WalletSingleEntry newEntry;
|
||||
final _entryNameController = TextEditingController();
|
||||
final _entryBalanceController = TextEditingController();
|
||||
final _entryDescriptionController = TextEditingController();
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
@ -55,9 +50,6 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
category: widget.w.categories.first,
|
||||
);
|
||||
}
|
||||
_entryNameController.text = newEntry.data.name;
|
||||
_entryBalanceController.text = newEntry.data.amount.toString();
|
||||
_entryDescriptionController.text = newEntry.data.description;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
|
@ -79,7 +71,10 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: PlatformField(
|
||||
labelText: AppLocalizations.of(context).name,
|
||||
controller: _entryNameController,
|
||||
controller: TextEditingController(text: newEntry.data.name),
|
||||
onChanged: (v) {
|
||||
newEntry.data.name = v;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -89,7 +84,9 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: PlatformField(
|
||||
labelText: AppLocalizations.of(context).amount,
|
||||
controller: _entryBalanceController,
|
||||
controller: TextEditingController(
|
||||
text: newEntry.data.amount.toString(),
|
||||
),
|
||||
keyboardType:
|
||||
const TextInputType.numberWithOptions(decimal: true),
|
||||
inputFormatters: [
|
||||
|
@ -97,6 +94,9 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
RegExp(r'\d+[\.,]{0,1}\d{0,}'),
|
||||
),
|
||||
],
|
||||
onChanged: (v) {
|
||||
newEntry.data.amount = double.parse(v);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -183,7 +183,12 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
child: PlatformField(
|
||||
keyboardType: TextInputType.multiline,
|
||||
maxLines: null,
|
||||
controller: _entryDescriptionController,
|
||||
controller: TextEditingController(
|
||||
text: newEntry.data.description,
|
||||
),
|
||||
onChanged: (v) {
|
||||
newEntry.data.description = v;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -192,10 +197,10 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
Text(AppLocalizations.of(context).date),
|
||||
PlatformButton(
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
backgroundColor: MaterialStateProperty.all(
|
||||
Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
foregroundColor: WidgetStateProperty.all(
|
||||
foregroundColor: MaterialStateProperty.all(
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
|
@ -219,18 +224,13 @@ class _CreateSingleEntryViewState extends State<CreateSingleEntryView> {
|
|||
PlatformButton(
|
||||
text: AppLocalizations.of(context).save,
|
||||
onPressed: () {
|
||||
if (_entryNameController.text.isEmpty) {
|
||||
if (newEntry.data.name.isEmpty) {
|
||||
showMessage(
|
||||
AppLocalizations.of(context).errorEmptyName,
|
||||
context,
|
||||
);
|
||||
return;
|
||||
}
|
||||
newEntry.data.name = _entryNameController.text;
|
||||
newEntry.data.amount =
|
||||
double.parse(_entryBalanceController.text);
|
||||
newEntry.data.description =
|
||||
_entryDescriptionController.text;
|
||||
if (widget.editEntry != null) {
|
||||
Navigator.of(context).pop(newEntry);
|
||||
return;
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:prasule/api/entry_data.dart';
|
|||
import 'package:prasule/api/recurring_entry.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/platformfield.dart';
|
||||
import 'package:prasule/util/show_message.dart';
|
||||
|
@ -38,10 +39,6 @@ class CreateRecurringEntryView extends StatefulWidget {
|
|||
|
||||
class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
||||
late RecurringWalletEntry newEntry;
|
||||
final _entryNameController = TextEditingController();
|
||||
final _entryBalanceController = TextEditingController();
|
||||
final _entryDescriptionController = TextEditingController();
|
||||
final _repeatAfterController = TextEditingController();
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
@ -58,10 +55,6 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
recurType: RecurType.month,
|
||||
);
|
||||
}
|
||||
_entryNameController.text = newEntry.data.name;
|
||||
_entryBalanceController.text = newEntry.data.amount.toString();
|
||||
_entryDescriptionController.text = newEntry.data.description;
|
||||
_repeatAfterController.text = newEntry.repeatAfter.toString();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
|
@ -83,7 +76,10 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: PlatformField(
|
||||
labelText: AppLocalizations.of(context).name,
|
||||
controller: _entryNameController,
|
||||
controller: TextEditingController(text: newEntry.data.name),
|
||||
onChanged: (v) {
|
||||
newEntry.data.name = v;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -93,7 +89,9 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: PlatformField(
|
||||
labelText: AppLocalizations.of(context).amount,
|
||||
controller: _entryBalanceController,
|
||||
controller: TextEditingController(
|
||||
text: newEntry.data.amount.toString(),
|
||||
),
|
||||
keyboardType:
|
||||
const TextInputType.numberWithOptions(decimal: true),
|
||||
inputFormatters: [
|
||||
|
@ -101,6 +99,10 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
RegExp(r'\d+[\.,]{0,1}\d{0,}'),
|
||||
),
|
||||
],
|
||||
onChanged: (v) {
|
||||
logger.i(v);
|
||||
newEntry.data.amount = double.parse(v);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -187,7 +189,12 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
child: PlatformField(
|
||||
keyboardType: TextInputType.multiline,
|
||||
maxLines: null,
|
||||
controller: _entryDescriptionController,
|
||||
controller: TextEditingController(
|
||||
text: newEntry.data.description,
|
||||
),
|
||||
onChanged: (v) {
|
||||
newEntry.data.description = v;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -208,7 +215,9 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
SizedBox(
|
||||
width: 50,
|
||||
child: PlatformField(
|
||||
controller: _repeatAfterController,
|
||||
controller: TextEditingController(
|
||||
text: newEntry.repeatAfter.toString(),
|
||||
),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
FilteringTextInputFormatter.deny(
|
||||
|
@ -304,20 +313,13 @@ class _CreateRecurringEntryViewState extends State<CreateRecurringEntryView> {
|
|||
PlatformButton(
|
||||
text: AppLocalizations.of(context).save,
|
||||
onPressed: () {
|
||||
if (_entryNameController.text.isEmpty) {
|
||||
if (newEntry.data.name.isEmpty) {
|
||||
showMessage(
|
||||
AppLocalizations.of(context).errorEmptyName,
|
||||
context,
|
||||
);
|
||||
return;
|
||||
}
|
||||
newEntry.data.name = _entryNameController.text;
|
||||
newEntry.data.amount =
|
||||
double.parse(_entryBalanceController.text);
|
||||
newEntry.repeatAfter =
|
||||
int.parse(_repeatAfterController.text);
|
||||
newEntry.data.description =
|
||||
_entryDescriptionController.text;
|
||||
if (widget.editEntry != null) {
|
||||
Navigator.of(context).pop(newEntry);
|
||||
return;
|
||||
|
|
|
@ -97,8 +97,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
super.initState();
|
||||
loadWallet();
|
||||
SharedPreferences.getInstance().then((s) {
|
||||
chartType = s.getInt("yearlygraph") ?? 1;
|
||||
logger.d(chartType);
|
||||
chartType = s.getInt("monthlygraph") ?? 2;
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
@ -198,9 +197,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
title: DropdownButton<int>(
|
||||
value: (selectedWallet == null)
|
||||
? -1
|
||||
: wallets.indexOf(
|
||||
wallets.where((w) => w.name == selectedWallet!.name).first,
|
||||
),
|
||||
: wallets.indexOf(selectedWallet!),
|
||||
items: [
|
||||
...wallets.map(
|
||||
(e) => DropdownMenuItem(
|
||||
|
@ -336,7 +333,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
: Theme.of(context).colorScheme.background,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
|
@ -430,7 +427,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
: Theme.of(context).colorScheme.background,
|
||||
),
|
||||
width: MediaQuery.of(context).size.width * 0.95,
|
||||
height: MediaQuery.of(context).size.height * 0.4,
|
||||
|
@ -560,7 +557,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
: Theme.of(context).colorScheme.background,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
|
@ -653,7 +650,7 @@ class _GraphViewState extends State<GraphView> {
|
|||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.secondaryContainer
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
: Theme.of(context).colorScheme.background,
|
||||
),
|
||||
width: MediaQuery.of(context).size.width * 0.95,
|
||||
height: MediaQuery.of(context).size.height * 0.4,
|
||||
|
|
|
@ -166,11 +166,7 @@ class _HomeViewState extends State<HomeView> {
|
|||
secondChild: DropdownButton<int>(
|
||||
value: (selectedWallet == null)
|
||||
? -1
|
||||
: wallets.indexOf(
|
||||
wallets
|
||||
.where((w) => w.name == selectedWallet!.name)
|
||||
.first,
|
||||
),
|
||||
: wallets.indexOf(selectedWallet!),
|
||||
items: [
|
||||
...wallets.map(
|
||||
(e) => DropdownMenuItem(
|
||||
|
@ -359,7 +355,7 @@ class _HomeViewState extends State<HomeView> {
|
|||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface,
|
||||
.onBackground,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
|
@ -409,7 +405,7 @@ class _HomeViewState extends State<HomeView> {
|
|||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface,
|
||||
.onBackground,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -594,7 +590,7 @@ class _HomeViewState extends State<HomeView> {
|
|||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surface
|
||||
.background
|
||||
.calculateTextColor(),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -63,11 +63,8 @@ class _RecurringEntriesViewState extends State<RecurringEntriesView> {
|
|||
drawer: makeDrawer(context, 3),
|
||||
appBar: AppBar(
|
||||
title: DropdownButton<int>(
|
||||
value: (selectedWallet == null)
|
||||
? -1
|
||||
: wallets.indexOf(
|
||||
wallets.where((w) => w.name == selectedWallet!.name).first,
|
||||
),
|
||||
value:
|
||||
(selectedWallet == null) ? -1 : wallets.indexOf(selectedWallet!),
|
||||
items: [
|
||||
...wallets.map(
|
||||
(e) => DropdownMenuItem(
|
||||
|
|
|
@ -37,7 +37,7 @@ class _GraphTypeSettingsViewState extends State<GraphTypeSettingsView> {
|
|||
body: SettingsList(
|
||||
applicationType: ApplicationType.both,
|
||||
darkTheme: SettingsThemeData(
|
||||
settingsListBackground: Theme.of(context).colorScheme.surface,
|
||||
settingsListBackground: Theme.of(context).colorScheme.background,
|
||||
titleTextColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
sections: [
|
||||
|
|
|
@ -42,7 +42,7 @@ class _SettingsViewState extends State<SettingsView> {
|
|||
body: SettingsList(
|
||||
applicationType: ApplicationType.both,
|
||||
darkTheme: SettingsThemeData(
|
||||
settingsListBackground: Theme.of(context).colorScheme.surface,
|
||||
settingsListBackground: Theme.of(context).colorScheme.background,
|
||||
titleTextColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
sections: [
|
||||
|
|
|
@ -277,10 +277,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: fl_chart
|
||||
sha256: "2b7c1f5d867da9a054661641c8f499c55c47c39acccb97b3bc673f5fa9a39e74"
|
||||
sha256: "00b74ae680df6b1135bdbea00a7d1fc072a9180b7c3f3702e4b19a9943f5ed7d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.67.0"
|
||||
version: "0.66.2"
|
||||
flex_color_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: prasule
|
||||
description: Open-source private expense tracker
|
||||
|
||||
version: 1.1.1+8
|
||||
version: 1.1.0+7
|
||||
|
||||
environment:
|
||||
sdk: '>=3.1.0-262.2.beta <4.0.0'
|
||||
|
@ -18,12 +18,12 @@ dependencies:
|
|||
currency_picker: ^2.0.16
|
||||
dio: ^5.3.0
|
||||
dynamic_color: ^1.6.6
|
||||
fl_chart: ^0.67.0
|
||||
fl_chart: ^0.66.0
|
||||
flex_color_picker: ^3.3.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_file_dialog: ^3.0.2
|
||||
flutter_iconpicker: <3.4.6
|
||||
flutter_iconpicker: <3.4.5
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
flutter_slidable: ^3.0.0
|
||||
|
|
Loading…
Reference in a new issue