Skip to content

Instantly share code, notes, and snippets.

@triyono777
Created April 18, 2022 04:33
Show Gist options
  • Save triyono777/f642ba46e7cd45c8f71d4ba59ba325b0 to your computer and use it in GitHub Desktop.
Save triyono777/f642ba46e7cd45c8f71d4ba59ba325b0 to your computer and use it in GitHub Desktop.
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());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: SplashScreen(),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment