refactor: Added and applied require_trailing_commas linter rule
This commit is contained in:
parent
adb3f766e5
commit
ec7acc5385
112 changed files with 3466 additions and 2855 deletions
|
|
@ -51,10 +51,11 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
Hive.openBox('test').then((value) => null).catchError(
|
||||
(e, s) async {
|
||||
await showOkAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context)!.indexedDbErrorTitle,
|
||||
message: L10n.of(context)!.indexedDbErrorLong,
|
||||
onWillPop: () async => false);
|
||||
context: context,
|
||||
title: L10n.of(context)!.indexedDbErrorTitle,
|
||||
message: L10n.of(context)!.indexedDbErrorLong,
|
||||
onWillPop: () async => false,
|
||||
);
|
||||
_checkTorBrowser();
|
||||
},
|
||||
);
|
||||
|
|
@ -85,9 +86,11 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
});
|
||||
|
||||
List<HomeserverBenchmarkResult> get filteredHomeservers => benchmarkResults!
|
||||
.where((element) =>
|
||||
element.homeserver.baseUrl.host.contains(searchTerm) ||
|
||||
(element.homeserver.description?.contains(searchTerm) ?? false))
|
||||
.where(
|
||||
(element) =>
|
||||
element.homeserver.baseUrl.host.contains(searchTerm) ||
|
||||
(element.homeserver.description?.contains(searchTerm) ?? false),
|
||||
)
|
||||
.toList();
|
||||
|
||||
void _loadHomeserverList() async {
|
||||
|
|
@ -186,15 +189,16 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
final file = await FilePickerCross.importFromStorage();
|
||||
if (file.fileName == null) return;
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () async {
|
||||
try {
|
||||
final client = Matrix.of(context).getLoginClient();
|
||||
await client.importDump(file.toString());
|
||||
Matrix.of(context).initMatrix();
|
||||
} catch (e, s) {
|
||||
Logs().e('Future error:', e, s);
|
||||
}
|
||||
});
|
||||
context: context,
|
||||
future: () async {
|
||||
try {
|
||||
final client = Matrix.of(context).getLoginClient();
|
||||
await client.importDump(file.toString());
|
||||
Matrix.of(context).initMatrix();
|
||||
} catch (e, s) {
|
||||
Logs().e('Future error:', e, s);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue