Skip to content

Instantly share code, notes, and snippets.

View triyono777's full-sized avatar
🎯
Flutter

triyono777

🎯
Flutter
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:projek_kel_1/login_screen.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:projek_kel_1/home_screen.dart';
import 'package:projek_kel_1/list_screen.dart';
class LoginScreen extends StatefulWidget {
const LoginScreen({Key? key}) : super(key: key);
@override
State<LoginScreen> createState() => _LoginScreenState();
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:projek_kel_1/home_screen.dart';
import 'login_screen.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({Key? key}) : super(key: key);
import 'package:flutter/material.dart';
import 'package:projek_kel_1/splash_screen.dart';
import 'package:hive_flutter/hive_flutter.dart';
void main() async{
await Hive.initFlutter();
var box = await Hive.openBox('userBox');
runApp(const MyApp());
}
name: projek_kel_1
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'welcome_screen.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:projek_satu/list_screen.dart';
import 'package:projek_satu/login_screen.dart';
import 'package:projek_satu/welcome_screen.dart';
import 'home_screen.dart';
"""
buat prgram sederhana menu wrung makan
tersedia 2 menu
1 makanan
2 minuman
jika di pilih 2 maka keluar menu minuman
es jeruk
es teh
"""
buatlah program sederhana
dihitung pake for
user memasukkan harga barang
user memasukkan total barang
lalu print total harga barang
bisa pakai operator +=
untuk barang ke -3 di kasih discount 50%
contoh: outputnya
total barang: 7
"""
buatlah program sederhana
dihitung pake for
user memasukkan harga barang
user memasukkan total barang
lalu print total harga barang
bisa pakai operator +=