editable label & color
This commit is contained in:
@@ -15,13 +15,13 @@ class TransactionForm extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_TransactionDateInput(),
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(height: 35,),
|
||||
_TransactionCategoryInput(),
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(height: 35,),
|
||||
_TransactionDescriptionInput(),
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(height: 35,),
|
||||
_TransactionAccountInput(),
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(height: 35,),
|
||||
_TransactionValueInput()
|
||||
],
|
||||
);
|
||||
@@ -53,7 +53,7 @@ class _TransactionDateInput extends StatelessWidget {
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
icon: const Icon(Icons.calendar_month),
|
||||
hintText: 'Date',
|
||||
label: const Text('Date'),
|
||||
errorText: state.transactionDate.isNotValid ? state.transactionDate.error?.message : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@@ -79,7 +79,7 @@ class _TransactionCategoryInput extends StatelessWidget {
|
||||
items: categoryState.categories.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
||||
decoration: InputDecoration(
|
||||
icon: const Icon(Icons.category),
|
||||
hintText: 'Category',
|
||||
label: const Text('Category'),
|
||||
errorText: state.transactionCategory.isNotValid ? state.transactionCategory.error?.message : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@@ -101,7 +101,7 @@ class _TransactionDescriptionInput extends StatelessWidget {
|
||||
child: TextFormField(
|
||||
decoration: InputDecoration(
|
||||
icon: const Icon(Icons.description),
|
||||
hintText: 'Description',
|
||||
label: const Text('Description'),
|
||||
errorText: state.transactionDescription.isNotValid ? state.transactionDescription.error?.message : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@@ -129,7 +129,7 @@ class _TransactionAccountInput extends StatelessWidget {
|
||||
items: accountState.accounts.map((e) => DropdownMenuItem(value: e.label, child: Text(e.label))).toList(),
|
||||
decoration: InputDecoration(
|
||||
icon: const Icon(Icons.account_box),
|
||||
hintText: 'Account',
|
||||
label: const Text('Account'),
|
||||
errorText: state.transactionAccount.isNotValid ? state.transactionAccount.error?.message : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
@@ -152,7 +152,7 @@ class _TransactionValueInput extends StatelessWidget {
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
icon: const Icon(Icons.euro),
|
||||
hintText: '\$\$\$',
|
||||
label: const Text('\$\$\$'),
|
||||
errorText: state.transactionValue.isNotValid ? state.transactionValue.error?.message : null,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
|
||||
Reference in New Issue
Block a user