set web renderer
This commit is contained in:
@@ -27,6 +27,41 @@ class TVShowDetailsScreen extends StatelessWidget {
|
||||
late List<EpisodeCount> episodeCount;
|
||||
late TVShow tvShowDetails;
|
||||
|
||||
Future<http.Response> testPost(String data) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
|
||||
String? dbProtocol = prefs.getString('dbProtocol');
|
||||
String? dbHost = prefs.getString('dbHost');
|
||||
String? dbPath = prefs.getString('dbPath');
|
||||
|
||||
Uri url = Uri(
|
||||
scheme: dbProtocol,
|
||||
host: dbHost,
|
||||
path: dbPath,
|
||||
queryParameters: {
|
||||
'module': 'tvshow',
|
||||
'function': 'test',
|
||||
'data': data,
|
||||
},
|
||||
);
|
||||
|
||||
print(url.toString());
|
||||
|
||||
final r = http.post(
|
||||
url,
|
||||
headers: <String, String>{
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
body: jsonEncode(
|
||||
<String, String>{
|
||||
'title': data,
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
Future<TVShow> loadTVShowDetails(int tvshowID) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
|
||||
@@ -45,7 +80,6 @@ class TVShowDetailsScreen extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
|
||||
print(url);
|
||||
final response = await http.get(url);
|
||||
bool? error;
|
||||
String? errorMessage;
|
||||
@@ -319,6 +353,7 @@ class TVShowDetailsScreen extends StatelessWidget {
|
||||
tooltip: 'Save changes',
|
||||
onPressed: () {
|
||||
if (save()) {
|
||||
testPost('bla');
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
@@ -341,10 +376,12 @@ class TVShowDetailsScreen extends StatelessWidget {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
image: tvShowDetails.backdropPath.isNotEmpty ? DecorationImage(
|
||||
image: NetworkImage(url),
|
||||
fit: BoxFit.cover,
|
||||
) : null,
|
||||
image: tvShowDetails.backdropPath.isNotEmpty
|
||||
? DecorationImage(
|
||||
image: NetworkImage(url),
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
|
||||
Reference in New Issue
Block a user