From 533d837b05f386a44c8275511ae018fd0f32c74e Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 8 May 2020 10:15:36 +0200 Subject: [PATCH] ChecklistEditor: Make the Add Item more tappable I would often tap on it and nothing would happen. --- assets/langs/en.yaml | 3 +++ lib/editors/checklist_editor.dart | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/assets/langs/en.yaml b/assets/langs/en.yaml index fa973864..0c97f04d 100644 --- a/assets/langs/en.yaml +++ b/assets/langs/en.yaml @@ -20,3 +20,6 @@ settings: usageStats: Collect Anonymous Usage Statistics debug: Debug App debugLog: Look under the hood +editors: + checklist: + add: Add Item diff --git a/lib/editors/checklist_editor.dart b/lib/editors/checklist_editor.dart index 3e2343fa..40fe62df 100644 --- a/lib/editors/checklist_editor.dart +++ b/lib/editors/checklist_editor.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:io'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:gitjournal/core/checklist.dart'; @@ -379,7 +380,7 @@ class AddItemButton extends StatelessWidget { Widget build(BuildContext context) { var style = Theme.of(context).textTheme.subhead; - return ListTile( + var tile = ListTile( dense: true, leading: Row( children: [ @@ -397,10 +398,12 @@ class AddItemButton extends StatelessWidget { ], mainAxisSize: MainAxisSize.min, ), - title: GestureDetector( - onTap: onPressed, - child: Text("Add Item", style: style), - ), + title: Text(tr("editors.checklist.add"), style: style), + ); + + return GestureDetector( + onTap: onPressed, + child: tile, ); } }