commit
2666c2b01d
@ -0,0 +1,8 @@
|
|||||||
|
<svg id="user_21_" data-name="user (21)" xmlns="http://www.w3.org/2000/svg" width="110.999" height="110.999" viewBox="0 0 110.999 110.999">
|
||||||
|
<path id="Path_4696" data-name="Path 4696" d="M272.482,267.883a25.756,25.756,0,0,0,5.549-15.868,26.015,26.015,0,1,0-26.015,26.015,25.756,25.756,0,0,0,15.868-5.549l14.569,14.569a3.252,3.252,0,1,0,4.6-4.6ZM260.818,256.22a3.252,3.252,0,1,1-4.6,4.6l-4.2-4.2-4.2,4.2a3.252,3.252,0,0,1-4.6-4.6l4.2-4.2-4.2-4.2a3.252,3.252,0,0,1,4.6-4.6l4.2,4.2,4.2-4.2a3.252,3.252,0,1,1,4.6,4.6l-4.2,4.2Z" transform="translate(-177.004 -177.004)" fill="#ddd"/>
|
||||||
|
<circle id="Ellipse_165" data-name="Ellipse 165" cx="3.5" cy="3.5" r="3.5" transform="translate(35.5 19.499)" fill="#ddd"/>
|
||||||
|
<path id="Path_4697" data-name="Path 4697" d="M197.516,362h0Z" transform="translate(-154.695 -283.52)" fill="#ddd"/>
|
||||||
|
<path id="Path_4698" data-name="Path 4698" d="M197.516,332h0Z" transform="translate(-154.695 -260.021)" fill="#ddd"/>
|
||||||
|
<path id="Path_4699" data-name="Path 4699" d="M3.252,111H75.011a3.25,3.25,0,0,0,3.252-3.252v-.329a31.763,31.763,0,0,1-3.252.329,32.393,32.393,0,0,1-23.165-9.756H16.476a3.252,3.252,0,0,1,0-6.5H47.016v0a32.2,32.2,0,0,1-2.865-6.507H16.476a3.252,3.252,0,0,1,0-6.5H42.821c-.454-4.484-.454-2.022,0-6.5H16.476a3.252,3.252,0,1,1,0-6.5H44.152a32.468,32.468,0,0,1,7.694-13.009H26.232a3.25,3.25,0,0,1-3.252-3.252V45.96A13.021,13.021,0,0,1,35.988,32.953H39.24A9.756,9.756,0,1,1,49,23.2a9.767,9.767,0,0,1-9.756,9.756h3.252A13.021,13.021,0,0,1,55.5,45.96v3.252c0,.071-.036.13-.04.2a32.2,32.2,0,0,1,19.552-6.7,31.762,31.762,0,0,1,3.252.329V3.252A3.25,3.25,0,0,0,75.011,0H3.252A3.25,3.25,0,0,0,0,3.252v104.5A3.25,3.25,0,0,0,3.252,111Z" fill="#ddd"/>
|
||||||
|
<path id="Path_4700" data-name="Path 4700" d="M142.5,182a6.512,6.512,0,0,0-6.5,6.5h19.512a6.512,6.512,0,0,0-6.5-6.5Z" transform="translate(-106.516 -142.543)" fill="#ddd"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,57 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||||
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
|
import 'package:smooth_corner/smooth_corner.dart';
|
||||||
|
|
||||||
|
class AppCustomChipWidget extends StatelessWidget {
|
||||||
|
AppCustomChipWidget({
|
||||||
|
super.key,
|
||||||
|
required this.labelText,
|
||||||
|
this.textColor = AppColors.textColor,
|
||||||
|
this.backgroundColor = AppColors.greyColor,
|
||||||
|
this.iconSize = 12,
|
||||||
|
this.icon = "",
|
||||||
|
this.iconColor = AppColors.textColor,
|
||||||
|
});
|
||||||
|
|
||||||
|
String? labelText;
|
||||||
|
Color? textColor;
|
||||||
|
Color? backgroundColor;
|
||||||
|
num iconSize;
|
||||||
|
String icon;
|
||||||
|
Color iconColor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ChipTheme(
|
||||||
|
data: ChipThemeData(
|
||||||
|
padding: EdgeInsets.all(0.0),
|
||||||
|
shape: SmoothRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 0.0,
|
||||||
|
color: Colors.transparent, // Crucially, set color to transparent
|
||||||
|
style: BorderStyle.none,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0), // Apply a border radius of 16.0
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: icon.isNotEmpty
|
||||||
|
? Chip(
|
||||||
|
avatar: icon.isNotEmpty ? Utils.buildSvgWithAssets(icon: icon, width: iconSize.h, height: iconSize.h, iconColor: iconColor) : SizedBox.shrink(),
|
||||||
|
label: labelText!.toText10(weight: FontWeight.w500, letterSpacing: -0.64, color: textColor),
|
||||||
|
padding: EdgeInsets.all(0.0),
|
||||||
|
labelPadding: EdgeInsets.only(left: -4.h, right: 8.h),
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
)
|
||||||
|
: Chip(
|
||||||
|
label: labelText!.toText10(weight: FontWeight.w500, letterSpacing: -0.64, color: textColor),
|
||||||
|
padding: EdgeInsets.all(0.0),
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue