123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- import 'package:flutter/material.dart';
- import 'package:date_format/date_format.dart';
- var date = formatDate(DateTime.now(), [HH, ':', nn]);
- class AccountPage extends StatefulWidget {
- const AccountPage({super.key});
- @override
- State<AccountPage> createState() => _AccountPageState();
- }
- class _AccountPageState extends State<AccountPage> {
- int _selectedNavbar = 2;
- void _changeSelectedNavBar(int index) {
- setState(() {
- _selectedNavbar = index;
- });
- }
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- backgroundColor: Colors.white,
- automaticallyImplyLeading: false,
- elevation: 0,
- toolbarHeight: 44,
- title: Text(
- date,
- style: TextStyle(color: Color(0xff303336), fontSize: 15),
- ),
- actions: [
- Icon(
- Icons.signal_cellular_alt,
- color: Color(0xff303336),
- ),
- Icon(
- Icons.wifi,
- color: Color(0xff303336),
- ),
- RotatedBox(
- quarterTurns: -3,
- child: Icon(
- Icons.battery_std,
- color: Color(0xff303336),
- ),
- )
- ],
- ),
- bottomNavigationBar: BottomNavigationBar(
- items: [
- BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
- BottomNavigationBarItem(icon: Icon(Icons.history), label: 'History'),
- BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Account')
- ],
- currentIndex: _selectedNavbar,
- onTap: _changeSelectedNavBar,
- ),
- body: Column(
- children: [
- Container(
- height: 44,
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'Account',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ),
- Divider(),
- Container(
- padding: EdgeInsets.all(10),
- child: Row(
- children: [
- CircleAvatar(
- backgroundColor: Color(0xff078C84),
- child: Text('J'),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'James Triyono',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- )
- ],
- ),
- ),
- Divider(
- thickness: 8,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.all(10),
- child: Text(
- 'Info',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ),
- Container(
- height: 5,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'User ID',
- style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
- ),
- Spacer(),
- Text(
- 'jamet',
- style: TextStyle(color: Color(0xff292D32)),
- )
- ],
- ),
- ),
- Container(
- height: 8,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'Location',
- style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
- ),
- Spacer(),
- Text(
- 'Room 331',
- style: TextStyle(color: Color(0xff292D32)),
- )
- ],
- ),
- ),
- Container(
- height: 8,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'Request Group',
- style: TextStyle(color: Color(0xff292D32).withOpacity(0.75)),
- ),
- Spacer(),
- Text(
- 'All',
- style: TextStyle(color: Color(0xff292D32)),
- )
- ],
- ),
- ),
- Container(
- height: 10,
- ),
- Divider(
- thickness: 8,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.all(10),
- child: Text(
- 'Setting',
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Icon(
- Icons.language,
- color: Color(0xff292D32).withOpacity(0.75),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 5),
- child: Text('Language')),
- Spacer(),
- Text('English'),
- Icon(Icons.chevron_right)
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- color: Color(0xff514844).withOpacity(0.5),
- height: 1,
- width: MediaQuery.of(context).size.width * 0.95,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- RotationTransition(
- turns: AlwaysStoppedAnimation(135 / 360),
- child: Icon(
- Icons.vpn_key,
- color: Color(0xff292D32).withOpacity(0.75),
- ),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 5),
- child: Text('Password')),
- Spacer(),
- Text('Change password'),
- Icon(Icons.chevron_right)
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- color: Color(0xff514844).withOpacity(0.5),
- height: 1,
- width: MediaQuery.of(context).size.width * 0.95,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Icon(
- Icons.logout,
- color: Color(0xff292D32).withOpacity(0.75),
- ),
- Container(
- margin: EdgeInsets.symmetric(horizontal: 5),
- child: Text('Logout')),
- Spacer(),
- Icon(Icons.chevron_right)
- ],
- ),
- ),
- Container(
- height: 10,
- ),
- Divider(
- thickness: 8,
- ),
- ],
- ),
- );
- }
- }
|