This commit is contained in:
e32232340-Nadif 2026-02-06 07:41:25 +07:00
commit 32ccfda3ee
6 changed files with 135 additions and 3 deletions

View File

@ -1,6 +1,7 @@
{
"project_info": {
"project_number": "219079385989",
"firebase_url": "https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app",
"project_id": "klimatologiot",
"storage_bucket": "klimatologiot.firebasestorage.app"
},
@ -12,7 +13,12 @@
"package_name": "com.example.klimatologiot"
}
},
"oauth_client": [],
"oauth_client": [
{
"client_id": "219079385989-8hkp1kg2pprs5k269s4c08r6rpdj1gjd.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAN_9rnFxG99yficqRzTKJ7751D0GC0iXA"
@ -20,7 +26,12 @@
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
"other_platform_oauth_client": [
{
"client_id": "219079385989-8hkp1kg2pprs5k269s4c08r6rpdj1gjd.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}

View File

@ -20,6 +20,9 @@ pluginManagement {
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
// START: FlutterFire Configuration
id("com.google.gms.google-services") version("4.3.15") apply false
// END: FlutterFire Configuration
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}

1
firebase.json Normal file
View File

@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"klimatologiot","appId":"1:219079385989:android:1304b7433feb658ba0daec","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"klimatologiot","configurations":{"android":"1:219079385989:android:1304b7433feb658ba0daec","ios":"1:219079385989:ios:abf04f36d63bd3aaa0daec","macos":"1:219079385989:ios:abf04f36d63bd3aaa0daec","web":"1:219079385989:web:5034585bf9dc1252a0daec","windows":"1:219079385989:web:3677e02c6b4f1ceca0daec"}}}}}}

View File

@ -1,4 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:klimatologiot/blocs/authentication_bloc/authentication_bloc.dart';
import 'package:klimatologiot/screens/home/views/home_screen.dart';
class MyAppView extends StatelessWidget {
const MyAppView({super.key});
@ -6,15 +9,25 @@ class MyAppView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Klimatologi IOT',
title: 'Klimatologi',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.light(
background: Colors.grey.shade100,
onBackground: Colors.black,
primary: Colors.blue,
onPrimary: Colors.white
),
),
home: BlocBuilder<AuthenticationBloc, AuthenticationState>(
builder: ((context, state){
if(state.status == AuthenticationStatus.authenticated){
return HomeScreen();
} else {
return WelcomeScreen();
}
}),
)
);
}
}

93
lib/firebase_options.dart Normal file
View File

@ -0,0 +1,93 @@
// File generated by FlutterFire CLI.
// ignore_for_file: type=lint
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
case TargetPlatform.macOS:
return macos;
case TargetPlatform.windows:
return windows;
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}
static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyAZrk_k4DQ_ijCa6gp67oRklFMKD2dLcbQ',
appId: '1:219079385989:web:5034585bf9dc1252a0daec',
messagingSenderId: '219079385989',
projectId: 'klimatologiot',
authDomain: 'klimatologiot.firebaseapp.com',
databaseURL: 'https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'klimatologiot.firebasestorage.app',
);
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyAN_9rnFxG99yficqRzTKJ7751D0GC0iXA',
appId: '1:219079385989:android:1304b7433feb658ba0daec',
messagingSenderId: '219079385989',
projectId: 'klimatologiot',
databaseURL: 'https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'klimatologiot.firebasestorage.app',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyD1sRUSWC2nxONgcZ-zLMYr-tCHNPdVNT4',
appId: '1:219079385989:ios:abf04f36d63bd3aaa0daec',
messagingSenderId: '219079385989',
projectId: 'klimatologiot',
databaseURL: 'https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'klimatologiot.firebasestorage.app',
iosClientId: '219079385989-rrbf7b34t5rdvigs2l327qiheg357ogl.apps.googleusercontent.com',
iosBundleId: 'com.example.klimatologiot',
);
static const FirebaseOptions macos = FirebaseOptions(
apiKey: 'AIzaSyD1sRUSWC2nxONgcZ-zLMYr-tCHNPdVNT4',
appId: '1:219079385989:ios:abf04f36d63bd3aaa0daec',
messagingSenderId: '219079385989',
projectId: 'klimatologiot',
databaseURL: 'https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'klimatologiot.firebasestorage.app',
iosClientId: '219079385989-rrbf7b34t5rdvigs2l327qiheg357ogl.apps.googleusercontent.com',
iosBundleId: 'com.example.klimatologiot',
);
static const FirebaseOptions windows = FirebaseOptions(
apiKey: 'AIzaSyAZrk_k4DQ_ijCa6gp67oRklFMKD2dLcbQ',
appId: '1:219079385989:web:3677e02c6b4f1ceca0daec',
messagingSenderId: '219079385989',
projectId: 'klimatologiot',
authDomain: 'klimatologiot.firebaseapp.com',
databaseURL: 'https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app',
storageBucket: 'klimatologiot.firebasestorage.app',
);
}

View File

@ -0,0 +1,11 @@
import 'package:flutter/material.dart';
class HomeScreen extends StatelessWidget{
const HomeScreen ({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
);
}
}