refactor: Update to Dart 3.10 with . shorthands

This commit is contained in:
Christian Kußowski 2025-11-30 12:54:06 +01:00
commit 1ea649f01e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
167 changed files with 3351 additions and 3912 deletions

View file

@ -55,13 +55,11 @@ class SettingsPasswordController extends State<SettingsPassword> {
try {
final scaffoldMessenger = ScaffoldMessenger.of(context);
await Matrix.of(context).client.changePassword(
newPassword1Controller.text,
oldPassword: oldPasswordController.text,
);
newPassword1Controller.text,
oldPassword: oldPasswordController.text,
);
scaffoldMessenger.showSnackBar(
SnackBar(
content: Text(L10n.of(context).passwordHasBeenChanged),
),
SnackBar(content: Text(L10n.of(context).passwordHasBeenChanged)),
);
if (mounted) context.pop();
} catch (e) {

View file

@ -15,9 +15,7 @@ class SettingsPasswordView extends StatelessWidget {
final theme = Theme.of(context);
return Scaffold(
appBar: AppBar(
title: Text(L10n.of(context).changePassword),
),
appBar: AppBar(title: Text(L10n.of(context).changePassword)),
body: ListTileTheme(
iconColor: theme.colorScheme.onSurface,
child: MaxWidthBody(
@ -69,8 +67,9 @@ class SettingsPasswordView extends StatelessWidget {
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed:
controller.loading ? null : controller.changePassword,
onPressed: controller.loading
? null
: controller.changePassword,
child: controller.loading
? const LinearProgressIndicator()
: Text(L10n.of(context).changePassword),