├── .github └── workflows │ └── dart.yml ├── .gitignore ├── .metadata ├── CONTRIBUTING.md ├── DOCUMENTATION.md ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── codebooter │ │ │ │ └── codebooter_study_app │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── google-services.json ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── images │ ├── Chemistry_shivani.webp │ ├── apple.png │ ├── codebooterIcon.png │ ├── dsa.jpg │ ├── github.png │ ├── google.png │ ├── interview.png │ ├── logo.png │ ├── logo1.png │ ├── logo3.png │ ├── logo4.png │ ├── logopng │ ├── manav.jpeg │ ├── playlist1.png │ ├── react.png │ ├── shivani.png │ ├── tour1.jpeg │ ├── tour1.png │ ├── tour2.jpeg │ ├── tour2.png │ ├── tour3.jpeg │ └── tour3.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 180.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── Admin │ ├── authentication │ │ └── AdminLogin.dart │ └── home │ │ ├── AdminHome.dart │ │ ├── DashBoard.dart │ │ └── PostJob.dart ├── AppState.dart ├── Client │ ├── Screens │ │ ├── ErrorScreen.dart │ │ ├── ExamNotes │ │ │ ├── ExamNotesScreen.dart │ │ │ ├── FirstYear │ │ │ │ ├── BasicCivil.dart │ │ │ │ ├── BasicComputers.dart │ │ │ │ ├── BasicElectricals.dart │ │ │ │ ├── BasicMechanical.dart │ │ │ │ ├── ChemistryNotes.dart │ │ │ │ ├── EngineeringMaths1.dart │ │ │ │ ├── communication.dart │ │ │ │ ├── graphics.dart │ │ │ │ ├── mathematics2.dart │ │ │ │ └── physics.dart │ │ │ ├── FourthYear │ │ │ │ ├── BigData.dart │ │ │ │ ├── CloudComputing.dart │ │ │ │ ├── CrptographyInformation.dart │ │ │ │ ├── DataMining.dart │ │ │ │ ├── ImageProccessing.dart │ │ │ │ ├── InternetOfThings.dart │ │ │ │ ├── ObjectOrientedSoftware.dart │ │ │ │ ├── SoftwareArch.dart │ │ │ │ └── Wireless&Mobile.dart │ │ │ ├── SecondYear │ │ │ │ ├── AnalysisDesign.dart │ │ │ │ ├── ComputerArch.dart │ │ │ │ ├── DataStructures.dart │ │ │ │ ├── DigitalSystems.dart │ │ │ │ ├── Discrete.dart │ │ │ │ ├── Environmental.dart │ │ │ │ ├── Mathematics3.dart │ │ │ │ ├── ObjectOriented.dart │ │ │ │ └── SoftwareEngineering.dart │ │ │ ├── Test.dart │ │ │ └── ThirdYear │ │ │ │ ├── AdvancedArch.dart │ │ │ │ ├── CompilerDesign.dart │ │ │ │ ├── ComputerNetworks.dart │ │ │ │ ├── CyberSecurity.dart │ │ │ │ ├── DataAnalysis.dart │ │ │ │ ├── Database.dart │ │ │ │ ├── Internetweb.dart │ │ │ │ ├── KnowledgeManagement.dart │ │ │ │ ├── MachineLearning.dart │ │ │ │ ├── OOP.dart │ │ │ │ ├── OperatingSystem.dart │ │ │ │ ├── ProjectManagement.dart │ │ │ │ └── TheoryOfComputation.dart │ │ ├── InterviePrep │ │ │ ├── Aptitude │ │ │ │ ├── AptitudeMain.dart │ │ │ │ ├── Average.dart │ │ │ │ ├── MixtureAndAlligation.dart │ │ │ │ ├── Numbers.dart │ │ │ │ ├── Percentage.dart │ │ │ │ ├── ProftAndLoss.dart │ │ │ │ ├── RatioAndProportion.dart │ │ │ │ ├── TimeAndWork.dart │ │ │ │ └── TimeDistanceAndSpeed.dart │ │ │ ├── CoreConcepts │ │ │ │ ├── ComputerNetworks.dart │ │ │ │ ├── DBMS2.dart │ │ │ │ └── OperatingSystem2.dart │ │ │ ├── DsaInterview │ │ │ │ ├── DsaInterview.dart │ │ │ │ ├── DsaProblems.dart │ │ │ │ └── DsaQuestion.dart │ │ │ ├── HR │ │ │ │ └── h_r.dart │ │ │ ├── InterviewPrepScreen.dart │ │ │ ├── MockInterview │ │ │ │ ├── MockInterview.dart │ │ │ │ └── MockVideoPlayer.dart │ │ │ ├── Programming │ │ │ │ ├── CProgramming.dart │ │ │ │ ├── CppProgramming.dart │ │ │ │ ├── JavaProgramming.dart │ │ │ │ ├── JsProgramming.dart │ │ │ │ ├── ProgrammingInterview.dart │ │ │ │ ├── PythonProgramming.dart │ │ │ │ └── SqlProgramming.dart │ │ │ └── TopResumes │ │ │ │ └── TopResumes.dart │ │ ├── courses │ │ │ ├── AIML │ │ │ │ ├── ArtificialIntelligence.dart │ │ │ │ ├── BasicStarting.dart │ │ │ │ ├── DataScience.dart │ │ │ │ ├── DeepLearning.dart │ │ │ │ ├── MachineLearning.dart │ │ │ │ └── Project.dart │ │ │ ├── ApplicationDevelopment │ │ │ │ ├── FirebaseBackend.dart │ │ │ │ ├── FlutterApp.dart │ │ │ │ ├── JavaApp.dart │ │ │ │ └── ReactNative.dart │ │ │ ├── CoreConcepts │ │ │ │ ├── CompilerDesign.dart │ │ │ │ ├── ComputerNetwork.dart │ │ │ │ ├── DBMS.dart │ │ │ │ ├── OperatingSystem.dart │ │ │ │ └── TOC.dart │ │ │ ├── CourseScreen.dart │ │ │ ├── CyberSecurity │ │ │ │ ├── CCNA.dart │ │ │ │ ├── CyberSecurity.dart │ │ │ │ ├── InformationGathering.dart │ │ │ │ ├── Kali.dart │ │ │ │ └── NetWorkSecurity.dart │ │ │ ├── PlayList.dart │ │ │ ├── PrgrammingLanguages │ │ │ │ ├── CLang.dart │ │ │ │ ├── CPP.dart │ │ │ │ ├── GO.dart │ │ │ │ ├── Java.dart │ │ │ │ ├── Python.dart │ │ │ │ └── TypeScript.dart │ │ │ ├── VideoPlayer.dart │ │ │ ├── Web │ │ │ │ ├── Angular.dart │ │ │ │ ├── HtmlCss.dart │ │ │ │ ├── JavaScript.dart │ │ │ │ ├── MernProject.dart │ │ │ │ ├── MernStack.dart │ │ │ │ ├── NodeJS.dart │ │ │ │ └── ReactJS.dart │ │ │ ├── Web3 │ │ │ │ ├── DecentralizedApplication.dart │ │ │ │ ├── Etherium.dart │ │ │ │ ├── IntroToWeb3.dart │ │ │ │ ├── Solidity.dart │ │ │ │ └── Tokenization.dart │ │ │ └── YoutubeFunction.dart │ │ ├── dsa │ │ │ ├── Backtracking.dart │ │ │ ├── DsaScreen.dart │ │ │ ├── DynamicProgramming.dart │ │ │ ├── Graph.dart │ │ │ ├── Queue.dart │ │ │ ├── Recursion.dart │ │ │ ├── Sorting.dart │ │ │ ├── Stack.dart │ │ │ ├── Tree.dart │ │ │ ├── Trie.dart │ │ │ ├── arrays.dart │ │ │ ├── greedy.dart │ │ │ ├── linkedList.dart │ │ │ └── searching.dart │ │ ├── help.dart │ │ └── jobs │ │ │ ├── FetchApi.dart │ │ │ ├── JobBloc │ │ │ ├── JobBloc.dart │ │ │ ├── JobEvent.dart │ │ │ └── JobState.dart │ │ │ ├── JobInternship.dart │ │ │ └── JobModel.dart │ ├── authentication │ │ ├── LoginPage.dart │ │ └── auth_service.dart │ └── home │ │ ├── Features.dart │ │ ├── HomeScreen.dart │ │ ├── JobInternshipScreen.dart │ │ ├── Tour.dart │ │ └── animatedScreen.dart ├── Routes │ └── PageRoutes.dart ├── main.dart ├── todo.txt ├── utils │ ├── Colors.dart │ └── Dimensions.dart └── widgets │ ├── BigText.dart │ └── SmallText.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.github/workflows/dart.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: Dart 7 | 8 | on: 9 | push: 10 | branches: [ "main" ] 11 | pull_request: 12 | branches: [ "main" ] 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | 21 | # Note: This workflow uses the latest stable version of the Dart SDK. 22 | # You can specify other versions if desired, see documentation here: 23 | # https://github.com/dart-lang/setup-dart/blob/main/README.md 24 | # - uses: dart-lang/setup-dart@v1 25 | - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 26 | 27 | - name: Install dependencies 28 | run: dart pub get 29 | 30 | # Uncomment this step to verify the use of 'dart format' on each commit. 31 | # - name: Verify formatting 32 | # run: dart format --output=none --set-exit-if-changed . 33 | 34 | # Consider passing '--fatal-infos' for slightly stricter analysis. 35 | - name: Analyze project source 36 | run: dart analyze 37 | 38 | # Your project will need to have tests in test/ and a dependency on 39 | # package:test for this step to succeed. Note that Flutter projects will 40 | # want to change this to 'flutter test'. 41 | - name: Run tests 42 | run: dart test 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 62bd79521d8d007524e351747471ba66696fc2d4 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 17 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 18 | - platform: android 19 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 20 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 21 | - platform: ios 22 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 23 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 24 | - platform: linux 25 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 26 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 27 | - platform: macos 28 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 29 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 30 | - platform: web 31 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 32 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 33 | - platform: windows 34 | create_revision: 62bd79521d8d007524e351747471ba66696fc2d4 35 | base_revision: 62bd79521d8d007524e351747471ba66696fc2d4 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## CodeBooter/Codebooter-flutter: CONTRIBUTING.md 2 | 3 | Welcome to the CodeBooter community! We are always looking for new contributors to help us make CodeBooter the best possible resource for computer science enthusiasts and tech interview candidates. 4 | 5 | ## How to Contribute 6 | 7 | There are many ways to contribute to CodeBooter, including: 8 | 9 | * **Fixing bugs.** If you find a bug in CodeBooter, please open an issue on GitHub and describe the problem in detail. We appreciate any help you can give us in fixing bugs! 10 | * **Adding new content.** If you have a new article, tutorial, or other resource that you think would be valuable to the CodeBooter community, please submit a pull request. We are always looking for new content to help people learn about computer science and prepare for tech interviews. 11 | * **Improving existing content.** If you see a way to improve an existing article, tutorial, or other resource, please submit a pull request. We appreciate any help you can give us in making CodeBooter the best possible resource. 12 | * **Translating content into other languages.** If you are fluent in another language, we would love your help translating CodeBooter content into that language. Please open an issue on GitHub to discuss how you can get involved. 13 | * **Answering questions on the forum.** If you see a question on the CodeBooter forum that you can answer, please do so! We appreciate any help you can give in helping our community members learn. 14 | 15 | ## Getting Started 16 | 17 | If you are new to contributing to open source projects, here are a few tips: 18 | 19 | * **Start by reading the Code of Conduct.** This document outlines the expected behavior for all CodeBooter contributors. 20 | * **Find an issue that you are interested in working on.** You can browse the open issues on GitHub or open a new issue if you find something that you would like to work on. 21 | * **Fork the CodeBooter repository.** This will create a copy of the repository on your own GitHub account. 22 | * **Create a new branch.** This will allow you to work on your changes without affecting the main CodeBooter codebase. 23 | * **Make your changes.** Once you have created a branch, you can start making your changes to the CodeBooter codebase. 24 | * **Commit your changes.** Once you are happy with your changes, you can commit them to your branch. 25 | * **Submit a pull request.** Once you have committed your changes, you can submit a pull request to the main CodeBooter repository. This will allow the CodeBooter maintainers to review your changes and merge them into the main codebase. 26 | 27 | ## We appreciate your contributions! 28 | 29 | Thank you for considering contributing to CodeBooter! We appreciate any help you can give in making CodeBooter the best possible resource for computer science enthusiasts and tech interview candidates. 30 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | def keystoreProperties = new Properties() 30 | def keystorePropertiesFile = rootProject.file('key.properties') 31 | if (keystorePropertiesFile.exists()) { 32 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 33 | } 34 | android { 35 | compileSdkVersion flutter.compileSdkVersion 36 | ndkVersion flutter.ndkVersion 37 | 38 | compileOptions { 39 | sourceCompatibility JavaVersion.VERSION_1_8 40 | targetCompatibility JavaVersion.VERSION_1_8 41 | } 42 | 43 | kotlinOptions { 44 | jvmTarget = '1.8' 45 | } 46 | 47 | sourceSets { 48 | main.java.srcDirs += 'src/main/kotlin' 49 | } 50 | 51 | defaultConfig { 52 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 53 | applicationId "com.codebooter.codebooter_study_app" 54 | // You can update the following values to match your application needs. 55 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 56 | minSdkVersion 21 57 | targetSdkVersion flutter.targetSdkVersion 58 | versionCode flutterVersionCode.toInteger() 59 | versionName flutterVersionName 60 | } 61 | 62 | 63 | signingConfigs { 64 | release { 65 | keyAlias keystoreProperties['keyAlias'] 66 | keyPassword keystoreProperties['keyPassword'] 67 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 68 | storePassword keystoreProperties['storePassword'] 69 | } 70 | } 71 | buildTypes { 72 | release { 73 | signingConfig signingConfigs.release 74 | } 75 | } 76 | } 77 | 78 | 79 | flutter { 80 | source '../..' 81 | } 82 | 83 | dependencies { 84 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 85 | } 86 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "450472724669", 4 | "project_id": "codebooter-study", 5 | "storage_bucket": "codebooter-study.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:450472724669:android:221f30379690adea364fd4", 11 | "android_client_info": { 12 | "package_name": "com.codebooter.codebooter_study_app" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "450472724669-9j4l9r2pptl9bd3rjfb4esdvdhgg310f.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.codebooter.codebooter_study_app", 21 | "certificate_hash": "bb8972bff3afb9674d18d5813f4bc5b320c64c78" 22 | } 23 | }, 24 | { 25 | "client_id": "450472724669-3131k5psr44tamm3gq7qibtgb7etj8g9.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyC7zNnHrdG4ku5AeQn6wk9mL-OGXigZh64" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "450472724669-3131k5psr44tamm3gq7qibtgb7etj8g9.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | } 45 | ], 46 | "configuration_version": "1" 47 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/codebooter/codebooter_study_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.codebooter.codebooter_study_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.9.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | tasks.register("clean", Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "450472724669", 4 | "project_id": "codebooter-study", 5 | "storage_bucket": "codebooter-study.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:450472724669:android:221f30379690adea364fd4", 11 | "android_client_info": { 12 | "package_name": "com.codebooter.codebooter_study_app" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "450472724669-hidu69tcgjv9av6knajomekihhrcmonv.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyC7zNnHrdG4ku5AeQn6wk9mL-OGXigZh64" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "450472724669-hidu69tcgjv9av6knajomekihhrcmonv.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jun 22 21:12:34 IST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/images/Chemistry_shivani.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/Chemistry_shivani.webp -------------------------------------------------------------------------------- /assets/images/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/apple.png -------------------------------------------------------------------------------- /assets/images/codebooterIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/codebooterIcon.png -------------------------------------------------------------------------------- /assets/images/dsa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/dsa.jpg -------------------------------------------------------------------------------- /assets/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/github.png -------------------------------------------------------------------------------- /assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/google.png -------------------------------------------------------------------------------- /assets/images/interview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/interview.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/logo1.png -------------------------------------------------------------------------------- /assets/images/logo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/logo3.png -------------------------------------------------------------------------------- /assets/images/logo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/logo4.png -------------------------------------------------------------------------------- /assets/images/logopng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/logopng -------------------------------------------------------------------------------- /assets/images/manav.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/manav.jpeg -------------------------------------------------------------------------------- /assets/images/playlist1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/playlist1.png -------------------------------------------------------------------------------- /assets/images/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/react.png -------------------------------------------------------------------------------- /assets/images/shivani.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/shivani.png -------------------------------------------------------------------------------- /assets/images/tour1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour1.jpeg -------------------------------------------------------------------------------- /assets/images/tour1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour1.png -------------------------------------------------------------------------------- /assets/images/tour2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour2.jpeg -------------------------------------------------------------------------------- /assets/images/tour2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour2.png -------------------------------------------------------------------------------- /assets/images/tour3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour3.jpeg -------------------------------------------------------------------------------- /assets/images/tour3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/assets/images/tour3.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]} -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | 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. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | CodeBooter 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | CodeBooter 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/Admin/home/AdminHome.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/Admin/home/DashBoard.dart'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/Client/authentication/auth_service.dart'; 4 | import 'package:codebooter_study_app/utils/Dimensions.dart'; 5 | import 'package:codebooter_study_app/widgets/BigText.dart'; 6 | import 'package:codebooter_study_app/widgets/SmallText.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:go_router/go_router.dart'; 9 | import 'package:provider/provider.dart'; 10 | 11 | class AdminHome extends StatefulWidget { 12 | const AdminHome({super.key}); 13 | 14 | @override 15 | State createState() => _AdminHomeState(); 16 | } 17 | 18 | class _AdminHomeState extends State { 19 | final AuthService _authService = AuthService(); 20 | @override 21 | Widget build(BuildContext context) { 22 | final appState = Provider.of(context); 23 | 24 | return Scaffold( 25 | body: SafeArea( 26 | child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ 27 | Padding( 28 | padding: EdgeInsets.only( 29 | left: dimension.val20, right: dimension.val20, top: dimension.val10), 30 | child: Row( 31 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 32 | children: [ 33 | const Icon(Icons.home), 34 | bigText( 35 | text: 'CodeBooter', 36 | color: appState.isDarkMode ? Colors.white : Colors.black, 37 | ), 38 | IconButton( 39 | onPressed: () { 40 | _authService.signOut(context); 41 | context.go('/'); 42 | }, 43 | icon: const Icon(Icons.logout)) 44 | ], 45 | ), 46 | ), 47 | Expanded( 48 | child: SingleChildScrollView( 49 | child: Column( 50 | mainAxisAlignment: MainAxisAlignment.center, 51 | children: [ 52 | Container( 53 | alignment: Alignment.center, 54 | child: Column(children: [ 55 | SizedBox(height: dimension.val30), 56 | bigText( 57 | text: "Welcome to CodeBooter 👋 🚀", 58 | color: 59 | appState.isDarkMode ? Colors.white : Colors.black, 60 | ), 61 | SizedBox(height: dimension.val10), 62 | smallText( 63 | text: "Thanks for being a part of us", 64 | color: 65 | appState.isDarkMode ? Colors.white : Colors.black, 66 | ), 67 | SizedBox(height: dimension.val20), 68 | const DashBoard(), 69 | ]), 70 | ), 71 | ], 72 | ), 73 | ), 74 | ), 75 | ]), 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/AppState.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppState extends ChangeNotifier { 4 | bool _isDarkMode = true; 5 | 6 | bool get isDarkMode => _isDarkMode; 7 | 8 | void toggleDarkMode() { 9 | _isDarkMode = !_isDarkMode; 10 | notifyListeners(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/Client/Screens/ErrorScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:go_router/go_router.dart'; 3 | 4 | class ErrorScreen extends StatelessWidget { 5 | final Exception? error; 6 | const ErrorScreen({Key? key, required this.error}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar( 12 | title: const Text("we will fix this soon"), 13 | ), 14 | body: Center( 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: [ 18 | Text(error.toString()), 19 | ElevatedButton( 20 | onPressed: () => context.go('/'), 21 | child: const Text('Go back to home page')) 22 | ], 23 | ), 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/Client/Screens/ExamNotes/Test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:path_provider/path_provider.dart'; 5 | import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; 6 | 7 | class Test extends StatefulWidget { 8 | const Test({Key? key}) : super(key: key); 9 | 10 | @override 11 | _TestState createState() => _TestState(); 12 | } 13 | 14 | class _TestState extends State { 15 | final String pdfUrl = 16 | 'https://peach-alika-10.tiiny.site/1687267159026_compressed_2-2023-06-29T08-19-41.941Z.pdf'; 17 | late String localPath; 18 | bool isPdfDownloaded = false; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | downloadPdf(); 24 | } 25 | 26 | Future downloadPdf() async { 27 | final directory = await getApplicationSupportDirectory(); 28 | localPath = '${directory.path}/sdf.pdf'; 29 | final file = File(localPath); 30 | 31 | if (await file.exists()) { 32 | setState(() { 33 | isPdfDownloaded = true; 34 | }); 35 | } else { 36 | final response = await HttpClient().getUrl(Uri.parse(pdfUrl)); 37 | final downloadedFile = await response.close(); 38 | final bytes = await consolidateHttpClientResponseBytes(downloadedFile); 39 | await file.writeAsBytes(bytes); 40 | setState(() { 41 | isPdfDownloaded = true; 42 | }); 43 | } 44 | } 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | return Scaffold( 49 | appBar: AppBar( 50 | title: const Text('Exam Note Screen'), 51 | ), 52 | body: Center( 53 | child: isPdfDownloaded 54 | ? SfPdfViewer.file(File(localPath)) 55 | : const CircularProgressIndicator(), 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/Average.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:provider/provider.dart'; 8 | // import 'package:expansion_tile/expansion_tile.dart'; 9 | 10 | class Average extends StatefulWidget { 11 | const Average(); 12 | 13 | @override 14 | _AverageState createState() => _AverageState(); 15 | } 16 | 17 | class _AverageState extends State { 18 | List> questionsAndAnswers = []; 19 | bool isLoading = true; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | fetchQuestionsAndAnswers(); 25 | } 26 | 27 | Future fetchQuestionsAndAnswers() async { 28 | try { 29 | final response = await http.get(Uri.parse( 30 | 'https://script.google.com/macros/s/AKfycbwrB8UnoW93CW1PcYUcdK7TkWmvpCRUV3GPzbuBv0E9GVTscZw0xsaiG7jgthVfM63a/exec')); 31 | if (response.statusCode == 200) { 32 | final data = json.decode(response.body)['data'] as List; 33 | setState(() { 34 | questionsAndAnswers = data 35 | .map((item) => { 36 | 'question': item['question'].toString(), 37 | 'answer': item['answer'].toString(), 38 | }) 39 | .toList(); 40 | isLoading = false; // Set loading state to false when data is fetched 41 | }); 42 | } else { 43 | print('Request failed with status: ${response.statusCode}.'); 44 | } 45 | } catch (error) { 46 | print('Error: $error'); 47 | } 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | final appState = Provider.of(context); 53 | 54 | return Scaffold( 55 | appBar: AppBar( 56 | iconTheme: IconThemeData( 57 | color: appState.isDarkMode ? Colors.white : Colors.black, 58 | ), 59 | centerTitle: true, 60 | backgroundColor: 61 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 62 | title: Text( 63 | 'Average', 64 | style: TextStyle( 65 | color: appState.isDarkMode ? Colors.white : Colors.black, 66 | ), 67 | ), 68 | ), 69 | body: isLoading 70 | ? Center(child: CircularProgressIndicator()) 71 | : ListView.builder( 72 | itemCount: questionsAndAnswers.length, 73 | itemBuilder: (context, index) { 74 | return QuestionAnswerTile( 75 | question: questionsAndAnswers[index]['question']!, 76 | answer: questionsAndAnswers[index]['answer']!, 77 | ); 78 | }, 79 | ), 80 | ); 81 | } 82 | } 83 | 84 | class QuestionAnswerTile extends StatefulWidget { 85 | final String question; 86 | final String answer; 87 | 88 | const QuestionAnswerTile({ 89 | Key? key, 90 | required this.question, 91 | required this.answer, 92 | }) : super(key: key); 93 | 94 | @override 95 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 96 | } 97 | 98 | class _QuestionAnswerTileState extends State { 99 | bool isExpanded = false; 100 | 101 | @override 102 | Widget build(BuildContext context) { 103 | return ExpansionTile( 104 | title: Text( 105 | widget.question, 106 | style: TextStyle(fontWeight: FontWeight.bold), 107 | ), 108 | children: [ 109 | ListTile( 110 | title: Text( 111 | widget.answer, 112 | ), 113 | ), 114 | ], 115 | initiallyExpanded: isExpanded, 116 | onExpansionChanged: (value) { 117 | setState(() { 118 | isExpanded = value; 119 | }); 120 | }, 121 | ); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/MixtureAndAlligation.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class MixtureAndAlligation extends StatefulWidget { 9 | const MixtureAndAlligation(); 10 | 11 | @override 12 | _MixtureAndAlligationState createState() => _MixtureAndAlligationState(); 13 | } 14 | 15 | class _MixtureAndAlligationState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbxvalcXrDHTgo5E8_s0qa7xcen_XYgzI9Y64nVGbRkFJ9Vr16VLMPmfOV6Q79VGkNUY/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Mixture and Alligation', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/Numbers.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | // import 'package:expansion_tile/expansion_tile.dart'; 8 | 9 | class Numbers extends StatefulWidget { 10 | const Numbers(); 11 | 12 | @override 13 | _NumbersState createState() => _NumbersState(); 14 | } 15 | 16 | class _NumbersState extends State { 17 | List> questionsAndAnswers = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchQuestionsAndAnswers(); 24 | } 25 | 26 | Future fetchQuestionsAndAnswers() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbx20IkFZK1L6MMHrOrsqL_OJIMyDORNovpYeR0NpJtn2IzNfR7l2yi2ThPBzi1-xpWm/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | questionsAndAnswers = data 34 | .map((item) => { 35 | 'question': item['question'].toString(), 36 | 'answer': item['answer'].toString(), 37 | }) 38 | .toList(); 39 | isLoading = false; // Set loading state to false when data is fetched 40 | }); 41 | } else { 42 | print('Request failed with status: ${response.statusCode}.'); 43 | } 44 | } catch (error) { 45 | print('Error: $error'); 46 | } 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final appState = Provider.of(context); 52 | 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black, 57 | ), 58 | centerTitle: true, 59 | backgroundColor: 60 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 61 | title: Text( 62 | 'Numbers', 63 | style: TextStyle( 64 | color: appState.isDarkMode ? Colors.white : Colors.black, 65 | ), 66 | ), 67 | ), 68 | body: isLoading 69 | ? Center(child: CircularProgressIndicator()) 70 | : ListView.builder( 71 | itemCount: questionsAndAnswers.length, 72 | itemBuilder: (context, index) { 73 | return QuestionAnswerTile( 74 | question: questionsAndAnswers[index]['question']!, 75 | answer: questionsAndAnswers[index]['answer']!, 76 | ); 77 | }, 78 | ), 79 | ); 80 | } 81 | } 82 | 83 | class QuestionAnswerTile extends StatefulWidget { 84 | final String question; 85 | final String answer; 86 | 87 | const QuestionAnswerTile({ 88 | Key? key, 89 | required this.question, 90 | required this.answer, 91 | }) : super(key: key); 92 | 93 | @override 94 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 95 | } 96 | 97 | class _QuestionAnswerTileState extends State { 98 | bool isExpanded = false; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | return ExpansionTile( 103 | title: Text( 104 | widget.question, 105 | style: TextStyle(fontWeight: FontWeight.bold), 106 | ), 107 | children: [ 108 | ListTile( 109 | title: Text(widget.answer), 110 | ), 111 | ], 112 | initiallyExpanded: isExpanded, 113 | onExpansionChanged: (value) { 114 | setState(() { 115 | isExpanded = value; 116 | }); 117 | }, 118 | ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/Percentage.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | // import 'package:expansion_tile/expansion_tile.dart'; 8 | 9 | class Percentage extends StatefulWidget { 10 | const Percentage(); 11 | 12 | @override 13 | _PercentageState createState() => _PercentageState(); 14 | } 15 | 16 | class _PercentageState extends State { 17 | List> questionsAndAnswers = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchQuestionsAndAnswers(); 24 | } 25 | 26 | Future fetchQuestionsAndAnswers() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbwLO9du0r3ZpGYwYamuBcg9jpLv0jC4gcFJcDuWeV3beL-YF9M80w8N5kYx60VISRlN/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | questionsAndAnswers = data 34 | .map((item) => { 35 | 'question': item['question'].toString(), 36 | 'answer': item['answer'].toString(), 37 | }) 38 | .toList(); 39 | isLoading = false; // Set loading state to false when data is fetched 40 | }); 41 | } else { 42 | print('Request failed with status: ${response.statusCode}.'); 43 | } 44 | } catch (error) { 45 | print('Error: $error'); 46 | } 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final appState = Provider.of(context); 52 | 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black, 57 | ), 58 | centerTitle: true, 59 | backgroundColor: 60 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 61 | title: Text( 62 | 'Percentage', 63 | style: TextStyle( 64 | color: appState.isDarkMode ? Colors.white : Colors.black, 65 | ), 66 | ), 67 | ), 68 | body: isLoading 69 | ? Center(child: CircularProgressIndicator()) 70 | : ListView.builder( 71 | itemCount: questionsAndAnswers.length, 72 | itemBuilder: (context, index) { 73 | return QuestionAnswerTile( 74 | question: questionsAndAnswers[index]['question']!, 75 | answer: questionsAndAnswers[index]['answer']!, 76 | ); 77 | }, 78 | ), 79 | ); 80 | } 81 | } 82 | 83 | class QuestionAnswerTile extends StatefulWidget { 84 | final String question; 85 | final String answer; 86 | 87 | const QuestionAnswerTile({ 88 | Key? key, 89 | required this.question, 90 | required this.answer, 91 | }) : super(key: key); 92 | 93 | @override 94 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 95 | } 96 | 97 | class _QuestionAnswerTileState extends State { 98 | bool isExpanded = false; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | return ExpansionTile( 103 | title: Text( 104 | widget.question, 105 | style: TextStyle(fontWeight: FontWeight.bold), 106 | ), 107 | children: [ 108 | ListTile( 109 | title: Text(widget.answer), 110 | ), 111 | ], 112 | initiallyExpanded: isExpanded, 113 | onExpansionChanged: (value) { 114 | setState(() { 115 | isExpanded = value; 116 | }); 117 | }, 118 | ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/ProftAndLoss.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | // import 'package:expansion_tile/expansion_tile.dart'; 8 | 9 | class ProfitAndLoss extends StatefulWidget { 10 | const ProfitAndLoss(); 11 | 12 | @override 13 | _ProfitAndLossState createState() => _ProfitAndLossState(); 14 | } 15 | 16 | class _ProfitAndLossState extends State { 17 | List> questionsAndAnswers = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchQuestionsAndAnswers(); 24 | } 25 | 26 | Future fetchQuestionsAndAnswers() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbyY88RIWveIPTyGSEwVoZu26izRfYIEmI9hfZh-UbV-O1r1zPOPI6MJDgWlh-84ZSw/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | questionsAndAnswers = data 34 | .map((item) => { 35 | 'question': item['question'].toString(), 36 | 'answer': item['answer'].toString(), 37 | }) 38 | .toList(); 39 | isLoading = false; // Set loading state to false when data is fetched 40 | }); 41 | } else { 42 | print('Request failed with status: ${response.statusCode}.'); 43 | } 44 | } catch (error) { 45 | print('Error: $error'); 46 | } 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final appState = Provider.of(context); 52 | 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black, 57 | ), 58 | centerTitle: true, 59 | backgroundColor: 60 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 61 | title: Text( 62 | 'ProfitAndLoss', 63 | style: TextStyle( 64 | color: appState.isDarkMode ? Colors.white : Colors.black, 65 | ), 66 | ), 67 | ), 68 | body: isLoading 69 | ? Center(child: CircularProgressIndicator()) 70 | : ListView.builder( 71 | itemCount: questionsAndAnswers.length, 72 | itemBuilder: (context, index) { 73 | return QuestionAnswerTile( 74 | question: questionsAndAnswers[index]['question']!, 75 | answer: questionsAndAnswers[index]['answer']!, 76 | ); 77 | }, 78 | ), 79 | ); 80 | } 81 | } 82 | 83 | class QuestionAnswerTile extends StatefulWidget { 84 | final String question; 85 | final String answer; 86 | 87 | const QuestionAnswerTile({ 88 | Key? key, 89 | required this.question, 90 | required this.answer, 91 | }) : super(key: key); 92 | 93 | @override 94 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 95 | } 96 | 97 | class _QuestionAnswerTileState extends State { 98 | bool isExpanded = false; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | return ExpansionTile( 103 | title: Text( 104 | widget.question, 105 | style: TextStyle(fontWeight: FontWeight.bold), 106 | ), 107 | children: [ 108 | ListTile( 109 | title: Text(widget.answer), 110 | ), 111 | ], 112 | initiallyExpanded: isExpanded, 113 | onExpansionChanged: (value) { 114 | setState(() { 115 | isExpanded = value; 116 | }); 117 | }, 118 | ); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/RatioAndProportion.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | // import 'package:expansion_tile/expansion_tile.dart'; 8 | 9 | class RatioAndProportion extends StatefulWidget { 10 | const RatioAndProportion(); 11 | 12 | @override 13 | _RatioAndProportionState createState() => _RatioAndProportionState(); 14 | } 15 | 16 | class _RatioAndProportionState extends State { 17 | List> questionsAndAnswers = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchQuestionsAndAnswers(); 24 | } 25 | 26 | Future fetchQuestionsAndAnswers() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbxwoa0PhSVPUGFF5sim5OcVX7tKlSGwpKThHKDsS0HFlevgDCgYLJF3YSbS-v20_TQ-/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | questionsAndAnswers = data 34 | .map((item) => { 35 | 'question': item['question'].toString(), 36 | 'answer': item['answer'].toString(), 37 | }) 38 | .toList(); 39 | isLoading = false; // Set loading state to false when data is fetched 40 | }); 41 | } else { 42 | print('Request failed with status: ${response.statusCode}.'); 43 | } 44 | } catch (error) { 45 | print('Error: $error'); 46 | } 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final appState = Provider.of(context); 52 | 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black, 57 | ), 58 | centerTitle: true, 59 | backgroundColor: 60 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 61 | title: Text( 62 | 'Ratio And Proportion', 63 | style: TextStyle( 64 | color: appState.isDarkMode ? Colors.white : Colors.black, 65 | ), 66 | ), 67 | ), 68 | body: isLoading 69 | ? Center(child: CircularProgressIndicator()) 70 | : ListView.builder( 71 | itemCount: questionsAndAnswers.length, 72 | itemBuilder: (context, index) { 73 | return QuestionAnswerTile( 74 | question: questionsAndAnswers[index]['question']!, 75 | answer: questionsAndAnswers[index]['answer']!, 76 | ); 77 | }, 78 | ), 79 | ); 80 | } 81 | } 82 | 83 | class QuestionAnswerTile extends StatefulWidget { 84 | final String question; 85 | final String answer; 86 | 87 | const QuestionAnswerTile({ 88 | Key? key, 89 | required this.question, 90 | required this.answer, 91 | }) : super(key: key); 92 | 93 | @override 94 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 95 | } 96 | 97 | class _QuestionAnswerTileState extends State { 98 | bool isExpanded = false; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | return ExpansionTile( 103 | title: Text( 104 | widget.question, 105 | style: TextStyle(fontWeight: FontWeight.bold), 106 | ), 107 | children: [ 108 | ListTile( 109 | title: Text( 110 | widget.answer, 111 | ), 112 | ), 113 | ], 114 | initiallyExpanded: isExpanded, 115 | onExpansionChanged: (value) { 116 | setState(() { 117 | isExpanded = value; 118 | }); 119 | }, 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/TimeAndWork.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class TimeAndWork extends StatefulWidget { 9 | const TimeAndWork(); 10 | 11 | @override 12 | _TimeAndWorkState createState() => _TimeAndWorkState(); 13 | } 14 | 15 | class _TimeAndWorkState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbzWPmeH4MwJSEOhPYHe9N1gKxCOFbsCwI4ZPlb3UpLJxPEysK47A721SC7swwzT0Rmu/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Time and Work', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Aptitude/TimeDistanceAndSpeed.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class TimeDistanceAndSpeed extends StatefulWidget { 9 | const TimeDistanceAndSpeed(); 10 | 11 | @override 12 | _TimeDistanceAndSpeedState createState() => _TimeDistanceAndSpeedState(); 13 | } 14 | 15 | class _TimeDistanceAndSpeedState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbz-iMv_TvbDJc5p2zVEJo9Jo1j1CTowgtCPYQASQI_uNXtiRc-fcJdJiqJwO6eerGKy/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Time Distance and Speed', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/CoreConcepts/ComputerNetworks.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class ComputerNetworks extends StatefulWidget { 9 | const ComputerNetworks(); 10 | 11 | @override 12 | _ComputerNetworksState createState() => _ComputerNetworksState(); 13 | } 14 | 15 | class _ComputerNetworksState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbznpQX7TDZAsa_A2sz8_133mExeW3433L0Zbdk0j1FxLESnxg3r37JYkVP4lIcwwRwf/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Computer Networks', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/CoreConcepts/DBMS2.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class DBMS2 extends StatefulWidget { 9 | const DBMS2(); 10 | 11 | @override 12 | _DBMS2State createState() => _DBMS2State(); 13 | } 14 | 15 | class _DBMS2State extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbyPoc6UQ363u6cmE3n1VFDBuel2QmcL11BhbLAftX2kxZIlb0sYa4Vhqg6drdArkxE/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'DBMS', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/CoreConcepts/OperatingSystem2.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class OperatingSystem2 extends StatefulWidget { 9 | const OperatingSystem2(); 10 | 11 | @override 12 | _OperatingSystem2State createState() => _OperatingSystem2State(); 13 | } 14 | 15 | class _OperatingSystem2State extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbyXZaAm0-D3qSxm_oR0aG-aNnkzDdVRhiCeLKlGI_ZlRRPfTdq_BgVNmBzkfrfb-92Z/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Operating System', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/DsaInterview/DsaProblems.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class DsaProblems extends StatefulWidget { 9 | const DsaProblems(); 10 | 11 | @override 12 | _DsaProblemsState createState() => _DsaProblemsState(); 13 | } 14 | 15 | class _DsaProblemsState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbybApV_cAp5YKv3-z_M4MTEENzZN2L4lCzzSMVBS6vTsyIVi6jKGAqXxaN5MzYM9Qgz/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'DSA Problems ', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/DsaInterview/DsaQuestion.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class DsaQuestion extends StatefulWidget { 9 | const DsaQuestion(); 10 | 11 | @override 12 | _DsaQuestionState createState() => _DsaQuestionState(); 13 | } 14 | 15 | class _DsaQuestionState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbybApV_cAp5YKv3-z_M4MTEENzZN2L4lCzzSMVBS6vTsyIVi6jKGAqXxaN5MzYM9Qgz/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'DSA Questions and Answers ', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/HR/h_r.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/AppState.dart'; 2 | import 'package:codebooter_study_app/utils/Colors.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; 6 | 7 | class HR extends StatelessWidget { 8 | const HR(); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final appState = Provider.of(context); 13 | return Scaffold( 14 | appBar: AppBar( 15 | iconTheme: IconThemeData( 16 | color: appState.isDarkMode ? Colors.white : Colors.black, 17 | ), 18 | centerTitle: true, 19 | backgroundColor: 20 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 21 | title: Text( 22 | 'HR Preparation', 23 | style: TextStyle( 24 | color: appState.isDarkMode ? Colors.white : Colors.black), 25 | ), 26 | ), 27 | body: SfPdfViewer.network( 28 | 'https://raw.githubusercontent.com/codebooter-projects/Pdfs/d4e276552489312799f33cf918baf33cf9158a8f/hr_compressed.pdf', // Replace with the path to your PDF file 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/MockInterview/MockInterview.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/utils/Dimensions.dart'; 2 | 3 | import 'package:codebooter_study_app/AppState.dart'; 4 | import 'package:codebooter_study_app/Client/Screens/InterviePrep/MockInterview/MockVideoPlayer.dart'; 5 | import 'package:codebooter_study_app/utils/Colors.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:http/http.dart' as http; 10 | import 'dart:convert'; 11 | 12 | 13 | class MockInterview extends StatefulWidget { 14 | const MockInterview(); 15 | 16 | @override 17 | _MockInterviewState createState() => _MockInterviewState(); 18 | } 19 | 20 | class _MockInterviewState extends State { 21 | List videoIds = []; // List to store video IDs 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | fetchVideoIds(); // Call the function to fetch video IDs on widget initialization 27 | } 28 | 29 | Future fetchVideoIds() async { 30 | final apiUrl = Uri.parse( 31 | 'https://script.google.com/macros/s/AKfycbyH5eEXmH04wxr5CV0dG-a692733dgUWrwf07iAZx159nm2d_aSiTx1KhzLRkhQ7pJi/exec'); // Replace with your API endpoint 32 | final response = await http.get(apiUrl); 33 | if (response.statusCode == 200) { 34 | final jsonData = jsonDecode(response.body); 35 | final data = jsonData['data']; 36 | List fetchedVideoIds = []; 37 | for (var item in data) { 38 | final videoId = item['question']; 39 | fetchedVideoIds.add(videoId); 40 | } 41 | setState(() { 42 | videoIds = fetchedVideoIds; // Update the video IDs in the state 43 | }); 44 | } else { 45 | // Handle API error 46 | print('API request failed with status code ${response.statusCode}'); 47 | } 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | final appState = Provider.of(context); 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black, 57 | ), 58 | centerTitle: true, 59 | backgroundColor: appState.isDarkMode 60 | ? AppColors.primaryColor 61 | : AppColors.lightModePrimary, 62 | title: Text( 63 | 'MockInterview Preparation', 64 | style: TextStyle( 65 | color: appState.isDarkMode ? Colors.white : Colors.black, 66 | ), 67 | ), 68 | ), 69 | body: Container( 70 | child: ListView.builder( 71 | itemCount: videoIds.length, 72 | itemBuilder: (context, index) { 73 | final videoId = videoIds[index]; 74 | return Padding( 75 | padding: const EdgeInsets.symmetric( 76 | horizontal: 8.0, vertical: 8.0), // Add vertical padding 77 | child: Container( 78 | width: dimension.height80, 79 | height: dimension.height230, 80 | decoration: BoxDecoration( 81 | border: Border.all(color: AppColors.shadowColor), 82 | borderRadius: BorderRadius.circular(8.0), 83 | ), 84 | child: Container( 85 | color: appState.isDarkMode 86 | ? AppColors.primaryColor 87 | : AppColors.lightModePrimary, 88 | height: dimension.height230, 89 | child: ClickableVideoContainer( 90 | videoId: videoId, 91 | ), 92 | ), 93 | ), 94 | ); 95 | }, 96 | ), 97 | ), 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Programming/JavaProgramming.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class JavaProgramming extends StatefulWidget { 9 | const JavaProgramming(); 10 | 11 | @override 12 | _JavaProgrammingState createState() => _JavaProgrammingState(); 13 | } 14 | 15 | class _JavaProgrammingState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbzm4dH_Byejd7V_M8eQA4D1A8NX9gwVg_0Zi-N_ABAk03ZBUch7Kv6JuMhVSggtxxQN/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'Java Programming', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Programming/JsProgramming.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | class JsProgramming extends StatefulWidget { 9 | const JsProgramming(); 10 | 11 | @override 12 | _JsProgrammingState createState() => _JsProgrammingState(); 13 | } 14 | 15 | class _JsProgrammingState extends State { 16 | List> questionsAndAnswers = []; 17 | bool isLoading = true; 18 | 19 | @override 20 | void initState() { 21 | super.initState(); 22 | fetchQuestionsAndAnswers(); 23 | } 24 | 25 | Future fetchQuestionsAndAnswers() async { 26 | try { 27 | final response = await http.get(Uri.parse( 28 | 'https://script.google.com/macros/s/AKfycbwvQiRHv8SrEKadyUtnvr9uqarZcH27eIvUmwwi-fmqb2H4HXtNBKcZWSX_ok-TAy5K/exec')); 29 | if (response.statusCode == 200) { 30 | final data = json.decode(response.body)['data'] as List; 31 | setState(() { 32 | questionsAndAnswers = data 33 | .map((item) => { 34 | 'question': item['question'] as String, 35 | 'answer': item['answer'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black), 56 | centerTitle: true, 57 | backgroundColor: 58 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 59 | title: Text( 60 | 'JavaScript Language ', 61 | style: TextStyle( 62 | color: appState.isDarkMode ? Colors.white : Colors.black, 63 | ), 64 | ), 65 | ), 66 | body: isLoading // Check if data is still loading 67 | ? const Center( 68 | child: CircularProgressIndicator()) // Show loading indicator 69 | : ListView.builder( 70 | itemCount: questionsAndAnswers.length, 71 | itemBuilder: (context, index) { 72 | return QuestionAnswerTile( 73 | question: questionsAndAnswers[index]['question']!, 74 | answer: questionsAndAnswers[index]['answer']!, 75 | ); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class QuestionAnswerTile extends StatefulWidget { 83 | final String question; 84 | final String answer; 85 | 86 | const QuestionAnswerTile( 87 | {Key? key, required this.question, required this.answer}) 88 | : super(key: key); 89 | 90 | @override 91 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 92 | } 93 | 94 | class _QuestionAnswerTileState extends State { 95 | bool isExpanded = false; 96 | 97 | @override 98 | Widget build(BuildContext context) { 99 | return ExpansionPanelList( 100 | elevation: 1, 101 | expandedHeaderPadding: EdgeInsets.zero, 102 | expansionCallback: (int index, bool isExpanded) { 103 | setState(() { 104 | this.isExpanded = !isExpanded; 105 | }); 106 | }, 107 | children: [ 108 | ExpansionPanel( 109 | headerBuilder: (BuildContext context, bool isExpanded) { 110 | return ListTile( 111 | title: Text( 112 | widget.question, 113 | style: const TextStyle( 114 | fontWeight: FontWeight.bold, 115 | ), 116 | ), 117 | ); 118 | }, 119 | body: ListTile( 120 | title: Text(widget.answer), 121 | ), 122 | isExpanded: isExpanded, 123 | ), 124 | ], 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/Programming/SqlProgramming.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | 8 | 9 | class SqlProgramming extends StatefulWidget { 10 | const SqlProgramming(); 11 | 12 | @override 13 | _SqlProgrammingState createState() => _SqlProgrammingState(); 14 | } 15 | 16 | class _SqlProgrammingState extends State { 17 | List> questionsAndAnswers = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchQuestionsAndAnswers(); 24 | } 25 | 26 | Future fetchQuestionsAndAnswers() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbzxN51auob5KIE4eAVmPCoPJ2wdH2IhY7OAHljxy-oqa5EpolgAj6NKsQA6YS3FCB6u/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | questionsAndAnswers = data 34 | .map((item) => { 35 | 'question': item['question'] as String, 36 | 'answer': item['answer'] as String, 37 | }) 38 | .toList(); 39 | isLoading = false; // Set loading state to false when data is fetched 40 | }); 41 | } else { 42 | print('Request failed with status: ${response.statusCode}.'); 43 | } 44 | } catch (error) { 45 | print('Error: $error'); 46 | } 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | final appState = Provider.of(context); 52 | 53 | return Scaffold( 54 | appBar: AppBar( 55 | iconTheme: IconThemeData( 56 | color: appState.isDarkMode ? Colors.white : Colors.black), 57 | centerTitle: true, 58 | backgroundColor: 59 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 60 | title: Text( 61 | 'SQL Language', 62 | style: TextStyle( 63 | color: appState.isDarkMode ? Colors.white : Colors.black, 64 | ), 65 | ), 66 | ), 67 | body: isLoading // Check if data is still loading 68 | ? const Center( 69 | child: CircularProgressIndicator()) // Show loading indicator 70 | : ListView.builder( 71 | itemCount: questionsAndAnswers.length, 72 | itemBuilder: (context, index) { 73 | return QuestionAnswerTile( 74 | question: questionsAndAnswers[index]['question']!, 75 | answer: questionsAndAnswers[index]['answer']!, 76 | ); 77 | }, 78 | ), 79 | ); 80 | } 81 | } 82 | 83 | class QuestionAnswerTile extends StatefulWidget { 84 | final String question; 85 | final String answer; 86 | 87 | const QuestionAnswerTile( 88 | {Key? key, required this.question, required this.answer}) 89 | : super(key: key); 90 | 91 | @override 92 | _QuestionAnswerTileState createState() => _QuestionAnswerTileState(); 93 | } 94 | 95 | class _QuestionAnswerTileState extends State { 96 | bool isExpanded = false; 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | return ExpansionPanelList( 101 | elevation: 1, 102 | expandedHeaderPadding: EdgeInsets.zero, 103 | expansionCallback: (int index, bool isExpanded) { 104 | setState(() { 105 | this.isExpanded = !isExpanded; 106 | }); 107 | }, 108 | children: [ 109 | ExpansionPanel( 110 | headerBuilder: (BuildContext context, bool isExpanded) { 111 | return ListTile( 112 | title: Text( 113 | widget.question, 114 | style: const TextStyle( 115 | fontWeight: FontWeight.bold, 116 | ), 117 | ), 118 | ); 119 | }, 120 | body: ListTile( 121 | title: Text(widget.answer), 122 | ), 123 | isExpanded: isExpanded, 124 | ), 125 | ], 126 | ); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /lib/Client/Screens/InterviePrep/TopResumes/TopResumes.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:codebooter_study_app/AppState.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | import 'package:provider/provider.dart'; 7 | import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart'; 8 | 9 | class TopResumes extends StatefulWidget { 10 | const TopResumes(); 11 | 12 | @override 13 | _TopResumesState createState() => _TopResumesState(); 14 | } 15 | 16 | class _TopResumesState extends State { 17 | List> resume = []; 18 | bool isLoading = true; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | fetchResume(); 24 | } 25 | 26 | Future fetchResume() async { 27 | try { 28 | final response = await http.get(Uri.parse( 29 | 'https://script.google.com/macros/s/AKfycbyiee_Ar4oKxBKlTfnO8ma3xcaBzgv2x_BH9rEEmIZj6NRYdS2TKtjfZ_JL0ENR55Z9/exec')); 30 | if (response.statusCode == 200) { 31 | final data = json.decode(response.body)['data'] as List; 32 | setState(() { 33 | resume = data 34 | .map((item) => { 35 | 'resume': item['resume'] as String, 36 | }) 37 | .toList(); 38 | isLoading = false; // Set loading state to false when data is fetched 39 | }); 40 | } else { 41 | print('Request failed with status: ${response.statusCode}.'); 42 | } 43 | } catch (error) { 44 | print('Error: $error'); 45 | } 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final appState = Provider.of(context); 51 | 52 | return Scaffold( 53 | appBar: AppBar( 54 | iconTheme: IconThemeData( 55 | color: appState.isDarkMode ? Colors.white : Colors.black, 56 | ), 57 | centerTitle: true, 58 | backgroundColor: 59 | appState.isDarkMode ? AppColors.primaryColor : Colors.white, 60 | title: Text( 61 | 'Referenced Resumes', 62 | style: TextStyle( 63 | color: appState.isDarkMode ? Colors.white : Colors.black), 64 | ), 65 | ), 66 | body: Column( 67 | children: [ 68 | Expanded( 69 | child: ListView.builder( 70 | itemCount: resume.length, 71 | itemBuilder: (BuildContext context, int index) { 72 | final resumeLink = resume[index]['resume']; 73 | return Container( 74 | margin: EdgeInsets.all(8.0), 75 | child: InkWell( 76 | onTap: () { 77 | Navigator.push( 78 | context, 79 | MaterialPageRoute( 80 | builder: (context) => Scaffold( 81 | appBar: AppBar( 82 | title: Text('Resume'), 83 | ), 84 | body: SfPdfViewer.network(resumeLink!), 85 | ), 86 | ), 87 | ); 88 | }, 89 | child: Container( 90 | height: 200, 91 | width: 200, 92 | padding: EdgeInsets.all(16.0), 93 | decoration: BoxDecoration( 94 | border: Border.all(color: Colors.grey), 95 | ), 96 | child: Row( 97 | children: [ 98 | // Icon(Icons.picture_as_pdf), 99 | Expanded( 100 | child: SfPdfViewer.network(resumeLink!), 101 | ), 102 | SizedBox(width: 16.0), 103 | Text('Open'), 104 | ], 105 | ), 106 | ), 107 | ), 108 | ); 109 | }, 110 | ), 111 | ), 112 | ], 113 | ), 114 | ); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/Client/Screens/help.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Help extends StatefulWidget { 5 | const Help({super.key}); 6 | 7 | @override 8 | State createState() => _HelpState(); 9 | } 10 | 11 | class _HelpState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: const Text('Help'), 17 | ), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/Client/Screens/jobs/FetchApi.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/Client/Screens/jobs/JobModel.dart'; 2 | import 'package:http/http.dart'; 3 | import 'dart:convert'; 4 | 5 | class FetchJobApi { 6 | String endpoint = 7 | "https://ptg00pthu8.execute-api.ap-south-1.amazonaws.com/dev/api/v1/jobs"; 8 | Future> getJobs() async { 9 | Response response = await get(Uri.parse(endpoint)); 10 | if (response.statusCode == 200) { 11 | final List result = jsonDecode(response.body)['jobs']; 12 | return result.map(((e) => JobModel.fromJson(e))).toList(); 13 | } else { 14 | throw Exception(response.reasonPhrase); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/Client/Screens/jobs/JobBloc/JobBloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/Client/Screens/jobs/FetchApi.dart'; 2 | import 'package:codebooter_study_app/Client/Screens/jobs/JobBloc/JobEvent.dart'; 3 | import 'package:codebooter_study_app/Client/Screens/jobs/JobBloc/JobState.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | 6 | class JobBloc extends Bloc { 7 | final FetchJobApi _fetchJobApi; 8 | JobBloc(this._fetchJobApi) : super(JobLoadingState()) { 9 | on((event, emit) async { 10 | emit(JobLoadingState()); 11 | try { 12 | final jobs = await _fetchJobApi.getJobs(); 13 | emit(JobLoadedState(jobs)); 14 | } catch (e) { 15 | emit(JobErrorState(e.toString())); 16 | } 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Client/Screens/jobs/JobBloc/JobEvent.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @immutable 5 | abstract class JobEvent extends Equatable { 6 | const JobEvent(); 7 | } 8 | 9 | class LoadJobEvent extends JobEvent { 10 | @override 11 | List get props => []; 12 | } 13 | -------------------------------------------------------------------------------- /lib/Client/Screens/jobs/JobBloc/JobState.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/Client/Screens/jobs/JobModel.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | @immutable 6 | abstract class JobState extends Equatable {} 7 | 8 | //data loading state 9 | class JobLoadingState extends JobState { 10 | @override 11 | List get props => []; 12 | } 13 | 14 | //data loaded state 15 | 16 | class JobLoadedState extends JobState { 17 | JobLoadedState(this.jobs); 18 | final List jobs; 19 | 20 | @override 21 | List get props => [jobs]; 22 | } 23 | 24 | //data loading error state 25 | class JobErrorState extends JobState { 26 | JobErrorState(this.error); 27 | final String error; 28 | @override 29 | List get props => []; 30 | } 31 | -------------------------------------------------------------------------------- /lib/Client/Screens/jobs/JobModel.dart: -------------------------------------------------------------------------------- 1 | class JobModel { 2 | String imageAsset; 3 | String title; 4 | String stipend; 5 | String duration; 6 | String location; 7 | String deadline; 8 | String applyLink; 9 | 10 | JobModel({ 11 | required this.imageAsset, 12 | required this.title, 13 | required this.stipend, 14 | required this.duration, 15 | required this.location, 16 | required this.deadline, 17 | required this.applyLink, 18 | }); 19 | 20 | factory JobModel.fromJson(Map json) { 21 | String defaultImageAsset = 22 | 'https://i.pinimg.com/474x/75/d5/52/75d552f374cb3a61d23c05921e49840b.jpg'; 23 | 24 | String imageAsset = json['imageAssest']; 25 | if (imageAsset == Null || 26 | imageAsset.isEmpty || 27 | !Uri.parse(imageAsset).isAbsolute) { 28 | imageAsset = defaultImageAsset; 29 | } 30 | 31 | return JobModel( 32 | imageAsset: imageAsset, 33 | title: json['title'], 34 | stipend: json['stipend'], 35 | duration: json['duration'], 36 | location: json['location'], 37 | deadline: json['deadline'].toString(), 38 | applyLink: json['applyLink'], 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/Client/home/JobInternshipScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/AppState.dart'; 2 | import 'package:codebooter_study_app/Client/Screens/jobs/JobInternship.dart'; 3 | import 'package:codebooter_study_app/utils/Colors.dart'; 4 | import 'package:codebooter_study_app/utils/Dimensions.dart'; 5 | import 'package:codebooter_study_app/widgets/BigText.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | 10 | 11 | class JobInternshipScreen extends StatefulWidget { 12 | const JobInternshipScreen({super.key}); 13 | 14 | @override 15 | State createState() => _DsaScreenState(); 16 | } 17 | 18 | class _DsaScreenState extends State { 19 | @override 20 | Widget build(BuildContext context) { 21 | final appState = Provider.of(context); 22 | return Scaffold( 23 | backgroundColor: appState.isDarkMode 24 | ? AppColors.primaryColor 25 | : AppColors.lightModePrimary, 26 | appBar: AppBar( 27 | elevation: 2, 28 | backgroundColor: appState.isDarkMode 29 | ? AppColors.primaryColor 30 | : AppColors.lightModePrimary, 31 | iconTheme: IconThemeData( 32 | color: appState.isDarkMode ? Colors.white : Colors.black, 33 | ), 34 | toolbarHeight: dimension.val70, 35 | centerTitle: true, 36 | title: bigText( 37 | text: "Jobs & Internships", 38 | color: appState.isDarkMode ? Colors.white : Colors.black, 39 | ), 40 | ), 41 | body: SingleChildScrollView( 42 | child: Padding( 43 | padding: EdgeInsets.only(left: dimension.val10), 44 | child: const JobInternships(value: 10000,)), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Client/home/Tour.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/utils/Dimensions.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:carousel_slider/carousel_slider.dart'; 4 | import 'package:get/get_navigation/src/routes/transitions_type.dart'; 5 | import 'package:go_router/go_router.dart'; 6 | 7 | class CarouselScreen extends StatefulWidget { 8 | const CarouselScreen({Key? key}) : super(key: key); 9 | 10 | @override 11 | _CarouselScreenState createState() => _CarouselScreenState(); 12 | } 13 | 14 | class _CarouselScreenState extends State { 15 | final List imagePaths = [ 16 | 'assets/images/tour1.png', 17 | 'assets/images/tour2.png', 18 | 'assets/images/tour3.png', 19 | ]; 20 | 21 | int currentIndex = 0; 22 | final CarouselController _carouselController = CarouselController(); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | backgroundColor: Colors.white, 28 | body: Stack( 29 | children: [ 30 | Positioned.fill( 31 | top: 10, // Distance added at the top 32 | child: CarouselSlider( 33 | carouselController: _carouselController, 34 | options: CarouselOptions( 35 | enableInfiniteScroll: false, 36 | autoPlayInterval: const Duration(seconds: 2), 37 | height: dimension.screenHeight * 0.8, // Adjusted image height 38 | autoPlay: false, 39 | enlargeCenterPage: true, 40 | aspectRatio: 16 / 9, 41 | viewportFraction: 0.8, 42 | onPageChanged: (index, reason) { 43 | setState(() { 44 | currentIndex = index; 45 | }); 46 | if (index == imagePaths.length - 1) { 47 | Future.delayed(const Duration(seconds: 1), () { 48 | GoRouter.of(context).go('/log'); 49 | }); 50 | } 51 | }, 52 | ), 53 | items: imagePaths.map((path) { 54 | return Builder( 55 | builder: (BuildContext context) { 56 | return Container( 57 | width: MediaQuery.of(context).size.width, 58 | margin: const EdgeInsets.symmetric(horizontal: 5.0), 59 | decoration: const BoxDecoration( 60 | color: Colors.transparent, 61 | ), 62 | child: Image.asset( 63 | path, 64 | fit: BoxFit.cover, 65 | ), 66 | ); 67 | }, 68 | ); 69 | }).toList(), 70 | ), 71 | ), 72 | Positioned( 73 | top: dimension.height100, 74 | right: dimension.width50, 75 | child: InkWell( 76 | onTap: () { 77 | final int nextIndex = currentIndex + 1; 78 | if (nextIndex < imagePaths.length) { 79 | setState(() { 80 | currentIndex = nextIndex; 81 | }); 82 | _carouselController.animateToPage(nextIndex); 83 | } else { 84 | GoRouter.of(context).go('/log'); 85 | } 86 | }, 87 | child: Container( 88 | padding: EdgeInsets.only(left: dimension.width10), 89 | child: Text( 90 | currentIndex == imagePaths.length - 1 ? 'Finish' : 'Next', 91 | style: TextStyle( 92 | color: const Color.fromARGB(255, 80, 80, 81), 93 | fontSize: dimension.font24, 94 | fontWeight: FontWeight.w400, 95 | ), 96 | ), 97 | ), 98 | ), 99 | ), 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:codebooter_study_app/AppState.dart'; 2 | import 'package:codebooter_study_app/Routes/PageRoutes.dart'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:provider/provider.dart'; 7 | import 'package:url_strategy/url_strategy.dart'; 8 | 9 | import 'package:firebase_core/firebase_core.dart'; 10 | 11 | Future main() async { 12 | WidgetsFlutterBinding.ensureInitialized(); 13 | await Firebase.initializeApp(); 14 | // add these lines 15 | WidgetsFlutterBinding.ensureInitialized(); 16 | SystemChrome.setPreferredOrientations( 17 | [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); 18 | //false debug mode 19 | 20 | setPathUrlStrategy(); 21 | return runApp( 22 | ChangeNotifierProvider(create: (_) => AppState(), child: App())); 23 | } 24 | -------------------------------------------------------------------------------- /lib/todo.txt: -------------------------------------------------------------------------------- 1 | -> video orientation -------------------------------------------------------------------------------- /lib/utils/Colors.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class AppColors { 5 | static bool isDarkMode = true; // Track the current mode 6 | 7 | static Color get primaryColor { 8 | return isDarkMode ? mainColor : lightModePrimary; 9 | } 10 | 11 | static Color get secondaryColor { 12 | return isDarkMode ? darkModeSecondary : lightModeSecondary; 13 | } 14 | 15 | static Color get textColor { 16 | return isDarkMode ? mainTextColor : lightTextColor; 17 | } 18 | 19 | static setDarkMode(bool value) { 20 | isDarkMode = value; 21 | } 22 | 23 | static const Color shadowColor = Color.fromRGBO(177, 203, 255, 1); 24 | // Dark mode colors 25 | static const Color mainColor = Color.fromARGB(255, 45, 45, 45); 26 | static const Color darkModeSecondary = Color.fromARGB(255, 0, 0, 0); 27 | static const Color mainTextColor = Color.fromARGB(255, 255, 255, 255); 28 | 29 | // Light mode colors 30 | static const Color lightModePrimary = Color.fromARGB(255, 255, 255, 255); 31 | static const Color lightModeSecondary = Color.fromARGB(255, 255, 255, 255); 32 | static const Color lightTextColor = Color.fromARGB(255, 26, 11, 28); 33 | 34 | // Rest of the color constants... 35 | } 36 | -------------------------------------------------------------------------------- /lib/widgets/BigText.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class bigText extends StatelessWidget { 4 | Color? color; 5 | final String text; 6 | double size; 7 | TextOverflow overFlow; 8 | FontWeight? fontWeight; 9 | 10 | bigText({ 11 | Key? key, 12 | this.color = const Color.fromARGB(255, 0, 0, 0), 13 | required this.text, 14 | this.size = 20, 15 | this.overFlow = TextOverflow.ellipsis, 16 | this.fontWeight = FontWeight.w500, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Text( 22 | text, 23 | overflow: overFlow, 24 | style: TextStyle( 25 | fontSize: size, 26 | fontWeight: fontWeight, 27 | color: color, 28 | fontFamily: 'Poppins', 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/widgets/SmallText.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class smallText extends StatelessWidget { 4 | Color? color; 5 | final String text; 6 | double size; 7 | TextOverflow overFlow; 8 | TextStyle? style; 9 | TextAlign? textAlign; 10 | 11 | smallText({ 12 | Key? key, 13 | this.color = const Color.fromARGB(255, 53, 53, 53), 14 | required this.text, 15 | this.size = 12, 16 | this.overFlow = TextOverflow.ellipsis, 17 | this.textAlign = TextAlign.left, 18 | this.style, 19 | }) : super(key: key); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Text( 24 | text, 25 | style: TextStyle( 26 | overflow: overFlow, 27 | fontSize: size, 28 | color: color, 29 | fontFamily: 'Poppins', 30 | ), 31 | textAlign: textAlign, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "codebooter_study_app"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "codebooter_study_app"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import device_info_plus 9 | import firebase_auth 10 | import firebase_core 11 | import path_provider_foundation 12 | import sqflite 13 | import syncfusion_pdfviewer_macos 14 | import url_launcher_macos 15 | 16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 17 | DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) 18 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) 19 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 21 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 22 | SyncfusionFlutterPdfViewerPlugin.register(with: registry.registrar(forPlugin: "SyncfusionFlutterPdfViewerPlugin")) 23 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 24 | } 25 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = CodeBooter; 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.codebooter.codebooterStudyApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.codebooter. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:codebooter_study_app/Routes/PageRoutes.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | // import 'package:codebooter_study_app/main.dart'; 13 | 14 | void main() { 15 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 16 | // Build our app and trigger a frame. 17 | await tester.pumpWidget(App()); 18 | 19 | // Verify that our counter starts at 0. 20 | expect(find.text('0'), findsOneWidget); 21 | expect(find.text('1'), findsNothing); 22 | 23 | // Tap the '+' icon and trigger a frame. 24 | await tester.tap(find.byIcon(Icons.add)); 25 | await tester.pump(); 26 | 27 | // Verify that our counter has incremented. 28 | expect(find.text('0'), findsNothing); 29 | expect(find.text('1'), findsOneWidget); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | CodeBooter 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codebooter_study_app", 3 | "short_name": "codebooter_study_app", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(codebooter_study_app LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "codebooter_study_app") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(SET CMP0063 NEW) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | # Generated plugin build rules, which manage building the plugins and adding 56 | # them to the application. 57 | include(flutter/generated_plugins.cmake) 58 | 59 | 60 | # === Installation === 61 | # Support files are copied into place next to the executable, so that it can 62 | # run in place. This is done instead of making a separate bundle (as on Linux) 63 | # so that building and running from within Visual Studio will work. 64 | set(BUILD_BUNDLE_DIR "$") 65 | # Make the "install" step default, as it's required to run. 66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 69 | endif() 70 | 71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 73 | 74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 75 | COMPONENT Runtime) 76 | 77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 78 | COMPONENT Runtime) 79 | 80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 81 | COMPONENT Runtime) 82 | 83 | if(PLUGIN_BUNDLED_LIBRARIES) 84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 86 | COMPONENT Runtime) 87 | endif() 88 | 89 | # Fully re-copy the assets directory on each build to avoid having stale files 90 | # from a previous install. 91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 92 | install(CODE " 93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 94 | " COMPONENT Runtime) 95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 97 | 98 | # Install the AOT library on non-Debug builds only. 99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 100 | CONFIGURATIONS Profile;Release 101 | COMPONENT Runtime) 102 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | FirebaseCorePluginCApiRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 16 | SyncfusionPdfviewerWindowsPluginRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("SyncfusionPdfviewerWindowsPlugin")); 18 | UrlLauncherWindowsRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 20 | } 21 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_core 7 | syncfusion_pdfviewer_windows 8 | url_launcher_windows 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.codebooter" "\0" 93 | VALUE "FileDescription", "CodeBooter" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "CodeBooter" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.codebooter. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "codebooter_study_app.exe" "\0" 98 | VALUE "ProductName", "CodeBooter" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"codebooter_study_app", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeBooter/Codebooter-flutter/91681ed989b8ec44bb2bb184be3f8249605405d1/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responsponds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | --------------------------------------------------------------------------------