factor:布局颜色重构
This commit is contained in:
26
lib/layout/app_floating_button.dart
Normal file
26
lib/layout/app_floating_button.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppFloatingButton extends StatelessWidget {
|
||||
final VoidCallback onPressed;
|
||||
|
||||
const AppFloatingButton({super.key, required this.onPressed});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FloatingActionButton(
|
||||
onPressed: onPressed,
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
shape: CircleBorder(),
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
child: Icon(Icons.add, color: Colors.white, size: 36),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user