ChecklistEditor: Make the Add Item more tappable

I would often tap on it and nothing would happen.
This commit is contained in:
Vishesh Handa
2020-05-08 10:15:36 +02:00
parent 62b5761ec4
commit 533d837b05
2 changed files with 11 additions and 5 deletions

View File

@ -20,3 +20,6 @@ settings:
usageStats: Collect Anonymous Usage Statistics usageStats: Collect Anonymous Usage Statistics
debug: Debug App debug: Debug App
debugLog: Look under the hood debugLog: Look under the hood
editors:
checklist:
add: Add Item

View File

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gitjournal/core/checklist.dart'; import 'package:gitjournal/core/checklist.dart';
@ -379,7 +380,7 @@ class AddItemButton extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
var style = Theme.of(context).textTheme.subhead; var style = Theme.of(context).textTheme.subhead;
return ListTile( var tile = ListTile(
dense: true, dense: true,
leading: Row( leading: Row(
children: <Widget>[ children: <Widget>[
@ -397,10 +398,12 @@ class AddItemButton extends StatelessWidget {
], ],
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
), ),
title: GestureDetector( title: Text(tr("editors.checklist.add"), style: style),
);
return GestureDetector(
onTap: onPressed, onTap: onPressed,
child: Text("Add Item", style: style), child: tile,
),
); );
} }
} }