Skip to content

Commit

Permalink
Merge pull request #341 from mirea-ninja/release/v1.3.7
Browse files Browse the repository at this point in the history
Release/v1.3.7
  • Loading branch information
0niel authored Sep 22, 2023
2 parents 9f87d04 + e532b95 commit 397b1e5
Show file tree
Hide file tree
Showing 124 changed files with 4,642 additions and 1,748 deletions.
58 changes: 58 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,64 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
# GoogleSignIn does not support arm64 simulators.
# https://github.com/flutter/flutter/issues/85713
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'

# You can enable the permissions needed here. For example to enable camera
# permission, just remove the `#` character in front so it looks like this:
#
# ## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1'
#
# Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler/ios/Classes/PermissionHandlerEnums.h
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',

## dart: PermissionGroup.calendar
# 'PERMISSION_EVENTS=1',

## dart: PermissionGroup.reminders
# 'PERMISSION_REMINDERS=1',

## dart: PermissionGroup.contacts
# 'PERMISSION_CONTACTS=1',

## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1',

## dart: PermissionGroup.microphone
# 'PERMISSION_MICROPHONE=1',

## dart: PermissionGroup.speech
# 'PERMISSION_SPEECH_RECOGNIZER=1',

## dart: PermissionGroup.photos
# 'PERMISSION_PHOTOS=1',

## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
# 'PERMISSION_LOCATION=1',

## dart: PermissionGroup.notification
'PERMISSION_NOTIFICATIONS=1',

## dart: PermissionGroup.mediaLibrary
# 'PERMISSION_MEDIA_LIBRARY=1',

## dart: PermissionGroup.sensors
# 'PERMISSION_SENSORS=1',

## dart: PermissionGroup.bluetooth
# 'PERMISSION_BLUETOOTH=1',

## dart: PermissionGroup.appTrackingTransparency
# 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

## dart: PermissionGroup.criticalAlerts
# 'PERMISSION_CRITICAL_ALERTS=1'
]
end
end
end
$FirebaseAnalyticsWithoutAdIdSupport = true
34 changes: 34 additions & 0 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>510978291920-31sgk97k4bifhc0ebpamk9m46om2e50r.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.510978291920-31sgk97k4bifhc0ebpamk9m46om2e50r</string>
<key>API_KEY</key>
<string>AIzaSyAYZ5JlWF94jBGrcds7fSi5uMN1zmuieec</string>
<key>GCM_SENDER_ID</key>
<string>510978291920</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>mirea.ninja.mireaapp</string>
<key>PROJECT_ID</key>
<string>rtu-mirea-app</string>
<key>STORAGE_BUCKET</key>
<string>rtu-mirea-app.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:510978291920:ios:dd9496a1680c72828c46d5</string>
</dict>
</plist>
6 changes: 6 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FLTEnableImpeller</key>
<false/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand Down Expand Up @@ -61,5 +63,9 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>PermissionGroupNotification</key>
<string>Приложение запрашивает разрешение на отправку уведомлений</string>
</dict>
</plist>
8 changes: 4 additions & 4 deletions lib/common/utils/schedule_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class ScheduleUtils {
"14:20": 4,
"16:20": 5,
"18:00": 6,
"19:40": 7,
"18:30": 7,
"20:10": 8,
"19:40": 8,
"20:10": 9,
};

static Map<String, int> get universityTimesEnd => const {
Expand All @@ -33,9 +33,9 @@ class ScheduleUtils {
"15:50": 4,
"17:50": 5,
"19:30": 6,
"21:00": 7,
"20:00": 7,
"21:40": 8,
"21:00": 8,
"21:40": 9,
};

static bool isCollegeGroup(String group) {
Expand Down
33 changes: 12 additions & 21 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'dart:io' show Platform;
import 'package:auto_route/auto_route.dart';
import 'package:dio/dio.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:rtu_mirea_app/common/oauth.dart';

Expand All @@ -22,13 +22,13 @@ import 'package:rtu_mirea_app/presentation/bloc/map_cubit/map_cubit.dart';
import 'package:rtu_mirea_app/presentation/bloc/news_bloc/news_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/nfc_feedback_bloc/nfc_feedback_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/nfc_pass_bloc/nfc_pass_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/notification_preferences/notification_preferences_bloc.dart';

import 'package:rtu_mirea_app/presentation/bloc/schedule_bloc/schedule_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/scores_bloc/scores_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/stories_bloc/stories_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/update_info_bloc/update_info_bloc.dart';
import 'package:rtu_mirea_app/presentation/bloc/user_bloc/user_bloc.dart';
import 'package:rtu_mirea_app/presentation/core/routes/routes.gr.dart';
import 'package:rtu_mirea_app/presentation/theme.dart';
import 'package:intl/intl_standalone.dart';
import 'package:rtu_mirea_app/service_locator.dart' as dependency_injection;
Expand Down Expand Up @@ -60,14 +60,14 @@ class GlobalBlocObserver extends BlocObserver {
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();

await dependency_injection.setup();

WidgetDataProvider.initData();

await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

await dependency_injection.setup();

WidgetDataProvider.initData();

if (Platform.isAndroid || Platform.isIOS) {
await FirebaseAnalytics.instance.logAppOpen();
}
Expand Down Expand Up @@ -137,10 +137,10 @@ Future<void> main() async {
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);

static final appRouter = AppRouter();

@override
Widget build(BuildContext context) {
final router = getIt<GoRouter>();

// blocking the orientation of the application to
// vertical only
SystemChrome.setPreferredOrientations([
Expand Down Expand Up @@ -182,6 +182,9 @@ class App extends StatelessWidget {
BlocProvider<NfcFeedbackBloc>(
create: (_) => getIt<NfcFeedbackBloc>(),
),
BlocProvider<NotificationPreferencesBloc>(
create: (_) => getIt<NotificationPreferencesBloc>(),
),
],
child: Consumer<AppNotifier>(
builder: (BuildContext context, AppNotifier value, Widget? child) {
Expand All @@ -198,19 +201,7 @@ class App extends StatelessWidget {
locale: const Locale('ru'),
debugShowCheckedModeBanner: false,
title: 'Приложение РТУ МИРЭА',
routerDelegate: appRouter.delegate(
navigatorObservers: () => [
FirebaseAnalyticsObserver(
analytics: FirebaseAnalytics.instance,
),
AutoRouteObserver(),
SentryNavigatorObserver(
autoFinishAfter: const Duration(seconds: 5),
setRouteNameAsTransaction: true),
],
),
routeInformationProvider: appRouter.routeInfoProvider(),
routeInformationParser: appRouter.defaultRouteParser(),
routerConfig: router,
themeMode: AppTheme.themeMode,
theme: AppTheme.theme,
darkTheme: AppTheme.darkTheme,
Expand Down
Loading

0 comments on commit 397b1e5

Please sign in to comment.