Compare commits
53 Commits
space_mana
...
SP-1620-FE
| Author | SHA1 | Date | |
|---|---|---|---|
| a1826b43ac | |||
| d2713c5902 | |||
| 8cf73e3efc | |||
| 0b774a6dfc | |||
| 2267d95795 | |||
| ed2a8f6ba2 | |||
| d895ed74d2 | |||
| 3d95f2bef0 | |||
| db513f916f | |||
| 5b3152e833 | |||
| c1d3296b59 | |||
| b3069ab749 | |||
| 8d408867bb | |||
| 57508fe17e | |||
| 13360fe6f3 | |||
| 3e5b501167 | |||
| 4d9f08af31 | |||
| 28aa3bc406 | |||
| 51ad74b2be | |||
| 994e9f4e57 | |||
| c642ba2644 | |||
| 218f43bacb | |||
| 04250ebc98 | |||
| 29959f567e | |||
| fe3b5263a3 | |||
| c3a0c48501 | |||
| 5203491d15 | |||
| c379cfaed0 | |||
| d971479256 | |||
| 7109f3712a | |||
| 70a94bb1c1 | |||
| 88480142e1 | |||
| 1a2378df6e | |||
| e867c29086 | |||
| a3b427c570 | |||
| 0b0e235f26 | |||
| c250fb4469 | |||
| 59ac1bd74d | |||
| bac1450c2b | |||
| 889461db7d | |||
| 27dbcb26f1 | |||
| 0c5db9dfeb | |||
| 1393a15eca | |||
| 3c6f88b245 | |||
| 0b92abff26 | |||
| fc86042af7 | |||
| cd6bf32aed | |||
| e81b9a853e | |||
| d66921c615 | |||
| f7f3843fa7 | |||
| a1b20078a3 | |||
| ed06a760d2 | |||
| 662fe211eb |
@ -21,13 +21,13 @@ jobs:
|
|||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.27.3' # Specify the Flutter version you want to use
|
flutter-version: '3.32.1' # Specify the Flutter version you want to use
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Build Flutter Web App
|
- name: Build Flutter Web App
|
||||||
run: flutter build web --web-renderer canvaskit -t lib/main.dart
|
run: flutter build web --release -t lib/main.dart
|
||||||
|
|
||||||
- name: Build And Deploy
|
- name: Build And Deploy
|
||||||
id: builddeploy
|
id: builddeploy
|
||||||
|
|||||||
@ -19,13 +19,13 @@ jobs:
|
|||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.27.3' # Specify the Flutter version you want to use
|
flutter-version: '3.32.1' # Specify the Flutter version you want to use
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Build Flutter Web App
|
- name: Build Flutter Web App
|
||||||
run: flutter build web --web-renderer canvaskit -t lib/main_dev.dart
|
run: flutter build web --release -t lib/main_dev.dart
|
||||||
|
|
||||||
- name: Build And Deploy
|
- name: Build And Deploy
|
||||||
id: builddeploy
|
id: builddeploy
|
||||||
|
|||||||
4
.github/workflows/pr-check.yml
vendored
@ -20,10 +20,10 @@ jobs:
|
|||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.27.3'
|
flutter-version: '3.32.1'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Run Flutter Build
|
- name: Run Flutter Build
|
||||||
run: flutter build web --web-renderer canvaskit -t lib/main_dev.dart
|
run: flutter build web --release -t lib/main_dev.dart
|
||||||
|
|||||||
@ -1,33 +1,32 @@
|
|||||||
# This file configures the analyzer, which statically analyzes Dart code to
|
include: package:very_good_analysis/analysis_options.yaml
|
||||||
# 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.
|
|
||||||
analyzer:
|
analyzer:
|
||||||
errors:
|
errors:
|
||||||
constant_identifier_names: ignore
|
strict_raw_type: warning
|
||||||
overridden_fields: ignore
|
argument_type_not_assignable: warning
|
||||||
include: package:flutter_lints/flutter.yaml
|
invalid_assignment: warning
|
||||||
|
return_of_invalid_type: warning
|
||||||
|
return_of_invalid_type_from_closure: warning
|
||||||
|
list_element_type_not_assignable: warning
|
||||||
|
for_in_of_invalid_type: warning
|
||||||
|
cast_nullable_to_non_nullable: warning
|
||||||
|
non_bool_condition: warning
|
||||||
|
field_initializer_not_assignable: warning
|
||||||
|
non_bool_negation_expression: warning
|
||||||
|
non_bool_operand: warning
|
||||||
|
|
||||||
linter:
|
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.dev/lints.
|
|
||||||
#
|
|
||||||
# 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:
|
rules:
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
prefer_single_quotes: true
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
avoid_print: false
|
||||||
prefer_const_constructors: true
|
public_member_api_docs: false
|
||||||
|
sort_pub_dependencies: false
|
||||||
# Additional information about this file can be found at
|
one_member_abstracts: false
|
||||||
# https://dart.dev/guides/language/analysis-options
|
prefer_int_literals: false
|
||||||
|
sort_constructors_first: false
|
||||||
|
avoid_redundant_argument_values: false
|
||||||
|
always_put_required_named_parameters_first: false
|
||||||
|
unnecessary_breaks: false
|
||||||
|
avoid_catches_without_on_clauses: false
|
||||||
|
cascade_invocations: false
|
||||||
|
overridden_fields: false
|
||||||
|
|||||||
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
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id "com.android.application"
|
|
||||||
// START: FlutterFire Configuration
|
|
||||||
id 'com.google.gms.google-services'
|
|
||||||
id 'com.google.firebase.crashlytics'
|
|
||||||
// END: FlutterFire Configuration
|
|
||||||
id "kotlin-android"
|
|
||||||
id "dev.flutter.flutter-gradle-plugin"
|
|
||||||
}
|
|
||||||
|
|
||||||
def localProperties = new Properties()
|
|
||||||
def localPropertiesFile = rootProject.file('local.properties')
|
|
||||||
if (localPropertiesFile.exists()) {
|
|
||||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
||||||
localProperties.load(reader)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
||||||
if (flutterVersionCode == null) {
|
|
||||||
flutterVersionCode = '1'
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
||||||
if (flutterVersionName == null) {
|
|
||||||
flutterVersionName = '1.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace "com.example.syncrow_web"
|
|
||||||
compileSdk flutter.compileSdkVersion
|
|
||||||
ndkVersion flutter.ndkVersion
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '1.8'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
||||||
applicationId "com.example.syncrow_web"
|
|
||||||
// You can update the following values to match your application needs.
|
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
|
||||||
minSdkVersion flutter.minSdkVersion
|
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
|
||||||
versionCode flutterVersionCode.toInteger()
|
|
||||||
versionName flutterVersionName
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
flutter {
|
|
||||||
source '../..'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
{
|
|
||||||
"project_info": {
|
|
||||||
"project_number": "427332280600",
|
|
||||||
"firebase_url": "https://test2-8a3d2-default-rtdb.firebaseio.com",
|
|
||||||
"project_id": "test2-8a3d2",
|
|
||||||
"storage_bucket": "test2-8a3d2.firebasestorage.app"
|
|
||||||
},
|
|
||||||
"client": [
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:427332280600:android:550f67441246cb1a0c7e6d",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "com.example.syncrow.app"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyA5qOErxdm0zJmoHIB0TixfebYEsNRpwV0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:427332280600:android:bb6047adeeb80fb00c7e6d",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "com.example.syncrow_application"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyA5qOErxdm0zJmoHIB0TixfebYEsNRpwV0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"client_info": {
|
|
||||||
"mobilesdk_app_id": "1:427332280600:android:2bc36fbe82994a3e0c7e6d",
|
|
||||||
"android_client_info": {
|
|
||||||
"package_name": "com.example.syncrow_web"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oauth_client": [],
|
|
||||||
"api_key": [
|
|
||||||
{
|
|
||||||
"current_key": "AIzaSyA5qOErxdm0zJmoHIB0TixfebYEsNRpwV0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"services": {
|
|
||||||
"appinvite_service": {
|
|
||||||
"other_platform_oauth_client": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"configuration_version": "1"
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
the Flutter tool needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<application
|
|
||||||
android:label="syncrow_web"
|
|
||||||
android:name="${applicationName}"
|
|
||||||
android:icon="@mipmap/ic_launcher">
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:theme="@style/LaunchTheme"
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
|
||||||
android:hardwareAccelerated="true"
|
|
||||||
android:windowSoftInputMode="adjustResize">
|
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
|
||||||
the Android process has started. This theme is visible to the user
|
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
|
||||||
to determine the Window background behind the Flutter UI. -->
|
|
||||||
<meta-data
|
|
||||||
android:name="io.flutter.embedding.android.NormalTheme"
|
|
||||||
android:resource="@style/NormalTheme"
|
|
||||||
/>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
|
||||||
</intent-filter>
|
|
||||||
</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>
|
|
||||||
<!-- Required to query activities that can process text, see:
|
|
||||||
https://developer.android.com/training/package-visibility?hl=en and
|
|
||||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
|
||||||
|
|
||||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
|
||||||
<queries>
|
|
||||||
<intent>
|
|
||||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
|
||||||
<data android:mimeType="text/plain"/>
|
|
||||||
</intent>
|
|
||||||
</queries>
|
|
||||||
</manifest>
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
package com.example.syncrow_web
|
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
|
||||||
|
|
||||||
class MainActivity: FlutterActivity()
|
|
||||||
@ -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>
|
|
||||||
@ -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:color/white" />
|
|
||||||
|
|
||||||
<!-- You can insert your own image assets here -->
|
|
||||||
<!-- <item>
|
|
||||||
<bitmap
|
|
||||||
android:gravity="center"
|
|
||||||
android:src="@mipmap/launch_image" />
|
|
||||||
</item> -->
|
|
||||||
</layer-list>
|
|
||||||
|
Before Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@ -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
|
|
||||||
the Flutter engine 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>
|
|
||||||
@ -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 off -->
|
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
|
||||||
<!-- Show a splash screen on the activity. Automatically removed when
|
|
||||||
the Flutter engine 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.Light.NoTitleBar">
|
|
||||||
<item name="android:windowBackground">?android:colorBackground</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
the Flutter tool needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
allprojects {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rootProject.buildDir = '../build'
|
|
||||||
subprojects {
|
|
||||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
|
||||||
}
|
|
||||||
subprojects {
|
|
||||||
project.evaluationDependsOn(':app')
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("clean", Delete) {
|
|
||||||
delete rootProject.buildDir
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
org.gradle.jvmargs=-Xmx4G
|
|
||||||
android.useAndroidX=true
|
|
||||||
android.enableJetifier=true
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
|
||||||
distributionPath=wrapper/dists
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
pluginManagement {
|
|
||||||
def flutterSdkPath = {
|
|
||||||
def properties = new Properties()
|
|
||||||
file("local.properties").withInputStream { properties.load(it) }
|
|
||||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
|
||||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
|
||||||
return flutterSdkPath
|
|
||||||
}
|
|
||||||
settings.ext.flutterSdkPath = flutterSdkPath()
|
|
||||||
|
|
||||||
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
|
||||||
id "com.android.application" version "7.3.0" apply false
|
|
||||||
// START: FlutterFire Configuration
|
|
||||||
id "com.google.gms.google-services" version "4.3.15" apply false
|
|
||||||
id "com.google.firebase.crashlytics" version "2.8.1" apply false
|
|
||||||
// END: FlutterFire Configuration
|
|
||||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
|
||||||
}
|
|
||||||
|
|
||||||
include ":app"
|
|
||||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
34
ios/.gitignore
vendored
@ -1,34 +0,0 @@
|
|||||||
**/dgph
|
|
||||||
*.mode1v3
|
|
||||||
*.mode2v3
|
|
||||||
*.moved-aside
|
|
||||||
*.pbxuser
|
|
||||||
*.perspectivev3
|
|
||||||
**/*sync/
|
|
||||||
.sconsign.dblite
|
|
||||||
.tags*
|
|
||||||
**/.vagrant/
|
|
||||||
**/DerivedData/
|
|
||||||
Icon?
|
|
||||||
**/Pods/
|
|
||||||
**/.symlinks/
|
|
||||||
profile
|
|
||||||
xcuserdata
|
|
||||||
**/.generated/
|
|
||||||
Flutter/App.framework
|
|
||||||
Flutter/Flutter.framework
|
|
||||||
Flutter/Flutter.podspec
|
|
||||||
Flutter/Generated.xcconfig
|
|
||||||
Flutter/ephemeral/
|
|
||||||
Flutter/app.flx
|
|
||||||
Flutter/app.zip
|
|
||||||
Flutter/flutter_assets/
|
|
||||||
Flutter/flutter_export_environment.sh
|
|
||||||
ServiceDefinitions.json
|
|
||||||
Runner/GeneratedPluginRegistrant.*
|
|
||||||
|
|
||||||
# Exceptions to above rules.
|
|
||||||
!default.mode1v3
|
|
||||||
!default.mode2v3
|
|
||||||
!default.pbxuser
|
|
||||||
!default.perspectivev3
|
|
||||||
@ -1,26 +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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>io.flutter.flutter.app</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>FMWK</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>MinimumOSVersion</key>
|
|
||||||
<string>12.0</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
44
ios/Podfile
@ -1,44 +0,0 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
|
||||||
# platform :ios, '12.0'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
project 'Runner', {
|
|
||||||
'Debug' => :debug,
|
|
||||||
'Profile' => :release,
|
|
||||||
'Release' => :release,
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutter_root
|
|
||||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
|
||||||
unless File.exist?(generated_xcode_build_settings_path)
|
|
||||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
|
||||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
|
||||||
return matches[1].strip if matches
|
|
||||||
end
|
|
||||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
|
||||||
end
|
|
||||||
|
|
||||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
|
||||||
|
|
||||||
flutter_ios_podfile_setup
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
use_frameworks!
|
|
||||||
use_modular_headers!
|
|
||||||
|
|
||||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
||||||
target 'RunnerTests' do
|
|
||||||
inherit! :search_paths
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
flutter_additional_ios_build_settings(target)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
PODS:
|
|
||||||
- Flutter (1.0.0)
|
|
||||||
- flutter_secure_storage (6.0.0):
|
|
||||||
- Flutter
|
|
||||||
- path_provider_foundation (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- shared_preferences_foundation (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
|
||||||
- Flutter (from `Flutter`)
|
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
|
||||||
Flutter:
|
|
||||||
:path: Flutter
|
|
||||||
flutter_secure_storage:
|
|
||||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
|
||||||
path_provider_foundation:
|
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
|
||||||
shared_preferences_foundation:
|
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
|
||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
|
||||||
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
|
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
|
||||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
|
||||||
|
|
||||||
COCOAPODS: 1.15.2
|
|
||||||
@ -1,751 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 54;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
|
||||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
|
||||||
E44A9405B1EB1B638DD05A58 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7ABF0EC746A2D686A0ED574F /* Pods_RunnerTests.framework */; };
|
|
||||||
F2A3345EC3021060731668D3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B14AB50E8716720E10D074BD /* GoogleService-Info.plist */; };
|
|
||||||
FF49F60EC38658783D8D66DA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AFAE479A87ECDEBD5D6EB30 /* Pods_Runner.framework */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
|
||||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
|
||||||
isa = PBXContainerItemProxy;
|
|
||||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
|
||||||
proxyType = 1;
|
|
||||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
|
||||||
remoteInfo = Runner;
|
|
||||||
};
|
|
||||||
/* End PBXContainerItemProxy section */
|
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
|
||||||
isa = PBXCopyFilesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
dstPath = "";
|
|
||||||
dstSubfolderSpec = 10;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
name = "Embed Frameworks";
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
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>"; };
|
|
||||||
22428D486F110EE0B969469D /* 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>"; };
|
|
||||||
253C5EA6840355311DB030EA /* 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>"; };
|
|
||||||
2AFAE479A87ECDEBD5D6EB30 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
2C0D722D2ED971BF672D18D5 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
|
||||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
|
||||||
544621C7727C798253BAB2C8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; 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>"; };
|
|
||||||
7ABF0EC746A2D686A0ED574F /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
|
||||||
877FDC97D8B87080E35B3EB7 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.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>"; };
|
|
||||||
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>"; };
|
|
||||||
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>"; };
|
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
||||||
B14AB50E8716720E10D074BD /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
|
||||||
D3AD250AADBF93406007C9EB /* 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>"; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
759A57780A409ED209817654 /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
E44A9405B1EB1B638DD05A58 /* Pods_RunnerTests.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
FF49F60EC38658783D8D66DA /* Pods_Runner.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
1454C118FFCECEEDF59152D2 /* Pods */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
253C5EA6840355311DB030EA /* Pods-Runner.debug.xcconfig */,
|
|
||||||
22428D486F110EE0B969469D /* Pods-Runner.release.xcconfig */,
|
|
||||||
D3AD250AADBF93406007C9EB /* Pods-Runner.profile.xcconfig */,
|
|
||||||
2C0D722D2ED971BF672D18D5 /* Pods-RunnerTests.debug.xcconfig */,
|
|
||||||
877FDC97D8B87080E35B3EB7 /* Pods-RunnerTests.release.xcconfig */,
|
|
||||||
544621C7727C798253BAB2C8 /* Pods-RunnerTests.profile.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Pods;
|
|
||||||
path = Pods;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
20A3C64D2B1CFED5A81C3251 /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
2AFAE479A87ECDEBD5D6EB30 /* Pods_Runner.framework */,
|
|
||||||
7ABF0EC746A2D686A0ED574F /* Pods_RunnerTests.framework */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
|
||||||
);
|
|
||||||
path = RunnerTests;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Flutter;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146E51CF9000F007C117D = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */,
|
|
||||||
97C146F01CF9000F007C117D /* Runner */,
|
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
|
||||||
1454C118FFCECEEDF59152D2 /* Pods */,
|
|
||||||
20A3C64D2B1CFED5A81C3251 /* Frameworks */,
|
|
||||||
B14AB50E8716720E10D074BD /* GoogleService-Info.plist */,
|
|
||||||
);
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146EF1CF9000F007C117D /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
|
||||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
|
||||||
97C147021CF9000F007C117D /* Info.plist */,
|
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
|
||||||
);
|
|
||||||
path = Runner;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
|
||||||
buildPhases = (
|
|
||||||
B9A66CAAF434B6A1BD8C4E09 /* [CP] Check Pods Manifest.lock */,
|
|
||||||
331C807D294A63A400263BE5 /* Sources */,
|
|
||||||
331C807F294A63A400263BE5 /* Resources */,
|
|
||||||
759A57780A409ED209817654 /* Frameworks */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
|
||||||
);
|
|
||||||
name = RunnerTests;
|
|
||||||
productName = RunnerTests;
|
|
||||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
|
||||||
productType = "com.apple.product-type.bundle.unit-test";
|
|
||||||
};
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
|
||||||
buildPhases = (
|
|
||||||
C1C48B0232C0B26BFF405512 /* [CP] Check Pods Manifest.lock */,
|
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
|
||||||
33590C9CD073D3D5EBA02CDE /* [CP] Embed Pods Frameworks */,
|
|
||||||
7A77858F6F15CB76D2D3A872 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = Runner;
|
|
||||||
productName = Runner;
|
|
||||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
|
||||||
productType = "com.apple.product-type.application";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
attributes = {
|
|
||||||
BuildIndependentTargetsInParallel = YES;
|
|
||||||
LastUpgradeCheck = 1510;
|
|
||||||
ORGANIZATIONNAME = "";
|
|
||||||
TargetAttributes = {
|
|
||||||
331C8080294A63A400263BE5 = {
|
|
||||||
CreatedOnToolsVersion = 14.0;
|
|
||||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
|
||||||
};
|
|
||||||
97C146ED1CF9000F007C117D = {
|
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
|
||||||
LastSwiftMigration = 1100;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
|
||||||
compatibilityVersion = "Xcode 9.3";
|
|
||||||
developmentRegion = en;
|
|
||||||
hasScannedForEncodings = 0;
|
|
||||||
knownRegions = (
|
|
||||||
en,
|
|
||||||
Base,
|
|
||||||
);
|
|
||||||
mainGroup = 97C146E51CF9000F007C117D;
|
|
||||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */,
|
|
||||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
331C807F294A63A400263BE5 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
|
||||||
F2A3345EC3021060731668D3 /* GoogleService-Info.plist in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXResourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
|
||||||
33590C9CD073D3D5EBA02CDE /* [CP] Embed Pods Frameworks */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
alwaysOutOfDate = 1;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
|
||||||
);
|
|
||||||
name = "Thin Binary";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
|
||||||
};
|
|
||||||
7A77858F6F15CB76D2D3A872 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\n#!/bin/bash\nPATH=\"${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\"\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=\"$PODS_ROOT/FirebaseCrashlytics/upload-symbols\" --platform=ios --apple-project-path=\"${SRCROOT}\" --env-platform-name=\"${PLATFORM_NAME}\" --env-configuration=\"${CONFIGURATION}\" --env-project-dir=\"${PROJECT_DIR}\" --env-built-products-dir=\"${BUILT_PRODUCTS_DIR}\" --env-dwarf-dsym-folder-path=\"${DWARF_DSYM_FOLDER_PATH}\" --env-dwarf-dsym-file-name=\"${DWARF_DSYM_FILE_NAME}\" --env-infoplist-path=\"${INFOPLIST_PATH}\" --default-config=default\n";
|
|
||||||
};
|
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
alwaysOutOfDate = 1;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "Run Script";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
|
||||||
};
|
|
||||||
B9A66CAAF434B6A1BD8C4E09 /* [CP] Check Pods Manifest.lock */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
C1C48B0232C0B26BFF405512 /* [CP] Check Pods Manifest.lock */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
/* End PBXShellScriptBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
331C807D294A63A400263BE5 /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXTargetDependency section */
|
|
||||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
|
||||||
isa = PBXTargetDependency;
|
|
||||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
|
||||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
|
||||||
};
|
|
||||||
/* End PBXTargetDependency section */
|
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C146FB1CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = Main.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C147001CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = LaunchScreen.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXVariantGroup section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
331C8088294A63A400263BE5 /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 2C0D722D2ED971BF672D18D5 /* Pods-RunnerTests.debug.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
331C8089294A63A400263BE5 /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 877FDC97D8B87080E35B3EB7 /* Pods-RunnerTests.release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
331C808A294A63A400263BE5 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 544621C7727C798253BAB2C8 /* Pods-RunnerTests.profile.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
|
||||||
CODE_SIGN_STYLE = Automatic;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
|
||||||
MARKETING_VERSION = 1.0;
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb.RunnerTests;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
97C147031CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_TESTABILITY = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
||||||
"DEBUG=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147041CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
97C147061CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147071CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.syncrowWeb;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
331C8088294A63A400263BE5 /* Debug */,
|
|
||||||
331C8089294A63A400263BE5 /* Release */,
|
|
||||||
331C808A294A63A400263BE5 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147031CF9000F007C117D /* Debug */,
|
|
||||||
97C147041CF9000F007C117D /* Release */,
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147061CF9000F007C117D /* Debug */,
|
|
||||||
97C147071CF9000F007C117D /* Release */,
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "self:">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
@ -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>
|
|
||||||
@ -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>
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Scheme
|
|
||||||
LastUpgradeVersion = "1510"
|
|
||||||
version = "1.3">
|
|
||||||
<BuildAction
|
|
||||||
parallelizeBuildables = "YES"
|
|
||||||
buildImplicitDependencies = "YES">
|
|
||||||
<BuildActionEntries>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
|
||||||
</BuildAction>
|
|
||||||
<TestAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
<Testables>
|
|
||||||
<TestableReference
|
|
||||||
skipped = "NO"
|
|
||||||
parallelizable = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
|
||||||
BuildableName = "RunnerTests.xctest"
|
|
||||||
BlueprintName = "RunnerTests"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
|
||||||
<LaunchAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
launchStyle = "0"
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
|
||||||
debugDocumentVersioning = "YES"
|
|
||||||
debugServiceExtension = "internal"
|
|
||||||
allowLocationSimulation = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</LaunchAction>
|
|
||||||
<ProfileAction
|
|
||||||
buildConfiguration = "Profile"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
||||||
savedToolIdentifier = ""
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
debugDocumentVersioning = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</ProfileAction>
|
|
||||||
<AnalyzeAction
|
|
||||||
buildConfiguration = "Debug">
|
|
||||||
</AnalyzeAction>
|
|
||||||
<ArchiveAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
revealArchiveInOrganizer = "YES">
|
|
||||||
</ArchiveAction>
|
|
||||||
</Scheme>
|
|
||||||
10
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "group:Runner.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
<FileRef
|
|
||||||
location = "group:Pods/Pods.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
@ -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>
|
|
||||||
@ -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>
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import UIKit
|
|
||||||
import Flutter
|
|
||||||
|
|
||||||
@main
|
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
|
||||||
override func application(
|
|
||||||
_ application: UIApplication,
|
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
||||||
) -> Bool {
|
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
@ -1,5 +0,0 @@
|
|||||||
# Launch Screen Assets
|
|
||||||
|
|
||||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
|
||||||
|
|
||||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="EHf-IW-A2E">
|
|
||||||
<objects>
|
|
||||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
|
||||||
</imageView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="53" y="375"/>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
<resources>
|
|
||||||
<image name="LaunchImage" width="168" height="185"/>
|
|
||||||
</resources>
|
|
||||||
</document>
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--Flutter View Controller-->
|
|
||||||
<scene sceneID="tne-QT-ifu">
|
|
||||||
<objects>
|
|
||||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
</document>
|
|
||||||
@ -1,32 +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>API_KEY</key>
|
|
||||||
<string>AIzaSyABnpH6yo2RRjtkp4PlvtK84hKwRm2DhBw</string>
|
|
||||||
<key>GCM_SENDER_ID</key>
|
|
||||||
<string>427332280600</string>
|
|
||||||
<key>PLIST_VERSION</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>BUNDLE_ID</key>
|
|
||||||
<string>com.example.syncrowWeb</string>
|
|
||||||
<key>PROJECT_ID</key>
|
|
||||||
<string>test2-8a3d2</string>
|
|
||||||
<key>STORAGE_BUCKET</key>
|
|
||||||
<string>test2-8a3d2.firebasestorage.app</string>
|
|
||||||
<key>IS_ADS_ENABLED</key>
|
|
||||||
<false></false>
|
|
||||||
<key>IS_ANALYTICS_ENABLED</key>
|
|
||||||
<false></false>
|
|
||||||
<key>IS_APPINVITE_ENABLED</key>
|
|
||||||
<true></true>
|
|
||||||
<key>IS_GCM_ENABLED</key>
|
|
||||||
<true></true>
|
|
||||||
<key>IS_SIGNIN_ENABLED</key>
|
|
||||||
<true></true>
|
|
||||||
<key>GOOGLE_APP_ID</key>
|
|
||||||
<string>1:427332280600:ios:14346b200780dc760c7e6d</string>
|
|
||||||
<key>DATABASE_URL</key>
|
|
||||||
<string>https://test2-8a3d2-default-rtdb.firebaseio.com</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1,49 +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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>Syncrow Web</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>syncrow_web</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#import "GeneratedPluginRegistrant.h"
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
import Flutter
|
|
||||||
import UIKit
|
|
||||||
import XCTest
|
|
||||||
|
|
||||||
class RunnerTests: XCTestCase {
|
|
||||||
|
|
||||||
func testExample() {
|
|
||||||
// If you add code to the Runner application, consider adding tests here.
|
|
||||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -267,7 +267,8 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
selectedIndex = 0;
|
selectedIndex = 0;
|
||||||
effectiveTimeTimeStamp = null;
|
effectiveTimeTimeStamp = null;
|
||||||
expirationTimeTimeStamp = null;
|
expirationTimeTimeStamp = null;
|
||||||
add(FetchTableData());
|
filteredData = List.from(data);
|
||||||
|
emit(TableLoaded(filteredData));
|
||||||
}
|
}
|
||||||
|
|
||||||
String timestampToDate(dynamic timestamp) {
|
String timestampToDate(dynamic timestamp) {
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class CustomWebTextField extends StatelessWidget {
|
|||||||
controller: controller,
|
controller: controller,
|
||||||
style: const TextStyle(color: Colors.black),
|
style: const TextStyle(color: Colors.black),
|
||||||
decoration: textBoxDecoration()!.copyWith(
|
decoration: textBoxDecoration()!.copyWith(
|
||||||
errorStyle: const TextStyle(height: 0),
|
errorStyle: const TextStyle(height: 0.01),
|
||||||
hintStyle: context.textTheme.titleSmall!
|
hintStyle: context.textTheme.titleSmall!
|
||||||
.copyWith(color: Colors.grey, fontSize: 12),
|
.copyWith(color: Colors.grey, fontSize: 12),
|
||||||
hintText: hintText ?? 'Please enter'),
|
hintText: hintText ?? 'Please enter'),
|
||||||
|
|||||||
@ -34,7 +34,8 @@ class _DeviceSearchFiltersState extends State<DeviceSearchFilters>
|
|||||||
runSpacing: 10,
|
runSpacing: 10,
|
||||||
children: [
|
children: [
|
||||||
_buildSearchField("Space Name", _unitNameController, 200),
|
_buildSearchField("Space Name", _unitNameController, 200),
|
||||||
_buildSearchField("Device Name / Product Name", _productNameController, 300),
|
_buildSearchField(
|
||||||
|
"Device Name / Product Name", _productNameController, 300),
|
||||||
_buildSearchResetButtons(),
|
_buildSearchResetButtons(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -74,9 +75,7 @@ class _DeviceSearchFiltersState extends State<DeviceSearchFilters>
|
|||||||
onReset: () {
|
onReset: () {
|
||||||
_unitNameController.clear();
|
_unitNameController.clear();
|
||||||
_productNameController.clear();
|
_productNameController.clear();
|
||||||
context.read<DeviceManagementBloc>()
|
context.read<DeviceManagementBloc>().add(ResetFilters());
|
||||||
..add(ResetFilters())
|
|
||||||
..add(FetchDevices(context));
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/device_setting/settings_model/device_info_model.dart';
|
import 'package:syncrow_web/pages/device_managment/device_setting/settings_model/device_info_model.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/device_setting/settings_model/sub_space_model.dart';
|
import 'package:syncrow_web/pages/device_managment/device_setting/settings_model/sub_space_model.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/device_setting/sub_space_dialog.dart';
|
import 'package:syncrow_web/pages/device_managment/device_setting/sub_space_dialog.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
import 'package:syncrow_web/web_layout/default_container.dart';
|
import 'package:syncrow_web/web_layout/default_container.dart';
|
||||||
|
|
||||||
@ -28,7 +30,7 @@ class DeviceManagementContent extends StatelessWidget {
|
|||||||
Widget? trailing,
|
Widget? trailing,
|
||||||
required Color? valueColor}) {
|
required Color? valueColor}) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6.0),
|
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -39,6 +41,7 @@ class DeviceManagementContent extends StatelessWidget {
|
|||||||
color: ColorsManager.grayColor,
|
color: ColorsManager.grayColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 15),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
value,
|
value,
|
||||||
@ -48,7 +51,7 @@ class DeviceManagementContent extends StatelessWidget {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 12),
|
||||||
trailing ?? const SizedBox.shrink(),
|
trailing ?? const SizedBox.shrink(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -73,15 +76,15 @@ class DeviceManagementContent extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: infoRow(
|
child: infoRow(
|
||||||
label: 'Sub-Space:',
|
label: 'Sub-Space:',
|
||||||
value: deviceInfo.subspace.subspaceName,
|
value: deviceInfo.subspace.subspaceName,
|
||||||
valueColor: ColorsManager.textGray,
|
valueColor: ColorsManager.blackColor,
|
||||||
trailing: const Icon(
|
trailing: SvgPicture.asset(
|
||||||
Icons.arrow_forward_ios,
|
Assets.arrowDown,
|
||||||
size: 16,
|
width: 10,
|
||||||
color: ColorsManager.greyColor,
|
height: 10,
|
||||||
),
|
color: ColorsManager.greyColor,
|
||||||
),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Divider(color: ColorsManager.dividerColor),
|
const Divider(color: ColorsManager.dividerColor),
|
||||||
@ -104,7 +107,7 @@ class DeviceManagementContent extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
Icons.copy,
|
Icons.copy,
|
||||||
size: 16,
|
size: 15,
|
||||||
color: ColorsManager.greyColor,
|
color: ColorsManager.greyColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -51,8 +51,7 @@ class DeviceSettingsPanel extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
color: ColorsManager.grey25,
|
color: ColorsManager.grey25,
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.all(10),
|
||||||
horizontal: 20, vertical: 24),
|
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@ -70,37 +69,43 @@ class DeviceSettingsPanel extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Device Settings',
|
'Device Settings',
|
||||||
style:
|
style: context.theme.textTheme.titleLarge!
|
||||||
context.theme.textTheme.titleLarge!.copyWith(
|
.copyWith(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.w700,
|
||||||
color: ColorsManager.primaryColor,
|
color: ColorsManager.vividBlue
|
||||||
),
|
.withOpacity(0.7),
|
||||||
|
fontSize: 24),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
DefaultContainer(
|
DefaultContainer(
|
||||||
|
borderRadius: BorderRadius.circular(15),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
CircleAvatar(
|
Padding(
|
||||||
radius: 40,
|
padding: const EdgeInsets.only(left: 15),
|
||||||
backgroundColor:
|
|
||||||
const Color.fromARGB(177, 213, 213, 213),
|
|
||||||
child: CircleAvatar(
|
child: CircleAvatar(
|
||||||
backgroundColor: ColorsManager.whiteColors,
|
radius: 38,
|
||||||
radius: 36,
|
backgroundColor:
|
||||||
child: SvgPicture.asset(
|
ColorsManager.grayBorder.withOpacity(0.5),
|
||||||
iconPath,
|
child: CircleAvatar(
|
||||||
fit: BoxFit.cover,
|
backgroundColor: ColorsManager.whiteColors,
|
||||||
|
radius: 36,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
iconPath,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 25),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
'Device Name:',
|
'Device Name:',
|
||||||
style: context.textTheme.bodyMedium!
|
style: context.textTheme.bodyMedium!
|
||||||
@ -108,50 +113,79 @@ class DeviceSettingsPanel extends StatelessWidget {
|
|||||||
color: ColorsManager.grayColor,
|
color: ColorsManager.grayColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextFormField(
|
SizedBox(
|
||||||
maxLength: 30,
|
height: 35,
|
||||||
style: const TextStyle(
|
child: Row(
|
||||||
color: ColorsManager.blackColor,
|
children: [
|
||||||
),
|
SizedBox(
|
||||||
textAlign: TextAlign.start,
|
height: 50,
|
||||||
focusNode: _bloc.focusNode,
|
width: 190,
|
||||||
controller: _bloc.nameController,
|
child: TextFormField(
|
||||||
enabled: _bloc.editName,
|
scrollPadding: EdgeInsets.zero,
|
||||||
onFieldSubmitted: (value) {
|
maxLength: 30,
|
||||||
_bloc.add(const ChangeNameEvent(
|
style: const TextStyle(
|
||||||
value: false));
|
color: ColorsManager.blackColor,
|
||||||
},
|
fontSize: 16,
|
||||||
decoration: const InputDecoration(
|
),
|
||||||
border: InputBorder.none,
|
textAlign: TextAlign.start,
|
||||||
fillColor: Colors.white10,
|
focusNode: _bloc.focusNode,
|
||||||
counterText: '',
|
controller: _bloc.nameController,
|
||||||
|
enabled: _bloc.editName,
|
||||||
|
onFieldSubmitted: (value) {
|
||||||
|
_bloc.add(const ChangeNameEvent(
|
||||||
|
value: false));
|
||||||
|
},
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
border: InputBorder.none,
|
||||||
|
fillColor: Colors.white10,
|
||||||
|
counterText: '',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 15,
|
||||||
|
height: 25,
|
||||||
|
child: Visibility(
|
||||||
|
visible:
|
||||||
|
_bloc.editName != true,
|
||||||
|
replacement: const SizedBox(),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
_bloc.add(
|
||||||
|
const ChangeNameEvent(
|
||||||
|
value: true));
|
||||||
|
},
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets
|
||||||
|
.editNameIconSettings,
|
||||||
|
color: ColorsManager
|
||||||
|
.lightGrayBorderColor,
|
||||||
|
height: 15,
|
||||||
|
width: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
|
||||||
Visibility(
|
|
||||||
visible: _bloc.editName != true,
|
|
||||||
replacement: const SizedBox(),
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
_bloc.add(
|
|
||||||
const ChangeNameEvent(value: true));
|
|
||||||
},
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
Assets.editNameIconSettings,
|
|
||||||
color: ColorsManager.grayColor,
|
|
||||||
height: 20,
|
|
||||||
width: 20,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 32),
|
const SizedBox(height: 32),
|
||||||
Text('Device Management', style: sectionTitle),
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 10),
|
||||||
|
child: Text('Device Management', style: sectionTitle),
|
||||||
|
),
|
||||||
DeviceManagementContent(
|
DeviceManagementContent(
|
||||||
device: device,
|
device: device,
|
||||||
subSpaces: subSpaces.cast<SubSpaceModel>(),
|
subSpaces: subSpaces.cast<SubSpaceModel>(),
|
||||||
|
|||||||
@ -379,7 +379,7 @@ class GarageDoorBloc extends Bloc<GarageDoorEvent, GarageDoorState> {
|
|||||||
}
|
}
|
||||||
emit(GarageDoorLoadedState(status: deviceStatus));
|
emit(GarageDoorLoadedState(status: deviceStatus));
|
||||||
add(GarageDoorControlEvent(
|
add(GarageDoorControlEvent(
|
||||||
deviceId: event.deviceId,
|
deviceId: deviceId,
|
||||||
value: deviceStatus.delay.inSeconds,
|
value: deviceStatus.delay.inSeconds,
|
||||||
code: 'countdown_1'));
|
code: 'countdown_1'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -396,7 +396,7 @@ class GarageDoorBloc extends Bloc<GarageDoorEvent, GarageDoorState> {
|
|||||||
_updateLocalValue(event.code, event.value);
|
_updateLocalValue(event.code, event.value);
|
||||||
emit(GarageDoorLoadedState(status: deviceStatus));
|
emit(GarageDoorLoadedState(status: deviceStatus));
|
||||||
final success = await _runDeBouncer(
|
final success = await _runDeBouncer(
|
||||||
deviceId: event.deviceId,
|
deviceId: deviceId,
|
||||||
code: event.code,
|
code: event.code,
|
||||||
value: event.value,
|
value: event.value,
|
||||||
oldValue: oldValue,
|
oldValue: oldValue,
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
|||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_event.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_event.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/opening_clsoing_time_dialog_body.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/opening_clsoing_time_dialog_body.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/time_out_alarm_dialog_body.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/time_out_alarm_dialog_body.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/sensors_widgets/presence_display_data.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/sensors_widgets/presence_display_data.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_model.dart';
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_model.dart';
|
||||||
|
|||||||
@ -1,14 +1,13 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/seconds_picker.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/seconds_picker.dart';
|
||||||
|
|
||||||
class OpeningAndClosingTimeDialogBody extends StatefulWidget {
|
class OpeningAndClosingTimeDialogBody extends StatefulWidget {
|
||||||
final ValueChanged<int> onDurationChanged;
|
final ValueChanged<int> onDurationChanged;
|
||||||
final GarageDoorBloc bloc;
|
final GarageDoorBloc bloc;
|
||||||
|
|
||||||
OpeningAndClosingTimeDialogBody({
|
const OpeningAndClosingTimeDialogBody({
|
||||||
required this.onDurationChanged,
|
required this.onDurationChanged,
|
||||||
required this.bloc,
|
required this.bloc,
|
||||||
});
|
});
|
||||||
@ -26,7 +26,7 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
Table(
|
Table(
|
||||||
border: TableBorder.all(
|
border: TableBorder.all(
|
||||||
color: ColorsManager.graysColor,
|
color: ColorsManager.graysColor,
|
||||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
|
borderRadius: const BorderRadius.vertical(top: Radius.circular(20)),
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
TableRow(
|
TableRow(
|
||||||
@ -50,17 +50,20 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
BlocBuilder<GarageDoorBloc, GarageDoorState>(
|
BlocBuilder<GarageDoorBloc, GarageDoorState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is ScheduleGarageLoadingState) {
|
if (state is ScheduleGarageLoadingState) {
|
||||||
return const SizedBox(height: 200, child: Center(child: CircularProgressIndicator()));
|
return const SizedBox(
|
||||||
|
height: 200,
|
||||||
|
child: Center(child: CircularProgressIndicator()));
|
||||||
}
|
}
|
||||||
if (state is GarageDoorLoadedState && state.status.schedules?.isEmpty == true) {
|
if (state is GarageDoorLoadedState &&
|
||||||
|
state.status.schedules!.isEmpty) {
|
||||||
return _buildEmptyState(context);
|
return _buildEmptyState(context);
|
||||||
} else if (state is GarageDoorLoadedState) {
|
} else if (state is GarageDoorLoadedState) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 200,
|
height: 200,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: ColorsManager.graysColor),
|
border: Border.all(color: ColorsManager.graysColor),
|
||||||
borderRadius:
|
borderRadius: const BorderRadius.vertical(
|
||||||
const BorderRadius.only(bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
|
bottom: Radius.circular(20)),
|
||||||
),
|
),
|
||||||
child: _buildTableBody(state, context));
|
child: _buildTableBody(state, context));
|
||||||
}
|
}
|
||||||
@ -78,7 +81,7 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
height: 200,
|
height: 200,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: ColorsManager.graysColor),
|
border: Border.all(color: ColorsManager.graysColor),
|
||||||
borderRadius: const BorderRadius.only(bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
|
borderRadius: const BorderRadius.vertical(top: Radius.circular(20)),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -112,7 +115,8 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
if (state.status.schedules != null)
|
if (state.status.schedules != null)
|
||||||
for (int i = 0; i < state.status.schedules!.length; i++)
|
for (int i = 0; i < state.status.schedules!.length; i++)
|
||||||
_buildScheduleRow(state.status.schedules![i], i, context, state),
|
_buildScheduleRow(
|
||||||
|
state.status.schedules![i], i, context, state),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -134,7 +138,8 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
TableRow _buildScheduleRow(ScheduleModel schedule, int index, BuildContext context, GarageDoorLoadedState state) {
|
TableRow _buildScheduleRow(ScheduleModel schedule, int index,
|
||||||
|
BuildContext context, GarageDoorLoadedState state) {
|
||||||
return TableRow(
|
return TableRow(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
@ -152,7 +157,8 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
child: schedule.enable
|
child: schedule.enable
|
||||||
? const Icon(Icons.radio_button_checked, color: ColorsManager.blueColor)
|
? const Icon(Icons.radio_button_checked,
|
||||||
|
color: ColorsManager.blueColor)
|
||||||
: const Icon(
|
: const Icon(
|
||||||
Icons.radio_button_unchecked,
|
Icons.radio_button_unchecked,
|
||||||
color: ColorsManager.grayColor,
|
color: ColorsManager.grayColor,
|
||||||
@ -160,7 +166,9 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Center(child: Text(_getSelectedDays(ScheduleModel.parseSelectedDays(schedule.days)))),
|
Center(
|
||||||
|
child: Text(_getSelectedDays(
|
||||||
|
ScheduleModel.parseSelectedDays(schedule.days)))),
|
||||||
Center(child: Text(formatIsoStringToTime(schedule.time, context))),
|
Center(child: Text(formatIsoStringToTime(schedule.time, context))),
|
||||||
Center(child: Text(schedule.function.value ? 'On' : 'Off')),
|
Center(child: Text(schedule.function.value ? 'On' : 'Off')),
|
||||||
Center(
|
Center(
|
||||||
@ -170,18 +178,24 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
TextButton(
|
TextButton(
|
||||||
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
GarageDoorDialogHelper.showAddGarageDoorScheduleDialog(context,
|
GarageDoorDialogHelper.showAddGarageDoorScheduleDialog(
|
||||||
schedule: schedule, index: index, isEdit: true);
|
context,
|
||||||
|
schedule: schedule,
|
||||||
|
index: index,
|
||||||
|
isEdit: true);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Edit',
|
'Edit',
|
||||||
style: context.textTheme.bodySmall!.copyWith(color: ColorsManager.blueColor),
|
style: context.textTheme.bodySmall!
|
||||||
|
.copyWith(color: ColorsManager.blueColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.read<GarageDoorBloc>().add(DeleteGarageDoorScheduleEvent(
|
context
|
||||||
|
.read<GarageDoorBloc>()
|
||||||
|
.add(DeleteGarageDoorScheduleEvent(
|
||||||
index: index,
|
index: index,
|
||||||
scheduleId: schedule.scheduleId,
|
scheduleId: schedule.scheduleId,
|
||||||
deviceId: state.status.uuid,
|
deviceId: state.status.uuid,
|
||||||
@ -189,7 +203,8 @@ class ScheduleGarageTableWidget extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Delete',
|
'Delete',
|
||||||
style: context.textTheme.bodySmall!.copyWith(color: ColorsManager.blueColor),
|
style: context.textTheme.bodySmall!
|
||||||
|
.copyWith(color: ColorsManager.blueColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/schedule__garage_table.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/schedule__garage_table.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
@ -4,9 +4,9 @@ import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_
|
|||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/helper/garage_door_helper.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/helper/garage_door_helper.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/models/garage_door_model.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/models/garage_door_model.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/schedule_garage_header.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/schedule_garage_header.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/schedule_garage_managment_ui.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/schedule_garage_managment_ui.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/schedule_garage_mode_buttons.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/schedule_garage_mode_buttons.dart';
|
||||||
|
|
||||||
class BuildGarageDoorScheduleView extends StatefulWidget {
|
class BuildGarageDoorScheduleView extends StatefulWidget {
|
||||||
const BuildGarageDoorScheduleView({super.key, required this.status});
|
const BuildGarageDoorScheduleView({super.key, required this.status});
|
||||||
@ -5,7 +5,7 @@ import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_
|
|||||||
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/bloc/garage_door_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/helper/garage_door_helper.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/helper/garage_door_helper.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/models/garage_door_model.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/models/garage_door_model.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/garage_door/widgets/schedule_garage_view.dart';
|
import 'package:syncrow_web/pages/device_managment/garage_door/schedule_view/schedule_garage_view.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/icon_name_status_container.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/icon_name_status_container.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/table/report_table.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/table/report_table.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||||
|
|||||||
@ -3,11 +3,14 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||||||
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/bloc/one_gang_glass_switch_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/bloc/one_gang_glass_switch_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/factories/one_gang_glass_switch_bloc_factory.dart';
|
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/factories/one_gang_glass_switch_bloc_factory.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/models/once_gang_glass_status_model.dart';
|
import 'package:syncrow_web/pages/device_managment/one_g_glass_switch/models/once_gang_glass_status_model.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedual_view.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_control_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||||
|
|
||||||
class OneGangGlassSwitchControlView extends StatelessWidget with HelperResponsiveLayout {
|
class OneGangGlassSwitchControlView extends StatelessWidget
|
||||||
|
with HelperResponsiveLayout {
|
||||||
final String deviceId;
|
final String deviceId;
|
||||||
|
|
||||||
const OneGangGlassSwitchControlView({required this.deviceId, super.key});
|
const OneGangGlassSwitchControlView({required this.deviceId, super.key});
|
||||||
@ -16,7 +19,8 @@ class OneGangGlassSwitchControlView extends StatelessWidget with HelperResponsiv
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (context) =>
|
create: (context) =>
|
||||||
OneGangGlassSwitchBlocFactory.create(deviceId: deviceId)..add(OneGangGlassSwitchFetchDeviceEvent(deviceId)),
|
OneGangGlassSwitchBlocFactory.create(deviceId: deviceId)
|
||||||
|
..add(OneGangGlassSwitchFetchDeviceEvent(deviceId)),
|
||||||
child: BlocBuilder<OneGangGlassSwitchBloc, OneGangGlassSwitchState>(
|
child: BlocBuilder<OneGangGlassSwitchBloc, OneGangGlassSwitchState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is OneGangGlassSwitchLoading) {
|
if (state is OneGangGlassSwitchLoading) {
|
||||||
@ -33,7 +37,8 @@ class OneGangGlassSwitchControlView extends StatelessWidget with HelperResponsiv
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildStatusControls(BuildContext context, OneGangGlassStatusModel status) {
|
Widget _buildStatusControls(
|
||||||
|
BuildContext context, OneGangGlassStatusModel status) {
|
||||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||||
final isLarge = isLargeScreenSize(context);
|
final isLarge = isLargeScreenSize(context);
|
||||||
final isMedium = isMediumScreenSize(context);
|
final isMedium = isMediumScreenSize(context);
|
||||||
@ -76,14 +81,21 @@ class OneGangGlassSwitchControlView extends StatelessWidget with HelperResponsiv
|
|||||||
onChange: (value) {},
|
onChange: (value) {},
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
),
|
),
|
||||||
ToggleWidget(
|
ScheduleControlButton(
|
||||||
value: false,
|
onTap: () {
|
||||||
code: '',
|
showDialog<void>(
|
||||||
deviceId: deviceId,
|
context: context,
|
||||||
label: 'Scheduling',
|
builder: (ctx) => BlocProvider.value(
|
||||||
icon: Assets.scheduling,
|
value: BlocProvider.of<OneGangGlassSwitchBloc>(context),
|
||||||
onChange: (value) {},
|
child: BuildScheduleView(
|
||||||
showToggle: false,
|
category: 'switch_1',
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
mainText: '',
|
||||||
|
subtitle: 'Scheduling',
|
||||||
|
iconPath: Assets.scheduling,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,7 +5,10 @@ import 'package:syncrow_web/pages/device_managment/one_gang_switch/bloc/wall_lig
|
|||||||
import 'package:syncrow_web/pages/device_managment/one_gang_switch/bloc/wall_light_switch_state.dart';
|
import 'package:syncrow_web/pages/device_managment/one_gang_switch/bloc/wall_light_switch_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/one_gang_switch/factories/wall_light_switch_bloc_factory.dart';
|
import 'package:syncrow_web/pages/device_managment/one_gang_switch/factories/wall_light_switch_bloc_factory.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/one_gang_switch/models/wall_light_status_model.dart';
|
import 'package:syncrow_web/pages/device_managment/one_gang_switch/models/wall_light_status_model.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedual_view.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_control_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||||
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||||
|
|
||||||
class WallLightDeviceControl extends StatelessWidget
|
class WallLightDeviceControl extends StatelessWidget
|
||||||
@ -55,7 +58,6 @@ class WallLightDeviceControl extends StatelessWidget
|
|||||||
mainAxisSpacing: 12,
|
mainAxisSpacing: 12,
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(),
|
|
||||||
ToggleWidget(
|
ToggleWidget(
|
||||||
value: status.switch1,
|
value: status.switch1,
|
||||||
code: 'switch_1',
|
code: 'switch_1',
|
||||||
@ -69,7 +71,22 @@ class WallLightDeviceControl extends StatelessWidget
|
|||||||
));
|
));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(),
|
ScheduleControlButton(
|
||||||
|
onTap: () {
|
||||||
|
showDialog<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => BlocProvider.value(
|
||||||
|
value: BlocProvider.of<WallLightSwitchBloc>(context),
|
||||||
|
child: BuildScheduleView(
|
||||||
|
category: 'switch_1',
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
mainText: '',
|
||||||
|
subtitle: 'Scheduling',
|
||||||
|
iconPath: Assets.scheduling,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,587 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'package:equatable/equatable.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_entry.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_model.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
import 'package:syncrow_web/services/control_device_service.dart';
|
||||||
|
import 'package:syncrow_web/services/devices_mang_api.dart';
|
||||||
|
part 'schedule_event.dart';
|
||||||
|
part 'schedule_state.dart';
|
||||||
|
|
||||||
|
class ScheduleBloc extends Bloc<ScheduleEvent, ScheduleState> {
|
||||||
|
final String deviceId;
|
||||||
|
|
||||||
|
ScheduleBloc({
|
||||||
|
required this.deviceId,
|
||||||
|
}) : super(ScheduleInitial()) {
|
||||||
|
on<ScheduleInitializeAddEvent>(_initializeAddSchedule);
|
||||||
|
on<ScheduleUpdateSelectedTimeEvent>(_updateSelectedTime);
|
||||||
|
on<ScheduleUpdateSelectedDayEvent>(_updateSelectedDay);
|
||||||
|
on<ScheduleUpdateFunctionOnEvent>(_updateFunctionOn);
|
||||||
|
on<ScheduleGetEvent>(_getSchedule);
|
||||||
|
on<ScheduleAddEvent>(_onAddSchedule);
|
||||||
|
on<ScheduleEditEvent>(_onEditSchedule);
|
||||||
|
on<ScheduleUpdateEntryEvent>(_onUpdateSchedule);
|
||||||
|
on<UpdateScheduleModeEvent>(_onUpdateScheduleMode);
|
||||||
|
on<UpdateCountdownTimeEvent>(_onUpdateCountdownTime);
|
||||||
|
on<UpdateInchingTimeEvent>(_onUpdateInchingTime);
|
||||||
|
on<StartScheduleEvent>(_onStartScheduleEvent);
|
||||||
|
on<StopScheduleEvent>(_onStopScheduleEvent);
|
||||||
|
on<ScheduleDecrementCountdownEvent>(_onDecrementCountdown);
|
||||||
|
on<ScheduleFetchStatusEvent>(_fetchStatus);
|
||||||
|
on<ScheduleDeleteEvent>(_onDeleteSchedule);
|
||||||
|
}
|
||||||
|
Timer? _countdownTimer;
|
||||||
|
Duration countdownRemaining = Duration.zero;
|
||||||
|
|
||||||
|
Future<void> _onStopScheduleEvent(
|
||||||
|
StopScheduleEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
|
||||||
|
final success = await RemoteControlDeviceService().controlDevice(
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
status: Status(
|
||||||
|
code: 'countdown_1',
|
||||||
|
value: 0,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (success) {
|
||||||
|
_countdownTimer?.cancel();
|
||||||
|
if (event.mode == ScheduleModes.countdown) {
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
isCountdownActive: false,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
} else if (event.mode == ScheduleModes.inching) {
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
isInchingActive: false,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
emit(const ScheduleError('Failed to stop schedule'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onUpdateScheduleMode(
|
||||||
|
UpdateScheduleModeEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
scheduleMode: event.scheduleMode,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onUpdateCountdownTime(
|
||||||
|
UpdateCountdownTimeEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
countdownHours: event.hours,
|
||||||
|
countdownMinutes: event.minutes,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onUpdateInchingTime(
|
||||||
|
UpdateInchingTimeEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
inchingHours: event.hours,
|
||||||
|
inchingMinutes: event.minutes,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _initializeAddSchedule(
|
||||||
|
ScheduleInitializeAddEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
selectedTime: event.selectedTime,
|
||||||
|
selectedDays: event.selectedDays ?? List.filled(7, false),
|
||||||
|
functionOn: event.functionOn ?? false,
|
||||||
|
isEditing: event.isEditing,
|
||||||
|
scheduleMode: event.scheduleMode,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(ScheduleLoaded(
|
||||||
|
schedules: const [],
|
||||||
|
selectedTime: event.selectedTime,
|
||||||
|
selectedDays: event.selectedDays ?? List.filled(7, false),
|
||||||
|
functionOn: event.functionOn ?? false,
|
||||||
|
isEditing: event.isEditing,
|
||||||
|
deviceId: deviceId,
|
||||||
|
scheduleMode: event.scheduleMode,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
isCountdownActive: false,
|
||||||
|
isInchingActive: false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _updateSelectedTime(
|
||||||
|
ScheduleUpdateSelectedTimeEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
selectedTime: event.selectedTime,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _updateSelectedDay(
|
||||||
|
ScheduleUpdateSelectedDayEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
final updatedDays = List<bool>.from(currentState.selectedDays);
|
||||||
|
updatedDays[event.index] = event.value;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
selectedDays: updatedDays,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _updateFunctionOn(
|
||||||
|
ScheduleUpdateFunctionOnEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
functionOn: event.isOn,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _getSchedule(
|
||||||
|
ScheduleGetEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
emit(ScheduleLoading());
|
||||||
|
final schedules = await DevicesManagementApi().getDeviceSchedules(
|
||||||
|
deviceId,
|
||||||
|
event.category,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
schedules: schedules,
|
||||||
|
selectedTime: null,
|
||||||
|
selectedDays: List.filled(7, false),
|
||||||
|
functionOn: false,
|
||||||
|
isEditing: false,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(ScheduleLoaded(
|
||||||
|
schedules: schedules,
|
||||||
|
selectedTime: null,
|
||||||
|
selectedDays: List.filled(7, false),
|
||||||
|
functionOn: false,
|
||||||
|
isEditing: false,
|
||||||
|
deviceId: deviceId,
|
||||||
|
scheduleMode: ScheduleModes.schedule,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
isCountdownActive: false,
|
||||||
|
isInchingActive: false,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to load schedules: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onAddSchedule(
|
||||||
|
ScheduleAddEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final dateTime = DateTime.parse(event.time);
|
||||||
|
final success = await DevicesManagementApi().postSchedule(
|
||||||
|
category: event.category,
|
||||||
|
deviceId: deviceId,
|
||||||
|
time: getTimeStampWithoutSeconds(dateTime).toString(),
|
||||||
|
code: event.category,
|
||||||
|
value: event.functionOn,
|
||||||
|
days: event.selectedDays);
|
||||||
|
if (success) {
|
||||||
|
add(ScheduleGetEvent(category: event.category));
|
||||||
|
} else {
|
||||||
|
emit(const ScheduleError('Failed to add schedule'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to add schedule: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onEditSchedule(
|
||||||
|
ScheduleEditEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final dateTime = DateTime.parse(event.time);
|
||||||
|
final updatedSchedule = ScheduleEntry(
|
||||||
|
scheduleId: event.scheduleId,
|
||||||
|
category: event.category,
|
||||||
|
time: getTimeStampWithoutSeconds(dateTime).toString(),
|
||||||
|
function: Status(code: event.category, value: event.functionOn),
|
||||||
|
days: event.selectedDays,
|
||||||
|
);
|
||||||
|
final success = await DevicesManagementApi().editScheduleRecord(
|
||||||
|
deviceId,
|
||||||
|
updatedSchedule,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
add(ScheduleGetEvent(
|
||||||
|
category: event.category,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(const ScheduleError('Failed to update schedule'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to update schedule: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onUpdateSchedule(
|
||||||
|
ScheduleUpdateEntryEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
|
||||||
|
final updatedSchedules = currentState.schedules.map((schedule) {
|
||||||
|
if (schedule.scheduleId == event.scheduleId) {
|
||||||
|
return schedule.copyWith(
|
||||||
|
function: Status(code: event.category, value: event.functionOn),
|
||||||
|
enable: event.enable,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return schedule;
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
final success = await DevicesManagementApi().updateScheduleRecord(
|
||||||
|
enable: event.enable,
|
||||||
|
uuid: deviceId,
|
||||||
|
scheduleId: event.scheduleId,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
schedules: updatedSchedules,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(const ScheduleError('Failed to update schedule status'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to update schedule: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _onDeleteSchedule(
|
||||||
|
ScheduleDeleteEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
final success = await DevicesManagementApi().deleteScheduleRecord(
|
||||||
|
deviceId,
|
||||||
|
event.scheduleId,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
final updatedSchedules = currentState.schedules
|
||||||
|
.where((s) => s.scheduleId != event.scheduleId)
|
||||||
|
.toList();
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
schedules: updatedSchedules,
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
inchingHours: 0,
|
||||||
|
inchingMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(const ScheduleError('Failed to delete schedule'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to delete schedule: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Duration? _currentCountdown;
|
||||||
|
|
||||||
|
Future<void> _onStartScheduleEvent(
|
||||||
|
StartScheduleEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final totalSeconds =
|
||||||
|
Duration(hours: event.hours, minutes: event.minutes).inSeconds;
|
||||||
|
final code = event.mode == ScheduleModes.countdown
|
||||||
|
? 'countdown_1'
|
||||||
|
: 'switch_inching';
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
final duration = Duration(seconds: totalSeconds);
|
||||||
|
_currentCountdown = duration;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
countdownRemaining: duration,
|
||||||
|
schedules: currentState.schedules.map((schedule) {
|
||||||
|
if (schedule.function.code == code) {
|
||||||
|
return schedule.copyWith(
|
||||||
|
function: Status(code: code, value: totalSeconds),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return schedule;
|
||||||
|
}).toList(),
|
||||||
|
countdownHours: event.mode == ScheduleModes.countdown ? event.hours : 0,
|
||||||
|
));
|
||||||
|
|
||||||
|
final success = await RemoteControlDeviceService().controlDevice(
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
status: Status(
|
||||||
|
code: code,
|
||||||
|
value: totalSeconds,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
if (code == 'countdown_1') {
|
||||||
|
final countdownDuration = Duration(seconds: totalSeconds);
|
||||||
|
|
||||||
|
emit(
|
||||||
|
currentState.copyWith(
|
||||||
|
countdownHours: countdownDuration.inHours,
|
||||||
|
countdownMinutes: countdownDuration.inMinutes % 60,
|
||||||
|
countdownRemaining: countdownDuration,
|
||||||
|
isCountdownActive: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (countdownDuration.inSeconds > 0) {
|
||||||
|
_startCountdownTimer(emit, countdownDuration);
|
||||||
|
} else {
|
||||||
|
_countdownTimer?.cancel();
|
||||||
|
emit(
|
||||||
|
currentState.copyWith(
|
||||||
|
countdownHours: 0,
|
||||||
|
countdownMinutes: 0,
|
||||||
|
countdownRemaining: Duration.zero,
|
||||||
|
isCountdownActive: false,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (code == 'switch_inching') {
|
||||||
|
final inchingDuration = Duration(seconds: totalSeconds);
|
||||||
|
emit(
|
||||||
|
currentState.copyWith(
|
||||||
|
inchingHours: inchingDuration.inHours,
|
||||||
|
inchingMinutes: inchingDuration.inMinutes % 60,
|
||||||
|
isInchingActive: true,
|
||||||
|
countdownRemaining: inchingDuration,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _startCountdownTimer(
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
Duration duration,
|
||||||
|
) {
|
||||||
|
_countdownTimer?.cancel();
|
||||||
|
_countdownTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||||
|
if (_currentCountdown != null && _currentCountdown! > Duration.zero) {
|
||||||
|
_currentCountdown = _currentCountdown! - const Duration(seconds: 1);
|
||||||
|
countdownRemaining = _currentCountdown!;
|
||||||
|
add(const ScheduleDecrementCountdownEvent());
|
||||||
|
} else {
|
||||||
|
timer.cancel();
|
||||||
|
add(StopScheduleEvent(
|
||||||
|
mode: _currentCountdown == null
|
||||||
|
? ScheduleModes.countdown
|
||||||
|
: ScheduleModes.inching,
|
||||||
|
deviceId: deviceId,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onDecrementCountdown(
|
||||||
|
ScheduleDecrementCountdownEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
countdownRemaining: countdownRemaining,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> close() {
|
||||||
|
_countdownTimer?.cancel();
|
||||||
|
return super.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _fetchStatus(
|
||||||
|
ScheduleFetchStatusEvent event,
|
||||||
|
Emitter<ScheduleState> emit,
|
||||||
|
) async {
|
||||||
|
emit(ScheduleLoading());
|
||||||
|
|
||||||
|
try {
|
||||||
|
final status =
|
||||||
|
await DevicesManagementApi().getDeviceStatus(event.deviceId);
|
||||||
|
print(status.status);
|
||||||
|
final deviceStatus =
|
||||||
|
WaterHeaterStatusModel.fromJson(event.deviceId, status.status);
|
||||||
|
|
||||||
|
final scheduleMode =
|
||||||
|
deviceStatus.countdownHours > 0 || deviceStatus.countdownMinutes > 0
|
||||||
|
? ScheduleModes.countdown
|
||||||
|
: deviceStatus.inchingHours > 0 || deviceStatus.inchingMinutes > 0
|
||||||
|
? ScheduleModes.inching
|
||||||
|
: ScheduleModes.schedule;
|
||||||
|
final isCountdown = scheduleMode == ScheduleModes.countdown;
|
||||||
|
final isInching = scheduleMode == ScheduleModes.inching;
|
||||||
|
|
||||||
|
Duration? countdownRemaining;
|
||||||
|
var isCountdownActive = false;
|
||||||
|
var isInchingActive = false;
|
||||||
|
|
||||||
|
if (isCountdown) {
|
||||||
|
countdownRemaining = Duration(
|
||||||
|
hours: deviceStatus.countdownHours,
|
||||||
|
minutes: deviceStatus.countdownMinutes,
|
||||||
|
);
|
||||||
|
isCountdownActive = countdownRemaining > Duration.zero;
|
||||||
|
} else if (isInching) {
|
||||||
|
isInchingActive = Duration(
|
||||||
|
hours: deviceStatus.inchingHours,
|
||||||
|
minutes: deviceStatus.inchingMinutes,
|
||||||
|
) >
|
||||||
|
Duration.zero;
|
||||||
|
}
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
final currentState = state as ScheduleLoaded;
|
||||||
|
emit(currentState.copyWith(
|
||||||
|
scheduleMode: scheduleMode,
|
||||||
|
countdownHours: deviceStatus.countdownHours,
|
||||||
|
countdownMinutes: deviceStatus.countdownMinutes,
|
||||||
|
inchingHours: deviceStatus.inchingHours,
|
||||||
|
inchingMinutes: deviceStatus.inchingMinutes,
|
||||||
|
isCountdownActive: isCountdownActive,
|
||||||
|
isInchingActive: isInchingActive,
|
||||||
|
countdownRemaining: countdownRemaining ?? Duration.zero,
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
emit(ScheduleLoaded(
|
||||||
|
schedules: const [],
|
||||||
|
selectedTime: null,
|
||||||
|
selectedDays: List.filled(7, false),
|
||||||
|
functionOn: false,
|
||||||
|
isEditing: false,
|
||||||
|
deviceId: deviceId,
|
||||||
|
scheduleMode: scheduleMode,
|
||||||
|
countdownHours: deviceStatus.countdownHours,
|
||||||
|
countdownMinutes: deviceStatus.countdownMinutes,
|
||||||
|
inchingHours: deviceStatus.inchingHours,
|
||||||
|
inchingMinutes: deviceStatus.inchingMinutes,
|
||||||
|
isCountdownActive: isCountdownActive,
|
||||||
|
isInchingActive: isInchingActive,
|
||||||
|
countdownRemaining: countdownRemaining ?? Duration.zero,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (isCountdownActive && countdownRemaining != null) {
|
||||||
|
// _startCountdownTimer(emit, countdownRemaining);
|
||||||
|
// }
|
||||||
|
} catch (e) {
|
||||||
|
emit(ScheduleError('Failed to fetch device status: $e'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String extractTime(String isoDateTime) {
|
||||||
|
// Example input: "2025-06-19T15:45:00.000"
|
||||||
|
return isoDateTime.split('T')[1].split('.')[0]; // gives "15:45:00"
|
||||||
|
}
|
||||||
|
|
||||||
|
int? getTimeStampWithoutSeconds(DateTime? dateTime) {
|
||||||
|
if (dateTime == null) return null;
|
||||||
|
DateTime dateTimeWithoutSeconds = DateTime(dateTime.year, dateTime.month,
|
||||||
|
dateTime.day, dateTime.hour, dateTime.minute);
|
||||||
|
return dateTimeWithoutSeconds.millisecondsSinceEpoch ~/ 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,232 @@
|
|||||||
|
part of 'schedule_bloc.dart';
|
||||||
|
|
||||||
|
abstract class ScheduleEvent extends Equatable {
|
||||||
|
const ScheduleEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleInitializeAddEvent extends ScheduleEvent {
|
||||||
|
final bool isEditing;
|
||||||
|
final ScheduleModes scheduleMode;
|
||||||
|
final TimeOfDay? selectedTime;
|
||||||
|
final List<bool>? selectedDays;
|
||||||
|
final bool? functionOn;
|
||||||
|
|
||||||
|
const ScheduleInitializeAddEvent({
|
||||||
|
required this.isEditing,
|
||||||
|
required this.scheduleMode,
|
||||||
|
this.selectedTime,
|
||||||
|
this.selectedDays,
|
||||||
|
this.functionOn,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [
|
||||||
|
isEditing,
|
||||||
|
scheduleMode,
|
||||||
|
selectedTime,
|
||||||
|
selectedDays,
|
||||||
|
functionOn,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleUpdateSelectedTimeEvent extends ScheduleEvent {
|
||||||
|
final TimeOfDay selectedTime;
|
||||||
|
|
||||||
|
const ScheduleUpdateSelectedTimeEvent(this.selectedTime);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [selectedTime];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleUpdateSelectedDayEvent extends ScheduleEvent {
|
||||||
|
final int index;
|
||||||
|
final bool value;
|
||||||
|
|
||||||
|
const ScheduleUpdateSelectedDayEvent(this.index, this.value);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [index, value];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleUpdateFunctionOnEvent extends ScheduleEvent {
|
||||||
|
final bool isOn;
|
||||||
|
|
||||||
|
const ScheduleUpdateFunctionOnEvent(this.isOn);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [isOn];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleGetEvent extends ScheduleEvent {
|
||||||
|
final String category;
|
||||||
|
|
||||||
|
const ScheduleGetEvent({required this.category});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [category];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleAddEvent extends ScheduleEvent {
|
||||||
|
final String category;
|
||||||
|
final String time;
|
||||||
|
final List<String> selectedDays;
|
||||||
|
final bool functionOn;
|
||||||
|
|
||||||
|
const ScheduleAddEvent({
|
||||||
|
required this.category,
|
||||||
|
required this.time,
|
||||||
|
required this.selectedDays,
|
||||||
|
required this.functionOn,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [category, time, selectedDays, functionOn];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleEditEvent extends ScheduleEvent {
|
||||||
|
final String scheduleId;
|
||||||
|
final String category;
|
||||||
|
final String time;
|
||||||
|
final List<String> selectedDays;
|
||||||
|
final bool functionOn;
|
||||||
|
|
||||||
|
const ScheduleEditEvent({
|
||||||
|
required this.scheduleId,
|
||||||
|
required this.category,
|
||||||
|
required this.time,
|
||||||
|
required this.selectedDays,
|
||||||
|
required this.functionOn,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [
|
||||||
|
scheduleId,
|
||||||
|
category,
|
||||||
|
time,
|
||||||
|
selectedDays,
|
||||||
|
functionOn,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleDeleteEvent extends ScheduleEvent {
|
||||||
|
final String scheduleId;
|
||||||
|
|
||||||
|
const ScheduleDeleteEvent(this.scheduleId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [scheduleId];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleUpdateEntryEvent extends ScheduleEvent {
|
||||||
|
final String scheduleId;
|
||||||
|
final bool functionOn;
|
||||||
|
final bool enable;
|
||||||
|
final String category;
|
||||||
|
|
||||||
|
const ScheduleUpdateEntryEvent({
|
||||||
|
required this.scheduleId,
|
||||||
|
required this.functionOn,
|
||||||
|
required this.enable,
|
||||||
|
required this.category,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [scheduleId, functionOn, enable, category];
|
||||||
|
}
|
||||||
|
|
||||||
|
class UpdateScheduleModeEvent extends ScheduleEvent {
|
||||||
|
final ScheduleModes scheduleMode;
|
||||||
|
|
||||||
|
const UpdateScheduleModeEvent({required this.scheduleMode});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [scheduleMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
class UpdateCountdownTimeEvent extends ScheduleEvent {
|
||||||
|
final int hours;
|
||||||
|
final int minutes;
|
||||||
|
|
||||||
|
const UpdateCountdownTimeEvent({
|
||||||
|
required this.hours,
|
||||||
|
required this.minutes,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [hours, minutes];
|
||||||
|
}
|
||||||
|
|
||||||
|
class UpdateInchingTimeEvent extends ScheduleEvent {
|
||||||
|
final int hours;
|
||||||
|
final int minutes;
|
||||||
|
|
||||||
|
const UpdateInchingTimeEvent({
|
||||||
|
required this.hours,
|
||||||
|
required this.minutes,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [hours, minutes];
|
||||||
|
}
|
||||||
|
|
||||||
|
class StartScheduleEvent extends ScheduleEvent {
|
||||||
|
final ScheduleModes mode;
|
||||||
|
final int hours;
|
||||||
|
final int minutes;
|
||||||
|
|
||||||
|
const StartScheduleEvent({
|
||||||
|
required this.mode,
|
||||||
|
required this.hours,
|
||||||
|
required this.minutes,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [mode, hours, minutes];
|
||||||
|
}
|
||||||
|
|
||||||
|
class StopScheduleEvent extends ScheduleEvent {
|
||||||
|
final ScheduleModes mode;
|
||||||
|
final String deviceId;
|
||||||
|
|
||||||
|
const StopScheduleEvent({
|
||||||
|
required this.mode,
|
||||||
|
required this.deviceId,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [mode, deviceId];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleDecrementCountdownEvent extends ScheduleEvent {
|
||||||
|
const ScheduleDecrementCountdownEvent();
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleFetchStatusEvent extends ScheduleEvent {
|
||||||
|
final String deviceId;
|
||||||
|
|
||||||
|
const ScheduleFetchStatusEvent(this.deviceId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [deviceId];
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeleteScheduleEvent extends ScheduleEvent {
|
||||||
|
final String scheduleId;
|
||||||
|
|
||||||
|
const DeleteScheduleEvent(this.scheduleId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [scheduleId];
|
||||||
|
}
|
||||||
|
|
||||||
|
class StatusUpdatedScheduleEvent extends ScheduleEvent {
|
||||||
|
final String id;
|
||||||
|
|
||||||
|
const StatusUpdatedScheduleEvent(this.id);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [id];
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
part of 'schedule_bloc.dart';
|
||||||
|
|
||||||
|
abstract class ScheduleState extends Equatable {
|
||||||
|
const ScheduleState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleInitial extends ScheduleState {
|
||||||
|
@override
|
||||||
|
List<Object> get props => [];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleLoading extends ScheduleState {
|
||||||
|
@override
|
||||||
|
List<Object> get props => [];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleLoaded extends ScheduleState {
|
||||||
|
final List<ScheduleModel> schedules;
|
||||||
|
final TimeOfDay? selectedTime;
|
||||||
|
final List<bool> selectedDays;
|
||||||
|
final bool functionOn;
|
||||||
|
final bool isEditing;
|
||||||
|
final String deviceId;
|
||||||
|
final int countdownHours;
|
||||||
|
final int countdownMinutes;
|
||||||
|
final bool isCountdownActive;
|
||||||
|
final int inchingHours;
|
||||||
|
final int inchingMinutes;
|
||||||
|
final bool isInchingActive;
|
||||||
|
final ScheduleModes scheduleMode;
|
||||||
|
final Duration? countdownRemaining;
|
||||||
|
|
||||||
|
const ScheduleLoaded({
|
||||||
|
required this.schedules,
|
||||||
|
this.selectedTime,
|
||||||
|
required this.selectedDays,
|
||||||
|
required this.functionOn,
|
||||||
|
required this.isEditing,
|
||||||
|
required this.deviceId,
|
||||||
|
this.countdownHours = 0,
|
||||||
|
this.countdownMinutes = 0,
|
||||||
|
this.isCountdownActive = false,
|
||||||
|
this.inchingHours = 0,
|
||||||
|
this.inchingMinutes = 0,
|
||||||
|
this.isInchingActive = false,
|
||||||
|
this.scheduleMode = ScheduleModes.countdown,
|
||||||
|
this.countdownRemaining,
|
||||||
|
});
|
||||||
|
|
||||||
|
ScheduleLoaded copyWith({
|
||||||
|
List<ScheduleModel>? schedules,
|
||||||
|
TimeOfDay? selectedTime,
|
||||||
|
List<bool>? selectedDays,
|
||||||
|
bool? functionOn,
|
||||||
|
bool? isEditing,
|
||||||
|
int? countdownHours,
|
||||||
|
int? countdownMinutes,
|
||||||
|
bool? isCountdownActive,
|
||||||
|
int? inchingHours,
|
||||||
|
int? inchingMinutes,
|
||||||
|
bool? isInchingActive,
|
||||||
|
ScheduleModes? scheduleMode,
|
||||||
|
Duration? countdownRemaining,
|
||||||
|
}) {
|
||||||
|
return ScheduleLoaded(
|
||||||
|
schedules: schedules ?? this.schedules,
|
||||||
|
selectedTime: selectedTime ?? this.selectedTime,
|
||||||
|
selectedDays: selectedDays ?? this.selectedDays,
|
||||||
|
functionOn: functionOn ?? this.functionOn,
|
||||||
|
isEditing: isEditing ?? this.isEditing,
|
||||||
|
deviceId: deviceId,
|
||||||
|
countdownHours: countdownHours ?? this.countdownHours,
|
||||||
|
countdownMinutes: countdownMinutes ?? this.countdownMinutes,
|
||||||
|
isCountdownActive: isCountdownActive ?? this.isCountdownActive,
|
||||||
|
inchingHours: inchingHours ?? this.inchingHours,
|
||||||
|
inchingMinutes: inchingMinutes ?? this.inchingMinutes,
|
||||||
|
isInchingActive: isInchingActive ?? this.isInchingActive,
|
||||||
|
scheduleMode: scheduleMode ?? this.scheduleMode,
|
||||||
|
countdownRemaining: countdownRemaining ?? this.countdownRemaining,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [
|
||||||
|
schedules,
|
||||||
|
selectedTime,
|
||||||
|
selectedDays,
|
||||||
|
functionOn,
|
||||||
|
isEditing,
|
||||||
|
deviceId,
|
||||||
|
countdownHours,
|
||||||
|
countdownMinutes,
|
||||||
|
isCountdownActive,
|
||||||
|
inchingHours,
|
||||||
|
inchingMinutes,
|
||||||
|
isInchingActive,
|
||||||
|
scheduleMode,
|
||||||
|
countdownRemaining,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScheduleError extends ScheduleState {
|
||||||
|
final String error;
|
||||||
|
|
||||||
|
const ScheduleError(this.error);
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [error];
|
||||||
|
}
|
||||||
@ -1,8 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
|
||||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/water_heater/bloc/water_heater_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
class CountdownModeButtons extends StatelessWidget {
|
class CountdownModeButtons extends StatelessWidget {
|
||||||
@ -38,14 +39,10 @@ class CountdownModeButtons extends StatelessWidget {
|
|||||||
? DefaultButton(
|
? DefaultButton(
|
||||||
height: 40,
|
height: 40,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context
|
context.read<ScheduleBloc>().add(
|
||||||
.read<WaterHeaterBloc>()
|
StopScheduleEvent(
|
||||||
.add(StopScheduleEvent(deviceId));
|
mode: ScheduleModes.countdown,
|
||||||
context.read<WaterHeaterBloc>().add(
|
|
||||||
ToggleWaterHeaterEvent(
|
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
code: 'countdown_1',
|
|
||||||
value: 0,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -55,12 +52,11 @@ class CountdownModeButtons extends StatelessWidget {
|
|||||||
: DefaultButton(
|
: DefaultButton(
|
||||||
height: 40,
|
height: 40,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.read<WaterHeaterBloc>().add(
|
context.read<ScheduleBloc>().add(
|
||||||
ToggleWaterHeaterEvent(
|
StartScheduleEvent(
|
||||||
deviceId: deviceId,
|
mode: ScheduleModes.countdown,
|
||||||
code: 'countdown_1',
|
hours: hours,
|
||||||
value: Duration(hours: hours, minutes: minutes)
|
minutes: minutes,
|
||||||
.inSeconds,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -0,0 +1,185 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
|
class CountdownInchingView extends StatefulWidget {
|
||||||
|
const CountdownInchingView({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CountdownInchingView> createState() => _CountdownInchingViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CountdownInchingViewState extends State<CountdownInchingView> {
|
||||||
|
late FixedExtentScrollController _hoursController;
|
||||||
|
late FixedExtentScrollController _minutesController;
|
||||||
|
|
||||||
|
int _lastHours = -1;
|
||||||
|
int _lastMinutes = -1;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_hoursController = FixedExtentScrollController();
|
||||||
|
_minutesController = FixedExtentScrollController();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_hoursController.dispose();
|
||||||
|
_minutesController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _updateControllers(int displayHours, int displayMinutes) {
|
||||||
|
if (_lastHours != displayHours) {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (_hoursController.hasClients) {
|
||||||
|
_hoursController.jumpToItem(displayHours);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
_lastHours = displayHours;
|
||||||
|
}
|
||||||
|
if (_lastMinutes != displayMinutes) {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (_minutesController.hasClients) {
|
||||||
|
_minutesController.jumpToItem(displayMinutes);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
_lastMinutes = displayMinutes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<ScheduleBloc, ScheduleState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is! ScheduleLoaded) return const SizedBox.shrink();
|
||||||
|
|
||||||
|
final isCountDown = state.scheduleMode == ScheduleModes.countdown;
|
||||||
|
final isActive =
|
||||||
|
isCountDown ? state.isCountdownActive : state.isInchingActive;
|
||||||
|
final displayHours = isActive && state.countdownRemaining != null
|
||||||
|
? state.countdownRemaining!.inHours
|
||||||
|
: (isCountDown ? state.countdownHours : state.inchingHours);
|
||||||
|
final displayMinutes = isActive && state.countdownRemaining != null
|
||||||
|
? state.countdownRemaining!.inMinutes.remainder(60)
|
||||||
|
: (isCountDown ? state.countdownMinutes : state.inchingMinutes);
|
||||||
|
|
||||||
|
_updateControllers(displayHours, displayMinutes);
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
isCountDown ? 'Countdown:' : 'Inching:',
|
||||||
|
style: context.textTheme.bodySmall!.copyWith(
|
||||||
|
fontSize: 13,
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Visibility(
|
||||||
|
visible: !isCountDown,
|
||||||
|
child: const Text(
|
||||||
|
'Once enabled this feature, each time the device is turned on, '
|
||||||
|
'it will automatically turn off after a preset time.',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_buildPickerColumn(
|
||||||
|
context,
|
||||||
|
'h',
|
||||||
|
displayHours,
|
||||||
|
100,
|
||||||
|
_hoursController,
|
||||||
|
(value) {
|
||||||
|
if (!isActive) {
|
||||||
|
context.read<ScheduleBloc>().add(UpdateCountdownTimeEvent(
|
||||||
|
hours: value, minutes: displayMinutes));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isActive: isActive,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
_buildPickerColumn(
|
||||||
|
context,
|
||||||
|
'm',
|
||||||
|
displayMinutes,
|
||||||
|
60,
|
||||||
|
_minutesController,
|
||||||
|
(value) {
|
||||||
|
if (!isActive) {
|
||||||
|
context.read<ScheduleBloc>().add(UpdateCountdownTimeEvent(
|
||||||
|
hours: displayHours, minutes: value));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isActive: isActive,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildPickerColumn(
|
||||||
|
BuildContext context,
|
||||||
|
String label,
|
||||||
|
int initialValue,
|
||||||
|
int itemCount,
|
||||||
|
FixedExtentScrollController controller,
|
||||||
|
ValueChanged<int> onSelected, {
|
||||||
|
required bool isActive,
|
||||||
|
}) {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 40,
|
||||||
|
width: 80,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: ColorsManager.boxColor,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: ListWheelScrollView.useDelegate(
|
||||||
|
controller: controller,
|
||||||
|
itemExtent: 40.0,
|
||||||
|
physics: isActive
|
||||||
|
? const NeverScrollableScrollPhysics()
|
||||||
|
: const FixedExtentScrollPhysics(),
|
||||||
|
onSelectedItemChanged: isActive ? null : onSelected,
|
||||||
|
childDelegate: ListWheelChildBuilderDelegate(
|
||||||
|
builder: (context, index) {
|
||||||
|
return Center(
|
||||||
|
child: Text(
|
||||||
|
index.toString().padLeft(2, '0'),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24,
|
||||||
|
color: isActive ? ColorsManager.grayColor : Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
childCount: itemCount,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
|
||||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/water_heater/bloc/water_heater_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/bloc/water_heater_bloc.dart'
|
||||||
|
hide StopScheduleEvent;
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
class InchingModeButtons extends StatelessWidget {
|
class InchingModeButtons extends StatelessWidget {
|
||||||
@ -38,15 +41,9 @@ class InchingModeButtons extends StatelessWidget {
|
|||||||
? DefaultButton(
|
? DefaultButton(
|
||||||
height: 40,
|
height: 40,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context
|
context.read<ScheduleBloc>().add(
|
||||||
.read<WaterHeaterBloc>()
|
StopScheduleEvent(
|
||||||
.add(StopScheduleEvent(deviceId));
|
deviceId: deviceId, mode: ScheduleModes.inching),
|
||||||
context.read<WaterHeaterBloc>().add(
|
|
||||||
ToggleWaterHeaterEvent(
|
|
||||||
deviceId: deviceId,
|
|
||||||
code: 'switch_inching',
|
|
||||||
value: 0,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/count_down_button.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/count_down_inching_view.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/inching_mode_buttons.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_header.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_managment_ui.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_mode_buttons.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_mode_selector.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/helper/add_schedule_dialog_helper.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
|
||||||
|
class BuildScheduleView extends StatelessWidget {
|
||||||
|
const BuildScheduleView(
|
||||||
|
{super.key, required this.deviceUuid, required this.category});
|
||||||
|
final String deviceUuid;
|
||||||
|
final String category;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocProvider(
|
||||||
|
create: (_) => ScheduleBloc(
|
||||||
|
deviceId: deviceUuid,
|
||||||
|
)
|
||||||
|
..add(ScheduleGetEvent(category: category))
|
||||||
|
..add(ScheduleFetchStatusEvent(deviceUuid)),
|
||||||
|
child: Dialog(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
insetPadding: const EdgeInsets.all(20),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
),
|
||||||
|
child: SizedBox(
|
||||||
|
width: 700,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 40.0, vertical: 20),
|
||||||
|
child: BlocBuilder<ScheduleBloc, ScheduleState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const ScheduleHeader(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
ScheduleModeSelector(
|
||||||
|
currentMode: state.scheduleMode,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
if (state.scheduleMode == ScheduleModes.schedule)
|
||||||
|
ScheduleManagementUI(
|
||||||
|
category: category,
|
||||||
|
deviceUuid: deviceUuid,
|
||||||
|
onAddSchedule: () async {
|
||||||
|
final entry = await ScheduleDialogHelper
|
||||||
|
.showAddScheduleDialog(
|
||||||
|
context,
|
||||||
|
schedule: null,
|
||||||
|
isEdit: false,
|
||||||
|
);
|
||||||
|
if (entry != null) {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
ScheduleAddEvent(
|
||||||
|
category: entry.category,
|
||||||
|
time: entry.time,
|
||||||
|
functionOn: entry.function.value,
|
||||||
|
selectedDays: entry.days,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
if (state.scheduleMode == ScheduleModes.countdown ||
|
||||||
|
state.scheduleMode == ScheduleModes.inching)
|
||||||
|
const CountdownInchingView(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
if (state.scheduleMode == ScheduleModes.countdown)
|
||||||
|
CountdownModeButtons(
|
||||||
|
isActive: state.isCountdownActive,
|
||||||
|
deviceId: deviceUuid,
|
||||||
|
hours: state.countdownHours,
|
||||||
|
minutes: state.countdownMinutes,
|
||||||
|
),
|
||||||
|
if (state.scheduleMode == ScheduleModes.inching)
|
||||||
|
InchingModeButtons(
|
||||||
|
isActive: state.isInchingActive,
|
||||||
|
deviceId: deviceUuid,
|
||||||
|
hours: state.inchingHours,
|
||||||
|
minutes: state.inchingMinutes,
|
||||||
|
),
|
||||||
|
if (state.scheduleMode != ScheduleModes.countdown &&
|
||||||
|
state.scheduleMode != ScheduleModes.inching)
|
||||||
|
ScheduleModeButtons(
|
||||||
|
onSave: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const Center(child: CircularProgressIndicator());
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/shared/device_controls_container.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
|
||||||
|
class ScheduleControlButton extends StatelessWidget {
|
||||||
|
final VoidCallback onTap;
|
||||||
|
final String mainText;
|
||||||
|
final String subtitle;
|
||||||
|
final String iconPath;
|
||||||
|
|
||||||
|
const ScheduleControlButton({
|
||||||
|
super.key,
|
||||||
|
required this.onTap,
|
||||||
|
required this.mainText,
|
||||||
|
required this.subtitle,
|
||||||
|
required this.iconPath,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: DeviceControlsContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: ColorsManager.whiteColors,
|
||||||
|
),
|
||||||
|
margin: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
child: ClipOval(
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
iconPath,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
mainText,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).textTheme.titleMedium!.copyWith(
|
||||||
|
fontWeight: FontWeight.w200,
|
||||||
|
fontSize: 12,
|
||||||
|
color: ColorsManager.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
subtitle,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).textTheme.titleMedium!.copyWith(
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
color: ColorsManager.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,18 +1,19 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/water_heater/bloc/water_heater_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_table.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/water_heater/widgets/schedule_table.dart';
|
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
class ScheduleManagementUI extends StatelessWidget {
|
class ScheduleManagementUI extends StatelessWidget {
|
||||||
final WaterHeaterDeviceStatusLoaded state;
|
final String deviceUuid;
|
||||||
final Function onAddSchedule;
|
final VoidCallback onAddSchedule;
|
||||||
|
final String category;
|
||||||
|
|
||||||
const ScheduleManagementUI({
|
const ScheduleManagementUI({
|
||||||
super.key,
|
super.key,
|
||||||
required this.state,
|
required this.deviceUuid,
|
||||||
required this.onAddSchedule,
|
required this.onAddSchedule,
|
||||||
|
this.category = 'switch_1',
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -28,7 +29,7 @@ class ScheduleManagementUI extends StatelessWidget {
|
|||||||
padding: 2,
|
padding: 2,
|
||||||
backgroundColor: ColorsManager.graysColor,
|
backgroundColor: ColorsManager.graysColor,
|
||||||
borderRadius: 15,
|
borderRadius: 15,
|
||||||
onPressed: () => onAddSchedule(),
|
onPressed: onAddSchedule,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(Icons.add, color: ColorsManager.primaryColor),
|
const Icon(Icons.add, color: ColorsManager.primaryColor),
|
||||||
@ -43,7 +44,7 @@ class ScheduleManagementUI extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
ScheduleTableWidget(state: state),
|
ScheduleTableWidget(deviceUuid: deviceUuid, category: category),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/water_heater_status_model.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
|
||||||
|
class ScheduleModeSelector extends StatelessWidget {
|
||||||
|
final ScheduleModes currentMode;
|
||||||
|
|
||||||
|
const ScheduleModeSelector({
|
||||||
|
super.key,
|
||||||
|
required this.currentMode,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final currentMode = context.select<ScheduleBloc, ScheduleModes>(
|
||||||
|
(bloc) => bloc.state is ScheduleLoaded &&
|
||||||
|
(bloc.state as ScheduleLoaded).scheduleMode != null
|
||||||
|
? (bloc.state as ScheduleLoaded).scheduleMode
|
||||||
|
: ScheduleModes.schedule,
|
||||||
|
);
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Type:',
|
||||||
|
style: context.textTheme.bodySmall!.copyWith(
|
||||||
|
fontSize: 13,
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
_buildRadioTile(
|
||||||
|
context, 'Countdown', ScheduleModes.countdown, currentMode),
|
||||||
|
_buildRadioTile(
|
||||||
|
context, 'Schedule', ScheduleModes.schedule, currentMode),
|
||||||
|
// _buildRadioTile(
|
||||||
|
// context, 'Circulate', ScheduleModes.circulate, currentMode),
|
||||||
|
// _buildRadioTile(
|
||||||
|
// context, 'Inching', ScheduleModes.inching, currentMode),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRadioTile(
|
||||||
|
BuildContext context,
|
||||||
|
String label,
|
||||||
|
ScheduleModes mode,
|
||||||
|
ScheduleModes currentMode,
|
||||||
|
) {
|
||||||
|
return Flexible(
|
||||||
|
child: ListTile(
|
||||||
|
contentPadding: EdgeInsets.zero,
|
||||||
|
title: Text(
|
||||||
|
label,
|
||||||
|
style: context.textTheme.bodySmall!.copyWith(
|
||||||
|
fontSize: 13,
|
||||||
|
color: ColorsManager.blackColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leading: Radio<ScheduleModes>(
|
||||||
|
value: mode,
|
||||||
|
groupValue: currentMode,
|
||||||
|
onChanged: (ScheduleModes? value) {
|
||||||
|
if (value != null) {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
UpdateScheduleModeEvent(scheduleMode: value),
|
||||||
|
);
|
||||||
|
if (value == ScheduleModes.schedule) {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
const ScheduleGetEvent(category: 'switch_1'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,283 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/bloc/schedule_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/helper/add_schedule_dialog_helper.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_entry.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/water_heater/models/schedule_model.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
|
import 'package:syncrow_web/utils/format_date_time.dart';
|
||||||
|
|
||||||
|
class ScheduleTableWidget extends StatelessWidget {
|
||||||
|
final String deviceUuid;
|
||||||
|
final String category;
|
||||||
|
|
||||||
|
const ScheduleTableWidget({
|
||||||
|
super.key,
|
||||||
|
required this.deviceUuid,
|
||||||
|
this.category = 'switch_1',
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocProvider(
|
||||||
|
create: (_) => ScheduleBloc(
|
||||||
|
deviceId: deviceUuid,
|
||||||
|
)..add(ScheduleGetEvent(category: category)),
|
||||||
|
child: _ScheduleTableView(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ScheduleTableView extends StatelessWidget {
|
||||||
|
const _ScheduleTableView();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Table(
|
||||||
|
border: TableBorder.all(
|
||||||
|
color: ColorsManager.graysColor,
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(20), topRight: Radius.circular(20)),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TableRow(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: ColorsManager.boxColor,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(20),
|
||||||
|
topRight: Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
_buildTableHeader('Active'),
|
||||||
|
_buildTableHeader('Days'),
|
||||||
|
_buildTableHeader('Time'),
|
||||||
|
_buildTableHeader('Function'),
|
||||||
|
_buildTableHeader('Action'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
BlocBuilder<ScheduleBloc, ScheduleState>(
|
||||||
|
builder: (context, state) {
|
||||||
|
if (state is ScheduleLoading) {
|
||||||
|
return const SizedBox(
|
||||||
|
height: 200,
|
||||||
|
child: Center(child: CircularProgressIndicator()));
|
||||||
|
}
|
||||||
|
if (state is ScheduleLoaded && state.schedules.isEmpty) {
|
||||||
|
return _buildEmptyState(context);
|
||||||
|
}
|
||||||
|
if (state is ScheduleLoaded) {
|
||||||
|
return Container(
|
||||||
|
height: 200,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: ColorsManager.graysColor),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(20),
|
||||||
|
bottomRight: Radius.circular(20)),
|
||||||
|
),
|
||||||
|
child: _buildTableBody(state.schedules, context));
|
||||||
|
}
|
||||||
|
if (state is ScheduleError) {
|
||||||
|
return Center(child: Text(state.error));
|
||||||
|
}
|
||||||
|
return const SizedBox(height: 200);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildEmptyState(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 200,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: ColorsManager.graysColor),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(Assets.emptyRecords, width: 40, height: 40),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
'No schedules added yet',
|
||||||
|
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||||
|
fontSize: 13,
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTableBody(List<ScheduleModel> schedules, BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 200,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Table(
|
||||||
|
border: TableBorder.all(color: ColorsManager.graysColor),
|
||||||
|
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||||
|
children: [
|
||||||
|
for (int i = 0; i < schedules.length; i++)
|
||||||
|
_buildScheduleRow(schedules[i], i, context),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTableHeader(String label) {
|
||||||
|
return TableCell(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
child: Text(
|
||||||
|
label,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TableRow _buildScheduleRow(
|
||||||
|
ScheduleModel schedule, int index, BuildContext context) {
|
||||||
|
return TableRow(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
ScheduleUpdateEntryEvent(
|
||||||
|
category: schedule.category,
|
||||||
|
scheduleId: schedule.scheduleId,
|
||||||
|
functionOn: schedule.function.value,
|
||||||
|
enable: !schedule.enable,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
child: schedule.enable
|
||||||
|
? const Icon(Icons.radio_button_checked,
|
||||||
|
color: ColorsManager.blueColor)
|
||||||
|
: const Icon(Icons.radio_button_unchecked,
|
||||||
|
color: ColorsManager.grayColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Text(_getSelectedDays(
|
||||||
|
ScheduleModel.parseSelectedDays(schedule.days)))),
|
||||||
|
Center(child: Text(formatIsoStringToTime(schedule.time, context))),
|
||||||
|
Center(child: Text(schedule.function.value ? 'On' : 'Off')),
|
||||||
|
Center(
|
||||||
|
child: Wrap(
|
||||||
|
runAlignment: WrapAlignment.center,
|
||||||
|
children: [
|
||||||
|
TextButton(
|
||||||
|
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
||||||
|
onPressed: () {
|
||||||
|
ScheduleDialogHelper.showAddScheduleDialog(
|
||||||
|
context,
|
||||||
|
schedule: ScheduleEntry.fromScheduleModel(schedule),
|
||||||
|
isEdit: true,
|
||||||
|
).then((updatedSchedule) {
|
||||||
|
if (updatedSchedule != null) {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
ScheduleEditEvent(
|
||||||
|
scheduleId: schedule.scheduleId,
|
||||||
|
category: schedule.category,
|
||||||
|
time: updatedSchedule.time,
|
||||||
|
functionOn: updatedSchedule.function.value,
|
||||||
|
selectedDays: updatedSchedule.days),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Edit',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodySmall!
|
||||||
|
.copyWith(color: ColorsManager.blueColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
style: TextButton.styleFrom(padding: EdgeInsets.zero),
|
||||||
|
onPressed: () async {
|
||||||
|
final confirmed = await showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext dialogContext) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: const Text('Confirm Delete'),
|
||||||
|
content: const Text(
|
||||||
|
'Are you sure you want to delete this schedule?'),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.of(dialogContext).pop(false),
|
||||||
|
child: Text('Cancel'),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.of(dialogContext).pop(true),
|
||||||
|
child: const Text(
|
||||||
|
'Delete',
|
||||||
|
style: TextStyle(color: Colors.red),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (confirmed == true) {
|
||||||
|
context.read<ScheduleBloc>().add(
|
||||||
|
ScheduleDeleteEvent(schedule.scheduleId),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Delete',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodySmall!
|
||||||
|
.copyWith(color: ColorsManager.blueColor),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String _getSelectedDays(List<bool> selectedDays) {
|
||||||
|
const days = ScheduleDialogHelper.allDays;
|
||||||
|
return selectedDays
|
||||||
|
.asMap()
|
||||||
|
.entries
|
||||||
|
.where((entry) => entry.value)
|
||||||
|
.map((entry) => days[entry.key])
|
||||||
|
.join(', ');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,14 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedual_view.dart';
|
||||||
|
import 'package:syncrow_web/pages/device_managment/schedule_device/schedule_widgets/schedule_control_button.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/three_g_glass_switch/bloc/three_gang_glass_switch_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/three_g_glass_switch/bloc/three_gang_glass_switch_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/three_g_glass_switch/factories/three_gang_glass_switch_bloc_factory.dart';
|
import 'package:syncrow_web/pages/device_managment/three_g_glass_switch/factories/three_gang_glass_switch_bloc_factory.dart';
|
||||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||||
|
|
||||||
import '../models/three_gang_glass_switch.dart';
|
import '../models/three_gang_glass_switch.dart';
|
||||||
|
|
||||||
class ThreeGangGlassSwitchControlView extends StatelessWidget with HelperResponsiveLayout {
|
class ThreeGangGlassSwitchControlView extends StatelessWidget
|
||||||
|
with HelperResponsiveLayout {
|
||||||
final String deviceId;
|
final String deviceId;
|
||||||
|
|
||||||
const ThreeGangGlassSwitchControlView({required this.deviceId, super.key});
|
const ThreeGangGlassSwitchControlView({required this.deviceId, super.key});
|
||||||
@ -17,7 +19,8 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget with HelperRespons
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider(
|
return BlocProvider(
|
||||||
create: (context) =>
|
create: (context) =>
|
||||||
ThreeGangGlassSwitchBlocFactory.create(deviceId: deviceId)..add(ThreeGangGlassSwitchFetchDeviceEvent(deviceId)),
|
ThreeGangGlassSwitchBlocFactory.create(deviceId: deviceId)
|
||||||
|
..add(ThreeGangGlassSwitchFetchDeviceEvent(deviceId)),
|
||||||
child: BlocBuilder<ThreeGangGlassSwitchBloc, ThreeGangGlassSwitchState>(
|
child: BlocBuilder<ThreeGangGlassSwitchBloc, ThreeGangGlassSwitchState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is ThreeGangGlassSwitchLoading) {
|
if (state is ThreeGangGlassSwitchLoading) {
|
||||||
@ -34,7 +37,8 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget with HelperRespons
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildStatusControls(BuildContext context, ThreeGangGlassStatusModel status) {
|
Widget _buildStatusControls(
|
||||||
|
BuildContext context, ThreeGangGlassStatusModel status) {
|
||||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||||
final isLarge = isLargeScreenSize(context);
|
final isLarge = isLargeScreenSize(context);
|
||||||
final isMedium = isMediumScreenSize(context);
|
final isMedium = isMediumScreenSize(context);
|
||||||
@ -98,6 +102,54 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget with HelperRespons
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
ScheduleControlButton(
|
||||||
|
onTap: () {
|
||||||
|
showDialog<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => BlocProvider.value(
|
||||||
|
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||||
|
child: BuildScheduleView(
|
||||||
|
category: 'switch_1',
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
mainText: 'Wall Light',
|
||||||
|
subtitle: 'Scheduling',
|
||||||
|
iconPath: Assets.scheduling,
|
||||||
|
),
|
||||||
|
ScheduleControlButton(
|
||||||
|
onTap: () {
|
||||||
|
showDialog<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => BlocProvider.value(
|
||||||
|
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||||
|
child: BuildScheduleView(
|
||||||
|
category: 'switch_2',
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
mainText: 'Ceiling Light',
|
||||||
|
subtitle: 'Scheduling',
|
||||||
|
iconPath: Assets.scheduling,
|
||||||
|
),
|
||||||
|
ScheduleControlButton(
|
||||||
|
onTap: () {
|
||||||
|
showDialog<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => BlocProvider.value(
|
||||||
|
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||||
|
child: BuildScheduleView(
|
||||||
|
category: 'switch_3',
|
||||||
|
deviceUuid: deviceId,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
mainText: 'SpotLight',
|
||||||
|
subtitle: 'Scheduling',
|
||||||
|
iconPath: Assets.scheduling,
|
||||||
|
),
|
||||||
ToggleWidget(
|
ToggleWidget(
|
||||||
value: false,
|
value: false,
|
||||||
code: '',
|
code: '',
|
||||||
@ -107,15 +159,6 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget with HelperRespons
|
|||||||
onChange: (value) {},
|
onChange: (value) {},
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
),
|
),
|
||||||
ToggleWidget(
|
|
||||||
value: false,
|
|
||||||
code: '',
|
|
||||||
deviceId: deviceId,
|
|
||||||
label: 'Scheduling',
|
|
||||||
icon: Assets.scheduling,
|
|
||||||
onChange: (value) {},
|
|
||||||
showToggle: false,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||