diff --git a/.gitignore b/.gitignore
index 5be27ae..24476c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
# Miscellaneous
*.class
-*.lock
*.log
*.pyc
*.swp
@@ -9,6 +8,7 @@
.buildlog/
.history
.svn/
+migrate_working_dir/
# IntelliJ related
*.iml
@@ -16,56 +16,29 @@
*.iws
.idea/
-# Visual Studio Code related
-.vscode/
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
+**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
+.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
-build/
+/build/
-# Android related
-**/android/**/gradle-wrapper.jar
-**/android/.gradle
-**/android/captures/
-**/android/gradlew
-**/android/gradlew.bat
-**/android/local.properties
-**/android/**/GeneratedPluginRegistrant.java
+# Symbolication related
+app.*.symbols
-# iOS/XCode related
-**/ios/**/*.mode1v3
-**/ios/**/*.mode2v3
-**/ios/**/*.moved-aside
-**/ios/**/*.pbxuser
-**/ios/**/*.perspectivev3
-**/ios/**/*sync/
-**/ios/**/.sconsign.dblite
-**/ios/**/.tags*
-**/ios/**/.vagrant/
-**/ios/**/DerivedData/
-**/ios/**/Icon?
-**/ios/**/Pods/
-**/ios/**/.symlinks/
-**/ios/**/profile
-**/ios/**/xcuserdata
-**/ios/.generated/
-**/ios/Flutter/App.framework
-**/ios/Flutter/Flutter.framework
-**/ios/Flutter/Generated.xcconfig
-**/ios/Flutter/app.flx
-**/ios/Flutter/app.zip
-**/ios/Flutter/flutter_assets/
-**/ios/ServiceDefinitions.json
-**/ios/Runner/GeneratedPluginRegistrant.*
+# Obfuscation related
+app.*.map.json
-# Exceptions to above rules.
-!**/ios/**/default.mode1v3
-!**/ios/**/default.mode2v3
-!**/ios/**/default.pbxuser
-!**/ios/**/default.perspectivev3
-!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
\ No newline at end of file
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index ed83ee2..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "shared_preferences_suite_name"]
- path = shared_preferences_suite_name
- url = git://github.com/CoolONEOfficial/shared_preferences_suite_name.git
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..14f5fc9
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,33 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled.
+
+version:
+ revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ - platform: android
+ create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ - platform: ios
+ create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+ base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 86f83bc..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-os:
- - linux
-sudo: false
-addons:
- apt:
- # Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
- sources:
- - ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
- packages:
- - libstdc++6
- - fonts-droid-fallback
-before_script:
- - git clone https://github.com/flutter/flutter.git -b master
- - ./flutter/bin/flutter doctor
-script:
- - ./flutter/bin/flutter test
-cache:
- directories:
- - $HOME/.pub-cache
\ No newline at end of file
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..61b6c4d
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1a1f2e8..93eec8c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -22,46 +22,43 @@ if (flutterVersionName == null) {
}
apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
-def keystoreProperties = new Properties()
-def keystorePropertiesFile = rootProject.file('key.properties')
-if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
-}
-
android {
- compileSdkVersion 28
+ namespace "ru.coolone.ranepatimetable"
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
- lintOptions {
- disable 'InvalidPackage'
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ru.coolone.ranepatimetable"
- minSdkVersion 19
- targetSdkVersion 28
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
- signingConfigs {
- release {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- }
buildTypes {
release {
- signingConfig signingConfigs.release
-
- minifyEnabled true
- useProguard false
-
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
}
}
}
@@ -71,14 +68,12 @@ flutter {
}
dependencies {
- def room_version = "2.2.3"
- implementation "androidx.room:room-runtime:$room_version"
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- annotationProcessor "androidx.room:room-compiler:$room_version"
- compileOnly 'org.projectlombok:lombok:1.18.6'
- annotationProcessor 'org.projectlombok:lombok:1.18.6'
- implementation 'com.google.code.gson:gson:2.8.5'
- implementation 'com.nabinbhandari.android:permissions:3.8'
- implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'
- testImplementation 'junit:junit:4.12'
+ constraints {
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
+ because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
+ }
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
+ because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
+ }
+ }
}
diff --git a/android/app/gradle.properties b/android/app/gradle.properties
deleted file mode 100644
index 646c51b..0000000
--- a/android/app/gradle.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-android.useAndroidX=true
-android.enableJetifier=true
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
deleted file mode 100644
index dc15837..0000000
--- a/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-#Flutter Wrapper
--keep class io.flutter.app.** { *; }
--keep class io.flutter.plugin.** { *; }
--keep class io.flutter.util.** { *; }
--keep class io.flutter.view.** { *; }
--keep class io.flutter.** { *; }
--keep class io.flutter.plugins.** { *; }
--keep class com.builttoroam.devicecalendar.** { *; }
--keep class ru.coolone.ranepatimetable.** { *; }
\ No newline at end of file
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 9b38f7f..6856f8f 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,77 +1,33 @@
-
-
-
-
-
-
-
-
-
-
+
+ android:label="ranepatimetable"
+ android:name="${applicationName}"
+ android:icon="@mipmap/ic_launcher">
-
-
+
-
+ android:name="io.flutter.embedding.android.NormalTheme"
+ android:resource="@style/NormalTheme"
+ />
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
diff --git a/android/app/src/main/assets/fonts/TimetableIcons.ttf b/android/app/src/main/assets/fonts/TimetableIcons.ttf
deleted file mode 100644
index 9f1582d..0000000
Binary files a/android/app/src/main/assets/fonts/TimetableIcons.ttf and /dev/null differ
diff --git a/android/app/src/main/ic_launcher-web.png b/android/app/src/main/ic_launcher-web.png
deleted file mode 100644
index 6a1cfc1..0000000
Binary files a/android/app/src/main/ic_launcher-web.png and /dev/null differ
diff --git a/android/app/src/main/icicc-web.png b/android/app/src/main/icicc-web.png
deleted file mode 100644
index 6a1cfc1..0000000
Binary files a/android/app/src/main/icicc-web.png and /dev/null differ
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/MainActivity.java b/android/app/src/main/java/ru/coolone/ranepatimetable/MainActivity.java
deleted file mode 100644
index 7f86329..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/MainActivity.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.appwidget.AppWidgetManager;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.os.Bundle;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import io.flutter.app.FlutterActivity;
-import io.flutter.plugin.common.MethodCall;
-import io.flutter.plugin.common.MethodChannel;
-import io.flutter.plugins.GeneratedPluginRegistrant;
-import lombok.var;
-
-@lombok.extern.java.Log
-public class MainActivity extends FlutterActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- GeneratedPluginRegistrant.registerWith(this);
-
- new MethodChannel(getFlutterView(), "ru.coolone.ranepatimetable/methodChannel").setMethodCallHandler(
- (methodCall, result) -> {
- if ("refreshWidget".equals(methodCall.method)) {
- var intent = new Intent(MainActivity.this, WidgetProvider.class);
- intent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
- var ids = AppWidgetManager.getInstance(getApplication())
- .getAppWidgetIds(new ComponentName(getApplication(), WidgetProvider.class));
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, ids);
- sendBroadcast(intent);
- result.success(null);
- } else {
- result.notImplemented();
- }
- }
- );
- }
-
-}
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/Timeline.java b/android/app/src/main/java/ru/coolone/ranepatimetable/Timeline.java
deleted file mode 100644
index a79c5b7..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/Timeline.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.content.ContentValues;
-import android.provider.BaseColumns;
-
-import java.util.Date;
-
-import androidx.room.ColumnInfo;
-import androidx.room.Embedded;
-import androidx.room.Entity;
-import androidx.room.PrimaryKey;
-import androidx.room.TypeConverter;
-import androidx.room.TypeConverters;
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-
-/**
- * Represents one record of the Timeline table.
- */
-@NoArgsConstructor
-@AllArgsConstructor
-@Entity(tableName = Timeline.TABLE_NAME)
-public class Timeline {
-
- @NoArgsConstructor
- @AllArgsConstructor
- public enum Location {
- Academy(0xe81b),
- Hotel(0xe801),
- StudyHostel(0xe802);
-
- int iconCodePoint;
- }
-
- @NoArgsConstructor
- @AllArgsConstructor
- static public class TeacherModel {
- public static final String COLUMN_TEACHER_NAME = "name";
- public static final String COLUMN_TEACHER_SURNAME = "surname";
- public static final String COLUMN_TEACHER_PATRONYMIC = "patronymic";
-
- String name, surname, patronymic;
-
- public static TeacherModel fromContentValues(ContentValues values, String prefix) {
- return new TeacherModel(
- values.getAsString(prefix + COLUMN_TEACHER_NAME),
- values.getAsString(prefix + COLUMN_TEACHER_SURNAME),
- values.getAsString(prefix + COLUMN_TEACHER_PATRONYMIC)
- );
- }
- }
-
- @NoArgsConstructor
- @AllArgsConstructor
- static public class TimeOfDayModel {
- public static final String COLUMN_TIMEOFDAY_HOUR = "hour";
- public static final String COLUMN_TIMEOFDAY_MINUTE = "minute";
-
- int hour, minute;
-
- public static TimeOfDayModel fromContentValues(ContentValues values, String prefix) {
- return new TimeOfDayModel(
- values.getAsInteger(prefix + COLUMN_TIMEOFDAY_HOUR),
- values.getAsInteger(prefix + COLUMN_TIMEOFDAY_MINUTE)
- );
- }
- }
-
- @NoArgsConstructor
- @AllArgsConstructor
- static public class LessonAction {
- public static final String COLUMN_LESSON_TYPE_TITLE = "title";
-
- String title;
- }
-
- @AllArgsConstructor
- @NoArgsConstructor
- static public class LessonModel {
- public static final String PREFIX_LESSON_ACTION = "action_";
-
- public static final String COLUMN_LESSON_TITLE = "title";
- public static final String COLUMN_LESSON_FULL_TITLE = "fullTitle";
- public static final String COLUMN_LESSON_ICON = "iconCodePoint";
-
- String title, fullTitle;
- int iconCodePoint;
- @Embedded(prefix = PREFIX_LESSON_ACTION)
- LessonAction action;
-
- public static LessonModel fromContentValues(ContentValues values, String prefix) {
- return new LessonModel(
- values.getAsString(prefix + COLUMN_LESSON_TITLE),
- values.getAsString(prefix + COLUMN_LESSON_FULL_TITLE),
- values.getAsInteger(prefix + COLUMN_LESSON_ICON),
- new LessonAction(
- values.getAsString(
- prefix
- + PREFIX_LESSON_ACTION
- + LessonAction.COLUMN_LESSON_TYPE_TITLE
- )
- )
- );
- }
- }
-
- @NoArgsConstructor
- @AllArgsConstructor
- static public class RoomModel {
- public static final String COLUMN_ROOM_NUMBER = "number";
- public static final String COLUMN_ROOM_LOCATION = "location";
-
- String number;
-
- @TypeConverters(RoomModel.class)
- Location location;
-
- public static RoomModel fromContentValues(ContentValues values, String prefix) {
- return new RoomModel(
- values.getAsString(prefix + COLUMN_ROOM_NUMBER),
- Location.values()[values.getAsInteger(prefix + COLUMN_ROOM_LOCATION)]
- );
- }
-
- @TypeConverter
- public static Location toLocation(int numeral) {
- return Location.values()[numeral];
- }
-
- @TypeConverter
- public static int fromLocation(Location status) {
- return status.ordinal();
- }
-
- }
-
- /**
- * The name of the Timeline table.
- */
- public static final String TABLE_NAME = "lessons";
-
- public static final String COLUMN_ID = BaseColumns._ID;
- public static final String COLUMN_DATE = "date";
- public static final String COLUMN_GROUP = "group";
- public static final String COLUMN_FIRST = "first";
- public static final String COLUMN_LAST = "last";
- public static final String COLUMN_MERGE_BOTTOM = "mergeBottom";
- public static final String COLUMN_MERGE_TOP = "mergeTop";
-
- public static final String PREFIX_LESSON = "lesson_";
- public static final String PREFIX_ROOM = "room_";
- public static final String PREFIX_TEACHER = "teacher_";
- public static final String PREFIX_START = "start_";
- public static final String PREFIX_FINISH = "finish_";
-
- @PrimaryKey(autoGenerate = true)
- @ColumnInfo(index = true, name = COLUMN_ID)
- public long id;
-
- @Embedded(prefix = PREFIX_LESSON)
- LessonModel lesson;
-
- @Embedded(prefix = PREFIX_ROOM)
- RoomModel room;
-
- @ColumnInfo(name = COLUMN_DATE)
- @TypeConverters(Timeline.class)
- Date date;
-
- @ColumnInfo(name = COLUMN_GROUP)
- String group;
-
- @ColumnInfo(name = COLUMN_FIRST)
- boolean first;
-
- @ColumnInfo(name = COLUMN_LAST)
- boolean last;
-
- @ColumnInfo(name = COLUMN_MERGE_BOTTOM)
- boolean mergeBottom;
-
- @ColumnInfo(name = COLUMN_MERGE_TOP)
- boolean mergeTop;
-
- @Embedded(prefix = PREFIX_TEACHER)
- TeacherModel teacher;
-
- @Embedded(prefix = PREFIX_START)
- TimeOfDayModel start;
-
- @Embedded(prefix = PREFIX_FINISH)
- TimeOfDayModel finish;
-
- @TypeConverter
- public static Date toDate(Long dateLong) {
- return dateLong == null ? null : new Date(dateLong);
- }
-
- @TypeConverter
- public static Long fromDate(Date date) {
- return date == null ? null : date.getTime();
- }
-
-// public static Timeline fromContentValues(ContentValues values) {
-// return new Timeline(
-// values.getAsLong(COLUMN_ID),
-// LessonModel.fromContentValues(values, PREFIX_LESSON),
-// RoomModel.fromContentValues(values, PREFIX_ROOM),
-// new Date(values.getAsLong(COLUMN_DATE)),
-// Timeline.User.values()
-// values.getAsString(COLUMN_GROUP),
-// values.getAsInteger(COLUMN_FIRST) == 1,
-// values.getAsInteger(COLUMN_LAST) == 1,
-// TeacherModel.fromContentValues(values, PREFIX_TEACHER),
-// TimeOfDayModel.fromContentValues(values, PREFIX_START),
-// TimeOfDayModel.fromContentValues(values, PREFIX_FINISH)
-// );
-// }
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/TimelineDao.java b/android/app/src/main/java/ru/coolone/ranepatimetable/TimelineDao.java
deleted file mode 100644
index cd94f93..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/TimelineDao.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.database.Cursor;
-
-import java.util.Calendar;
-import java.util.List;
-
-import androidx.room.Dao;
-import androidx.room.Insert;
-import androidx.room.Query;
-import androidx.room.Update;
-
-import static ru.coolone.ranepatimetable.WidgetProvider.getTodayMidnight;
-
-@Dao
-public interface TimelineDao {
-
- /**
- * Counts the number of timetables in the table.
- *
- * @return The number of timetables.
- */
- @Query("SELECT COUNT(*) FROM " + Timeline.TABLE_NAME)
- public int count();
-
- /**
- * Inserts a timeline into the table.
- *
- * @param timeline A new timeline.
- * @return The row ID of the newly inserted timeline.
- */
- @Insert
- public long insert(Timeline timeline);
-
- /**
- * Inserts multiple timelines into the database
- *
- * @param timelines An array of new timelines.
- * @return The row IDs of the newly inserted timelines.
- */
- @Insert
- public long[] insertAll(Timeline[] timelines);
-
- @Query("DELETE FROM " + Timeline.TABLE_NAME + " WHERE strftime('%Y-%m-%d', date) < strftime('%Y-%m-%d', 'now')")
- public int deleteOld();
-
- /**
- * Get all timetables.
- *
- * @return A {@link List} of all the timetables in the table.
- */
- @Query("SELECT * FROM " + Timeline.TABLE_NAME)
- public Timeline[] getAll();
-
- /**
- * Select all timetables.
- *
- * @return A {@link Cursor} of all the timetables in the table.
- */
- @Query("SELECT * FROM " + Timeline.TABLE_NAME)
- public Cursor selectAll();
-
- /**
- * Select a timetable by the ID.
- *
- * @param id The row ID.
- * @return A {@link Cursor} of the selected timetable.
- */
- @Query("SELECT * FROM " + Timeline.TABLE_NAME + " WHERE " + Timeline.COLUMN_ID + " = :id")
- public Cursor selectById(long id);
-
- /**
- * Select a timetable by the Date.
- *
- * @param date The row Date.
- * @return A {@link Cursor} of the selected timetable.
- */
- @Query("SELECT * FROM " + Timeline.TABLE_NAME + " WHERE " + Timeline.COLUMN_DATE + " = :date")
- public Cursor selectByDate(long date);
-
- //SELECT * FROM NAMES WHERE date == (SELECT date FROM NAMES WHERE date >= '1900-02-01 00:00:00' LIMIT 1)
-
- @Query("SELECT * FROM " + Timeline.TABLE_NAME + " WHERE " + Timeline.COLUMN_DATE + " == " +
- "(" +
- "SELECT " + Timeline.COLUMN_DATE +
- " FROM " + Timeline.TABLE_NAME +
- " WHERE " + Timeline.COLUMN_DATE + " >= :now LIMIT 1" +
- ")"
- )
- public Cursor selectWeekday(long now);
-
- /**
- * Delete a timetable by the ID.
- *
- * @param id The row ID.
- * @return A number of timetables deleted. This should always be {@code 1}.
- */
- @Query("DELETE FROM " + Timeline.TABLE_NAME + " WHERE " + Timeline.COLUMN_ID + " = :id")
- public int deleteById(long id);
-
- /**
- * Delete all timetables.
- *
- * @return A number of timetables deleted. This should always be {@code 1}.
- */
- @Query("DELETE FROM " + Timeline.TABLE_NAME)
- public int delete();
-
- /**
- * Update the timeline. The timeline is identified by the row ID.
- *
- * @param timeline The timeline to update.
- * @return A number of timetables updated. This should always be {@code 1}.
- */
- @Update
- public int update(Timeline timeline);
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDataProvider.java b/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDataProvider.java
deleted file mode 100644
index 9b61b8e..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDataProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.content.ContentProvider;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.UriMatcher;
-import android.database.Cursor;
-import android.net.Uri;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import lombok.var;
-
-
-public class TimetableDataProvider extends ContentProvider {
-
- /** The authority of this content provider. */
- public static final String AUTHORITY = "ru.coolone.ranepatimetable.provider";
-
- /** The URI for the Timeline table. */
- public static final Uri URI_TIMELINE = Uri.parse(
- "content://" + AUTHORITY + "/" + Timeline.TABLE_NAME);
-
- /** The match code for some items in the Timeline table. */
- private static final int CODE_TIMELINE_DIR = 1;
-
- /** The match code for an item in the Timeline table. */
- private static final int CODE_TIMELINE_ITEM = 2;
-
- /** The URI matcher. */
- private static final UriMatcher MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
-
- static {
- MATCHER.addURI(AUTHORITY, Timeline.TABLE_NAME, CODE_TIMELINE_DIR);
- MATCHER.addURI(AUTHORITY, Timeline.TABLE_NAME + "/*", CODE_TIMELINE_ITEM);
- }
-
- @Override
- public boolean onCreate() {
- return true;
- }
-
- @Nullable
- @Override
- public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection,
- @Nullable String[] selectionArgs, @Nullable String sortOrder) {
- final int code = MATCHER.match(uri);
- if (code == CODE_TIMELINE_DIR || code == CODE_TIMELINE_ITEM) {
- var ctx = getContext();
- if (ctx == null) return null;
-
- var timetable = TimetableDatabase.getInstance(ctx).timetable();
-
- final Cursor cursor;
- if (code == CODE_TIMELINE_DIR) {
- cursor = timetable.selectAll();
- } else {
- cursor = timetable.selectById(ContentUris.parseId(uri));
- }
- cursor.setNotificationUri(ctx.getContentResolver(), uri);
-
- return cursor;
- } else {
- throw new IllegalArgumentException("Unknown URI: " + uri);
- }
- }
-
- @Nullable
- @Override
- public String getType(@NonNull Uri uri) {
- switch (MATCHER.match(uri)) {
- case CODE_TIMELINE_DIR:
- return "vnd.android.cursor.dir/" + AUTHORITY + "." + Timeline.TABLE_NAME;
- case CODE_TIMELINE_ITEM:
- return "vnd.android.cursor.item/" + AUTHORITY + "." + Timeline.TABLE_NAME;
- default:
- throw new IllegalArgumentException("Unknown URI: " + uri);
- }
- }
-
- @Nullable
- @Override
- public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
- return null;
- }
-
- @Override
- public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
- return 0;
- }
-
- @Override
- public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
- return 0;
- }
-
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDatabase.java b/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDatabase.java
deleted file mode 100644
index 2539636..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/TimetableDatabase.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.content.Context;
-
-import androidx.room.Database;
-import androidx.room.Room;
-import androidx.room.RoomDatabase;
-
-@Database(entities = {Timeline.class}, version = 1, exportSchema = false)
-public abstract class TimetableDatabase extends RoomDatabase {
-
- public static final String FILENAME = "timetable.db";
-
- /**
- * @return The DAO for the Timeline table.
- */
- @SuppressWarnings("WeakerAccess")
- public abstract TimelineDao timetable();
-
- /**
- * The only instance
- */
- private static TimetableDatabase sInstance;
-
- /**
- * Gets the singleton instance of TimetableDatabase.
- *
- * @param ctx The ctx.
- * @return The singleton instance of TimetableDatabase.
- */
- public static synchronized TimetableDatabase getInstance(Context ctx) {
- if (sInstance == null) {
- sInstance = Room
- .databaseBuilder(
- ctx,
- TimetableDatabase.class,
- FILENAME
- )
- .createFromAsset("database/" + FILENAME)
- .allowMainThreadQueries()
- .build();
- }
- return sInstance;
- }
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetProvider.java b/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetProvider.java
deleted file mode 100644
index 85fcd26..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetProvider.java
+++ /dev/null
@@ -1,848 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.Manifest;
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.appwidget.AppWidgetManager;
-import android.appwidget.AppWidgetProvider;
-import android.appwidget.AppWidgetProviderInfo;
-import android.content.ComponentName;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.pm.PackageManager;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Typeface;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.provider.AlarmClock;
-import android.provider.CalendarContract;
-import android.util.Pair;
-import android.view.View;
-import android.widget.RemoteViews;
-import android.widget.Toast;
-
-import com.jakewharton.threetenabp.AndroidThreeTen;
-import com.nabinbhandari.android.permissions.PermissionHandler;
-import com.nabinbhandari.android.permissions.Permissions;
-
-import org.threeten.bp.Duration;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Locale;
-import java.util.Objects;
-import java.util.TimeZone;
-
-import androidx.core.app.ActivityCompat;
-
-import lombok.AllArgsConstructor;
-import lombok.NoArgsConstructor;
-import lombok.extern.java.Log;
-import lombok.val;
-import lombok.var;
-
-import static ru.coolone.ranepatimetable.WidgetRemoteViewsFactory.dpScale;
-
-/**
- * The widget's AppWidgetProvider.
- */
-@Log
-@NoArgsConstructor
-public class WidgetProvider extends AppWidgetProvider {
- enum IntentAction {
- DeleteOld("DELETE_OLD"),
- CreateAlarmClock("CREATE_ALARM_CLOCK"),
- CreateCalendarEvents("CREATE_CALENDAR_EVENTS"),
- DayNext("DAY_NEXT"),
- DayPrev("DAY_PREV");
- final String action;
-
- IntentAction(String action) {
- this.action = "ru.coolone.ranepatimetable." + action;
- }
- }
-
- enum Brightness {
- Dark,
- Light
- }
-
- enum RoomLocationStyle {
- Text,
- Icon
- }
-
- enum DayStyle {
- Weekday,
- Date
- }
-
- AlarmManager manager;
- PendingIntent updatePendingIntent, deleteOldPendingIntent;
-
- static private int dateOffset;
-
- enum SearchItemTypeId {
- Group,
- Teacher
- }
-
- private static SharedPreferences _prefs;
-
- public static SharedPreferences getPrefs(Context ctx) {
- if (_prefs == null)
- _prefs = ctx.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE);
- return _prefs;
- }
-
- @Override
- public void onDisabled(Context ctx) {
- if (manager != null && updatePendingIntent != null)
- manager.cancel(updatePendingIntent);
- }
-
- @Override
- public void onEnabled(Context ctx) {
- AndroidThreeTen.init(ctx);
-
- _widgetSize = Pair.create(
- getPrefs(ctx).getInt(PrefsIds.WidgetSizeWidth.prefId, 1),
- getPrefs(ctx).getInt(PrefsIds.WidgetSizeHeight.prefId, 1)
- );
-
- log.info("Create widget size from prefs: \n"
- + "w: " + _widgetSize.first + "\n"
- + "h: " + _widgetSize.second + "\n"
- );
-
- manager = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE);
-
- updatePendingIntent = PendingIntent.getBroadcast(
- ctx,
- 0,
- new Intent(ctx, WidgetProvider.class),
- PendingIntent.FLAG_UPDATE_CURRENT
- );
- manager.setRepeating(
- AlarmManager.RTC,
- getTodayMidnight().getTimeInMillis(),
- 1000 * 60 * 60 * 24,
- updatePendingIntent
- );
-
- deleteOldPendingIntent = PendingIntent.getBroadcast(
- ctx,
- 0,
- new Intent(IntentAction.DeleteOld.action),
- PendingIntent.FLAG_UPDATE_CURRENT
- );
- manager.setRepeating(
- AlarmManager.RTC,
- getTodayMidnight().getTimeInMillis(),
- 1000 * 60 * 60 * 24,
- deleteOldPendingIntent
- );
- }
-
- private int getCalendarId(Context ctx) {
- String projection[] = {
- CalendarContract.Calendars._ID, CalendarContract.Calendars.CALENDAR_ACCESS_LEVEL
- };
-
- var contentResolver = ctx.getContentResolver();
- var managedCursor = contentResolver.query(
- Uri.parse("content://com.android.calendar/calendars"),
- projection,
- null,
- null,
- null
- );
-
- if (managedCursor != null && managedCursor.moveToFirst()) {
- var idIndex = managedCursor.getColumnIndex(projection[0]);
- var accessIndex = managedCursor.getColumnIndex(projection[1]);
- do {
- if (managedCursor.getInt(accessIndex) == 700)
- return managedCursor.getInt(idIndex);
- } while (managedCursor.moveToNext());
- managedCursor.close();
- }
- return -1;
- }
-
- private void createAlarmClock(Context ctx) {
- var firstLesson = TimetableDatabase.getInstance(ctx).timetable().selectByDate(showDate);
- if (firstLesson.moveToFirst()) {
- var duration = Duration.ofMinutes(getPrefs(ctx).getLong(PrefsIds.BeforeAlarmClock.prefId, 0));
-
- if (duration.isZero())
- Toast.makeText(ctx, R.string.noBeforeAlarmClock, Toast.LENGTH_LONG).show();
- else {
- var date = GregorianCalendar.getInstance();
- date.setTimeInMillis(firstLesson.getLong(firstLesson.getColumnIndex(Timeline.COLUMN_DATE)));
- date.add(Calendar.HOUR, firstLesson.getInt(firstLesson.getColumnIndex(
- Timeline.PREFIX_START
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_HOUR
- ))
- - ((int) duration.toHours()));
- date.add(Calendar.MINUTE, firstLesson.getInt(firstLesson.getColumnIndex(
- Timeline.PREFIX_START
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_MINUTE
- ))
- - ((int) duration.toMinutes()));
-
- var alarmIntent = new Intent(AlarmClock.ACTION_SET_ALARM);
- alarmIntent.putExtra(AlarmClock.EXTRA_MESSAGE, firstLesson.getString(
- firstLesson.getColumnIndex(
- Timeline.PREFIX_LESSON
- + Timeline.LessonModel.COLUMN_LESSON_TITLE
- )));
- alarmIntent.putExtra(AlarmClock.EXTRA_HOUR, date.get(Calendar.HOUR));
- alarmIntent.putExtra(AlarmClock.EXTRA_MINUTES, date.get(Calendar.MINUTE));
- alarmIntent.putExtra(AlarmClock.EXTRA_SKIP_UI, true);
- alarmIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- ctx.startActivity(alarmIntent);
- }
- } else
- Toast.makeText(ctx, R.string.noLessons, Toast.LENGTH_LONG).show();
- }
-
- private void createCalendarEvents(final Context ctx) {
- var mLesson = TimetableDatabase.getInstance(ctx).timetable().selectByDate(showDate);
-
- if (mLesson.getCount() == 0)
- Toast.makeText(ctx, R.string.noLessons, Toast.LENGTH_LONG).show();
- else {
- while (mLesson.moveToNext()) {
- var mDate = GregorianCalendar.getInstance();
- mDate.setTimeInMillis(mLesson.getLong(mLesson.getColumnIndex(Timeline.COLUMN_DATE)));
-
- var mStartDate = new GregorianCalendar();
- mStartDate.setTimeInMillis(mDate.getTimeInMillis());
- mStartDate.add(Calendar.HOUR, mLesson.getInt(mLesson.getColumnIndex(
- Timeline.PREFIX_START
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_HOUR
- )));
- mStartDate.add(Calendar.MINUTE, mLesson.getInt(mLesson.getColumnIndex(
- Timeline.PREFIX_START
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_MINUTE
- )));
-
- var mFinishDate = new GregorianCalendar();
- mFinishDate.setTimeInMillis(mDate.getTimeInMillis());
- mFinishDate.add(Calendar.HOUR, mLesson.getInt(mLesson.getColumnIndex(
- Timeline.PREFIX_FINISH
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_HOUR
- )));
- mFinishDate.add(Calendar.MINUTE, mLesson.getInt(mLesson.getColumnIndex(
- Timeline.PREFIX_FINISH
- + Timeline.TimeOfDayModel.COLUMN_TIMEOFDAY_MINUTE
- )));
-
- ContentResolver cr = ctx.getContentResolver();
- ContentValues values = new ContentValues();
- values.put(CalendarContract.Events.DTSTART, mStartDate.getTimeInMillis());
- values.put(CalendarContract.Events.DTEND, mFinishDate.getTimeInMillis());
- values.put(CalendarContract.Events.TITLE, mLesson.getString(mLesson.getColumnIndex(
- Timeline.PREFIX_LESSON
- + Timeline.LessonModel.COLUMN_LESSON_TITLE
- )));
- values.put(CalendarContract.Events.DESCRIPTION, mLesson.getString(mLesson.getColumnIndex(
- Timeline.PREFIX_LESSON
- + Timeline.LessonModel.COLUMN_LESSON_FULL_TITLE
- )));
- values.put(CalendarContract.Events.EVENT_TIMEZONE, TimeZone.getDefault().getID());
- if (ActivityCompat.checkSelfPermission(ctx, android.Manifest.permission.WRITE_CALENDAR)
- == PackageManager.PERMISSION_GRANTED
- && ActivityCompat.checkSelfPermission(ctx, Manifest.permission.READ_CALENDAR)
- == PackageManager.PERMISSION_GRANTED) {
- values.put(CalendarContract.Events.CALENDAR_ID, getCalendarId(ctx));
- Toast.makeText(ctx, cr.insert(CalendarContract.Events.CONTENT_URI, values) == null
- ? R.string.createCalendarEventsFailed
- : R.string.createCalendarEventsSuccess,
- Toast.LENGTH_LONG
- ).show();
- } else
- Permissions.check(
- ctx,
- new String[]{
- Manifest.permission.WRITE_CALENDAR,
- Manifest.permission.READ_CALENDAR
- },
- null,
- null,
- new PermissionHandler() {
- @Override
- public void onGranted() {
- createCalendarEvents(ctx);
- }
-
- @Override
- public void onDenied(Context ctx, ArrayList deniedPermissions) {
- super.onDenied(ctx, deniedPermissions);
- Toast.makeText(ctx, R.string.noCalendarPermissions,
- Toast.LENGTH_LONG
- ).show();
- }
- }
- );
- }
- }
- }
-
- private void refreshWidget(Context ctx) {
- ComponentName name = new ComponentName(ctx, WidgetProvider.class);
- int[] ids = AppWidgetManager.getInstance(ctx).getAppWidgetIds(name);
-
- for (var mId : ids)
- AppWidgetManager.getInstance(ctx)
- .updateAppWidget(
- new ComponentName(
- ctx.getPackageName(),
- WidgetProvider.class.getName()
- ),
- buildLayout(
- ctx,
- mId,
- AppWidgetManager.getInstance(ctx),
- false
- )
- );
- }
-
- @Override
- public void onReceive(Context ctx, Intent intent) {
- log.info("onReceive: " + intent.getAction());
-
- if (Objects.equals(intent.getAction(), IntentAction.DeleteOld.action)) {
- TimetableDatabase.getInstance(ctx).timetable().deleteOld();
- } else if (Objects.equals(intent.getAction(), IntentAction.CreateAlarmClock.action)) {
- createAlarmClock(ctx);
- } else if (Objects.equals(intent.getAction(), IntentAction.CreateCalendarEvents.action)) {
- createCalendarEvents(ctx);
- } else if (Objects.equals(intent.getAction(), IntentAction.DayNext.action)
- || Objects.equals(intent.getAction(), IntentAction.DayPrev.action)) {
- Calendar now;
- do {
- dateOffset += Objects.equals(intent.getAction(), IntentAction.DayNext.action)
- ? 1
- : -1;
-
- now = GregorianCalendar.getInstance();
- now.add(Calendar.DATE, dateOffset);
- }
- while (now.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY);
- refreshWidget(ctx);
- }
-
- super.onReceive(ctx, intent);
- }
-
- public Theme theme;
-
- @AllArgsConstructor
- static class Theme {
- final int primary, accent,
- textPrimary, textAccent,
- background;
- final Brightness brightness;
- }
-
- public static final Theme defaultTheme = new Theme(
- 0xFF2196F3,
- 0xFF2196F3,
- Color.BLACK,
- Color.WHITE,
- 0xFF90CAF9,
- Brightness.Light
- );
-
- private static final String FLUTTER_PREFIX = "flutter.";
-
- enum PrefsIds {
- OptimizedLessonTitles("optimized_lesson_titles"),
-
- RoomLocationStyle("room_location_style"),
-
- WidgetTranslucent("widget_translucent"),
-
- ThemePrimary("theme_primary"),
- ThemeAccent("theme_accent"),
- ThemeTextPrimary("theme_text_primary"),
- ThemeTextAccent("theme_text_accent"),
- ThemeBackground("theme_background"),
-
- ThemeBrightness("theme_brightness"),
-
- BeforeAlarmClock("before_alarm_clock"),
- EndCache("end_cache"),
- WidgetSizeWidth("widget_size_width"),
- WidgetSizeHeight("widget_size_height"),
-
- PrimarySearchItemPrefix("primary_search_item_"),
- ItemType("type", PrimarySearchItemPrefix.prefId),
- ItemId("id", PrimarySearchItemPrefix.prefId),
- ItemTitle("title", PrimarySearchItemPrefix.prefId),
-
- DayStyle("day_style");
-
- final String prefId;
-
- PrefsIds(String prefId) {
- this(prefId, FLUTTER_PREFIX);
- }
-
- PrefsIds(String prefId, String prefix) {
- this.prefId = prefix.concat(prefId);
- }
- }
-
- private static Calendar getMidnight(Calendar calendar) {
- calendar.set(Calendar.HOUR_OF_DAY, 0);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- calendar.set(Calendar.MILLISECOND, 0);
- return calendar;
- }
-
- public static Calendar getTodayMidnight() {
- return getMidnight(Calendar.getInstance());
- }
-
- static long showDate;
-
- static Bitmap buildEmptyViewBitmap(Context ctx, Theme theme) {
- var type = SearchItemTypeId.values()[
- (int) getPrefs(ctx).getLong(
- PrefsIds.ItemType.prefId,
- 0
- )
- ];
-
- var BEER = '\ue838';
- var CONFETTI = '\ue839';
-
- return buildNotificationBitmap(
- ctx,
- theme,
- type == SearchItemTypeId.Teacher
- ? CONFETTI
- : BEER,
- ctx.getString(R.string.freeDay),
- 9f
- );
- }
-
- static Bitmap buildNoCacheImageBitmap(Context ctx, Theme theme) {
- var NO_CACHE = '\ue826';
-
- return buildNotificationBitmap(
- ctx,
- theme,
- NO_CACHE,
- ctx.getString(R.string.noCache),
- 14f,
- 0
- );
- }
-
- static Bitmap buildNotificationBitmap(
- Context ctx,
- Theme theme,
- char icon,
- String notification,
- float textScale
- ) {
- return buildNotificationBitmap(
- ctx,
- theme,
- icon,
- notification,
- textScale,
- ctx.getResources().getDimension(R.dimen.widget_head_height) / dpScale(ctx)
- );
- }
-
- static Bitmap buildNotificationBitmap(
- Context ctx,
- Theme theme,
- char icon,
- String notification,
- float textScale,
- float headHeight
- ) {
- var dpScale = dpScale(ctx);
- var widgetSize = widgetSize(ctx);
-
- var bitmap = Bitmap.createBitmap((int) (widgetSize.first * dpScale), (int) (widgetSize.second * dpScale), Bitmap.Config.ARGB_8888);
- var canvas = new Canvas(bitmap);
-
- var iconPaint = new Paint();
- iconPaint.setAntiAlias(true);
- iconPaint.setSubpixelText(true);
- iconPaint.setTextAlign(Paint.Align.CENTER);
- iconPaint.setTypeface(
- Typeface.createFromAsset(
- ctx.getAssets(),
- "fonts/TimetableIcons.ttf"
- )
- );
-
- iconPaint.setTextSize(dpScale * (Math.min(widgetSize.first, widgetSize.second) / 3f));
- iconPaint.setColor(theme.textPrimary);
-
- canvas.drawText(
- String.valueOf(icon),
- (widgetSize.first / 2f) * dpScale,
- (headHeight + (widgetSize.second - headHeight) / 2) * dpScale,
- iconPaint
- );
-
- var textPaint = new Paint();
- textPaint.setAntiAlias(true);
- textPaint.setSubpixelText(true);
- textPaint.setTextAlign(Paint.Align.CENTER);
-
- textPaint.setTextSize(dpScale * (Math.min(widgetSize.first, widgetSize.second) / textScale));
- textPaint.setColor(theme.textPrimary);
-
- var mTextY = (
- headHeight +
- (
- widgetSize.second - headHeight
- ) / 2 +
- (
- Math.min(widgetSize.first, widgetSize.second) / 4f
- )
- ) * dpScale;
- for (var line : notification.split("\n")) {
- canvas.drawText(
- line,
- (widgetSize.first / 2f) * dpScale,
- mTextY,
- textPaint
- );
- mTextY += textPaint.descent() - textPaint.ascent();
- }
-
- return bitmap;
- }
-
- private Pair getWidgetSize(
- Context ctx,
- int appWidgetId,
- AppWidgetManager manager
- ) {
- AppWidgetProviderInfo providerInfo = AppWidgetManager.getInstance(
- ctx.getApplicationContext()
- ).getAppWidgetInfo(appWidgetId);
-
- // Since min and max is usually the same, just take min
- var mWidgetLandSize = new Pair<>(providerInfo.minWidth, providerInfo.minHeight);
- var mWidgetPortSize = new Pair<>(providerInfo.minWidth, providerInfo.minHeight);
- var mNewWidgetLandSize = new Pair<>(0, 0);
- var mNewWidgetPortSize = new Pair<>(0, 0);
-
- Bundle mAppWidgetOptions = manager.getAppWidgetOptions(appWidgetId);
-
- if (mAppWidgetOptions
- .getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH) > 0) {
-
- mNewWidgetPortSize = new Pair<>(
- mAppWidgetOptions
- .getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH),
- mAppWidgetOptions
- .getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT)
- );
-
- mNewWidgetLandSize = new Pair<>(
- mAppWidgetOptions
- .getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH),
- mAppWidgetOptions
- .getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT)
- );
- }
-
- log.info(
- "Dimensions of the Widget in DIP: \n"
- + "landWidth = " + mWidgetLandSize.first
- + ",\nlandHeight = " + mWidgetLandSize.second
- + ",\nportWidth = " + mWidgetPortSize.first
- + ",\nportHeight = " + mWidgetPortSize.second
- + ",\nnew landWidth = " + mNewWidgetLandSize.first
- + ",\nnew landHeight = " + mNewWidgetLandSize.second
- + ",\nnew portWidth = " + mNewWidgetPortSize.first
- + ",\nnew portHeight = " + mNewWidgetPortSize.second
- );
-
- return ctx.getResources().getBoolean(R.bool.isPort)
- ? mNewWidgetPortSize.first != 0 || mNewWidgetPortSize.second != 0
- ? mNewWidgetPortSize
- : mWidgetPortSize
- : mNewWidgetLandSize.first != 0 || mNewWidgetLandSize.second != 0
- ? mNewWidgetLandSize
- : mWidgetLandSize;
- }
-
- public static Pair _widgetSize;
-
- public static Pair widgetSize(Context ctx) {
- if (_widgetSize == null)
- _widgetSize = Pair.create(
- getPrefs(ctx).getInt(PrefsIds.WidgetSizeWidth.prefId, 1),
- getPrefs(ctx).getInt(PrefsIds.WidgetSizeHeight.prefId, 1)
- );
- return _widgetSize;
- }
-
- Locale getCurrentLocale(Context context){
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
- return context.getResources().getConfiguration().getLocales().get(0);
- } else{
- //noinspection deprecation
- return context.getResources().getConfiguration().locale;
- }
- }
-
- private RemoteViews buildLayout(Context ctx, int appWidgetId, AppWidgetManager manager, boolean updateSize) {
- val prefs = getPrefs(ctx);
-
- log.severe("prefs color: " + prefs.getString(PrefsIds.ThemePrimary.prefId, Integer.toHexString(defaultTheme.primary)));
-
- theme = new Theme(
- Color.parseColor('#' + prefs.getString(PrefsIds.ThemePrimary.prefId, Integer.toHexString(defaultTheme.primary))),
- Color.parseColor('#' + prefs.getString(PrefsIds.ThemeAccent.prefId, Integer.toHexString(defaultTheme.accent))),
- Color.parseColor('#' + prefs.getString(PrefsIds.ThemeTextPrimary.prefId, Integer.toHexString(defaultTheme.textPrimary))),
- Color.parseColor('#' + prefs.getString(PrefsIds.ThemeTextAccent.prefId, Integer.toHexString(defaultTheme.textAccent))),
- Color.parseColor('#' + prefs.getString(PrefsIds.ThemeBackground.prefId, Integer.toHexString(defaultTheme.background))),
- Brightness.values()[(int) prefs.getLong(PrefsIds.ThemeBrightness.prefId, defaultTheme.brightness.ordinal())]
- );
-
- // Set the size
- if (updateSize) {
- _widgetSize = getWidgetSize(ctx, appWidgetId, manager);
- getPrefs(ctx).edit()
- .putInt(PrefsIds.WidgetSizeWidth.prefId, _widgetSize.first)
- .putInt(PrefsIds.WidgetSizeHeight.prefId, _widgetSize.second)
- .apply();
- }
-
- // Get rounded background layout ids
-
- int bodyLayoutResId = -1;
- int headLayoutResId = -1;
- int layoutResId = -1;
-
- var translucent = getPrefs(ctx).getBoolean(PrefsIds.WidgetTranslucent.prefId, true);
-
- switch (theme.brightness) {
- case Dark:
- bodyLayoutResId = translucent
- ? R.drawable.rounded_body_layout_dark_translucent
- : R.drawable.rounded_body_layout_dark;
- headLayoutResId = translucent
- ? R.drawable.rounded_head_layout_dark_translucent
- : R.drawable.rounded_head_layout_dark;
- layoutResId = translucent
- ? R.drawable.rounded_layout_dark_translucent
- : R.drawable.rounded_layout_dark;
- break;
- case Light:
- bodyLayoutResId = translucent
- ? R.drawable.rounded_body_layout_light_translucent
- : R.drawable.rounded_body_layout_light;
- headLayoutResId = translucent
- ? R.drawable.rounded_head_layout_light_translucent
- : R.drawable.rounded_head_layout_light;
- layoutResId = translucent
- ? R.drawable.rounded_layout_light_translucent
- : R.drawable.rounded_layout_light;
- break;
- }
-
- RemoteViews rv;
-
- var test = TimetableDatabase.getInstance(ctx).timetable();
-
- var data = test.getAll();
-
- var firstDate = data[0].date;
-
- Calendar cal = new GregorianCalendar();
- cal.setTimeInMillis(firstDate.getTime()*1000);
-
- if (TimetableDatabase.getInstance(ctx).timetable().count() != 0) {
-
- rv = new RemoteViews(ctx.getPackageName(), R.layout.widget_layout);
-
- var futureLessonFindDate = getTodayMidnight();
- futureLessonFindDate.add(Calendar.DATE, dateOffset);
-
- var dayStyle = DayStyle.values()[
- (int) getPrefs(ctx).getLong(PrefsIds.DayStyle.prefId, 0)
- ];
-
- String dayTitle = null;
- switch (dayStyle) {
- case Date:
- dayTitle = futureLessonFindDate.get(Calendar.DAY_OF_MONTH)
- + " "
- + futureLessonFindDate.getDisplayName(
- Calendar.MONTH,
- Calendar.SHORT,
- getCurrentLocale(ctx)
- );
- break;
- case Weekday:
- dayTitle = futureLessonFindDate.getDisplayName(
- Calendar.DAY_OF_WEEK,
- Calendar.SHORT,
- getCurrentLocale(ctx)
- );
- dayTitle = dayTitle.substring(0, 1).toUpperCase() + dayTitle.substring(1);
- break;
- }
-
- int dayDescId;
- switch (dateOffset) {
- case 0:
- dayDescId = R.string.widget_title_today;
- break;
- case 1:
- dayDescId = R.string.widget_title_tomorrow;
- break;
- case 2:
- dayDescId = R.string.widget_title_after_tomorrow;
- break;
- default:
- dayDescId = R.string.widget_title_after_days;
- }
-
- var dayDescStr = ctx.getString(dayDescId);
- if (dateOffset > 2)
- dayDescStr = String.format(dayDescStr, dateOffset);
-
- rv.setTextViewText(R.id.widget_title,
- dayTitle != null ? dayTitle + ", " + dayDescStr : dayDescStr
- );
- rv.setTextColor(R.id.widget_title, theme.textPrimary);
-
- // Specify the service to provide data for the collection widget. Note that we need to
- // embed the appWidgetId via the data otherwise it will be ignored.
- var intent = new Intent(ctx, WidgetService.class);
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
- var futureLessonDate = GregorianCalendar.getInstance();
- futureLessonDate.setTimeInMillis(
- futureLessonFindDate.getTimeInMillis()
- );
- showDate = getMidnight(futureLessonDate).getTimeInMillis();
- intent.putExtra(WidgetRemoteViewsFactory.DATE, showDate);
- intent.putExtra(WidgetRemoteViewsFactory.THEME_PRIMARY, theme.primary);
- intent.putExtra(WidgetRemoteViewsFactory.THEME_ACCENT, theme.accent);
- intent.putExtra(WidgetRemoteViewsFactory.THEME_TEXT_PRIMARY, theme.textPrimary);
- intent.putExtra(WidgetRemoteViewsFactory.THEME_TEXT_ACCENT, theme.textAccent);
- intent.putExtra(WidgetRemoteViewsFactory.THEME_BACKGROUND, theme.background);
- intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));
-
- rv.setInt(R.id.widget_body, "setBackgroundResource", bodyLayoutResId);
- rv.setInt(R.id.widget_head, "setBackgroundResource", headLayoutResId);
- rv.setInt(R.id.create_calendar_events, "setColorFilter", theme.textPrimary);
- rv.setInt(R.id.create_alarm_clock, "setColorFilter", theme.textPrimary);
- rv.setInt(R.id.day_next, "setColorFilter", theme.textPrimary);
- rv.setInt(R.id.day_prev, "setColorFilter", theme.textPrimary);
-
- rv.setOnClickPendingIntent(R.id.create_alarm_clock, getPendingSelfIntent(ctx, IntentAction.CreateAlarmClock.action));
- rv.setOnClickPendingIntent(R.id.create_calendar_events, getPendingSelfIntent(ctx, IntentAction.CreateCalendarEvents.action));
- rv.setOnClickPendingIntent(R.id.day_next, getPendingSelfIntent(ctx, IntentAction.DayNext.action));
- rv.setOnClickPendingIntent(R.id.day_prev, getPendingSelfIntent(ctx, IntentAction.DayPrev.action));
-
- rv.setViewPadding(
- R.id.widget_title, dateOffset == 0
- ? (int) WidgetRemoteViewsFactory.dpToPixel(ctx, 16)
- : 0, 0, 0, 0
- );
- rv.setViewVisibility(R.id.day_prev, dateOffset > 0 ? View.VISIBLE : View.GONE);
- rv.setViewVisibility(R.id.day_next, dateOffset < 6 ? View.VISIBLE : View.GONE);
-
- rv.setRemoteAdapter(R.id.timeline_list, intent);
- rv.setImageViewBitmap(
- R.id.empty_view,
- buildEmptyViewBitmap(ctx, theme)
- );
- rv.setEmptyView(R.id.timeline_list, R.id.empty_view);
-
- } else {
- rv = new RemoteViews(ctx.getPackageName(), R.layout.widget_no_cache_layout);
-
- rv.setInt(R.id.widget_no_cache_image, "setBackgroundResource", layoutResId);
- rv.setOnClickPendingIntent(R.id.widget_no_cache_image,
- PendingIntent.getActivity(
- ctx,
- 0,
- new Intent(
- ctx,
- MainActivity.class
- ),
- 0
- )
- );
- rv.setImageViewBitmap(
- R.id.widget_no_cache_image,
- buildNoCacheImageBitmap(ctx, theme)
- );
- }
-
- return rv;
- }
-
- protected PendingIntent getPendingSelfIntent(Context ctx, String action) {
- var intent = new Intent(ctx, getClass());
- intent.setAction(action);
- return PendingIntent.getBroadcast(ctx, 0, intent, 0);
- }
-
- @Override
- public void onUpdate(Context ctx, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
- log.info("widget onUpdate");
-
- // Update each of the widgets with the remote adapter
- for (int appWidgetId : appWidgetIds) {
- appWidgetManager.updateAppWidget(
- appWidgetId,
- buildLayout(
- ctx,
- appWidgetId,
- appWidgetManager,
- true
- )
- );
- }
- super.onUpdate(ctx, appWidgetManager, appWidgetIds);
- }
-
- @Override
- public void onAppWidgetOptionsChanged(Context ctx, AppWidgetManager appWidgetManager,
- int appWidgetId, Bundle newOptions) {
- log.info("widget onAppWidgetOptionsChanged");
-
- appWidgetManager.updateAppWidget(
- appWidgetId,
- buildLayout(
- ctx,
- appWidgetId,
- appWidgetManager,
- true
- )
- );
-
- appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.timeline_list);
- }
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetService.java b/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetService.java
deleted file mode 100644
index 3ec6ce8..0000000
--- a/android/app/src/main/java/ru/coolone/ranepatimetable/WidgetService.java
+++ /dev/null
@@ -1,433 +0,0 @@
-package ru.coolone.ranepatimetable;
-
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.RectF;
-import android.graphics.Typeface;
-import android.os.Build;
-import android.util.DisplayMetrics;
-import android.view.View;
-import android.widget.RemoteViews;
-import android.widget.RemoteViewsService;
-
-import java.util.GregorianCalendar;
-import java.util.Locale;
-
-import lombok.extern.java.Log;
-import lombok.var;
-
-import static ru.coolone.ranepatimetable.Timeline.COLUMN_DATE;
-import static ru.coolone.ranepatimetable.Timeline.COLUMN_FIRST;
-import static ru.coolone.ranepatimetable.Timeline.COLUMN_GROUP;
-import static ru.coolone.ranepatimetable.Timeline.COLUMN_LAST;
-import static ru.coolone.ranepatimetable.Timeline.COLUMN_MERGE_TOP;
-import static ru.coolone.ranepatimetable.Timeline.LessonAction;
-import static ru.coolone.ranepatimetable.Timeline.LessonModel;
-import static ru.coolone.ranepatimetable.Timeline.Location;
-import static ru.coolone.ranepatimetable.Timeline.PREFIX_FINISH;
-import static ru.coolone.ranepatimetable.Timeline.PREFIX_LESSON;
-import static ru.coolone.ranepatimetable.Timeline.PREFIX_ROOM;
-import static ru.coolone.ranepatimetable.Timeline.PREFIX_START;
-import static ru.coolone.ranepatimetable.Timeline.PREFIX_TEACHER;
-import static ru.coolone.ranepatimetable.Timeline.RoomModel;
-import static ru.coolone.ranepatimetable.Timeline.TeacherModel;
-import static ru.coolone.ranepatimetable.Timeline.TimeOfDayModel;
-import static ru.coolone.ranepatimetable.WidgetProvider.RoomLocationStyle.Icon;
-import static ru.coolone.ranepatimetable.WidgetProvider.defaultTheme;
-import static ru.coolone.ranepatimetable.WidgetProvider.getPrefs;
-import static ru.coolone.ranepatimetable.WidgetProvider.widgetSize;
-
-/**
- * This is the service that provides the factory to be bound to the collection service.
- */
-public class WidgetService extends RemoteViewsService {
- @Override
- public RemoteViewsFactory onGetViewFactory(Intent intent) {
- return new WidgetRemoteViewsFactory(this.getApplicationContext(), intent);
- }
-}
-
-/**
- * This is the factory that will provide data to the collection widget.
- */
-@Log
-class WidgetRemoteViewsFactory implements RemoteViewsService.RemoteViewsFactory {
- private Context ctx;
- private Cursor cursor;
- private long dateMillis;
- private WidgetProvider.Theme theme;
-
- public static final String DATE = "date";
- public static final String THEME_PRIMARY = "themePrimary";
- public static final String THEME_ACCENT = "themeAccent";
- public static final String THEME_TEXT_PRIMARY = "themeTextPrimary";
- public static final String THEME_TEXT_ACCENT = "themeTextAccent";
- public static final String THEME_BACKGROUND = "themeBackground";
- public static final String THEME_BRIGHTNESS = "themeBrightness";
-
- public WidgetRemoteViewsFactory(Context ctx, Intent intent) {
- this.ctx = ctx;
- var intentDateMillis = intent.getLongExtra(DATE, -1);
- if (intentDateMillis != -1) dateMillis = intentDateMillis;
- theme = new WidgetProvider.Theme(
- intent.getIntExtra(THEME_PRIMARY, defaultTheme.primary),
- intent.getIntExtra(THEME_ACCENT, defaultTheme.accent),
- intent.getIntExtra(THEME_TEXT_PRIMARY, defaultTheme.textPrimary),
- intent.getIntExtra(THEME_TEXT_ACCENT, defaultTheme.textAccent),
- intent.getIntExtra(THEME_BACKGROUND, defaultTheme.background),
- WidgetProvider.Brightness.values()[intent.getIntExtra(THEME_BRIGHTNESS, defaultTheme.brightness.ordinal())]
- );
- }
-
- @Override
- public void onCreate() {
- // Since we reload the cursor in onDataSetChanged() which gets called immediately after
- // onCreate(), we do nothing here.
- }
-
- @Override
- public void onDestroy() {
- if (cursor != null) {
- cursor.close();
- }
- }
-
- @Override
- public int getCount() {
- log.info("Widget columns count: " + cursor.getCount());
- return cursor.getCount();
- }
-
- /**
- * This method converts dp unit to equivalent pixels, depending on device density.
- *
- * @param dp A value in dp (density independent pixels) unit. Which we need to convert into pixels
- * @return A float value to represent px equivalent to dp depending on device density
- */
- static float dpToPixel(Context ctx, float dp) {
- var metrics = ctx.getResources().getDisplayMetrics();
- return dp * ((float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT);
- }
-
- private static float _dpScale = -1;
-
- static float dpScale(Context ctx) {
- if (_dpScale == -1) _dpScale = dpToPixel(ctx, 1);
- return _dpScale;
- }
-
- private static final int rectMargins = 8,
- iconSize = 29,
- circleRadius = 23,
- rectCornersRadius = 10,
- circleMargin = 5,
- circleRadiusAdd = 3;
-
- private Bitmap buildItemBitmap(Context ctx) {
- var dpScale = dpScale(ctx);
- var widgetSize = widgetSize(ctx);
-
- var w = (widgetSize.first > 0 ? widgetSize.first : 100) * dpScale;
- var h = 80 * dpScale;
-
- log.info("w: " + w + ", h: " + h);
-
- var bitmap = Bitmap.createBitmap((int) w, (int) h, Bitmap.Config.ARGB_8888);
- var canvas = new Canvas(bitmap);
-
- // Background rect draw
- var rect = new RectF(dpScale * rectMargins, dpScale * rectMargins,
- w - rectMargins * dpScale, h);
- var bgRectPaint = new Paint();
- bgRectPaint.setAntiAlias(true);
- bgRectPaint.setColor(theme.background);
- canvas.drawRoundRect(rect, dpScale * rectCornersRadius, dpScale * rectCornersRadius, bgRectPaint);
-
- var mergeTop = cursor.getInt(cursor.getColumnIndex(COLUMN_MERGE_TOP)) != 0;
- if (mergeTop) {
- var mergePaint = new Paint();
- mergePaint.setAntiAlias(true);
- mergePaint.setColor(Color.argb(
- Color.alpha(theme.background) / 2,
- Color.red(theme.background),
- Color.green(theme.background),
- Color.blue(theme.background
- ))
- );
- canvas.drawRect(
- new RectF(
- dpScale * rectCornersRadius * 2,
- 0,
- w - (dpScale * rectCornersRadius * 2),
- dpScale * rectMargins
- ),
- mergePaint
- );
- }
-
- var first = cursor.getInt(cursor.getColumnIndex(COLUMN_FIRST)) != 0;
- var last = cursor.getInt(cursor.getColumnIndex(COLUMN_LAST)) != 0;
-
- var circleX = dpScale * (rectMargins * 2 + circleRadius + 68);
- var circleY = h / 2 + dpScale * (rectMargins / 2f);
-
- var translateIcon = 0.0f;
-
- if (!(first && last)) {
- var rectPaint = new Paint();
- rectPaint.setAntiAlias(true);
- rectPaint.setColor(theme.accent);
-
- // Rect round
- if (first || !last) {
- translateIcon = circleMargin;
- circleY -= circleMargin;
- canvas.drawRect(
- circleX - circleRadius * dpScale, circleY - 1,
- circleX + circleRadius * dpScale, dpScale * h + 1,
- rectPaint
- );
- }
- if (last || !first) {
- translateIcon = -circleMargin;
- circleY += circleMargin;
- canvas.drawRect(
- circleX - circleRadius * dpScale, -1,
- circleX + circleRadius * dpScale, circleY + 1,
- rectPaint
- );
- }
-
- // Arc draw
- var arcRect = new RectF(
- circleX - circleRadius * dpScale, circleY - circleRadius * dpScale,
- circleX + circleRadius * dpScale, circleY + circleRadius * dpScale
- );
- var arcPaint = new Paint();
- arcPaint.setAntiAlias(true);
- arcPaint.setColor(theme.accent);
-
- if (first)
- canvas.drawArc(
- arcRect,
- 180f,
- 180f,
- false,
- arcPaint
- );
- else if (last)
- canvas.drawArc(
- arcRect,
- 0f,
- 180f,
- false,
- arcPaint
- );
- } else {
- // Draw circle
- var circlePaint = new Paint();
- circlePaint.setAntiAlias(true);
- circlePaint.setColor(theme.accent);
- circlePaint.setStyle(Paint.Style.FILL);
-
- canvas.drawCircle(
- circleX,
- circleY,
- dpScale * (circleRadius + circleRadiusAdd),
- circlePaint
- );
- }
-
- // Draw icons
- var iconPaint = new Paint();
- iconPaint.setAntiAlias(true);
- iconPaint.setSubpixelText(true);
- iconPaint.setTextAlign(Paint.Align.CENTER);
- iconPaint.setTypeface(
- Typeface.createFromAsset(
- ctx.getAssets(),
- "fonts/TimetableIcons.ttf"
- )
- );
-
- // Draw lesson icon
- iconPaint.setTextSize(dpScale * iconSize);
- iconPaint.setColor(theme.textAccent);
- canvas.drawText(
- String.valueOf(
- Character.toChars(
- cursor.getInt(
- cursor.getColumnIndex(
- PREFIX_LESSON
- + LessonModel.COLUMN_LESSON_ICON)
- )
- )
- ), circleX, circleY + dpScale * (10 + translateIcon), iconPaint
- );
-
- // Draw room location icon
- if (WidgetProvider.RoomLocationStyle.values()[
- (int) getPrefs(ctx).getLong(WidgetProvider.PrefsIds.RoomLocationStyle.prefId, 0)
- ] == Icon) {
- var roomLocation = Location.values()[cursor.getInt(cursor.getColumnIndex(
- PREFIX_ROOM
- + RoomModel.COLUMN_ROOM_LOCATION)
- )];
- iconPaint.setColor(theme.textPrimary);
- iconPaint.setTextSize(dpScale * 20);
- canvas.drawText(
- String.valueOf(
- Character.toChars(roomLocation.iconCodePoint)
- ), dpScale * 25, dpScale * 70, iconPaint
- );
- }
-
- return bitmap;
- }
-
- private Locale getCurrentLocale() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- return ctx.getResources().getConfiguration().getLocales().get(0);
- } else {
- //noinspection deprecation
- return ctx.getResources().getConfiguration().locale;
- }
- }
-
- @Override
- public RemoteViews getViewAt(int position) {
- var rv = new RemoteViews(ctx.getPackageName(), R.layout.widget_item);
-
- // Get the data for this position from the content provider
- if (cursor.moveToPosition(position)) {
- var date = new GregorianCalendar();
- date.setTimeInMillis(cursor.getLong(cursor.getColumnIndex(COLUMN_DATE)));
-
- var start = new TimeOfDayModel(
- cursor.getInt(cursor.getColumnIndex(PREFIX_START + TimeOfDayModel.COLUMN_TIMEOFDAY_HOUR)),
- cursor.getInt(cursor.getColumnIndex(PREFIX_START + TimeOfDayModel.COLUMN_TIMEOFDAY_MINUTE))
- );
- var finish = new TimeOfDayModel(
- cursor.getInt(cursor.getColumnIndex(PREFIX_FINISH + TimeOfDayModel.COLUMN_TIMEOFDAY_HOUR)),
- cursor.getInt(cursor.getColumnIndex(PREFIX_FINISH + TimeOfDayModel.COLUMN_TIMEOFDAY_MINUTE))
- );
-
- rv.setTextViewText(R.id.widget_item_lesson_title,
- cursor.getString(
- cursor.getColumnIndex(
- PREFIX_LESSON + (
- getPrefs(ctx).getBoolean(
- WidgetProvider.PrefsIds.OptimizedLessonTitles.prefId,
- true
- )
- ? LessonModel.COLUMN_LESSON_TITLE
- : LessonModel.COLUMN_LESSON_FULL_TITLE
- ))));
- var teacherName = cursor.getString(cursor.getColumnIndex(PREFIX_TEACHER + TeacherModel.COLUMN_TEACHER_NAME));
- var teacherSurname = cursor.getString(cursor.getColumnIndex(PREFIX_TEACHER + TeacherModel.COLUMN_TEACHER_SURNAME));
- var teacherPatronymic = cursor.getString(cursor.getColumnIndex(PREFIX_TEACHER + TeacherModel.COLUMN_TEACHER_PATRONYMIC));
- var group = cursor.getString(cursor.getColumnIndex(COLUMN_GROUP));
- var user = WidgetProvider.SearchItemTypeId.values()[(int) getPrefs(ctx).getLong(
- WidgetProvider.PrefsIds.ItemType.prefId,
- -1
- )];
- rv.setTextViewText(R.id.widget_item_teacher_or_group,
- user == WidgetProvider.SearchItemTypeId.Group
- ? teacherSurname + ' ' + teacherName.charAt(0) + ". " + teacherPatronymic.charAt(0) + '.'
- : group);
- rv.setTextViewText(R.id.widget_item_start, String.format(getCurrentLocale(), "%d:%02d", start.hour, start.minute));
- rv.setTextViewText(R.id.widget_item_finish, String.format(getCurrentLocale(), "%d:%02d", finish.hour, finish.minute));
-
- var prefix = "";
- var roomLocationStyle = WidgetProvider.RoomLocationStyle.values()[
- (int) getPrefs(ctx).getLong(WidgetProvider.PrefsIds.RoomLocationStyle.prefId, 0)
- ];
- switch (roomLocationStyle) {
- case Icon:
- rv.setViewPadding(R.id.widget_item_room_number,
- (int) dpToPixel(ctx, 22),
- 0, 0, 0
- );
- break;
- case Text:
- switch (Location.values()[cursor.getInt(cursor.getColumnIndex(
- PREFIX_ROOM
- + RoomModel.COLUMN_ROOM_LOCATION))]) {
- case Hotel:
- prefix = "П8-";
- break;
- case StudyHostel:
- prefix = "СО-";
- break;
- }
- break;
- }
- rv.setTextViewText(R.id.widget_item_room_number,
- prefix + cursor.getString(cursor.getColumnIndex(
- PREFIX_ROOM
- + RoomModel.COLUMN_ROOM_NUMBER)
- ));
- var action = cursor.getString(
- cursor.getColumnIndex(
- PREFIX_LESSON
- + LessonModel.PREFIX_LESSON_ACTION
- + LessonAction.COLUMN_LESSON_TYPE_TITLE
- ));
- if (action == null)
- rv.setViewVisibility(R.id.widget_item_lesson_action, View.GONE);
- else
- rv.setTextViewText(R.id.widget_item_lesson_action, action);
-
- rv.setTextColor(R.id.widget_item_lesson_action, theme.textPrimary);
- rv.setTextColor(R.id.widget_item_lesson_title, theme.textPrimary);
- rv.setTextColor(R.id.widget_item_teacher_or_group, theme.textPrimary);
- rv.setTextColor(R.id.widget_item_start, theme.textPrimary);
- rv.setTextColor(R.id.widget_item_finish, theme.textPrimary);
- rv.setTextColor(R.id.widget_item_room_number, theme.textPrimary);
-
- rv.setImageViewBitmap(
- R.id.widget_item_image,
- buildItemBitmap(ctx)
- );
- }
-
- return rv;
- }
-
- @Override
- public RemoteViews getLoadingView() {
- // We aren't going to return a default loading view in this sample
- return null;
- }
-
- @Override
- public int getViewTypeCount() {
- // Technically, we have two types of views (the dark and light background views)
- return 2;
- }
-
- @Override
- public long getItemId(int position) {
- return position;
- }
-
- @Override
- public boolean hasStableIds() {
- return true;
- }
-
- @Override
- public void onDataSetChanged() {
- // Refresh the cursor
- if (cursor != null) {
- cursor.close();
- }
- log.info("Database cursor refresh... date: " + dateMillis);
- cursor = TimetableDatabase.getInstance(ctx).timetable().selectByDate(dateMillis);
- }
-}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/ru/coolone/ranepatimetable/MainActivity.kt b/android/app/src/main/kotlin/ru/coolone/ranepatimetable/MainActivity.kt
new file mode 100644
index 0000000..b7e923d
--- /dev/null
+++ b/android/app/src/main/kotlin/ru/coolone/ranepatimetable/MainActivity.kt
@@ -0,0 +1,6 @@
+package ru.coolone.ranepatimetable
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
deleted file mode 100644
index 0bd8e7e..0000000
Binary files a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
deleted file mode 100644
index bb7ac31..0000000
Binary files a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable-night/launch_background.xml b/android/app/src/main/res/drawable-night/launch_background.xml
deleted file mode 100644
index dc657be..0000000
--- a/android/app/src/main/res/drawable-night/launch_background.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- -
-
-
-
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
deleted file mode 100644
index 2f75c04..0000000
Binary files a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index b7b0e8d..0000000
Binary files a/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index addba27..0000000
Binary files a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/android/app/src/main/res/drawable/ic_alarm.xml b/android/app/src/main/res/drawable/ic_alarm.xml
deleted file mode 100644
index 934b067..0000000
--- a/android/app/src/main/res/drawable/ic_alarm.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/android/app/src/main/res/drawable/ic_calendar.xml b/android/app/src/main/res/drawable/ic_calendar.xml
deleted file mode 100644
index 22f1bb6..0000000
--- a/android/app/src/main/res/drawable/ic_calendar.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/android/app/src/main/res/drawable/ic_navigate_before.xml b/android/app/src/main/res/drawable/ic_navigate_before.xml
deleted file mode 100644
index e6bb3ca..0000000
--- a/android/app/src/main/res/drawable/ic_navigate_before.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/android/app/src/main/res/drawable/ic_navigate_next.xml b/android/app/src/main/res/drawable/ic_navigate_next.xml
deleted file mode 100644
index 2483512..0000000
--- a/android/app/src/main/res/drawable/ic_navigate_next.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
index c182832..304732f 100644
--- a/android/app/src/main/res/drawable/launch_background.xml
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -1,10 +1,12 @@
+
-
+
- -
+
+
diff --git a/android/app/src/main/res/drawable/logo_vector.xml b/android/app/src/main/res/drawable/logo_vector.xml
deleted file mode 100644
index 0fbeac8..0000000
--- a/android/app/src/main/res/drawable/logo_vector.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/app/src/main/res/drawable/rounded_body_layout_dark.xml b/android/app/src/main/res/drawable/rounded_body_layout_dark.xml
deleted file mode 100644
index b4879a6..0000000
--- a/android/app/src/main/res/drawable/rounded_body_layout_dark.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_body_layout_dark_translucent.xml b/android/app/src/main/res/drawable/rounded_body_layout_dark_translucent.xml
deleted file mode 100644
index 5ba8c4e..0000000
--- a/android/app/src/main/res/drawable/rounded_body_layout_dark_translucent.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_body_layout_light.xml b/android/app/src/main/res/drawable/rounded_body_layout_light.xml
deleted file mode 100644
index ad1142c..0000000
--- a/android/app/src/main/res/drawable/rounded_body_layout_light.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_body_layout_light_translucent.xml b/android/app/src/main/res/drawable/rounded_body_layout_light_translucent.xml
deleted file mode 100644
index 061b93a..0000000
--- a/android/app/src/main/res/drawable/rounded_body_layout_light_translucent.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- -
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_head_layout_dark.xml b/android/app/src/main/res/drawable/rounded_head_layout_dark.xml
deleted file mode 100644
index 72eaf5a..0000000
--- a/android/app/src/main/res/drawable/rounded_head_layout_dark.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_head_layout_dark_translucent.xml b/android/app/src/main/res/drawable/rounded_head_layout_dark_translucent.xml
deleted file mode 100644
index b5e6167..0000000
--- a/android/app/src/main/res/drawable/rounded_head_layout_dark_translucent.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_head_layout_light.xml b/android/app/src/main/res/drawable/rounded_head_layout_light.xml
deleted file mode 100644
index 4d13065..0000000
--- a/android/app/src/main/res/drawable/rounded_head_layout_light.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_head_layout_light_translucent.xml b/android/app/src/main/res/drawable/rounded_head_layout_light_translucent.xml
deleted file mode 100644
index 07e62ee..0000000
--- a/android/app/src/main/res/drawable/rounded_head_layout_light_translucent.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_layout_dark.xml b/android/app/src/main/res/drawable/rounded_layout_dark.xml
deleted file mode 100644
index 3c3cde8..0000000
--- a/android/app/src/main/res/drawable/rounded_layout_dark.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_layout_dark_translucent.xml b/android/app/src/main/res/drawable/rounded_layout_dark_translucent.xml
deleted file mode 100644
index 81d5a41..0000000
--- a/android/app/src/main/res/drawable/rounded_layout_dark_translucent.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_layout_light.xml b/android/app/src/main/res/drawable/rounded_layout_light.xml
deleted file mode 100644
index 7ba53b3..0000000
--- a/android/app/src/main/res/drawable/rounded_layout_light.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/rounded_layout_light_translucent.xml b/android/app/src/main/res/drawable/rounded_layout_light_translucent.xml
deleted file mode 100644
index 45683b1..0000000
--- a/android/app/src/main/res/drawable/rounded_layout_light_translucent.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/widget_preview.png b/android/app/src/main/res/drawable/widget_preview.png
deleted file mode 100644
index 9b42d5f..0000000
Binary files a/android/app/src/main/res/drawable/widget_preview.png and /dev/null differ
diff --git a/android/app/src/main/res/layout/widget_item.xml b/android/app/src/main/res/layout/widget_item.xml
deleted file mode 100644
index c6f7d05..0000000
--- a/android/app/src/main/res/layout/widget_item.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/app/src/main/res/layout/widget_layout.xml b/android/app/src/main/res/layout/widget_layout.xml
deleted file mode 100644
index da3eca3..0000000
--- a/android/app/src/main/res/layout/widget_layout.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/widget_no_cache_layout.xml b/android/app/src/main/res/layout/widget_no_cache_layout.xml
deleted file mode 100644
index 17ef540..0000000
--- a/android/app/src/main/res/layout/widget_no_cache_layout.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 5f349f7..0000000
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index 36496eb..db77bb4 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/logo_mipmap.png b/android/app/src/main/res/mipmap-hdpi/logo_mipmap.png
deleted file mode 100644
index 407df47..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/logo_mipmap.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 91937c4..17987b7 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/logo_mipmap.png b/android/app/src/main/res/mipmap-mdpi/logo_mipmap.png
deleted file mode 100644
index 0d796a5..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/logo_mipmap.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 346a523..09d4391 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/logo_mipmap.png b/android/app/src/main/res/mipmap-xhdpi/logo_mipmap.png
deleted file mode 100644
index 82a2634..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/logo_mipmap.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 2145ad1..d5f1c8d 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/logo_mipmap.png b/android/app/src/main/res/mipmap-xxhdpi/logo_mipmap.png
deleted file mode 100644
index 23f05f7..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/logo_mipmap.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 358c39c..4d6372e 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/logo_mipmap.png b/android/app/src/main/res/mipmap-xxxhdpi/logo_mipmap.png
deleted file mode 100644
index 0682729..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/logo_mipmap.png and /dev/null differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values-port/bools.xml b/android/app/src/main/res/values-port/bools.xml
deleted file mode 100644
index 67cf5c9..0000000
--- a/android/app/src/main/res/values-port/bools.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- true
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values-ru/values.xml b/android/app/src/main/res/values-ru/values.xml
deleted file mode 100644
index e118720..0000000
--- a/android/app/src/main/res/values-ru/values.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- НИУ РАНХиГС (Расписание)
- Сегодня
- Завтра
- Послезавтра
- Через %o дня(-ей)
- Пар не найдено.
- Не задано время до будильника.\nЕго можно задать в настройках приложения.
- Не удалось получить доступ к календарю.
- Произошла ошибка при добавлении событий в календарь.
- События успешно добавлены в календарь.
- Свободный день
- Расписание не закэшировано.\nТапните на виджет чтобы открыть\nприложение и его закешировать.
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
deleted file mode 100644
index 8649d74..0000000
--- a/android/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- #F06B7E
- #80000000
- #303030
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/dimen.xml b/android/app/src/main/res/values/dimen.xml
deleted file mode 100644
index e3ba21d..0000000
--- a/android/app/src/main/res/values/dimen.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 40dp
- 16dp
- 10dp
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/orientation.xml b/android/app/src/main/res/values/orientation.xml
deleted file mode 100644
index f47e01b..0000000
--- a/android/app/src/main/res/values/orientation.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- false
-
\ No newline at end of file
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 00fa441..cb1ef88 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,8 +1,18 @@
-
+
+
diff --git a/android/app/src/main/res/values/values.xml b/android/app/src/main/res/values/values.xml
deleted file mode 100644
index 6536af1..0000000
--- a/android/app/src/main/res/values/values.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- NRU RANEPA (Timetable)
- Today
- Tomorrow
- Day after tomorrow
- In %o days
- No lessons found.
- Not set time to alarm.\nIt can be set in the application settings.
- Could not access the calendar.
- An error occurred while adding events to the calendar.
- Events successfully added to calendar.
- Free day
- The schedule is not cached.\nTap on the widget to open\nthe application and cache it.
-
\ No newline at end of file
diff --git a/android/app/src/main/res/xml-v17/timetable_widget_info.xml b/android/app/src/main/res/xml-v17/timetable_widget_info.xml
deleted file mode 100644
index 52f2067..0000000
--- a/android/app/src/main/res/xml-v17/timetable_widget_info.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
\ No newline at end of file
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index 77da17e..f7eb7f6 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,19 +1,20 @@
buildscript {
+ ext.kotlin_version = '1.7.10'
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.google.gms:google-services:4.3.3'
- classpath 'com.android.tools.build:gradle:3.5.3'
+ classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
@@ -25,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/android/gradle.properties b/android/gradle.properties
index b6e61b6..94adc3a 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,4 +1,3 @@
-android.enableJetifier=true
-android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
-android.enableR8=true
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index c1637d8..3c472b9 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Wed Oct 02 22:35:17 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/android/key.properties b/android/key.properties
deleted file mode 100644
index 034e2ac..0000000
--- a/android/key.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-storePassword=c6o00ol10on14e3
-keyPassword=c6o00ol10on14e3
-keyAlias=ranepatimetable
-storeFile=../../../cool_android_release.keystore
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
index 5a2f14f..44e62bc 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,15 +1,11 @@
include ':app'
-def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
-def plugins = new Properties()
-def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
-if (pluginsFile.exists()) {
- pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
-}
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-plugins.each { name, path ->
- def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
- include ":$name"
- project(":$name").projectDir = pluginDirectory
-}
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/ios/Cartfile b/ios/Cartfile
deleted file mode 100644
index 2e50df7..0000000
--- a/ios/Cartfile
+++ /dev/null
@@ -1 +0,0 @@
-github "stephencelis/SQLite.swift" ~> 0.12.2
\ No newline at end of file
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 9367d48..9625e10 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 11.0
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
index e8efba1..ec97fc6 100644
--- a/ios/Flutter/Debug.xcconfig
+++ b/ios/Flutter/Debug.xcconfig
@@ -1,2 +1,2 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Flutter/Generated.xcconfig b/ios/Flutter/Generated.xcconfig
index 4a78848..7761b7e 100644
--- a/ios/Flutter/Generated.xcconfig
+++ b/ios/Flutter/Generated.xcconfig
@@ -1,11 +1,15 @@
// This is a generated file; do not edit or check into version control.
-FLUTTER_ROOT=/Users/coolone/AndroidStudioProjects/flutter
-FLUTTER_APPLICATION_PATH=/Users/coolone/AndroidStudioProjects/ranepa_timetable
-FLUTTER_TARGET=/Users/coolone/AndroidStudioProjects/ranepa_timetable/lib/main.dart
+FLUTTER_ROOT=/Users/vadimruzavin/fvm/versions/3.10.1
+FLUTTER_APPLICATION_PATH=/Users/vadimruzavin/AndroidStudioProjects/ranepa_timetable
+COCOAPODS_PARALLEL_CODE_SIGN=true
+FLUTTER_TARGET=/Users/vadimruzavin/AndroidStudioProjects/ranepa_timetable/lib/main.dart
FLUTTER_BUILD_DIR=build
-SYMROOT=${SOURCE_ROOT}/../build/ios
-OTHER_LDFLAGS=$(inherited) -framework Flutter
-FLUTTER_FRAMEWORK_DIR=/Users/coolone/AndroidStudioProjects/flutter/bin/cache/artifacts/engine/ios
-FLUTTER_BUILD_NAME=1.8.0
-FLUTTER_BUILD_NUMBER=19
+FLUTTER_BUILD_NAME=1.0.0
+FLUTTER_BUILD_NUMBER=1
+EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
+EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
+DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC9iNGZiMTEyMTRkZDJkZGE2Y2UwMTJkZDk4ZWE0OThlOWU4YjkxMjYyLw==
+DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=/Users/vadimruzavin/AndroidStudioProjects/ranepa_timetable/.dart_tool/package_config.json
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
index 399e934..c4855bf 100644
--- a/ios/Flutter/Release.xcconfig
+++ b/ios/Flutter/Release.xcconfig
@@ -1,2 +1,2 @@
-#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Podfile b/ios/Podfile
new file mode 100644
index 0000000..6f0819c
--- /dev/null
+++ b/ios/Podfile
@@ -0,0 +1,44 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '11.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+ use_modular_headers!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+# target 'RunnerTests' do
+# inherit! :search_paths
+# end
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
new file mode 100644
index 0000000..c4c7d4c
--- /dev/null
+++ b/ios/Podfile.lock
@@ -0,0 +1,72 @@
+PODS:
+ - connectivity (0.0.1):
+ - Flutter
+ - Reachability
+ - device_calendar (0.0.1):
+ - Flutter
+ - Flutter (1.0.0)
+ - flutter_email_sender (0.0.1):
+ - Flutter
+ - FMDB (2.7.5):
+ - FMDB/standard (= 2.7.5)
+ - FMDB/standard (2.7.5)
+ - package_info (0.0.1):
+ - Flutter
+ - Reachability (3.2)
+ - shared_preferences_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - sqflite (0.0.3):
+ - Flutter
+ - FMDB (>= 2.7.5)
+ - url_launcher_ios (0.0.1):
+ - Flutter
+
+DEPENDENCIES:
+ - connectivity (from `.symlinks/plugins/connectivity/ios`)
+ - device_calendar (from `.symlinks/plugins/device_calendar/ios`)
+ - Flutter (from `Flutter`)
+ - flutter_email_sender (from `.symlinks/plugins/flutter_email_sender/ios`)
+ - package_info (from `.symlinks/plugins/package_info/ios`)
+ - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
+ - sqflite (from `.symlinks/plugins/sqflite/ios`)
+ - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
+
+SPEC REPOS:
+ trunk:
+ - FMDB
+ - Reachability
+
+EXTERNAL SOURCES:
+ connectivity:
+ :path: ".symlinks/plugins/connectivity/ios"
+ device_calendar:
+ :path: ".symlinks/plugins/device_calendar/ios"
+ Flutter:
+ :path: Flutter
+ flutter_email_sender:
+ :path: ".symlinks/plugins/flutter_email_sender/ios"
+ package_info:
+ :path: ".symlinks/plugins/package_info/ios"
+ shared_preferences_foundation:
+ :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
+ sqflite:
+ :path: ".symlinks/plugins/sqflite/ios"
+ url_launcher_ios:
+ :path: ".symlinks/plugins/url_launcher_ios/ios"
+
+SPEC CHECKSUMS:
+ connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
+ device_calendar: 9cb33f88a02e19652ec7b8b122ca778f751b1f7b
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
+ flutter_email_sender: 02d7443217d8c41483223627972bfdc09f74276b
+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
+ Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
+ shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
+ sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
+ url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
+
+PODFILE CHECKSUM: b17e1ecfe97aba85f3997d462fe23d9e4313a8d8
+
+COCOAPODS: 1.11.2
diff --git a/ios/Runner-Bridging-Header.h b/ios/Runner-Bridging-Header.h
deleted file mode 100644
index 1b2cb5d..0000000
--- a/ios/Runner-Bridging-Header.h
+++ /dev/null
@@ -1,4 +0,0 @@
-//
-// Use this file to import your target's public headers that you would like to expose to Swift.
-//
-
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 40ffdbf..21b2625 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,64 +3,26 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 31D3B112F8A2533B0A7C9C5E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66A6929F0B3CDA6C1F10FE2B /* Pods_Runner.framework */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 7AFEC5E8ED9E1A07079435E5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A9BBFDCB1E71FC1AFED79AB /* Pods_Runner.framework */; };
- 858E64B323ED6E8000722D91 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858E64B223ED6E8000722D91 /* NotificationCenter.framework */; };
- 858E64B623ED6E8000722D91 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858E64B523ED6E8000722D91 /* TodayViewController.swift */; };
- 858E64B923ED6E8000722D91 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 858E64B723ED6E8000722D91 /* MainInterface.storyboard */; };
- 858E64BE23ED6E8100722D91 /* TodayExtTest.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 858E64B123ED6E8000722D91 /* TodayExtTest.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
- 858E64C623ED6EA500722D91 /* CustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858E64C323ED6EA400722D91 /* CustomCell.swift */; };
- 858E64C723ED6EA500722D91 /* TimelinePainter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858E64C423ED6EA400722D91 /* TimelinePainter.swift */; };
- 858E64CC23EDD32900722D91 /* FlutterUserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858E64CB23EDD32900722D91 /* FlutterUserDefaults.swift */; };
- 858E64D823EDE53800722D91 /* SQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 858E64CD23EDD5F300722D91 /* SQLite.framework */; };
- 858E64D923EDE53800722D91 /* SQLite.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 858E64CD23EDD5F300722D91 /* SQLite.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 858E64DB23EDE83E00722D91 /* LessonsDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858E64DA23EDE83E00722D91 /* LessonsDatabase.swift */; };
- 858E64DE23EDFB7A00722D91 /* TimetableIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 858E64DD23EDFB7A00722D91 /* TimetableIcons.ttf */; };
- 858E64E423EFFFBE00722D91 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 858E64E623EFFFBE00722D91 /* Localizable.strings */; };
- 858E64EA23F007E000722D91 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 858E64EC23F007E000722D91 /* InfoPlist.strings */; };
- 858E64F023F008FE00722D91 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 858E64F223F008FE00722D91 /* InfoPlist.strings */; };
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
- 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
-/* Begin PBXContainerItemProxy section */
- 858E64BB23ED6E8000722D91 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 97C146E61CF9000F007C117D /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 858E64B023ED6E8000722D91;
- remoteInfo = TodayExt;
- };
-/* End PBXContainerItemProxy section */
-
/* Begin PBXCopyFilesBuildPhase section */
- 858E64BD23ED6E8100722D91 /* Embed App Extensions */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 13;
- files = (
- 858E64BE23ED6E8100722D91 /* TodayExtTest.appex in Embed App Extensions */,
- );
- name = "Embed App Extensions";
- runOnlyForDeploymentPostprocessing = 0;
- };
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 858E64D923EDE53800722D91 /* SQLite.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -68,104 +30,62 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 0A9BBFDCB1E71FC1AFED79AB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0BAC359DFFE2CD3E06588691 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 361DA379224581B40067E0D1 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 3CBE2D7E8A29364C72C76242 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ 66A6929F0B3CDA6C1F10FE2B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
- 858E64B123ED6E8000722D91 /* TodayExtTest.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = TodayExtTest.appex; sourceTree = BUILT_PRODUCTS_DIR; };
- 858E64B223ED6E8000722D91 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; };
- 858E64B523ED6E8000722D91 /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; };
- 858E64B823ED6E8000722D91 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; };
- 858E64BA23ED6E8000722D91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 858E64C323ED6EA400722D91 /* CustomCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCell.swift; sourceTree = ""; };
- 858E64C423ED6EA400722D91 /* TimelinePainter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimelinePainter.swift; sourceTree = ""; };
- 858E64C923ED73AD00722D91 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; };
- 858E64CA23ED73B500722D91 /* TodayExt.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TodayExt.entitlements; sourceTree = ""; };
- 858E64CB23EDD32900722D91 /* FlutterUserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterUserDefaults.swift; sourceTree = ""; };
- 858E64CD23EDD5F300722D91 /* SQLite.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SQLite.framework; path = Carthage/Build/iOS/SQLite.framework; sourceTree = ""; };
- 858E64DA23EDE83E00722D91 /* LessonsDatabase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LessonsDatabase.swift; sourceTree = ""; };
- 858E64DD23EDFB7A00722D91 /* TimetableIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = TimetableIcons.ttf; path = ../../../assets/fonts/TimetableIcons.ttf; sourceTree = ""; };
- 858E64DF23EFFEBD00722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = ""; };
- 858E64E023EFFEBD00722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/LaunchScreen.strings; sourceTree = ""; };
- 858E64E123EFFEBE00722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/MainInterface.strings; sourceTree = ""; };
- 858E64E523EFFFBE00722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; };
- 858E64E723EFFFC600722D91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; };
- 858E64EB23F007E000722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; };
- 858E64ED23F007E300722D91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
- 858E64F123F008FE00722D91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
- 858E64F323F0090200722D91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BDB2D09F1D667B2F2AB72262 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- FBA08CCD21D8309086188A22 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ A6CC1614CF06CAF2675AB1EA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ BF4A51DB6377345C580D7A7C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- 858E64AE23ED6E8000722D91 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 858E64B323ED6E8000722D91 /* NotificationCenter.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 858E64D823EDE53800722D91 /* SQLite.framework in Frameworks */,
- 7AFEC5E8ED9E1A07079435E5 /* Pods_Runner.framework in Frameworks */,
+ 31D3B112F8A2533B0A7C9C5E /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 7C54038238C58F9C2299D867 /* Frameworks */ = {
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
- 858E64CD23EDD5F300722D91 /* SQLite.framework */,
- 0A9BBFDCB1E71FC1AFED79AB /* Pods_Runner.framework */,
- 858E64B223ED6E8000722D91 /* NotificationCenter.framework */,
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
);
- name = Frameworks;
+ path = RunnerTests;
sourceTree = "";
};
- 858E64B423ED6E8000722D91 /* TodayExt */ = {
+ 646D31469DEB8F7FAB56A658 /* Frameworks */ = {
isa = PBXGroup;
children = (
- 858E64DC23EDFB4400722D91 /* fonts */,
- 858E64CA23ED73B500722D91 /* TodayExt.entitlements */,
- 858E64C323ED6EA400722D91 /* CustomCell.swift */,
- 858E64C423ED6EA400722D91 /* TimelinePainter.swift */,
- 858E64B523ED6E8000722D91 /* TodayViewController.swift */,
- 858E64B723ED6E8000722D91 /* MainInterface.storyboard */,
- 858E64BA23ED6E8000722D91 /* Info.plist */,
- 858E64CB23EDD32900722D91 /* FlutterUserDefaults.swift */,
- 858E64DA23EDE83E00722D91 /* LessonsDatabase.swift */,
- 858E64E623EFFFBE00722D91 /* Localizable.strings */,
- 858E64EC23F007E000722D91 /* InfoPlist.strings */,
- );
- path = TodayExt;
+ 66A6929F0B3CDA6C1F10FE2B /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
sourceTree = "";
};
- 858E64DC23EDFB4400722D91 /* fonts */ = {
+ 748099FFE838F230F4FE8EAE /* Pods */ = {
isa = PBXGroup;
children = (
- 858E64DD23EDFB7A00722D91 /* TimetableIcons.ttf */,
+ BF4A51DB6377345C580D7A7C /* Pods-Runner.debug.xcconfig */,
+ 0BAC359DFFE2CD3E06588691 /* Pods-Runner.release.xcconfig */,
+ A6CC1614CF06CAF2675AB1EA /* Pods-Runner.profile.xcconfig */,
);
- path = fonts;
+ path = Pods;
sourceTree = "";
};
9740EEB11CF90186004384FC /* Flutter */ = {
@@ -184,11 +104,10 @@
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
- 858E64B423ED6E8000722D91 /* TodayExt */,
97C146EF1CF9000F007C117D /* Products */,
- 361DA379224581B40067E0D1 /* Runner-Bridging-Header.h */,
- C03C6CD75B87690C002B6016 /* Pods */,
- 7C54038238C58F9C2299D867 /* Frameworks */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ 748099FFE838F230F4FE8EAE /* Pods */,
+ 646D31469DEB8F7FAB56A658 /* Frameworks */,
);
sourceTree = "";
};
@@ -196,7 +115,6 @@
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
- 858E64B123ED6E8000722D91 /* TodayExtTest.appex */,
);
name = Products;
sourceTree = "";
@@ -204,77 +122,37 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
- 858E64C923ED73AD00722D91 /* Runner.entitlements */,
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
- 97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- 858E64F223F008FE00722D91 /* InfoPlist.strings */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "";
};
- 97C146F11CF9000F007C117D /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 97C146F21CF9000F007C117D /* main.m */,
- );
- name = "Supporting Files";
- sourceTree = "";
- };
- C03C6CD75B87690C002B6016 /* Pods */ = {
- isa = PBXGroup;
- children = (
- BDB2D09F1D667B2F2AB72262 /* Pods-Runner.debug.xcconfig */,
- 3CBE2D7E8A29364C72C76242 /* Pods-Runner.release.xcconfig */,
- FBA08CCD21D8309086188A22 /* Pods-Runner.profile.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- 858E64B023ED6E8000722D91 /* TodayExt */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 858E64C223ED6E8100722D91 /* Build configuration list for PBXNativeTarget "TodayExt" */;
- buildPhases = (
- 858E64AD23ED6E8000722D91 /* Sources */,
- 858E64AE23ED6E8000722D91 /* Frameworks */,
- 858E64AF23ED6E8000722D91 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = TodayExt;
- productName = TodayExt;
- productReference = 858E64B123ED6E8000722D91 /* TodayExtTest.appex */;
- productType = "com.apple.product-type.app-extension";
- };
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- F2ACD30CC13C75F237B13CD1 /* [CP] Check Pods Manifest.lock */,
+ 7977F567B709FD4F10570591 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- D543A9A3220BCC574F9D4AFC /* [CP] Embed Pods Frameworks */,
- 858E64BD23ED6E8100722D91 /* Embed App Extensions */,
+ B827779E9AC03B6035AFCF10 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
- 858E64BC23ED6E8000722D91 /* PBXTargetDependency */,
);
name = Runner;
productName = Runner;
@@ -287,32 +165,22 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- DefaultBuildSystemTypeForWorkspace = Original;
- LastSwiftUpdateCheck = 1130;
- LastUpgradeCheck = 0910;
- ORGANIZATIONNAME = "The Chromium Authors";
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
TargetAttributes = {
- 858E64B023ED6E8000722D91 = {
- CreatedOnToolsVersion = 11.3.1;
- DevelopmentTeam = 99C2LB4W93;
- ProvisioningStyle = Automatic;
- };
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
- DevelopmentTeam = 99C2LB4W93;
- LastSwiftMigration = 1010;
+ LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
- English,
en,
Base,
- ru,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -320,31 +188,17 @@
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
- 858E64B023ED6E8000722D91 /* TodayExt */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
- 858E64AF23ED6E8000722D91 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 858E64B923ED6E8000722D91 /* MainInterface.storyboard in Resources */,
- 858E64EA23F007E000722D91 /* InfoPlist.strings in Resources */,
- 858E64E423EFFFBE00722D91 /* Localizable.strings in Resources */,
- 858E64DE23EDFB7A00722D91 /* TimetableIcons.ttf in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 858E64F023F008FE00722D91 /* InfoPlist.strings in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
@@ -355,146 +209,93 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 9740EEB61CF901F6004384FC /* Run Script */ = {
+ 7977F567B709FD4F10570591 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
+ inputFileListPaths = (
+ );
inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
);
- name = "Run Script";
outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
};
- D543A9A3220BCC574F9D4AFC /* [CP] Embed Pods Frameworks */ = {
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "[CP] Embed Pods Frameworks";
+ name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- F2ACD30CC13C75F237B13CD1 /* [CP] Check Pods Manifest.lock */ = {
+ B827779E9AC03B6035AFCF10 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
+ name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- 858E64AD23ED6E8000722D91 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 858E64C623ED6EA500722D91 /* CustomCell.swift in Sources */,
- 858E64CC23EDD32900722D91 /* FlutterUserDefaults.swift in Sources */,
- 858E64DB23EDE83E00722D91 /* LessonsDatabase.swift in Sources */,
- 858E64B623ED6E8000722D91 /* TodayViewController.swift in Sources */,
- 858E64C723ED6EA500722D91 /* TimelinePainter.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
- 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
-/* Begin PBXTargetDependency section */
- 858E64BC23ED6E8000722D91 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 858E64B023ED6E8000722D91 /* TodayExt */;
- targetProxy = 858E64BB23ED6E8000722D91 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
/* Begin PBXVariantGroup section */
- 858E64B723ED6E8000722D91 /* MainInterface.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 858E64B823ED6E8000722D91 /* Base */,
- 858E64E123EFFEBE00722D91 /* ru */,
- );
- name = MainInterface.storyboard;
- sourceTree = "";
- };
- 858E64E623EFFFBE00722D91 /* Localizable.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 858E64E523EFFFBE00722D91 /* ru */,
- 858E64E723EFFFC600722D91 /* en */,
- );
- name = Localizable.strings;
- sourceTree = "";
- };
- 858E64EC23F007E000722D91 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 858E64EB23F007E000722D91 /* ru */,
- 858E64ED23F007E300722D91 /* en */,
- );
- name = InfoPlist.strings;
- sourceTree = "";
- };
- 858E64F223F008FE00722D91 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 858E64F123F008FE00722D91 /* en */,
- 858E64F323F0090200722D91 /* ru */,
- );
- name = InfoPlist.strings;
- sourceTree = "";
- };
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
- 858E64DF23EFFEBD00722D91 /* ru */,
);
name = Main.storyboard;
sourceTree = "";
@@ -503,7 +304,6 @@
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
- 858E64E023EFFEBD00722D91 /* ru */,
);
name = LaunchScreen.storyboard;
sourceTree = "";
@@ -524,12 +324,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -540,7 +342,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -551,9 +352,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -563,129 +365,26 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_ASSET_PATHS = "";
- DEVELOPMENT_TEAM = 99C2LB4W93;
+ DEVELOPMENT_TEAM = G37GC839TX;
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ INFOPLIST_KEY_CFBundleDisplayName = RANEPA;
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable";
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.coolone.ranepa;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Profile;
- };
- 858E64BF23ED6E8100722D91 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = TodayExt/TodayExt.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 99C2LB4W93;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = TodayExt/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable.TodayExt";
- PRODUCT_NAME = TodayExtTest;
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 858E64C023ED6E8100722D91 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = TodayExt/TodayExt.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 99C2LB4W93;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = TodayExt/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable.TodayExt";
- PRODUCT_NAME = TodayExtTest;
- SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
- 858E64C123ED6E8100722D91 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = TodayExt/TodayExt.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = 99C2LB4W93;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = TodayExt/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 13.2;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable.TodayExt";
- PRODUCT_NAME = TodayExtTest;
- SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
+ VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
@@ -702,12 +401,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -718,7 +419,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -735,7 +435,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -756,12 +456,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -772,7 +474,6 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -783,9 +484,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -795,31 +499,26 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_ASSET_PATHS = "";
- DEVELOPMENT_TEAM = 99C2LB4W93;
+ DEVELOPMENT_TEAM = G37GC839TX;
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ INFOPLIST_KEY_CFBundleDisplayName = RANEPA;
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable";
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.coolone.ranepa;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
@@ -828,30 +527,25 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
- CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_ASSET_PATHS = "";
- DEVELOPMENT_TEAM = 99C2LB4W93;
+ DEVELOPMENT_TEAM = G37GC839TX;
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ INFOPLIST_KEY_CFBundleDisplayName = RANEPA;
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "ru.coolone.ranepa-timetable";
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.coolone.ranepa;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
@@ -859,16 +553,6 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 858E64C223ED6E8100722D91 /* Build configuration list for PBXNativeTarget "TodayExt" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 858E64BF23ED6E8100722D91 /* Debug */,
- 858E64C023ED6E8100722D91 /* Release */,
- 858E64C123ED6E8100722D91 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
index 1d526a1..919434a 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -2,6 +2,6 @@
+ location = "self:">
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 60%
rename from ios/Runner/Runner.entitlements
rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
index abb4917..18d9810 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -2,9 +2,7 @@
- com.apple.security.application-groups
-
- group.coolone.ranepatimetable.data
-
+ IDEDidComputeMac32BitWarning
+
diff --git a/ios/TodayExt/TodayExt.entitlements b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 60%
rename from ios/TodayExt/TodayExt.entitlements
rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
index abb4917..f9b0d7c 100644
--- a/ios/TodayExt/TodayExt.entitlements
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -2,9 +2,7 @@
- com.apple.security.application-groups
-
- group.coolone.ranepatimetable.data
-
+ PreviewsEnabled
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 786d6aa..e42adcb 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.h b/ios/Runner/AppDelegate.h
deleted file mode 100644
index 36e21bb..0000000
--- a/ios/Runner/AppDelegate.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import
-#import
-
-@interface AppDelegate : FlutterAppDelegate
-
-@end
diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m
deleted file mode 100644
index 59a72e9..0000000
--- a/ios/Runner/AppDelegate.m
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "AppDelegate.h"
-#include "GeneratedPluginRegistrant.h"
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application
- didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- [GeneratedPluginRegistrant registerWithRegistry:self];
- // Override point for customization after application launch.
- return [super application:application didFinishLaunchingWithOptions:launchOptions];
-}
-
-@end
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
index 4837b42..dc9ada4 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 123b2f6..7353c41 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 106e31b..797d452 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index cb1c8be..6ed2d93 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index 88444a7..4cd7b00 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index 6b3fc2b..fe73094 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index e7f1aba..321773c 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 106e31b..797d452 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index 5a5860d..502f463 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index 9d0f709..0ec3034 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index 9d0f709..0ec3034 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 090b97c..e9f5fea 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index adaf4d3..84ac32a 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 0872b4b..8953cba 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index 892e46b..0467bf1 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/Contents.json b/ios/Runner/Assets.xcassets/Contents.json
deleted file mode 100644
index da4a164..0000000
--- a/ios/Runner/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/Contents.json b/ios/Runner/Assets.xcassets/SplashIcon.imageset/Contents.json
deleted file mode 100644
index 63391aa..0000000
--- a/ios/Runner/Assets.xcassets/SplashIcon.imageset/Contents.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "ic_launcher.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "logo_mipmap.png",
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "ic_launcher-1.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "logo_mipmap-1.png",
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "ic_launcher-2.png",
- "scale" : "3x"
- },
- {
- "idiom" : "universal",
- "filename" : "logo_mipmap-2.png",
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-1.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-1.png
deleted file mode 100644
index 2145ad1..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-1.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-2.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-2.png
deleted file mode 100644
index 358c39c..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher-2.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher.png
deleted file mode 100644
index 346a523..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/ic_launcher.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-1.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-1.png
deleted file mode 100644
index 23f05f7..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-1.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-2.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-2.png
deleted file mode 100644
index 0682729..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap-2.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap.png b/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap.png
deleted file mode 100644
index 82a2634..0000000
Binary files a/ios/Runner/Assets.xcassets/SplashIcon.imageset/logo_mipmap.png and /dev/null differ
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
index 1d9a853..f2e259c 100644
--- a/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -1,10 +1,8 @@
-
-
-
+
+
-
-
+
@@ -16,32 +14,24 @@
-
-
-
-
-
-
+
-
-
-
+
-
-
+
diff --git a/ios/Runner/GeneratedPluginRegistrant.h b/ios/Runner/GeneratedPluginRegistrant.h
index ed9a5c6..7a89092 100644
--- a/ios/Runner/GeneratedPluginRegistrant.h
+++ b/ios/Runner/GeneratedPluginRegistrant.h
@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
+// clang-format off
+
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
diff --git a/ios/Runner/GeneratedPluginRegistrant.m b/ios/Runner/GeneratedPluginRegistrant.m
index a95da0d..d0ac594 100644
--- a/ios/Runner/GeneratedPluginRegistrant.m
+++ b/ios/Runner/GeneratedPluginRegistrant.m
@@ -2,6 +2,8 @@
// Generated file. Do not edit.
//
+// clang-format off
+
#import "GeneratedPluginRegistrant.h"
#if __has_include()
@@ -22,34 +24,28 @@
@import flutter_email_sender;
#endif
-#if __has_include()
-#import
-#else
-@import ios_app_group;
-#endif
-
#if __has_include()
#import
#else
@import package_info;
#endif
-#if __has_include()
-#import
+#if __has_include()
+#import
#else
-@import sqflite;
+@import shared_preferences_foundation;
#endif
-#if __has_include()
-#import
+#if __has_include()
+#import
#else
-@import url_launcher;
+@import sqflite;
#endif
-#if __has_include()
-#import
+#if __has_include()
+#import
#else
-@import shared_preferences;
+@import url_launcher_ios;
#endif
@implementation GeneratedPluginRegistrant
@@ -58,11 +54,10 @@ + (void)registerWithRegistry:(NSObject*)registry {
[FLTConnectivityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTConnectivityPlugin"]];
[DeviceCalendarPlugin registerWithRegistrar:[registry registrarForPlugin:@"DeviceCalendarPlugin"]];
[FlutterEmailSenderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterEmailSenderPlugin"]];
- [IosAppGroupPlugin registerWithRegistrar:[registry registrarForPlugin:@"IosAppGroupPlugin"]];
[FLTPackageInfoPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPackageInfoPlugin"]];
+ [SharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"SharedPreferencesPlugin"]];
[SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]];
[FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
- [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
}
@end
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index d228eb9..e253225 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -2,8 +2,12 @@
+ CADisableMinimumFrameDurationOnPhone
+
CFBundleDevelopmentRegion
- ru
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Ranepatimetable
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -11,7 +15,7 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- ranepa_timetable
+ ranepatimetable
CFBundlePackageType
APPL
CFBundleShortVersionString
@@ -22,10 +26,8 @@
$(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
- NSCalendarsUsageDescription
- INSERT_REASON_HERE
- NSContactsUsageDescription
- INSERT_REASON_HERE
+ UIApplicationSupportsIndirectInputEvents
+
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/Runner/en.lproj/InfoPlist.strings b/ios/Runner/en.lproj/InfoPlist.strings
deleted file mode 100644
index bcf8584..0000000
--- a/ios/Runner/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- InfoPlist.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"CFBundleName" = "NRU RANEPA";
-"CFBundleDisplayName" = "NRU RANEPA";
diff --git a/ios/Runner/main.m b/ios/Runner/main.m
deleted file mode 100644
index dff6597..0000000
--- a/ios/Runner/main.m
+++ /dev/null
@@ -1,9 +0,0 @@
-#import
-#import
-#import "AppDelegate.h"
-
-int main(int argc, char* argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}
diff --git a/ios/Runner/ru.lproj/InfoPlist.strings b/ios/Runner/ru.lproj/InfoPlist.strings
deleted file mode 100644
index 072ff4a..0000000
--- a/ios/Runner/ru.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- InfoPlist.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"CFBundleName" = "НИУ РАНХиГС";
-"CFBundleDisplayName" = "НИУ РАНХиГС";
diff --git a/ios/Runner/ru.lproj/LaunchScreen.strings b/ios/Runner/ru.lproj/LaunchScreen.strings
deleted file mode 100644
index 8b13789..0000000
--- a/ios/Runner/ru.lproj/LaunchScreen.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ios/Runner/ru.lproj/Main.strings b/ios/Runner/ru.lproj/Main.strings
deleted file mode 100644
index 8b13789..0000000
--- a/ios/Runner/ru.lproj/Main.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/ios/TodayExt/Base.lproj/MainInterface.storyboard b/ios/TodayExt/Base.lproj/MainInterface.storyboard
deleted file mode 100644
index bcf1418..0000000
--- a/ios/TodayExt/Base.lproj/MainInterface.storyboard
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ios/TodayExt/CustomCell.swift b/ios/TodayExt/CustomCell.swift
deleted file mode 100644
index 61c84fd..0000000
--- a/ios/TodayExt/CustomCell.swift
+++ /dev/null
@@ -1,263 +0,0 @@
-//
-// CustomCell.swift
-// TodayExt
-//
-// Created by Nickolay Truhin on 06.02.2020.
-// Copyright © 2020 The Chromium Authors. All rights reserved.
-//
-
-import UIKit
-
-extension UIColor {
- convenience init(red: Int, green: Int, blue: Int) {
- assert(red >= 0 && red <= 255, "Invalid red component")
- assert(green >= 0 && green <= 255, "Invalid green component")
- assert(blue >= 0 && blue <= 255, "Invalid blue component")
-
- self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0)
- }
-
- convenience init(rgb: Int) {
- self.init(
- red: (rgb >> 16) & 0xFF,
- green: (rgb >> 8) & 0xFF,
- blue: rgb & 0xFF
- )
- }
-
- convenience init(rgbStr: String) {
- self.init(
- rgb: Int(rgbStr, radix: 16)!
- )
- }
-}
-
-class TitleLabel: UILabel {
- override func draw(_ rect: CGRect) {
- super.drawText(in: rect.insetBy(dx: 5, dy: 0))
- }
-}
-
-public enum FontIcon: UInt32 {
- case studyHostel = 0xe802,
- hotel = 0xe801,
- academy = 0xe81b,
- beer = 0xe838,
- confetti = 0xe839,
- unknownLesson = 0xe826
-
- func toStringIcon() -> String {
- return FontIcon.intToStringIcon(self.rawValue)
- }
-
- static func intToStringIcon(_ int: UInt32) -> String {
- var rawIcon = int
- let xPtr = withUnsafeMutablePointer(to: &rawIcon, { $0 })
- return String(bytesNoCopy: xPtr, length:MemoryLayout.size, encoding: String.Encoding.utf32LittleEndian, freeWhenDone: false)!
- }
-}
-
-class CustomCell: UITableViewCell {
- var model: TimelineModel?
-
- var painterView: TimelinePainter = {
- var painterView = TimelinePainter()
- painterView.translatesAutoresizingMaskIntoConstraints = false
- return painterView
- }()
-
- var painterContentView: UIView = {
- var contentView = UIView()
- contentView.translatesAutoresizingMaskIntoConstraints = false
- return contentView
- }()
-
- var startView: UILabel = {
- var labelView = UILabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- debugPrint("theme primary: \(color)")
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = labelView.font.withSize(20)
- return labelView
- }()
-
- var finishView: UILabel = {
- var labelView = UILabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = labelView.font.withSize(14)
- return labelView
- }()
-
- var locationView: UILabel = {
- var labelView = UILabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = labelView.font.withSize(14)
- return labelView
- }()
-
- var locationIconView: UILabel = {
- var labelView = UILabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = UIFont.init(name: "TimetableIcons", size: 20)
- return labelView
- }()
-
- var iconView: UILabel = {
- var labelView = UILabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_ACCENT.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = UIFont.init(name: "TimetableIcons", size: 20)
- return labelView
- }()
-
- var lessonTypeView: TitleLabel = {
- var labelView = TitleLabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = labelView.font.withSize(14)
- return labelView
- }()
-
- var teacherGroupView: TitleLabel = {
- var labelView = TitleLabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = labelView.font.withSize(14)
- return labelView
- }()
-
- var titleView: TitleLabel = {
- var labelView = TitleLabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.lineBreakMode = .byWordWrapping
- labelView.numberOfLines = 0
- return labelView
- }()
-
- static let innerPadding = 4.0
- static let leftContentWidth = CGFloat(68 - innerPadding)
-
- override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
- super.init(style: style, reuseIdentifier: reuseIdentifier)
-
- self.addSubview(painterView)
- painterView.backgroundColor = UIColor(white: 1, alpha: 0)
- painterView.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true
- painterView.topAnchor.constraint(equalTo: self.topAnchor).isActive = true
- painterView.bottomAnchor.constraint(equalTo: self.bottomAnchor).isActive = true
- painterView.rightAnchor.constraint(equalTo: self.rightAnchor).isActive = true
-
- self.addSubview(painterContentView)
- painterContentView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: CGFloat(TimelinePainter.rectMargins * 2)).isActive = true
- painterContentView.topAnchor.constraint(equalTo: self.topAnchor, constant: CGFloat(TimelinePainter.rectMargins * 2)).isActive = true
- painterContentView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -CGFloat(TimelinePainter.rectMargins)).isActive = true
- painterContentView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -CGFloat(TimelinePainter.rectMargins * 2)).isActive = true
-
- painterContentView.addSubview(startView)
- startView.textAlignment = .center
- startView.leftAnchor.constraint(equalTo: painterContentView.leftAnchor).isActive = true
- startView.topAnchor.constraint(equalTo: painterContentView.topAnchor).isActive = true
- startView.addConstraint(NSLayoutConstraint(item: startView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: CustomCell.leftContentWidth))
-
- painterContentView.addSubview(finishView)
- finishView.textAlignment = .center
- finishView.leftAnchor.constraint(equalTo: startView.leftAnchor).isActive = true
- finishView.rightAnchor.constraint(equalTo: startView.rightAnchor).isActive = true
- finishView.topAnchor.constraint(equalTo: startView.bottomAnchor).isActive = true
-
- painterContentView.addSubview(locationView)
- locationView.textAlignment = .left
- locationView.topAnchor.constraint(equalTo: finishView.bottomAnchor, constant: 5).isActive = true
-
- switch RoomLocationStyle.fromUserDefaults() {
- case .Text:
- locationView.textAlignment = .center
-
- locationView.leftAnchor.constraint(equalTo: startView.leftAnchor).isActive = true
- locationView.rightAnchor.constraint(equalTo: startView.rightAnchor).isActive = true
- case .Icon:
- locationView.textAlignment = .left
- painterContentView.addSubview(locationIconView)
-
- locationIconView.leftAnchor.constraint(equalTo: startView.leftAnchor).isActive = true
- locationIconView.topAnchor.constraint(equalTo: finishView.bottomAnchor, constant: 2).isActive = true
- locationView.leftAnchor.constraint(equalTo: locationIconView.rightAnchor, constant: 5).isActive = true
- }
-
- painterContentView.addSubview(iconView)
- iconView.textAlignment = .center
- iconView.addConstraint(NSLayoutConstraint(item: iconView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: 54))
- iconView.leftAnchor.constraint(equalTo: startView.rightAnchor).isActive = true
- iconView.topAnchor.constraint(equalTo: painterContentView.topAnchor).isActive = true
- iconView.bottomAnchor.constraint(equalTo: painterContentView.bottomAnchor).isActive = true
-
- painterContentView.addSubview(lessonTypeView)
- lessonTypeView.leftAnchor.constraint(equalTo: iconView.rightAnchor).isActive = true
- lessonTypeView.topAnchor.constraint(equalTo: painterContentView.topAnchor).isActive = true
-
- painterContentView.addSubview(teacherGroupView)
- teacherGroupView.textAlignment = .right
- teacherGroupView.leftAnchor.constraint(equalTo: lessonTypeView.rightAnchor).isActive = true
- teacherGroupView.topAnchor.constraint(equalTo: painterContentView.topAnchor).isActive = true
- teacherGroupView.rightAnchor.constraint(equalTo: painterContentView.rightAnchor).isActive = true
-
- teacherGroupView.widthAnchor.constraint(equalTo: lessonTypeView.widthAnchor, multiplier: 1.0).isActive = true
-
- painterContentView.addSubview(titleView)
- titleView.leftAnchor.constraint(equalTo: iconView.rightAnchor).isActive = true
- titleView.topAnchor.constraint(equalTo: lessonTypeView.bottomAnchor).isActive = true
- titleView.bottomAnchor.constraint(equalTo: painterContentView.bottomAnchor).isActive = true
- titleView.rightAnchor.constraint(equalTo: painterContentView.rightAnchor).isActive = true
- }
-
- override func layoutSubviews() {
- super.layoutSubviews()
- if let model = model {
- painterView.model = model
- startView.text = model.start.format()
- finishView.text = model.finish.format()
- locationView.text = model.room.formatNumber()
- locationIconView.text = model.room.formatLocation()
- lessonTypeView.text = model.lesson.actionTitle
- switch SearchItemTypeId.fromUserDefaults() {
- case .Group:
- teacherGroupView.text = model.teacher.format()
- case .Teacher:
- teacherGroupView.text = model.group
- }
-
- titleView.text = Prefs.OPTIMIZED_LESSON_TITLES.fromUserDefaults() as? Bool ?? true
- ? model.lesson.title
- : model.lesson.fullTitle
- if titleView.text!.count > 30 {
- titleView.font = titleView.font.withSize(14)
- titleView.textAlignment = .center
- }
- iconView.text = FontIcon.intToStringIcon(UInt32(model.lesson.iconCodePoint))
- }
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
diff --git a/ios/TodayExt/FlutterUserDefaults.swift b/ios/TodayExt/FlutterUserDefaults.swift
deleted file mode 100644
index 03155ff..0000000
--- a/ios/TodayExt/FlutterUserDefaults.swift
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// FlutterUserDefaults.swift
-// TodayExt
-//
-// Created by Nickolay Truhin on 07.02.2020.
-// Copyright © 2020 The Chromium Authors. All rights reserved.
-//
-
-import Foundation
-
-enum RoomLocationStyle: Int {
- case Text = 0, Icon = 1
-
- static func fromUserDefaults() -> RoomLocationStyle {
- return RoomLocationStyle.init(rawValue: Prefs.ROOM_LOCATION_STYLE.fromUserDefaults() as? Int ?? RoomLocationStyle.Text.rawValue)!
- }
-}
-
-enum SearchItemTypeId: Int {
- case Group = 0, Teacher = 1
-
- static func fromUserDefaults() -> SearchItemTypeId {
- return SearchItemTypeId.init(rawValue: Prefs.ITEM_TYPE.fromUserDefaults() as? Int ?? SearchItemTypeId.Group.rawValue)!
- }
-}
-
-enum Prefs {
- case LAST_UPDATE,
- ROOM_LOCATION_STYLE,
- WIDGET_TRANSLUCENT,
- THEME_PRIMARY,
- THEME_ACCENT,
- THEME_TEXT_PRIMARY,
- THEME_TEXT_ACCENT,
- THEME_BACKGROUND,
- THEME_BRIGHTNESS,
- BEFORE_ALARM_CLOCK,
- END_CACHE,
- SEARCH_ITEM_PREFIX,
- ITEM_TYPE,
- ITEM_ID,
- ITEM_TITLE,
- SITE_API,
- OPTIMIZED_LESSON_TITLES,
- DAY_STYLE
-
- func fromUserDefaults() -> Any? {
- var str: String
- switch self {
- case .LAST_UPDATE:
- str = "last_update"
- case .ROOM_LOCATION_STYLE:
- str = "room_location_style"
- case .WIDGET_TRANSLUCENT:
- str = "widget_translucent"
- case .THEME_PRIMARY:
- str = "theme_primary"
- case .THEME_ACCENT:
- str = "theme_accent"
- case .THEME_TEXT_PRIMARY:
- str = "theme_text_primary"
- case .THEME_TEXT_ACCENT:
- str = "theme_text_accent"
- case .THEME_BACKGROUND:
- str = "theme_background"
- case .THEME_BRIGHTNESS:
- str = "theme_brightness"
- case .BEFORE_ALARM_CLOCK:
- str = "before_alarm_clock"
- case .END_CACHE:
- str = "end_cache"
- case .SEARCH_ITEM_PREFIX:
- str = "primary_search_item_"
- case .ITEM_TYPE:
- str = "type"
- case .ITEM_ID:
- str = "id"
- case .ITEM_TITLE:
- str = "title"
- case .SITE_API:
- str = "site_api"
- case .OPTIMIZED_LESSON_TITLES:
- str = "optimized_lesson_titles"
- case .DAY_STYLE:
- str = "day_style"
- }
-
- return FlutterUserDefaults.userDefaults.object(forKey: "flutter.\(str)")
- }
-}
-
-class FlutterUserDefaults {
- static private var userDefaultsInstance: UserDefaults?
-
- static var userDefaults: UserDefaults {
- get {
- if userDefaultsInstance == nil {
- userDefaultsInstance = UserDefaults.init(suiteName: "group.coolone.ranepatimetable.data")
- }
- return self.userDefaultsInstance!
- }
- }
-}
diff --git a/ios/TodayExt/Info.plist b/ios/TodayExt/Info.plist
deleted file mode 100644
index 76a1144..0000000
--- a/ios/TodayExt/Info.plist
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- $(PRODUCT_NAME)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- $(PRODUCT_BUNDLE_PACKAGE_TYPE)
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSHasLocalizedDisplayName
-
- NSExtension
-
- NSExtensionMainStoryboard
- MainInterface
- NSExtensionPointIdentifier
- com.apple.widget-extension
-
- UIAppFonts
-
- TimetableIcons.ttf
-
-
-
diff --git a/ios/TodayExt/LessonsDatabase.swift b/ios/TodayExt/LessonsDatabase.swift
deleted file mode 100644
index 866dd2e..0000000
--- a/ios/TodayExt/LessonsDatabase.swift
+++ /dev/null
@@ -1,181 +0,0 @@
-//
-// LessonsDatabase.swift
-// TodayExt
-//
-// Created by Nickolay Truhin on 07.02.2020.
-// Copyright © 2020 The Chromium Authors. All rights reserved.
-//
-
-import Foundation
-import SQLite
-
-class LessonsDatabase {
- static let db: Connection = try! Connection(URL.storeURL(for: "group.coolone.ranepatimetable.data", databaseName: "timetable").path)
-
- static let table = Table("lessons")
-
- static func getAll() throws -> [TimelineModel] {
- var lessons = [TimelineModel]()
- let midnight = Calendar.current.date(byAdding: .day, value: 1, to:
- Calendar(identifier: .gregorian).startOfDay(for: Date()))!
-
- for data in try self.db.prepare(table
- .filter(TimelineModel.TableKeys.date == Int(midnight.timeIntervalSince1970 * 1000))
- ) {
- lessons.append(TimelineModel.init(data))
- }
-
- return lessons
- }
-}
-
-struct TimelineModel {
-
- let date: Date
- let lesson: LessonModel
- let teacher: TeacherModel
- let group: String
- let room: RoomModel
- let start: TimeModel
- let finish: TimeModel
- let first, last: Bool
- let mergeBottom, mergeTop: Bool
-
- init(_ data: Row) {
- date = Date(timeIntervalSince1970: Double(data[TableKeys.date] / 1000))
- lesson = LessonModel.init(data)
- teacher = TeacherModel.init(data)
- room = RoomModel.init(data)
- start = TimeModel.init(data, prefix: "start")
- finish = TimeModel.init(data, prefix: "finish")
- group = data[TableKeys.group]
- mergeTop = data[TableKeys.mergeTop]
- mergeBottom = data[TableKeys.mergeBottom]
- first = data[TableKeys.first]
- last = data[TableKeys.last]
- }
-
- class TableKeys {
- static let
- date = Expression("date"),
- group = Expression("group"),
- first = Expression("first"),
- last = Expression("last"),
- mergeTop = Expression("mergeTop"),
- mergeBottom = Expression("mergeBottom")
- }
-}
-
-struct LessonModel {
- let title: String
- let fullTitle: String
- let iconCodePoint: Int
- let actionTitle: String
-
- init(_ data: Row) {
- title = data[TableKeys.title]
- fullTitle = data[TableKeys.fullTitle]
- iconCodePoint = data[TableKeys.iconCodePoint]
- actionTitle = data[TableKeys.actionTitle]
- }
-
- class TableKeys {
- static let
- title = Expression("lesson_title"),
- fullTitle = Expression("lesson_fullTitle"),
- iconCodePoint = Expression("lesson_iconCodePoint"),
- actionTitle = Expression("lesson_action_title")
- }
-}
-
-struct TeacherModel {
- let name: String
- let surname: String
- let patronymic: String
-
- init(_ data: Row) {
- name = data[TableKeys.name]
- surname = data[TableKeys.surname]
- patronymic = data[TableKeys.patronymic]
- }
-
- func format() -> String {
- return "\(surname) \(name.prefix(1)). \(patronymic.prefix(1))."
- }
-
- class TableKeys {
- static let
- name = Expression("teacher_name"),
- surname = Expression("teacher_surname"),
- patronymic = Expression("teacher_patronymic")
- }
-}
-
-struct RoomModel {
- let number: String
- let location: String
-
- init(_ data: Row) {
- number = data[TableKeys.number]
- location = data[TableKeys.location]
- }
-
- func formatNumber() -> String {
- switch RoomLocationStyle.fromUserDefaults() {
- case .Text:
- let prefix: String
-
- switch location {
- case Location.studyHostel:
- prefix = "СО-"
- case Location.hotel:
- prefix = "П8-"
- default:
- prefix = ""
- }
-
- return prefix + number
- case .Icon:
- return number
- }
- }
-
- func formatLocation() -> String {
- var icon: FontIcon
- switch location {
- case Location.studyHostel:
- icon = FontIcon.studyHostel
- case Location.hotel:
- icon = FontIcon.hotel
- default:
- icon = FontIcon.academy
- }
- return icon.toStringIcon()
- }
-
- class Location {
- static let
- studyHostel = "StudyHostel",
- hotel = "Hotel"
- }
-
- class TableKeys {
- static let
- number = Expression("room_number"),
- location = Expression("room_location")
- }
-}
-
-struct TimeModel {
- let hour: Int
- let minute: Int
-
- init(_ data: Row, prefix: String) {
- hour = data[Expression(prefix + "_hour")]
- minute = data[Expression(prefix + "_minute")]
- }
-
- func format() -> String {
- return "\(String(format: "%02d", hour)):\(String(format: "%02d", minute))"
- }
-}
diff --git a/ios/TodayExt/TimelinePainter.swift b/ios/TodayExt/TimelinePainter.swift
deleted file mode 100644
index d079ac3..0000000
--- a/ios/TodayExt/TimelinePainter.swift
+++ /dev/null
@@ -1,171 +0,0 @@
-//
-// LessonPainter.swift
-// TodayExt
-//
-// Created by Nickolay Truhin on 07.02.2020.
-// Copyright © 2020 The Chromium Authors. All rights reserved.
-//
-
-import UIKit
-
-class TimelinePainter: UIView {
- var model: TimelineModel?
-
- func drawPath(
- _ ctx: CGContext,
- path: CGPath,
- fillColor: UIColor
- ) {
- ctx.saveGState()
-
- ctx.addPath(path)
- ctx.setFillColor(fillColor.cgColor)
-
- ctx.closePath()
- ctx.fillPath()
- ctx.restoreGState()
- }
-
- func drawRRect(
- _ ctx: CGContext,
- rect: CGRect,
- cornerRadius: CGFloat,
- fillColor: UIColor
- )
- {
- drawPath(ctx, path: UIBezierPath(
- roundedRect: rect,
- cornerRadius: cornerRadius
- ).cgPath, fillColor: fillColor)
- }
-
- func drawArc(
- _ ctx: CGContext,
- center: CGPoint,
- radius: CGFloat,
- startAngle: CGFloat,
- endAngle: CGFloat,
- fillColor: UIColor,
- clockwise: Bool
- ) {
- drawPath(ctx, path: UIBezierPath(
- arcCenter: center,
- radius: radius,
- startAngle: startAngle.toRadians(),
- endAngle: endAngle.toRadians(),
- clockwise: clockwise
- ).cgPath, fillColor: fillColor)
- }
-
- func drawCircle(
- _ ctx: CGContext,
- center: CGPoint,
- radius: Int,
- fillColor: UIColor
- ) {
- ctx.setFillColor(fillColor.cgColor)
- ctx.fillEllipse(in: CGRect(
- x: center.x - CGFloat(radius),
- y: center.y - CGFloat(radius),
- width: CGFloat(radius * 2),
- height: CGFloat(radius * 2)
- ))
- }
-
- static let rectMargins = 8.0,
- iconSize = 15.0,
- circleRadius = 23.0,
- rectCornersRadius = 10.0,
- circleMargin = 5.0,
- circleRadiusAdd = 3.0;
-
- override func draw(_ rect: CGRect) {
- guard let ctx = UIGraphicsGetCurrentContext(), let model = model else {
- return
- }
-
- let bgColor = UIColor.init(rgbStr: Prefs.THEME_BACKGROUND.fromUserDefaults() as! String)
- let accentColor = UIColor.init(rgbStr: Prefs.THEME_ACCENT.fromUserDefaults() as! String)
-
- if model.mergeTop {
- ctx.setFillColor(bgColor.withAlphaComponent(0.5).cgColor)
- ctx.fill(CGRect(
- x: TimelinePainter.rectCornersRadius * 2,
- y: 0,
- width: Double(frame.width) - TimelinePainter.rectCornersRadius * 4,
- height: TimelinePainter.rectMargins
- ))
- }
-
- drawRRect(
- ctx,
- rect: CGRect(
- x: TimelinePainter.rectMargins, y: TimelinePainter.rectMargins,
- width: Double(frame.width) - TimelinePainter.rectMargins * 2,
- height: 80.0
- ),
- cornerRadius: 10,
- fillColor: bgColor.withAlphaComponent(
- traitCollection.userInterfaceStyle == .light
- ? 0.4
- : 0.2
- )
- )
-
- let circleOffset = CGPoint(
- x: TimelinePainter.rectMargins * 2 + TimelinePainter.circleRadius + 68,
- y: (Double(frame.height) + TimelinePainter.rectMargins) / 2
- )
-
- ctx.setFillColor(accentColor.cgColor)
- if !(model.first && model.last) {
- if model.first || !model.last {
- ctx.fill(CGRect(
- x: circleOffset.x - CGFloat(TimelinePainter.circleRadius),
- y: circleOffset.y,
- width: CGFloat(TimelinePainter.circleRadius * 2),
- height: frame.height - circleOffset.y
- ))
- }
-
- if model.last || !model.first {
- ctx.fill(CGRect(
- x: circleOffset.x - CGFloat(TimelinePainter.circleRadius),
- y: 0,
- width: CGFloat(TimelinePainter.circleRadius * 2),
- height: frame.height - circleOffset.y + CGFloat(TimelinePainter.rectMargins)
- ))
- }
-
- if model.first || model.last {
- drawArc(
- ctx,
- center: CGPoint(
- x: circleOffset.x,
- y: circleOffset.y
- ),
- radius: CGFloat(TimelinePainter.circleRadius),
- startAngle: CGFloat(0),
- endAngle: CGFloat(180),
- fillColor: accentColor,
- clockwise: model.last
- )
- }
- } else {
- drawCircle(
- ctx,
- center: circleOffset,
- radius: Int(TimelinePainter.circleRadius + TimelinePainter.circleRadiusAdd),
- fillColor: accentColor
- )
- }
-
- ctx.strokePath()
- }
-}
-
-extension CGFloat {
- func toRadians() -> CGFloat {
- return self * CGFloat(Float.pi) / 180.0
- }
-}
diff --git a/ios/TodayExt/TodayViewController.swift b/ios/TodayExt/TodayViewController.swift
deleted file mode 100644
index cf52dfd..0000000
--- a/ios/TodayExt/TodayViewController.swift
+++ /dev/null
@@ -1,132 +0,0 @@
-//
-// TodayViewController.swift
-// TodayExt
-//
-// Created by Nickolay Truhin on 07.02.2020.
-// Copyright © 2020 The Chromium Authors. All rights reserved.
-//
-
-import UIKit
-import NotificationCenter
-import SQLite
-
-class TodayViewController: UIViewController, NCWidgetProviding {
- @IBOutlet var tableView: UITableView!
-
- var data = [TimelineModel]()
-
- var messageView: TitleLabel = {
- var labelView = TitleLabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_TEXT_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- return labelView
- }()
-
- var messageIconView: TitleLabel = {
- var labelView = TitleLabel()
- labelView.translatesAutoresizingMaskIntoConstraints = false
-
- let color = Prefs.THEME_PRIMARY.fromUserDefaults() as? String ?? "ff0000ff"
- labelView.textColor = UIColor(rgbStr: color)
- labelView.font = UIFont.init(name: "TimetableIcons", size: 50)
- return labelView
- }()
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view.
-
- var dbExist = false
-
- do {
- try data = LessonsDatabase.getAll()
-
- dbExist = true
- } catch {}
-
- if dbExist {
- if data.isEmpty {
- let icon: FontIcon
- switch SearchItemTypeId.fromUserDefaults() {
- case .Group:
- icon = FontIcon.beer
- case .Teacher:
- icon = FontIcon.confetti
- }
- buildMessage(text: NSLocalizedString("freeDay", comment: ""), icon: icon)
- } else {
- tableView.delegate = self
- tableView.dataSource = self
-
- tableView.register(CustomCell.self, forCellReuseIdentifier: "custom")
-
- self.extensionContext?.widgetLargestAvailableDisplayMode = .expanded
- }
- } else {
- buildMessage(text: NSLocalizedString("noCache", comment: ""), icon: FontIcon.unknownLesson)
- }
- }
-
- func buildMessage(text: String, icon: FontIcon) {
- view.addSubview(messageIconView)
- messageIconView.text = icon.toStringIcon()
- messageIconView.textAlignment = .center
- messageIconView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
- messageIconView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
- messageIconView.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -20).isActive = true
-
- view.addSubview(messageView)
- messageView.text = text
- messageView.textAlignment = .center
- messageView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
- messageView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
- messageView.topAnchor.constraint(equalTo: messageIconView.bottomAnchor, constant: 10).isActive = true
- }
-
- func widgetPerformUpdate(completionHandler: (@escaping (NCUpdateResult) -> Void)) {
- // Perform any setup necessary in order to update the view.
-
- // If an error is encountered, use NCUpdateResult.Failed
- // If there's no update required, use NCUpdateResult.NoData
- // If there's an update, use NCUpdateResult.NewData
-
- completionHandler(NCUpdateResult.newData)
- }
-
- func widgetActiveDisplayModeDidChange(_ activeDisplayMode: NCWidgetDisplayMode, withMaximumSize maxSize: CGSize) {
-
- if activeDisplayMode == NCWidgetDisplayMode.compact {
- //compact
- self.preferredContentSize = maxSize
- } else {
- //extended
- self.preferredContentSize = CGSize(width: maxSize.width, height: CGFloat(data.count * 88 + Int(TimelinePainter.rectMargins)))
- }
- }
-}
-
-extension TodayViewController: UITableViewDataSource, UITableViewDelegate {
- func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
- return data.count
- }
-
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = self.tableView.dequeueReusableCell(withIdentifier: "custom") as! CustomCell
- cell.model = data[indexPath.row]
- return cell
- }
-}
-
-public extension URL {
-
- /// Returns a URL for the given app group and database pointing to the sqlite database.
- static func storeURL(for appGroup: String, databaseName: String) -> URL {
- guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup) else {
- fatalError("Shared file container could not be created.")
- }
-
- return fileContainer.appendingPathComponent("\(databaseName).db")
- }
-}
diff --git a/ios/TodayExt/en.lproj/InfoPlist.strings b/ios/TodayExt/en.lproj/InfoPlist.strings
deleted file mode 100644
index 205fa34..0000000
--- a/ios/TodayExt/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- InfoPlist.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"CFBundleName" = "Class schedule";
-"CFBundleDisplayName" = "Class schedule";
diff --git a/ios/TodayExt/en.lproj/Localizable.strings b/ios/TodayExt/en.lproj/Localizable.strings
deleted file mode 100644
index 6d6a96c..0000000
--- a/ios/TodayExt/en.lproj/Localizable.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- Localizable.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"noCache" = "The shedule is not cached";
-"freeDay" = "Free day";
diff --git a/ios/TodayExt/ru.lproj/InfoPlist.strings b/ios/TodayExt/ru.lproj/InfoPlist.strings
deleted file mode 100644
index 4b28304..0000000
--- a/ios/TodayExt/ru.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- InfoPlist.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"CFBundleName" = "Расписание занятий";
-"CFBundleDisplayName" = "Расписание занятий";
diff --git a/ios/TodayExt/ru.lproj/Localizable.strings b/ios/TodayExt/ru.lproj/Localizable.strings
deleted file mode 100644
index 8dac9a0..0000000
--- a/ios/TodayExt/ru.lproj/Localizable.strings
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- Localizable.strings
- Runner
-
- Created by Nickolay Truhin on 09.02.2020.
- Copyright © 2020 The Chromium Authors. All rights reserved.
-*/
-
-"noCache" = "Расписание не закешировано";
-"freeDay" = "Свободный день";
diff --git a/ios/TodayExt/ru.lproj/MainInterface.strings b/ios/TodayExt/ru.lproj/MainInterface.strings
deleted file mode 100644
index 8b13789..0000000
--- a/ios/TodayExt/ru.lproj/MainInterface.strings
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/ios/input.xcfilelist b/ios/input.xcfilelist
deleted file mode 100644
index 945be05..0000000
--- a/ios/input.xcfilelist
+++ /dev/null
@@ -1 +0,0 @@
-$(SRCROOT)/Carthage/Build/iOS/SQLite.framework
\ No newline at end of file
diff --git a/ios/output.xcfilelist b/ios/output.xcfilelist
deleted file mode 100644
index 8d4765e..0000000
--- a/ios/output.xcfilelist
+++ /dev/null
@@ -1 +0,0 @@
-$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SQLite.framework
\ No newline at end of file
diff --git a/lib/about.dart b/lib/about.dart
index 2fd937f..2838e71 100644
--- a/lib/about.dart
+++ b/lib/about.dart
@@ -5,10 +5,10 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:ranepa_timetable/intro.dart';
-import 'package:ranepa_timetable/localizations.dart';
-import 'package:ranepa_timetable/theme.dart';
-import 'package:ranepa_timetable/widget_templates.dart';
+import 'package:ranepatimetable/intro.dart';
+import 'package:ranepatimetable/localizations.dart';
+import 'package:ranepatimetable/theme.dart';
+import 'package:ranepatimetable/widget_templates.dart';
import 'package:url_launcher/url_launcher.dart';
class AboutBackgroundClipper extends CustomClipper {
@@ -58,7 +58,7 @@ void main() => runApp(MaterialApp(
));
class AboutScreen extends StatelessWidget {
- BuildContext ctx;
+ static late BuildContext ctx;
static const ROUTE = "/about";
Widget _buildGuyIconContent(
@@ -67,9 +67,9 @@ class AboutScreen extends StatelessWidget {
String name,
String url,
String image, {
- String descriptionLeft,
- String descriptionRight,
- String singleStr,
+ String? descriptionLeft,
+ String? descriptionRight,
+ String? singleStr,
}) =>
Container(
height: 220,
@@ -83,14 +83,14 @@ class AboutScreen extends StatelessWidget {
width: 100.0,
height: 100.0,
decoration: BoxDecoration(
- color: textTheme.title.color,
+ color: textTheme.titleLarge?.color,
image: DecorationImage(
image: AssetImage('assets/images/$image.jpg'),
fit: BoxFit.cover,
),
borderRadius: BorderRadius.all(Radius.circular(50.0)),
border: Border.all(
- color: textTheme.title.color,
+ color: textTheme.titleLarge?.color ?? Colors.transparent,
width: 4.0,
),
),
@@ -100,11 +100,11 @@ class AboutScreen extends StatelessWidget {
RichText(
text: TextSpan(
text: '$name\n',
- style: textTheme.title,
+ style: textTheme.titleLarge,
children: [
TextSpan(
text: '"$url"',
- style: textTheme.body2,
+ style: textTheme.bodyLarge,
),
],
),
@@ -115,7 +115,7 @@ class AboutScreen extends StatelessWidget {
child: singleStr != null
? AutoSizeText(
singleStr,
- style: textTheme.subtitle,
+ style: textTheme.titleMedium,
textAlign: TextAlign.center,
)
: Row(
@@ -126,21 +126,21 @@ class AboutScreen extends StatelessWidget {
children: [
Flexible(
child: AutoSizeText(
- descriptionLeft,
- style: textTheme.subtitle,
+ descriptionLeft ?? '',
+ style: textTheme.titleMedium,
textAlign: TextAlign.right,
minFontSize: 2,
- maxLines: descriptionLeft.split('\n').length,
+ maxLines: descriptionLeft?.split('\n').length,
softWrap: false,
),
),
Container(width: 4),
Flexible(
child: AutoSizeText(
- descriptionRight,
- style: textTheme.subtitle,
+ descriptionRight ?? '',
+ style: textTheme.titleMedium,
textAlign: TextAlign.left,
- maxLines: descriptionRight.split('\n').length,
+ maxLines: descriptionRight?.split('\n').length,
minFontSize: 2,
softWrap: false,
),
@@ -161,9 +161,9 @@ class AboutScreen extends StatelessWidget {
String url,
String image,
Orientation orientation, {
- String descriptionLeft,
- String descriptionRight,
- String singleStr,
+ String? descriptionLeft,
+ String? descriptionRight,
+ String? singleStr,
}) =>
orientation == Orientation.portrait
? Flexible(
@@ -234,7 +234,7 @@ class AboutScreen extends StatelessWidget {
) =>
IntroScreen.buildWelcomeTextList(
AppLocalizations.of(ctx),
- Theme.of(ctx).accentTextTheme,
+ Theme.of(ctx).textTheme,
);
List _buildLogoText(
@@ -247,7 +247,7 @@ class AboutScreen extends StatelessWidget {
padding: const EdgeInsets.all(20),
child: WidgetTemplates.buildLogo(
Theme.of(ctx),
- color: textTheme.title.color,
+ color: textTheme.titleLarge?.color ?? Colors.transparent,
),
),
orientation == Orientation.landscape
@@ -264,7 +264,7 @@ class AboutScreen extends StatelessWidget {
Widget build(BuildContext ctx) {
final currentTheme = Theme.of(ctx);
final textTheme = (currentTheme.brightness == Brightness.dark
- ? Theme.of(ctx).accentTextTheme
+ ? Theme.of(ctx).textTheme
: Theme.of(ctx).primaryTextTheme);
return PlatformScaffold(
@@ -342,7 +342,7 @@ class AboutScreen extends StatelessWidget {
),
),
appBar: PlatformAppBar(
- android: (ctx) => MaterialAppBarData(elevation: 0),
+ material: (ctx, platform) => MaterialAppBarData(elevation: 0),
title: Text(
AppLocalizations.of(ctx).about,
style: TextStyle(color: Colors.white),
@@ -352,7 +352,7 @@ class AboutScreen extends StatelessWidget {
padding: EdgeInsets.zero,
icon: Icon(
PlatformIcons(ctx).back,
- color: Platform.isIOS ? getTheme().accentColor : null,
+ color: Platform.isIOS ? ColorScheme.fromSwatch().secondary : null,
),
onPressed: () => Navigator.pop(ctx),
),
diff --git a/lib/apis.dart b/lib/apis.dart
index 446cc53..fd9de3b 100644
--- a/lib/apis.dart
+++ b/lib/apis.dart
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:flutter/widgets.dart';
-import 'package:ranepa_timetable/localizations.dart';
+import 'package:ranepatimetable/localizations.dart';
import 'package:xml/xml.dart' as xml;
const DEFAULT_API_ID = SiteApiIds.SITE;
@@ -15,8 +15,9 @@ enum SiteApiIds {
class SiteApi {
final String title;
final Uri url;
+ final bool isHidden;
- const SiteApi(this.title, this.url);
+ const SiteApi(this.title, this.url, this.isHidden);
}
enum OldAppApiTimetableIndexes {
@@ -35,12 +36,9 @@ enum OldAppApiSearchIndexes {
}
class SiteApis {
- static SiteApis _singleton;
+ static SiteApis? _singleton;
- factory SiteApis(BuildContext ctx) {
- if (_singleton == null) _singleton = SiteApis._internal(ctx);
- return _singleton;
- }
+ factory SiteApis(BuildContext ctx) => _singleton ?? SiteApis._internal(ctx);
final List apis;
@@ -53,6 +51,7 @@ class SiteApis {
"test.ranhigs-nn.ru",
"/api/WebService.asmx",
),
+ true
),
// APP_NEW
@@ -62,6 +61,7 @@ class SiteApis {
"services.niu.ranepa.ru",
"/wp-content/plugins/rasp/rasp_json_data.php",
),
+ true
),
// SITE
@@ -71,6 +71,7 @@ class SiteApis {
"services.niu.ranepa.ru",
"/API/public/",
),
+ true
),
];
}
@@ -81,13 +82,13 @@ parseResp(SiteApiIds api, String resp) {
var arr = json.decode(resp);
return arr is Iterable ? arr : [arr];
case SiteApiIds.APP_OLD:
- return xml
+ return xml.XmlDocument
.parse(resp)
.children[1]
.firstChild
- .firstChild
- .firstChild
- .children;
+ ?.firstChild
+ ?.firstChild
+ ?.children;
case SiteApiIds.SITE:
final arr = json.decode(resp).entries.first.value.entries;
diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart
deleted file mode 100644
index a1f1fd4..0000000
--- a/lib/generated/i18n.dart
+++ /dev/null
@@ -1,77 +0,0 @@
-import 'dart:async';
-
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: camel_case_types
-// ignore_for_file: prefer_single_quotes
-
-//This file is automatically generated. DO NOT EDIT, all your changes would be lost.
-
-class S implements WidgetsLocalizations {
- const S();
-
- static const GeneratedLocalizationsDelegate delegate =
- const GeneratedLocalizationsDelegate();
-
- static S of(BuildContext context) =>
- Localizations.of(context, WidgetsLocalizations);
-
- @override
- TextDirection get textDirection => TextDirection.ltr;
-
-}
-
-class en extends S {
- const en();
-}
-
-
-class GeneratedLocalizationsDelegate extends LocalizationsDelegate {
- const GeneratedLocalizationsDelegate();
-
- List get supportedLocales {
- return const [
-
- const Locale("en", ""),
-
- ];
- }
-
- LocaleResolutionCallback resolution({Locale fallback}) {
- return (Locale locale, Iterable supported) {
- final Locale languageLocale = new Locale(locale.languageCode, "");
- if (supported.contains(locale))
- return locale;
- else if (supported.contains(languageLocale))
- return languageLocale;
- else {
- final Locale fallbackLocale = fallback ?? supported.first;
- return fallbackLocale;
- }
- };
- }
-
- @override
- Future load(Locale locale) {
- final String lang = getLang(locale);
- switch (lang) {
-
- case "en":
- return new SynchronousFuture(const en());
-
- default:
- return new SynchronousFuture(const S());
- }
- }
-
- @override
- bool isSupported(Locale locale) => supportedLocales.contains(locale);
-
- @override
- bool shouldReload(GeneratedLocalizationsDelegate old) => false;
-}
-
-String getLang(Locale l) => l.countryCode != null && l.countryCode.isEmpty
- ? l.languageCode
- : l.toString();
diff --git a/lib/intro.dart b/lib/intro.dart
index e8b9e30..1aeae9b 100644
--- a/lib/intro.dart
+++ b/lib/intro.dart
@@ -5,20 +5,19 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:intro_views_flutter/Models/page_view_model.dart';
import 'package:intro_views_flutter/intro_views_flutter.dart';
-import 'package:ranepa_timetable/about.dart';
-import 'package:ranepa_timetable/localizations.dart';
-import 'package:ranepa_timetable/prefs.dart';
-import 'package:ranepa_timetable/theme.dart';
-import 'package:ranepa_timetable/timeline.dart';
-import 'package:ranepa_timetable/timetable.dart';
-import 'package:ranepa_timetable/widget_templates.dart';
+import 'package:ranepatimetable/about.dart';
+import 'package:ranepatimetable/localizations.dart';
+import 'package:ranepatimetable/prefs.dart';
+import 'package:ranepatimetable/theme.dart';
+import 'package:ranepatimetable/timeline.dart';
+import 'package:ranepatimetable/timetable.dart';
+import 'package:ranepatimetable/widget_templates.dart';
class IntroScreen extends StatelessWidget {
- static const ROUTE = "/intro";
+ static String ROUTE = "/intro";
- IntroScreen({Key key}) : super(key: key);
+ IntroScreen({Key? key}) : super(key: key);
PageViewModel _buildTimetable(BuildContext ctx) => PageViewModel(
bubbleBackgroundColor: contentColor,
@@ -41,7 +40,7 @@ class IntroScreen extends StatelessWidget {
static Widget buildWelcomeTextList(
AppLocalizations localizations,
TextTheme textTheme, {
- Orientation orientation,
+ Orientation? orientation,
}) =>
Column(
mainAxisSize: MainAxisSize.max,
@@ -49,12 +48,12 @@ class IntroScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
orientation == Orientation.landscape
- ? Expanded
+ ? Expanded(child: Container())
: Flexible(
child: SingleChildScrollView(
child: Text(
localizations.introWelcomeDescription,
- style: textTheme.body1.merge(
+ style: textTheme.bodyMedium?.merge(
TextStyle(color: Colors.white, fontSize: 20),
),
textAlign: TextAlign.center,
@@ -66,7 +65,7 @@ class IntroScreen extends StatelessWidget {
child: Text(
localizations.introWelcomeSupportBy,
textAlign: TextAlign.center,
- style: textTheme.caption.merge(
+ style: textTheme.bodySmall?.merge(
TextStyle(
fontSize: 20,
color: Colors.white.withOpacity(0.5),
@@ -91,8 +90,8 @@ class IntroScreen extends StatelessWidget {
body: buildWelcomeTextList(
localizations,
TextTheme(
- body1: TextStyle(color: Colors.white),
- caption: TextStyle(color: Colors.grey),
+ bodyLarge: TextStyle(color: Colors.white),
+ bodySmall: TextStyle(color: Colors.grey),
),
),
title: _buildTitleText(localizations.introWelcomeTitle),
@@ -138,7 +137,7 @@ class IntroScreen extends StatelessWidget {
PlatformIcons(ctx).search,
onPressed: () async {
await onThemeChange();
- return showSearchItemSelect(ctx);
+ showSearchItemSelect(ctx);
},
),
),
@@ -159,7 +158,7 @@ class IntroScreen extends StatelessWidget {
RawMaterialButton _buildCircleButton(
IconData icon, {
double size = 100,
- VoidCallback onPressed,
+ required VoidCallback onPressed,
bool enabled = true,
}) =>
RawMaterialButton(
@@ -176,10 +175,10 @@ class IntroScreen extends StatelessWidget {
padding: EdgeInsets.all(size / 3),
);
- ThemeData theme;
- Color backgroundColor;
- Color contentColor;
- AppLocalizations localizations;
+ static late ThemeData theme;
+ static late Color backgroundColor;
+ static late Color contentColor;
+ static late AppLocalizations localizations;
@override
Widget build(BuildContext ctx) => buildThemeStream(
@@ -192,10 +191,8 @@ class IntroScreen extends StatelessWidget {
? theme.primaryColor
: theme.canvasColor;
contentColor = (theme.brightness == Brightness.light
- ? theme.accentTextTheme
- : theme.textTheme)
- .body1
- .color;
+ ? Colors.white
+ : Colors.black);
return IntroViewsFlutter(
[
diff --git a/lib/l10n/intl_messages.arb b/lib/l10n/intl_messages.arb
index b4f1061..0ae2a08 100644
--- a/lib/l10n/intl_messages.arb
+++ b/lib/l10n/intl_messages.arb
@@ -1,5 +1,5 @@
{
- "@@last_modified": "2020-02-05T14:06:26.216374",
+ "@@last_modified": "2023-06-04T16:56:33.684027",
"title": "RANEPA (Timetable)",
"@title": {
"type": "text",
@@ -345,12 +345,12 @@
"type": "text",
"placeholders": {}
},
- "themeTitle": "Theme",
+ "themeTitle": "Dark mode",
"@themeTitle": {
"type": "text",
"placeholders": {}
},
- "themeDescription": "Color scheme of the application and widget",
+ "themeDescription": "Dark color scheme of the application and widget",
"@themeDescription": {
"type": "text",
"placeholders": {}
diff --git a/lib/l10n/messages_all.dart b/lib/l10n/messages_all.dart
index 835026b..fc55d77 100644
--- a/lib/l10n/messages_all.dart
+++ b/lib/l10n/messages_all.dart
@@ -2,66 +2,6 @@
// This is a library that looks up messages for specific locales by
// delegating to the appropriate library.
-// Ignore issues from commonly used lints in this file.
-// ignore_for_file:implementation_imports, file_names, unnecessary_new
-// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
-// ignore_for_file:argument_type_not_assignable, invalid_assignment
-// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
-// ignore_for_file:comment_references
+export 'messages_all_locales.dart'
+ show initializeMessages;
-import 'dart:async';
-
-import 'package:intl/intl.dart';
-import 'package:intl/message_lookup_by_library.dart';
-import 'package:intl/src/intl_helpers.dart';
-
-import 'messages_messages.dart' as messages_messages;
-import 'messages_ru.dart' as messages_ru;
-
-typedef Future LibraryLoader();
-Map _deferredLibraries = {
- 'messages': () => new Future.value(null),
- 'ru': () => new Future.value(null),
-};
-
-MessageLookupByLibrary _findExact(String localeName) {
- switch (localeName) {
- case 'messages':
- return messages_messages.messages;
- case 'ru':
- return messages_ru.messages;
- default:
- return null;
- }
-}
-
-/// User programs should call this before using [localeName] for messages.
-Future initializeMessages(String localeName) async {
- var availableLocale = Intl.verifiedLocale(
- localeName,
- (locale) => _deferredLibraries[locale] != null,
- onFailure: (_) => null);
- if (availableLocale == null) {
- return new Future.value(false);
- }
- var lib = _deferredLibraries[availableLocale];
- await (lib == null ? new Future.value(false) : lib());
- initializeInternalMessageLookup(() => new CompositeMessageLookup());
- messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
- return new Future.value(true);
-}
-
-bool _messagesExistFor(String locale) {
- try {
- return _findExact(locale) != null;
- } catch (e) {
- return false;
- }
-}
-
-MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
- var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
- onFailure: (_) => null);
- if (actualLocale == null) return null;
- return _findExact(actualLocale);
-}
diff --git a/lib/l10n/messages_all_locales.dart b/lib/l10n/messages_all_locales.dart
new file mode 100644
index 0000000..7311918
--- /dev/null
+++ b/lib/l10n/messages_all_locales.dart
@@ -0,0 +1,65 @@
+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
+// This is a library that looks up messages for specific locales by
+// delegating to the appropriate library.
+
+// Ignore issues from commonly used lints in this file.
+// ignore_for_file:implementation_imports, file_names
+// ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
+// ignore_for_file:argument_type_not_assignable, invalid_assignment
+// ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
+// ignore_for_file:comment_references
+
+import 'package:intl/intl.dart';
+import 'package:intl/message_lookup_by_library.dart';
+import 'package:intl/src/intl_helpers.dart';
+
+import 'messages_messages.dart' as messages_messages;
+import 'messages_ru.dart' as messages_ru;
+
+typedef Future LibraryLoader();
+Map _deferredLibraries = {
+ 'messages': () => Future.value(null),
+ 'ru': () => Future.value(null),
+};
+
+MessageLookupByLibrary? _findExact(String localeName) {
+ switch (localeName) {
+ case 'messages':
+ return messages_messages.messages;
+ case 'ru':
+ return messages_ru.messages;
+ default:
+ return null;
+ }
+}
+
+/// User programs should call this before using [localeName] for messages.
+Future initializeMessages(String? localeName) async {
+ var availableLocale = Intl.verifiedLocale(
+ localeName,
+ (locale) => _deferredLibraries[locale] != null,
+ onFailure: (_) => null);
+ if (availableLocale == null) {
+ return Future.value(false);
+ }
+ var lib = _deferredLibraries[availableLocale];
+ await (lib == null ? Future.value(false) : lib());
+ initializeInternalMessageLookup(() => CompositeMessageLookup());
+ messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
+ return Future.value(true);
+}
+
+bool _messagesExistFor(String locale) {
+ try {
+ return _findExact(locale) != null;
+ } catch (e) {
+ return false;
+ }
+}
+
+MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
+ var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
+ onFailure: (_) => null);
+ if (actualLocale == null) return null;
+ return _findExact(actualLocale);
+}
diff --git a/lib/l10n/messages_messages.dart b/lib/l10n/messages_messages.dart
index 26a8a30..1844738 100644
--- a/lib/l10n/messages_messages.dart
+++ b/lib/l10n/messages_messages.dart
@@ -4,7 +4,7 @@
// function name.
// Ignore issues from commonly used lints in this file.
-// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
+// ignore_for_file:unnecessary_brace_in_string_interps
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names
@@ -12,124 +12,128 @@
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
-final messages = new MessageLookup();
+final messages = MessageLookup();
-typedef String MessageIfAbsent(String messageStr, List args);
+typedef String? MessageIfAbsent(
+ String? messageStr, List