mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-31 21:00:15 +02:00
Dart fix + Flutter upgrade
This commit is contained in:
@@ -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, {
|
||||
|
@@ -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']!;
|
||||
|
@@ -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();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user