add dialog edit rule for mobile

This commit is contained in:
ManhNTX
2022-08-08 14:37:01 +07:00
committed by Dat H. Pham
parent 9ad41d9a6f
commit 2178b8f313
13 changed files with 248 additions and 78 deletions
@@ -149,6 +149,9 @@ class ImagePaths {
String get icAddNewRules => _getImagePath('ic_add_new_rule.svg');
String get icEditRule => _getImagePath('ic_edit_rule.svg');
String get icDeleteRule => _getImagePath('ic_delete_rule.svg');
String get icOpenEditRule => _getImagePath('ic_open_edit_rule.svg');
String get icEditRuleMobile => _getImagePath('ic_edit_rule_mobile.svg');
String get icDeleteRuleMobile => _getImagePath('ic_delete_rule_mobile.svg');
String _getImagePath(String imageName) {
return AssetsPaths.images + imageName;
@@ -6,24 +6,25 @@ import 'package:flutter_svg/flutter_svg.dart';
typedef OnCupertinoActionSheetActionClick<T> = void Function(T data);
abstract class CupertinoActionSheetActionBuilder<T> {
@protected final Key key;
@protected final SvgPicture actionIcon;
@protected final String actionName;
@protected OnCupertinoActionSheetActionClick<T>? onCupertinoActionSheetActionClick;
@protected
final Key key;
@protected
final SvgPicture actionIcon;
@protected
final String actionName;
@protected
OnCupertinoActionSheetActionClick<T>? onCupertinoActionSheetActionClick;
CupertinoActionSheetActionBuilder(
this.key,
this.actionIcon,
this.actionName
);
CupertinoActionSheetActionBuilder(this.key, this.actionIcon, this.actionName);
void onActionClick(OnCupertinoActionSheetActionClick<T> onCupertinoActionSheetActionClick) {
void onActionClick(
OnCupertinoActionSheetActionClick<T> onCupertinoActionSheetActionClick) {
this.onCupertinoActionSheetActionClick = onCupertinoActionSheetActionClick;
}
TextStyle actionTextStyle() {
return TextStyle(fontSize: 17, color: AppColor.colorNameEmail);
TextStyle actionTextStyle({TextStyle? textStyle}) {
return textStyle ?? TextStyle(fontSize: 17, color: AppColor.colorNameEmail);
}
Widget build();
}
}