refactor: Added and applied require_trailing_commas linter rule

This commit is contained in:
Malin Errenst 2023-03-02 10:57:52 +01:00
commit ec7acc5385
112 changed files with 3466 additions and 2855 deletions

View file

@ -35,7 +35,8 @@ class DevicesSettingsView extends StatelessWidget {
}
if (!snapshot.hasData || controller.devices == null) {
return const Center(
child: CircularProgressIndicator.adaptive(strokeWidth: 2));
child: CircularProgressIndicator.adaptive(strokeWidth: 2),
);
}
return ListView.builder(
itemCount: controller.notThisDevice.length + 1,
@ -63,12 +64,14 @@ class DevicesSettingsView extends StatelessWidget {
),
trailing: controller.loadingDeletingDevices
? const CircularProgressIndicator.adaptive(
strokeWidth: 2)
strokeWidth: 2,
)
: const Icon(Icons.delete_outline),
onTap: controller.loadingDeletingDevices
? null
: () => controller.removeDevicesAction(
controller.notThisDevice),
controller.notThisDevice,
),
)
else
Center(

View file

@ -135,8 +135,9 @@ class UserDeviceListItem extends StatelessWidget {
),
subtitle: Text(
L10n.of(context)!.lastActiveAgo(
DateTime.fromMillisecondsSinceEpoch(userDevice.lastSeenTs ?? 0)
.localizedTimeShort(context)),
DateTime.fromMillisecondsSinceEpoch(userDevice.lastSeenTs ?? 0)
.localizedTimeShort(context),
),
style: const TextStyle(fontWeight: FontWeight.w300),
),
);