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