refactor: Update to Dart 3.10 with . shorthands
This commit is contained in:
parent
75a37f3f7c
commit
1ea649f01e
167 changed files with 3351 additions and 3912 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue