mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
16 lines
338 B
Dart
16 lines
338 B
Dart
import 'package:flutter/widgets.dart';
|
|
|
|
extension WidgetExt on Widget {
|
|
Widget constraintWidth({
|
|
BoxConstraints constraints = const BoxConstraints(maxWidth: 625),
|
|
}) {
|
|
return Align(
|
|
alignment: Alignment.topCenter,
|
|
child: ConstrainedBox(
|
|
constraints: constraints,
|
|
child: this,
|
|
),
|
|
);
|
|
}
|
|
}
|