novel_detail_toolbar.dart 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import 'package:flutter/material.dart';
  2. import 'package:shuqi/public.dart';
  3. class NovelDetailToolbar extends StatelessWidget {
  4. final Novel novel;
  5. NovelDetailToolbar(this.novel);
  6. read() {}
  7. @override
  8. Widget build(BuildContext context) {
  9. return Container(
  10. padding: EdgeInsets.only(bottom: Screen.bottomSafeHeight),
  11. decoration: BoxDecoration(color: Colors.white, boxShadow: Styles.borderShadow),
  12. height: 50 + Screen.bottomSafeHeight,
  13. child: Row(children: <Widget>[
  14. Expanded(
  15. child: Center(
  16. child: Text(
  17. '加书架',
  18. style: TextStyle(fontSize: 16, color: SQColor.primary),
  19. ),
  20. ),
  21. ),
  22. Expanded(
  23. child: GestureDetector(
  24. onTap: () {
  25. AppNavigator.pushReader(context, novel.firstArticleId);
  26. },
  27. child: Container(
  28. height: 40,
  29. decoration: BoxDecoration(color: SQColor.primary, borderRadius: BorderRadius.circular(5)),
  30. child: Center(
  31. child: Text(
  32. '开始阅读',
  33. style: TextStyle(fontSize: 16, color: Colors.white),
  34. ),
  35. ),
  36. ),
  37. ),
  38. ),
  39. Expanded(
  40. child: Center(
  41. child: Text(
  42. '下载',
  43. style: TextStyle(fontSize: 16, color: SQColor.primary),
  44. ),
  45. ),
  46. ),
  47. ]),
  48. );
  49. }
  50. }