TF-4301 Add "Create a new label" button in Label As menus and wire up tagging in email view
This commit is contained in:
@@ -15,6 +15,7 @@ class ConfirmDialogButton extends StatelessWidget {
|
||||
final double? radius;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final VoidCallback? onTapAction;
|
||||
final Widget? child;
|
||||
|
||||
const ConfirmDialogButton({
|
||||
super.key,
|
||||
@@ -28,6 +29,7 @@ class ConfirmDialogButton extends StatelessWidget {
|
||||
this.textStyle,
|
||||
this.radius,
|
||||
this.padding,
|
||||
this.child,
|
||||
this.onTapAction,
|
||||
});
|
||||
|
||||
@@ -50,7 +52,7 @@ class ConfirmDialogButton extends StatelessWidget {
|
||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
onPressed: onTapAction,
|
||||
child: icon == null
|
||||
child: child ?? (icon == null
|
||||
? Text(
|
||||
label,
|
||||
style: textStyle ?? ThemeUtils.textStyleM3LabelLarge(color: textColor),
|
||||
@@ -79,7 +81,7 @@ class ConfirmDialogButton extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/views/dialog/confirm_dialog_button.dart';
|
||||
import 'package:core/presentation/views/loading/cupertino_loading_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ModalListActionButtonWidget extends StatelessWidget {
|
||||
@@ -11,6 +12,7 @@ class ModalListActionButtonWidget extends StatelessWidget {
|
||||
final VoidCallback onPositiveAction;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final bool isPositiveActionEnabled;
|
||||
final bool isProgressing;
|
||||
|
||||
const ModalListActionButtonWidget({
|
||||
super.key,
|
||||
@@ -19,6 +21,7 @@ class ModalListActionButtonWidget extends StatelessWidget {
|
||||
required this.onPositiveAction,
|
||||
required this.onNegativeAction,
|
||||
this.isPositiveActionEnabled = true,
|
||||
this.isProgressing = false,
|
||||
this.padding,
|
||||
this.positiveKey,
|
||||
this.negativeKey,
|
||||
@@ -52,12 +55,25 @@ class ModalListActionButtonWidget extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
|
||||
Widget progressingButton = const SizedBox(
|
||||
height: 48,
|
||||
width: 153,
|
||||
child: ConfirmDialogButton(
|
||||
label: '',
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: AppColor.primaryMain,
|
||||
child: CupertinoLoadingWidget(color: Colors.white),
|
||||
),
|
||||
);
|
||||
|
||||
Widget bodyWidget = Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Flexible(child: negativeButton),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(child: positiveButton),
|
||||
Flexible(
|
||||
child: isProgressing ? progressingButton : positiveButton,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user