123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- import 'package:flutter/material.dart';
- import 'package:namer_app/data/datamember.dart';
- import 'package:namer_app/footer.dart';
- import 'package:namer_app/header.dart';
- class ListMemberPage extends StatelessWidget {
- const ListMemberPage({super.key});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: CustomAppbar(),
- body: Stack(children: [
- SingleChildScrollView(
- child: Column(
- children: [
- Center(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Text(
- 'LIST MEMBER',
- style: TextStyle(color: Colors.black, fontSize: 48),
- ),
- ],
- )),
- Column(
- children: List.generate(
- 2,
- (i) => SizedBox(
- child: ListTile(
- leading: SizedBox(
- child: Icon(Icons.group_work),
- ),
- title: Text(members[i]['project']),
- subtitle: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Text(members[i]['member1']),
- Expanded(child: Container()),
- Text(members[i]['role1'])
- ],
- ),
- Row(
- children: [
- Text(members[i]['member2']),
- Expanded(child: Container()),
- Text(members[i]['role2'])
- ],
- )
- ],
- ),
- trailing: ButtonUser(
- items: members[i],
- ),
- ),
- )),
- ),
- ],
- ),
- ),
- ]),
- bottomNavigationBar: Footer(),
- );
- }
- }
- class ButtonUser extends StatelessWidget {
- final Map<String, dynamic> items;
- ButtonUser({
- required this.items,
- super.key,
- });
- //todo delete
- //todo tombol item
- @override
- Widget build(BuildContext context) {
- return Row(
- // crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisSize: MainAxisSize.min,
- children: [
- ElevatedButton(
- onPressed: null,
- style: ElevatedButton.styleFrom(
- backgroundColor: Colors.black,
- ),
- child: Text(
- 'Edit',
- style: TextStyle(color: Colors.white),
- ),
- ),
- ElevatedButton(
- onPressed: null,
- style: ElevatedButton.styleFrom(
- backgroundColor: Colors.black,
- ),
- child: Text(
- 'Delete',
- style: TextStyle(color: Colors.white),
- ),
- ),
- ],
- );
- }
- }
|