replaced print with log in theme_cubit.dart
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:kmobile/config/theme_type.dart';
|
import 'package:kmobile/config/theme_type.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
@@ -17,7 +19,7 @@ class ThemeCubit extends Cubit<ThemeState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> changeTheme(ThemeType type) async {
|
Future<void> changeTheme(ThemeType type) async {
|
||||||
print("Attempting to change theme to: ${type.toString()}");
|
log("Attempting to change theme...");
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
await prefs.setInt('theme_type', type.index);
|
await prefs.setInt('theme_type', type.index);
|
||||||
emit(ThemeState(themeType: type));
|
emit(ThemeState(themeType: type));
|
||||||
|
Reference in New Issue
Block a user