Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HabitTileMoreDetailsCard extends StatelessWidget {
- final Habit habit;
- const HabitTileMoreDetailsCard({
- super.key,
- required this.habit,
- });
- @override
- Widget build(BuildContext context) {
- String tempText =
- "Lorem ipsum dolor sit amet consectetur. Lectus netus urna sem egestas. Venenatis feugiat feugiat vitae lobortis eu eget integer vulputate.";
- return Center(
- child: Container(
- margin: const EdgeInsets.all(16),
- padding: const EdgeInsets.all(16),
- //constraints: BoxConstraints.tight(const Size.square(400)),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(16),
- color: habitColorMap[habit.category]),
- child: Row(
- children: [
- Flexible(
- flex: 1,
- child: Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(16),
- image: DecorationImage(
- image: AssetImage(
- habitImagePathMap[habit.category]!,
- ),
- fit: BoxFit.cover,
- ),
- ),
- ),
- ),
- const SizedBox(
- width: 12,
- ),
- Flexible(
- flex: 2,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- const Text("Mental health"),
- Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- IconButton(
- onPressed: () {},
- icon: const Icon(Icons.edit_rounded),
- ),
- IconButton(
- onPressed: () {},
- icon: const Icon(Icons.delete_rounded),
- ),
- ],
- )
- ],
- ),
- const SizedBox(
- height: 4,
- ),
- Text(habit.name),
- const SizedBox(
- height: 12,
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: habit.itemDataKeyString.map((itemDataKeyString) {
- MyItem itemData =
- matchKeyStringsToItem(itemDataKeyString);
- MyLabel newLabel = MyLabel(
- item: itemData,
- );
- return Padding(
- padding: const EdgeInsets.only(right: 8),
- child: newLabel,
- );
- }).toList(),
- ),
- const SizedBox(
- height: 12,
- ),
- const Text("More Detail:"),
- const SizedBox(
- height: 4,
- ),
- Text(tempText),
- ],
- ),
- )
- ],
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement