123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import 'package:flutter/material.dart';
- import 'package:go_router/go_router.dart';
- class LoginPage extends StatelessWidget {
- const LoginPage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Theme.of(context).colorScheme.primaryContainer,
- body: Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Lang(),
- Expanded(
- child: Center(
- child: Text(
- 'TelNow',
- style: TextStyle(color: Colors.orange, fontSize: 48),
- )),
- ),
- Expanded(
- child: Column(
- children: [
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: TextField(
- decoration: InputDecoration(
- border: OutlineInputBorder(),
- labelText: 'Nama Pengguna',
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: TextField(
- obscureText: true,
- decoration: InputDecoration(
- border: OutlineInputBorder(),
- labelText: 'Kata Sandi',
- ),
- ),
- ),
- Container(),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: ElevatedButton(
- onPressed: () => context.go('/list'), child: Text('Masuk')),
- )
- ],
- )),
- Text('Kebijakan Privasi'),
- Text('Versi 4.0.0.0'),
- Container(
- color: Theme.of(context).colorScheme.primaryContainer,
- )
- ],
- ),
- );
- }
- }
- class Lang extends StatefulWidget {
- const Lang({
- Key? key,
- }) : super(key: key);
- @override
- State<Lang> createState() => _LangState();
- }
- class _LangState extends State<Lang> {
- var selectedIndex = 0;
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(8.0),
- child: Row(
- children: [
- Expanded(child: Container()),
- ElevatedButton(
- onPressed: () {
- print('EN');
- },
- style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
- backgroundColor:
- MaterialStateProperty.all<Color>(Colors.white70),
- shape: MaterialStateProperty.all<RoundedRectangleBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
- topLeft: Radius.circular(20),
- bottomLeft: Radius.circular(20)),
-
- ))),
- child: Text('EN'),
- ),
- ElevatedButton(
- onPressed: () {
- print('ID');
- },
- style: ButtonStyle(
- foregroundColor:
- MaterialStateProperty.all<Color>(Colors.white),
- backgroundColor: MaterialStateProperty.all<Color>(Colors.red),
- shape: MaterialStateProperty.all<RoundedRectangleBorder>(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
- topRight: Radius.circular(20),
- bottomRight: Radius.circular(20)),
- side: BorderSide(color: Colors.red),
- ))),
- child: Text('ID'))
- ],
- ),
- );
- }
- }
|