flutter_introduction/packages/flutter_introduction_service/lib/src/introduction_service.dart

19 lines
588 B
Dart
Raw Normal View History

// 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-29 11:54:25 +01:00
Future<void> onComplete() => _dataProvider.setCompleted(value: true);
2023-11-29 11:54:25 +01:00
Future<bool> shouldShow() => _dataProvider.shouldShow();
}