Compare commits

..

No commits in common. 'master' and 'v2.0.3' have entirely different histories.

  1. 24
      .gitignore
  2. 24
      .metadata
  3. 57
      .vscode/launch.json
  4. 19
      CHANGELOG.TXT
  5. 122
      CHANGELOG.txt
  6. 17
      README.md
  7. 29
      analysis_options.yaml
  8. 13
      android/.gitignore
  9. 41
      android/app/build.gradle
  10. 2
      android/app/src/debug/AndroidManifest.xml
  11. 47
      android/app/src/main/AndroidManifest.xml
  12. 13
      android/app/src/main/kotlin/ml/dandevelop/info_tren/MainActivity.kt
  13. 6
      android/app/src/main/kotlin/xyz/dcdevelop/infotren/MainActivity.kt
  14. 12
      android/app/src/main/res/drawable-v21/launch_background.xml
  15. 18
      android/app/src/main/res/values-night/styles.xml
  16. 12
      android/app/src/main/res/values/styles.xml
  17. 2
      android/app/src/profile/AndroidManifest.xml
  18. 12
      android/build.gradle
  19. 3
      android/gradle.properties
  20. 2
      android/gradle/wrapper/gradle-wrapper.properties
  21. 18
      android/settings.gradle
  22. 1
      assets/lines/atc.json
  23. 1
      assets/lines/cfr.json
  24. 6
      assets/lines/files.txt
  25. 1
      assets/lines/interregional.json
  26. 1
      assets/lines/rc.json
  27. 1
      assets/lines/st.json
  28. 1
      assets/lines/tfc.json
  29. 216
      codemagic.yaml
  30. BIN
      fonts/ah/ah-Bold.ttf
  31. BIN
      fonts/ah/ah-BoldItalic.ttf
  32. BIN
      fonts/ah/ah-Italic.ttf
  33. BIN
      fonts/ah/ah-Regular.ttf
  34. 33
      ios/.gitignore
  35. 4
      ios/Flutter/AppFrameworkInfo.plist
  36. 2
      ios/Flutter/Debug.xcconfig
  37. 2
      ios/Flutter/Release.xcconfig
  38. 69
      ios/Podfile
  39. 32
      ios/Podfile.lock
  40. 180
      ios/Runner.xcodeproj/project.pbxproj
  41. 2
      ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  42. 8
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  43. 8
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  44. 2
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  45. 8
      ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  46. 2
      ios/Runner/AppDelegate.swift
  47. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  48. 19
      ios/Runner/Info.plist
  49. 2
      ios/Runner/Runner-Bridging-Header.h
  50. 1
      lib/api/common.dart
  51. 18
      lib/api/releases.dart
  52. 14
      lib/api/station_data.dart
  53. 11
      lib/api/stations.dart
  54. 11
      lib/api/train_data.dart
  55. 11
      lib/api/trains.dart
  56. 59
      lib/components/badge/badge.dart
  57. 80
      lib/components/badge/badge_cupertino.dart
  58. 80
      lib/components/badge/badge_fluent.dart
  59. 79
      lib/components/badge/badge_material.dart
  60. 60
      lib/components/cupertino_divider.dart
  61. 58
      lib/components/cupertino_listtile.dart
  62. 42
      lib/components/future_display.dart
  63. 34
      lib/components/loading/loading.dart
  64. 27
      lib/components/loading/loading_cupertino.dart
  65. 26
      lib/components/loading/loading_fluent.dart
  66. 26
      lib/components/loading/loading_material.dart
  67. 175
      lib/components/refresh_future_builder.dart
  68. 155
      lib/components/select_train_suggestions/select_train_suggestions.dart
  69. 86
      lib/components/select_train_suggestions/select_train_suggestions_cupertino.dart
  70. 85
      lib/components/select_train_suggestions/select_train_suggestions_fluent.dart
  71. 55
      lib/components/select_train_suggestions/select_train_suggestions_material.dart
  72. 63
      lib/components/slim_app_bar.dart
  73. 38
      lib/components/sliver_persistent_header_padding.dart
  74. 39
      lib/components/train_id_text_span.dart
  75. 23
      lib/hidden_webview.dart
  76. 345
      lib/main.dart
  77. 14
      lib/models.dart
  78. 83
      lib/models/changelog_entry.dart
  79. 18
      lib/models/station_arrdep.dart
  80. 241
      lib/models/station_arrdep.freezed.dart
  81. 23
      lib/models/station_arrdep.g.dart
  82. 17
      lib/models/station_data.dart
  83. 239
      lib/models/station_data.freezed.dart
  84. 27
      lib/models/station_data.g.dart
  85. 17
      lib/models/station_status.dart
  86. 210
      lib/models/station_status.freezed.dart
  87. 23
      lib/models/station_status.g.dart
  88. 19
      lib/models/station_train.dart
  89. 268
      lib/models/station_train.freezed.dart
  90. 28
      lib/models/station_train.g.dart
  91. 14
      lib/models/stations_result.dart
  92. 179
      lib/models/stations_result.freezed.dart
  93. 21
      lib/models/stations_result.g.dart
  94. 1226
      lib/models/train_data.dart
  95. 2365
      lib/models/train_data.freezed.dart
  96. 271
      lib/models/train_data.g.dart
  97. 15
      lib/models/trains_result.dart
  98. 187
      lib/models/trains_result.freezed.dart
  99. 21
      lib/models/trains_result.g.dart
  100. 24
      lib/models/ui_design.dart
  101. Some files were not shown because too many files have changed in this diff Show More

24
.gitignore vendored

@ -24,16 +24,10 @@
**/doc/api/ **/doc/api/
.dart_tool/ .dart_tool/
.flutter-plugins .flutter-plugins
.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
.packages .packages
.pub-cache/ .pub-cache/
.pub/ .pub/
build/ /build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds
# Android related # Android related
**/android/**/gradle-wrapper.jar **/android/**/gradle-wrapper.jar
@ -43,8 +37,6 @@ unlinked_spec.ds
**/android/gradlew.bat **/android/gradlew.bat
**/android/local.properties **/android/local.properties
**/android/**/GeneratedPluginRegistrant.java **/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
*.jks
# iOS/XCode related # iOS/XCode related
**/ios/**/*.mode1v3 **/ios/**/*.mode1v3
@ -63,32 +55,18 @@ unlinked_spec.ds
**/ios/**/profile **/ios/**/profile
**/ios/**/xcuserdata **/ios/**/xcuserdata
**/ios/.generated/ **/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework **/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework **/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig **/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx **/ios/Flutter/app.flx
**/ios/Flutter/app.zip **/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/ **/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json **/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.* **/ios/Runner/GeneratedPluginRegistrant.*
# macOS
**/macos/Flutter/GeneratedPluginRegistrant.swift
# Coverage
coverage/
# Symbols
app.*.symbols
# Exceptions to above rules. # Exceptions to above rules.
!**/ios/**/default.mode1v3 !**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3 !**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser !**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3 !**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock

24
.metadata

@ -1,30 +1,10 @@
# This file tracks properties of this Flutter project. # This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc. # Used by Flutter tool to assess capabilities and perform upgrades etc.
# #
# This file should be version controlled. # This file should be version controlled and should not be manually edited.
version: version:
revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 revision: b712a172f9694745f50505c93340883493b505e5
channel: stable channel: stable
project_type: app project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
- platform: windows
create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
# 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'

57
.vscode/launch.json vendored

@ -1,57 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Current Device",
"request": "launch",
"type": "dart",
"args": [
"--dart-define",
"DOWNLOAD=apk"
]
},
{
"name": "info_tren (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "Android Emulator",
"request": "launch",
"type": "dart",
"deviceId": "sdk gphone"
},
{
"name": "iPhone",
"request": "launch",
"type": "dart",
"deviceId": "iphone"
},
{
"name": "macOS",
"request": "launch",
"type": "dart",
"deviceId": "macOS"
},
{
"name": "Samsung",
"request": "launch",
"type": "dart",
"deviceId": "SM"
}
],
"compounds": [
{
"name": "All Devices",
"configurations": ["Android Emulator", "iPhone", "macOS"]
},
{
"name": "Mac + Samsung",
"configurations": ["macOS", "Samsung"]
}
]
}

19
CHANGELOG.TXT

@ -0,0 +1,19 @@
v2.0.3
- added km badge colour for iOS
+ will be added for Android soon
+ green for being on time
+ yellow for a non planned stop
+ red for a delay
v2.0.2
- added translucency to the navigation bar on iOS
v2.0.1
- added a little separation between the arrows and the text in the stations list
- fine tuned the positioning, centering items when they are supposed to be centered
- changed text from "sosește" to "sosire", in order to match "plecare"
v2.0.0
Rewritten!
- separate UI for Android and iOS
- uses WebView to get data on device instead of relying on server

122
CHANGELOG.txt

@ -1,122 +0,0 @@
v2.7.11
Add support for IC trains.
Allow choosing displayed timezone.
Show notes about wagon detachment, receival, or train number changes.
Use system accent color if available.
Use API v3.
v2.7.10
Add about page to Fluent UI.
Add settings page, allowing changing between UIs.
Add touch scrolling on Linux.
v2.7.9
Add Fluent UI for Windows and Linux.
Add split view in landscape when viewing a train.
Add error handling and auto refresh when viewing a station's arrivals/departures.
General code fixes and migration (freezed, riverpod).
v2.7.8
Added cancelled trains in departures/arrivals board.
Selecting train in departures/arrivels board chooses appropriate departure date.
Temporarily switched all platforms to Material.
v2.7.7
Improved departures/arrivals page:
- badge for platform (due to limitations in data, platform in only known when a train arrives/departs)
- time deviations shown (delays or arriving early)
Moved to API v3 for station data.
v2.7.6
Transitioned to Material 3.
Redesigned main page on Material.
On Android (Material), tapping station card in train information screen opens departures/arrivals board.
Added past tense to trains already arrived/departed.
Fixed download button on Android.
v2.7.5
Added about page and in-app changelog.
On Android, added download buttons.
v2.7.4
Addressed Android 12 component exporting rule.
See: https://developer.android.com/about/versions/12/behavior-changes-12#exported
v2.7.3
Added Android APK signing.
v2.7.2
Fixed alignment of station names in train screen.
v2.7.1
Switched train suggestions list from hardcoded data to server data.
Added Linux build files.
v2.7.0
Changed domain name for server providing the data.
Changed bundle name accordingly.
v2.6.0
Added ability to view yesterday data for trains that didn't depart yet today.
Fixed iOS status bar color.
v2.5.0
Initial arrivals/departures support
v2.4.1
Fixed DateTime (UTC -> local)
v2.4.0
Moved to api v2
Added support for any train number, including train numbers starting with 0
v2.3.1
Fixed badge background when arrival is known but not departure
v2.3.0
Added pull to refresh
v2.2.0
Added refresh button on error
v2.1.1
Fixed Android build
Switched versioning format
v2.0.7
Switched from WebView to API
Updated app to latest Flutter
Tweaks
v2.0.6
Brought feature parity with iOS _(except for v2.0.2, which is iOS specific)_.
v2.0.5
- increased font weight on iOS
- added support for system bolt font request on iOS
v2.0.4
- added original time in case of delay for iOS
+ will be for Android soon
+ in case there is a delay, the original time will be shown with
a stroke through it and the new time will be shown below
v2.0.3
- added km badge colour for iOS
+ will be added for Android soon
+ green for being on time
+ yellow for a non planned stop
+ red for a delay
v2.0.2
- added translucency to the navigation bar on iOS
v2.0.1
- added a little separation between the arrows and the text in the stations list
- fine tuned the positioning, centering items when they are supposed to be centered
- changed text from "sosește" to "sosire", in order to match "plecare"
v2.0.0
Rewritten!
- separate UI for Android and iOS
- uses WebView to get data on device instead of relying on server

17
README.md

@ -1,3 +1,16 @@
# Info Tren # info_tren
O aplicație care va facilita accesul la serviciile oferite de [Informatica Feroviară](https://infofer.ro), [CFR Călători](https://cfrcalatori.ro) și operatorii privați. A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

29
analysis_options.yaml

@ -1,29 +0,0 @@
# 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

13
android/.gitignore vendored

@ -1,13 +0,0 @@
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

41
android/app/build.gradle

@ -25,48 +25,32 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 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 { android {
compileSdkVersion 33 compileSdkVersion 28
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
} }
lintOptions {
disable 'InvalidPackage'
}
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ro.dcdev.infotren" applicationId "ml.dandevelop.info_tren"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 33 targetSdkVersion 28
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release // 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
} }
} }
} }
@ -77,4 +61,7 @@ flutter {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
} }

2
android/app/src/debug/AndroidManifest.xml

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ro.dcdev.infotren"> package="ml.dandevelop.info_tren">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

47
android/app/src/main/AndroidManifest.xml

@ -1,43 +1,36 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ro.dcdev.infotren"> package="ml.dandevelop.info_tren">
<uses-permission android:name="android.permission.INTERNET"/>
<application <uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Info Tren" android:label="Info Tren"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
<!-- Specifies an Android theme to apply to this Activity as soon as android:screenOrientation="portrait">
the Android process has started. This theme is visible to the user <!-- This keeps the window background of the activity showing
while the Flutter UI initializes. After that, this theme continues until Flutter renders its first frame. It can be removed if
to determine the Window background behind the Flutter UI. --> there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:resource="@style/NormalTheme" android:value="true" />
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application> </application>
</manifest> </manifest>

13
android/app/src/main/kotlin/ml/dandevelop/info_tren/MainActivity.kt

@ -0,0 +1,13 @@
package ml.dandevelop.info_tren
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}

6
android/app/src/main/kotlin/xyz/dcdevelop/infotren/MainActivity.kt

@ -1,6 +0,0 @@
package ro.dcdev.infotren
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

12
android/app/src/main/res/drawable-v21/launch_background.xml

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

18
android/app/src/main/res/values-night/styles.xml

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

12
android/app/src/main/res/values/styles.xml

@ -1,18 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources> </resources>

2
android/app/src/profile/AndroidManifest.xml

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ro.dcdev.info_tren"> package="ml.dandevelop.info_tren">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

12
android/build.gradle

@ -1,12 +1,12 @@
buildscript { buildscript {
ext.kotlin_version = '1.7.10' ext.kotlin_version = '1.2.71'
repositories { repositories {
google() google()
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.4.2' classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
@ -14,16 +14,18 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
mavenCentral() jcenter()
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
tasks.register("clean", Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

3
android/gradle.properties

@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

2
android/gradle/wrapper/gradle-wrapper.properties vendored

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

18
android/settings.gradle

@ -1,11 +1,15 @@
include ':app' include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def properties = new Properties()
assert localPropertiesFile.exists() def plugins = new Properties()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
def flutterSdkPath = properties.getProperty("flutter.sdk") plugins.each { name, path ->
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" include ":$name"
project(":$name").projectDir = pluginDirectory
}

1
assets/lines/atc.json

@ -0,0 +1 @@
{"short_name":"ATC","operator":"Astra Trans Carpatic","data_export":"20171212","valabil":{"de_la":"20171210","pana_la":"20181208"},"versiune":"1","trenuri":[{"rang":"IR","numar":"15510","numar_intern":15510},{"rang":"IR","numar":"15511","numar_intern":15511},{"rang":"IR","numar":"15512","numar_intern":15512},{"rang":"IR","numar":"15513*","numar_intern":15513},{"rang":"IR","numar":"15513","numar_intern":15513},{"rang":"IR","numar":"15514","numar_intern":15514},{"rang":"IR","numar":"15514","numar_intern":15514},{"rang":"IR","numar":"15516","numar_intern":15516},{"rang":"IR","numar":"15520","numar_intern":15520},{"rang":"IR","numar":"15521*","numar_intern":15521},{"rang":"IR","numar":"15521","numar_intern":15521},{"rang":"IR","numar":"15522","numar_intern":15522},{"rang":"IR","numar":"15522","numar_intern":15522},{"rang":"IR","numar":"15523","numar_intern":15523},{"rang":"IR","numar":"15523","numar_intern":15523},{"rang":"IR","numar":"15527","numar_intern":15527},{"rang":"IR","numar":"15528","numar_intern":15528},{"rang":"IR","numar":"15529","numar_intern":15529},{"rang":"IR","numar":"15531","numar_intern":15531},{"rang":"IR","numar":"15532","numar_intern":15532},{"rang":"IR","numar":"15533","numar_intern":15533},{"rang":"IR","numar":"15533e","numar_intern":15533},{"rang":"IR","numar":"15534","numar_intern":15534},{"rang":"IR","numar":"15535","numar_intern":15535},{"rang":"IR","numar":"15536","numar_intern":15536},{"rang":"IR","numar":"15537-2","numar_intern":15537},{"rang":"IR","numar":"15538","numar_intern":15538},{"rang":"IR","numar":"15540","numar_intern":15540},{"rang":"IR","numar":"15541","numar_intern":15541},{"rang":"IR","numar":"15541","numar_intern":15541},{"rang":"IR","numar":"15542","numar_intern":15542},{"rang":"IR","numar":"15542","numar_intern":15542},{"rang":"IR","numar":"15543","numar_intern":15543},{"rang":"IR","numar":"15544","numar_intern":15544},{"rang":"IR","numar":"15545","numar_intern":15545},{"rang":"IR","numar":"15546*","numar_intern":15546},{"rang":"IR","numar":"15546","numar_intern":15546},{"rang":"IR","numar":"15547","numar_intern":15547},{"rang":"IR","numar":"15548","numar_intern":15548},{"rang":"IR","numar":"15549*","numar_intern":15549},{"rang":"IR","numar":"15549b","numar_intern":15549},{"rang":"IR","numar":"15551","numar_intern":15551},{"rang":"IR","numar":"15552","numar_intern":15552},{"rang":"IR","numar":"15553","numar_intern":15553},{"rang":"IR","numar":"15581","numar_intern":15581},{"rang":"IR","numar":"15582","numar_intern":15582},{"rang":"IR","numar":"15582***","numar_intern":15582},{"rang":"IR","numar":"15583","numar_intern":15583},{"rang":"IR","numar":"15590","numar_intern":15590},{"rang":"IR","numar":"15591","numar_intern":15591},{"rang":"IR","numar":"15592","numar_intern":15592},{"rang":"IR","numar":"15593","numar_intern":15593},{"rang":"R","numar":"*P18801","numar_intern":null},{"rang":"IR","numar":"*15546","numar_intern":null},{"rang":"R","numar":"**P18801","numar_intern":null},{"rang":"IR","numar":"*15591","numar_intern":null},{"rang":"R","numar":"**P18800","numar_intern":null},{"rang":"IR","numar":"15593","numar_intern":15593},{"rang":"IR","numar":"15594","numar_intern":15594},{"rang":"IR","numar":"15595-2","numar_intern":15595},{"rang":"R","numar":"18800","numar_intern":18800},{"rang":"R","numar":"18801","numar_intern":18801},{"rang":"IR","numar":"18826","numar_intern":18826},{"rang":"IR","numar":"18851","numar_intern":18851},{"rang":"IR","numar":"18852","numar_intern":18852}]}

1
assets/lines/cfr.json

File diff suppressed because one or more lines are too long

6
assets/lines/files.txt

@ -0,0 +1,6 @@
atc.json
cfr.json
interregional.json
rc.json
st.json
tfc.json

1
assets/lines/interregional.json

File diff suppressed because one or more lines are too long

1
assets/lines/rc.json

File diff suppressed because one or more lines are too long

1
assets/lines/st.json

@ -0,0 +1 @@
{"short_name":"Softrans","operator":"Softrans S.R.L.","data_export":"20181212","valabil":{"de_la":"20181209","pana_la":"20191214"},"versiune":"1","trenuri":[{"rang":"IR","numar":"15931-2","numar_intern":15931},{"rang":"IR","numar":"15932","numar_intern":15932},{"rang":"IR","numar":"15933-2","numar_intern":15933},{"rang":"IR","numar":"15934","numar_intern":15934},{"rang":"IR","numar":"15935-2","numar_intern":15935},{"rang":"IR","numar":"15936","numar_intern":15936},{"rang":"IR","numar":"15982","numar_intern":15982},{"rang":"IR","numar":"15984","numar_intern":15984}]}

1
assets/lines/tfc.json

File diff suppressed because one or more lines are too long

216
codemagic.yaml

File diff suppressed because one or more lines are too long

BIN
fonts/ah/ah-Bold.ttf

Binary file not shown.

BIN
fonts/ah/ah-BoldItalic.ttf

Binary file not shown.

BIN
fonts/ah/ah-Italic.ttf

Binary file not shown.

BIN
fonts/ah/ah-Regular.ttf

Binary file not shown.

33
ios/.gitignore vendored

@ -1,33 +0,0 @@
*.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

4
ios/Flutter/AppFrameworkInfo.plist

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>App</string> <string>App</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>11.0</string> <string>8.0</string>
</dict> </dict>
</plist> </plist>

2
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" #include "Generated.xcconfig"

2
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" #include "Generated.xcconfig"

69
ios/Podfile

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '11.0' # platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -10,32 +10,65 @@ project 'Runner', {
'Release' => :release, 'Release' => :release,
} }
def flutter_root def parse_KV_file(file, separator='=')
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) file_abs_path = File.expand_path(file)
unless File.exist?(generated_xcode_build_settings_path) if !File.exists? file_abs_path
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" return [];
end end
pods_ary = []
File.foreach(generated_xcode_build_settings_path) do |line| skip_line_start_symbols = ["#", "/"]
matches = line.match(/FLUTTER_ROOT\=(.*)/) File.foreach(file_abs_path) { |line|
return matches[1].strip if matches next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
end plugin = line.split(pattern=separator)
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do target 'Runner' do
use_frameworks! use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end end
end end

32
ios/Podfile.lock

@ -1,34 +1,22 @@
PODS: PODS:
- Flutter (1.0.0) - Flutter (1.0.0)
- package_info_plus (0.4.5): - webview_flutter (0.0.1):
- Flutter
- shared_preferences_ios (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `.symlinks/flutter/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
EXTERNAL SOURCES: EXTERNAL SOURCES:
Flutter: Flutter:
:path: Flutter :path: ".symlinks/flutter/ios"
package_info_plus: webview_flutter:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/webview_flutter/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e webview_flutter: 1aa7604e6cdb451a9b7ed2c37d5454c0b440246b
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 PODFILE CHECKSUM: b6a0a141693093b304368d08511b46cf3d1d0ac5
COCOAPODS: 1.11.3 COCOAPODS: 1.6.1

180
ios/Runner.xcodeproj/project.pbxproj

@ -3,17 +3,22 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 50; objectVersion = 46;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
722F441253D3B79676E4DE80 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72320B12B1F4015789BBC8E /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
AF5528149967EA996B5AA109 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6EB5FA5AA2228D5622CD62 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
@ -23,6 +28,8 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -32,21 +39,23 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2088AE25E07C211FFB9CE536 /* 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 = "<group>"; }; 313F1E773DA06364A0C4F20A /* 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 = "<group>"; };
2F80AD107B0E1CC9E1C01A5A /* 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 = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
5DA42B3CD8940DB121C028E8 /* 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 = "<group>"; }; 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
6E6EB5FA5AA2228D5622CD62 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 636963D381657D3BAEDC0A47 /* 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 = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
74CD890ACD2E394E606FCBEB /* 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 = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F72320B12B1F4015789BBC8E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -54,17 +63,29 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
AF5528149967EA996B5AA109 /* Pods_Runner.framework in Frameworks */, 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
722F441253D3B79676E4DE80 /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
0B24EBF53F1DCC708FA961FD /* Frameworks */ = {
isa = PBXGroup;
children = (
F72320B12B1F4015789BBC8E /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = { 9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */, 9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */,
@ -78,8 +99,8 @@
9740EEB11CF90186004384FC /* Flutter */, 9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */, 97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */, 97C146EF1CF9000F007C117D /* Products */,
B55F9B76DFEAB456725329A0 /* Pods */, A2E7A2EB20EFBBAC4AB0299B /* Pods */,
E56598AA51C5533E6B51BD5A /* Frameworks */, 0B24EBF53F1DCC708FA961FD /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -98,6 +119,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */, 97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
@ -106,23 +128,21 @@
path = Runner; path = Runner;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
B55F9B76DFEAB456725329A0 /* Pods */ = { 97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2F80AD107B0E1CC9E1C01A5A /* Pods-Runner.debug.xcconfig */,
2088AE25E07C211FFB9CE536 /* Pods-Runner.release.xcconfig */,
5DA42B3CD8940DB121C028E8 /* Pods-Runner.profile.xcconfig */,
); );
name = Pods; name = "Supporting Files";
path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
E56598AA51C5533E6B51BD5A /* Frameworks */ = { A2E7A2EB20EFBBAC4AB0299B /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
6E6EB5FA5AA2228D5622CD62 /* Pods_Runner.framework */, 313F1E773DA06364A0C4F20A /* Pods-Runner.debug.xcconfig */,
74CD890ACD2E394E606FCBEB /* Pods-Runner.release.xcconfig */,
636963D381657D3BAEDC0A47 /* Pods-Runner.profile.xcconfig */,
); );
name = Frameworks; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXGroup section */ /* End PBXGroup section */
@ -132,14 +152,14 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
2B2F3198BD0D2214C77EC99E /* [CP] Check Pods Manifest.lock */, 0D525F98970BF5A8EFFD825C /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */, 9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */, 97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */, 97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
D71FC49A789443CEBF7C5C70 /* [CP] Embed Pods Frameworks */, 1B7EDCF8AB293318D8391906 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -156,17 +176,19 @@
97C146E61CF9000F007C117D /* Project object */ = { 97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastUpgradeCheck = 1300; LastUpgradeCheck = 1020;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1; CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100; DevelopmentTeam = NF9A3KMT8Q;
LastSwiftMigration = 0910;
ProvisioningStyle = Automatic;
}; };
}; };
}; };
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3"; compatibilityVersion = "Xcode 3.2";
developmentRegion = en; developmentRegion = en;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
knownRegions = ( knownRegions = (
@ -190,6 +212,7 @@
files = ( files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
); );
@ -198,7 +221,7 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
2B2F3198BD0D2214C77EC99E /* [CP] Check Pods Manifest.lock */ = { 0D525F98970BF5A8EFFD825C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -220,50 +243,52 @@
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 = "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; showEnvVarsInLog = 0;
}; };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 1B7EDCF8AB293318D8391906 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = (
);
inputPaths = ( inputPaths = (
); );
name = "Thin Binary"; name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Run Script"; name = "Thin Binary";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
}; };
D71FC49A789443CEBF7C5C70 /* [CP] Embed Pods Frameworks */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks"; name = "Run Script";
outputFileListPaths = ( outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -301,6 +326,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = { 249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -340,10 +366,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
@ -354,26 +379,34 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 2.0.7; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = NF9A3KMT8Q; DEVELOPMENT_TEAM = NF9A3KMT8Q;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 2.0.7; PRODUCT_BUNDLE_IDENTIFIER = ml.dandevelop.infoTren;
PRODUCT_BUNDLE_IDENTIFIER = ro.dcdev.infotren;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
}; };
name = Profile; name = Profile;
}; };
97C147031CF9000F007C117D /* Debug */ = { 97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -419,7 +452,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -429,6 +462,7 @@
}; };
97C147041CF9000F007C117D /* Release */ = { 97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -468,12 +502,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
@ -485,20 +517,29 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 2.0.7; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = NF9A3KMT8Q; DEVELOPMENT_TEAM = NF9A3KMT8Q;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 2.0.7; PRODUCT_BUNDLE_IDENTIFIER = ml.dandevelop.infoTren;
PRODUCT_BUNDLE_IDENTIFIER = ro.dcdev.infotren;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
}; };
name = Debug; name = Debug;
@ -509,19 +550,28 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 2.0.7; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = NF9A3KMT8Q; DEVELOPMENT_TEAM = NF9A3KMT8Q;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = ( IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 2.0.7; PRODUCT_BUNDLE_IDENTIFIER = ml.dandevelop.infoTren;
PRODUCT_BUNDLE_IDENTIFIER = ro.dcdev.infotren;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
}; };
name = Release; name = Release;

2
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata generated

@ -2,6 +2,6 @@
<Workspace <Workspace
version = "1.0"> version = "1.0">
<FileRef <FileRef
location = "self:"> location = "group:Runner.xcodeproj">
</FileRef> </FileRef>
</Workspace> </Workspace>

8
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

8
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

2
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1300" LastUpgradeVersion = "1020"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

8
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

2
ios/Runner/AppDelegate.swift

@ -5,7 +5,7 @@ import Flutter
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
override func application( override func application(
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

19
ios/Runner/Info.plist

@ -17,13 +17,24 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string> <string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>cfr-scrapper.herokuapp.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
@ -31,8 +42,6 @@
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
@ -43,7 +52,7 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>io.flutter.embedded_views_preview</key>
<true/> <true/>
</dict> </dict>
</plist> </plist>

2
ios/Runner/Runner-Bridging-Header.h

@ -1 +1 @@
#import "GeneratedPluginRegistrant.h" #import "GeneratedPluginRegistrant.h"

1
lib/api/common.dart

@ -1 +0,0 @@
const authority = 'scraper.infotren.dcdev.ro';

18
lib/api/releases.dart

@ -1,18 +0,0 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:info_tren/models.dart';
import 'package:info_tren/utils/iterable_extensions.dart';
Future<List<ChangelogEntry>> getRemoteReleases() async {
final Uri uri = Uri.parse('https://gitea.dcdev.ro/api/v1/repos/kbruen/info_tren/releases');
final response = await http.get(uri);
final json = jsonDecode(response.body) as List<dynamic>;
return json.map((e) => ChangelogEntry(
version: ChangelogVersion.parse(e['tag_name']),
description: e['body'],
apkLink: (e['assets'] as List<dynamic>).where((e) => (e['name'] as String).contains('.apk')).map((e) => Uri.parse(e['browser_download_url'] as String)).firstOrNull,
linuxLink: (e['assets'] as List<dynamic>).where((e) => (e['name'] as String).contains('infotren-linux')).map((e) => Uri.parse(e['browser_download_url'] as String)).firstOrNull,
windowsLink: (e['assets'] as List<dynamic>).where((e) => (e['name'] as String).contains('-win.zip')).map((e) => Uri.parse(e['browser_download_url'] as String)).firstOrNull,
)).toList();
}

14
lib/api/station_data.dart

@ -1,14 +0,0 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:info_tren/api/common.dart';
import 'package:info_tren/models.dart';
Future<StationData> getStationData(String stationName, [DateTime? date]) async {
final uri = Uri.https(authority, 'v3/stations/$stationName');
if (date != null) {
uri.queryParameters['date'] = date.toIso8601String();
}
final response = await http.get(uri);
return StationData.fromJson(jsonDecode(response.body));
}

11
lib/api/stations.dart

@ -1,11 +0,0 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:info_tren/api/common.dart';
import 'package:info_tren/models.dart';
Future<List<StationsResult>> get stations async {
final result = await http.get(Uri.https(authority, 'v2/stations'));
final data = jsonDecode(result.body) as List<dynamic>;
return data.map((e) => StationsResult.fromJson(e)).toList(growable: false,);
}

11
lib/api/train_data.dart

@ -1,11 +0,0 @@
import 'package:http/http.dart' as http;
import 'package:info_tren/api/common.dart';
import 'package:info_tren/models.dart';
Future<TrainData> getTrain(String trainNumber, {DateTime? date}) async {
date ??= DateTime.now();
final response = await http.get(Uri.https(authority, 'v3/trains/$trainNumber', {
'date': date.toUtc().toIso8601String(),
}),);
return trainDataFromJson(response.body);
}

11
lib/api/trains.dart

@ -1,11 +0,0 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:info_tren/api/common.dart';
import 'package:info_tren/models.dart';
Future<List<TrainsResult>> get trains async {
final result = await http.get(Uri.https(authority, 'v2/trains'));
final data = jsonDecode(result.body) as List<dynamic>;
return data.map((e) => TrainsResult.fromJson(e)).toList(growable: false,);
}

59
lib/components/badge/badge.dart

@ -1,59 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:info_tren/components/badge/badge_cupertino.dart';
import 'package:info_tren/components/badge/badge_fluent.dart';
import 'package:info_tren/components/badge/badge_material.dart';
import 'package:info_tren/models.dart';
import 'package:info_tren/providers.dart';
class Badge extends ConsumerWidget {
final String text;
final String caption;
final bool isNotScheduled;
final bool isOnTime;
final bool isDelayed;
const Badge({
super.key,
required this.text,
required this.caption,
this.isNotScheduled = false,
this.isOnTime = false,
this.isDelayed = false,
});
@override
Widget build(BuildContext context, WidgetRef ref) {
final uiDesign = ref.watch(uiDesignProvider);
switch (uiDesign) {
case UiDesign.MATERIAL:
return MaterialBadge(
text: text,
caption: caption,
isNotScheduled: isNotScheduled,
isOnTime: isOnTime,
isDelayed: isDelayed,
);
case UiDesign.CUPERTINO:
return CupertinoBadge(
text: text,
caption: caption,
isNotScheduled: isNotScheduled,
isOnTime: isOnTime,
isDelayed: isDelayed,
);
case UiDesign.FLUENT:
return FluentBadge(
text: text,
caption: caption,
isNotScheduled: isNotScheduled,
isOnTime: isOnTime,
isDelayed: isDelayed,
);
default:
throw UnmatchedUiDesignException(uiDesign);
}
}
}

80
lib/components/badge/badge_cupertino.dart

@ -1,80 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:info_tren/pages/train_info_page/train_info_constants.dart';
class CupertinoBadge extends StatelessWidget {
final String text;
final String caption;
final bool isNotScheduled;
final bool isOnTime;
final bool isDelayed;
const CupertinoBadge({
required this.text,
required this.caption,
this.isNotScheduled = false,
this.isOnTime = false,
this.isDelayed = false,
super.key,
});
@override
Widget build(BuildContext context) {
Color foregroundColor = foregroundWhite;
Color? backgroundColor;
if (isNotScheduled) {
foregroundColor = const Color.fromRGBO(225, 175, 30, 1);
backgroundColor = const Color.fromRGBO(80, 40, 10, 1);
}
else if (isOnTime) {
foregroundColor = const Color.fromRGBO(130, 175, 65, 1);
backgroundColor = const Color.fromRGBO(40, 80, 10, 1);
}
else if (isDelayed) {
foregroundColor = const Color.fromRGBO(225, 75, 30, 1);
backgroundColor = const Color.fromRGBO(80, 20, 10, 1);
}
return Padding(
padding: const EdgeInsets.all(8),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(
width: 2,
color: foregroundColor,
),
color: backgroundColor,
// color: CupertinoColors.activeOrange,
),
width: 48,
height: 48,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: Center(
child: Text(
text,
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 20,
fontWeight: MediaQuery.of(context).boldText ? FontWeight.w400 : FontWeight.w200,
color: MediaQuery.of(context).boldText ? foregroundWhite : foregroundColor,
),
textAlign: TextAlign.center,
),
),
),
Text(
caption,
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 12,
color: MediaQuery.of(context).boldText ? foregroundWhite : foregroundColor,
),
),
],
),
),
);
}
}

80
lib/components/badge/badge_fluent.dart

@ -1,80 +0,0 @@
import 'package:fluent_ui/fluent_ui.dart';
class FluentBadge extends StatelessWidget {
final String text;
final String caption;
final bool isNotScheduled;
final bool isOnTime;
final bool isDelayed;
const FluentBadge({
required this.text,
required this.caption,
this.isNotScheduled = false,
this.isOnTime = false,
this.isDelayed = false,
super.key,
});
@override
Widget build(BuildContext context) {
Color foregroundColor = FluentTheme.of(context).activeColor;
Color? backgroundColor;
if (isNotScheduled) {
foregroundColor = const Color.fromRGBO(225, 175, 30, 1);
backgroundColor = const Color.fromRGBO(80, 40, 10, 1);
}
else if (isOnTime) {
foregroundColor = const Color.fromRGBO(130, 175, 65, 1);
backgroundColor = const Color.fromRGBO(40, 80, 10, 1);
}
else if (isDelayed) {
foregroundColor = const Color.fromRGBO(225, 75, 30, 1);
backgroundColor = const Color.fromRGBO(80, 20, 10, 1);
}
return Padding(
padding: const EdgeInsets.all(8),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(
width: 2,
color: foregroundColor,
),
color: backgroundColor,
// color: CupertinoColors.activeOrange,
),
width: 48,
height: 48,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: Center(
child: Text(
text,
style: FluentTheme.of(context).typography.bodyLarge?.copyWith(
fontSize: 20,
fontWeight: MediaQuery.of(context).boldText ? FontWeight.w400 : FontWeight.w200,
color: MediaQuery.of(context).boldText ? Colors.white : foregroundColor,
),
textAlign: TextAlign.center,
),
),
),
Text(
caption,
style: FluentTheme.of(context).typography.body?.copyWith(
fontSize: 12,
color: MediaQuery.of(context).boldText ? Colors.white : foregroundColor,
),
),
],
),
),
);
}
}

79
lib/components/badge/badge_material.dart

@ -1,79 +0,0 @@
import 'package:flutter/material.dart';
import 'package:info_tren/pages/train_info_page/view_train/train_info_material.dart';
class MaterialBadge extends StatelessWidget {
final String text;
final String caption;
final bool isNotScheduled;
final bool isOnTime;
final bool isDelayed;
const MaterialBadge({
required this.text,
required this.caption,
this.isNotScheduled = false,
this.isOnTime = false,
this.isDelayed = false,
super.key,
});
@override
Widget build(BuildContext context) {
Color foregroundColor = Colors.white70;
Color? backgroundColor;
if (isNotScheduled) {
foregroundColor = Colors.orange.shade300;
backgroundColor = Colors.orange.shade900.withOpacity(0.3);
}
else if (isOnTime) {
foregroundColor = Colors.green.shade300;
backgroundColor = Colors.green.shade900.withOpacity(0.3);
}
else if (isDelayed) {
foregroundColor = Colors.red.shade300;
backgroundColor = Colors.red.shade900.withOpacity(0.3);
}
return Padding(
padding: const EdgeInsets.all(8),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(
width: 2,
color: foregroundColor,
),
color: backgroundColor,
),
width: isSmallScreen(context) ? 42 : 48,
height: isSmallScreen(context) ? 42 : 48,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: Center(
child: Text(
text,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontSize: isSmallScreen(context) ? 16 : 20,
fontWeight: MediaQuery.of(context).boldText ? FontWeight.w400 : FontWeight.w200,
color: MediaQuery.of(context).boldText ? Colors.white70 : foregroundColor,
),
textAlign: TextAlign.center,
),
),
),
Text(
caption,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontSize: 10,
color: MediaQuery.of(context).boldText ? Colors.white70 : foregroundColor,
),
),
],
),
),
);
}
}

60
lib/components/cupertino_divider.dart

@ -1,60 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:info_tren/pages/train_info_page/train_info_constants.dart';
class CupertinoDivider extends StatelessWidget {
final Color color;
const CupertinoDivider({Key? key, Color? color}):
color = color ?? foregroundDarkGrey,
super(key: key);
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
height: 1,
),
Container(
height: 1,
decoration: BoxDecoration(
color: color,
),
),
Container(
height: 1,
),
],
);
}
}
class CupertinoVerticalDivider extends StatelessWidget {
final Color color;
const CupertinoVerticalDivider({Key? key, Color? color}):
color = color ?? foregroundDarkGrey,
super(key: key);
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: 1,
),
Container(
width: 1,
decoration: BoxDecoration(
color: color,
),
),
Container(
width: 1,
),
],
);
}
}

58
lib/components/cupertino_listtile.dart

@ -1,58 +0,0 @@
import 'package:flutter/cupertino.dart';
class CupertinoListTile extends StatelessWidget {
final Widget? leading;
final Widget? title;
final Widget? subtitle;
final Widget? trailing;
final void Function()? onTap;
const CupertinoListTile({ super.key, this.leading, this.title, this.subtitle, this.trailing, this.onTap, });
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
behavior: HitTestBehavior.opaque,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
if (leading != null)
Padding(
padding: const EdgeInsets.all(8.0),
child: leading!,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (title != null)
title!,
if (subtitle != null)
CupertinoTheme(
data: CupertinoTheme.of(context).copyWith(
textTheme: CupertinoTextThemeData(
textStyle: TextStyle(
fontSize: CupertinoTheme.of(context).textTheme.textStyle.fontSize! - 2,
)
)
),
child: subtitle!,
),
],
),
),
),
if (trailing != null)
Padding(
padding: const EdgeInsets.all(8.0),
child: trailing!,
),
],
),
);
}
}

42
lib/components/future_display.dart

@ -1,42 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:info_tren/models.dart';
import 'package:info_tren/utils/default_ui_design.dart';
class FutureDisplay<T> extends StatelessWidget {
final UiDesign? uiDesign;
final Future<T> future;
final Widget Function<T>(BuildContext context, T data) builder;
final Widget Function(BuildContext context, Object error, StackTrace? st)? errorBuilder;
const FutureDisplay({Key? key, required this.future, required this.builder, this.errorBuilder, this.uiDesign}): super(key: key);
@override
Widget build(BuildContext context) {
final uiDesign = this.uiDesign ?? defaultUiDesign;
return FutureBuilder(
future: future,
builder: (context, snapshot) {
if (snapshot.hasData) return builder(context, snapshot.data);
if (snapshot.hasError) return (errorBuilder != null ? errorBuilder!(context, snapshot.error!, snapshot.stackTrace) : throw snapshot.error!);
if (snapshot.connectionState == ConnectionState.done) return Container();
Widget loadingWidget;
switch (uiDesign) {
case UiDesign.MATERIAL:
loadingWidget = const CircularProgressIndicator();
break;
case UiDesign.CUPERTINO:
loadingWidget = const CupertinoActivityIndicator();
break;
default:
throw UnmatchedUiDesignException(uiDesign);
}
return Center(
child: loadingWidget,
);
},
);
}
}

34
lib/components/loading/loading.dart

@ -1,34 +0,0 @@
import 'package:flutter/widgets.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:info_tren/components/loading/loading_cupertino.dart';
import 'package:info_tren/components/loading/loading_fluent.dart';
import 'package:info_tren/components/loading/loading_material.dart';
import 'package:info_tren/models.dart';
import 'package:info_tren/providers.dart';
class Loading extends ConsumerWidget {
static const defaultText = 'Loading...';
final String? text;
const Loading({ super.key, this.text, });
@override
Widget build(BuildContext context, WidgetRef ref) {
final uiDesign = ref.watch(uiDesignProvider);
switch (uiDesign) {
case UiDesign.MATERIAL:
return LoadingMaterial(text: text ?? defaultText,);
case UiDesign.CUPERTINO:
return LoadingCupertino(text: text ?? defaultText,);
case UiDesign.FLUENT:
return LoadingFluent(text: text ?? defaultText,);
default:
throw UnmatchedUiDesignException(uiDesign);
}
}
}
abstract class LoadingCommon extends StatelessWidget {
final String text;
const LoadingCommon({required this.text, super.key,});
}

27
lib/components/loading/loading_cupertino.dart

@ -1,27 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:info_tren/components/loading/loading.dart';
class LoadingCupertino extends LoadingCommon {
const LoadingCupertino({required super.text, super.key,});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
const Padding(
padding: EdgeInsets.all(8.0),
child: CupertinoActivityIndicator(),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(text),
),
],
),
);
}
}

26
lib/components/loading/loading_fluent.dart

@ -1,26 +0,0 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:info_tren/components/loading/loading.dart';
class LoadingFluent extends LoadingCommon {
const LoadingFluent({required super.text, super.key});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
const Padding(
padding: EdgeInsets.all(8.0),
child: ProgressRing(),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(text),
),
],
),
);
}
}

26
lib/components/loading/loading_material.dart

@ -1,26 +0,0 @@
import 'package:flutter/material.dart';
import 'package:info_tren/components/loading/loading.dart';
class LoadingMaterial extends LoadingCommon {
const LoadingMaterial({required super.text, super.key});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
const Padding(
padding: EdgeInsets.all(8.0),
child: CircularProgressIndicator(),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(text),
),
],
),
);
}
}

175
lib/components/refresh_future_builder.dart

@ -1,175 +0,0 @@
import 'package:flutter/widgets.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
class RefreshFutureBuilder<T> extends StatefulWidget {
final Future<T> Function()? futureCreator;
final T? initialData;
final Widget Function(BuildContext context, Future Function() refresh, Future Function(Future<T> Function()) replaceFuture, RefreshFutureBuilderSnapshot<T> snapshot) builder;
const RefreshFutureBuilder({ Key? key, this.futureCreator, this.initialData, required this.builder }) : super(key: key);
@override
_RefreshFutureBuilderState<T> createState() => _RefreshFutureBuilderState<T>();
}
class _RefreshFutureBuilderState<T> extends State<RefreshFutureBuilder<T>> {
late RefreshFutureBuilderSnapshot<T> snapshot;
Future<T> Function()? futureCreator;
bool _disposed = false;
@override
void initState() {
super.initState();
snapshot = widget.initialData != null ? RefreshFutureBuilderSnapshot.initial(widget.initialData as T) : const RefreshFutureBuilderSnapshot.nothing();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
if (futureCreator != widget.futureCreator) {
futureCreator = widget.futureCreator;
runFuture();
}
}
Future runFuture() async {
if (futureCreator == null) {
return;
}
// Set state to signify loading
setState(() {
switch (snapshot.state) {
case RefreshFutureBuilderState.none:
snapshot = const RefreshFutureBuilderSnapshot.waiting();
break;
case RefreshFutureBuilderState.initial:
snapshot = RefreshFutureBuilderSnapshot.refresh(snapshot.data);
break;
case RefreshFutureBuilderState.waiting:
return;
case RefreshFutureBuilderState.error:
snapshot = const RefreshFutureBuilderSnapshot.waiting();
break;
case RefreshFutureBuilderState.done:
snapshot = RefreshFutureBuilderSnapshot.refresh(snapshot.data);
break;
case RefreshFutureBuilderState.refreshing:
return;
case RefreshFutureBuilderState.refreshError:
snapshot = RefreshFutureBuilderSnapshot.refresh(null, snapshot.error, snapshot.stackTrace);
break;
default:
}
});
try {
final data = await futureCreator!();
if (_disposed) {
return;
}
setState(() {
snapshot = RefreshFutureBuilderSnapshot.withData(data);
});
}
catch (e, st) {
if (_disposed) {
return;
}
setState(() {
if (snapshot.state == RefreshFutureBuilderState.waiting) {
snapshot = RefreshFutureBuilderSnapshot.withError(e, st);
}
else {
snapshot = RefreshFutureBuilderSnapshot.refreshError(snapshot.data, e, st);
}
});
}
}
Future replaceFutureCreator(Future<T> Function() newFutureCreator) {
futureCreator = newFutureCreator;
return runFuture();
}
@override
void dispose() {
_disposed = true;
super.dispose();
}
@override
Widget build(BuildContext context) {
return widget.builder(
context,
runFuture,
replaceFutureCreator,
snapshot,
);
}
}
class RefreshFutureBuilderSnapshot<T> {
final RefreshFutureBuilderState state;
final T? data;
final Object? error;
final StackTrace? stackTrace;
bool get hasData => data != null;
bool get hasError => error != null;
const RefreshFutureBuilderSnapshot._(this.state, this.data, this.error, this.stackTrace);
const RefreshFutureBuilderSnapshot.nothing() : state = RefreshFutureBuilderState.none, data = null, error = null, stackTrace = null;
const RefreshFutureBuilderSnapshot.initial(this.data) : state = RefreshFutureBuilderState.initial, error = null, stackTrace = null;
const RefreshFutureBuilderSnapshot.waiting() : state = RefreshFutureBuilderState.waiting, data = null, error = null, stackTrace = null;
const RefreshFutureBuilderSnapshot.withError(this.error, [this.stackTrace]) : state = RefreshFutureBuilderState.error, data = null;
const RefreshFutureBuilderSnapshot.withData(this.data) : state = RefreshFutureBuilderState.done, error = null, stackTrace = null;
const RefreshFutureBuilderSnapshot.refresh(this.data, [this.error, this.stackTrace]) : state = RefreshFutureBuilderState.refreshing;
const RefreshFutureBuilderSnapshot.refreshError(this.data, this.error, this.stackTrace) : state = RefreshFutureBuilderState.refreshError;
}
enum RefreshFutureBuilderState {
none,
initial,
waiting,
error,
done,
refreshing,
refreshError,
}
class RefreshFutureBuilderProviderAdapter<T> extends ConsumerWidget {
final Provider<AsyncValue<T>> futureProvider;
final Future Function()? refresh;
final Widget Function(BuildContext context, Future Function() refresh, Future Function(Future<T> Function()) replaceFuture, RefreshFutureBuilderSnapshot<T> snapshot) builder;
const RefreshFutureBuilderProviderAdapter({required this.futureProvider, required this.builder, this.refresh, super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final value = ref.watch(futureProvider);
return builder(
context,
refresh ?? () async {
ref.invalidate(futureProvider);
},
(_) => throw UnimplementedError('Cannot replace the future when adapting a FutureProvider'),
value.when(
data: (data) => value.isLoading || value.isRefreshing
? RefreshFutureBuilderSnapshot.refresh(data)
: RefreshFutureBuilderSnapshot.withData(data),
error: (error, st) => value.isLoading || value.isRefreshing
? RefreshFutureBuilderSnapshot.refreshError(value.hasValue ? value.value : null, value.error, value.stackTrace)
: RefreshFutureBuilderSnapshot.withError(error, st),
loading: () {
if (value.hasValue) {
return RefreshFutureBuilderSnapshot.refresh(value.value, value.error, value.stackTrace);
}
else if (value.hasError) {
return RefreshFutureBuilderSnapshot.refreshError(value.value, value.error, value.stackTrace);
}
return const RefreshFutureBuilderSnapshot.waiting();
},
),
);
}
}

155
lib/components/select_train_suggestions/select_train_suggestions.dart

@ -1,155 +0,0 @@
import 'package:flutter/widgets.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions_cupertino.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions_fluent.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions_material.dart';
import 'package:info_tren/models.dart';
import 'package:info_tren/providers.dart';
class SelectTrainSuggestions extends ConsumerWidget {
final List<TrainsResult> choices;
final String? currentInput;
final void Function(String trainNumber) onTrainSelected;
const SelectTrainSuggestions({required this.choices, this.currentInput, required this.onTrainSelected, super.key, });
@override
Widget build(BuildContext context, WidgetRef ref) {
final uiDesign = ref.watch(uiDesignProvider);
switch(uiDesign) {
case UiDesign.MATERIAL:
return SelectTrainSuggestionsMaterial(
choices: choices,
onTrainSelected: onTrainSelected,
currentInput: currentInput,
);
case UiDesign.CUPERTINO:
return SelectTrainSuggestionsCupertino(
choices: choices,
onTrainSelected: onTrainSelected,
currentInput: currentInput,
);
case UiDesign.FLUENT:
return SelectTrainSuggestionsFluent(
choices: choices,
onTrainSelected: onTrainSelected,
currentInput: currentInput,
);
default:
throw UnmatchedUiDesignException(uiDesign);
}
}
}
abstract class SelectTrainSuggestionsShared extends StatelessWidget {
String getUseCurrentInputWidgetText(String currentInput) => 'Caută trenul cu numărul $currentInput';
Widget getUseCurrentInputWidget(String currentInput, void Function(String) onTrainSelected);
final List<TrainsResult> choices;
final String? currentInput;
final void Function(String trainNumber) onTrainSelected;
const SelectTrainSuggestionsShared({
required this.choices,
this.currentInput,
required this.onTrainSelected,
super.key,
});
@override
Widget build(BuildContext context) {
var slivers = choices.map((c) => c.company).toSet().map((operator) => OperatorAutocompleteSliver(
operatorName: operator,
trains: choices.where((c) => c.company == operator).toList(),
onTrainSelected: onTrainSelected,
)).toList();
return CustomScrollView(
slivers: <Widget>[
...slivers,
SliverToBoxAdapter(
child: currentInput != null && int.tryParse(currentInput!) != null ? getUseCurrentInputWidget(currentInput!, onTrainSelected) : Container(),
),
SliverToBoxAdapter(
child: Container(
height: MediaQuery.of(context).viewPadding.bottom,
),
),
],
);
}
}
class OperatorAutocompleteSliver extends ConsumerWidget {
final String operatorName;
final List<TrainsResult> trains;
final void Function(String) onTrainSelected;
const OperatorAutocompleteSliver({
super.key,
required this.operatorName,
required this.trains,
required this.onTrainSelected,
});
Widget mapTrainToItem(TrainsResult train, UiDesign uiDesign) {
switch (uiDesign) {
case UiDesign.MATERIAL:
return OperatorAutocompleteTileMaterial(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
);
case UiDesign.CUPERTINO:
return OperatorAutocompleteTileCupertino(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
);
case UiDesign.FLUENT:
return OperatorAutocompleteTileFluent(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
);
default:
throw UnmatchedUiDesignException(uiDesign);
}
}
@override
Widget build(BuildContext context, WidgetRef ref) {
final uiDesign = ref.watch(uiDesignProvider);
if (trains.isEmpty) {
return SliverToBoxAdapter(child: Container(),);
}
return SliverPrototypeExtentList(
prototypeItem: Column(
children: <Widget>[
mapTrainToItem(const TrainsResult(company: 'Company', number: '123', rank: 'R'), uiDesign),
],
),
delegate: SliverChildBuilderDelegate(
(context, index) {
return Column(
children: <Widget>[
mapTrainToItem(trains[index], uiDesign),
],
);
},
childCount: trains.length,
addSemanticIndexes: true,
),
);
}
}
abstract class OperatorAutocompleteTile extends StatelessWidget {
final String operatorName;
final TrainsResult train;
final void Function(String) onTrainSelected;
const OperatorAutocompleteTile({ Key? key, required this.onTrainSelected, required this.operatorName, required this.train }) : super(key: key);
}

86
lib/components/select_train_suggestions/select_train_suggestions_cupertino.dart

@ -1,86 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:info_tren/components/cupertino_divider.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions.dart';
import 'package:info_tren/components/train_id_text_span.dart';
import 'package:info_tren/models.dart';
class SelectTrainSuggestionsCupertino extends SelectTrainSuggestionsShared {
const SelectTrainSuggestionsCupertino({
super.key,
required super.choices,
required super.onTrainSelected,
super.currentInput,
});
@override
Widget getUseCurrentInputWidget(String currentInput, void Function(String) onTrainSelected) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
CupertinoButton(
child: Text(getUseCurrentInputWidgetText(currentInput)),
onPressed: () => onTrainSelected(currentInput),
),
],
)
),
const CupertinoDivider(),
],
);
}
}
class OperatorAutocompleteTileCupertino extends OperatorAutocompleteTile {
const OperatorAutocompleteTileCupertino({
Key? key,
required String operatorName,
required void Function(String) onTrainSelected,
required TrainsResult train
}): super(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
key: key,
);
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
onTap: () {
onTrainSelected(train.number);
},
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 4, 16, 4),
child: SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(
operatorName,
style: CupertinoTheme.of(context).textTheme.textStyle.copyWith(fontSize: 10, fontWeight: FontWeight.w200),
textAlign: TextAlign.left,
),
Text.rich(
trainIdSpan(rank: train.rank, number: train.number),
textAlign: TextAlign.left,
),
],
),
),
),
),
const CupertinoDivider(),
],
);
}
}

85
lib/components/select_train_suggestions/select_train_suggestions_fluent.dart

@ -1,85 +0,0 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions.dart';
import 'package:info_tren/components/train_id_text_span.dart';
import 'package:info_tren/models.dart';
class SelectTrainSuggestionsFluent extends SelectTrainSuggestionsShared {
const SelectTrainSuggestionsFluent({
super.key,
required super.choices,
required super.onTrainSelected,
super.currentInput,
});
@override
Widget getUseCurrentInputWidget(String currentInput, void Function(String) onTrainSelected) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Button(
child: Text(getUseCurrentInputWidgetText(currentInput)),
onPressed: () => onTrainSelected(currentInput),
),
],
)
),
const Divider(),
],
);
}
}
class OperatorAutocompleteTileFluent extends OperatorAutocompleteTile {
const OperatorAutocompleteTileFluent({
Key? key,
required String operatorName,
required void Function(String) onTrainSelected,
required TrainsResult train
}): super(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
key: key,
);
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
onTap: () {
onTrainSelected(train.number);
},
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 4, 16, 4),
child: SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(
operatorName,
style: FluentTheme.of(context).typography.body?.copyWith(fontSize: 10, fontWeight: FontWeight.w200),
textAlign: TextAlign.left,
),
Text.rich(
trainIdSpan(rank: train.rank, number: train.number),
textAlign: TextAlign.left,
),
],
),
),
),
),
const Divider(),
],
);
}
}

55
lib/components/select_train_suggestions/select_train_suggestions_material.dart

@ -1,55 +0,0 @@
import 'package:flutter/material.dart';
import 'package:info_tren/components/select_train_suggestions/select_train_suggestions.dart';
import 'package:info_tren/components/train_id_text_span.dart';
import 'package:info_tren/models.dart';
class SelectTrainSuggestionsMaterial extends SelectTrainSuggestionsShared {
const SelectTrainSuggestionsMaterial({
super.key,
required super.choices,
required super.onTrainSelected,
super.currentInput,
});
@override
Widget getUseCurrentInputWidget(String currentInput, void Function(String) onTrainSelected) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ListTile(
title: Text(getUseCurrentInputWidgetText(currentInput)),
onTap: () {
onTrainSelected(currentInput);
},
),
const Divider(),
],
);
}
}
class OperatorAutocompleteTileMaterial extends OperatorAutocompleteTile {
const OperatorAutocompleteTileMaterial({
Key? key,
required String operatorName,
required void Function(String) onTrainSelected,
required TrainsResult train
}): super(
onTrainSelected: onTrainSelected,
operatorName: operatorName,
train: train,
key: key,
);
@override
Widget build(BuildContext context) {
return ListTile(
dense: true,
title: Text.rich(trainIdSpan(rank: train.rank, number: train.number)),
subtitle: Text(operatorName),
onTap: () {
onTrainSelected(train.number);
},
);
}
}

63
lib/components/slim_app_bar.dart

@ -1,63 +0,0 @@
import 'package:flutter/material.dart';
class SlimAppBar extends StatelessWidget {
final String title;
final double size;
// final Function onBackTap;
const SlimAppBar({
required this.title,
this.size = 24,
// this.onBackTap,
super.key,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
height: size,
child: Container(
color:
Theme.of(context).appBarTheme.backgroundColor ??
Theme.of(context).primaryColor,
child: InkWell(
onTap: (ModalRoute.of(context)?.canPop ?? false)
? () => Navigator.of(context).pop()
: null,
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
SizedBox(
height: size,
width: size,
child: (ModalRoute.of(context)?.canPop ?? false)
? const BackButtonIcon()
: null,
),
Expanded(
child: Center(
child: Padding(
padding: const EdgeInsets.all(2),
child: Text(
title,
textAlign: TextAlign.center,
style:
Theme.of(context).textTheme.titleSmall?.copyWith(color: Theme.of(context).textTheme.titleLarge?.color) ??
Theme.of(context).textTheme.bodySmall?.copyWith(color: Theme.of(context).textTheme.bodyMedium?.color),
),
),
),
),
SizedBox(
height: size,
width: size,
),
],
),
),
),
);
}
}

38
lib/components/sliver_persistent_header_padding.dart

@ -1,38 +0,0 @@
import 'package:flutter/material.dart';
class SliverPersistentHeaderPadding extends StatelessWidget {
final double maxHeight;
const SliverPersistentHeaderPadding({required this.maxHeight, super.key,});
@override
Widget build(BuildContext context) {
return SliverPersistentHeader(
delegate: _SliverPersistentHeaderPaddingDelegate(maxHeight: maxHeight,),
floating: false,
pinned: false,
);
}
}
class _SliverPersistentHeaderPaddingDelegate extends SliverPersistentHeaderDelegate {
final double maxHeight;
const _SliverPersistentHeaderPaddingDelegate({required this.maxHeight});
@override
Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) {
return Container();
}
@override
double get maxExtent => maxHeight;
@override
double get minExtent => 0;
@override
bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) {
return oldDelegate.maxExtent != maxExtent;
}
}

39
lib/components/train_id_text_span.dart

@ -1,39 +0,0 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';
TextSpan trainIdSpan({
required String rank,
required String number,
Locale? locale,
MouseCursor? mouseCursor,
void Function(PointerEnterEvent)? onEnter,
void Function(PointerExitEvent)? onExit,
GestureRecognizer? recognizer,
String? semanticsLabel,
bool? spellOut,
TextStyle? style,
}) => TextSpan(
children: [
TextSpan(
text: rank,
style: TextStyle(
inherit: true,
color: rank.startsWith('IC')
? const Color.fromARGB(255, 0, 255, 0)
: rank.startsWith('IR')
? const Color.fromARGB(255, 255, 0, 0)
: null,
),
),
const TextSpan(text: ' '),
TextSpan(text: number),
],
locale: locale,
mouseCursor: mouseCursor,
onEnter: onEnter,
onExit: onExit,
recognizer: recognizer,
semanticsLabel: semanticsLabel,
spellOut: spellOut,
style: style,
);

23
lib/hidden_webview.dart

@ -0,0 +1,23 @@
import 'package:flutter/widgets.dart';
import 'package:webview_flutter/webview_flutter.dart';
class HiddenWebView extends StatelessWidget {
final WebView webView;
final Widget child;
HiddenWebView({@required this.child, this.webView});
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Offstage(
offstage: true,
child: webView,
),
Positioned.fill(child: child)
],
);
}
}

345
lib/main.dart

@ -1,191 +1,188 @@
import 'dart:io'; import 'dart:io' show Platform;
import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/cupertino.dart';
import 'package:fluent_ui/fluent_ui.dart' as f; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart' as c; import 'package:info_tren/models/train_data.dart';
import 'package:flutter/gestures.dart'; import 'package:info_tren/train_info_page/train_info.dart';
import 'package:flutter/material.dart' as m; import 'package:info_tren/train_info_page/train_info_cupertino.dart';
import 'package:flutter/services.dart'; import 'package:info_tren/train_info_page/train_info_material.dart';
import 'package:flutter/widgets.dart'; import 'package:info_tren/train_info_page/train_info_prompt.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:info_tren/models.dart';
import 'package:info_tren/pages/about/about_page.dart';
import 'package:info_tren/pages/main/main_page.dart';
import 'package:info_tren/pages/settings/setings_page.dart';
import 'package:info_tren/pages/station_arrdep_page/select_station/select_station.dart';
import 'package:info_tren/pages/station_arrdep_page/view_station/view_station.dart';
import 'package:info_tren/pages/train_info_page/view_train/train_info.dart';
import 'package:info_tren/pages/train_info_page/select_train/select_train.dart';
import 'package:info_tren/providers.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:timezone/data/latest.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
initializeTimeZones();
final sharedPreferences = await SharedPreferences.getInstance();
runApp(
ProviderScope(
overrides: [
sharedPreferencesProvider.overrideWithValue(sharedPreferences),
],
child: const StartPoint(),
),
);
}
Map<String, WidgetBuilder> get routes => {
Navigator.defaultRouteName: (context) {
return const MainPage();
},
AboutPage.routeName: (context) {
return const AboutPage();
},
SettingsPage.routeName: (context) {
return const SettingsPage();
},
SelectTrainPage.routeName: (context) {
return const SelectTrainPage();
},
TrainInfo.routeName: (context) {
final args = ModalRoute.of(context)!.settings.arguments as TrainInfoArguments;
return ProviderScope(
overrides: [
trainInfoArgumentsProvider.overrideWithValue(args),
],
child: const TrainInfo(),
);
},
SelectStationPage.routeName: (context) {
return const SelectStationPage();
},
ViewStationPage.routeName: (context) {
final args = ModalRoute.of(context)!.settings.arguments as ViewStationArguments;
return ProviderScope(
overrides: [
viewStationArgumentsProvider.overrideWithValue(args),
],
child: const ViewStationPage(),
);
},
};
class DragFluentScrollBevahior extends f.FluentScrollBehavior { void main() => runApp(StartPoint());
const DragFluentScrollBevahior();
class StartPoint extends StatelessWidget {
@override @override
Set<PointerDeviceKind> get dragDevices => { Widget build(BuildContext context) {
PointerDeviceKind.mouse, if (Platform.isAndroid) {
PointerDeviceKind.touch, return MaterialApp(
}; title: 'Info Tren',
theme: ThemeData(
primarySwatch: Colors.blue,
brightness: Brightness.dark,
primaryColor: Colors.blue.shade600,
accentColor: Colors.blue.shade700,
),
// home: MainPageMaterial(),
routes: {
Navigator.defaultRouteName: (context) {
return MainPageMaterial();
},
TrainInfoPromptCommon.routeName: (context) {
return TrainInfoPromptMaterial();
},
TrainInfo.routeName: (context) {
return TrainDataWebViewAdapter(
builder: (context) {
return TrainInfoMaterial(
trainNumber: ModalRoute.of(context).settings.arguments as int,
);
},
);
},
},
);
}
else if (Platform.isIOS) {
return CupertinoApp(
title: "Info Tren",
theme: CupertinoThemeData(
primaryColor: Colors.blue.shade600,
brightness: Brightness.dark,
),
// home: MainPageCupertino(),
routes: {
Navigator.defaultRouteName: (context) {
return MainPageCupertino();
},
TrainInfoPromptCommon.routeName: (context) {
return TrainInfoPromptCupertino();
},
TrainInfo.routeName: (context) {
return TrainDataWebViewAdapter(
builder: (context) {
return TrainInfoCupertino(
trainNumber: ModalRoute.of(context).settings.arguments as int,
);
},
);
},
}
);
}
return null;
}
} }
class DragCupertinoScrollBevahior extends c.CupertinoScrollBehavior { mixin MainPageAction {
const DragCupertinoScrollBevahior(); onTrainInfoPageInvoke(BuildContext context) {
Navigator.of(context).pushNamed(TrainInfoPromptCommon.routeName);
@override }
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
};
}
class DragMaterialScrollBevahior extends m.MaterialScrollBehavior { onStationBoardPageInvoke(BuildContext context) {
const DragMaterialScrollBevahior();
@override }
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.mouse,
PointerDeviceKind.touch,
};
}
class StartPoint extends ConsumerWidget { onRoutePlanPageInvoke(BuildContext context) {
final String appTitle = 'Info Tren';
const StartPoint({super.key}); }
}
class MainPageMaterial extends StatelessWidget with MainPageAction {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context) {
final uiDesign = ref.watch(uiDesignProvider); return Scaffold(
if (uiDesign == UiDesign.CUPERTINO) { appBar: AppBar(
return DynamicColorBuilder( title: Text("Info Tren"),
builder: (lightScheme, darkScheme) { centerTitle: true,
return AnnotatedRegion( ),
value: const SystemUiOverlayStyle( body: SafeArea(
statusBarBrightness: c.Brightness.dark, child: Center(
), child: Column(
child: c.CupertinoApp( mainAxisSize: MainAxisSize.min,
title: appTitle, children: <Widget>[
theme: c.CupertinoThemeData( RaisedButton(
primaryColor: darkScheme?.primary ?? m.Colors.blue.shade600, child: Text(
brightness: c.Brightness.dark, "Informații despre tren",
// textTheme: CupertinoTextThemeData( style: Theme.of(context).textTheme.button.copyWith(fontSize: 18),
// textStyle: TextStyle( ),
// fontFamily: 'Atkinson Hyperlegible', onPressed: () {
// ), onTrainInfoPageInvoke(context);
// ), },
), ),
scrollBehavior: Platform.isLinux ? const DragCupertinoScrollBevahior() : null, RaisedButton(
routes: routes, child: Text(
), "Tabelă plecari/sosiri",
); style: Theme.of(context).textTheme.button.copyWith(fontSize: 18),
} ),
); onPressed: () {
} onStationBoardPageInvoke(context);
else if (uiDesign == UiDesign.FLUENT) { },
return DynamicColorBuilder( ),
builder: (lightScheme, darkScheme) { RaisedButton(
return f.FluentApp( child: Text(
title: appTitle, "Planificare rută",
theme: f.FluentThemeData( style: Theme.of(context).textTheme.button.copyWith(fontSize: 18),
brightness: f.Brightness.light, ),
accentColor: lightScheme != null ? f.AccentColor.swatch({ onPressed: () {
'normal': lightScheme.primary, onRoutePlanPageInvoke(context);
}) : f.Colors.blue, },
), )
darkTheme: f.FluentThemeData( ].map((w) => Padding(
brightness: f.Brightness.dark, padding: const EdgeInsets.fromLTRB(4, 2, 4, 2),
accentColor: darkScheme != null ? f.AccentColor.swatch({ child: SizedBox(
'normal': darkScheme.primary, width: double.infinity,
}) : f.Colors.blue, child: w,
), ),
routes: routes, )).toList(),
scrollBehavior: Platform.isLinux ? const DragFluentScrollBevahior() : const f.FluentScrollBehavior(), ),
); ),
} ),
); );
}
else {
return DynamicColorBuilder(
builder: (lightScheme, darkScheme) {
lightScheme ??= m.ColorScheme.fromSwatch(
brightness: m.Brightness.light,
primarySwatch: m.Colors.blue,
);
darkScheme ??= m.ColorScheme.fromSwatch(
brightness: m.Brightness.dark,
primarySwatch: m.Colors.blue,
);
return m.MaterialApp(
title: appTitle,
theme: m.ThemeData(
colorScheme: lightScheme,
useMaterial3: true,
// fontFamily: 'Atkinson Hyperlegible',
),
darkTheme: m.ThemeData(
colorScheme: darkScheme,
useMaterial3: true,
// fontFamily: 'Atkinson Hyperlegible',
),
scrollBehavior: Platform.isLinux ? const DragMaterialScrollBevahior() : null,
routes: routes,
);
}
);
}
} }
} }
class MainPageCupertino extends StatelessWidget with MainPageAction {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text("Info Tren"),
),
child: SafeArea(
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
CupertinoButton.filled(
child: Text("Informații despre tren"),
onPressed: () {
onTrainInfoPageInvoke(context);
},
),
CupertinoButton.filled(
child: Text("Tabelă plecari/sosiri"),
onPressed: () {
onStationBoardPageInvoke(context);
},
),
CupertinoButton.filled(
child: Text("Planificare rută"),
onPressed: () {
onRoutePlanPageInvoke(context);
},
),
].map((w) => Padding(
padding: const EdgeInsets.fromLTRB(4, 2, 4, 2),
child: SizedBox(
width: double.infinity,
child: w,
),
)).toList(),
),
),
),
);
}
}

14
lib/models.dart

@ -1,14 +0,0 @@
export 'package:info_tren/models/changelog_entry.dart';
export 'package:info_tren/models/station_arrdep.dart';
export 'package:info_tren/models/station_data.dart';
export 'package:info_tren/models/station_status.dart';
export 'package:info_tren/models/station_train.dart';
export 'package:info_tren/models/stations_result.dart';
export 'package:info_tren/models/train_data.dart';
export 'package:info_tren/models/trains_result.dart';
export 'package:info_tren/models/ui_design.dart';
export 'package:info_tren/models/ui_timezone.dart';
import 'package:info_tren/models/train_data.dart' show TrainDataStatusState;
typedef TrainDataState = TrainDataStatusState;

83
lib/models/changelog_entry.dart

@ -1,83 +0,0 @@
import 'package:quiver/core.dart';
class ChangelogEntry {
final ChangelogVersion version;
final String description;
final Uri? apkLink;
final Uri? linuxLink;
final Uri? windowsLink;
ChangelogEntry({
required this.version,
required this.description,
this.apkLink,
this.linuxLink,
this.windowsLink,
});
factory ChangelogEntry.fromTextBlock(String text) {
final lines = text.split(RegExp(r'(\r?\n)+'));
return ChangelogEntry(
version: ChangelogVersion.parse(lines.first),
description: lines.skip(1).join('\n'),
);
}
static List<ChangelogEntry> fromTextFile(String text) {
final blocks = text.split(RegExp(r'(\r?\n){2}'));
return blocks.map(ChangelogEntry.fromTextBlock).toList();
}
}
class ChangelogVersion implements Comparable<ChangelogVersion> {
final int major;
final int minor;
final int patch;
final String? prerelease;
ChangelogVersion(this.major, this.minor, this.patch, [this.prerelease]);
factory ChangelogVersion.parse(String version) {
if (version.startsWith('v')) {
version = version.substring(1);
}
String? prerelease;
if (version.contains('-')) {
final index = version.indexOf('-');
prerelease = version.substring(index + 1);
version = version.substring(0, index);
}
final splitted = version.split('.').map(int.parse).toList();
return ChangelogVersion(splitted[0], splitted[1], splitted[2], prerelease);
}
@override
String toString() {
final vString = 'v$major.$minor.$patch';
return prerelease == null ? vString : '$vString-$prerelease';
}
@override
bool operator==(dynamic other) {
if (other is! ChangelogVersion) {
return false;
}
return major == other.major && minor == other.minor && patch == other.patch && prerelease == other.prerelease;
}
@override
int get hashCode {
return hash3(major.hashCode, minor.hashCode, patch.hashCode);
}
@override
int compareTo(ChangelogVersion other) {
if (major != other.major) {
return major.compareTo(other.major);
}
if (minor != other.minor) {
return minor.compareTo(other.minor);
}
return patch.compareTo(other.patch);
}
}

18
lib/models/station_arrdep.dart

@ -1,18 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:info_tren/models.dart';
part 'station_arrdep.g.dart';
part 'station_arrdep.freezed.dart';
@freezed
class StationArrDep with _$StationArrDep {
const factory StationArrDep({
required int? stoppingTime,
required DateTime time,
required StationTrain train,
required StationStatus status,
}) = _StationArrDep;
factory StationArrDep.fromJson(Map<String, dynamic> json) => _$StationArrDepFromJson(json);
}

241
lib/models/station_arrdep.freezed.dart

@ -1,241 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'station_arrdep.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
StationArrDep _$StationArrDepFromJson(Map<String, dynamic> json) {
return _StationArrDep.fromJson(json);
}
/// @nodoc
mixin _$StationArrDep {
int? get stoppingTime => throw _privateConstructorUsedError;
DateTime get time => throw _privateConstructorUsedError;
StationTrain get train => throw _privateConstructorUsedError;
StationStatus get status => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StationArrDepCopyWith<StationArrDep> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StationArrDepCopyWith<$Res> {
factory $StationArrDepCopyWith(
StationArrDep value, $Res Function(StationArrDep) then) =
_$StationArrDepCopyWithImpl<$Res, StationArrDep>;
@useResult
$Res call(
{int? stoppingTime,
DateTime time,
StationTrain train,
StationStatus status});
$StationTrainCopyWith<$Res> get train;
$StationStatusCopyWith<$Res> get status;
}
/// @nodoc
class _$StationArrDepCopyWithImpl<$Res, $Val extends StationArrDep>
implements $StationArrDepCopyWith<$Res> {
_$StationArrDepCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? stoppingTime = freezed,
Object? time = null,
Object? train = null,
Object? status = null,
}) {
return _then(_value.copyWith(
stoppingTime: freezed == stoppingTime
? _value.stoppingTime
: stoppingTime // ignore: cast_nullable_to_non_nullable
as int?,
time: null == time
? _value.time
: time // ignore: cast_nullable_to_non_nullable
as DateTime,
train: null == train
? _value.train
: train // ignore: cast_nullable_to_non_nullable
as StationTrain,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as StationStatus,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$StationTrainCopyWith<$Res> get train {
return $StationTrainCopyWith<$Res>(_value.train, (value) {
return _then(_value.copyWith(train: value) as $Val);
});
}
@override
@pragma('vm:prefer-inline')
$StationStatusCopyWith<$Res> get status {
return $StationStatusCopyWith<$Res>(_value.status, (value) {
return _then(_value.copyWith(status: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$_StationArrDepCopyWith<$Res>
implements $StationArrDepCopyWith<$Res> {
factory _$$_StationArrDepCopyWith(
_$_StationArrDep value, $Res Function(_$_StationArrDep) then) =
__$$_StationArrDepCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int? stoppingTime,
DateTime time,
StationTrain train,
StationStatus status});
@override
$StationTrainCopyWith<$Res> get train;
@override
$StationStatusCopyWith<$Res> get status;
}
/// @nodoc
class __$$_StationArrDepCopyWithImpl<$Res>
extends _$StationArrDepCopyWithImpl<$Res, _$_StationArrDep>
implements _$$_StationArrDepCopyWith<$Res> {
__$$_StationArrDepCopyWithImpl(
_$_StationArrDep _value, $Res Function(_$_StationArrDep) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? stoppingTime = freezed,
Object? time = null,
Object? train = null,
Object? status = null,
}) {
return _then(_$_StationArrDep(
stoppingTime: freezed == stoppingTime
? _value.stoppingTime
: stoppingTime // ignore: cast_nullable_to_non_nullable
as int?,
time: null == time
? _value.time
: time // ignore: cast_nullable_to_non_nullable
as DateTime,
train: null == train
? _value.train
: train // ignore: cast_nullable_to_non_nullable
as StationTrain,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as StationStatus,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_StationArrDep implements _StationArrDep {
const _$_StationArrDep(
{required this.stoppingTime,
required this.time,
required this.train,
required this.status});
factory _$_StationArrDep.fromJson(Map<String, dynamic> json) =>
_$$_StationArrDepFromJson(json);
@override
final int? stoppingTime;
@override
final DateTime time;
@override
final StationTrain train;
@override
final StationStatus status;
@override
String toString() {
return 'StationArrDep(stoppingTime: $stoppingTime, time: $time, train: $train, status: $status)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StationArrDep &&
(identical(other.stoppingTime, stoppingTime) ||
other.stoppingTime == stoppingTime) &&
(identical(other.time, time) || other.time == time) &&
(identical(other.train, train) || other.train == train) &&
(identical(other.status, status) || other.status == status));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, stoppingTime, time, train, status);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StationArrDepCopyWith<_$_StationArrDep> get copyWith =>
__$$_StationArrDepCopyWithImpl<_$_StationArrDep>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_StationArrDepToJson(
this,
);
}
}
abstract class _StationArrDep implements StationArrDep {
const factory _StationArrDep(
{required final int? stoppingTime,
required final DateTime time,
required final StationTrain train,
required final StationStatus status}) = _$_StationArrDep;
factory _StationArrDep.fromJson(Map<String, dynamic> json) =
_$_StationArrDep.fromJson;
@override
int? get stoppingTime;
@override
DateTime get time;
@override
StationTrain get train;
@override
StationStatus get status;
@override
@JsonKey(ignore: true)
_$$_StationArrDepCopyWith<_$_StationArrDep> get copyWith =>
throw _privateConstructorUsedError;
}

23
lib/models/station_arrdep.g.dart

@ -1,23 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'station_arrdep.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_StationArrDep _$$_StationArrDepFromJson(Map<String, dynamic> json) =>
_$_StationArrDep(
stoppingTime: json['stoppingTime'] as int?,
time: DateTime.parse(json['time'] as String),
train: StationTrain.fromJson(json['train'] as Map<String, dynamic>),
status: StationStatus.fromJson(json['status'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$_StationArrDepToJson(_$_StationArrDep instance) =>
<String, dynamic>{
'stoppingTime': instance.stoppingTime,
'time': instance.time.toIso8601String(),
'train': instance.train,
'status': instance.status,
};

17
lib/models/station_data.dart

@ -1,17 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:info_tren/models.dart';
part 'station_data.g.dart';
part 'station_data.freezed.dart';
@freezed
class StationData with _$StationData {
const factory StationData({
required String date,
required String stationName,
required List<StationArrDep>? arrivals,
required List<StationArrDep>? departures,
}) = _StationData;
factory StationData.fromJson(Map<String, dynamic> json) => _$StationDataFromJson(json);
}

239
lib/models/station_data.freezed.dart

@ -1,239 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'station_data.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
StationData _$StationDataFromJson(Map<String, dynamic> json) {
return _StationData.fromJson(json);
}
/// @nodoc
mixin _$StationData {
String get date => throw _privateConstructorUsedError;
String get stationName => throw _privateConstructorUsedError;
List<StationArrDep>? get arrivals => throw _privateConstructorUsedError;
List<StationArrDep>? get departures => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StationDataCopyWith<StationData> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StationDataCopyWith<$Res> {
factory $StationDataCopyWith(
StationData value, $Res Function(StationData) then) =
_$StationDataCopyWithImpl<$Res, StationData>;
@useResult
$Res call(
{String date,
String stationName,
List<StationArrDep>? arrivals,
List<StationArrDep>? departures});
}
/// @nodoc
class _$StationDataCopyWithImpl<$Res, $Val extends StationData>
implements $StationDataCopyWith<$Res> {
_$StationDataCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = null,
Object? stationName = null,
Object? arrivals = freezed,
Object? departures = freezed,
}) {
return _then(_value.copyWith(
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
stationName: null == stationName
? _value.stationName
: stationName // ignore: cast_nullable_to_non_nullable
as String,
arrivals: freezed == arrivals
? _value.arrivals
: arrivals // ignore: cast_nullable_to_non_nullable
as List<StationArrDep>?,
departures: freezed == departures
? _value.departures
: departures // ignore: cast_nullable_to_non_nullable
as List<StationArrDep>?,
) as $Val);
}
}
/// @nodoc
abstract class _$$_StationDataCopyWith<$Res>
implements $StationDataCopyWith<$Res> {
factory _$$_StationDataCopyWith(
_$_StationData value, $Res Function(_$_StationData) then) =
__$$_StationDataCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String date,
String stationName,
List<StationArrDep>? arrivals,
List<StationArrDep>? departures});
}
/// @nodoc
class __$$_StationDataCopyWithImpl<$Res>
extends _$StationDataCopyWithImpl<$Res, _$_StationData>
implements _$$_StationDataCopyWith<$Res> {
__$$_StationDataCopyWithImpl(
_$_StationData _value, $Res Function(_$_StationData) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? date = null,
Object? stationName = null,
Object? arrivals = freezed,
Object? departures = freezed,
}) {
return _then(_$_StationData(
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as String,
stationName: null == stationName
? _value.stationName
: stationName // ignore: cast_nullable_to_non_nullable
as String,
arrivals: freezed == arrivals
? _value._arrivals
: arrivals // ignore: cast_nullable_to_non_nullable
as List<StationArrDep>?,
departures: freezed == departures
? _value._departures
: departures // ignore: cast_nullable_to_non_nullable
as List<StationArrDep>?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_StationData implements _StationData {
const _$_StationData(
{required this.date,
required this.stationName,
required final List<StationArrDep>? arrivals,
required final List<StationArrDep>? departures})
: _arrivals = arrivals,
_departures = departures;
factory _$_StationData.fromJson(Map<String, dynamic> json) =>
_$$_StationDataFromJson(json);
@override
final String date;
@override
final String stationName;
final List<StationArrDep>? _arrivals;
@override
List<StationArrDep>? get arrivals {
final value = _arrivals;
if (value == null) return null;
if (_arrivals is EqualUnmodifiableListView) return _arrivals;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<StationArrDep>? _departures;
@override
List<StationArrDep>? get departures {
final value = _departures;
if (value == null) return null;
if (_departures is EqualUnmodifiableListView) return _departures;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'StationData(date: $date, stationName: $stationName, arrivals: $arrivals, departures: $departures)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StationData &&
(identical(other.date, date) || other.date == date) &&
(identical(other.stationName, stationName) ||
other.stationName == stationName) &&
const DeepCollectionEquality().equals(other._arrivals, _arrivals) &&
const DeepCollectionEquality()
.equals(other._departures, _departures));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
date,
stationName,
const DeepCollectionEquality().hash(_arrivals),
const DeepCollectionEquality().hash(_departures));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StationDataCopyWith<_$_StationData> get copyWith =>
__$$_StationDataCopyWithImpl<_$_StationData>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_StationDataToJson(
this,
);
}
}
abstract class _StationData implements StationData {
const factory _StationData(
{required final String date,
required final String stationName,
required final List<StationArrDep>? arrivals,
required final List<StationArrDep>? departures}) = _$_StationData;
factory _StationData.fromJson(Map<String, dynamic> json) =
_$_StationData.fromJson;
@override
String get date;
@override
String get stationName;
@override
List<StationArrDep>? get arrivals;
@override
List<StationArrDep>? get departures;
@override
@JsonKey(ignore: true)
_$$_StationDataCopyWith<_$_StationData> get copyWith =>
throw _privateConstructorUsedError;
}

27
lib/models/station_data.g.dart

@ -1,27 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'station_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_StationData _$$_StationDataFromJson(Map<String, dynamic> json) =>
_$_StationData(
date: json['date'] as String,
stationName: json['stationName'] as String,
arrivals: (json['arrivals'] as List<dynamic>?)
?.map((e) => StationArrDep.fromJson(e as Map<String, dynamic>))
.toList(),
departures: (json['departures'] as List<dynamic>?)
?.map((e) => StationArrDep.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$_StationDataToJson(_$_StationData instance) =>
<String, dynamic>{
'date': instance.date,
'stationName': instance.stationName,
'arrivals': instance.arrivals,
'departures': instance.departures,
};

17
lib/models/station_status.dart

@ -1,17 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'station_status.g.dart';
part 'station_status.freezed.dart';
@freezed
class StationStatus with _$StationStatus {
const factory StationStatus({
required int delay,
required bool real,
required bool cancelled,
required String? platform,
}) = _StationStatus;
factory StationStatus.fromJson(Map<String, dynamic> json) => _$StationStatusFromJson(json);
}

210
lib/models/station_status.freezed.dart

@ -1,210 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'station_status.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
StationStatus _$StationStatusFromJson(Map<String, dynamic> json) {
return _StationStatus.fromJson(json);
}
/// @nodoc
mixin _$StationStatus {
int get delay => throw _privateConstructorUsedError;
bool get real => throw _privateConstructorUsedError;
bool get cancelled => throw _privateConstructorUsedError;
String? get platform => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StationStatusCopyWith<StationStatus> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StationStatusCopyWith<$Res> {
factory $StationStatusCopyWith(
StationStatus value, $Res Function(StationStatus) then) =
_$StationStatusCopyWithImpl<$Res, StationStatus>;
@useResult
$Res call({int delay, bool real, bool cancelled, String? platform});
}
/// @nodoc
class _$StationStatusCopyWithImpl<$Res, $Val extends StationStatus>
implements $StationStatusCopyWith<$Res> {
_$StationStatusCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? delay = null,
Object? real = null,
Object? cancelled = null,
Object? platform = freezed,
}) {
return _then(_value.copyWith(
delay: null == delay
? _value.delay
: delay // ignore: cast_nullable_to_non_nullable
as int,
real: null == real
? _value.real
: real // ignore: cast_nullable_to_non_nullable
as bool,
cancelled: null == cancelled
? _value.cancelled
: cancelled // ignore: cast_nullable_to_non_nullable
as bool,
platform: freezed == platform
? _value.platform
: platform // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$_StationStatusCopyWith<$Res>
implements $StationStatusCopyWith<$Res> {
factory _$$_StationStatusCopyWith(
_$_StationStatus value, $Res Function(_$_StationStatus) then) =
__$$_StationStatusCopyWithImpl<$Res>;
@override
@useResult
$Res call({int delay, bool real, bool cancelled, String? platform});
}
/// @nodoc
class __$$_StationStatusCopyWithImpl<$Res>
extends _$StationStatusCopyWithImpl<$Res, _$_StationStatus>
implements _$$_StationStatusCopyWith<$Res> {
__$$_StationStatusCopyWithImpl(
_$_StationStatus _value, $Res Function(_$_StationStatus) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? delay = null,
Object? real = null,
Object? cancelled = null,
Object? platform = freezed,
}) {
return _then(_$_StationStatus(
delay: null == delay
? _value.delay
: delay // ignore: cast_nullable_to_non_nullable
as int,
real: null == real
? _value.real
: real // ignore: cast_nullable_to_non_nullable
as bool,
cancelled: null == cancelled
? _value.cancelled
: cancelled // ignore: cast_nullable_to_non_nullable
as bool,
platform: freezed == platform
? _value.platform
: platform // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_StationStatus implements _StationStatus {
const _$_StationStatus(
{required this.delay,
required this.real,
required this.cancelled,
required this.platform});
factory _$_StationStatus.fromJson(Map<String, dynamic> json) =>
_$$_StationStatusFromJson(json);
@override
final int delay;
@override
final bool real;
@override
final bool cancelled;
@override
final String? platform;
@override
String toString() {
return 'StationStatus(delay: $delay, real: $real, cancelled: $cancelled, platform: $platform)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StationStatus &&
(identical(other.delay, delay) || other.delay == delay) &&
(identical(other.real, real) || other.real == real) &&
(identical(other.cancelled, cancelled) ||
other.cancelled == cancelled) &&
(identical(other.platform, platform) ||
other.platform == platform));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, delay, real, cancelled, platform);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StationStatusCopyWith<_$_StationStatus> get copyWith =>
__$$_StationStatusCopyWithImpl<_$_StationStatus>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_StationStatusToJson(
this,
);
}
}
abstract class _StationStatus implements StationStatus {
const factory _StationStatus(
{required final int delay,
required final bool real,
required final bool cancelled,
required final String? platform}) = _$_StationStatus;
factory _StationStatus.fromJson(Map<String, dynamic> json) =
_$_StationStatus.fromJson;
@override
int get delay;
@override
bool get real;
@override
bool get cancelled;
@override
String? get platform;
@override
@JsonKey(ignore: true)
_$$_StationStatusCopyWith<_$_StationStatus> get copyWith =>
throw _privateConstructorUsedError;
}

23
lib/models/station_status.g.dart

@ -1,23 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'station_status.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_StationStatus _$$_StationStatusFromJson(Map<String, dynamic> json) =>
_$_StationStatus(
delay: json['delay'] as int,
real: json['real'] as bool,
cancelled: json['cancelled'] as bool,
platform: json['platform'] as String?,
);
Map<String, dynamic> _$$_StationStatusToJson(_$_StationStatus instance) =>
<String, dynamic>{
'delay': instance.delay,
'real': instance.real,
'cancelled': instance.cancelled,
'platform': instance.platform,
};

19
lib/models/station_train.dart

@ -1,19 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'station_train.g.dart';
part 'station_train.freezed.dart';
@freezed
class StationTrain with _$StationTrain {
const factory StationTrain({
required String rank,
required String number,
required String operator,
required String terminus,
List<String>? route,
required DateTime departureDate,
}) = _StationTrain;
factory StationTrain.fromJson(Map<String, dynamic> json) => _$StationTrainFromJson(json);
}

268
lib/models/station_train.freezed.dart

@ -1,268 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'station_train.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
StationTrain _$StationTrainFromJson(Map<String, dynamic> json) {
return _StationTrain.fromJson(json);
}
/// @nodoc
mixin _$StationTrain {
String get rank => throw _privateConstructorUsedError;
String get number => throw _privateConstructorUsedError;
String get operator => throw _privateConstructorUsedError;
String get terminus => throw _privateConstructorUsedError;
List<String>? get route => throw _privateConstructorUsedError;
DateTime get departureDate => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StationTrainCopyWith<StationTrain> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StationTrainCopyWith<$Res> {
factory $StationTrainCopyWith(
StationTrain value, $Res Function(StationTrain) then) =
_$StationTrainCopyWithImpl<$Res, StationTrain>;
@useResult
$Res call(
{String rank,
String number,
String operator,
String terminus,
List<String>? route,
DateTime departureDate});
}
/// @nodoc
class _$StationTrainCopyWithImpl<$Res, $Val extends StationTrain>
implements $StationTrainCopyWith<$Res> {
_$StationTrainCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rank = null,
Object? number = null,
Object? operator = null,
Object? terminus = null,
Object? route = freezed,
Object? departureDate = null,
}) {
return _then(_value.copyWith(
rank: null == rank
? _value.rank
: rank // ignore: cast_nullable_to_non_nullable
as String,
number: null == number
? _value.number
: number // ignore: cast_nullable_to_non_nullable
as String,
operator: null == operator
? _value.operator
: operator // ignore: cast_nullable_to_non_nullable
as String,
terminus: null == terminus
? _value.terminus
: terminus // ignore: cast_nullable_to_non_nullable
as String,
route: freezed == route
? _value.route
: route // ignore: cast_nullable_to_non_nullable
as List<String>?,
departureDate: null == departureDate
? _value.departureDate
: departureDate // ignore: cast_nullable_to_non_nullable
as DateTime,
) as $Val);
}
}
/// @nodoc
abstract class _$$_StationTrainCopyWith<$Res>
implements $StationTrainCopyWith<$Res> {
factory _$$_StationTrainCopyWith(
_$_StationTrain value, $Res Function(_$_StationTrain) then) =
__$$_StationTrainCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String rank,
String number,
String operator,
String terminus,
List<String>? route,
DateTime departureDate});
}
/// @nodoc
class __$$_StationTrainCopyWithImpl<$Res>
extends _$StationTrainCopyWithImpl<$Res, _$_StationTrain>
implements _$$_StationTrainCopyWith<$Res> {
__$$_StationTrainCopyWithImpl(
_$_StationTrain _value, $Res Function(_$_StationTrain) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rank = null,
Object? number = null,
Object? operator = null,
Object? terminus = null,
Object? route = freezed,
Object? departureDate = null,
}) {
return _then(_$_StationTrain(
rank: null == rank
? _value.rank
: rank // ignore: cast_nullable_to_non_nullable
as String,
number: null == number
? _value.number
: number // ignore: cast_nullable_to_non_nullable
as String,
operator: null == operator
? _value.operator
: operator // ignore: cast_nullable_to_non_nullable
as String,
terminus: null == terminus
? _value.terminus
: terminus // ignore: cast_nullable_to_non_nullable
as String,
route: freezed == route
? _value._route
: route // ignore: cast_nullable_to_non_nullable
as List<String>?,
departureDate: null == departureDate
? _value.departureDate
: departureDate // ignore: cast_nullable_to_non_nullable
as DateTime,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_StationTrain implements _StationTrain {
const _$_StationTrain(
{required this.rank,
required this.number,
required this.operator,
required this.terminus,
final List<String>? route,
required this.departureDate})
: _route = route;
factory _$_StationTrain.fromJson(Map<String, dynamic> json) =>
_$$_StationTrainFromJson(json);
@override
final String rank;
@override
final String number;
@override
final String operator;
@override
final String terminus;
final List<String>? _route;
@override
List<String>? get route {
final value = _route;
if (value == null) return null;
if (_route is EqualUnmodifiableListView) return _route;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
final DateTime departureDate;
@override
String toString() {
return 'StationTrain(rank: $rank, number: $number, operator: $operator, terminus: $terminus, route: $route, departureDate: $departureDate)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StationTrain &&
(identical(other.rank, rank) || other.rank == rank) &&
(identical(other.number, number) || other.number == number) &&
(identical(other.operator, operator) ||
other.operator == operator) &&
(identical(other.terminus, terminus) ||
other.terminus == terminus) &&
const DeepCollectionEquality().equals(other._route, _route) &&
(identical(other.departureDate, departureDate) ||
other.departureDate == departureDate));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, rank, number, operator, terminus,
const DeepCollectionEquality().hash(_route), departureDate);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StationTrainCopyWith<_$_StationTrain> get copyWith =>
__$$_StationTrainCopyWithImpl<_$_StationTrain>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_StationTrainToJson(
this,
);
}
}
abstract class _StationTrain implements StationTrain {
const factory _StationTrain(
{required final String rank,
required final String number,
required final String operator,
required final String terminus,
final List<String>? route,
required final DateTime departureDate}) = _$_StationTrain;
factory _StationTrain.fromJson(Map<String, dynamic> json) =
_$_StationTrain.fromJson;
@override
String get rank;
@override
String get number;
@override
String get operator;
@override
String get terminus;
@override
List<String>? get route;
@override
DateTime get departureDate;
@override
@JsonKey(ignore: true)
_$$_StationTrainCopyWith<_$_StationTrain> get copyWith =>
throw _privateConstructorUsedError;
}

28
lib/models/station_train.g.dart

@ -1,28 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'station_train.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_StationTrain _$$_StationTrainFromJson(Map<String, dynamic> json) =>
_$_StationTrain(
rank: json['rank'] as String,
number: json['number'] as String,
operator: json['operator'] as String,
terminus: json['terminus'] as String,
route:
(json['route'] as List<dynamic>?)?.map((e) => e as String).toList(),
departureDate: DateTime.parse(json['departureDate'] as String),
);
Map<String, dynamic> _$$_StationTrainToJson(_$_StationTrain instance) =>
<String, dynamic>{
'rank': instance.rank,
'number': instance.number,
'operator': instance.operator,
'terminus': instance.terminus,
'route': instance.route,
'departureDate': instance.departureDate.toIso8601String(),
};

14
lib/models/stations_result.dart

@ -1,14 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'stations_result.g.dart';
part 'stations_result.freezed.dart';
@freezed
class StationsResult with _$StationsResult {
const factory StationsResult({
required String name,
List<String>? stoppedAtBy,
}) = _StationsResult;
factory StationsResult.fromJson(Map<String, dynamic> json) => _$StationsResultFromJson(json);
}

179
lib/models/stations_result.freezed.dart

@ -1,179 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'stations_result.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
StationsResult _$StationsResultFromJson(Map<String, dynamic> json) {
return _StationsResult.fromJson(json);
}
/// @nodoc
mixin _$StationsResult {
String get name => throw _privateConstructorUsedError;
List<String>? get stoppedAtBy => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$StationsResultCopyWith<StationsResult> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StationsResultCopyWith<$Res> {
factory $StationsResultCopyWith(
StationsResult value, $Res Function(StationsResult) then) =
_$StationsResultCopyWithImpl<$Res, StationsResult>;
@useResult
$Res call({String name, List<String>? stoppedAtBy});
}
/// @nodoc
class _$StationsResultCopyWithImpl<$Res, $Val extends StationsResult>
implements $StationsResultCopyWith<$Res> {
_$StationsResultCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? name = null,
Object? stoppedAtBy = freezed,
}) {
return _then(_value.copyWith(
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
stoppedAtBy: freezed == stoppedAtBy
? _value.stoppedAtBy
: stoppedAtBy // ignore: cast_nullable_to_non_nullable
as List<String>?,
) as $Val);
}
}
/// @nodoc
abstract class _$$_StationsResultCopyWith<$Res>
implements $StationsResultCopyWith<$Res> {
factory _$$_StationsResultCopyWith(
_$_StationsResult value, $Res Function(_$_StationsResult) then) =
__$$_StationsResultCopyWithImpl<$Res>;
@override
@useResult
$Res call({String name, List<String>? stoppedAtBy});
}
/// @nodoc
class __$$_StationsResultCopyWithImpl<$Res>
extends _$StationsResultCopyWithImpl<$Res, _$_StationsResult>
implements _$$_StationsResultCopyWith<$Res> {
__$$_StationsResultCopyWithImpl(
_$_StationsResult _value, $Res Function(_$_StationsResult) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? name = null,
Object? stoppedAtBy = freezed,
}) {
return _then(_$_StationsResult(
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
stoppedAtBy: freezed == stoppedAtBy
? _value._stoppedAtBy
: stoppedAtBy // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_StationsResult implements _StationsResult {
const _$_StationsResult({required this.name, final List<String>? stoppedAtBy})
: _stoppedAtBy = stoppedAtBy;
factory _$_StationsResult.fromJson(Map<String, dynamic> json) =>
_$$_StationsResultFromJson(json);
@override
final String name;
final List<String>? _stoppedAtBy;
@override
List<String>? get stoppedAtBy {
final value = _stoppedAtBy;
if (value == null) return null;
if (_stoppedAtBy is EqualUnmodifiableListView) return _stoppedAtBy;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
String toString() {
return 'StationsResult(name: $name, stoppedAtBy: $stoppedAtBy)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_StationsResult &&
(identical(other.name, name) || other.name == name) &&
const DeepCollectionEquality()
.equals(other._stoppedAtBy, _stoppedAtBy));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, name, const DeepCollectionEquality().hash(_stoppedAtBy));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_StationsResultCopyWith<_$_StationsResult> get copyWith =>
__$$_StationsResultCopyWithImpl<_$_StationsResult>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_StationsResultToJson(
this,
);
}
}
abstract class _StationsResult implements StationsResult {
const factory _StationsResult(
{required final String name,
final List<String>? stoppedAtBy}) = _$_StationsResult;
factory _StationsResult.fromJson(Map<String, dynamic> json) =
_$_StationsResult.fromJson;
@override
String get name;
@override
List<String>? get stoppedAtBy;
@override
@JsonKey(ignore: true)
_$$_StationsResultCopyWith<_$_StationsResult> get copyWith =>
throw _privateConstructorUsedError;
}

21
lib/models/stations_result.g.dart

@ -1,21 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'stations_result.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_StationsResult _$$_StationsResultFromJson(Map<String, dynamic> json) =>
_$_StationsResult(
name: json['name'] as String,
stoppedAtBy: (json['stoppedAtBy'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
);
Map<String, dynamic> _$$_StationsResultToJson(_$_StationsResult instance) =>
<String, dynamic>{
'name': instance.name,
'stoppedAtBy': instance.stoppedAtBy,
};

1226
lib/models/train_data.dart

File diff suppressed because it is too large Load Diff

2365
lib/models/train_data.freezed.dart

File diff suppressed because it is too large Load Diff

271
lib/models/train_data.g.dart

@ -6,212 +6,93 @@ part of 'train_data.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$_TrainData _$$_TrainDataFromJson(Map<String, dynamic> json) => _$_TrainData( TrainData _$TrainDataFromJson(Map<String, dynamic> json) {
rank: json['rank'] as String, return TrainData(
number: json['number'] as String, rang: json['rang'] as String,
date: json['date'] as String, trainNumber: json['tren'] as String,
operator: json['operator'] as String, operator: json['operator'] as String,
groups: (json['groups'] as List<dynamic>) lastInfo: json['ultima_informatie'] == null
.map((e) => TrainDataGroup.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$_TrainDataToJson(_$_TrainData instance) =>
<String, dynamic>{
'rank': instance.rank,
'number': instance.number,
'date': instance.date,
'operator': instance.operator,
'groups': instance.groups,
};
_$_TrainDataGroup _$$_TrainDataGroupFromJson(Map<String, dynamic> json) =>
_$_TrainDataGroup(
route: TrainDataRoute.fromJson(json['route'] as Map<String, dynamic>),
stations: (json['stations'] as List<dynamic>)
.map((e) => TrainDataStation.fromJson(e as Map<String, dynamic>))
.toList(),
status: json['status'] == null
? null
: TrainDataStatus.fromJson(json['status'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$_TrainDataGroupToJson(_$_TrainDataGroup instance) =>
<String, dynamic>{
'route': instance.route,
'stations': instance.stations,
'status': instance.status,
};
_$_TrainDataRoute _$$_TrainDataRouteFromJson(Map<String, dynamic> json) =>
_$_TrainDataRoute(
from: json['from'] as String,
to: json['to'] as String,
);
Map<String, dynamic> _$$_TrainDataRouteToJson(_$_TrainDataRoute instance) =>
<String, dynamic>{
'from': instance.from,
'to': instance.to,
};
_$_TrainDataStation _$$_TrainDataStationFromJson(Map<String, dynamic> json) =>
_$_TrainDataStation(
name: json['name'] as String,
linkName: json['linkName'] as String,
km: json['km'] as int,
stoppingTime: json['stoppingTime'] as int?,
platform: json['platform'] as String?,
arrival: json['arrival'] == null
? null ? null
: StationArrDepTime.fromJson(json['arrival'] as Map<String, dynamic>), : LastInfo.fromJson(
departure: json['departure'] == null json['ultima_informatie'] as Map<String, dynamic>),
state: json['stare'] as String,
route: json['relatia'] as String,
tripLength: json['durata_calatoriei'] as String,
stations: (json['stations'] as List)
?.map((e) => e == null
? null
: StationEntry.fromJson(e as Map<String, dynamic>))
?.toList(),
nextStop: json['urmatoarea_oprire'] == null
? null ? null
: StationArrDepTime.fromJson( : StopInfo.fromJson(
json['departure'] as Map<String, dynamic>), json['urmatoarea_oprire'] as Map<String, dynamic>),
notes: (json['notes'] as List<dynamic>) distance: json['distanta'] as String,
.map((e) => const TrainDataNoteConverter() destination: json['destinatie'] == null
.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$$_TrainDataStationToJson(_$_TrainDataStation instance) =>
<String, dynamic>{
'name': instance.name,
'linkName': instance.linkName,
'km': instance.km,
'stoppingTime': instance.stoppingTime,
'platform': instance.platform,
'arrival': instance.arrival,
'departure': instance.departure,
'notes':
instance.notes.map(const TrainDataNoteConverter().toJson).toList(),
};
_$_StationArrDepTime _$$_StationArrDepTimeFromJson(Map<String, dynamic> json) =>
_$_StationArrDepTime(
scheduleTime: DateTime.parse(json['scheduleTime'] as String),
status: json['status'] == null
? null ? null
: StationArrDepTimeStatus.fromJson( : StopInfo.fromJson(json['destinatie'] as Map<String, dynamic>));
json['status'] as Map<String, dynamic>), }
);
Map<String, dynamic> _$$_StationArrDepTimeToJson(
_$_StationArrDepTime instance) =>
<String, dynamic>{
'scheduleTime': instance.scheduleTime.toIso8601String(),
'status': instance.status,
};
_$_StationArrDepTimeStatus _$$_StationArrDepTimeStatusFromJson( Map<String, dynamic> _$TrainDataToJson(TrainData instance) => <String, dynamic>{
Map<String, dynamic> json) => 'rang': instance.rang,
_$_StationArrDepTimeStatus( 'tren': instance.trainNumber,
delay: json['delay'] as int, 'operator': instance.operator,
real: json['real'] as bool, 'relatia': instance.route,
cancelled: json['cancelled'] as bool, 'stare': instance.state,
); 'ultima_informatie': instance.lastInfo,
'destinatie': instance.destination,
Map<String, dynamic> _$$_StationArrDepTimeStatusToJson( 'urmatoarea_oprire': instance.nextStop,
_$_StationArrDepTimeStatus instance) => 'durata_calatoriei': instance.tripLength,
<String, dynamic>{ 'distanta': instance.distance,
'delay': instance.delay, 'stations': instance.stations
'real': instance.real,
'cancelled': instance.cancelled,
};
_$_TrainDataStatus _$$_TrainDataStatusFromJson(Map<String, dynamic> json) =>
_$_TrainDataStatus(
delay: json['delay'] as int,
station: json['station'] as String,
state: $enumDecode(_$TrainDataStatusStateEnumMap, json['state']),
);
Map<String, dynamic> _$$_TrainDataStatusToJson(_$_TrainDataStatus instance) =>
<String, dynamic>{
'delay': instance.delay,
'station': instance.station,
'state': _$TrainDataStatusStateEnumMap[instance.state]!,
};
const _$TrainDataStatusStateEnumMap = {
TrainDataStatusState.passing: 'passing',
TrainDataStatusState.arrival: 'arrival',
TrainDataStatusState.departure: 'departure',
};
_$_TrainDataNoteTrainNumberChange _$$_TrainDataNoteTrainNumberChangeFromJson(
Map<String, dynamic> json) =>
_$_TrainDataNoteTrainNumberChange(
kind: json['kind'] as String? ?? "trainNumberChange",
rank: json['rank'] as String,
number: json['number'] as String,
);
Map<String, dynamic> _$$_TrainDataNoteTrainNumberChangeToJson(
_$_TrainDataNoteTrainNumberChange instance) =>
<String, dynamic>{
'kind': instance.kind,
'rank': instance.rank,
'number': instance.number,
};
_$_TrainDataNoteDepartsAs _$$_TrainDataNoteDepartsAsFromJson(
Map<String, dynamic> json) =>
_$_TrainDataNoteDepartsAs(
kind: json['kind'] as String? ?? "departsAs",
rank: json['rank'] as String,
number: json['number'] as String,
departureDate: DateTime.parse(json['departureDate'] as String),
);
Map<String, dynamic> _$$_TrainDataNoteDepartsAsToJson(
_$_TrainDataNoteDepartsAs instance) =>
<String, dynamic>{
'kind': instance.kind,
'rank': instance.rank,
'number': instance.number,
'departureDate': instance.departureDate.toIso8601String(),
}; };
_$_TrainDataNoteDetachingWagons _$$_TrainDataNoteDetachingWagonsFromJson( LastInfo _$LastInfoFromJson(Map<String, dynamic> json) {
Map<String, dynamic> json) => return LastInfo(
_$_TrainDataNoteDetachingWagons( dateAndTime: json['data_si_ora'] as String,
kind: json['kind'] as String? ?? "detachingWagons", delay: json['intarziere'] as int,
station: json['station'] as String, event: json['eveniment'] as String,
); station: json['statia'] as String);
}
Map<String, dynamic> _$$_TrainDataNoteDetachingWagonsToJson(
_$_TrainDataNoteDetachingWagons instance) => Map<String, dynamic> _$LastInfoToJson(LastInfo instance) => <String, dynamic>{
<String, dynamic>{ 'statia': instance.station,
'kind': instance.kind, 'eveniment': instance.event,
'station': instance.station, 'data_si_ora': instance.dateAndTime,
'intarziere': instance.delay
}; };
_$_TrainDataNoteReceivingWagons _$$_TrainDataNoteReceivingWagonsFromJson( StopInfo _$StopInfoFromJson(Map<String, dynamic> json) {
Map<String, dynamic> json) => return StopInfo(
_$_TrainDataNoteReceivingWagons( station: json['statia'] as String,
kind: json['kind'] as String? ?? "receivingWagons", dateAndTime: json['data_si_ora'] as String);
station: json['station'] as String, }
);
Map<String, dynamic> _$$_TrainDataNoteReceivingWagonsToJson( Map<String, dynamic> _$StopInfoToJson(StopInfo instance) => <String, dynamic>{
_$_TrainDataNoteReceivingWagons instance) => 'statia': instance.station,
<String, dynamic>{ 'data_si_ora': instance.dateAndTime
'kind': instance.kind,
'station': instance.station,
}; };
_$_TrainDataNoteUnknown _$$_TrainDataNoteUnknownFromJson( StationEntry _$StationEntryFromJson(Map<String, dynamic> json) {
Map<String, dynamic> json) => return StationEntry(
_$_TrainDataNoteUnknown( name: json['statia'] as String,
kind: json['kind'] as String, delay: json['intarziere'] as int,
extra: json['extra'] as Map<String, dynamic>, realOrEstimate: json['real/estimat'] as String,
); arrivalTime: json['sosire'] as String,
departureTime: json['plecare'] as String,
Map<String, dynamic> _$$_TrainDataNoteUnknownToJson( km: json['km'] as String,
_$_TrainDataNoteUnknown instance) => observations: json['observatii'] as String,
waitTime: json['stationeaza_pentru'] as String);
}
Map<String, dynamic> _$StationEntryToJson(StationEntry instance) =>
<String, dynamic>{ <String, dynamic>{
'kind': instance.kind, 'km': instance.km,
'extra': instance.extra, 'statia': instance.name,
'sosire': instance.arrivalTime,
'stationeaza_pentru': instance.waitTime,
'plecare': instance.departureTime,
'real/estimat': instance.realOrEstimate,
'intarziere': instance.delay,
'observatii': instance.observations
}; };

15
lib/models/trains_result.dart

@ -1,15 +0,0 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'trains_result.g.dart';
part 'trains_result.freezed.dart';
@freezed
class TrainsResult with _$TrainsResult {
const factory TrainsResult({
required String rank,
required String number,
required String company,
}) = _TrainsResult;
factory TrainsResult.fromJson(Map<String, dynamic> json) => _$TrainsResultFromJson(json);
}

187
lib/models/trains_result.freezed.dart

@ -1,187 +0,0 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'trains_result.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
TrainsResult _$TrainsResultFromJson(Map<String, dynamic> json) {
return _TrainsResult.fromJson(json);
}
/// @nodoc
mixin _$TrainsResult {
String get rank => throw _privateConstructorUsedError;
String get number => throw _privateConstructorUsedError;
String get company => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$TrainsResultCopyWith<TrainsResult> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrainsResultCopyWith<$Res> {
factory $TrainsResultCopyWith(
TrainsResult value, $Res Function(TrainsResult) then) =
_$TrainsResultCopyWithImpl<$Res, TrainsResult>;
@useResult
$Res call({String rank, String number, String company});
}
/// @nodoc
class _$TrainsResultCopyWithImpl<$Res, $Val extends TrainsResult>
implements $TrainsResultCopyWith<$Res> {
_$TrainsResultCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rank = null,
Object? number = null,
Object? company = null,
}) {
return _then(_value.copyWith(
rank: null == rank
? _value.rank
: rank // ignore: cast_nullable_to_non_nullable
as String,
number: null == number
? _value.number
: number // ignore: cast_nullable_to_non_nullable
as String,
company: null == company
? _value.company
: company // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$_TrainsResultCopyWith<$Res>
implements $TrainsResultCopyWith<$Res> {
factory _$$_TrainsResultCopyWith(
_$_TrainsResult value, $Res Function(_$_TrainsResult) then) =
__$$_TrainsResultCopyWithImpl<$Res>;
@override
@useResult
$Res call({String rank, String number, String company});
}
/// @nodoc
class __$$_TrainsResultCopyWithImpl<$Res>
extends _$TrainsResultCopyWithImpl<$Res, _$_TrainsResult>
implements _$$_TrainsResultCopyWith<$Res> {
__$$_TrainsResultCopyWithImpl(
_$_TrainsResult _value, $Res Function(_$_TrainsResult) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? rank = null,
Object? number = null,
Object? company = null,
}) {
return _then(_$_TrainsResult(
rank: null == rank
? _value.rank
: rank // ignore: cast_nullable_to_non_nullable
as String,
number: null == number
? _value.number
: number // ignore: cast_nullable_to_non_nullable
as String,
company: null == company
? _value.company
: company // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$_TrainsResult implements _TrainsResult {
const _$_TrainsResult(
{required this.rank, required this.number, required this.company});
factory _$_TrainsResult.fromJson(Map<String, dynamic> json) =>
_$$_TrainsResultFromJson(json);
@override
final String rank;
@override
final String number;
@override
final String company;
@override
String toString() {
return 'TrainsResult(rank: $rank, number: $number, company: $company)';
}
@override
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_TrainsResult &&
(identical(other.rank, rank) || other.rank == rank) &&
(identical(other.number, number) || other.number == number) &&
(identical(other.company, company) || other.company == company));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, rank, number, company);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_TrainsResultCopyWith<_$_TrainsResult> get copyWith =>
__$$_TrainsResultCopyWithImpl<_$_TrainsResult>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_TrainsResultToJson(
this,
);
}
}
abstract class _TrainsResult implements TrainsResult {
const factory _TrainsResult(
{required final String rank,
required final String number,
required final String company}) = _$_TrainsResult;
factory _TrainsResult.fromJson(Map<String, dynamic> json) =
_$_TrainsResult.fromJson;
@override
String get rank;
@override
String get number;
@override
String get company;
@override
@JsonKey(ignore: true)
_$$_TrainsResultCopyWith<_$_TrainsResult> get copyWith =>
throw _privateConstructorUsedError;
}

21
lib/models/trains_result.g.dart

@ -1,21 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'trains_result.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_$_TrainsResult _$$_TrainsResultFromJson(Map<String, dynamic> json) =>
_$_TrainsResult(
rank: json['rank'] as String,
number: json['number'] as String,
company: json['company'] as String,
);
Map<String, dynamic> _$$_TrainsResultToJson(_$_TrainsResult instance) =>
<String, dynamic>{
'rank': instance.rank,
'number': instance.number,
'company': instance.company,
};

24
lib/models/ui_design.dart

@ -1,24 +0,0 @@
enum UiDesign {
MATERIAL,
CUPERTINO,
FLUENT,
}
extension UIName on UiDesign {
String get userInterfaceName => (const {
UiDesign.MATERIAL: 'Material',
UiDesign.CUPERTINO: 'Cupertino',
UiDesign.FLUENT: 'Fluent',
})[this]!;
}
class UnmatchedUiDesignException implements Exception {
final UiDesign uiDesign;
UnmatchedUiDesignException(this.uiDesign);
@override
String toString() {
return '$uiDesign was not matched';
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save