1.0.0 release #31

Merged
hernik merged 31 commits from dev into main 2024-02-10 16:27:33 +01:00
2 changed files with 47 additions and 47 deletions
Showing only changes of commit 771f7a3555 - Show all commits

View file

@ -120,6 +120,27 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
AppLocalizations.of(context).setupCategoriesEditHint, AppLocalizations.of(context).setupCategoriesEditHint,
textAlign: TextAlign.center, 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( SizedBox(
height: MediaQuery.of(context).size.height * 0.64, height: MediaQuery.of(context).size.height * 0.64,
child: ListView.builder( child: ListView.builder(
@ -260,27 +281,6 @@ class _EditCategoriesViewState extends State<EditCategoriesView> {
itemCount: selectedWallet!.categories.length, 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

@ -303,6 +303,32 @@ class _SetupViewState extends State<SetupView> {
AppLocalizations.of(context).setupCategoriesEditHint, AppLocalizations.of(context).setupCategoriesEditHint,
textAlign: TextAlign.center, 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( SizedBox(
height: MediaQuery.of(context).size.height * 0.64, height: MediaQuery.of(context).size.height * 0.64,
child: ListView.builder( child: ListView.builder(
@ -439,32 +465,6 @@ class _SetupViewState extends State<SetupView> {
itemCount: categories.length, 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),
),
], ],
), ),
), ),