me_cell.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import 'package:flutter/material.dart';
  2. import 'package:shuqi/public.dart';
  3. class MeCell extends StatelessWidget {
  4. final VoidCallback? onPressed;
  5. final String iconName;
  6. final String title;
  7. MeCell({required this.title, required this.iconName, this.onPressed});
  8. @override
  9. Widget build(BuildContext context) {
  10. return GestureDetector(
  11. onTap: onPressed,
  12. child: Container(
  13. color: Colors.white,
  14. child: Column(
  15. children: <Widget>[
  16. Container(
  17. color: SQColor.white,
  18. height: 60,
  19. padding: EdgeInsets.symmetric(horizontal: 20),
  20. child: Row(
  21. children: <Widget>[
  22. Image.asset(iconName),
  23. SizedBox(width: 20),
  24. Text(title, style: TextStyle(fontSize: 18)),
  25. Expanded(child: Container()),
  26. Image.asset('assets/img/arrow_right.png'),
  27. ],
  28. ),
  29. ),
  30. Container(
  31. height: 1,
  32. color: SQColor.lightGray,
  33. margin: EdgeInsets.only(left: 60),
  34. ),
  35. ],
  36. ),
  37. ),
  38. );
  39. }
  40. }