TF-4301 Add "Create a new label" button in Label As menus and wire up tagging in email view
This commit is contained in:
@@ -43,7 +43,7 @@ class TMailButtonWidget extends StatelessWidget {
|
||||
final bool isLoading;
|
||||
final Color? hoverColor;
|
||||
final TextOverflow? textOverflow;
|
||||
final Alignment? alignment;
|
||||
final AlignmentGeometry? alignment;
|
||||
final bool isTextExpanded;
|
||||
|
||||
const TMailButtonWidget({
|
||||
@@ -109,7 +109,7 @@ class TMailButtonWidget extends StatelessWidget {
|
||||
List<BoxShadow>? boxShadow,
|
||||
EdgeInsetsGeometry? margin,
|
||||
Color? hoverColor,
|
||||
Alignment? alignment,
|
||||
AlignmentGeometry? alignment,
|
||||
BoxBorder? border,
|
||||
}) {
|
||||
return TMailButtonWidget(
|
||||
@@ -165,7 +165,7 @@ class TMailButtonWidget extends StatelessWidget {
|
||||
int? maxLines,
|
||||
Color? hoverColor,
|
||||
TextOverflow? textOverflow,
|
||||
Alignment? alignment,
|
||||
AlignmentGeometry? alignment,
|
||||
bool isTextExpanded = false,
|
||||
}) {
|
||||
return TMailButtonWidget(
|
||||
|
||||
@@ -23,7 +23,7 @@ class TMailContainerWidget extends StatelessWidget {
|
||||
final List<BoxShadow>? boxShadow;
|
||||
final BoxBorder? border;
|
||||
final Color? hoverColor;
|
||||
final Alignment? alignment;
|
||||
final AlignmentGeometry? alignment;
|
||||
|
||||
const TMailContainerWidget({
|
||||
super.key,
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ class CupertinoLoadingWidget extends StatelessWidget {
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final bool isCenter;
|
||||
final String? semanticLabel;
|
||||
final Color? color;
|
||||
|
||||
const CupertinoLoadingWidget({
|
||||
super.key,
|
||||
@@ -15,6 +16,7 @@ class CupertinoLoadingWidget extends StatelessWidget {
|
||||
this.padding,
|
||||
this.isCenter = true,
|
||||
this.semanticLabel,
|
||||
this.color,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -24,8 +26,8 @@ class CupertinoLoadingWidget extends StatelessWidget {
|
||||
child: SizedBox(
|
||||
width: size ?? CupertinoLoadingWidgetStyles.size,
|
||||
height: size ?? CupertinoLoadingWidgetStyles.size,
|
||||
child: const CupertinoActivityIndicator(
|
||||
color: CupertinoLoadingWidgetStyles.progressColor
|
||||
child: CupertinoActivityIndicator(
|
||||
color: color ?? CupertinoLoadingWidgetStyles.progressColor
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -34,8 +36,8 @@ class CupertinoLoadingWidget extends StatelessWidget {
|
||||
child: SizedBox(
|
||||
width: size ?? CupertinoLoadingWidgetStyles.size,
|
||||
height: size ?? CupertinoLoadingWidgetStyles.size,
|
||||
child: const CupertinoActivityIndicator(
|
||||
color: CupertinoLoadingWidgetStyles.progressColor
|
||||
child: CupertinoActivityIndicator(
|
||||
color: color ?? CupertinoLoadingWidgetStyles.progressColor
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user