blob: 4f8ebd4a371de59daa12a1551748be8d0d41734b [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
/// The data representing a single Todo.
class TodoItem {
final String _title;
/// Main constructor.
/// The widget representing a single Todo.
class TodoItemWidget extends StatelessWidget {
final TodoItem _todoItem;
/// Main constructor.
const TodoItemWidget(this._todoItem);
void _handleDeleteButtonBeingPressed() {}
Widget build(BuildContext context) {
TextField title = TextField(
decoration: InputDecoration(
hintText: _todoItem._title,
RaisedButton deleteButton = RaisedButton(
child: Text('Delete'),
onPressed: _handleDeleteButtonBeingPressed);
List<Widget> children = <Widget>[Flexible(child: title), deleteButton];
return Row(children: children);