WT 1.1.5+2 remote images for menu
This commit is contained in:
@@ -62,7 +62,11 @@ class UserRepository with Logging {
|
||||
} else if (e.code == 'weak-password') {
|
||||
log('The password provided is too weak.');
|
||||
throw Exception("Password too short");
|
||||
} else if (e.code == 'account-exists-with-different-credential') {
|
||||
log(e.code);
|
||||
throw Exception("The account exists with different credential");
|
||||
} else {
|
||||
print(e.code);
|
||||
throw Exception(e);
|
||||
}
|
||||
} on WorkoutTestException catch (ex) {
|
||||
|
||||
@@ -47,22 +47,12 @@ class WorkoutTreeRepository with Logging {
|
||||
Antagonist.calf: Antagonist.calfNr
|
||||
};
|
||||
|
||||
/* Future<String> _buildImage(String imageUrl) async {
|
||||
String assetImage = 'asset/menu/' + imageUrl.substring(7);
|
||||
//print("Loading image " + assetImage);
|
||||
return rootBundle.load(assetImage).then((value) {
|
||||
return assetImage;
|
||||
}).catchError((_) {
|
||||
String imagePath = assetImage.substring(10);
|
||||
String url = Cache.mediaUrl + 'images' + imagePath;
|
||||
//print("Exception: " + assetImage + " will be loaded from the network " + url);
|
||||
return url;
|
||||
});
|
||||
} */
|
||||
|
||||
Future<void> createTree() async {
|
||||
isEnglish = AppLanguage().appLocal == Locale('en');
|
||||
log("** Start creating tree on lang: " + AppLanguage().appLocal.languageCode);
|
||||
log("** Start creating tree on lang: " +
|
||||
AppLanguage().appLocal.languageCode +
|
||||
" tree length: " +
|
||||
Cache().getExerciseTree().length.toString());
|
||||
|
||||
List<ExerciseTree> exerciseTree = Cache().getExerciseTree();
|
||||
if (exerciseTree == null || exerciseTree.length == 0) {
|
||||
|
||||
Reference in New Issue
Block a user