import { Injectable } from '@angular/core' ; import { Storage } from "@ionic/storage" ; import { BehaviorSubject } from "rxjs/BehaviorSubject" ; @ Injectable ( ) export class ThemeProvider { theme : BehaviorSubject < boolean > ; constructor ( public storage ) { this . theme = new BehaviorSubject < boolean > ( false ) ; } getActiveTheme ( ) { return this . theme . asObservable ( ) ; } setActiveTheme ( theme ) { this . theme . next ( theme ) ; } }