✨ Can edit avatar and banner
This commit is contained in:
9
lib/utils/file.dart
Normal file
9
lib/utils/file.dart
Normal file
@ -0,0 +1,9 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:crypto/crypto.dart';
|
||||
|
||||
Future<String> calculateFileSha256(File file) async {
|
||||
final bytes = await file.readAsBytes();
|
||||
final digest = sha256.convert(bytes);
|
||||
return digest.toString();
|
||||
}
|
Reference in New Issue
Block a user