addproject.dart 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import 'package:flutter/material.dart';
  2. import 'package:namer_app/footer.dart';
  3. import 'package:namer_app/header.dart';
  4. import 'package:namer_app/service/addproj_serv.dart';
  5. class AddProjectPage extends StatelessWidget {
  6. const AddProjectPage({super.key});
  7. @override
  8. Widget build(BuildContext context) {
  9. var projname = TextEditingController();
  10. var projdesc = TextEditingController();
  11. return Scaffold(
  12. appBar: CustomAppbar(),
  13. backgroundColor: Colors.white,
  14. body: Column(
  15. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  16. children: [
  17. Center(
  18. child: Row(
  19. mainAxisAlignment: MainAxisAlignment.center,
  20. children: [
  21. Text(
  22. 'ADD PROJECT',
  23. style: TextStyle(color: Colors.black, fontSize: 48),
  24. ),
  25. ],
  26. )),
  27. Column(
  28. children: [
  29. Padding(
  30. padding: const EdgeInsets.all(8.0),
  31. child: SizedBox(
  32. width: 396,
  33. child: TextField(
  34. decoration: InputDecoration(
  35. border: OutlineInputBorder(),
  36. focusedBorder: OutlineInputBorder(
  37. borderRadius: BorderRadius.all(Radius.circular(12)),
  38. borderSide: BorderSide(color: Colors.black)),
  39. enabledBorder: OutlineInputBorder(
  40. borderRadius: BorderRadius.all(Radius.circular(12)),
  41. borderSide: BorderSide(color: Colors.black)),
  42. labelText: 'Enter Project Name', //todo get data
  43. labelStyle: TextStyle(color: Colors.black),
  44. filled: true,
  45. fillColor: Colors.white.withOpacity(0.25)),
  46. cursorColor: Colors.black,
  47. style: TextStyle(color: Colors.black),
  48. controller: projname,
  49. ),
  50. ),
  51. ),
  52. Padding(
  53. padding: const EdgeInsets.all(8.0),
  54. child: SizedBox(
  55. width: 396,
  56. child: TextField(
  57. decoration: InputDecoration(
  58. border: OutlineInputBorder(),
  59. focusedBorder: OutlineInputBorder(
  60. borderRadius: BorderRadius.all(Radius.circular(12)),
  61. borderSide: BorderSide(color: Colors.black)),
  62. enabledBorder: OutlineInputBorder(
  63. borderRadius: BorderRadius.all(Radius.circular(12)),
  64. borderSide: BorderSide(color: Colors.black)),
  65. labelText: 'Enter Project Description', //todo get data
  66. labelStyle: TextStyle(color: Colors.black),
  67. filled: true,
  68. fillColor: Colors.white.withOpacity(0.25)),
  69. cursorColor: Colors.black,
  70. style: TextStyle(color: Colors.black),
  71. controller: projdesc,
  72. ),
  73. ),
  74. ),
  75. Padding(
  76. padding: const EdgeInsets.all(20.0),
  77. child: SizedBox(
  78. width: 396,
  79. height: 61,
  80. child: ElevatedButton(
  81. onPressed: () => addproject(context, projname.text, projdesc.text),
  82. style: ElevatedButton.styleFrom(
  83. backgroundColor: Colors.black, //todo putih lage
  84. side: BorderSide(color: Colors.white),
  85. shape: RoundedRectangleBorder(
  86. borderRadius: BorderRadius.circular(12.0),
  87. ),
  88. ),
  89. child: Text(
  90. 'Save',
  91. style: TextStyle(color: Colors.white),
  92. ),
  93. ),
  94. ),
  95. ),
  96. ],
  97. ),
  98. ],
  99. ),
  100. bottomNavigationBar: Footer(),
  101. );
  102. }
  103. }