35 lines
838 B
Dart
35 lines
838 B
Dart
// Author: fruit.com.cn
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// Shared floating action used to leave clear-screen mode.
|
|
class ExitClearScreenButton extends StatelessWidget {
|
|
const ExitClearScreenButton({
|
|
super.key,
|
|
required this.tooltip,
|
|
required this.onPressed,
|
|
});
|
|
|
|
final String tooltip;
|
|
final VoidCallback onPressed;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: 36,
|
|
height: 36,
|
|
child: IconButton(
|
|
tooltip: tooltip,
|
|
onPressed: onPressed,
|
|
padding: EdgeInsets.zero,
|
|
style: IconButton.styleFrom(
|
|
backgroundColor: const Color(0x80000000),
|
|
foregroundColor: Colors.white,
|
|
shape: const CircleBorder(),
|
|
),
|
|
icon: const Icon(Icons.fullscreen_exit_rounded, size: 18),
|
|
),
|
|
);
|
|
}
|
|
}
|