login.dart 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. enabledBorder: OutlineInputBorder(
  75. borderSide: BorderSide(color: Color(0xffFFFFFF))),
  76. labelText: 'Nama Pengguna',
  77. labelStyle: TextStyle(color: Color(0xffFFFFFF)),
  78. filled: true,
  79. fillColor: Colors.white.withOpacity(0.25)),
  80. style: TextStyle(color: Color(0xffFFFFFF)),
  81. ),
  82. ),
  83. ),
  84. SizedBox(
  85. width: 396,
  86. height: 51,
  87. child: TextField(
  88. obscureText: true,
  89. decoration: InputDecoration(
  90. border: OutlineInputBorder(),
  91. enabledBorder: OutlineInputBorder(
  92. borderSide: BorderSide(color: Color(0xffFFFFFF))),
  93. labelText: 'Kata Sandi',
  94. labelStyle: TextStyle(color: Color(0xffFFFFFF)),
  95. filled: true,
  96. fillColor: Colors.white.withOpacity(0.25)),
  97. style: TextStyle(color: Color(0xffFFFFFF)),
  98. ),
  99. ),
  100. Padding(
  101. padding: const EdgeInsets.all(20.0),
  102. child: SizedBox(
  103. width: 396,
  104. height: 61,
  105. child: ElevatedButton(
  106. onPressed: () => context.go('/list'),
  107. style: ElevatedButton.styleFrom(
  108. backgroundColor: Color(0xff078C84).withOpacity(0.76),
  109. side: BorderSide(color: Colors.white),
  110. shape: RoundedRectangleBorder(
  111. borderRadius: BorderRadius.circular(12.0),
  112. ),
  113. ),
  114. // style: ButtonStyle(
  115. // backgroundColor:
  116. // MaterialStateProperty.all(Color(0xff078C84)),
  117. // foregroundColor:
  118. // MaterialStateProperty.all<Color>(Colors.black),
  119. // shape:
  120. // MaterialStateProperty.all<RoundedRectangleBorder>(
  121. // RoundedRectangleBorder(
  122. // borderRadius: BorderRadius.circular(10),
  123. // ))),
  124. child: Text(
  125. 'Masuk',
  126. style: TextStyle(color: Colors.white),
  127. ),
  128. ),
  129. ),
  130. ),
  131. Text(
  132. 'Frisian Flag Indonesia, Tbk.',
  133. style: TextStyle(color: Colors.white),
  134. ),
  135. ],
  136. )),
  137. Padding(
  138. padding: const EdgeInsets.all(8.0),
  139. child: Column(
  140. children: [
  141. Text('Kebijakan Privasi',
  142. style: TextStyle(
  143. fontSize: 16,
  144. decoration: TextDecoration.underline,
  145. fontWeight: FontWeight.w400,
  146. color: Colors.white)),
  147. Text('Versi 4.0.0.0',
  148. style: TextStyle(
  149. fontSize: 16,
  150. fontWeight: FontWeight.w400,
  151. color: Colors.white,
  152. ))
  153. ],
  154. ),
  155. ),
  156. // Container(
  157. // color: Theme.of(context).colorScheme.primaryContainer,
  158. // )
  159. ],
  160. ),
  161. ),
  162. );
  163. }
  164. }