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
|
|
@ -90,13 +90,13 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => Matrix.of(context).client.deactivateAccount(
|
||||
auth: AuthenticationPassword(
|
||||
password: input,
|
||||
identifier: AuthenticationUserIdentifier(
|
||||
user: Matrix.of(context).client.userID!,
|
||||
),
|
||||
),
|
||||
auth: AuthenticationPassword(
|
||||
password: input,
|
||||
identifier: AuthenticationUserIdentifier(
|
||||
user: Matrix.of(context).client.userID!,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -104,9 +104,7 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
|
||||
void changeShareKeysWith(ShareKeysWith? shareKeysWith) async {
|
||||
if (shareKeysWith == null) return;
|
||||
AppSettings.shareKeysWith.setItem(
|
||||
shareKeysWith.name,
|
||||
);
|
||||
AppSettings.shareKeysWith.setItem(shareKeysWith.name);
|
||||
Matrix.of(context).client.shareKeysWith = shareKeysWith;
|
||||
setState(() {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,9 @@ class SettingsSecurityView extends StatelessWidget {
|
|||
iconColor: theme.colorScheme.onSurface,
|
||||
child: MaxWidthBody(
|
||||
child: FutureBuilder(
|
||||
future: Matrix.of(context)
|
||||
.client
|
||||
.getCapabilities()
|
||||
.timeout(const Duration(seconds: 10)),
|
||||
future: Matrix.of(
|
||||
context,
|
||||
).client.getCapabilities().timeout(const Duration(seconds: 10)),
|
||||
builder: (context, snapshot) {
|
||||
final capabilities = snapshot.data;
|
||||
final error = snapshot.error;
|
||||
|
|
@ -61,8 +60,9 @@ class SettingsSecurityView extends StatelessWidget {
|
|||
),
|
||||
SettingsSwitchListTile.adaptive(
|
||||
title: L10n.of(context).sendTypingNotifications,
|
||||
subtitle:
|
||||
L10n.of(context).sendTypingNotificationsDescription,
|
||||
subtitle: L10n.of(
|
||||
context,
|
||||
).sendTypingNotificationsDescription,
|
||||
setting: AppSettings.sendTypingNotifications,
|
||||
),
|
||||
SettingsSwitchListTile.adaptive(
|
||||
|
|
@ -103,14 +103,16 @@ class SettingsSecurityView extends StatelessWidget {
|
|||
),
|
||||
ListTile(
|
||||
title: Material(
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppConfig.borderRadius / 2),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConfig.borderRadius / 2,
|
||||
),
|
||||
color: theme.colorScheme.onInverseSurface,
|
||||
child: DropdownButton<ShareKeysWith>(
|
||||
isExpanded: true,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(AppConfig.borderRadius / 2),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConfig.borderRadius / 2,
|
||||
),
|
||||
underline: const SizedBox.shrink(),
|
||||
value: Matrix.of(context).client.shareKeysWith,
|
||||
items: ShareKeysWith.values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue