TF-460 Separate the header of MailboxDashboard on the browser
This commit is contained in:
@@ -61,6 +61,7 @@ export 'presentation/views/bottom_popup/cupertino_action_sheet_builder.dart';
|
||||
export 'presentation/views/bottom_popup/confirmation_dialog_action_sheet_builder.dart';
|
||||
export 'presentation/views/modal_sheets/edit_text_modal_sheet_builder.dart';
|
||||
export 'presentation/views/search/search_bar_view.dart';
|
||||
export 'presentation/views/popup_menu/popup_menu_item_widget.dart';
|
||||
|
||||
// Resources
|
||||
export 'presentation/resources/assets_paths.dart';
|
||||
|
||||
@@ -92,6 +92,8 @@ class ImagePaths {
|
||||
String get icToastNotSpam => _getImagePath('ic_toast_not_spam.svg');
|
||||
String get icNotSpam => _getImagePath('ic_not_spam.svg');
|
||||
String get icAvatarSpam => _getImagePath('ic_avatar_spam.svg');
|
||||
String get icLogout => _getImagePath('ic_logout.svg');
|
||||
String get icSetting => _getImagePath('ic_setting.svg');
|
||||
|
||||
String _getImagePath(String imageName) {
|
||||
return AssetsPaths.images + imageName;
|
||||
|
||||
@@ -78,6 +78,7 @@ class AvatarBuilder {
|
||||
_onTapAvatarActionWithPositionClick?.call(position);
|
||||
}
|
||||
},
|
||||
borderRadius: BorderRadius.circular((_size ?? 40) / 2),
|
||||
child: Container(
|
||||
key: _key,
|
||||
width: _size ?? 40,
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
@immutable
|
||||
class PopupMenuItemWidget extends StatelessWidget {
|
||||
|
||||
final Function onCallBack;
|
||||
final String icon;
|
||||
final String name;
|
||||
final Color? iconColor;
|
||||
final String? iconSelection;
|
||||
|
||||
PopupMenuItemWidget(this.icon, this.name, this.onCallBack, {this.iconSelection, this.iconColor});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () => onCallBack.call(),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 16),
|
||||
child: SizedBox(
|
||||
child: Row(children: [
|
||||
SvgPicture.asset(icon, width: 20, height: 20, fit: BoxFit.fill, color: iconColor),
|
||||
SizedBox(width: 12),
|
||||
Expanded(child: Text(name,
|
||||
style: TextStyle(fontSize: 15, color: Colors.black, fontWeight: FontWeight.w500))),
|
||||
if (iconSelection != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 12),
|
||||
child: SvgPicture.asset(iconSelection!, width: 16, height: 16, fit: BoxFit.fill)),
|
||||
])
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user