add centering and focus capabilities

This commit is contained in:
2025-07-06 03:53:18 +00:00
parent b18ef006af
commit 10bb69a15f
8 changed files with 224 additions and 46 deletions
+18
View File
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
extension SizeOps on Size {
Size operator /(double scalar) {
if (scalar == 0) {
throw ArgumentError('Division by zero is not allowed.');
}
return Size(width / scalar, height / scalar);
}
Size operator *(double scalar) {
return Size(width * scalar, height * scalar);
}
Offset toOffset() {
return Offset(width, height);
}
}