style: verbleibende flutter-analyze Deprecations beheben

withOpacity/activeColor/cacheExtent/PublicRoomsChunk durch die neuen
Flutter-3.44-Äquivalente ersetzt.
This commit is contained in:
Bernd Steckmeister
2026-07-03 09:40:10 +02:00
parent 90593d2f81
commit 057ac1e4ea
6 changed files with 26 additions and 19 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ class _CreateJoinDialogState extends ConsumerState<CreateJoinDialog> {
// Discover
final _discoverServerCtrl = TextEditingController();
final _discoverSearchCtrl = TextEditingController();
List<PublicRoomsChunk> _publicRooms = [];
List<PublishedRoomsChunk> _publicRooms = [];
String? _nextBatch;
bool _discoverLoading = false;
bool _discoverLoadingMore = false;
@@ -911,7 +911,7 @@ class _OptionRow extends StatelessWidget {
Text(label, style: TextStyle(color: pt.fg, fontSize: 13, fontWeight: FontWeight.w500)),
Text(desc, style: TextStyle(color: pt.fgDim, fontSize: 11)),
])),
Switch(value: value, onChanged: onChanged, activeColor: pt.accent),
Switch(value: value, onChanged: onChanged, activeThumbColor: pt.accent),
]),
);
}
@@ -981,7 +981,7 @@ class _ErrorCard extends StatelessWidget {
}
class _PublicRoomItem extends ConsumerWidget {
final PublicRoomsChunk room;
final PublishedRoomsChunk room;
final PyramidTheme pt;
final bool isJoining;
final VoidCallback onJoin;
+4 -5
View File
@@ -127,11 +127,10 @@ class _PyramidPainter extends CustomPainter {
Offset _proj(List<double> v, double sc, double cx, double cy, double tr) =>
Offset(cx + v[0] * sc, cy + (v[1] * cos(tr) + v[2] * sin(tr)) * sc);
Color _darken(Color c, double amount) => Color.fromARGB(
c.alpha,
max(0, (c.red * (1 - amount)).round()),
max(0, (c.green * (1 - amount)).round()),
max(0, (c.blue * (1 - amount)).round()),
Color _darken(Color c, double amount) => c.withValues(
red: max(0.0, c.r * (1 - amount)),
green: max(0.0, c.g * (1 - amount)),
blue: max(0.0, c.b * (1 - amount)),
);
@override