listmember.dart 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import 'package:flutter/material.dart';
  2. import 'package:namer_app/data/datamember.dart';
  3. import 'package:namer_app/footer.dart';
  4. import 'package:namer_app/header.dart';
  5. class ListMemberPage extends StatelessWidget {
  6. const ListMemberPage({super.key});
  7. @override
  8. Widget build(BuildContext context) {
  9. return Scaffold(
  10. appBar: CustomAppbar(),
  11. body: Stack(children: [
  12. SingleChildScrollView(
  13. child: Column(
  14. children: [
  15. Center(
  16. child: Row(
  17. mainAxisAlignment: MainAxisAlignment.center,
  18. children: [
  19. Text(
  20. 'LIST MEMBER',
  21. style: TextStyle(color: Colors.black, fontSize: 48),
  22. ),
  23. ],
  24. )),
  25. Column(
  26. children: List.generate(
  27. 2,
  28. (i) => SizedBox(
  29. child: ListTile(
  30. leading: SizedBox(
  31. child: Icon(Icons.group_work),
  32. ),
  33. title: Text(members[i]['project']),
  34. subtitle: Column(
  35. crossAxisAlignment: CrossAxisAlignment.start,
  36. children: [
  37. Row(
  38. children: [
  39. Text(members[i]['member1']),
  40. Expanded(child: Container()),
  41. Text(members[i]['role1'])
  42. ],
  43. ),
  44. Row(
  45. children: [
  46. Text(members[i]['member2']),
  47. Expanded(child: Container()),
  48. Text(members[i]['role2'])
  49. ],
  50. )
  51. ],
  52. ),
  53. trailing: ButtonUser(
  54. items: members[i],
  55. ),
  56. ),
  57. )),
  58. ),
  59. ],
  60. ),
  61. ),
  62. ]),
  63. bottomNavigationBar: Footer(),
  64. );
  65. }
  66. }
  67. class ButtonUser extends StatelessWidget {
  68. final Map<String, dynamic> items;
  69. ButtonUser({
  70. required this.items,
  71. super.key,
  72. });
  73. //todo delete
  74. //todo tombol item
  75. @override
  76. Widget build(BuildContext context) {
  77. return Row(
  78. // crossAxisAlignment: CrossAxisAlignment.center,
  79. mainAxisSize: MainAxisSize.min,
  80. children: [
  81. ElevatedButton(
  82. onPressed: null,
  83. style: ElevatedButton.styleFrom(
  84. backgroundColor: Colors.black,
  85. ),
  86. child: Text(
  87. 'Edit',
  88. style: TextStyle(color: Colors.white),
  89. ),
  90. ),
  91. ElevatedButton(
  92. onPressed: null,
  93. style: ElevatedButton.styleFrom(
  94. backgroundColor: Colors.black,
  95. ),
  96. child: Text(
  97. 'Delete',
  98. style: TextStyle(color: Colors.white),
  99. ),
  100. ),
  101. ],
  102. );
  103. }
  104. }