implemented a customizable chat background system with support for patterns, solid colors, and gallery images; added a dedicated settings page with live preview and adjustable blur/dim effects, updated the image cropper to support flexible aspect ratios for wallpapers, and integrated file cleanup logic during account logout.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'chat_background_settings.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ChatBackgroundSettings _$ChatBackgroundSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => ChatBackgroundSettings(
|
||||
type: $enumDecode(_$ChatBackgroundTypeEnumMap, json['type']),
|
||||
fit: $enumDecode(_$ChatBackgroundFitEnumMap, json['fit']),
|
||||
colorValue: (json['colorValue'] as num?)?.toInt(),
|
||||
imageVersion: (json['imageVersion'] as num).toInt(),
|
||||
dim: (json['dim'] as num).toDouble(),
|
||||
blur: (json['blur'] as num).toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChatBackgroundSettingsToJson(
|
||||
ChatBackgroundSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'type': _$ChatBackgroundTypeEnumMap[instance.type]!,
|
||||
'fit': _$ChatBackgroundFitEnumMap[instance.fit]!,
|
||||
'colorValue': instance.colorValue,
|
||||
'imageVersion': instance.imageVersion,
|
||||
'dim': instance.dim,
|
||||
'blur': instance.blur,
|
||||
};
|
||||
|
||||
const _$ChatBackgroundTypeEnumMap = {
|
||||
ChatBackgroundType.pattern: 'pattern',
|
||||
ChatBackgroundType.image: 'image',
|
||||
ChatBackgroundType.color: 'color',
|
||||
ChatBackgroundType.none: 'none',
|
||||
};
|
||||
|
||||
const _$ChatBackgroundFitEnumMap = {
|
||||
ChatBackgroundFit.cover: 'cover',
|
||||
ChatBackgroundFit.tile: 'tile',
|
||||
ChatBackgroundFit.center: 'center',
|
||||
};
|
||||
Reference in New Issue
Block a user