fixup! TF-4308 Add NoLabelYetWidget for choose label modal
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -27,8 +27,6 @@ class AddListLabelToListEmailsDelegate extends BaseController {
|
|||||||
required VoidCallback onCancel,
|
required VoidCallback onCancel,
|
||||||
required OnSyncListLabelForListEmail onSync,
|
required OnSyncListLabelForListEmail onSync,
|
||||||
}) async {
|
}) async {
|
||||||
if (_labelController.labels.isEmpty) return;
|
|
||||||
|
|
||||||
await DialogRouter().openDialogModal(
|
await DialogRouter().openDialogModal(
|
||||||
child: ChooseLabelModal(
|
child: ChooseLabelModal(
|
||||||
labels: _labelController.labels,
|
labels: _labelController.labels,
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ class _ChooseLabelModalState extends State<ChooseLabelModal> {
|
|||||||
return LayoutBuilder(builder: (_, constraints) {
|
return LayoutBuilder(builder: (_, constraints) {
|
||||||
final currentScreenWidth = constraints.maxWidth;
|
final currentScreenWidth = constraints.maxWidth;
|
||||||
final currentScreenHeight = constraints.maxHeight;
|
final currentScreenHeight = constraints.maxHeight;
|
||||||
double height = math.min(currentScreenHeight - 100, 645);
|
final height = math.max(0.0, math.min(currentScreenHeight - 100, 645.0));
|
||||||
double width = math.min(currentScreenWidth - 32, 536);
|
final width = math.max(0.0, math.min(currentScreenWidth - 32, 536.0));
|
||||||
|
|
||||||
Widget bodyWidget = Container(
|
Widget bodyWidget = Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
@@ -46,19 +46,20 @@ class NoLabelYetWidget extends StatelessWidget {
|
|||||||
padding: const EdgeInsetsDirectional.only(top: 36),
|
padding: const EdgeInsetsDirectional.only(top: 36),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
if (onCreateLabel != null)
|
||||||
constraints: const BoxConstraints(minWidth: 186),
|
Container(
|
||||||
height: 48,
|
constraints: const BoxConstraints(minWidth: 186),
|
||||||
margin: const EdgeInsetsDirectional.only(top: 16),
|
height: 48,
|
||||||
child: ConfirmDialogButton(
|
margin: const EdgeInsetsDirectional.only(top: 16),
|
||||||
label: appLocalizations.createALabel,
|
child: ConfirmDialogButton(
|
||||||
backgroundColor: Colors.white,
|
label: appLocalizations.createALabel,
|
||||||
textColor: AppColor.primaryMain,
|
backgroundColor: Colors.white,
|
||||||
borderColor: AppColor.primaryMain,
|
textColor: AppColor.primaryMain,
|
||||||
icon: imagePaths.icAddIdentity,
|
borderColor: AppColor.primaryMain,
|
||||||
onTapAction: onCreateLabel ?? () {},
|
icon: imagePaths.icAddIdentity,
|
||||||
|
onTapAction: onCreateLabel!,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user