Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install flutter dependencies
run: |
sudo apt-get update -y && sudo apt-get upgrade -y;
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linux-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
artifact_name: outlet-linux-arm64
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install flutter dependencies
run: |
sudo apt-get update -y;
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/appstream.dart"]
path = lib/appstream.dart
url = git@github.com:jardon/appstream.dart.git
30 changes: 30 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
analyzer:
exclude:
- lib/appstream.dart
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
1 change: 1 addition & 0 deletions lib/appstream.dart
Submodule appstream.dart added at d0b847
30 changes: 14 additions & 16 deletions lib/backends/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import 'dart:core';
import 'package:outlet/backends/flatpak_backend.dart';
import 'package:outlet/core/application.dart';
import 'package:outlet/core/flatpak_application.dart';
import 'package:outlet/appstream.dart/lib/appstream.dart';

interface class Backend {
Map<String, Application> getInstalledPackages() {
return {};
List<String> getInstalledPackages() {
return [];
}

Future<Map<String, Application>> getAllRemotePackages() async {
Expand Down Expand Up @@ -44,22 +45,19 @@ class TestBackend implements Backend {
_pickRandomCategories(categoriesList, 2, random);

apps[appId] = FlatpakApplication(
name: "App $i",
name: {"C": "App $i"},
id: appId,
icon: "lib/views/assets/flatpak-icon.svg",
description: "Description for App $i",
icons: const [AppstreamLocalIcon("lib/views/assets/flatpak-icon.svg")],
description: {"C": "Description for App $i"},
package: null,
summary: {"C": "Summary text for App $i"},
type: AppstreamComponentType.generic,
categories: pickedCategories, // Randomly picked categories
installed: random.nextBool(),
verified: random.nextBool(),
featured: random.nextBool(),
reviews: [
{
"title": "Review for App $i",
"rating": random.nextInt(5) +
1, // Random rating between 1 and 5 for review
"message": "This is a review message for App $i.",
}
custom: [
{'flathub::verification::verified': "${random.nextBool()}"}
],
featured: random.nextBool(),
);
}
}
Expand All @@ -71,8 +69,8 @@ class TestBackend implements Backend {
}

@override
Map<String, Application> getInstalledPackages() {
return apps;
List<String> getInstalledPackages() {
return ['app-3', 'app-7'];
}

@override
Expand Down
Loading