wt1.0 bug fixing, push notification
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:aitrainer_app/localization/app_language.dart';
|
||||
import 'package:aitrainer_app/model/auth.dart';
|
||||
import 'package:aitrainer_app/model/exercise_type.dart';
|
||||
@@ -40,4 +42,9 @@ class Common {
|
||||
|
||||
return dateName;
|
||||
}
|
||||
|
||||
static String utf8convert(String text) {
|
||||
List<int> bytes = text.toString().codeUnits;
|
||||
return utf8.decode(bytes);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ import 'package:flutter/services.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:aitrainer_app/model/auth.dart';
|
||||
|
||||
import '../push_notifications.dart';
|
||||
|
||||
class Session {
|
||||
|
||||
Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
|
||||
@@ -22,6 +24,7 @@ class Session {
|
||||
_fetchToken(_sharedPreferences, callback);
|
||||
initDeviceLocale();
|
||||
appLanguage.fetchLocale();
|
||||
PushNotificationsManager().init();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user