listmember.dart 3.4 KB

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