Postingan

Menampilkan postingan dari Februari, 2026

BMI CALCULATOR

Gambar
  import 'package:flutter/material.dart'; void main() {   runApp(const MyApp()); } class MyApp extends StatelessWidget {   const MyApp({super.key});   @override   Widget build(BuildContext context) {     return MaterialApp(       debugShowCheckedModeBanner: false,       home: const BmiApp(),     );   } } class BmiApp extends StatefulWidget {   const BmiApp({super.key});   @override   State<BmiApp> createState() => _BmiAppState(); } class _BmiAppState extends State<BmiApp> {   final nameController = TextEditingController();   final ageController = TextEditingController();   String gender = "Laki-laki";   double weight = 60;   double height = 170;   double bmi = 0;   String category = "-";   String advice = "Masukkan data lalu hitung BMI";   Color color = Colors.white;   void calculateBMI() {     double h = height / 100; ...