ResultOptions constructor
const
ResultOptions({
- double width = 220,
- double height = 50,
- double space = 10,
- Alignment alignment = Alignment.center,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 10),
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
- ResultRender render = ResultRender.all,
- BoxDecoration boxDecoration = const BoxDecoration(color: Color(0xFFFFFFFF), borderRadius: BorderRadius.all(Radius.circular(10)), boxShadow: [BoxShadow(color: Color(0x1a9E9E9E), spreadRadius: 1, blurRadius: 10, offset: Offset(0, 1))]),
- BoxDecoration openBoxDecoration = const BoxDecoration(color: Color(0xFFFFFFFF), borderRadius: BorderRadius.all(Radius.circular(10)), border: Border(top: BorderSide(width: 1, color: Color(0xFF6FCC76)), bottom: BorderSide(width: 1, color: Color(0xFF6FCC76)), left: BorderSide(width: 1, color: Color(0xFF6FCC76)), right: BorderSide(width: 1, color: Color(0xFF6FCC76))), boxShadow: [BoxShadow(color: Color(0x1a9E9E9E), spreadRadius: 1, blurRadius: 10, offset: Offset(0, 1))]),
- BoxDecoration errorBoxDecoration = const BoxDecoration(color: Color(0xFFFFFFFF), borderRadius: BorderRadius.all(Radius.circular(10)), border: Border(top: BorderSide(width: 1, color: Color(0xFFE74C3C)), bottom: BorderSide(width: 1, color: Color(0xFFE74C3C)), left: BorderSide(width: 1, color: Color(0xFFE74C3C)), right: BorderSide(width: 1, color: Color(0xFFE74C3C))), boxShadow: [BoxShadow(color: Color(0x1a9E9E9E), spreadRadius: 1, blurRadius: 10, offset: Offset(0, 1))]),
- TextStyle textStyle = const TextStyle(color: Color(0xff000000), fontSize: 16, fontWeight: FontWeight.w400),
- TextStyle placeholderTextStyle = const TextStyle(color: Color(0xff666666), fontSize: 16, fontWeight: FontWeight.w400),
- Widget? icon = const SizedBox(width: 10, height: 10, child: CustomPaint(painter: DropdownArrowPainter())),
- String? placeholder,
- TextOverflow textOverflow = TextOverflow.ellipsis,
- bool isMarquee = false,
- Duration duration = const Duration(milliseconds: 300),
- Duration marqueeDuration = const Duration(milliseconds: 6000),
- Duration backDuration = const Duration(milliseconds: 800),
- Duration pauseDuration = const Duration(milliseconds: 800),
Implementation
const ResultOptions({
this.width = 220,
this.height = 50,
this.space = 10,
this.alignment = Alignment.center,
this.padding = const EdgeInsets.symmetric(horizontal: 10),
this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
this.render = ResultRender.all,
this.boxDecoration = const BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.all(Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Color(0x1a9E9E9E),
spreadRadius: 1,
blurRadius: 10,
offset: Offset(0, 1),
),
],
),
this.openBoxDecoration = const BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border(
top: BorderSide(width: 1, color: Color(0xFF6FCC76)),
bottom: BorderSide(width: 1, color: Color(0xFF6FCC76)),
left: BorderSide(width: 1, color: Color(0xFF6FCC76)),
right: BorderSide(width: 1, color: Color(0xFF6FCC76)),
),
boxShadow: [
BoxShadow(
color: Color(0x1a9E9E9E),
spreadRadius: 1,
blurRadius: 10,
offset: Offset(0, 1),
),
],
),
this.errorBoxDecoration = const BoxDecoration(
color: Color(0xFFFFFFFF),
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border(
top: BorderSide(width: 1, color: Color(0xFFE74C3C)),
bottom: BorderSide(width: 1, color: Color(0xFFE74C3C)),
left: BorderSide(width: 1, color: Color(0xFFE74C3C)),
right: BorderSide(width: 1, color: Color(0xFFE74C3C)),
),
boxShadow: [
BoxShadow(
color: Color(0x1a9E9E9E),
spreadRadius: 1,
blurRadius: 10,
offset: Offset(0, 1),
),
],
),
this.textStyle = const TextStyle(
color: Color(0xff000000),
fontSize: 16,
fontWeight: FontWeight.w400,
),
this.placeholderTextStyle = const TextStyle(
color: Color(0xff666666),
fontSize: 16,
fontWeight: FontWeight.w400,
),
this.icon = const SizedBox(
width: 10,
height: 10,
child: CustomPaint(
painter: DropdownArrowPainter(),
),
),
this.placeholder,
this.textOverflow = TextOverflow.ellipsis,
this.isMarquee = false,
this.duration = const Duration(milliseconds: 300),
this.marqueeDuration = const Duration(milliseconds: 6000),
this.backDuration = const Duration(milliseconds: 800),
this.pauseDuration = const Duration(milliseconds: 800),
});