I want to use IOC in Flutter/Dart using model name in string format like below
namespace My;
class NewClass {
function __construct($id, $title)
{
$this->id = $id;
$this->title = $title;
}
}
$newClass = App::make('My\NewClass', [1, 'test']);
the above is how IOC can be used in laravel. Here we are dynamically using the model name or namespace ,'My\NewClass', as a string.