import 'package:flutter/material.dart'; import 'package:notube/services/download.dart'; class DlFormState extends ChangeNotifier { String url = 'https://youtu.be/playlist?list=PLk1fi9OrZmvGBdh9BdWIhZImGVDUqls1X'; String format = 'MP3'; late DLServices dlService; void setUrl(String newUrl) { url = newUrl; notifyListeners(); } void setFormat(String newFormat) { format = newFormat; notifyListeners(); } Future download() async { dlService = await DLServices.init(); await dlService.analyseUrl(url); } }