movie and tvshow list
This commit is contained in:
+30
-3
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:global_configuration/global_configuration.dart';
|
||||
|
||||
import 'package:multimedia/widgets/tabsScreen.dart';
|
||||
|
||||
@@ -15,7 +15,35 @@ final theme = ThemeData(
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await GlobalConfiguration().loadFromPath('assets/cfg/config.json');
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
|
||||
String? dbProtocol = prefs.getString('dbProtocol');
|
||||
String? dbHost = prefs.getString('dbHost');
|
||||
String? dbPath = prefs.getString('dbPath');
|
||||
String? dbUser = prefs.getString('dbUser');
|
||||
String? dbPassword = prefs.getString('dbPassword');
|
||||
|
||||
// if (dbProtocol == null) {
|
||||
// prefs.setString('dbProtocol', 'http');
|
||||
// }
|
||||
// if (dbHost == null) {
|
||||
// prefs.setString('dbHost', '192.168.0.70');
|
||||
// }
|
||||
if (dbProtocol == null) {
|
||||
prefs.setString('dbProtocol', 'https');
|
||||
}
|
||||
if (dbHost == null) {
|
||||
prefs.setString('dbHost', 'api.windesign.at');
|
||||
}
|
||||
if (dbPath == null) {
|
||||
prefs.setString('dbPath', '/multimedia.php');
|
||||
}
|
||||
if (dbUser == null) {
|
||||
prefs.setString('dbUser', '');
|
||||
}
|
||||
if (dbPassword == null) {
|
||||
prefs.setString('dbPassword', '');
|
||||
}
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
@@ -25,7 +53,6 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return MaterialApp(
|
||||
theme: theme,
|
||||
title: 'Multimedia',
|
||||
|
||||
Reference in New Issue
Block a user