ModernMemoires/lib/views/about_page/widgets/team_widget.dart

53 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
class TeamWidget extends StatelessWidget {
final String imageUrl;
final String title;
final String subtitle;
TeamWidget({
Key? key,
required this.imageUrl,
required this.title,
required this.subtitle,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.fromLTRB(0, 20, 0, 20), // Padding around the entire container
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.network(
imageUrl,
width: 50, // Set your desired image width
height: 50, // Set your desired image height
),
const SizedBox(width: 20), // Space between the image and the text
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
title,
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
Text(
subtitle,
style: const TextStyle(
color: Colors.grey,
),
maxLines: 2, // Limit to two lines
overflow: TextOverflow.ellipsis, // Add ellipsis for overflow text
),
],
),
],
),
);
}
}