reader_overlayer.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import 'package:flutter/material.dart';
  2. import 'package:intl/intl.dart';
  3. import 'package:shuqi/public.dart';
  4. import 'battery_view.dart';
  5. class ReaderOverlayer extends StatelessWidget {
  6. final Article article;
  7. final int page;
  8. final double topSafeHeight;
  9. ReaderOverlayer({required this.article, required this.page, required this.topSafeHeight});
  10. @override
  11. Widget build(BuildContext context) {
  12. var format = DateFormat('HH:mm');
  13. var time = format.format(DateTime.now());
  14. return Container(
  15. padding: EdgeInsets.fromLTRB(15, 10 + topSafeHeight, 15, 10 + Screen.bottomSafeHeight),
  16. child: Column(
  17. crossAxisAlignment: CrossAxisAlignment.start,
  18. children: <Widget>[
  19. Text(article.title, style: TextStyle(fontSize: fixedFontSize(14), color: SQColor.golden)),
  20. Expanded(child: Container()),
  21. Row(
  22. children: <Widget>[
  23. BatteryView(),
  24. SizedBox(width: 10),
  25. Text(time, style: TextStyle(fontSize: fixedFontSize(11), color: SQColor.golden)),
  26. Expanded(child: Container()),
  27. Text('第${page + 1}页', style: TextStyle(fontSize: fixedFontSize(11), color: SQColor.golden)),
  28. ],
  29. ),
  30. ],
  31. ),
  32. );
  33. }
  34. }