-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from CemTitor/trunk
feat: ActivityTracker name replaced with Pedometer and homepage UI updated
- Loading branch information
Showing
31 changed files
with
425 additions
and
177 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions
16
lib/domain/activity_tracker/activity_tracker_failures.dart
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
lib/domain/activity_tracker/i_activity_tracker_facade.dart
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
lib/domain/activity_tracker/use_cases/get_fetched_step_use_case.dart
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
lib/domain/activity_tracker/use_cases/pedestrian_status_use_case.dart
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
lib/domain/activity_tracker/use_cases/steps_count_stream_use_case.dart
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
import 'package:dartz/dartz.dart'; | ||
import 'package:pedometer/pedometer.dart'; | ||
import 'package:private_fit/domain/pedometer/pedometer_failures.dart'; | ||
|
||
abstract class IPedometerFacade { | ||
Future<Either<PedometerFailures, Unit>> justPlaceHolder(); | ||
Future<void> initPedometer(); | ||
|
||
Stream<StepCount> get stepCountStream; | ||
Stream<PedestrianStatus> get pedestrianStatusStream; | ||
} |
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,16 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'pedometer_failures.freezed.dart'; | ||
|
||
@freezed | ||
class PedometerFailures with _$PedometerFailures { | ||
const factory PedometerFailures.internetNotFound() = _InternetNotFound; | ||
const factory PedometerFailures.failedToGetPermissions() = | ||
_FailedToGetCameraPermissions; | ||
const factory PedometerFailures.internetError() = _InternetError; | ||
const factory PedometerFailures.userCancelled() = _UserCancelled; | ||
const factory PedometerFailures.codeInvalid() = _codeInvalid; | ||
const factory PedometerFailures.onPedestrianStatusError() = | ||
_onPedestrianStatusError; | ||
const factory PedometerFailures.onStepCountError() = _onStepCountError; | ||
} |
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
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
lib/domain/pedometer/use_cases/get_fetched_step_use_case.dart
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,11 @@ | ||
import 'package:injectable/injectable.dart'; | ||
import 'package:private_fit/domain/pedometer/i_pedometer_facade.dart'; | ||
|
||
@lazySingleton | ||
class InitPedometerUseCase { | ||
InitPedometerUseCase(this._iPedometerFacade); | ||
|
||
final IPedometerFacade _iPedometerFacade; | ||
|
||
Future<void> call() => _iPedometerFacade.initPedometer(); | ||
} |
12 changes: 12 additions & 0 deletions
12
lib/domain/pedometer/use_cases/pedestrian_status_use_case.dart
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,12 @@ | ||
import 'package:injectable/injectable.dart'; | ||
import 'package:pedometer/pedometer.dart'; | ||
import 'package:private_fit/domain/pedometer/i_pedometer_facade.dart'; | ||
|
||
@lazySingleton | ||
class PedestrianStatusUseCase { | ||
PedestrianStatusUseCase(this._PedometerFacade); | ||
|
||
final IPedometerFacade _PedometerFacade; | ||
|
||
Stream<PedestrianStatus> call() => _PedometerFacade.pedestrianStatusStream; | ||
} |
13 changes: 13 additions & 0 deletions
13
lib/domain/pedometer/use_cases/steps_count_stream_use_case.dart
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,13 @@ | ||
import 'package:injectable/injectable.dart'; | ||
import 'package:pedometer/pedometer.dart'; | ||
import 'package:private_fit/domain/pedometer/i_pedometer_facade.dart'; | ||
|
||
@lazySingleton | ||
class StepsCountStreamUseCase { | ||
StepsCountStreamUseCase(this._PedometerFacade); | ||
|
||
final IPedometerFacade _PedometerFacade; | ||
|
||
Stream<StepCount> get scs => _PedometerFacade.stepCountStream; | ||
// Stream<StepCount> call() => _PedometerFacade.stepCountStream; | ||
} |
Oops, something went wrong.