mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
27 lines
674 B
Dart
27 lines
674 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SpacedListTile extends StatelessWidget {
|
|
final Widget title;
|
|
final Widget? content;
|
|
final Function()? onTap;
|
|
const SpacedListTile({required this.title, this.content, this.onTap, super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
title: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Flexible(flex: 1, child: title),
|
|
if (content != null)
|
|
Flexible(
|
|
flex: 1,
|
|
child: content!,
|
|
),
|
|
],
|
|
),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|