2023-11-06 17:57:03 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Iconica
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
import 'package:flutter_introduction_interface/flutter_introduction_interface.dart';
|
|
|
|
|
|
|
|
class IntroductionService {
|
|
|
|
IntroductionService([IntroductionInterface? dataProvider])
|
|
|
|
: _dataProvider = dataProvider ?? LocalIntroductionDataProvider();
|
|
|
|
|
|
|
|
late final IntroductionInterface _dataProvider;
|
|
|
|
|
2023-11-29 11:54:25 +01:00
|
|
|
Future<void> onSkip() => _dataProvider.setCompleted(value: true);
|
2023-11-06 17:57:03 +01:00
|
|
|
|
2023-11-29 11:54:25 +01:00
|
|
|
Future<void> onComplete() => _dataProvider.setCompleted(value: true);
|
2023-11-06 17:57:03 +01:00
|
|
|
|
2023-11-29 11:54:25 +01:00
|
|
|
Future<bool> shouldShow() => _dataProvider.shouldShow();
|
2023-11-06 17:57:03 +01:00
|
|
|
}
|