updateLanguage method
切换语言调用,如果里面有string资源需要重新加载
Implementation
void updateLanguage({
MaterialHeader? materialHeader,
ClassicFooter? classicFooter,
String? system,
}) {
if (materialHeader != null) {
EasyRefresh.defaultHeaderBuilder = () => materialHeader;
}
if (classicFooter != null) {
EasyRefresh.defaultFooterBuilder = () => classicFooter;
}
if (system != null) {
StringRes.followSystem = system;
KLanguageUtils.get.updateStrSystem();
}
}