52 lines
1.4 KiB
Dart
52 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'avatar_badge.dart';
|
|
import '../models/task.dart';
|
|
|
|
class TaskRow extends StatelessWidget {
|
|
final Task task;
|
|
final int number;
|
|
|
|
const TaskRow({super.key, required this.task, required this.number});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 51,
|
|
color: number.isOdd ? const Color(0xFF0F1117) : const Color(0xFF131720),
|
|
padding: const EdgeInsets.fromLTRB(22, 0, 20, 1),
|
|
child: Row(
|
|
spacing: 12,
|
|
children: [
|
|
SizedBox(width: 28, child: Text(number.toString().padLeft(2, '0'))),
|
|
SizedBox(width: 240, child: Text(task.title)),
|
|
SizedBox(width: 200, child: Text(task.status.name)), // TODO: badge
|
|
Expanded(
|
|
child: Text(
|
|
task.description,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 11,
|
|
height: 17 / 11,
|
|
color: Color(0xFF64748B),
|
|
),
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 36,
|
|
child: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: AvatarBadge(
|
|
initials: task.initials,
|
|
color: Color(0xFFE040FB),
|
|
size: 26,
|
|
),
|
|
),
|
|
),
|
|
SizedBox(width: 32, height: 26), // column 6, empty
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|