Skip to content

Commit

Permalink
update: ui fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lordbruh0 committed Mar 1, 2024
1 parent 0d77e1a commit 2398625
Show file tree
Hide file tree
Showing 21 changed files with 448 additions and 326 deletions.
Binary file removed images/Pupuk Circle.png
Binary file not shown.
Binary file added images/Pupuk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/PupukUrea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/SarumTangan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Vitamin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/garpuTanah.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/pupuk CircleOff.png
Binary file not shown.
Binary file added images/pupukOff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pupukOn (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sekopKeci.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 55 additions & 8 deletions lib/Cahaya.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,45 @@ class _CahayaState extends State<Cahaya> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.white, // Warna latar belakang AppBar
title: const Padding(
padding: EdgeInsets.only(bottom: 0),
child: Text(
'Alat IoT',
style: TextStyle(
color: Colors.black,
),
),
),
leading: IconButton(
icon: const Icon(
Icons.notifications_none_outlined,
color: Colors.black,
),
onPressed: () {
Navigator.of(context).pop();
},
),
centerTitle: true,
actions: <Widget>[
IconButton(
onPressed: () {
// Tambahkan logika aksi untuk ikon akun di sini
},
icon: const Icon(
Icons.settings,
color: Colors.black,
),
),
],
),
body: Column(
children: [
Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: const EdgeInsets.only(top: 55),
margin: const EdgeInsets.only(top: 10),
child: const Text(
'Pencahayaan',
style: TextStyle(fontSize: 30, fontWeight: FontWeight.w500),
Expand Down Expand Up @@ -117,8 +150,8 @@ class _CahayaState extends State<Cahaya> {
color: Colors.black54),
),
Container(
padding: const EdgeInsets.fromLTRB(40.0, 30.0, 40.0, 30.0),
margin: const EdgeInsets.fromLTRB(40.0, 70.0, 40.0, 40.0),
padding: const EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
margin: const EdgeInsets.fromLTRB(20.0, 50.0, 20.0, 20.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
Expand Down Expand Up @@ -160,6 +193,8 @@ class _CahayaState extends State<Cahaya> {
// final lampPowerRef = database.reference().child('Device1/Lamp');
// lampPowerRef.set(value); // Set nilai di Firebase sesuai nilai switch
},
activeColor: Colors.yellow,
inactiveThumbColor: Colors.white,
),
),
),
Expand All @@ -186,7 +221,7 @@ class _CahayaState extends State<Cahaya> {
Container(
padding: const EdgeInsets.only(
top: 20, left: 0), // Atur jarak antara icon dan teks
child: Text(
child: Text(
lampPower ? 'Lampu Nyala' : 'Lampu Mati',
style: TextStyle(
fontSize: 16.0,
Expand Down Expand Up @@ -221,7 +256,10 @@ class _CahayaState extends State<Cahaya> {
),
);
},
child: const Icon(Icons.circle, color: Colors.black38,),
child: const Icon(
Icons.circle,
color: Colors.black38,
),
),
const SizedBox(
width: 10,
Expand All @@ -237,7 +275,10 @@ class _CahayaState extends State<Cahaya> {
),
);
},
child: const Icon(Icons.circle, color: Colors.black38,),
child: const Icon(
Icons.circle,
color: Colors.black38,
),
),
const SizedBox(
width: 10,
Expand All @@ -253,7 +294,10 @@ class _CahayaState extends State<Cahaya> {
),
);
},
child: const Icon(Icons.circle, color: Colors.black38,),
child: const Icon(
Icons.circle,
color: Colors.black38,
),
),
const SizedBox(
width: 10,
Expand All @@ -269,7 +313,10 @@ class _CahayaState extends State<Cahaya> {
),
);
},
child: const Icon(Icons.circle, color: Colors.green,),
child: const Icon(
Icons.circle,
color: Colors.green,
),
),
],
),
Expand Down
22 changes: 0 additions & 22 deletions lib/Setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,6 @@ class _SettingsState extends State<Settings> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('Setting'),
leading: IconButton(
icon: const Icon(Icons.notifications_none_outlined),
iconSize: 30.0,
onPressed: () {},
),
actions: [
IconButton(
icon: const Icon(Icons.settings),
onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const setting(),
// ),
// );
},
),
],
),
body: Center(
child: Stack(
alignment: Alignment.center,
Expand Down
Loading

0 comments on commit 2398625

Please sign in to comment.