ResultOptions constructor

const ResultOptions({
  1. double width = 220,
  2. double height = 50,
  3. double space = 10,
  4. Alignment alignment = Alignment.center,
  5. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 10),
  6. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
  7. ResultRender render = ResultRender.all,
  8. 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))]),
  9. 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))]),
  10. 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))]),
  11. TextStyle textStyle = const TextStyle(color: Color(0xff000000), fontSize: 16, fontWeight: FontWeight.w400),
  12. TextStyle placeholderTextStyle = const TextStyle(color: Color(0xff666666), fontSize: 16, fontWeight: FontWeight.w400),
  13. Widget? icon = const SizedBox(width: 10, height: 10, child: CustomPaint(painter: DropdownArrowPainter())),
  14. String? placeholder,
  15. TextOverflow textOverflow = TextOverflow.ellipsis,
  16. bool isMarquee = false,
  17. Duration duration = const Duration(milliseconds: 300),
  18. Duration marqueeDuration = const Duration(milliseconds: 6000),
  19. Duration backDuration = const Duration(milliseconds: 800),
  20. 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),
});