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 OnSyncListLabelForListEmail onSync,
|
||||
}) async {
|
||||
if (_labelController.labels.isEmpty) return;
|
||||
|
||||
await DialogRouter().openDialogModal(
|
||||
child: ChooseLabelModal(
|
||||
labels: _labelController.labels,
|
||||
|
||||
@@ -37,8 +37,8 @@ class _ChooseLabelModalState extends State<ChooseLabelModal> {
|
||||
return LayoutBuilder(builder: (_, constraints) {
|
||||
final currentScreenWidth = constraints.maxWidth;
|
||||
final currentScreenHeight = constraints.maxHeight;
|
||||
double height = math.min(currentScreenHeight - 100, 645);
|
||||
double width = math.min(currentScreenWidth - 32, 536);
|
||||
final height = math.max(0.0, math.min(currentScreenHeight - 100, 645.0));
|
||||
final width = math.max(0.0, math.min(currentScreenWidth - 32, 536.0));
|
||||
|
||||
Widget bodyWidget = Container(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -46,6 +46,7 @@ class NoLabelYetWidget extends StatelessWidget {
|
||||
padding: const EdgeInsetsDirectional.only(top: 36),
|
||||
),
|
||||
),
|
||||
if (onCreateLabel != null)
|
||||
Container(
|
||||
constraints: const BoxConstraints(minWidth: 186),
|
||||
height: 48,
|
||||
@@ -56,7 +57,7 @@ class NoLabelYetWidget extends StatelessWidget {
|
||||
textColor: AppColor.primaryMain,
|
||||
borderColor: AppColor.primaryMain,
|
||||
icon: imagePaths.icAddIdentity,
|
||||
onTapAction: onCreateLabel ?? () {},
|
||||
onTapAction: onCreateLabel!,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user