lukas-heiligenbrunner
bf070ff99a
update dependencies try to infer the prefix of the server url display display size dependent amount on shuffle page
27 lines
670 B
Dart
27 lines
670 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:openmediacentermobile/log/log.dart';
|
|
import 'package:openmediacentermobile/login/login_screen.dart';
|
|
|
|
import 'DrawerPage.dart';
|
|
import 'login/logincontext.dart';
|
|
|
|
class App extends StatelessWidget {
|
|
const App({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var loginCtx = LoginContext.of(context);
|
|
|
|
Log.d("We are logged in: ${loginCtx.loggedIn}");
|
|
|
|
if (!loginCtx.loggedIn) {
|
|
return const MaterialApp(home: LoginScreen());
|
|
} else {
|
|
return const MaterialApp(
|
|
home: DrawerPage(
|
|
title: 'OpenMediaCenter',
|
|
));
|
|
}
|
|
}
|
|
}
|