How to i convert this python code to dart?
void main() {
print(strip(strip(strip(strip(strip(" [(,'Sample String',)] ", " "), "[]"), "()"), ","), "''"));
//Output: "Sample String"
}
String strip(String string, String char)
{
string = (string.startsWith(char[0]) && string.endsWith(char[char.length - 1]))
? (){string = string.substring(1);
string = string.substring(0, string.length - 1); return string;}()
: string;
return string;
}