init connmit

This commit is contained in:
fengshengxiong 2024-07-01 14:18:42 +08:00
commit c39a412706
172 changed files with 8177 additions and 0 deletions

3
.fvmrc Normal file
View File

@ -0,0 +1,3 @@
{
"flutter": "3.22.1"
}

141
.gitignore vendored Normal file
View File

@ -0,0 +1,141 @@
# Do not remove or rename entries in this file, only add new ones
# See https://github.com/flutter/flutter/issues/128635 for more context.
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Visual Studio Code related
.classpath
.project
.settings/
.vscode/*
# Flutter repo-specific
/bin/cache/
/bin/internal/bootstrap.bat
/bin/internal/bootstrap.sh
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/devicelab/ABresults*.json
/dev/docs/doc/
/dev/docs/api_docs.zip
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
analysis_benchmark.json
# packages file containing multi-root paths
.packages.generated
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
.packages
.pub-preload-cache/
.pub-cache/
.pub/
build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds
# Android related
**/android/**/gradle-wrapper.jar
.gradle/
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
#*.jks
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# macOS
**/Flutter/ephemeral/
**/Pods/
**/macos/Flutter/GeneratedPluginRegistrant.swift
**/macos/Flutter/ephemeral
**/xcuserdata/
# Windows
**/windows/flutter/generated_plugin_registrant.cc
**/windows/flutter/generated_plugin_registrant.h
**/windows/flutter/generated_plugins.cmake
# Linux
**/linux/flutter/generated_plugin_registrant.cc
**/linux/flutter/generated_plugin_registrant.h
**/linux/flutter/generated_plugins.cmake
# Coverage
coverage/
# Symbols
app.*.symbols
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!.vscode/settings.json
# FVM Version Cache
.fvm/

45
.metadata Executable file
View File

@ -0,0 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "ba393198430278b6595976de84fe170f553cc728"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: android
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: ios
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: linux
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: macos
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: web
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
- platform: windows
create_revision: ba393198430278b6595976de84fe170f553cc728
base_revision: ba393198430278b6595976de84fe170f553cc728
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

16
README.md Executable file
View File

@ -0,0 +1,16 @@
# translator_lux
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

28
analysis_options.yaml Executable file
View File

@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.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:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

13
android/.gitignore vendored Executable file
View File

@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

57
android/app/build.gradle Executable file
View File

@ -0,0 +1,57 @@
plugins {
id "com.android.application"
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.lux.translator.translator_lux"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.lux.translator.translator_lux"
// 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 21
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 '../..'
}

View File

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

View File

@ -0,0 +1,45 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:enableOnBackInvokedCallback="true"
android:label="translator_lux"
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>

View File

@ -0,0 +1,6 @@
package com.lux.translator.translator_lux;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

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

View File

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

View File

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

18
android/build.gradle Executable file
View File

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

3
android/gradle.properties Executable file
View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

26
android/settings.gradle Executable file
View File

@ -0,0 +1,26 @@
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.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}
include ":app"

BIN
assets/images/png/copy.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

BIN
assets/images/png/delete_icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

BIN
assets/images/png/dialog.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/images/png/fullScreen.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

BIN
assets/images/png/history.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
assets/images/png/homeMore.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

BIN
assets/images/png/photo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/images/png/poyline.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

3
assets/svg/homeMore.svg Executable file
View File

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 2.91666C8.16304 2.91666 8.79893 3.18006 9.26777 3.6489C9.73661 4.11774 10 4.75362 10 5.41666V14.5833C10 15.2464 9.73661 15.8823 9.26777 16.3511C8.79893 16.8199 8.16304 17.0833 7.5 17.0833H5C4.33696 17.0833 3.70107 16.8199 3.23223 16.3511C2.76339 15.8823 2.5 15.2464 2.5 14.5833V5.41666C2.5 4.75362 2.76339 4.11774 3.23223 3.6489C3.70107 3.18006 4.33696 2.91666 5 2.91666H7.5ZM15 10.4167C15.663 10.4167 16.2989 10.6801 16.7678 11.1489C17.2366 11.6177 17.5 12.2536 17.5 12.9167V14.5833C17.5 15.2464 17.2366 15.8823 16.7678 16.3511C16.2989 16.8199 15.663 17.0833 15 17.0833H13.3333C12.6703 17.0833 12.0344 16.8199 11.5656 16.3511C11.0967 15.8823 10.8333 15.2464 10.8333 14.5833V12.9167C10.8333 12.2536 11.0967 11.6177 11.5656 11.1489C12.0344 10.6801 12.6703 10.4167 13.3333 10.4167H15ZM7.5 4.58333H5C4.77899 4.58333 4.56702 4.67113 4.41074 4.82741C4.25446 4.98369 4.16667 5.19565 4.16667 5.41666V14.5833C4.16667 14.8043 4.25446 15.0163 4.41074 15.1726C4.56702 15.3289 4.77899 15.4167 5 15.4167H7.5C7.72101 15.4167 7.93298 15.3289 8.08926 15.1726C8.24554 15.0163 8.33333 14.8043 8.33333 14.5833V5.41666C8.33333 5.19565 8.24554 4.98369 8.08926 4.82741C7.93298 4.67113 7.72101 4.58333 7.5 4.58333ZM15 12.0833H13.3333C13.1123 12.0833 12.9004 12.1711 12.7441 12.3274C12.5878 12.4837 12.5 12.6957 12.5 12.9167V14.5833C12.5 14.8043 12.5878 15.0163 12.7441 15.1726C12.9004 15.3289 13.1123 15.4167 13.3333 15.4167H15C15.221 15.4167 15.433 15.3289 15.5893 15.1726C15.7455 15.0163 15.8333 14.8043 15.8333 14.5833V12.9167C15.8333 12.6957 15.7455 12.4837 15.5893 12.3274C15.433 12.1711 15.221 12.0833 15 12.0833ZM15 2.91666C15.663 2.91666 16.2989 3.18006 16.7678 3.6489C17.2366 4.11774 17.5 4.75362 17.5 5.41666V7.08333C17.5 7.74637 17.2366 8.38226 16.7678 8.8511C16.2989 9.31994 15.663 9.58333 15 9.58333H13.3333C12.6703 9.58333 12.0344 9.31994 11.5656 8.8511C11.0967 8.38226 10.8333 7.74637 10.8333 7.08333V5.41666C10.8333 4.75362 11.0967 4.11774 11.5656 3.6489C12.0344 3.18006 12.6703 2.91666 13.3333 2.91666H15ZM15 4.58333H13.3333C13.1123 4.58333 12.9004 4.67113 12.7441 4.82741C12.5878 4.98369 12.5 5.19565 12.5 5.41666V7.08333C12.5 7.30434 12.5878 7.51631 12.7441 7.67259C12.9004 7.82887 13.1123 7.91666 13.3333 7.91666H15C15.221 7.91666 15.433 7.82887 15.5893 7.67259C15.7455 7.51631 15.8333 7.30434 15.8333 7.08333V5.41666C15.8333 5.19565 15.7455 4.98369 15.5893 4.82741C15.433 4.67113 15.221 4.58333 15 4.58333Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

5
assets/svg/homeVoice.svg Executable file
View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame">
<path id="Vector" d="M18 10C18.2652 10 18.5196 10.1054 18.7071 10.2929C18.8946 10.4804 19 10.7348 19 11C18.9998 12.6831 18.3933 14.3099 17.2917 15.5824C16.19 16.8548 14.6668 17.6879 13.001 17.929L13 19H15C15.2549 19.0003 15.5 19.0979 15.6854 19.2729C15.8707 19.4478 15.9822 19.687 15.9972 19.9414C16.0121 20.1958 15.9293 20.4464 15.7657 20.6418C15.6021 20.8373 15.3701 20.9629 15.117 20.993L15 21H9C8.74512 20.9997 8.49997 20.9021 8.31463 20.7272C8.1293 20.5522 8.01776 20.313 8.00283 20.0586C7.98789 19.8042 8.07067 19.5536 8.23427 19.3582C8.39786 19.1627 8.6299 19.0371 8.883 19.007L9 19H11V17.93C9.33387 17.6891 7.81031 16.856 6.7084 15.5833C5.60648 14.3106 4.99998 12.6835 5 11C5 10.7348 5.10536 10.4804 5.29289 10.2929C5.48043 10.1054 5.73478 10 6 10C6.26522 10 6.51957 10.1054 6.70711 10.2929C6.89464 10.4804 7 10.7348 7 11C7 12.3261 7.52678 13.5979 8.46447 14.5355C9.40215 15.4732 10.6739 16 12 16C13.3261 16 14.5979 15.4732 15.5355 14.5355C16.4732 13.5979 17 12.3261 17 11C17 10.7348 17.1054 10.4804 17.2929 10.2929C17.4804 10.1054 17.7348 10 18 10ZM12 3C13.0609 3 14.0783 3.42143 14.8284 4.17157C15.5786 4.92172 16 5.93913 16 7V11C16 12.0609 15.5786 13.0783 14.8284 13.8284C14.0783 14.5786 13.0609 15 12 15C10.9391 15 9.92172 14.5786 9.17157 13.8284C8.42143 13.0783 8 12.0609 8 11V7C8 5.93913 8.42143 4.92172 9.17157 4.17157C9.92172 3.42143 10.9391 3 12 3ZM12 5C11.7374 5 11.4773 5.05173 11.2346 5.15224C10.992 5.25275 10.7715 5.40007 10.5858 5.58579C10.4001 5.7715 10.2528 5.99198 10.1522 6.23463C10.0517 6.47728 10 6.73736 10 7V11C10 11.5304 10.2107 12.0391 10.5858 12.4142C10.9609 12.7893 11.4696 13 12 13C12.5304 13 13.0391 12.7893 13.4142 12.4142C13.7893 12.0391 14 11.5304 14 11V7C14 6.73736 13.9483 6.47728 13.8478 6.23463C13.7472 5.99198 13.5999 5.7715 13.4142 5.58579C13.2285 5.40007 13.008 5.25275 12.7654 5.15224C12.5227 5.05173 12.2626 5 12 5Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

3
assets/svg/home_right_icon.svg Executable file
View File

@ -0,0 +1,3 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.02341 1.33945C3.44646 1.33945 1.34998 3.43593 1.34998 6.01288C1.34998 8.59101 3.44646 10.6875 6.02341 10.6875C8.60037 10.6875 10.6968 8.59101 10.6968 6.01288C10.6968 3.4371 8.60037 1.33945 6.02341 1.33945ZM7.81521 6.50038L5.89216 8.42343C5.6238 8.69179 5.18669 8.69179 4.91833 8.42343C4.78357 8.28867 4.71677 8.11288 4.71677 7.9371C4.71677 7.76132 4.78357 7.58437 4.91833 7.45078L6.35505 6.01406L4.91833 4.57734C4.64998 4.30898 4.64998 3.87187 4.91833 3.60351C5.18669 3.33515 5.6238 3.33515 5.89216 3.60351L7.81521 5.52656C8.08474 5.79609 8.08474 6.23203 7.81521 6.50038Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 703 B

5
assets/svg/speaker.svg Executable file
View File

@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame">
<path id="Vector" d="M12.516 2.86C13.1967 3.53176 13.7372 4.33205 14.1061 5.21441C14.4751 6.09677 14.665 7.04362 14.665 8C14.665 8.95637 14.4751 9.90322 14.1061 10.7856C13.7372 11.6679 13.1967 12.4682 12.516 13.14C12.4542 13.2034 12.3804 13.2538 12.299 13.2883C12.2175 13.3229 12.1299 13.3409 12.0415 13.3412C11.953 13.3416 11.8653 13.3244 11.7835 13.2905C11.7018 13.2566 11.6276 13.2068 11.5653 13.144C11.503 13.0811 11.4538 13.0065 11.4206 12.9245C11.3874 12.8424 11.3709 12.7546 11.3721 12.6661C11.3732 12.5776 11.3919 12.4903 11.4271 12.4091C11.4624 12.3279 11.5134 12.2546 11.5773 12.1933C12.1331 11.6455 12.5744 10.9927 12.8756 10.2728C13.1769 9.55294 13.332 8.78036 13.332 8C13.332 7.21963 13.1769 6.44705 12.8756 5.72717C12.5744 5.00729 12.1331 4.35447 11.5773 3.80666C11.5134 3.74542 11.4624 3.67208 11.4271 3.5909C11.3919 3.50973 11.3732 3.42235 11.3721 3.33387C11.3709 3.24538 11.3874 3.15756 11.4206 3.07551C11.4538 2.99347 11.503 2.91886 11.5653 2.85602C11.6276 2.79318 11.7018 2.74337 11.7835 2.70951C11.8653 2.67564 11.953 2.65839 12.0415 2.65876C12.1299 2.65913 12.2175 2.67711 12.299 2.71166C12.3804 2.74621 12.4542 2.79664 12.516 2.86ZM6.91931 2.85666C7.01759 2.7788 7.13582 2.73023 7.26045 2.71653C7.38507 2.70283 7.51104 2.72454 7.62388 2.77919C7.73672 2.83384 7.83187 2.9192 7.89839 3.02547C7.96492 3.13174 8.00013 3.25462 7.99998 3.38V12.6213C7.9999 12.7465 7.96457 12.8692 7.89803 12.9752C7.83149 13.0813 7.73643 13.1665 7.62373 13.221C7.51103 13.2756 7.38525 13.2973 7.26078 13.2836C7.13632 13.27 7.01821 13.2216 6.91998 13.144L3.76731 10.6467H1.99998C1.83669 10.6466 1.67909 10.5867 1.55706 10.4782C1.43504 10.3697 1.35708 10.2202 1.33798 10.058L1.33331 9.98V6.02C1.33331 5.84319 1.40355 5.67362 1.52858 5.54859C1.6536 5.42357 1.82317 5.35333 1.99998 5.35333L3.76798 5.35266L6.91931 2.85666ZM6.66665 4.75733L4.41331 6.54266C4.29567 6.63581 4.15004 6.68655 3.99998 6.68666L2.66665 6.686V9.31333H3.99998C4.11964 9.31336 4.23708 9.3456 4.33998 9.40666L4.41331 9.45733L6.66665 11.242V4.75733ZM10.1626 5.19C10.5343 5.55687 10.8293 5.99388 11.0307 6.47568C11.2321 6.95748 11.3358 7.47447 11.3358 7.99666C11.3358 8.51886 11.2321 9.03585 11.0307 9.51765C10.8293 9.99945 10.5343 10.4365 10.1626 10.8033C10.1009 10.8667 10.0271 10.9171 9.94562 10.9517C9.86415 10.9862 9.77662 11.0042 9.68812 11.0046C9.59963 11.0049 9.51195 10.9877 9.43019 10.9538C9.34844 10.92 9.27424 10.8701 9.21193 10.8073C9.14963 10.7445 9.10045 10.6699 9.06728 10.5878C9.03411 10.5058 9.0176 10.4179 9.01872 10.3295C9.01984 10.241 9.03857 10.1536 9.07381 10.0724C9.10905 9.99125 9.1601 9.9179 9.22398 9.85666C9.47062 9.61375 9.66648 9.3242 9.80017 9.00488C9.93386 8.68556 10.0027 8.34284 10.0027 7.99666C10.0027 7.65049 9.93386 7.30776 9.80017 6.98844C9.66648 6.66912 9.47062 6.37958 9.22398 6.13666C9.1601 6.07542 9.10905 6.00208 9.07381 5.9209C9.03857 5.83973 9.01984 5.75235 9.01872 5.66387C9.0176 5.57538 9.03411 5.48756 9.06728 5.40551C9.10045 5.32347 9.14963 5.24886 9.21193 5.18602C9.27424 5.12318 9.34844 5.07337 9.43019 5.03951C9.51195 5.00564 9.59963 4.98839 9.68812 4.98876C9.77662 4.98913 9.86415 5.00711 9.94562 5.04166C10.0271 5.07621 10.1009 5.12664 10.1626 5.19Z" fill="#4ECA8C"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

34
ios/.gitignore vendored Executable file
View File

@ -0,0 +1,34 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3

View File

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

2
ios/Flutter/Debug.xcconfig Executable file
View File

@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

2
ios/Flutter/Release.xcconfig Executable file
View File

@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

44
ios/Podfile Normal file
View File

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

View File

@ -0,0 +1,728 @@
// !$*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 */; };
459234661F34218BF792FB6F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CDEB1EFB17A9B91FE40511 /* Pods_Runner.framework */; };
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 */; };
A2F7D580BCF44CF5511F23EB /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C60DE9E140E45D6F22F8E83F /* Pods_RunnerTests.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>"; };
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>"; };
422734D92A5B7F92C5CA61D4 /* 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>"; };
62D94669F4AF3486A044DD8D /* 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>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
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>"; };
C0627147FBB40A159A9ADF8D /* 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>"; };
C60DE9E140E45D6F22F8E83F /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D3CDEB1EFB17A9B91FE40511 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D4C437A39D2380BF676CE0AF /* 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>"; };
EFAC74B66E14127B5D83E1D3 /* 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>"; };
F499AFFD1643C42A1984357A /* 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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
459234661F34218BF792FB6F /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
AEF9FDC833547B3DFFA617F7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A2F7D580BCF44CF5511F23EB /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
184461C7D3C696D2FB05494F /* Frameworks */ = {
isa = PBXGroup;
children = (
D3CDEB1EFB17A9B91FE40511 /* Pods_Runner.framework */,
C60DE9E140E45D6F22F8E83F /* 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 */,
BA56484CD86E81A743C50A80 /* Pods */,
184461C7D3C696D2FB05494F /* Frameworks */,
);
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>";
};
BA56484CD86E81A743C50A80 /* Pods */ = {
isa = PBXGroup;
children = (
F499AFFD1643C42A1984357A /* Pods-Runner.debug.xcconfig */,
EFAC74B66E14127B5D83E1D3 /* Pods-Runner.release.xcconfig */,
D4C437A39D2380BF676CE0AF /* Pods-Runner.profile.xcconfig */,
422734D92A5B7F92C5CA61D4 /* Pods-RunnerTests.debug.xcconfig */,
C0627147FBB40A159A9ADF8D /* Pods-RunnerTests.release.xcconfig */,
62D94669F4AF3486A044DD8D /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
0DEA8A36FF2BD7F2C7B44431 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
AEF9FDC833547B3DFFA617F7 /* 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 = (
0A7776FAEDEB21EF928C4FE1 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
95D511D35537B40B02EB61F2 /* [CP] Embed Pods Frameworks */,
);
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 */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
0A7776FAEDEB21EF928C4FE1 /* [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;
};
0DEA8A36FF2BD7F2C7B44431 /* [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;
};
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";
};
95D511D35537B40B02EB61F2 /* [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;
};
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";
};
/* 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.lux.translator.translatorLux;
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 = 422734D92A5B7F92C5CA61D4 /* 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.lux.translator.translatorLux.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 = C0627147FBB40A159A9ADF8D /* 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.lux.translator.translatorLux.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 = 62D94669F4AF3486A044DD8D /* 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.lux.translator.translatorLux.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.lux.translator.translatorLux;
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.lux.translator.translatorLux;
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 */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

13
ios/Runner/AppDelegate.swift Executable file
View File

@ -0,0 +1,13 @@
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

View File

@ -0,0 +1,122 @@
{
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,23 @@
{
"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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

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

View File

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

View File

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

49
ios/Runner/Info.plist Executable file
View File

@ -0,0 +1,49 @@
<?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>Translator Lux</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>translator_lux</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>

View File

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

View File

@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

5
lib/config/config.dart Executable file
View File

@ -0,0 +1,5 @@
import 'package:camera/camera.dart';
class AppConfig{
static List<CameraDescription> cameraList=[];
}

34
lib/core/router/router.dart Executable file
View File

@ -0,0 +1,34 @@
import 'package:get/get.dart';
import 'package:translator_lux/page/main/main_view.dart';
import 'package:translator_lux/page/translator/translator_view.dart';
import 'package:translator_lux/page/translator_result/translator_result_view.dart';
import 'package:translator_lux/translator_history/translator_history_view.dart';
class GetRouter {
static String initRouterName = MainPage.routName;
static List<GetPage> routers = [
//
GetPage(
name: MainPage.routName,
page: () => MainPage(),
),
//
GetPage(
name: TranlatorPage.routName,
page: () => const TranlatorPage(),
transition: Transition.rightToLeft,
),
//
GetPage(
name: TranslatorResultPage.routName,
page: () => const TranslatorResultPage(),
transition: Transition.rightToLeft,
),
//
GetPage(
name: TranslatorHistoryPage.routName,
page: () => const TranslatorHistoryPage(),
transition: Transition.rightToLeft,
),
];
}

View File

@ -0,0 +1,143 @@
import 'package:flutter/foundation.dart';
import 'package:sqflite/sqflite.dart';
import 'package:translator_lux/entity/translator_history_entity.dart';
class TranslatorHistoryTable {
static String tableName = "translatorHistoryTable";
static Database? thDB;
static createTable(Database db) async {
await db.execute(
"CREATE TABLE $tableName (tid TEXT,sourceText TEXT,sourcecountryCode TEXT,sourcelanguageName TEXT,sourcelanguageCode TEXT,targetText TEXT,targetcountryCode TEXT,targetlanguageName TEXT,targetlanguageCode TEXT,translatorTime TEXT,isShow Text)");
await db.execute(
'CREATE INDEX translator_history_tid ON $tableName (tid)',
);
debugPrint("TranslatorHistoryTable create success");
}
static init(Database db) {
thDB = db;
}
static insertData(TranslatorHistoryEntity historyEntity) {
thDB!.insert(tableName, {
"tid": historyEntity.tid,
"sourceText": historyEntity.sourceText,
"sourcecountryCode": historyEntity.sourcecountryCode,
"sourcelanguageName": historyEntity.sourcelanguageName,
"sourcelanguageCode": historyEntity.sourcelanguageCode,
"targetText": historyEntity.targetText,
"targetcountryCode": historyEntity.targetcountryCode,
"targetlanguageName": historyEntity.targetlanguageName,
"targetlanguageCode": historyEntity.targetlanguageCode,
"translatorTime": historyEntity.translatorTime,
"isShow": historyEntity.isShow,
});
}
static Future<List<TranslatorHistoryEntity>> queryData() async {
List<TranslatorHistoryEntity> responseData = [];
List<Map<String, Object?>> result = await thDB!.query(
tableName,
);
for (var historyData in result) {
responseData.add(
TranslatorHistoryEntity(
tid: historyData["tid"].toString(),
sourceText: historyData["sourceText"].toString(),
sourcecountryCode: historyData["sourcecountryCode"].toString(),
sourcelanguageName: historyData["sourcelanguageName"].toString(),
sourcelanguageCode: historyData["sourcelanguageCode"].toString(),
targetText: historyData["targetText"].toString(),
targetcountryCode: historyData["targetcountryCode"].toString(),
targetlanguageName: historyData["targetlanguageName"].toString(),
targetlanguageCode: historyData["targetlanguageCode"].toString(),
translatorTime: historyData["translatorTime"].toString(),
isShow: historyData["isShow"].toString(),
),
);
}
return responseData;
}
static Future<List<TranslatorHistoryEntity>> queryShowData() async {
List<TranslatorHistoryEntity> responseData = [];
List<Map<String, Object?>> result = await thDB!.query(
tableName,
where: "isShow = ? ",
whereArgs: ["true"],
);
for (var historyData in result) {
responseData.add(
TranslatorHistoryEntity(
tid: historyData["tid"].toString(),
sourceText: historyData["sourceText"].toString(),
sourcecountryCode: historyData["sourcecountryCode"].toString(),
sourcelanguageName: historyData["sourcelanguageName"].toString(),
sourcelanguageCode: historyData["sourcelanguageCode"].toString(),
targetText: historyData["targetText"].toString(),
targetcountryCode: historyData["targetcountryCode"].toString(),
targetlanguageName: historyData["targetlanguageName"].toString(),
targetlanguageCode: historyData["targetlanguageCode"].toString(),
translatorTime: historyData["translatorTime"].toString(),
isShow: historyData["isShow"].toString(),
),
);
}
return responseData;
}
static Future<TranslatorHistoryEntity> queryShowDataByTid(String tid) async {
TranslatorHistoryEntity responseData = TranslatorHistoryEntity();
List<Map<String, Object?>> result = await thDB!.query(
tableName,
where: "tid = ? ",
whereArgs: [tid],
);
var historyData = result.first;
responseData.copyWith(
tid: historyData["tid"].toString(),
sourceText: historyData["sourceText"].toString(),
sourcecountryCode: historyData["sourcecountryCode"].toString(),
sourcelanguageName: historyData["sourcelanguageName"].toString(),
sourcelanguageCode: historyData["sourcelanguageCode"].toString(),
targetText: historyData["targetText"].toString(),
targetcountryCode: historyData["targetcountryCode"].toString(),
targetlanguageName: historyData["targetlanguageName"].toString(),
targetlanguageCode: historyData["targetlanguageCode"].toString(),
translatorTime: historyData["translatorTime"].toString(),
isShow: historyData["isShow"].toString(),
);
return responseData;
}
static cleanAllShowData() async {
await thDB!.update(
tableName,
{
"isShow": "false",
},
where: " isShow = ? ",
whereArgs: ["true"],
);
}
static cleanShowDataByTid(String tid) async {
await thDB!.update(
tableName,
{
"isShow": "false",
},
where: " tid = ? ",
whereArgs: [tid],
);
}
static deleteHistoryDataByTid(String tid) async {
await thDB!.delete(
tableName,
where: " tid = ? ",
whereArgs: [tid],
);
}
}

View File

@ -0,0 +1,28 @@
import 'package:flutter/foundation.dart';
import 'package:sqflite/sqflite.dart';
import 'package:translator_lux/dataBase/table/translator_history_table.dart';
class TranslatorDataBase {
static Database? thDB;
static String dataBaseName = "translator.db";
static init() async {
String path = await getDatabasesPath();
path = "$path/$dataBaseName";
debugPrint(path);
await openDatabase(
path,
version: 1,
onCreate: (db, version) async {
debugPrint("dataBase create success");
await TranslatorHistoryTable.createTable(db);
debugPrint("dataTable create success");
},
).then(
(value) {
thDB = value;
TranslatorHistoryTable.init(value);
},
);
}
}

14
lib/entity/language_entity.dart Executable file
View File

@ -0,0 +1,14 @@
class SelectLanguageItemEntity {
String countryCode;
String languageName;
String languageCode;
SelectLanguageItemEntity({
required this.countryCode,
required this.languageName,
required this.languageCode,
});
@override
String toString() =>
'SelectLanguageItemEntity(countryCode: $countryCode, languageName: $languageName, languageCode: $languageCode)';
}

View File

@ -0,0 +1,159 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';
class TranslatorHistoryEntity {
//ID
String? tid;
//
String? sourceText;
//
String? sourcecountryCode;
//
String? sourcelanguageName;
//
String? sourcelanguageCode;
//
String? targetText;
//
String? targetcountryCode;
//
String? targetlanguageName;
//
String? targetlanguageCode;
//
String? translatorTime;
//
String? isShow;
TranslatorHistoryEntity({
this.tid,
this.sourceText,
this.sourcecountryCode,
this.sourcelanguageName,
this.sourcelanguageCode,
this.targetText,
this.targetcountryCode,
this.targetlanguageName,
this.targetlanguageCode,
this.translatorTime,
this.isShow,
});
TranslatorHistoryEntity copyWith({
String? tid,
String? sourceText,
String? sourcecountryCode,
String? sourcelanguageName,
String? sourcelanguageCode,
String? targetText,
String? targetcountryCode,
String? targetlanguageName,
String? targetlanguageCode,
String? translatorTime,
String? isShow,
}) {
return TranslatorHistoryEntity(
tid: tid ?? this.tid,
sourceText: sourceText ?? this.sourceText,
sourcecountryCode: sourcecountryCode ?? this.sourcecountryCode,
sourcelanguageName: sourcelanguageName ?? this.sourcelanguageName,
sourcelanguageCode: sourcelanguageCode ?? this.sourcelanguageCode,
targetText: targetText ?? this.targetText,
targetcountryCode: targetcountryCode ?? this.targetcountryCode,
targetlanguageName: targetlanguageName ?? this.targetlanguageName,
targetlanguageCode: targetlanguageCode ?? this.targetlanguageCode,
translatorTime: translatorTime ?? this.translatorTime,
isShow: isShow ?? this.isShow,
);
}
Map<String, dynamic> toMap() {
return <String, dynamic>{
'tid': tid,
'sourceText': sourceText,
'sourcecountryCode': sourcecountryCode,
'sourcelanguageName': sourcelanguageName,
'sourcelanguageCode': sourcelanguageCode,
'targetText': targetText,
'targetcountryCode': targetcountryCode,
'targetlanguageName': targetlanguageName,
'targetlanguageCode': targetlanguageCode,
'translatorTime': translatorTime,
'isShow': isShow,
};
}
factory TranslatorHistoryEntity.fromMap(Map<String, dynamic> map) {
return TranslatorHistoryEntity(
tid: map['tid'] != null ? map['tid'] as String : null,
sourceText:
map['sourceText'] != null ? map['sourceText'] as String : null,
sourcecountryCode: map['sourcecountryCode'] != null
? map['sourcecountryCode'] as String
: null,
sourcelanguageName: map['sourcelanguageName'] != null
? map['sourcelanguageName'] as String
: null,
sourcelanguageCode: map['sourcelanguageCode'] != null
? map['sourcelanguageCode'] as String
: null,
targetText:
map['targetText'] != null ? map['targetText'] as String : null,
targetcountryCode: map['targetcountryCode'] != null
? map['targetcountryCode'] as String
: null,
targetlanguageName: map['targetlanguageName'] != null
? map['targetlanguageName'] as String
: null,
targetlanguageCode: map['targetlanguageCode'] != null
? map['targetlanguageCode'] as String
: null,
translatorTime: map['translatorTime'] != null
? map['translatorTime'] as String
: null,
isShow: map['isShow'] != null ? map['isShow'] as String : null,
);
}
String toJson() => json.encode(toMap());
factory TranslatorHistoryEntity.fromJson(String source) =>
TranslatorHistoryEntity.fromMap(
json.decode(source) as Map<String, dynamic>);
@override
String toString() {
return 'TranslatorHistoryEntity(tid: $tid, sourceText: $sourceText, sourcecountryCode: $sourcecountryCode, sourcelanguageName: $sourcelanguageName, sourcelanguageCode: $sourcelanguageCode, targetText: $targetText, targetcountryCode: $targetcountryCode, targetlanguageName: $targetlanguageName, targetlanguageCode: $targetlanguageCode, translatorTime: $translatorTime, isShow: $isShow)';
}
@override
bool operator ==(covariant TranslatorHistoryEntity other) {
if (identical(this, other)) return true;
return other.tid == tid &&
other.sourceText == sourceText &&
other.sourcecountryCode == sourcecountryCode &&
other.sourcelanguageName == sourcelanguageName &&
other.sourcelanguageCode == sourcelanguageCode &&
other.targetText == targetText &&
other.targetcountryCode == targetcountryCode &&
other.targetlanguageName == targetlanguageName &&
other.targetlanguageCode == targetlanguageCode &&
other.translatorTime == translatorTime &&
other.isShow == isShow;
}
@override
int get hashCode {
return tid.hashCode ^
sourceText.hashCode ^
sourcecountryCode.hashCode ^
sourcelanguageName.hashCode ^
sourcelanguageCode.hashCode ^
targetText.hashCode ^
targetcountryCode.hashCode ^
targetlanguageName.hashCode ^
targetlanguageCode.hashCode ^
translatorTime.hashCode ^
isShow.hashCode;
}
}

3
lib/enum/tts_enum.dart Executable file
View File

@ -0,0 +1,3 @@
enum TtsEnum{
playing, stopped, paused, continued
}

16
lib/global/global_state.dart Executable file
View File

@ -0,0 +1,16 @@
import 'package:flutter_tts/flutter_tts.dart';
import 'package:get/get.dart';
import 'package:translator_lux/enum/tts_enum.dart';
class GlobalState {
static RxString fromCountryName = "English".obs;
static RxString fromCountryCode = "us".obs;
static RxString fromLanguageCode = "en".obs;
static RxString toCountryName = "Chinese".obs;
static RxString toCountryCode = "cn".obs;
static RxString toLanguageCode = "zh-cn".obs;
static FlutterTts ttsController = FlutterTts();
static TtsEnum ttsEnum = TtsEnum.stopped;
}

38
lib/main.dart Executable file
View File

@ -0,0 +1,38 @@
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:translator_lux/config/config.dart';
import 'package:translator_lux/core/router/router.dart';
import 'package:translator_lux/dataBase/translator_data_base.dart';
import 'package:translator_lux/util/tts_util.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
AppConfig.cameraList = await availableCameras();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return GetMaterialApp(
debugShowCheckedModeBanner: false,
title: 'TranslatorLux',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
initialBinding: BindingsBuilder(() async {
debugPrint("init start");
await TtsUtil.initTts();
await TranslatorDataBase.init();
debugPrint("init success");
}),
initialRoute: GetRouter.initRouterName,
getPages: GetRouter.routers,
);
}
}

10
lib/page/main/main_logic.dart Executable file
View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'main_state.dart';
/// @description:
/// @author
/// @date: 2024-06-26 14:23:43
class MainLogic extends GetxController {
final state = MainState();
}

4
lib/page/main/main_state.dart Executable file
View File

@ -0,0 +1,4 @@
/// @description:
/// @author
/// @date: 2024-06-26 14:23:43
class MainState {}

386
lib/page/main/main_view.dart Executable file
View File

@ -0,0 +1,386 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:translator_lux/page/translator/translator_view.dart';
import 'package:translator_lux/translator_history/translator_history_view.dart';
import 'package:translator_lux/widget/camera_widget.dart';
import 'package:translator_lux/util/image_asset.dart';
import 'package:translator_lux/util/svg_asset.dart';
import 'package:translator_lux/util/tts_util.dart';
import 'package:translator_lux/widget/tranlator_from_to.dart';
import 'main_logic.dart';
import 'main_state.dart';
/// @description:
/// @author : lifu
/// @date: 2024-06-26 14:23:43
class MainPage extends StatelessWidget {
static String routName = "/mainPage";
final MainLogic logic = Get.put(MainLogic());
final MainState state = Get.find<MainLogic>().state;
MainPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// floatingActionButton: FloatingActionButton(onPressed: () async {
// // await TranslatorHistoryTable.cleanShowData();
// // List<TranslatorHistoryEntity> queryShowData =
// // await TranslatorHistoryTable.queryShowData();
// // for (var element in queryShowData) {
// // debugPrint(element.toString());
// // }
// // TranslatorHistoryTable.queryData();
// // TranslatorHistoryTable.cleanShowDataByTid(
// // "e1916380-09db-1055-a599-9dcbcefb47d8");
// // TranslatorHistoryTable.deleteHistoryDataByTid(
// // "e1916380-09db-1055-a599-9dcbcefb47d8");
// }),
body: Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
ImageAsset.homeBackground,
),
fit: BoxFit.cover,
)),
child: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Courses",
style:
TextStyle(fontSize: 24, fontWeight: FontWeight.w700),
),
Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: const Color(0xff4ECA8C),
borderRadius: BorderRadius.circular(16)),
child: SvgPicture.asset(
SvgAsset.homeMore,
fit: BoxFit.contain,
),
)
],
),
),
Stack(
children: [
Column(
children: [
Container(
height: 40,
),
Container(
height: 233,
decoration: BoxDecoration(
border: Border.all(
width: 1.5, color: const Color(0xff3AAA72)),
color: const Color.fromARGB(213, 78, 202, 140),
borderRadius: BorderRadius.circular(20)),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
width: 130,
height: 50,
child: Row(
children: [
const Text(
"Daily Quote",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.white),
),
Padding(
padding: const EdgeInsets.only(left: 5),
child: SvgPicture.asset(SvgAsset.homeRightIcon),
)
],
),
),
Image.asset(
ImageAsset.rabbitSayGood,
width: 90,
height: 90,
),
],
),
Column(
children: [
const SizedBox(
height: 83,
),
Container(
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
border: Border.all(
width: 1.5, color: const Color(0xff3AAA72)),
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
height: 190,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"English",
style: TextStyle(color: Colors.grey),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"Let's discuss this later.",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
GestureDetector(
onTap: () {
TtsUtil.translatorTtsPlay(
"Let's discuss this later.",
);
},
child: Container(
width: 24,
height: 24,
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
color: const Color.fromARGB(
78, 78, 202, 140),
borderRadius:
BorderRadius.circular(12)),
child: SvgPicture.asset(
SvgAsset.speaker,
),
),
),
],
),
const Divider(
height: 1,
),
const Text(
"Chinese",
style: TextStyle(color: Colors.grey),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"我们稍后再讨论这个",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
GestureDetector(
onTap: () {
TtsUtil.translatorTtsPlay("我们稍后再讨论这个");
},
child: Container(
width: 24,
height: 24,
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
color: const Color.fromARGB(
78, 78, 202, 140),
borderRadius:
BorderRadius.circular(12)),
child: SvgPicture.asset(
SvgAsset.speaker,
),
),
),
],
),
],
),
)
],
)
],
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
children: [
GestureDetector(
onTap: () {
Get.to(() => const CameraPage());
},
child: Container(
width: 72,
height: 72,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xffD2FFFB),
borderRadius: BorderRadius.circular(36)),
child: Image.asset(
ImageAsset.photo,
),
),
),
const Padding(
padding: EdgeInsets.only(top: 10),
child: Text(
"Photo",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
)
],
),
Column(
children: [
Container(
width: 72,
height: 72,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xffE1E2FE),
borderRadius: BorderRadius.circular(36)),
child: Image.asset(
ImageAsset.dialog,
),
),
const Padding(
padding: EdgeInsets.only(top: 10),
child: Text(
"Dialog",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
)
],
),
Column(
children: [
GestureDetector(
onTap: () {
Get.toNamed(TranslatorHistoryPage.routName);
},
child: Container(
width: 72,
height: 72,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xffFEE5C5),
borderRadius: BorderRadius.circular(36)),
child: Image.asset(
ImageAsset.history,
),
),
),
const Padding(
padding: EdgeInsets.only(top: 10),
child: Text(
"History",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
)
],
),
],
),
Column(
children: [
GestureDetector(
onTap: () {
Get.toNamed(TranlatorPage.routName);
},
child: Container(
height: 80,
alignment: Alignment.center,
decoration: BoxDecoration(
color: const Color.fromARGB(213, 69, 168, 254),
borderRadius: BorderRadius.circular(16),
border: Border.all(
width: 1.5,
color: const Color(0xff0087FF),
),
),
child: Row(
children: [
const Expanded(
child: Padding(
padding: EdgeInsets.only(left: 22),
child: Text(
"Type to Translate",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w400,
color: Colors.white,
),
),
),
),
Padding(
padding: const EdgeInsets.only(right: 10),
child: Container(
height: 36,
width: 36,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: const Color(0xff8BCFFE),
borderRadius: BorderRadius.circular(18),
),
child: SvgPicture.asset(SvgAsset.homeVoice),
),
)
],
),
),
),
const SizedBox(
height: 50,
),
const TranslatorFromTo()
],
),
],
)),
],
),
)),
),
);
}
}

View File

@ -0,0 +1,48 @@
import 'package:flutter/foundation.dart';
import 'package:get/get.dart';
import 'package:translator_lux/dataBase/table/translator_history_table.dart';
import 'package:translator_lux/entity/translator_history_entity.dart';
import 'package:translator_lux/page/translator_result/translator_result_view.dart';
import 'translator_state.dart';
/// @description:
/// @author
/// @date: 2024-06-27 13:55:27
class TranslatorLogic extends GetxController {
final state = TranslatorState();
@override
onInit() {
super.onInit();
initData();
debugPrint("进来了");
}
@override
dispose() {
super.dispose();
state.historyShowData.clear();
}
initData() async {
List<TranslatorHistoryEntity> queryShowData =
await TranslatorHistoryTable.queryShowData();
state.historyShowData.addAll(queryShowData);
if (state.historyShowData.isNotEmpty) {
state.isThereData.value = true;
}
}
toResult(String value) {
Get.toNamed(
TranslatorResultPage.routName,
arguments: {"translateString": value},
);
}
cleanAllHistory() {
TranslatorHistoryTable.cleanAllShowData();
state.isThereData.value = false;
}
}

View File

@ -0,0 +1,14 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:translator_lux/entity/translator_history_entity.dart';
/// @description:
/// @author
/// @date: 2024-06-27 13:55:27
class TranslatorState {
TextEditingController textController = TextEditingController();
RxBool isValue = false.obs;
RxList<TranslatorHistoryEntity> historyShowData =
<TranslatorHistoryEntity>[].obs;
RxBool isThereData = false.obs;
}

View File

@ -0,0 +1,217 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:translator_lux/util/image_asset.dart';
import 'package:translator_lux/util/svg_asset.dart';
import 'package:translator_lux/widget/tranlator_from_to.dart';
import 'translator_logic.dart';
import 'translator_state.dart';
/// @description:
/// @lifu
/// @date: 2024-06-27 13:55:27
class TranlatorPage extends StatefulWidget {
const TranlatorPage({super.key});
static String routName = "/translate";
@override
State<TranlatorPage> createState() => _TranlatorPageState();
}
class _TranlatorPageState extends State<TranlatorPage> {
final TranslatorLogic logic = Get.put(TranslatorLogic());
final TranslatorState state = Get.find<TranslatorLogic>().state;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
surfaceTintColor: Colors.transparent,
automaticallyImplyLeading: false,
title: Row(
children: [
IconButton(
onPressed: () {
Get.back();
},
icon: const Icon(
Icons.arrow_back_ios,
),
),
const Expanded(child: TranslatorFromTo()),
],
),
),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: const BoxConstraints(
maxHeight: 200.0,
minHeight: 76.0,
),
decoration: BoxDecoration(
border:
Border.all(width: 1.5, color: const Color(0xff0087FF)),
color: const Color(0xff45A7FE),
borderRadius: const BorderRadius.all(Radius.circular(10))),
padding: const EdgeInsets.only(
left: 16.0, right: 16.0, top: 10.0, bottom: 4.0),
child: TextField(
textInputAction: TextInputAction.done,
controller: state.textController,
style: const TextStyle(
color: Colors.black,
fontSize: 20,
fontWeight: FontWeight.w400,
),
maxLines: null,
autofocus: true,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Type to Translate",
hintStyle: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400,
),
suffixIcon: Obx(
() => GestureDetector(
onTap: () {
if (state.isValue.value) {
state.textController.text = "";
state.isValue.value = !state.isValue.value;
} else {}
},
child: Container(
height: 36,
width: 36,
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: const Color(0xff8BCFFE),
borderRadius: BorderRadius.circular(25),
),
child: state.isValue.value
? const Icon(Icons.close)
: SvgPicture.asset(SvgAsset.homeVoice),
),
),
),
),
onChanged: (value) {
if (value != "" && value.isNotEmpty) {
state.isValue.value = true;
} else {
state.isValue.value = false;
}
},
onSubmitted: (value) {
if (value != "" && value.isNotEmpty) {
logic.toResult(value);
}
},
),
),
Obx(() => state.isThereData.value
? Expanded(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
"History",
style: TextStyle(
fontSize: 16,
color: Color(
0xff979797,
),
fontWeight: FontWeight.w500,
),
),
IconButton(
onPressed: () {
logic.cleanAllHistory();
},
icon: Image.asset(
ImageAsset.deleteIcon,
width: 24,
height: 24,
),
)
],
),
const SizedBox(
height: 10,
),
Expanded(
child: ListView.builder(
padding: EdgeInsets.zero,
itemBuilder: (context, index) {
return ListTile(
title: RichText(
overflow: TextOverflow.ellipsis,
text: TextSpan(
children: [
TextSpan(
text: state
.historyShowData[index].sourceText!,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: Colors.black,
),
),
const WidgetSpan(
child: SizedBox(
width: 6,
)),
TextSpan(
text: state
.historyShowData[index].targetText!,
style: const TextStyle(
color: Color(0xff979797),
fontSize: 13,
fontWeight: FontWeight.w400,
),
),
],
),
),
onTap: () {
state.textController.text =
state.historyShowData[index].sourceText!;
state.isValue.value = true;
},
);
},
itemCount: state.historyShowData.length,
),
),
],
),
)
: Expanded(
child: Center(
child: Image.asset(
ImageAsset.rabbitSayGood,
width: 100,
height: 100,
),
),
)),
],
),
)),
);
}
}

View File

@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:translator/translator.dart';
import 'package:translator_lux/dataBase/table/translator_history_table.dart';
import 'package:translator_lux/entity/translator_history_entity.dart';
import 'package:translator_lux/global/global_state.dart';
import 'package:uuid/uuid.dart';
import 'translator_result_state.dart';
/// @description:
/// @author
/// @date: 2024-06-27 16:53:29
class TranslatorResultPageLogic extends GetxController {
final state = TranslatorResultPageState();
@override
void onInit() {
super.onInit();
translation();
}
translation() async {
if (state.sourceText.value == "" && state.targetText.value == "") {
var arguments = Get.arguments;
var translator = GoogleTranslator();
debugPrint(
"arguments[\"translateString\"]参数有${arguments["translateString"]}");
debugPrint(
"GlobalState.fromLanguageCode.value参数有${GlobalState.fromLanguageCode.value}");
debugPrint(
"GlobalState.toLanguageCode.value参数有${GlobalState.toLanguageCode.value}");
Translation translate = await translator.translate(
arguments["translateString"],
from: GlobalState.fromLanguageCode.value,
to: GlobalState.toLanguageCode.value,
);
state.sourceText.value = translate.source;
state.targetText.value = translate.text;
debugPrint(translate.toString());
addHistory(
sourceText: translate.source,
targetText: translate.text,
);
update();
}
}
addHistory({required String sourceText, required String targetText}) {
var historyEntity = TranslatorHistoryEntity().copyWith(
tid: const Uuid().v1(),
sourceText: sourceText,
sourcecountryCode: GlobalState.fromCountryCode.value,
sourcelanguageName: GlobalState.fromCountryName.value,
sourcelanguageCode: GlobalState.fromLanguageCode.value,
targetText: targetText,
targetcountryCode: GlobalState.toCountryCode.value,
targetlanguageName: GlobalState.toCountryName.value,
targetlanguageCode: GlobalState.toLanguageCode.value,
translatorTime: DateTime.now().toString(),
isShow: "true",
);
TranslatorHistoryTable.insertData(historyEntity);
}
}

View File

@ -0,0 +1,9 @@
import 'package:get/get_rx/src/rx_types/rx_types.dart';
/// @description:
/// @author
/// @date: 2024-06-27 16:53:29
class TranslatorResultPageState {
RxString sourceText = "".obs;
RxString targetText = "".obs;
}

View File

@ -0,0 +1,255 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:translator_lux/page/translator_result/translator_result_logic.dart';
import 'package:translator_lux/page/translator_result/translator_result_state.dart';
import 'package:translator_lux/util/image_asset.dart';
import 'package:translator_lux/util/svg_asset.dart';
import 'package:translator_lux/util/tts_util.dart';
import 'package:translator_lux/widget/tranlator_from_to.dart';
import 'package:translator_lux/widget/translate_text_full_screen_page.dart';
/// @description:
/// @author
/// @date: 2024-06-27 16:53:29
class TranslatorResultPage extends StatefulWidget {
static String routName = "/translateResult";
const TranslatorResultPage({super.key});
@override
State<TranslatorResultPage> createState() => _TranslatorResultPageState();
}
class _TranslatorResultPageState extends State<TranslatorResultPage> {
final TranslatorResultPageLogic logic = Get.put(TranslatorResultPageLogic());
final TranslatorResultPageState state =
Get.find<TranslatorResultPageLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: double.infinity,
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(ImageAsset.translatorResultBackground),
),
),
child: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Column(
children: [
Row(
children: [
IconButton(
onPressed: () {
Get.back();
},
icon: const Icon(
Icons.arrow_back_ios,
),
),
const Expanded(child: TranslatorFromTo()),
],
),
Expanded(
child: ListView(
children: [
Obx(
() => Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
state.sourceText.value,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
),
GestureDetector(
onTap: () {
Get.back();
},
child: Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: const Color(0xffF4F4F6),
borderRadius:
BorderRadius.circular(15)),
child: const Icon(
Icons.close,
size: 20,
),
),
)
],
),
),
const SizedBox(
height: 30,
),
GestureDetector(
onTap: () {
if (state.sourceText.value != "") {
TtsUtil.translatorTtsPlay(
state.sourceText.value);
}
},
child: Container(
width: 32,
height: 32,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color:
const Color.fromARGB(104, 78, 202, 140),
),
child: SvgPicture.asset(
SvgAsset.speaker,
),
),
),
const SizedBox(
height: 30,
),
const Divider(
height: 1,
)
],
),
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: EdgeInsets.symmetric(vertical: 20),
child: Text(
"Spanish",
style: TextStyle(
color: Color(0xff949494),
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
Obx(
() => Text(
state.targetText.value,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
),
const SizedBox(
height: 20,
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: GestureDetector(
onTap: () {
if (state.targetText.value != "") {
TtsUtil.translatorTtsPlay(
state.targetText.value);
}
},
child: Container(
width: 32,
height: 32,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: const Color.fromARGB(
104, 78, 202, 140),
),
child: SvgPicture.asset(
SvgAsset.speaker,
),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: GestureDetector(
onTap: () {
if (state.targetText.value != "") {
Clipboard.setData(
ClipboardData(
text: state.targetText.value),
);
}
},
child: Container(
width: 32,
height: 32,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: const Color(0xffF4F4F6),
),
child: Image.asset(ImageAsset.copy),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: GestureDetector(
onTap: () {
Get.to(
() =>
const TranslateTextFullScreenPage(),
arguments: {
"data": state.targetText.value
});
},
child: Container(
width: 32,
height: 32,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: const Color(0xffF4F4F6),
),
child: Image.asset(ImageAsset.fullScreen),
),
),
),
],
)
],
),
),
const SizedBox(
height: 50,
),
],
))
],
),
),
),
),
);
}
}

10
lib/temp/temp_logic.dart Executable file
View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'temp_state.dart';
/// @description:
/// @author
/// @date: 2024-06-27 10:17:16
class TempLogic extends GetxController {
final state = TempState();
}

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