Merge branch 'main' of https://github.com/kleponijo/klimatologiot
This commit is contained in:
commit
32ccfda3ee
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"project_info": {
|
"project_info": {
|
||||||
"project_number": "219079385989",
|
"project_number": "219079385989",
|
||||||
|
"firebase_url": "https://klimatologiot-default-rtdb.asia-southeast1.firebasedatabase.app",
|
||||||
"project_id": "klimatologiot",
|
"project_id": "klimatologiot",
|
||||||
"storage_bucket": "klimatologiot.firebasestorage.app"
|
"storage_bucket": "klimatologiot.firebasestorage.app"
|
||||||
},
|
},
|
||||||
|
|
@ -12,7 +13,12 @@
|
||||||
"package_name": "com.example.klimatologiot"
|
"package_name": "com.example.klimatologiot"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [],
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "219079385989-8hkp1kg2pprs5k269s4c08r6rpdj1gjd.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
"api_key": [
|
"api_key": [
|
||||||
{
|
{
|
||||||
"current_key": "AIzaSyAN_9rnFxG99yficqRzTKJ7751D0GC0iXA"
|
"current_key": "AIzaSyAN_9rnFxG99yficqRzTKJ7751D0GC0iXA"
|
||||||
|
|
@ -20,7 +26,12 @@
|
||||||
],
|
],
|
||||||
"services": {
|
"services": {
|
||||||
"appinvite_service": {
|
"appinvite_service": {
|
||||||
"other_platform_oauth_client": []
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "219079385989-8hkp1kg2pprs5k269s4c08r6rpdj1gjd.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ pluginManagement {
|
||||||
plugins {
|
plugins {
|
||||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||||
id("com.android.application") version "8.11.1" apply false
|
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
|
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"}}}}}}
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
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 {
|
class MyAppView extends StatelessWidget {
|
||||||
const MyAppView({super.key});
|
const MyAppView({super.key});
|
||||||
|
|
@ -6,15 +9,25 @@ class MyAppView extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Klimatologi IOT',
|
title: 'Klimatologi',
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
colorScheme: ColorScheme.light(
|
colorScheme: ColorScheme.light(
|
||||||
background: Colors.grey.shade100,
|
background: Colors.grey.shade100,
|
||||||
onBackground: Colors.black,
|
onBackground: Colors.black,
|
||||||
primary: Colors.blue,
|
primary: Colors.blue,
|
||||||
|
onPrimary: Colors.white
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
home: BlocBuilder<AuthenticationBloc, AuthenticationState>(
|
||||||
|
builder: ((context, state){
|
||||||
|
if(state.status == AuthenticationStatus.authenticated){
|
||||||
|
return HomeScreen();
|
||||||
|
} else {
|
||||||
|
return WelcomeScreen();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HomeScreen extends StatelessWidget{
|
||||||
|
const HomeScreen ({super.key});
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue