diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/app/.metadata similarity index 100% rename from .metadata rename to app/.metadata diff --git a/LICENSE b/app/LICENSE similarity index 100% rename from LICENSE rename to app/LICENSE diff --git a/NOTICE.txt b/app/NOTICE.txt similarity index 95% rename from NOTICE.txt rename to app/NOTICE.txt index 1597771..cc7bc73 100644 --- a/NOTICE.txt +++ b/app/NOTICE.txt @@ -8,6 +8,7 @@ in whole or part of, in any medium, except as required for reasonable and custom and reproducing the content of the NOTICE and DOCUMENTATION files. Any use or displaying shall constitute an infringement under intellectual property laws of France and international conventions. +ouds-flutter/app/assets/ic_palette.png ouds-flutter/app/assets/ic_about.svg ouds-flutter/app/assets/ic_atom.svg ouds-flutter/app/assets/ic_token.svg diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..e734d3e --- /dev/null +++ b/app/README.md @@ -0,0 +1,16 @@ +# ouds_flutter + +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. diff --git a/analysis_options.yaml b/app/analysis_options.yaml similarity index 100% rename from analysis_options.yaml rename to app/analysis_options.yaml diff --git a/android/.gitignore b/app/android/.gitignore similarity index 100% rename from android/.gitignore rename to app/android/.gitignore diff --git a/android/app/build.gradle b/app/android/app/build.gradle similarity index 100% rename from android/app/build.gradle rename to app/android/app/build.gradle diff --git a/android/app/src/debug/AndroidManifest.xml b/app/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to app/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to app/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/orange/ouds/ouds_flutter/MainActivity.kt b/app/android/app/src/main/kotlin/com/orange/ouds/ouds_flutter/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/orange/ouds/ouds_flutter/MainActivity.kt rename to app/android/app/src/main/kotlin/com/orange/ouds/ouds_flutter/MainActivity.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/app/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to app/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/app/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to app/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/app/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to app/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/styles.xml b/app/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to app/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/app/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to app/android/app/src/profile/AndroidManifest.xml diff --git a/android/build.gradle b/app/android/build.gradle similarity index 87% rename from android/build.gradle rename to app/android/build.gradle index a758e0b..d2ffbff 100644 --- a/android/build.gradle +++ b/app/android/build.gradle @@ -10,7 +10,7 @@ subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(":lib") + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/android/gradle.properties b/app/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to app/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/app/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to app/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle b/app/android/settings.gradle similarity index 97% rename from android/settings.gradle rename to app/android/settings.gradle index a24c488..b9e43bd 100644 --- a/android/settings.gradle +++ b/app/android/settings.gradle @@ -22,4 +22,4 @@ plugins { id "org.jetbrains.kotlin.android" version "1.8.22" apply false } -include ":lib" +include ":app" diff --git a/assets/about_legal_information.md b/app/assets/about_legal_information.md similarity index 100% rename from assets/about_legal_information.md rename to app/assets/about_legal_information.md diff --git a/assets/about_privacy_policy.md b/app/assets/about_privacy_policy.md similarity index 100% rename from assets/about_privacy_policy.md rename to app/assets/about_privacy_policy.md diff --git a/assets/ic_about.svg b/app/assets/ic_about.svg similarity index 100% rename from assets/ic_about.svg rename to app/assets/ic_about.svg diff --git a/assets/ic_atom.svg b/app/assets/ic_atom.svg similarity index 100% rename from assets/ic_atom.svg rename to app/assets/ic_atom.svg diff --git a/app/assets/ic_palette.png b/app/assets/ic_palette.png new file mode 100644 index 0000000..90f91bf Binary files /dev/null and b/app/assets/ic_palette.png differ diff --git a/assets/ic_token.svg b/app/assets/ic_token.svg similarity index 100% rename from assets/ic_token.svg rename to app/assets/ic_token.svg diff --git a/ios/.gitignore b/app/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to app/ios/.gitignore diff --git a/ios/Flutter/AppFrameworkInfo.plist b/app/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from ios/Flutter/AppFrameworkInfo.plist rename to app/ios/Flutter/AppFrameworkInfo.plist diff --git a/ios/Flutter/Debug.xcconfig b/app/ios/Flutter/Debug.xcconfig similarity index 100% rename from ios/Flutter/Debug.xcconfig rename to app/ios/Flutter/Debug.xcconfig diff --git a/ios/Flutter/Release.xcconfig b/app/ios/Flutter/Release.xcconfig similarity index 100% rename from ios/Flutter/Release.xcconfig rename to app/ios/Flutter/Release.xcconfig diff --git a/ios/Podfile b/app/ios/Podfile similarity index 100% rename from ios/Podfile rename to app/ios/Podfile diff --git a/ios/Podfile.lock b/app/ios/Podfile.lock similarity index 100% rename from ios/Podfile.lock rename to app/ios/Podfile.lock diff --git a/ios/Runner.xcodeproj/project.pbxproj b/app/ios/Runner.xcodeproj/project.pbxproj similarity index 92% rename from ios/Runner.xcodeproj/project.pbxproj rename to app/ios/Runner.xcodeproj/project.pbxproj index 8f9aab4..7224182 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/app/ios/Runner.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ - 05EFBE2E8ADE5FBF1A5678B4 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0EE8209E7B21F5C1E45E74E /* Pods_Runner.framework */; }; 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 */; }; + 5A44E8ECFCF4F27BC28C4B17 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87CC41AE268C12CBD426DC31 /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 782CB44CA6B55B82E6754E7B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 596FC8CF7A37EE3FA9A45081 /* Pods_RunnerTests.framework */; }; + 8F468F7EC756A6555B4C3F50 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB62A07DA5B7E596872FE6C6 /* Pods_RunnerTests.framework */; }; 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 */; }; @@ -42,20 +42,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0F887D0229B99A16B73264BD /* 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 = ""; }; - 112F3F67847371BDA242E114 /* 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 = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2372D76484D610386E57988A /* 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 = ""; }; - 2B1BAF3F50F8983BBA2670B2 /* 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 = ""; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 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 = ""; }; - 596FC8CF7A37EE3FA9A45081 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 582EF378CAC9C702F844608F /* 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 = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7868BE57224F7335651D50FE /* 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 87CC41AE268C12CBD426DC31 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8973CA4A6C4DA7748FD78578 /* 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 = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -63,24 +60,27 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D0EE8209E7B21F5C1E45E74E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EAAC084C0C7164FDEEA2D54A /* 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 = ""; }; + AA2ED6625C7E8BE179377A6D /* 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 = ""; }; + AB62A07DA5B7E596872FE6C6 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AD433270207FD1047CE8B659 /* 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 = ""; }; + B19EF198B0310EB3348623EF /* 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 = ""; }; + F3E15D8155217568A2B29382 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { + 2C1EC5C92A0CFC85D6259EF4 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 05EFBE2E8ADE5FBF1A5678B4 /* Pods_Runner.framework in Frameworks */, + 8F468F7EC756A6555B4C3F50 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - EEA0B8C414563C997A0B5A40 /* Frameworks */ = { + 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 782CB44CA6B55B82E6754E7B /* Pods_RunnerTests.framework in Frameworks */, + 5A44E8ECFCF4F27BC28C4B17 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -95,11 +95,11 @@ path = RunnerTests; sourceTree = ""; }; - 37F7051BB475817325CC4C2A /* Frameworks */ = { + 50172E6E988888445F908869 /* Frameworks */ = { isa = PBXGroup; children = ( - D0EE8209E7B21F5C1E45E74E /* Pods_Runner.framework */, - 596FC8CF7A37EE3FA9A45081 /* Pods_RunnerTests.framework */, + 87CC41AE268C12CBD426DC31 /* Pods_Runner.framework */, + AB62A07DA5B7E596872FE6C6 /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -122,8 +122,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, - C4D1E2B74FF6DA1220DBCFB6 /* Pods */, - 37F7051BB475817325CC4C2A /* Frameworks */, + FCEF5BE5C05081C0636411FB /* Pods */, + 50172E6E988888445F908869 /* Frameworks */, ); sourceTree = ""; }; @@ -151,15 +151,15 @@ path = Runner; sourceTree = ""; }; - C4D1E2B74FF6DA1220DBCFB6 /* Pods */ = { + FCEF5BE5C05081C0636411FB /* Pods */ = { isa = PBXGroup; children = ( - 2B1BAF3F50F8983BBA2670B2 /* Pods-Runner.debug.xcconfig */, - 7868BE57224F7335651D50FE /* Pods-Runner.release.xcconfig */, - 0F887D0229B99A16B73264BD /* Pods-Runner.profile.xcconfig */, - EAAC084C0C7164FDEEA2D54A /* Pods-RunnerTests.debug.xcconfig */, - 112F3F67847371BDA242E114 /* Pods-RunnerTests.release.xcconfig */, - 2372D76484D610386E57988A /* Pods-RunnerTests.profile.xcconfig */, + AA2ED6625C7E8BE179377A6D /* Pods-Runner.debug.xcconfig */, + B19EF198B0310EB3348623EF /* Pods-Runner.release.xcconfig */, + F3E15D8155217568A2B29382 /* Pods-Runner.profile.xcconfig */, + 582EF378CAC9C702F844608F /* Pods-RunnerTests.debug.xcconfig */, + AD433270207FD1047CE8B659 /* Pods-RunnerTests.release.xcconfig */, + 8973CA4A6C4DA7748FD78578 /* Pods-RunnerTests.profile.xcconfig */, ); name = Pods; path = Pods; @@ -172,10 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - 66059D719456DFE03DB05EB9 /* [CP] Check Pods Manifest.lock */, + 87660EF87E36028D340FA3A0 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, - EEA0B8C414563C997A0B5A40 /* Frameworks */, + 2C1EC5C92A0CFC85D6259EF4 /* Frameworks */, ); buildRules = ( ); @@ -191,14 +191,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 795A19CC7BCC88AE4425F02D /* [CP] Check Pods Manifest.lock */, + 4DD6FE225BF4BCCFC56B2AD7 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 0E55C0F5BF30E8CDB24A8BC6 /* [CP] Embed Pods Frameworks */, + 9E66D6F5D4F9230D3AA340FF /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -270,23 +270,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0E55C0F5BF30E8CDB24A8BC6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -303,7 +286,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 66059D719456DFE03DB05EB9 /* [CP] Check Pods Manifest.lock */ = { + 4DD6FE225BF4BCCFC56B2AD7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -318,14 +301,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "$(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; }; - 795A19CC7BCC88AE4425F02D /* [CP] Check Pods Manifest.lock */ = { + 87660EF87E36028D340FA3A0 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -340,7 +323,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -362,6 +345,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 9E66D6F5D4F9230D3AA340FF /* [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; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -488,7 +488,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EAAC084C0C7164FDEEA2D54A /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = 582EF378CAC9C702F844608F /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -506,7 +506,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 112F3F67847371BDA242E114 /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = AD433270207FD1047CE8B659 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -522,7 +522,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2372D76484D610386E57988A /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 8973CA4A6C4DA7748FD78578 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/app/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcworkspace/contents.xcworkspacedata rename to app/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner/AppDelegate.swift b/app/ios/Runner/AppDelegate.swift similarity index 100% rename from ios/Runner/AppDelegate.swift rename to app/ios/Runner/AppDelegate.swift diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/app/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to app/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/ios/Runner/Base.lproj/Main.storyboard b/app/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to app/ios/Runner/Base.lproj/Main.storyboard diff --git a/ios/Runner/Info.plist b/app/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to app/ios/Runner/Info.plist diff --git a/ios/Runner/Runner-Bridging-Header.h b/app/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from ios/Runner/Runner-Bridging-Header.h rename to app/ios/Runner/Runner-Bridging-Header.h diff --git a/ios/RunnerTests/RunnerTests.swift b/app/ios/RunnerTests/RunnerTests.swift similarity index 100% rename from ios/RunnerTests/RunnerTests.swift rename to app/ios/RunnerTests/RunnerTests.swift diff --git a/l10n.yaml b/app/l10n.yaml similarity index 100% rename from l10n.yaml rename to app/l10n.yaml diff --git a/lib/l10n/ouds_flutter_en.arb b/app/lib/l10n/ouds_flutter_en.arb similarity index 100% rename from lib/l10n/ouds_flutter_en.arb rename to app/lib/l10n/ouds_flutter_en.arb diff --git a/app/lib/main.dart b/app/lib/main.dart new file mode 100644 index 0000000..91f61e0 --- /dev/null +++ b/app/lib/main.dart @@ -0,0 +1,66 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables + +import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/ouds_flutter_app_localizations.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:get/get_navigation/src/root/get_material_app.dart'; +import 'package:ouds_flutter_demo/ui/main_screen.dart'; +import 'package:ouds_flutter_demo/ui/theme/theme_controller.dart'; +import 'package:provider/provider.dart'; + +void main() { + runApp(OudsApplication()); +} + +class OudsApplication extends StatefulWidget { + const OudsApplication({super.key}); + + @override + State createState() => _OudsApplicationState(); +} + +class _OudsApplicationState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (_) => ThemeController(), + child: Consumer( + builder: (context, themeController, child) { + return GetMaterialApp( + title: 'OudsPlayground - Flutter', + debugShowCheckedModeBanner: false, + theme: themeController.currentTheme, + darkTheme: themeController.currentDarkTheme, + themeMode: ThemeMode.system, + home: MainScreen(), + // Localization setup + supportedLocales: AppLocalizations.supportedLocales, + localizationsDelegates: [ + AppLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + ); + }, + ), + ); + } +} diff --git a/app/lib/main_app_bar.dart b/app/lib/main_app_bar.dart new file mode 100644 index 0000000..6229bf5 --- /dev/null +++ b/app/lib/main_app_bar.dart @@ -0,0 +1,39 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; +import 'package:ouds_flutter_demo/ui/theme/theme_selector.dart'; + +class MainAppBar extends StatelessWidget implements PreferredSizeWidget { + final String title; + final bool showBackButton; + + const MainAppBar({ + super.key, + required this.title, + this.showBackButton = false, + }); + + @override + Widget build(BuildContext context) { + return AppBar( + title: Text(title), + leading: showBackButton ? const BackButton() : null, + actions: const [ + ThemeSelector(), + ], + ); + } + + @override + Size get preferredSize => const Size.fromHeight(kToolbarHeight); +} diff --git a/lib/ui/about/about_screen.dart b/app/lib/ui/about/about_screen.dart similarity index 96% rename from lib/ui/about/about_screen.dart rename to app/lib/ui/about/about_screen.dart index 0435d1c..8fe0f1d 100644 --- a/lib/ui/about/about_screen.dart +++ b/app/lib/ui/about/about_screen.dart @@ -13,7 +13,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/ouds_flutter_app_localizations.dart'; import 'package:get/get.dart'; -import 'package:ouds_flutter/ui/about/detail/about_file_screen.dart'; +import 'package:ouds_flutter_demo/ui/about/detail/about_file_screen.dart'; class AboutScreen extends StatefulWidget { const AboutScreen({super.key}); diff --git a/lib/ui/about/detail/about_file_screen.dart b/app/lib/ui/about/detail/about_file_screen.dart similarity index 98% rename from lib/ui/about/detail/about_file_screen.dart rename to app/lib/ui/about/detail/about_file_screen.dart index e7dfd2a..e0e0c27 100644 --- a/lib/ui/about/detail/about_file_screen.dart +++ b/app/lib/ui/about/detail/about_file_screen.dart @@ -17,6 +17,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:markdown/markdown.dart' as md; +import 'package:ouds_flutter_demo/main_app_bar.dart'; import 'package:path/path.dart' as path; import 'package:webview_flutter/webview_flutter.dart'; @@ -38,10 +39,7 @@ class AboutFileScreen extends StatelessWidget { const verticalPadding = 13.0; return Scaffold( - appBar: AppBar( - title: Text(title), - leading: const BackButton(), - ), + appBar: MainAppBar(title: title, showBackButton: true), body: SafeArea( child: FutureBuilder( future: _loadFileData(), diff --git a/lib/ui/components/components_screen.dart b/app/lib/ui/components/components_screen.dart similarity index 100% rename from lib/ui/components/components_screen.dart rename to app/lib/ui/components/components_screen.dart diff --git a/app/lib/ui/main_screen.dart b/app/lib/ui/main_screen.dart new file mode 100644 index 0000000..7cfa773 --- /dev/null +++ b/app/lib/ui/main_screen.dart @@ -0,0 +1,71 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; +import 'package:ouds_flutter_demo/main_app_bar.dart'; +import 'package:ouds_flutter_demo/ui/utilities/navigation_items.dart'; + +class MainScreen extends StatefulWidget { + const MainScreen({super.key}); + + @override + State createState() => _MainScreenState(); +} + +class _MainScreenState extends State { + int _selectedIndex = 0; + NavigationItems get _navigationItems => NavigationItems(context); + + @override + Widget build(BuildContext context) { + var selectedItem = _navigationItems.getSelectedMenuItem(_selectedIndex); + + return Scaffold( + appBar: MainAppBar(title: selectedItem.label), + bottomNavigationBar: _buildBottomNavigationBar(), + body: Row( + children: [ + if (MediaQuery.of(context).size.width >= 640) _buildNavigationRail(), + Expanded( + child: _navigationItems.getScreens(_selectedIndex), + ), + ], + ), + ); + } + + Widget _buildBottomNavigationBar() { + return MediaQuery.of(context).size.width < 640 + ? NavigationBar( + selectedIndex: _selectedIndex, + onDestinationSelected: (int index) { + setState(() { + _selectedIndex = index; + }); + }, + destinations: _navigationItems.getBottomNavigationBarItems(), + ) + : const SizedBox.shrink(); + } + + Widget _buildNavigationRail() { + return NavigationRail( + selectedIndex: _selectedIndex, + onDestinationSelected: (int index) { + setState(() { + _selectedIndex = index; + }); + }, + destinations: _navigationItems.getNavigationRailDestinations(), + ); + } +} diff --git a/app/lib/ui/theme/theme_controller.dart b/app/lib/ui/theme/theme_controller.dart new file mode 100644 index 0000000..1e1fcd4 --- /dev/null +++ b/app/lib/ui/theme/theme_controller.dart @@ -0,0 +1,37 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; +import 'package:ouds_flutter/core/ouds_theme.dart'; + +class ThemeController extends ChangeNotifier { + bool _isOrangeTheme = true; + + bool get isOrangeTheme => _isOrangeTheme; + + void setTheme(bool isOrange) { + _isOrangeTheme = isOrange; + notifyListeners(); + } + + ThemeData get currentTheme { + return _isOrangeTheme + ? OudsTheme.orangeThemeLight + : OudsTheme.inverseThemeLight; + } + + ThemeData get currentDarkTheme { + return _isOrangeTheme + ? OudsTheme.orangeThemeDark + : OudsTheme.inverseThemeDark; + } +} diff --git a/app/lib/ui/theme/theme_selector.dart b/app/lib/ui/theme/theme_selector.dart new file mode 100644 index 0000000..4dc051c --- /dev/null +++ b/app/lib/ui/theme/theme_selector.dart @@ -0,0 +1,73 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; +import 'package:ouds_flutter_demo/ui/theme/theme_controller.dart'; +import 'package:provider/provider.dart'; + +class ThemeSelector extends StatelessWidget { + const ThemeSelector({super.key}); + + @override + Widget build(BuildContext context) { + final currentTheme = Provider.of(context).isOrangeTheme; + + return PopupMenuButton( + icon: Image.asset( + 'assets/ic_palette.png', + width: 25, + height: 25, + ), + onSelected: (String selectedValue) { + if (selectedValue == 'Orange') { + Provider.of(context, listen: false).setTheme(true); + } else if (selectedValue == 'Inverse') { + Provider.of(context, listen: false).setTheme(false); + } + }, + itemBuilder: (BuildContext context) { + return [ + // Menu Orange + PopupMenuItem( + value: 'Orange', + child: Row( + children: [ + if (currentTheme) + const Icon( + Icons.check, + size: 20, + ), + const SizedBox(width: 10), + const Text('Orange'), + ], + ), + ), + // Menu Inverse + PopupMenuItem( + value: 'Inverse', + child: Row( + children: [ + if (!currentTheme) + const Icon( + Icons.check, + size: 20, + ), + const SizedBox(width: 10), + const Text('Inverse'), + ], + ), + ), + ]; + }, + ); + } +} diff --git a/lib/ui/tokens/token_screen.dart b/app/lib/ui/tokens/token_screen.dart similarity index 100% rename from lib/ui/tokens/token_screen.dart rename to app/lib/ui/tokens/token_screen.dart diff --git a/lib/ui/utilities/navigation_items.dart b/app/lib/ui/utilities/navigation_items.dart similarity index 69% rename from lib/ui/utilities/navigation_items.dart rename to app/lib/ui/utilities/navigation_items.dart index 82d9fab..1e71054 100644 --- a/lib/ui/utilities/navigation_items.dart +++ b/app/lib/ui/utilities/navigation_items.dart @@ -13,9 +13,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/ouds_flutter_app_localizations.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:ouds_flutter/ui/about/about_screen.dart'; -import 'package:ouds_flutter/ui/components/components_screen.dart'; -import 'package:ouds_flutter/ui/tokens/token_screen.dart'; +import 'package:ouds_flutter_demo/ui/about/about_screen.dart'; +import 'package:ouds_flutter_demo/ui/components/components_screen.dart'; +import 'package:ouds_flutter_demo/ui/tokens/token_screen.dart'; class NavigationItems { late BuildContext context; @@ -27,55 +27,31 @@ class NavigationItems { _destinationsStatic = [ NavigationDestination( label: AppLocalizations.of(context)!.app_bottomBar_tokens_label, - icon: SvgPicture.asset( - 'assets/ic_token.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_token.svg'), ), NavigationDestination( label: AppLocalizations.of(context)!.app_bottomBar_components_label, - icon: SvgPicture.asset( - 'assets/ic_atom.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_atom.svg'), ), NavigationDestination( label: AppLocalizations.of(context)!.app_bottomBar_about_label, - icon: SvgPicture.asset( - 'assets/ic_about.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_about.svg'), ), ]; _destinationsRailStatic = [ NavigationRailDestination( label: Text(AppLocalizations.of(context)!.app_bottomBar_tokens_label), - icon: SvgPicture.asset( - 'assets/ic_token.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_token.svg'), ), NavigationRailDestination( label: Text(AppLocalizations.of(context)!.app_bottomBar_components_label), - icon: SvgPicture.asset( - 'assets/ic_atom.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_atom.svg'), ), NavigationRailDestination( label: Text(AppLocalizations.of(context)!.app_bottomBar_about_label), - icon: SvgPicture.asset( - 'assets/ic_about.svg', - width: 28.0, - height: 28.0, - ), + icon: _buildSvgIcon('assets/ic_about.svg'), ), ]; _screens = [ @@ -85,6 +61,20 @@ class NavigationItems { ]; } + Widget _buildSvgIcon(String assetPath) { + return Builder( + builder: (BuildContext context) { + var colorScheme = Theme.of(context).colorScheme; + return SvgPicture.asset( + assetPath, + width: 28.0, + height: 28.0, + colorFilter: ColorFilter.mode(colorScheme.primary, BlendMode.srcIn), + ); + }, + ); + } + getSelectedMenuItem(int index) { return _destinationsStatic[index]; } diff --git a/pubspec.lock b/app/pubspec.lock similarity index 98% rename from pubspec.lock rename to app/pubspec.lock index dba8aa4..8f16630 100644 --- a/pubspec.lock +++ b/app/pubspec.lock @@ -205,6 +205,13 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + ouds_flutter: + dependency: "direct main" + description: + path: "../library" + relative: true + source: path + version: "0.0.1" path: dependency: transitive description: diff --git a/pubspec.yaml b/app/pubspec.yaml similarity index 97% rename from pubspec.yaml rename to app/pubspec.yaml index 4583ee3..1f64793 100644 --- a/pubspec.yaml +++ b/app/pubspec.yaml @@ -1,4 +1,4 @@ -name: ouds_flutter +name: ouds_flutter_demo description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 +version: 0.0.0+1 environment: sdk: ^3.5.3 @@ -50,6 +50,9 @@ dependencies: webview_flutter: ^3.0.4 # URL Lancher. url_launcher: ^6.0.3 + # Library ouds_flutter locally: + ouds_flutter: + path: ../library dev_dependencies: flutter_test: diff --git a/test/widget_test.dart b/app/test/widget_test.dart similarity index 91% rename from test/widget_test.dart rename to app/test/widget_test.dart index 2ab8a2c..7aff4ab 100644 --- a/test/widget_test.dart +++ b/app/test/widget_test.dart @@ -7,11 +7,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:ouds_flutter/main.dart'; +import 'package:ouds_flutter_demo/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our lib and trigger a frame. + // Build our app and trigger a frame. await tester.pumpWidget(const OudsApplication()); // Verify that our counter starts at 0. diff --git a/lib/main.dart b/lib/main.dart deleted file mode 100644 index f4f2e95..0000000 --- a/lib/main.dart +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Software Name : OUDS Flutter - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Flutter library of reusable graphical components for Android and iOS - */ - -// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables - -import 'package:flutter/material.dart'; -import 'package:flutter_gen/gen_l10n/ouds_flutter_app_localizations.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:get/get_navigation/src/root/get_material_app.dart'; -import 'package:ouds_flutter/ui/main_screen.dart'; - -void main() { - runApp(OudsApplication()); -} - -class OudsApplication extends StatefulWidget { - const OudsApplication({super.key}); - - @override - State createState() => _OudsApplicationState(); -} - -class _OudsApplicationState extends State { - @override - void initState() { - super.initState(); - } - - bool useMaterial3 = true; - ThemeMode themeMode = ThemeMode.system; - - bool get useLightMode => switch (themeMode) { - ThemeMode.system => - View.of(context).platformDispatcher.platformBrightness == - Brightness.light, - ThemeMode.light => true, - ThemeMode.dark => false - }; - - void handleBrightnessChange(bool useLightMode) { - setState(() { - themeMode = useLightMode ? ThemeMode.light : ThemeMode.dark; - }); - } - - @override - Widget build(BuildContext context) { - return GetMaterialApp( - title: 'Orange Design System - Flutter Demo App', - debugShowCheckedModeBanner: false, - theme: ThemeData( - useMaterial3: useMaterial3, - brightness: Brightness.light, - ), - darkTheme: ThemeData( - useMaterial3: useMaterial3, - brightness: Brightness.dark, - ), - home: MainScreen(), - // Localization setup - supportedLocales: AppLocalizations.supportedLocales, - localizationsDelegates: [ - AppLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - ); - } -} diff --git a/lib/ui/main_screen.dart b/lib/ui/main_screen.dart deleted file mode 100644 index 30666d6..0000000 --- a/lib/ui/main_screen.dart +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Software Name : OUDS Flutter - * SPDX-FileCopyrightText: Copyright (c) Orange SA - * SPDX-License-Identifier: MIT - * - * This software is distributed under the MIT license, - * the text of which is available at https://opensource.org/license/MIT/ - * or see the "LICENSE" file for more details. - * - * Software description: Flutter library of reusable graphical components for Android and iOS - */ - -import 'package:flutter/material.dart'; -import 'package:ouds_flutter/ui/utilities/navigation_items.dart'; - -class MainScreen extends StatefulWidget { - const MainScreen({super.key}); - - @override - State createState() => _MainScreenState(); -} - -class _MainScreenState extends State { - var _selectedIndex = 0; - - @override - Widget build(BuildContext context) { - var navigationItems = NavigationItems(context); - var selectedItem = navigationItems.getSelectedMenuItem(_selectedIndex); - - return Scaffold( - appBar: AppBar(title: Text(selectedItem.label)), - bottomNavigationBar: MediaQuery.of(context).size.width < 640 - ? NavigationBar( - selectedIndex: _selectedIndex, - onDestinationSelected: (int index) { - setState(() { - _selectedIndex = index; - }); - }, - destinations: navigationItems.getBottomNavigationBarItems(), - ) - : null, - body: Row( - children: [ - if (MediaQuery.of(context).size.width >= 640) - NavigationRail( - onDestinationSelected: (int index) { - setState(() { - _selectedIndex = index; - }); - }, - selectedIndex: _selectedIndex, - destinations: navigationItems.getNavigationRailDestinations(), - // Called when one tab is selected, - ), - Expanded( - child: navigationItems.getScreens(_selectedIndex), - ), - ], - ), - ); - } -} diff --git a/library/.gitignore b/library/.gitignore new file mode 100644 index 0000000..ac5aa98 --- /dev/null +++ b/library/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/library/.metadata b/library/.metadata new file mode 100644 index 0000000..24472f1 --- /dev/null +++ b/library/.metadata @@ -0,0 +1,10 @@ +# 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: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/library/LICENSE b/library/LICENSE new file mode 100644 index 0000000..87bcab8 --- /dev/null +++ b/library/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Orange SA + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/library/NOTICE.txt b/library/NOTICE.txt new file mode 100644 index 0000000..324ac4d --- /dev/null +++ b/library/NOTICE.txt @@ -0,0 +1,12 @@ +Parts list under Orange SA Copyright +Copyright (C) Orange SA + +The following parts are proprietary information of Orange. +You shall not use or display any trade names, trademarks, service marks, products names, illustrations or designs used within the software +or displayed on this website and owned by Orange SA and its subsidiaries, +in whole or part of, in any medium, except as required for reasonable and customary use in describing the origin of the software +and reproducing the content of the NOTICE and DOCUMENTATION files. +Any use or displaying shall constitute an infringement under intellectual property laws of France and international conventions. + + +End of the parts list under Orange SA Copyright diff --git a/library/README.md b/library/README.md new file mode 100644 index 0000000..a57101d --- /dev/null +++ b/library/README.md @@ -0,0 +1,12 @@ +

OUDS Flutter Library

+ +

+ OUDS Flutter provides Orange Flutter components for Android and iOS to developers. +
+ Visit ODS Flutter +
+
+ Report bug + ยท + Request feature +

diff --git a/library/analysis_options.yaml b/library/analysis_options.yaml new file mode 100644 index 0000000..a5744c1 --- /dev/null +++ b/library/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/library/lib/core/ouds_color_scheme.dart b/library/lib/core/ouds_color_scheme.dart new file mode 100644 index 0000000..f12b623 --- /dev/null +++ b/library/lib/core/ouds_color_scheme.dart @@ -0,0 +1,169 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; + +// Define color constants for various colors used across the themes +const orange100 = Color(0xffff7900); +const orange200 = Color(0xfff16e00); +const white100 = Color(0xffffffff); +const black900 = Color(0xff000000); +const grey200 = Color(0xffEEEEEE); +const grey300 = Color(0xffDDDDDD); +const grey400 = Color(0xffCCCCCC); +const grey500 = Color(0xff999999); +const grey600 = Color(0xff666666); +const grey800 = Color(0xff333333); +const grey900 = Color(0xFF212121); +const negative100 = Color(0xffD53F15); +const Color negative200 = Color(0xFFB00020); +const obsGrey700 = Color(0xff595959); +const darkSurfaceDefault = Color(0xff121212); + +/// Orange Light Theme Color Scheme +/// +/// Defines a color scheme for the light theme, using shades of orange, black, and white for various elements of the UI. +const lightOrangeColorScheme = ColorScheme( + brightness: Brightness.light, + primary: orange200, + onPrimary: black900, + primaryContainer: Color(0xFFFFDBCA), + onPrimaryContainer: Color(0xFF331200), + secondary: black900, + onSecondary: white100, + secondaryContainer: grey800, + onSecondaryContainer: white100, + tertiary: grey600, + onTertiary: white100, + tertiaryContainer: grey200, + onTertiaryContainer: black900, + error: negative200, + onError: white100, + errorContainer: Color(0xFFFFDAD6), + onErrorContainer: Color(0xFF410002), + outline: black900, + surface: white100, + onSurface: black900, + onSurfaceVariant: black900, + inverseSurface: Color(0xFF362F2C), + onInverseSurface: white100, + inversePrimary: Color(0xFFFFB68E), + shadow: black900, + surfaceTint: Color(0xFF9C4500), + outlineVariant: Color(0xFFD7C2B9), + scrim: grey900, +); + +/// Orange Dark Theme Color Scheme +/// +/// Defines a color scheme for the dark theme, using darker shades of orange, black, and grey for various UI elements. +const darkOrangeColorScheme = ColorScheme( + brightness: Brightness.dark, + primary: orange100, + onPrimary: black900, + primaryContainer: Color(0xFF773300), + onPrimaryContainer: Color(0xFFFFDBCA), + secondary: white100, + onSecondary: black900, + secondaryContainer: grey400, + onSecondaryContainer: black900, + tertiary: grey400, + onTertiary: black900, + tertiaryContainer: grey900, + onTertiaryContainer: white100, + error: negative200, + onError: white100, + errorContainer: Color(0xFF93000A), + onErrorContainer: Color(0xFFFFDAD6), + outline: grey200, + surface: black900, + onSurface: grey200, + surfaceVariant: black900, + onSurfaceVariant: grey200, + inverseSurface: grey200, + onInverseSurface: black900, + inversePrimary: Color(0xFF9C4500), + shadow: white100, + surfaceTint: Color(0xFFFFB68E), + outlineVariant: Color(0xFF52443C), + scrim: obsGrey700, +); + +/// Inverse Light Theme Color Scheme +/// +/// Defines a color scheme for the light inverse theme, which inverts certain colors (such as primary, secondary, and background). +/// It uses more muted tones, appropriate for light-themed applications with dark elements. +const lightInverseColorScheme = ColorScheme( + brightness: Brightness.light, + primary: Color(0xFF9C4500), + onPrimary: white100, + primaryContainer: Color(0xFF332100), + onPrimaryContainer: Color(0xFFFFDBCA), + secondary: grey200, + onSecondary: black900, + secondaryContainer: grey400, + onSecondaryContainer: black900, + tertiary: grey600, + onTertiary: white100, + tertiaryContainer: grey800, + onTertiaryContainer: black900, + error: negative100, + onError: white100, + errorContainer: Color(0xFFFFDAD6), + onErrorContainer: Color(0xFF410002), + outline: black900, + surface: white100, + onSurface: black900, + onSurfaceVariant: black900, + inverseSurface: Color(0xFF362F2C), + onInverseSurface: white100, + inversePrimary: Color(0xFFFFB68E), + shadow: black900, + surfaceTint: Color(0xFF9C4500), + outlineVariant: Color(0xFFD7C2B9), + scrim: grey900, +); + +/// Inverse Dark Theme Color Scheme +/// +/// Defines a color scheme for the dark inverse theme, which inverts certain colors while providing a dark mode with muted, darker tones +const darkInverseColorScheme = ColorScheme( + brightness: Brightness.dark, + primary: Color(0xFF9C4500), + onPrimary: white100, + primaryContainer: Color(0xFF773300), + onPrimaryContainer: Color(0xFFFFDBCA), + secondary: grey400, + onSecondary: black900, + secondaryContainer: grey800, + onSecondaryContainer: black900, + tertiary: grey600, + onTertiary: white100, + tertiaryContainer: grey900, + onTertiaryContainer: black900, + error: negative100, + onError: white100, + errorContainer: Color(0xFF93000A), + onErrorContainer: Color(0xFFFFDAD6), + outline: grey200, + surface: black900, + onSurface: grey200, + surfaceVariant: black900, + onSurfaceVariant: grey200, + inverseSurface: grey200, + onInverseSurface: black900, + inversePrimary: Color(0xFFFFB68E), + shadow: white100, + surfaceTint: Color(0xFFFFB68E), + outlineVariant: Color(0xFF52443C), + scrim: obsGrey700, +); diff --git a/library/lib/core/ouds_theme.dart b/library/lib/core/ouds_theme.dart new file mode 100644 index 0000000..2651b07 --- /dev/null +++ b/library/lib/core/ouds_theme.dart @@ -0,0 +1,179 @@ +/* + * Software Name : OUDS Flutter + * SPDX-FileCopyrightText: Copyright (c) Orange SA + * SPDX-License-Identifier: MIT + * + * This software is distributed under the MIT license, + * the text of which is available at https://opensource.org/license/MIT/ + * or see the "LICENSE" file for more details. + * + * Software description: Flutter library of reusable graphical components for Android and iOS + */ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:ouds_flutter/core/ouds_color_scheme.dart'; + +/// A class to define and manage the different themes for the OUDS application. +/// This class provides light and dark themes as well as inverse themes for various UI components. +class OudsTheme { + /// Private constructor to prevent instantiation of the theme class. + OudsTheme._(); + + /// Orange Theme (Light) + /// This theme defines the color scheme, app bar, navigation bar, and other UI elements for the light theme using the orange color palette. + /// It is primarily used in light mode interfaces. + static ThemeData orangeThemeLight = ThemeData( + colorScheme: lightOrangeColorScheme, + brightness: Brightness.light, + useMaterial3: true, + appBarTheme: const AppBarTheme( + surfaceTintColor: white100, + backgroundColor: white100, + systemOverlayStyle: SystemUiOverlayStyle( + systemNavigationBarColor: white100, + systemNavigationBarDividerColor: grey200, + systemNavigationBarIconBrightness: Brightness.dark, + statusBarIconBrightness: Brightness.light, + statusBarBrightness: Brightness.light), + ), + navigationBarTheme: NavigationBarThemeData( + surfaceTintColor: lightOrangeColorScheme.onSecondary, + elevation: 3.0, + indicatorColor: grey200, + indicatorShape: null, + labelTextStyle: WidgetStateProperty.resolveWith( + (Set states) => states.contains(WidgetState.selected) + ? const TextStyle(color: orange100) + : const TextStyle(color: black900), + ), + iconTheme: WidgetStateProperty.resolveWith( + (states) { + if (states.contains(WidgetState.selected)) { + return IconThemeData(color: lightOrangeColorScheme.primary); + } + return IconThemeData(color: lightOrangeColorScheme.secondary); + }, + ), + ), + navigationRailTheme: NavigationRailThemeData( + elevation: 3.0, + indicatorColor: grey200, + indicatorShape: null, + selectedIconTheme: IconThemeData(color: lightOrangeColorScheme.primary), + unselectedIconTheme: + IconThemeData(color: lightOrangeColorScheme.secondary), + selectedLabelTextStyle: TextStyle( + color: lightOrangeColorScheme.primary, + overflow: TextOverflow.ellipsis, + fontSize: 12, + fontWeight: FontWeight.w500, + height: 1.43, + letterSpacing: 0.25, + ), + unselectedLabelTextStyle: TextStyle( + color: lightOrangeColorScheme.secondary, + overflow: TextOverflow.ellipsis, + fontSize: 12, + fontWeight: FontWeight.w400, + height: 1.43, + letterSpacing: 0.25, + ), + ), + ); + + /// Orange Theme (Dark) + /// This theme defines the color scheme, app bar, navigation bar, and other UI elements for the dark theme using the orange color palette. + /// It is primarily used in dark mode interfaces. + static ThemeData orangeThemeDark = ThemeData( + colorScheme: darkOrangeColorScheme, + brightness: Brightness.dark, + useMaterial3: true, + scaffoldBackgroundColor: black900, + appBarTheme: const AppBarTheme( + backgroundColor: darkSurfaceDefault, + surfaceTintColor: darkSurfaceDefault, + systemOverlayStyle: SystemUiOverlayStyle( + systemNavigationBarColor: black900, + systemNavigationBarDividerColor: white100, + systemNavigationBarIconBrightness: Brightness.light, + statusBarIconBrightness: Brightness.light, + statusBarBrightness: Brightness.dark), + ), + navigationBarTheme: NavigationBarThemeData( + surfaceTintColor: darkOrangeColorScheme.onSecondary, + elevation: 3.0, + indicatorColor: grey800, + indicatorShape: null, + labelTextStyle: WidgetStateProperty.resolveWith( + (Set states) => states.contains(WidgetState.selected) + ? const TextStyle(color: orange200) + : const TextStyle(color: white100), + ), + iconTheme: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.selected)) { + return IconThemeData(color: darkOrangeColorScheme.primary); + } + return IconThemeData(color: darkOrangeColorScheme.secondary); + }), + ), + navigationRailTheme: NavigationRailThemeData( + elevation: 3.0, + indicatorColor: grey800, + indicatorShape: null, + selectedIconTheme: IconThemeData(color: darkOrangeColorScheme.primary), + unselectedIconTheme: + IconThemeData(color: darkOrangeColorScheme.secondary), + selectedLabelTextStyle: TextStyle( + color: darkOrangeColorScheme.primary, + overflow: TextOverflow.ellipsis, + fontSize: 12, + fontWeight: FontWeight.w500, + height: 1.43, + letterSpacing: 0.25, + ), + unselectedLabelTextStyle: TextStyle( + color: darkOrangeColorScheme.secondary, + overflow: TextOverflow.ellipsis, + fontSize: 12, + fontWeight: FontWeight.w400, + height: 1.43, + letterSpacing: 0.25, + ), + ), + ); + + /// Inverse Theme (Light) + /// This theme defines the color scheme, app bar, navigation bar, and other UI elements for the light theme using the orange color palette. + /// It is primarily used in light mode interfaces. + static ThemeData inverseThemeLight = ThemeData( + colorScheme: lightInverseColorScheme, + brightness: Brightness.light, + scaffoldBackgroundColor: const Color(0xffeeeeee), + appBarTheme: const AppBarTheme( + backgroundColor: Color(0xff212121), + iconTheme: IconThemeData(color: Colors.white), + ), + buttonTheme: const ButtonThemeData( + buttonColor: Color(0xff212121), + ), + useMaterial3: true, + ); + + /// Inverse Theme (Dark) + /// This theme defines the color scheme, app bar, navigation bar, and other UI elements for the dark theme using the orange color palette. + /// It is primarily used in dark mode interfaces. + static ThemeData inverseThemeDark = ThemeData( + colorScheme: darkInverseColorScheme, + brightness: Brightness.dark, + scaffoldBackgroundColor: const Color(0xff212121), + appBarTheme: const AppBarTheme( + backgroundColor: Color(0xff212121), + iconTheme: IconThemeData(color: Colors.black), + ), + buttonTheme: const ButtonThemeData( + buttonColor: Color(0xffeeeeee), + ), + useMaterial3: true, + ); +} diff --git a/library/lib/ouds_flutter.dart b/library/lib/ouds_flutter.dart new file mode 100644 index 0000000..07ab85c --- /dev/null +++ b/library/lib/ouds_flutter.dart @@ -0,0 +1 @@ +library ouds_flutter; diff --git a/library/pubspec.yaml b/library/pubspec.yaml new file mode 100644 index 0000000..757e5a3 --- /dev/null +++ b/library/pubspec.yaml @@ -0,0 +1,58 @@ +name: ouds_flutter +description: OUDS Flutter Library provides Orange Flutter components for Android and iOS to developers, and a demo application. +version: 0.0.1 +repository: https://github.com/Orange-OpenSource/ouds-flutter + +platforms: + android: + ios: + +environment: + sdk: ^3.5.3 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^4.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/to/asset-from-package + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/to/font-from-package diff --git a/library/test/ouds_flutter_test.dart b/library/test/ouds_flutter_test.dart new file mode 100644 index 0000000..ab73b3a --- /dev/null +++ b/library/test/ouds_flutter_test.dart @@ -0,0 +1 @@ +void main() {}