header_item.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: OutlineButton(
  31. padding: EdgeInsets.all(0),
  32. child: Text(
  33. '查看更多',
  34. style: TextStyle(
  35. fontSize: 12,
  36. fontFamily: 'NotoSansHans-Regular',
  37. color: Color(0xff666666),
  38. ),
  39. ),
  40. borderSide: BorderSide(
  41. color: Color(0xff333333),
  42. width: 0.5,
  43. style: BorderStyle.solid,
  44. ),
  45. onPressed: () => null,
  46. ),
  47. )
  48. ],
  49. ),
  50. ),
  51. ],
  52. );
  53. }
  54. }