21 lines
463 B
Dart
21 lines
463 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CenterAbout extends StatelessWidget {
|
|
final Offset position;
|
|
final Widget child;
|
|
|
|
const CenterAbout({super.key, required this.position, required this.child});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Positioned(
|
|
top: position.dy,
|
|
left: position.dx,
|
|
child: FractionalTranslation(
|
|
translation: const Offset(-0.5, -0.5),
|
|
child: child,
|
|
),
|
|
);
|
|
}
|
|
}
|