Team Page
Loading preview
Starting the Flutter app
A showcase of Flutter's team page functionality
import 'package:flutter/material.dart';
const _team = [
{'name': 'Jane Doe', 'role': 'CEO'},
{'name': 'John Smith', 'role': 'CTO'},
{'name': 'Sarah Lee', 'role': 'Design Lead'},
];
class TeamPage extends StatelessWidget {
const TeamPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Our Team')),
body: ListView.builder(
padding: const EdgeInsets.all(16),
itemCount: _team.length,
itemBuilder: (context, i) {
final t = _team[i];
return Card(
margin: const EdgeInsets.only(bottom: 12),
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.primaries[i % Colors.primaries.length].withValues(alpha: 0.3),
child: Text((t['name'] as String)[0]),
),
title: Text(t['name'] as String),
subtitle: Text(t['role'] as String),
trailing: const Icon(Icons.chevron_right),
onTap: () => _showDemo(context, 'Open ${t['name']} (demo)'),
),
);
},
),
);
}
}
void _showDemo(BuildContext context, String message) {
ScaffoldMessenger.of(context)
..hideCurrentSnackBar()
..showSnackBar(SnackBar(content: Text(message)));
}
Add it to your project
Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.
First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.
How it works
ListView.builder maps the const _team list to Cards with a ListTile. Avatars are generated: the first letter of the name on a tint from Colors.primaries, indexed with a modulo so teams larger than the palette wrap around. Tapping a row shows a demo SnackBar.
Adapting it
- Load the team from your CMS or API instead of the const list.
- Replace
_teamwith a typed model that carries a photo URL, and pass it asbackgroundImageonCircleAvatar. - Use
onTapto push a bio page, or remove it along with the chevron.