mirror of
https://github.com/Iconica-Development/flutter_introduction.git
synced 2025-05-19 12:03:44 +02:00
25 lines
616 B
Dart
25 lines
616 B
Dart
|
// 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;
|
||
|
|
||
|
Future<void> onSkip() {
|
||
|
return _dataProvider.setCompleted(true);
|
||
|
}
|
||
|
|
||
|
Future<void> onComplete() {
|
||
|
return _dataProvider.setCompleted(true);
|
||
|
}
|
||
|
|
||
|
Future<bool> shouldShow() {
|
||
|
return _dataProvider.shouldShow();
|
||
|
}
|
||
|
}
|