-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b34ead
commit 97ca437
Showing
8 changed files
with
330 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import 'dart:collection'; | ||
|
||
import 'package:desktop_adb_file_browser/riverpod/selected_device.dart'; | ||
import 'package:desktop_adb_file_browser/utils/adb.dart'; | ||
import 'package:desktop_adb_file_browser/utils/stack.dart'; | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
import 'package:trace/trace.dart'; | ||
|
||
part 'package_list.g.dart'; | ||
part 'package_list.freezed.dart'; | ||
|
||
@freezed | ||
class PackageMetadata with _$PackageMetadata { | ||
const factory PackageMetadata({ | ||
required String packageName, | ||
required String packageId, | ||
required String version, | ||
required String groupId, | ||
}) = _PackageMetadata; | ||
} | ||
|
||
@riverpod | ||
class PackageList extends _$PackageList { | ||
@override | ||
Future<List<String>> build() async { | ||
final serial = ref.watch(selectedDeviceProvider); | ||
|
||
return Adb.getPackageList(serial?.serialName); | ||
} | ||
|
||
void installToDevice(String path) {} | ||
|
||
void deletePackage(String id) {} | ||
} | ||
|
||
@riverpod | ||
Future<PackageMetadata> packageInfo(PackageInfoRef ref, String id) async { | ||
final device = ref.watch(selectedDeviceProvider); | ||
|
||
return PackageMetadata( | ||
packageId: id, | ||
groupId: "", | ||
packageName: "", | ||
version: "", | ||
); | ||
} |
File renamed without changes.
Oops, something went wrong.