refactor(theme&ui): improve theme switching and navigation styling
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sfm_app/product/base/bloc/base_bloc.dart';
|
||||
import 'package:sfm_app/product/constant/enums/app_theme_enums.dart';
|
||||
|
||||
import '../bell/bell_model.dart';
|
||||
|
||||
@@ -14,6 +15,10 @@ class MainBloc extends BlocBase {
|
||||
final language = StreamController<Locale?>.broadcast();
|
||||
StreamSink<Locale?> get sinkLanguage => language.sink;
|
||||
Stream<Locale?> get streamLanguage => language.stream;
|
||||
|
||||
final theme = StreamController<ThemeData?>.broadcast();
|
||||
StreamSink<ThemeData?> get sinkTheme => theme.sink;
|
||||
Stream<ThemeData?> get streamTheme => theme.stream;
|
||||
|
||||
final themeMode = StreamController<bool>.broadcast();
|
||||
StreamSink<bool> get sinkThemeMode => themeMode.sink;
|
||||
|
||||
Reference in New Issue
Block a user