preview_title.dart 804 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'dart:io';
  2. import 'package:eitc_erm_dental_flutter/exts.dart';
  3. import 'package:flutter/material.dart';
  4. ///预览标题
  5. class PreviewTitle extends StatelessWidget {
  6. final String? title;
  7. const PreviewTitle({super.key, this.title});
  8. @override
  9. Widget build(BuildContext context) {
  10. return Column(
  11. children: [
  12. Row(
  13. children: [
  14. IconButton(
  15. onPressed: () => Navigator.pop(context),
  16. icon: Icon(Platform.isAndroid
  17. ? Icons.arrow_back
  18. : Icons.arrow_back_ios_new),
  19. color: Colors.white,
  20. ),
  21. Text(
  22. title ?? "",
  23. style: context.titleMedium?.copyWith(color: Colors.white),
  24. ),
  25. ],
  26. ),
  27. ],
  28. );
  29. }
  30. }