Правки + иконка
This commit is contained in:
@@ -78,15 +78,17 @@ class _CrudCollectionScreenState extends State<CrudCollectionScreen> {
|
||||
final file = File(filePath);
|
||||
final bytes = await file.readAsBytes();
|
||||
|
||||
final base64String = base64Encode(bytes);
|
||||
// final base64String = base64Encode(bytes);
|
||||
|
||||
_collection = _collection?.copyWith(avatar: base64String);
|
||||
_collection = _collection?.copyWith(avatar: bytes);
|
||||
|
||||
safeSetState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
logger.logBuild('build create screen');
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.gray_bg,
|
||||
appBar: _buildAppBar(context),
|
||||
@@ -107,7 +109,7 @@ class _CrudCollectionScreenState extends State<CrudCollectionScreen> {
|
||||
const HSpace(16),
|
||||
..._buildDescription(context),
|
||||
const HSpace(16),
|
||||
_buildPublickSwitch(),
|
||||
// _buildPublickSwitch(),
|
||||
const HSpace(16),
|
||||
AnimatedOpacity(
|
||||
// opacity: _isPublic ? 1 : 0,
|
||||
@@ -370,10 +372,7 @@ class _CrudCollectionScreenState extends State<CrudCollectionScreen> {
|
||||
condition: _collection!.avatar != null,
|
||||
builder:
|
||||
(context) => ClipOval(
|
||||
child: Image.memory(
|
||||
base64Decode(_collection!.avatar!),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
child: Image.memory(_collection!.avatar!, fit: BoxFit.cover),
|
||||
),
|
||||
fallback:
|
||||
(context) => SizedBox.square(
|
||||
|
||||
Reference in New Issue
Block a user