login.dart 4.0 KB

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