Can clear cost value quickly
This commit is contained in:
		@@ -40,6 +40,11 @@ class ExpenseEditor extends HookConsumerWidget {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    final (:pending, :snapshot, :hasError) = useAsyncTask();
 | 
					    final (:pending, :snapshot, :hasError) = useAsyncTask();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Clear cost value
 | 
				
			||||||
 | 
					    handleClearCost() {
 | 
				
			||||||
 | 
					      costController.text = "";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Pick a new date
 | 
					    // Pick a new date
 | 
				
			||||||
    handlePickDate() async {
 | 
					    handlePickDate() async {
 | 
				
			||||||
      final date = await showDatePicker(
 | 
					      final date = await showDatePicker(
 | 
				
			||||||
@@ -137,7 +142,13 @@ class ExpenseEditor extends HookConsumerWidget {
 | 
				
			|||||||
              decimal: true,
 | 
					              decimal: true,
 | 
				
			||||||
              signed: false,
 | 
					              signed: false,
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
            decoration: const InputDecoration(labelText: 'Cost'),
 | 
					            decoration: InputDecoration(
 | 
				
			||||||
 | 
					              labelText: 'Cost',
 | 
				
			||||||
 | 
					              suffixIcon: IconButton(
 | 
				
			||||||
 | 
					                onPressed: handleClearCost,
 | 
				
			||||||
 | 
					                icon: const Icon(Icons.clear),
 | 
				
			||||||
 | 
					              ),
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
            textInputAction: TextInputAction.done,
 | 
					            textInputAction: TextInputAction.done,
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user