Dart fix + Flutter upgrade

This commit is contained in:
Imran Remtulla
2025-06-13 17:07:09 -04:00
parent e0c69b9cf4
commit 7d9a641e24
18 changed files with 53 additions and 52 deletions

View File

@@ -39,7 +39,7 @@ class AddAppPageState extends State<AddAppPage> {
int urlInputKey = 0;
SourceProvider sourceProvider = SourceProvider();
linkFn(String input) {
void linkFn(String input) {
try {
if (input.isEmpty) {
throw UnsupportedURLError();
@@ -51,7 +51,7 @@ class AddAppPageState extends State<AddAppPage> {
}
}
changeUserInput(
void changeUserInput(
String input,
bool valid,
bool isBuilding, {

View File

@@ -26,7 +26,7 @@ class AppsPage extends StatefulWidget {
State<AppsPage> createState() => AppsPageState();
}
showChangeLogDialog(
void showChangeLogDialog(
BuildContext context,
App app,
String? changesUrl,
@@ -100,7 +100,7 @@ showChangeLogDialog(
);
}
getChangeLogFn(BuildContext context, App app) {
Null Function()? getChangeLogFn(BuildContext context, App app) {
AppSource appSource = SourceProvider().getSource(
app.url,
overrideSource: app.overrideSource,
@@ -138,7 +138,7 @@ class AppsPageState extends State<AppsPage> {
Set<String> selectedAppIds = {};
DateTime? refreshingSince;
clearSelected() {
bool clearSelected() {
if (selectedAppIds.isNotEmpty) {
setState(() {
selectedAppIds.clear();
@@ -148,7 +148,7 @@ class AppsPageState extends State<AppsPage> {
return false;
}
selectThese(List<App> apps) {
void selectThese(List<App> apps) {
if (selectedAppIds.isEmpty) {
setState(() {
for (var a in apps) {
@@ -1063,6 +1063,7 @@ class AppsPageState extends State<AppsPage> {
globalNavigatorKey.currentContext ?? context,
)
.catchError(
// ignore: invalid_return_type_for_catch_error
(e) => showError(
e,
globalNavigatorKey.currentContext ?? context,
@@ -1317,7 +1318,7 @@ class AppsFilter {
};
}
setFormValuesFromMap(Map<String, dynamic> values) {
void setFormValuesFromMap(Map<String, dynamic> values) {
nameFilter = values['appName']!;
authorFilter = values['author']!;
idFilter = values['appId']!;

View File

@@ -229,7 +229,7 @@ class _HomePageState extends State<HomePage> {
});
}
setIsReversing(int targetIndex) {
void setIsReversing(int targetIndex) {
bool reversing =
selectedIndexHistory.isNotEmpty &&
selectedIndexHistory.last > targetIndex;
@@ -238,7 +238,7 @@ class _HomePageState extends State<HomePage> {
});
}
switchToPage(int index) async {
Future<void> switchToPage(int index) async {
setIsReversing(index);
if (index == 0) {
while ((pages[0].widget.key as GlobalKey<AppsPageState>).currentState !=
@@ -340,8 +340,8 @@ class _HomePageState extends State<HomePage> {
});
return false;
}
return !(pages[0].widget.key as GlobalKey<AppsPageState>).currentState
?.clearSelected();
return !(pages[0].widget.key as GlobalKey<AppsPageState>).currentState!
.clearSelected();
},
);
}

View File

@@ -695,7 +695,7 @@ class _SelectionModalState extends State<SelectionModal> {
}
}
selectOnlyOne(String url) {
void selectOnlyOne(String url) {
for (var e in entrySelections.keys) {
entrySelections[e] = e.key == url;
}