绘制点集
This commit is contained in:
41
lib/paper/paper_app_bar.dart
Normal file
41
lib/paper/paper_app_bar.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class PaperAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
final VoidCallback onClear;
|
||||
|
||||
const PaperAppBar({
|
||||
Key? key,
|
||||
required this.onClear,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
centerTitle: true,
|
||||
elevation: 0,
|
||||
systemOverlayStyle: const SystemUiOverlayStyle(
|
||||
statusBarIconBrightness: Brightness.dark,
|
||||
statusBarColor: Colors.transparent),
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'画板绘制',
|
||||
style: TextStyle(color: Colors.black, fontSize: 16),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
splashRadius: 20,
|
||||
onPressed: onClear,
|
||||
icon: Icon(
|
||||
CupertinoIcons.delete,
|
||||
color: Colors.black,
|
||||
size: 20,
|
||||
))
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
||||
}
|
||||
Reference in New Issue
Block a user