header_item.dart 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import 'package:flutter/material.dart';
  2. class HeaderItem extends StatelessWidget {
  3. final String title;
  4. const HeaderItem({Key key, this.title}) : super(key: key);
  5. @override
  6. Widget build(BuildContext context) {
  7. return Column(
  8. crossAxisAlignment: CrossAxisAlignment.start,
  9. children: [
  10. Divider(
  11. color: Color(0xFFBDBDBD),
  12. thickness: 0.1,
  13. ),
  14. Container(
  15. margin: EdgeInsets.only(left: 10, top: 5, right: 10),
  16. child: Row(
  17. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  18. children: [
  19. Text(
  20. title,
  21. style: TextStyle(
  22. fontSize: 18,
  23. color: Color(0xff333333),
  24. fontFamily: 'NotoSansHans-Medium',
  25. ),
  26. ),
  27. Container(
  28. width: 60,
  29. height: 20,
  30. child: TextButton(
  31. child: Text(
  32. '查看更多',
  33. style: TextStyle(
  34. fontSize: 12,
  35. fontFamily: 'NotoSansHans-Regular',
  36. color: Color(0xff666666),
  37. ),
  38. ),
  39. style: ButtonStyle(
  40. padding: MaterialStateProperty.all(EdgeInsets.all(0))),
  41. // borderSide: BorderSide(
  42. // color: Color(0xff333333),
  43. // width: 0.5,
  44. // style: BorderStyle.solid,
  45. // ),
  46. onPressed: () => null,
  47. ),
  48. )
  49. ],
  50. ),
  51. ),
  52. ],
  53. );
  54. }
  55. }