|
|
@ -6,7 +6,7 @@ import '../main.dart';
|
|
|
|
class MyInAppBrowser extends InAppBrowser {
|
|
|
|
class MyInAppBrowser extends InAppBrowser {
|
|
|
|
var options = InAppBrowserClassOptions(
|
|
|
|
var options = InAppBrowserClassOptions(
|
|
|
|
crossPlatform:
|
|
|
|
crossPlatform:
|
|
|
|
InAppBrowserOptions(hideUrlBar: true, hideToolbarTop: true),
|
|
|
|
InAppBrowserOptions(hideUrlBar: true, hideToolbarTop: true),
|
|
|
|
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
|
|
|
|
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
|
|
|
|
crossPlatform: InAppWebViewOptions(javaScriptEnabled: true)));
|
|
|
|
crossPlatform: InAppWebViewOptions(javaScriptEnabled: true)));
|
|
|
|
|
|
|
|
|
|
|
@ -27,9 +27,6 @@ class MyInAppBrowser extends InAppBrowser {
|
|
|
|
if (url!.origin + url.path == MyApp.api.redirectUri) {
|
|
|
|
if (url!.origin + url.path == MyApp.api.redirectUri) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await MyApp.api.requestUserAuthorization(url);
|
|
|
|
await MyApp.api.requestUserAuthorization(url);
|
|
|
|
var id = await MyApp.api.getCurrentlyPlayingTrack();
|
|
|
|
|
|
|
|
await MyApp.api
|
|
|
|
|
|
|
|
.addToPLaylist(id);
|
|
|
|
|
|
|
|
//TODO : end the adding of playlist image
|
|
|
|
//TODO : end the adding of playlist image
|
|
|
|
} on ApiException {
|
|
|
|
} on ApiException {
|
|
|
|
// TODO : add notification to show that an error occured
|
|
|
|
// TODO : add notification to show that an error occured
|
|
|
|