import 'dart:io'; import 'package:flutter/material.dart'; ///预览标题 class PreviewTitle extends StatelessWidget { final String? title; const PreviewTitle({super.key, this.title}); @override Widget build(BuildContext context) { return Column( children: [ Row( children: [ IconButton( onPressed: () => Navigator.pop(context), icon: Icon(Platform.isAndroid ? Icons.arrow_back : Icons.arrow_back_ios_new), color: Colors.white, ), Text( title ?? "", style: Theme.of(context) .textTheme .titleMedium ?.copyWith(color: Colors.white), ), ], ), ], ); } }