This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Title":"Glass", | |
"Year":"2019", | |
"Rated":"PG-13", | |
"Released":"18 Jan 2019", | |
"Runtime":"129 min", | |
"Genre":"Drama, Sci-Fi, Thriller", | |
"Director":"M. Night Shyamalan", | |
"Writer":"M. Night Shyamalan", | |
"Actors":"James McAvoy, Bruce Willis, Samuel L. Jackson, Anya Taylor-Joy", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyProvider with ChangeNotifier { | |
var id; | |
Future<void> getid(String moviename) async { | |
try { | |
Dio dio = Dio(); | |
Response res = await dio.get( | |
"http://www.omdbapi.com/?t=$moviename&apikey=4b25eb47", | |
); | |
id = res.data['imdbID']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyProvider with ChangeNotifier { | |
List<dynamic> responseBody; | |
String errMsg = ""; | |
//for movies | |
Future<void> getSub(id) async { | |
try { | |
HttpClient client = new HttpClient(); | |
client.userAgent = 'TemporaryUserAgent'; | |
HttpClientRequest request = await client.getUrl(Uri.parse( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> getData(String moviename, String ep, String se) async { | |
try { | |
if (!isMovie && (ep == '' || se == '') || moviename == '') { | |
return; | |
} | |
clearData(); | |
await getid(moviename); | |
isMovie ? await getSub(id) : await getTvSub(id, ep, se); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MultiProvider( | |
providers: [ChangeNotifierProvider(create: (_) => MyProvider())], | |
child: MaterialApp() | |
.... | |
... | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
physics: NeverScrollableScrollPhysics(), | |
shrinkWrap: true, | |
itemCount: provider.items == null ? 0 : provider.items.length, | |
itemBuilder: (ctx, index) { | |
return GestureDetector( | |
onTap: () async { | |
var tempDir = await DownloadsPathProvider.downloadsDirectory; | |
await Directory(tempDir.path + "/SubDownloader").create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
physics: NeverScrollableScrollPhysics(), | |
shrinkWrap: true, | |
itemCount: provider.items == null ? 0 : provider.items.length, | |
itemBuilder: (ctx, index) { | |
return GestureDetector( | |
onTap: () async { | |
var tempDir = await DownloadsPathProvider.downloadsDirectory; | |
await Directory(tempDir.path + "/SubDownloader").create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> download2(String url, String savePath) async { | |
var per = await Permission.storage.request(); | |
if (per.isGranted) { | |
toogleisDownloading(); | |
try { | |
Response response = await Dio().get( | |
url, | |
onReceiveProgress: (received, total) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"MatchedBy":"imdbid", | |
"IDSubMovieFile":"0", | |
.... | |
.... | |
"SubFileName":"Ma 2019 720p WEB-DL H264 AC3-EVO.srt", | |
"SubActualCD":"1", | |
"SubSize":"119249", | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--<button onclick="draw()">DRAW</button>--> | |
<button onclick="addHandle()">Add point</button> | |
<svg id="blob" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"> | |
<path d="" stroke="black" fill="black" fill-opacity="0.4"/> | |
</svg> |
OlderNewer