-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* structure image with user id * remove unused code * fix condition
- Loading branch information
1 parent
4e6ed25
commit d7194ca
Showing
16 changed files
with
247 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class StorageConst { | ||
static String rootDirectory = "images"; | ||
|
||
static String userProfileUploadPath({ | ||
required String userId, | ||
}) => | ||
"$rootDirectory/$userId/profile"; | ||
|
||
static String teamProfileUploadPath({ | ||
required String userId, | ||
required String teamId, | ||
}) => | ||
"$rootDirectory/$userId/team_profile_images/$teamId"; | ||
|
||
static String supportAttachmentUploadPath({ | ||
required String userId, | ||
required String imageName, | ||
}) => | ||
"$rootDirectory/$userId/support_attachment_images/$imageName"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
khelo/lib/domain/extensions/data_model_extensions/ball_score_model_extension.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'dart:io'; | ||
|
||
extension FileExtension on File { | ||
Future<bool> isFileUnderMaxSize() async { | ||
try { | ||
const maxAllowedSizeInBytes = 25 * 1024 * 1024; | ||
final sizeInBytes = await length(); | ||
return sizeInBytes <= maxAllowedSizeInBytes; | ||
} catch (e) { | ||
rethrow; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.