You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
533 B
14 lines
533 B
import 'package:flutter/material.dart';
|
|
|
|
class CustomFloatingActionButtonLocation extends FloatingActionButtonLocation {
|
|
FloatingActionButtonLocation location;
|
|
double offsetX; // X方向的偏移量
|
|
double offsetY; // Y方向的偏移量
|
|
CustomFloatingActionButtonLocation(this.location, this.offsetX, this.offsetY);
|
|
|
|
@override
|
|
Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry) {
|
|
Offset offset = location.getOffset(scaffoldGeometry);
|
|
return Offset(offset.dx + offsetX, offset.dy + offsetY);
|
|
}
|
|
} |