store_select_text_item.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'package:flutter/material.dart';
  2. import 'package:liftmanager/res/resources.dart';
  3. class StoreSelectTextItem extends StatelessWidget {
  4. const StoreSelectTextItem({
  5. Key key,
  6. this.onTap,
  7. @required this.title,
  8. this.content: "",
  9. this.textAlign: TextAlign.start,
  10. this.style
  11. }): super(key: key);
  12. final GestureTapCallback onTap;
  13. final String title;
  14. final String content;
  15. final TextAlign textAlign;
  16. final TextStyle style;
  17. @override
  18. Widget build(BuildContext context) {
  19. return InkWell(
  20. onTap: onTap,
  21. child: Container(
  22. height: 50.0,
  23. margin: const EdgeInsets.only(right: 8.0, left: 16.0),
  24. width: double.infinity,
  25. decoration: BoxDecoration(
  26. border: Border(
  27. bottom: Divider.createBorderSide(context, width: 0.6),
  28. )
  29. ),
  30. child: Row(
  31. children: <Widget>[
  32. Text(title),
  33. Expanded(
  34. flex: 1,
  35. child: Padding(
  36. padding: const EdgeInsets.only(right: 8.0, left: 16.0),
  37. child: Text(
  38. content,
  39. maxLines: 2,
  40. textAlign: textAlign,
  41. overflow: TextOverflow.ellipsis,
  42. style: style
  43. ),
  44. ),
  45. ),
  46. Images.arrowRight
  47. ],
  48. ),
  49. ),
  50. );
  51. }
  52. }