masih erorr
This commit is contained in:
parent
5f4477c5bf
commit
f96ca1217d
|
|
@ -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,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