mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-16 09:28:53 +00:00
24 lines
623 B
Dart
24 lines
623 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import './../messages/steps/dependencies.pb.dart';
|
|
import './../providers/providers.dart';
|
|
|
|
enum DependenciesInstallationState {
|
|
idle,
|
|
installing,
|
|
}
|
|
|
|
class Dependencies with ChangeNotifier {
|
|
DependenciesInstallationState dependeciesState =
|
|
DependenciesInstallationState.idle;
|
|
|
|
Future startInstallation(GameStateProvider gameState) async {
|
|
StartDependenciesInstallation().sendSignalToRust();
|
|
final stream = NotifyDependenciesSuccessfullyInstalled.rustSignalStream;
|
|
await for (final _ in stream) {
|
|
gameState.updateGameState();
|
|
break;
|
|
}
|
|
}
|
|
}
|