TF-561 Fix edit identity
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/email/email_address.dart';
|
||||
|
||||
class IdentityFieldNoEditableBuilder {
|
||||
|
||||
final String _label;
|
||||
final EmailAddress? _emailAddressSelected;
|
||||
|
||||
IdentityFieldNoEditableBuilder(this._label, this._emailAddressSelected);
|
||||
|
||||
Widget build() {
|
||||
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Text(_label, style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail)),
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
height: 44,
|
||||
alignment: Alignment.center,
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(color: AppColor.colorInputBorderCreateMailbox, width: 0.5),
|
||||
color: AppColor.colorInputBackgroundCreateMailbox),
|
||||
child: Text(
|
||||
_emailAddressSelected?.email ?? '',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorInputBorderCreateMailbox),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
+2
-6
@@ -7,8 +7,6 @@ typedef OnChangeInputNameAction = Function(String? value);
|
||||
|
||||
class IdentityInputFieldBuilder {
|
||||
|
||||
final BuildContext _context;
|
||||
final ResponsiveUtils _responsiveUtils;
|
||||
final String _label;
|
||||
final String? _error;
|
||||
final TextEditingController? editingController;
|
||||
@@ -19,8 +17,6 @@ class IdentityInputFieldBuilder {
|
||||
OnChangeInputNameAction? onChangeInputNameAction;
|
||||
|
||||
IdentityInputFieldBuilder(
|
||||
this._context,
|
||||
this._responsiveUtils,
|
||||
this._label,
|
||||
this._error, {
|
||||
this.isMandatory = false,
|
||||
@@ -48,8 +44,8 @@ class IdentityInputFieldBuilder {
|
||||
..textStyle(const TextStyle(color: Colors.black, fontSize: 16))
|
||||
..keyboardType(inputType ?? TextInputType.text)
|
||||
..textDecoration((IdentityInputDecorationBuilder()
|
||||
..setContentPadding(EdgeInsets.symmetric(
|
||||
vertical: _responsiveUtils.isDesktop(_context) ? 16 : 12,
|
||||
..setContentPadding(const EdgeInsets.symmetric(
|
||||
vertical: BuildUtils.isWeb ? 16 : 12,
|
||||
horizontal: 12))
|
||||
..setErrorText(_error))
|
||||
.build()))
|
||||
|
||||
Reference in New Issue
Block a user