getLocal method
Implementation
String? getLocal(String name) {
if (isLocalStorageSupported()) {
return window.localStorage[namespace + name];
} else {
String? cookie = document.cookie;
if (cookie != null && cookie.isNotEmpty) {
List<String> cookies = cookie.split(';');
for (String cookieValue in cookies) {
List<String> parts = cookieValue.trim().split('=');
if (parts[0] == namespace + name) {
return parts[1];
}
}
}
return null;
}
}