login.dart 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. import 'package:flutter/material.dart';
  2. import 'package:go_router/go_router.dart';
  3. import 'package:namer_app/lang.dart';
  4. class LoginPage extends StatelessWidget {
  5. const LoginPage({Key? key}) : super(key: key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Scaffold(
  9. backgroundColor: Theme.of(context).colorScheme.primaryContainer,
  10. body: Container(
  11. decoration: BoxDecoration(
  12. gradient: LinearGradient(
  13. begin: Alignment.topCenter,
  14. end: Alignment.bottomCenter,
  15. colors: [
  16. Color(0xffD9D9D9),
  17. Color(0xff0F968E),
  18. Color(0xff000000)
  19. ]),
  20. image: DecorationImage(
  21. image: AssetImage("assets/images/building.jpg"),
  22. fit: BoxFit.cover,
  23. )),
  24. child: Column(
  25. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  26. children: [
  27. Row(
  28. children: [
  29. BackButton(color: Colors.white),
  30. Column(
  31. crossAxisAlignment: CrossAxisAlignment.start,
  32. children: [
  33. Text(
  34. 'Kembali',
  35. style: TextStyle(color: Colors.white),
  36. ),
  37. Text(
  38. 'pindai QR',
  39. style: TextStyle(color: Colors.white),
  40. ),
  41. ],
  42. ),
  43. Expanded(child: Container()),
  44. Lang(),
  45. ],
  46. ),
  47. Expanded(
  48. child: Center(
  49. child: Row(
  50. mainAxisAlignment: MainAxisAlignment.center,
  51. children: [
  52. Text(
  53. 'tel',
  54. style: TextStyle(color: Color(0xffFF6600), fontSize: 48),
  55. ),
  56. Text(
  57. 'now',
  58. style: TextStyle(color: Color(0xffFFFFFF), fontSize: 48),
  59. ),
  60. ],
  61. )),
  62. ),
  63. Expanded(
  64. child: Column(
  65. children: [
  66. Padding(
  67. padding: const EdgeInsets.all(8.0),
  68. child: SizedBox(
  69. width: 396,
  70. height: 51,
  71. child: TextField(
  72. decoration: InputDecoration(
  73. border: OutlineInputBorder(),
  74. focusedBorder: OutlineInputBorder(
  75. borderSide: BorderSide(color: Colors.white)),
  76. enabledBorder: OutlineInputBorder(
  77. borderSide: BorderSide(color: Colors.white)),
  78. labelText: 'Nama Pengguna',
  79. labelStyle: TextStyle(color: Colors.white),
  80. filled: true,
  81. fillColor: Colors.white.withOpacity(0.25)),
  82. cursorColor: Colors.white,
  83. style: TextStyle(color: Colors.white),
  84. ),
  85. ),
  86. ),
  87. SizedBox(
  88. width: 396,
  89. height: 51,
  90. child: TextField(
  91. obscureText: true,
  92. decoration: InputDecoration(
  93. border: OutlineInputBorder(),
  94. focusedBorder: OutlineInputBorder(
  95. borderSide: BorderSide(color: Colors.white)),
  96. enabledBorder: OutlineInputBorder(
  97. borderSide: BorderSide(color: Colors.white)),
  98. labelText: 'Kata Sandi',
  99. labelStyle: TextStyle(color: Colors.white),
  100. filled: true,
  101. fillColor: Colors.white.withOpacity(0.25)),
  102. cursorColor: Colors.white,
  103. style: TextStyle(color: Colors.white),
  104. ),
  105. ),
  106. Padding(
  107. padding: const EdgeInsets.all(20.0),
  108. child: SizedBox(
  109. width: 396,
  110. height: 61,
  111. child: ElevatedButton(
  112. onPressed: () => context.go('/list'),
  113. style: ElevatedButton.styleFrom(
  114. backgroundColor: Color(0xff078C84).withOpacity(0.76),
  115. side: BorderSide(color: Colors.white),
  116. shape: RoundedRectangleBorder(
  117. borderRadius: BorderRadius.circular(12.0),
  118. ),
  119. ),
  120. child: Text(
  121. 'Masuk',
  122. style: TextStyle(color: Colors.white),
  123. ),
  124. ),
  125. ),
  126. ),
  127. Text(
  128. 'Frisian Flag Indonesia, Tbk.',
  129. style: TextStyle(color: Colors.white),
  130. ),
  131. ],
  132. )),
  133. Padding(
  134. padding: const EdgeInsets.all(8.0),
  135. child: Column(
  136. children: [
  137. Text('Kebijakan Privasi',
  138. style: TextStyle(
  139. fontSize: 16,
  140. decoration: TextDecoration.underline,
  141. fontWeight: FontWeight.w400,
  142. color: Colors.white,
  143. decorationColor: Colors.white)),
  144. Text('Versi 4.0.0.0',
  145. style: TextStyle(
  146. fontSize: 16,
  147. fontWeight: FontWeight.w400,
  148. color: Colors.white,
  149. ))
  150. ],
  151. ),
  152. ),
  153. ],
  154. ),
  155. ),
  156. );
  157. }
  158. }