import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:web_panel/screens/global_variable.dart';

import 'app.dart';
import 'package:get/get.dart';

import 'controllers/MenuController.dart';


final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

SharedPreferences? pref;

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: const FirebaseOptions(
      apiKey: "AIzaSyCvUB8zvzwiY6z67P7rjMCtw0SrrjlQJAw",
      authDomain: "godrich-34f6b.firebaseapp.com",
      databaseURL:
          "https://godrich-34f6b-default-rtdb.asia-southeast1.firebasedatabase.app",
      projectId: "godrich-34f6b",
      storageBucket: "godrich-34f6b.firebasestorage.app",
      messagingSenderId: "461820418345",
      appId: "1:461820418345:web:547fcc7296a30d865e7f38",
    ),
  );
  pref = await SharedPreferences.getInstance();
  Get.put(SidebarController());

  runApp(MyApp());

}
