diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 50defe410..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [palisadoes] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: PalisadoesFoundation/talawa -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 493322305..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us improve. -title: Bug Report -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. -2. -3. -4. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Actual behavior** -A clear and concise description of how the code performed w.r.t expectations. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional details** -Add any other context or screenshots about the feature request here. - -**Potential internship candidates** -Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359 diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 60d6401dc..000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Feature Request -about: Suggest an idea for this project -title: Feature Request -labels: feature request -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Approach to be followed (optional)** -A clear and concise description of approach to be followed. - -**Additional context** -Add any other context or screenshots about the feature request here. - -**Potential internship candidates** -Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359 diff --git a/.github/PR_TEMPLATE/pr-template.md b/.github/PR_TEMPLATE/pr-template.md deleted file mode 100644 index 0401cd75c..000000000 --- a/.github/PR_TEMPLATE/pr-template.md +++ /dev/null @@ -1,8 +0,0 @@ -- **What kind of change does this PR introduce:** -- **Issue Number:** -- **Did you add tests for your code?** -- **Snapshots/Videos:** -- **Does this PR introduce a breaking change?** -- **Other information:** -- **Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?** - diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml deleted file mode 100644 index b9789c2a3..000000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 -updates: - # Enable version updates for flutter's pub package manager - - package-ecosystem: "pub" - # Look for `pubspec.yaml` and `pubspec.lock` files in the `root` directory - directory: "/" - # Check the pub.dev registry for updates every day (weekdays) - schedule: - interval: "weekly" - target-branch: "develop" - # # Add default reviewers - # reviewers: - # - "palisadoes" - # - "randomUserName" - diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 2672715df..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,53 +0,0 @@ - - - - -**What kind of change does this PR introduce?** - - - -**Issue Number:** - -Fixes # - -**Did you add tests for your changes?** - - - -**Snapshots/Videos:** - - - -**If relevant, did you update the documentation?** - - - -**Summary** - - - - -**Does this PR introduce a breaking change?** - - - -**Other information** - - - -**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?** - - diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index 1e9a81eaf..000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Talawa GitHub Workflows Guidelines - -Follow these guidelines when contributing to this directory. - -## General - -Any changes to files in this directory are flagged when pull requests are run. Make changes only on the advice of a contributor. - -## YAML Workflow Files - -The YAML files in this directory have very specific roles depending on the type of workflow. - -Whenever possible you must ensure that: -1. The file roles below are maintained -1. The sequence of the jobs in the workflows are maintained using [GitHub Action dependencies](https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows). - -### File Roles -Follow these guidelines when creating new YAML defined GitHub actions. This is done to make troubleshooting easier. - -1. `Issue` Workflows: - 1. Place all actions related to issues in the `issues.yml` file. -1. `Pull Request` workflows to be run by: - 1. Workflows to run **First Time** repo contributors: - 1. Place all actions related to to this in the `pull-request-target.yml` file. - 1. Workflows to be run by **ALL** repo contributors: - 1. Place all actions related to pull requests in the `pull-request.yml` file. -1. `Push` workflows: - 1. Place all actions related to pushes in the `push.yml` file. - -#### File Role Exceptions - -There are some exceptions to these rules in which jobs can be placed in dedicated separate files: -1. Jobs that require unique `cron:` schedules -1. Jobs that require unique `paths:` statements that operate only when files in a specific path are updated. -1. Jobs only work correctly if they have a dedicated file (eg. `CodeQL`) - -## Scripts - -Follow these guidelines when creating or modifying scripts in this directory. - -1. All scripts in this directory must be written in python3 for consistency. -1. The python3 scripts must follow the following coding standards. Run these commands against your scripts before submitting PRs that modify or create python3 scripts in this directory. - 1. Pycodestyle - 1. Pydocstyle - 1. Pylint - 1. Flake8 -1. All scripts must run a main() function. diff --git a/.github/workflows/authorized-changes-detection.yml b/.github/workflows/authorized-changes-detection.yml deleted file mode 100644 index 1ccac228e..000000000 --- a/.github/workflows/authorized-changes-detection.yml +++ /dev/null @@ -1,31 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: Checking workflow files -on: - pull_request: - paths: - - '.github/**' - - 'analysis_options.yaml' - - 'pubspec.yaml' - - 'pubspec.lock' - - 'lib/main.dart' - - 'CODEOWNERS' - - 'LICENSE' - -jobs: - Checking-for-unauthorized-file-changes: - name: Checking for unauthorized file changes - runs-on: ubuntu-latest - - steps: - - name: Unauthorized file modification in PR - run: exit 1 diff --git a/.github/workflows/check_ignore.py b/.github/workflows/check_ignore.py deleted file mode 100755 index a8679b601..000000000 --- a/.github/workflows/check_ignore.py +++ /dev/null @@ -1,192 +0,0 @@ -#! /usr/bin/python3.10 - -import argparse -import os -import subprocess -import sys - -def _arg_parser_resolver(): - """Resolve the CLI arguments provided by the user. - - Args: - None - - Returns: - result: Parsed argument object - - """ - # Initialize parser and add the CLI options we should expect - parser = argparse.ArgumentParser() - - # Getting merge branch name - parser.add_argument( - '--merge_branch_name', type=str, required=True, - help='Name of the merging to branch') - - # Github repository - parser.add_argument( - '--repository', type=str, required=True, - help='Name of the GitHub repository in the format "/"') - - # Getting root directory of repository - parser.add_argument( - '--directory', type=str, required=False, - default=os.getcwd(), - help='The parent directory of files to analyze.') - - # Return parser - return parser.parse_args() - - -def _filepaths_in_directories(directories): - """Create a list of full file paths based on input directories. - - Args: - directories: A list of directories - - Returns: - result: A list of full file paths - - """ - # Initialize key variables - result = [] - - # Iterate and analyze each directory - for directory in directories: - for root, _, files in os.walk(directory, topdown=False): - for name in files: - # Read each file and count the lines found - result.append(os.path.join(root, name)) - # Return - return result - - -def _check_for_ignore_directive(filePath): - """Analyzes a given file and checks for presence of ignore directive corresponding - to any of the custom lint rules. - - A valid ignore directive consists of exactly 3 parts. - - - `//...`: where `...` represents that `/` can occur any number of times > 2. - - `ignore:` or `ignore_for_file:`: The part that distinguishes a normal comment from a - ignore directive. - - `name_of_lint_rule`: The rule that it is ignoring. - - These 3 parts may or may not have whitespace between them, but should strictly not have - any extra character. So - - - `//ignore:my_lint`, `/////ignore:my_lint`, `//ignore: my_lint` etc are all valid - ignore directives. - - `// / ignore: my_lint`, `// sdf ignore: my_lint` etc are all invalid ones. - - Args: - Path of the file to analyze - - Returns: - boolean: Whether the file contains ignore directive or not. - - """ - - # Either it is a non-code file, or the file does not exist. This can happen when - # `develop` gets ahead of your branch and has some files which you don't have - - if (not filePath.startswith('lib') or not filePath.endswith('.dart') or not os.path.exists(filePath)): - return False - - with open(filePath, "r") as file: - lines = file.readlines() - - for index, line in enumerate(lines): - # Remove any leading or trailing whitespace - content = line.strip() - - # If the line is empty or is a documentation (`///`) - if (content.endswith('/') or content == ''): - continue - - # Points to the character just after '/' ends. - # This is required because '/' can occur many times. - non_comment_pos = 0 - - while content[non_comment_pos] == '/': - non_comment_pos += 1 - - # Remove whitespace from non '/' part and split to whitespace - content = (content[non_comment_pos:].strip()).split(' ') - - # filter out empty strings, which happen because of 'sdf sdf' - # .split(' ') adds these whitespaces to the token list too. - content = [token for token in content if token != ''] - - # if somehow we still ended up with whitespaces. - if (len(content) == 0): - break - - # After removing the '/'s, only two possibilities remain - # 1. The `ignore...:` and `lint_rule_name` have no whitespace between them - # 2. They have some whitespace(s) between them - - if ((len(content) == 1 and - (content[0] == 'ignore_for_file:talawa_api_doc' - or content[0] == 'ignore:talawa_api_doc' - or content[0] == 'ignore_for_file:talawa_good_doc_comments' - or content[0] == 'ignore:talawa_good_doc_comments')) - or (len(content) == 2 and - ((content[0] == 'ignore_for_file:' and content[1] == 'talawa_api_doc') - or (content[0] == 'ignore:' and content[1] == 'talawa_api_doc') - or (content[0] == 'ignore_for_file:' and content[1] == 'talawa_good_doc_comments') - or (content[0] == 'ignore:' and content[1] == 'talawa_good_doc_comments')))): - - print(("Ignore directive found at line {}, which suppresses a custom lint rule.\n" - "Please remove this suppression and add valid documentation for the respective field(s).").format(index)) - - return True - - return False - - -def main(): - """Analyze dart files for custom lint rule suppression. - - Analyzes and prints the files that contain suppression for any custom - lint rule - - Returns: - None - - """ - - print(subprocess.check_output(['git', 'branch']).decode('utf-8').strip('\n')) - - current_branch = subprocess.check_output(['git', 'branch', '--show-current']).decode('utf-8').strip('\n') - print(current_branch) - changed_files = subprocess.check_output(['git', 'diff', '--name-only', 'develop', current_branch]).decode('utf-8').splitlines() - print(changed_files) - - - args = _arg_parser_resolver() - - # List of files where ignore directive is found - err = [] - - # Iterate and analyze each directory - for filepath in changed_files: - if _check_for_ignore_directive(filepath): - err.append(filepath) - - # If no changed/modified contains ignore directive for any custom lint rule - if len(err) == 0: - print( - '''🚀 {} Hurrah! No ignore directive found in any modified/added file(s)'''.format('\033[92m')) - sys.exit(0) - else: - print( - '''🔍 {}Ignore directive for custom lint rule found. Please remove them and add valid documentation.'''.format( - '\033[91m')) - for failing_file in err: - print('''>>> File name: {}\n'''.format(failing_file)) - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/.github/workflows/compare_translations.py b/.github/workflows/compare_translations.py deleted file mode 100644 index d8c0aff79..000000000 --- a/.github/workflows/compare_translations.py +++ /dev/null @@ -1,168 +0,0 @@ -""" -Script to encourage more efficient coding practices. - -Methodology: - - Utility for comparing translations between default and other languages. - - This module defines a function to compare two translations - and print any missing keys in the other language's translation. -Attributes: - - FileTranslation : Named tuple to represent a combination of file and missing translations. - - Fields: - - file (str): The file name. - - missing_translations (list): List of missing translations. - -Functions: - compare_translations(default_translation, other_translation): - Compare two translations and print missing keys. - - load_translation(filepath): - Load translation from a file. - - check_translations(): - Load the default translation and compare it with other translations. - - main(): - The main function to run the script. - Parses command-line arguments, checks for the existence of the specified directory, - and then calls check_translations with the provided or default directory. - - -Usage: - This script can be executed to check and print missing - translations in other languages based on the default English translation. - -Example: - python compare_translations.py -NOTE: - This script complies with our python3 coding and documentation standards - and should be used as a reference guide. It complies with: - - 1) Pylint - 2) Pydocstyle - 3) Pycodestyle - 4) Flake8 - -""" -# standard imports -import argparse -import json -import os -import sys -from collections import namedtuple - -# Named tuple for file and missing translations combination -FileTranslation = namedtuple("FileTranslation", ["file", "missing_translations"]) - - -def compare_translations(default_translation, other_translation, default_file, other_file): - """Compare two translations and return detailed info about missing/mismatched keys. - - Args: - default_translation (dict): The default translation (en.json). - other_translation (dict): The other language translation. - default_file (str): The name of the default translation file. - other_file (str): The name of the other translation file. - - Returns: - list: A list of detailed error messages for each missing/mismatched key. - """ - errors = [] - - # Check for missing keys in other_translation - for key in default_translation: - if key not in other_translation: - error_msg = f"Missing Key: '{key}' - This key from '{default_file}' is missing in '{other_file}'." - errors.append(error_msg) - - # Check for keys in other_translation that don't match any in default_translation - for key in other_translation: - if key not in default_translation: - error_msg = f"Error Key: '{key}' - This key in '{other_file}' does not match any key in '{default_file}'." - errors.append(error_msg) - - return errors - - - - -def load_translation(filepath): - """Load translation from a file. - - Args: - filepath: Path to the translation file - - Returns: - translation: Loaded translation - """ - with open(filepath, "r", encoding="utf-8") as file: - translation = json.load(file) - return translation - - - -def check_translations(directory): - """Load default translation and compare with other translations. - - Args: - directory (str): The directory containing translation files. - - Returns: - None - """ - default_file = "en.json" - default_translation = load_translation(os.path.join(directory, default_file)) - translations = os.listdir(directory) - translations.remove(default_file) # Exclude default translation - - error_found = False - - for translation_file in translations: - other_file = os.path.join(directory, translation_file) - other_translation = load_translation(other_file) - - # Compare translations and get detailed error messages - errors = compare_translations(default_translation, other_translation, default_file, translation_file) - if errors: - error_found = True - print(f"File {translation_file} has missing translations for:") - for error in errors: - print(f" - {error}") - - if error_found: - sys.exit(1) # Exit with an error status code - else: - print("All translations are present") - sys.exit(0) - - -def main(): - """ - Parse command-line arguments, check for the existence of the specified directory, - and call check_translations with the provided or default directory. - - """ - parser = argparse.ArgumentParser( - description="Check and print missing translations for all non-default languages." - ) - parser.add_argument( - "--directory", - type=str, - nargs="?", - default=os.path.join(os.getcwd(), "lang"), - help="Directory containing translation files(relative to the root directory).", - ) - args = parser.parse_args() - - if not os.path.exists(args.directory): - print(f"Error: The specified directory '{args.directory}' does not exist.") - sys.exit(1) - - check_translations(args.directory) - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/countline.py b/.github/workflows/countline.py deleted file mode 100755 index d0b03c503..000000000 --- a/.github/workflows/countline.py +++ /dev/null @@ -1,297 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: UTF-8 -*- -"""Script to encourage more efficient coding practices. - -Methodology: - - Analyses the `lib` and `test` directories to find files that exceed a - pre-defined number of lines of code. - - This script was created to help improve code quality by encouraging - contributors to create reusable code. - -NOTE: - - This script complies with our python3 coding and documentation standards - and should be used as a reference guide. It complies with: - - 1) Pylint - 2) Pydocstyle - 3) Pycodestyle - 4) Flake8 - - Run these commands from the CLI to ensure the code is compliant for all - your pull requests. - -""" - -# Standard imports -import os -import sys -import argparse -from collections import namedtuple - - -def _valid_filename(filepath): - """Determine whether filepath has the correct filename. - - Args: - filepath: Filepath to check - - Returns: - result: True if valid - - """ - # Initialize key variables - invalid_filenames = [".test.", ".spec."] - result = True - - # Test - for invalid_filename in invalid_filenames: - if invalid_filename.lower() not in filepath.lower(): - continue - result = False - - return result - - -def _valid_extension(filepath): - """Determine whether filepath has the correct extension. - - Args: - filepath: Filepath to check - - Returns: - result: True if valid - - """ - # Initialize key variables - invalid_extensions = [".css", ".jpg", ".png", ".jpeg"] - result = True - - # Test - for invalid_extension in invalid_extensions: - if filepath.lower().endswith(invalid_extension.lower()) is False: - continue - result = False - - return result - - -def _valid_exclusions(excludes): - """Create a list of full file paths to exclude from the analysis. - - Args: - excludes: Excludes object - - Returns: - result: A list of full file paths - - """ - # Initialize key variables - result = [] - filenames = [] - more_filenames = [] - - # Create a list of files to ignore - if bool(excludes.files): - filenames = excludes.files - if bool(excludes.directories): - more_filenames = _filepaths_in_directories(excludes.directories) - filenames.extend(more_filenames) - - # Remove duplicates - filenames = list(set(filenames)) - - # Process files - for filename in filenames: - # Ignore files that appear to be full paths because they start - # with a '/' or whatever the OS uses to distinguish directories - if filename.startswith(os.sep): - continue - - # Create a file path - filepath = "{}{}{}".format(os.getcwd(), os.sep, filename) - if os.path.isfile(filepath) is True: - result.append(filepath) - - # Return - return result - - -def _filepaths_in_directories(directories): - """Create a list of full file paths based on input directories. - - Args: - directories: A list of directories - - Returns: - result: A list of full file paths - - """ - # Initialize key variables - result = [] - - # Iterate and analyze each directory - for directory in directories: - for root, _, files in os.walk(directory, topdown=False): - for name in files: - # Read each file and count the lines found - result.append(os.path.join(root, name)) - # Return - return result - - -def _arg_parser_resolver(): - """Resolve the CLI arguments provided by the user. - - Args: - None - - Returns: - result: Parsed argument object - - """ - # Initialize parser and add the CLI options we should expect - parser = argparse.ArgumentParser() - parser.add_argument( - "--lines", - type=int, - required=False, - default=300, - help="The maximum number of lines of code to accept.", - ) - parser.add_argument( - "--directory", - type=str, - required=False, - default=os.getcwd(), - help="The parent directory of files to analyze.", - ) - parser.add_argument( - "--exclude_files", - type=str, - required=False, - nargs="*", - default=None, - const=None, - help="""An optional space separated list of \ -files to exclude from the analysis.""", - ) - parser.add_argument( - "--exclude_directories", - type=str, - required=False, - nargs="*", - default=None, - const=None, - help="""An optional space separated list of \ -directories to exclude from the analysis.""", - ) - - # Return parser - result = parser.parse_args() - return result - - -def main(): - """Analyze dart files. - - This function finds, and prints the files that exceed the CLI - defined defaults. - - Args: - None - - Returns: - None - - """ - # Initialize key variables - lookup = {} - errors_found = False - file_count = 0 - Excludes = namedtuple("Excludes", "files directories") - - # Get the CLI arguments - args = _arg_parser_resolver() - - # Define the directories of interest - directories = [ - os.path.expanduser(os.path.join(args.directory, "lib")), - os.path.expanduser(os.path.join(args.directory, "src")), - os.path.expanduser(os.path.join(args.directory, "test")), - ] - - # Get a corrected list of filenames to exclude - exclude_list = _valid_exclusions( - Excludes( - files=args.exclude_files, directories=args.exclude_directories - ) - ) - - # Get interesting filepaths - repo_filepath_list = _filepaths_in_directories(directories) - - # Iterate and analyze each directory - for filepath in repo_filepath_list: - # Skip excluded files - if filepath in exclude_list: - continue - - # Skip /node_modules/ sub directories - if "{0}node_modules{0}".format(os.sep) in filepath: - continue - - # Ignore invalid file extensions - if _valid_extension(filepath) is False: - continue - - # Ignore invalid file filenames - if _valid_filename(filepath) is False: - continue - - # Process the rest - with open(filepath, encoding="latin-1") as code: - line_count = sum( - 1 - for line in code - if line.strip() - and not ( - line.strip().startswith("#") - or line.strip().startswith("/") - ) - ) - lookup[filepath] = line_count - - # If the line rule is voilated then the value is changed to 1 - for filepath, line_count in lookup.items(): - if line_count > args.lines: - errors_found = True - file_count += 1 - if file_count == 1: - print( - """ -LINE COUNT ERROR: Files with excessive lines of code have been found\n""" - ) - - print(" Line count: {:>5} File: {}".format(line_count, filepath)) - - # Evaluate and exit - if bool(errors_found) is True: - print( - """ -The {} files listed above have more than {} lines of code. - -Please fix this. It is a pre-requisite for pull request approval. -""".format( - file_count, args.lines - ) - ) - sys.exit(1) - else: - sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/documentationcheck.py b/.github/workflows/documentationcheck.py deleted file mode 100755 index 7bac9592d..000000000 --- a/.github/workflows/documentationcheck.py +++ /dev/null @@ -1,186 +0,0 @@ -"""Script to encourage documentation addition of changes incurred - -Methodology: - - Getting latest commit from merging branch and feature branch - Getting all differences in files under lib directory - Checking if documentation status is missing, not_updated or updated - - This script is to help better document the functionality - -NOTE: - - This script complies with our python3 coding and documentation standards - and should be used as a reference guide. It complies with: - - 1) Pylint - 2) Pydocstyle - 3) Pycodestyle - 4) Flake8 - - Run these commands from the CLI to ensure the code is compliant for all - your pull requests. -""" - -# Standard imports -import argparse -import os -import sys - -import git -import enum - - -class DocumentationStatus(enum.Enum): - unknown = 0 - updated = 1 - not_updated = 2 - missing = 3 - - -def _arg_parser_resolver(): - """Resolve the CLI arguments provided by the user. - - Args: - None - - Returns: - result: Parsed argument object - - """ - # Initialize parser and add the CLI options we should expect - parser = argparse.ArgumentParser() - # getting merge branch name - parser.add_argument( - '--merge_branch_name', type=str, required=True, - help='Name of the merging to branch') - # Github repository - parser.add_argument( - '--repository', type=str, required=True, - help='Name of the GitHub repository in the format "/"') - # getting root directory of repository - parser.add_argument( - '--directory', type=str, required=False, - default=os.getcwd(), - help='The parent directory of files to analyze.') - # Return parser - result = parser.parse_args() - return result - - -def check_for_documentation(diff_item): - """Determine the documentation status - - Args: - diff_item: Diff to check - - Returns: - doc_status: DocumentationStatus - - """ - # Extracting the changes made - file_diffs = diff_item.diff.decode("utf-8") - # Setting documentation status flag to unknown - doc_status = DocumentationStatus.unknown - # Splitting the changes for line by line iteration - lines = file_diffs.split('\n') - # Setting updated doc line count - edited_doc_line_count = 0 - # Looping over differences - for line in lines: - # checking if the line was updated and contains documentation - if line.strip() and line.startswith('+') and line.__contains__('///'): - # updating the flag by one - edited_doc_line_count += 1 - # Checking if no doc was changed - if edited_doc_line_count == 0: - # Setting the flag to not_updated - doc_status = DocumentationStatus.not_updated - - # Reading complete file to check if not documentation exist - # Reading the complete file - file = diff_item.b_blob.data_stream.read().decode('utf-8') - # Splitting the line to check if documentation is present or not - lines = file.split('\n') - # Setting the documentation line count flag - doc_lines = 0 - # Looping over the file lines - for line in lines: - # Checking if the line contains any documentation or not - if line.strip() and line.__contains__('///'): - # updating the flag by 1 - doc_lines += 1 - # Checking if the documentation lines were present or not - if doc_lines == 0: - # Updating the flag to missing - doc_status = DocumentationStatus.missing - # Checking if the doc was updated - elif edited_doc_line_count > 0: - # Setting the flag to documentation updated - doc_status = DocumentationStatus.updated - # return the file documentation status - return doc_status - - -def main(): - """Analyze dart files. - - This function finds, and prints the files that exceed the CLI - defined defaults. - - Returns: - None - - """ - # Parsing the command line arguments - args = _arg_parser_resolver() - # Getting the git repo - repo_feature = git.Repo(args.directory) - (_, repository_directory) = args.repository.split("/") - repo_merge = git.Repo.clone_from("https://github.com/{}.git".format(args.repository), "{}/{}".format(args.directory, repository_directory)) - - # Do nothing if the branch has a "/" in it - if '/' in args.merge_branch_name: - return - - # Getting latest commit on latest branch - commit_dev = repo_merge.commit(args.merge_branch_name) - # Getting latest commit on feature branch - feature_commit = repo_feature.commit() - # Loading differences between the two commits - diff_index = commit_dev.diff(feature_commit, create_patch=True) - # Setting a flag to keep record of files and their documentation - lookup = {} - # Lopping over differences in modified files - for diff_item in diff_index.iter_change_type('M'): - # Getting file path of difference - file_path = diff_item.b_path - # Checking if a file under codebase(lib) directory was modified - if file_path.startswith('lib'): - # Getting file documentation status - lookup[file_path] = check_for_documentation(diff_item) - # Lopping over differences in added files - for diff_item in diff_index.iter_change_type('A'): - # Getting file path of difference - file_path = diff_item.b_path - # Checking if a file under codebase(lib) directory was added - if file_path.startswith('lib'): - # Getting file documentation status - lookup[file_path] = check_for_documentation(diff_item) - # Filtering files whose documentation status != updated - filtered_lookup = {k: v for (k, v) in lookup.items() if DocumentationStatus.updated != v} - # Checking if documentation was updated for all changed files - if len(filtered_lookup) == 0: - print('''🚀 {} Hurrah! documentation was updated in all modified/added files'''.format('\033[92m')) - sys.exit(0) - else: - print( - '''🔍 {}DOCUMENTATION NOT UPDATED: Files with missing or not updated DartDoc documentation found'''.format( - '\033[91m')) - for failing_file in filtered_lookup: - print('''>>> File name: {}\n\t{}\n'''.format(failing_file, filtered_lookup[failing_file])) - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml deleted file mode 100644 index ed8521f23..000000000 --- a/.github/workflows/issues.yml +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: Issues Workflow -on: - issues: - types: ['opened'] -jobs: - Opened-issue-label: - name: Adding Issue Label - runs-on: ubuntu-latest - steps: - - uses: Renato66/auto-label@v2.3.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - ignore-comments: true - default-labels: '["unapproved"]' - - Issue-Greeting: - name: Greeting Message to User - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/develop/CONTRIBUTING.md) and [Issue Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/develop/ISSUE_GUIDELINES.md) to ensure that you are following our guidelines for contributing and making issues." diff --git a/.github/workflows/pull-request-target.yml b/.github/workflows/pull-request-target.yml deleted file mode 100644 index f8077e44d..000000000 --- a/.github/workflows/pull-request-target.yml +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: PR Target Workflow -on: - pull_request_target: - -jobs: - PR-Greeting: - name: Pull Request Target - runs-on: ubuntu-latest - steps: - - name: Add the PR Review Policy - uses: thollander/actions-comment-pull-request@v2 - with: - comment_tag: pr_review_policy - message: | - ## Our Pull Request Approval Process - - We have these basic policies to make the approval process smoother for our volunteer team. - - ### Testing Your Code - - Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur: - - 1. The overall code coverage drops below the target threshold of the repository - 2. Any file in the pull request has code coverage levels below the repository threshold - - The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. - - ### Reviewers - - Do not assign reviewers. Our Queue Monitors will review your PR and assign them. - When your PR has been assigned reviewers contact them to get your code reviewed and approved via: - - 1. comments in this PR or - 1. our slack channel - - #### Reviewing Your Code - - Your reviewer(s) will have the following roles: - - 1. arbitrators of future discussions with other contributors about the validity of your changes - 2. point of contact for evaluating the validity of your work - 3. person who verifies matching issues by others that should be closed. - 4. person who gives general guidance in fixing your tests - - ## Other - - :dart: Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise. - - - name: Greeting Message to User - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: "Congratulations on making your first PR! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/develop/CONTRIBUTING.md) and [PR Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/develop/PR_GUIDELINES.md) to ensure that you are following our guidelines for contributing and creating PR." diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 58cd635b2..000000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,249 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: PR Workflow -on: - pull_request: - branches-ignore: - - 'master' - -env: - CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }} - -jobs: - Flutter-Codebase-Check: - name: Checking codebase - runs-on: ubuntu-latest - #needs: PR-Greeting - steps: - - uses: actions/checkout@v4 - with: - # ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Set default branch. - run: git remote set-head origin --auto - shell: bash - - name: Running pub get in talawa_lint - run: cd talawa_lint && flutter pub get && cd .. - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Checking for correct formatting of code - run: dart format --set-exit-if-changed . - - name: Count lines of code in each file - run: chmod +x ./.github/workflows/countline.py - - name: Running count lines - run: ./.github/workflows/countline.py --exclude_directories test/ --exclude_files lib/custom_painters/talawa_logo.dart lib/custom_painters/language_icon.dart lib/custom_painters/whatsapp_logo.dart lib/utils/queries.dart lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart lib/view_model/pre_auth_view_models/select_organization_view_model.dart lib/views/after_auth_screens/profile/profile_page.dart lib/view_model/main_screen_view_model.dart lib/views/after_auth_screens/events/create_event_page.dart lib/views/after_auth_screens/org_info_screen.dart - - name: setup python - uses: actions/setup-python@v5 - - name: Check for presence of ignore directives corresponding to custom lints - run: chmod +x ./.github/workflows/check_ignore.py - - name: Run check_ignore - run: | - git branch - git checkout -b temp_branch - git branch - git stash push -m lock_file pubspec.lock - git checkout develop - git pull - git branch - git diff --name-only develop..HEAD - git checkout temp_branch - pip install GitPython - python ./.github/workflows/check_ignore.py --repository ${{github.repository}} --merge_branch_name ${{github.head_ref}} - - name: Compare translation files - run: | - chmod +x .github/workflows/compare_translations.py - python .github/workflows/compare_translations.py --directory lang - - - name: Analysing codebase for default linting - run: flutter analyze --no-pub - - name: Analysing codebase for custom linting - run: dart run custom_lint - - name: Changed Files - id: changed-files - uses: tj-actions/changed-files@v41 - - name: List all changed files - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - echo "$file was changed" - done - - - name: Check if the source and target branches are different - if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }} - run: | - echo "Source Branch ${{ github.event.pull_request.head.ref }}" - echo "Target Branch ${{ github.event.pull_request.base.ref }}" - echo "Error: Source and Target Branches are the same. Please ensure they are different." - exit 1 - -# - name: Echo the GitHub environment for troubleshooting -# run: echo "$GITHUB_CONTEXT" -# - name: Echo the GitHub context for troubleshooting -# run: echo "${{ toJSON(github) }}" -# - name: setup python -# uses: actions/setup-python@v5 -# - name: Granting permission to documentationcheck.py -# run: chmod +x ./.github/workflows/documentationcheck.py -# - name: execute py script -# # For more information on the GitHub context used for the "--repository" flag used by this script visit: -# # https://docs.github.com/en/actions/learn-github-actions/contexts -# run: | -# git branch -# pip install GitPython -# python ./.github/workflows/documentationcheck.py --repository ${{github.repository}} --merge_branch_name ${{github.ref_name}} - - Flutter-Testing: - name: Testing codebase - runs-on: ubuntu-latest - needs: Flutter-Codebase-Check - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Codebase testing - run: flutter test --coverage - - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - fail_ci_if_error: false - name: '${{env.CODECOV_UNIQUE_NAME}}' - - name: Test acceptable level of code coverage - uses: VeryGoodOpenSource/very_good_coverage@v2 - with: - path: './coverage/lcov.info' - min_coverage: 92.0 - - Android-Build: - name: Testing build for android - runs-on: ubuntu-latest - needs: Flutter-Codebase-Check - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Building for android - run: flutter build apk - - iOS-Build: - name: Testing build for iOS - runs-on: macos-latest - needs: Flutter-Codebase-Check - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - architecture: x64 - - name: Building for ios - run: flutter build ios --release --no-codesign - - Branch-check: - name: "Base branch check" - runs-on: ubuntu-latest - steps: - - name: "Check if base branch is develop" - if: github.event.pull_request.base.ref != 'develop' - run: | - echo "PR is not against develop branch. Please refer PR_GUIDELINES.md" - exit 1 - - Check-Unauthorized-Changes: - name: Checks if no unauthorized files are changed - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Get Changed Unauthorized files - id: changed-unauth-files - uses: tj-actions/changed-files@v40 - with: - files: | - .github/** - env.example - .node-version - .husky/** - scripts/** - package.json - tsconfig.json - .gitignore - .eslintrc.json - .eslintignore - vite.config.ts - docker-compose.yaml - Dockerfile - CODEOWNERS - LICENSE - setup.ts - .coderabbit.yaml - - name: List all changed unauthorized files - if: steps.changed-unauth-files.outputs.any_changed == 'true' || steps.changed-unauth-files.outputs.any_deleted == 'true' - env: - CHANGED_UNAUTH_FILES: ${{ steps.changed-unauth-files.outputs.all_changed_files }} - run: | - for file in ${CHANGED_UNAUTH_FILES}; do - echo "$file is unauthorized to change/delete" - done - exit 1 - - Count-Changed-Files: - name: Checks if number of files changed is acceptable - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v40 - - - name: Echo number of changed files - env: - CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} - run: | - echo "Number of files changed: $CHANGED_FILES_COUNT" - - name: Check if the number of changed files is less than 100 - if: steps.changed-files.outputs.all_changed_files_count > 100 - env: - CHANGED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_files_count }} - run: | - echo "Error: Too many files (greater than 100) changed in the pull request." - echo "Possible issues:" - echo "- Contributor may be merging into an incorrect branch." - echo "- Source branch may be incorrect please use develop as source branch." - exit 1 diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml deleted file mode 100644 index 96894e62b..000000000 --- a/.github/workflows/push.yaml +++ /dev/null @@ -1,262 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: PUSH Workflow -on: - push: - # branches: - # - develop - - branches-ignore: - - 'master' - - tags: - - "*" - -env: - CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }} - -jobs: - - Flutter-Codebase-Check: - name: Checking codebase - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - # This is important to fetch all history for all branches and tags. - # This could be important for our documentation generation process. - # See: https://github.com/actions/checkout - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Running pub get in talawa_lint - run: cd talawa_lint && flutter pub get && cd .. - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Checking for correct formatting of code - run: dart format --set-exit-if-changed . - - name: setup python - uses: actions/setup-python@v5 - - name: Check for presence of ignore directives corresponding to custom lints - run: chmod +x ./.github/workflows/check_ignore.py - - name: Run check_ignore - run: | - git branch - git checkout develop - git pull - git branch - git checkout - - pip install GitPython - python ./.github/workflows/check_ignore.py --repository ${{github.repository}} --merge_branch_name ${{github.ref_name}} - - name: Analysing codebase for default linting - run: flutter analyze --no-pub - - name: Analysing codebase for custom linting - run: dart run custom_lint -# - name: Echo the GitHub environment for troubleshooting -# run: echo "$GITHUB_CONTEXT" -# - name: Echo the GitHub context for troubleshooting -# run: echo "${{ toJSON(github) }}" - - Update-Documentation: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/automated-docs' - environment: TALAWA_ENVIRONMENT - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' - - uses: dart-lang/setup-dart@v1 - with: - sdk: '3.3.0' - - run: | - cd talawa_lint && flutter pub get && cd .. - flutter pub get - flutter analyze - dart analyze - flutter pub global activate dartdoc - flutter pub global run dartdoc . --output talawa-mobile-docs --format md --exclude=test/widget_tests/widgets/pinned_carousel_widget_test.dart, lib/widgets/pinned_carousel_widget.dart, lib/widgets/post_widget.dart, test/widget_tests/widgets/post_widget_test.dart - rm -rf talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md - rm -rf talawa-mobile-docs/widgets_post_widget/PostContainerState/build.md - - uses: actions/upload-artifact@v1 - with: - name: talawa-mobile-docs - path: talawa-mobile-docs - - name: Checking doc updated - id: DocUpdated - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "updateDoc=true" >> $GITHUB_OUTPUT - echo -e "Documentation has been updated!!" - else - Green='0;32' - NoColor='\033[0m' - echo -e "${Green}No documentation updated${NoColor}" - fi - - name: Set env variables - if: steps.DocUpdated.outputs.updateDoc - run: | - echo "commit_id=$(echo $(git rev-parse HEAD))" >> $GITHUB_ENV - echo "email=$(echo $(git log --pretty=format:"%ae" $commit_id))" >> $GITHUB_ENV - - name: Handle untracked files - if: steps.DocUpdated.outputs.updateDoc - run: | - git config --global user.name "${{github.actor}}" - git config --global user.email "${{env.email}}" - git add . - - name: Update Doc - if: steps.DocUpdated.outputs.updateDoc - run: | - Green='0;32' - NoColor='\033[0m' - git config --global user.name "${{github.actor}}" - git config --global user.email "${{env.email}}" - git commit -a -m "Updated docs" - git push - echo -e "🚀${Green} Hurrah! doc updated${NoColor}" - - Documentation-to-talawa-docs: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/automated-docs' - needs: Update-Documentation - steps: - - uses: actions/checkout@v4 - - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB_NEW }} - with: - source_file: 'talawa-mobile-docs/' - destination_repo: 'PalisadoesFoundation/talawa-docs' - destination_branch: 'develop' - destination_folder: 'docs' - user_email: '${{env.email}}' - user_name: '${{github.actor}}' - commit_message: 'Overwriting talawa-mobile-docs from talawa-repo' - - - - Flutter-Testing: - name: Testing codebase - runs-on: ubuntu-latest - needs: Flutter-Codebase-Check - # needs: Update-Documentation - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Running pub get in talawa_lint - run: cd talawa_lint && flutter pub get && cd .. - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Codebase testing - run: flutter test --coverage - - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - fail_ci_if_error: false - name: '${{env.CODECOV_UNIQUE_NAME}}' - - Android-Build-and-Release: - name: Testing build for android - permissions: - contents: write - environment: TALAWA_ENVIRONMENT - runs-on: ubuntu-latest - needs: Flutter-Testing - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - - name: Running pub get in talawa_lint - run: cd talawa_lint && flutter pub get && cd .. - - name: Running pub get to fetch dependencies - run: flutter pub get - - name: Building for android - run: flutter build apk - - ################################################### - ## Release the built apk as an automated release ## - ################################################### - - - uses: ncipollo/release-action@v1 - with: - name: "Automated Android Release" - artifacts: "./build/app/outputs/flutter-apk/app-release.apk" - allowUpdates: "true" - generateReleaseNotes: false - tag: "automated" - body: | - This is an automated release, triggered by a recent push. - This may or may not be stable, so please have a look at the stable release(s). - - iOS-Build: - name: iOS Build and Relaese - runs-on: macos-latest - needs: Flutter-Testing - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.19.0' - channel: 'stable' # or: 'beta', 'dev' or 'master' - architecture: x64 - - name: Building for ios - run: flutter build ios --release --no-codesign - # '--no-codesign' is used for building without code signing. - # For actual distribution, proper code signing is required. - - ######################################################## - ## Package the app as an .ipa and create a release ## - ######################################################## - - - name: Releasing for iOS - run: | - mkdir Payload - cp -r build/ios/iphoneos/Runner.app Payload/Runner.app - zip -r app.ipa Payload - # This packages the Runner.app into an .ipa file - - - uses: ncipollo/release-action@v1 - with: - name: "Automated iOS Release" - artifacts: "app-release.ipa" - allowUpdates: "true" - generateReleaseNotes: false - tag: "automated" - body: | - This is an automated release, triggered by a recent push. - This may or may not be stable, so please have a look at the stable release(s). diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 24667f8e0..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -############################################################################## -# -# NOTE! -# -# Please read the README.md file in this directory that defines what should -# be placed in this file -# -############################################################################## -############################################################################## - -name: Mark stale issues and pull requests - -on: - schedule: - - cron: "0 0 * * *" - -permissions: - issues: write - pull-requests: write - -jobs: - stale: - - runs-on: ubuntu-latest - - steps: - - uses: actions/stale@v8 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.' - stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.' - close-issue-message: 'This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed.' - close-pr-message: 'This pull request did not get any activity in the past 180 days and thus has been closed.' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - days-before-stale: 10 - days-before-close: 180 - remove-stale-when-updated: true - exempt-all-milestones: true - exempt-pr-labels: 'wip' - exempt-issue-labels: 'wip' - operations-per-run: 30 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b14badeec..000000000 --- a/.gitignore +++ /dev/null @@ -1,255 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# Ignore Google services configuration files -google-services.json -GoogleService-Info.plist -firebase_app_id_file.json - -# Sphinx documentation -docs/_build/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -.vscode/ - -############################################################################### -# Generic JetBrains Exclusions (Provided by GitHub) -# -# Created by https://www.gitignore.io/api/intellij which redirects to: -# Created by https://www.toptal.com/developers/gitignore/api/intellij -# Edit at https://www.toptal.com/developers/gitignore?templates=intellij -############################################################################### - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# All idea files -.idea/ - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -*.iml -*.ipr - -# CMake -cmake-build-*/ - -# File-based project format -*.iws - -# IntelliJ -out/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -############################################################################### -# Generic Flutter Exclusions (Provided by GitHub) -# -# Created by https://www.gitignore.io/api/flutter which redirects to: -# Created by https://www.toptal.com/developers/gitignore/api/flutter -# Edit at https://www.toptal.com/developers/gitignore?templates=flutter -############################################################################### - -# Flutter/Dart/Pub related -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.fvm/ -.packages -.pub-cache/ -.pub/ -temporaryPath/ -build/ -coverage/ -lib/generated_plugin_registrant.dart - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages - - -############################################################################### -# Generic Python Exclusions (Provided by GitHub) -# -# Created by https://www.gitignore.io/api/python -# Edit at https://www.gitignore.io/?templates=python -############################################################################### - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Scrapy stuff: -.scrapy - -# Sphinx documentation - -# PyBuilder -target/ - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# Hive database files -test/fixtures/core - -# End of https://www.gitignore.io/api/python - -# Ignoring file that are generated during talawa testing and firebase initialization -genhtml.perl -test_img.png - - -# Ignoring Node files that are generated if user uses any node command which is not required for the project -node_modules/ -package.json -package-lock.json -yarn.lock -npm-debug.log -yarn-error.log \ No newline at end of file diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 36ddd6bf7..000000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,22 +0,0 @@ -# File: .readthedocs.yml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs/conf.py - -# Optionally build your docs in additional formats such as PDF and ePub -formats: all - -# Optionally set the version of Python and requirements required to build docs -# We have to set this or else ReadTheDocs will attempt to install pip packages -# from pip_requirements that have system library dependencies that ReadTheDocs -# does not have -python: - version: 3.6 - install: - - requirements: docs/requirements.txt diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cc0cc31f1..000000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -{ - "language": "dart", - "os": [ - "linux" - ], - "dist": "xenial", - "addons": { - "apt": { - "packages": [ - "lib32stdc++6" - ] - } - }, - "install": [ - "git clone https://github.com/flutter/flutter.git -b stable", - "./flutter/bin/flutter doctor" - ], - "script": [ - "./flutter/bin/flutter test" - ], - "deploy": [ - { - "provider": "pages", - "strategy": "git", - "on": { - "branch": [ - "drewdev" - ] - }, - "cleanup": true, - "token": "$GITHUB_TOKEN" - } - ], - "cache": { - "directories": [ - "$HOME/.pub-cache" - ] - } -} \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 6cbc8ddd2..000000000 --- a/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -* @palisadoes @noman2002 -CODEOWNERS @palisadoes @noman2002 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 5b0d1618a..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,133 +0,0 @@ - -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at [The Palisadoes Foundation](http://www.palisadoes.org/) - -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available -at [https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 224b932bf..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,295 +0,0 @@ -# Contributing to Talawa - -Thank you for your interest in contributing to Talawa. Regardless of the size of the contribution you make, all contributions are welcome and are appreciated. - -If you are new to contributing to open source, please read the Open Source Guides on [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/). - -## Table of Contents - -* [Code of Conduct](#code-of-conduct) -* [Ways to Contribute](#ways-to-contribute) -* [Our Development Process](#our-development-process) - * [Issues](#issues) - * [Pull Requests](#pull-requests) - * [Branching Strategy](#branching-strategy) - * [Conflict Resolution](#conflict-resolution) -* [Contributing Code](#contributing-code) -* [General Guidelines](#general-guidelines) - * [Folder Definition](#folder-definition) - * [File Definition](#file-definition) - * [PR Preparation](#pr-preparation) - * [Project Structure](#project-structure) - * [Commit Guidelines](#commit-guidelines) -* [Internships](#internships) -* [Community](#community) - -## Code of Conduct - -A safe environment is required for everyone to contribute. Read our [Code of Conduct Guide](CODE_OF_CONDUCT.md) to understand what this means. Let us know immediately if you have unacceptable experiences in this area. - -No one should fear voicing their opinion. Respones must be respectful to help them. - -## Ways to Contribute - -If you are ready to start contributing code right away, get ready! - -1. Join our Slack and introduce yourself. See details on how to join below in the Community section. - 1. This repository has its own dedicated channel. - 1. There are many persons on the various channels, willing to assist you in getting started. -1. Take a look at our issues (**_after reading our guidelines below_**): - 1. We have a list of [good first issues](https://github.com/PalisadoesFoundation/talawa/labels/good%20first%20issue) that contain challenges with limited scope for beginners. - 1. There are issues for creating tests for our codebase. We need to increase reliability. Try those issues, or create your own files that don't already have tests. This is another good strategy for beginners. - 1. There are [dormant issues on which nobody has worked for some time](https://github.com/PalisadoesFoundation/talawa/issues?q=is%3Aopen+is%3Aissue+label%3Ano-issue-activity). These are another place to start. - 1. There may also be [dormant PRs on which nobody has worked for some time](https://github.com/PalisadoesFoundation/talawa/issues?q=is%3Aopen+is%3Aissue+label%3Ano-issue-activity+label%3Ano-pr-activity)! -1. Create an issue based on a bug you have found or a feature you would like to add. We value meaningful suggestions and will prioritize them. - -**Welcome aboard!** - -### Our Development Process - -We utilize GitHub issues and pull requests to keep track of issues and contributions from the community. - -#### Issues - -Make sure you are following [issue report guidelines](ISSUE_GUIDELINES.md) available here before creating any new issues on Talawa project. - -#### Pull Requests - -[Pull Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on open issues. - -#### Branching Strategy - -For Talawa, we had employed the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `main` branch: - -- `develop`: For unstable code and bug fixing -- `main`: Where the stable production ready code lies. This is our default branch. - -#### Conflict Resolution - -When multiple developers are working on issues there is bound to be a conflict of interest (not to be confused with git conflicts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **First Come First Serve** basis however there are certain exceptions to it. - -- In the cases where you feel your potential issues could be an extension or in conflict with other PRs it is important to ask the author of the PR in the slack channel or in their PRs or issues themselves why he/she did not write code for something that would require minimal effort on their part. -- Based on basic courtesy, it is good practice to let the person who created a function apply and test that function when needed. -- Last but not the least, communication is important make sure to talk to other contributors, in these cases, in slack channel or in a issue/PR thread. -- As a last resort the Admins would be responsible for deciding how to resolve this conflict. - -### Contributing Code - -Code contributions to Talawa come in the form of pull requests. These are done by forking the repo and making changes locally. - -The process of proposing a change to Talawa can be summarized as: - -1. Fork the Talawa repository and branch off `develop`. -1. Your newly forked repository can be cloned locally using `git clone `. -1. Make the Palisadoes Foundation's repo your `git upstream` for your local repo. -1. Make the desired changes to the Talawa source. -1. Setup a local instance of Talawa-API on your local machine using the steps outlined in our [INSTALLATION.md](INSTALLATION.md) file. -1. Run the app: - 1. Enter Talawa-API URL for your local instance oulined in the [INSTALLATION.md](INSTALLATION.md) file. This is also the URL you should use for your Talawa-Admin configuration. -1. Test your changes. -1. If you've added code, then test suites must be added. - 1. **_General_:** - 1. We need to get to 100% test coverage for the app. We periodically increase the desired test coverage for our pull requests to meet this goal. - 1. Pull requests that don't meet the minimum test coverage levels will not be accepted. This may mean that you will have to create tests for code you did not write. You can decide which part of the code base needs additional tests if this happens to you. - 1. **_Testing_:** - 1. Test using the `flutter test` command. - 1. Review [Flutter's official introduction to unit testing](https://docs.flutter.dev/cookbook/testing/unit/introduction) - 1. Here are some useful flutter test videos - 1. [State Management With Provider](https://www.raywenderlich.com/6373413-state-management-with-provider) - 1. [Unit Testing With Flutter: Getting Started](https://www.raywenderlich.com/6926998-unit-testing-with-flutter-getting-started) - 1. [How to Unit Test in Flutter - Guide](https://www.youtube.com/watch?v=5BFlo9k3KNU) - 1. **_Test Code Coverage_:** - 1. _General Information_ - 1. The current code coverage of the repo is: [![codecov](https://codecov.io/gh/PalisadoesFoundation/talawa/branch/develop/graph/badge.svg?token=3PJXIKRS1S)](https://codecov.io/gh/PalisadoesFoundation/talawa) - 1. You can determine the percentage test coverage of your code by running these two commands in sequence: - ``` - flutter test --coverage - genhtml coverage/lcov.info -o coverage - ``` - 1. The coverage rate will be visible on the penultimate line of the `genhtml` command's output. - 1. The `genhtml` command is part of the linux `lcov` package. Similar packages can be found for Windows and MacOS. - 1. The currently acceptable coverage rate can be found in the [GitHub Pull Request file](.github/workflows/pull-request.yml). Search for the value below the line containing `min_coverage`. - 1. _Creating your code coverage account_ - 1. You can also see your code coverage online for your fork of the repo. This is provided by `codecov.io` - 1. Go to this link: `https://app.codecov.io/gh/XXXX/YYYY` where XXXX is your GitHub account username and YYYY is the name of the repository - 1. Login to `codecov.io` using your GitHub account, and add your **repo** and **branches** to the `codecov.io` dashboard. - 1. Remember to add the `Repository Upload Token` for your forked repo. This can be found under `Settings` of your `codecov.io` account. - 1. Use the value of this token to create a secret named CODE_COV for your forked repo. - 1. You will see your code coverage reports with every push to your repo after following these steps - -1. Author is required to write complete documentation for any file(s) changed in the respective PR - - 1. **General:** - - 1. Every field, i.e., `class`, `method`, `attribute`, `variable` should be documentation with some logical exceptions being `A class that extends State`, `class methods that override the respective base method`, etc as they don't necessarily need their own documentation. - 1. The documentation written should follow [Dart's official documentation guidelines](https://dart.dev/guides/language/effective-dart/documentation). - 1. For now, the non-documented files are marked with `// ignore_for_file: talawa_api_doc` and` - // ignore_for_file: talawa_good_doc_comments` directives to suppress these lint warning. It is expected from the author to remove these two lines from the files they have modified and add corresponding documentation in the expected format. - - 1. **In your IDE:** - - 1. If you followed [INSTALLATION.md](INSTALLATION.md) carefully, you should see lint errors/warnings in your IDE itself, after removing the ignore directives on the top of the file. - 1. Use the lint warnings your IDE states and write documentation accordingly. It will make the process easier. - - 1. **On the command line:** - - 1. Run `.github/workflows/check_ignore.py` and it will report if you have removed the ignore directives from changed files or not. - ```bash - python .github/workflows/check_ignore.py - ``` - - 1. If it states any error, remove ignore directives from the files it states, and write proper documentation. - - 1. When done writing documentation, run - ``` - flutter pub run custom_lint - ``` - - to check whether you documentation follows the format we expect, though you will get warnings in your IDE itself if it doesn't. - -1. Ensure that your code is appropriately formatted before making your submission. Submissions that are not properly formatted will be rejected if they are not fixed by the contributor. - 1. **_In your IDE_:** - - 1. _Visual Studio Code:_ There is a setting that allows your code to be formatted [automatically when you save](https://stackoverflow.com/a/66538607/15290492), or you may manually trigger it using `Ctrl + Shift + P` or `Cmd + Shift + P` and typing `Format Document`. - 1. _IntelliJ_, _Android Studio_, and other _Jetbrains_-based IDEs. Use the `Ctrl + Alt + L` or `Cmd + Opt + L` to trigger code formatting. - 1. **_On the command line before committing_**: Run this command from the root of your repository directory tree. - ``` - dart format --set-exit-if-changed . - ``` - -1. Ensure that your code should not be more than **_300 lines_**. It is there to make the code more modular and readable. Submissions that are not properly maintained will be rejected if the contributor does not fix them. Otherwise, the contributor will have to explain the need for it. - -1. After making changes, you can add them to git locally using `git add `(to add changes only in a particular file) or `git add .` (to add all changes). - -1. After adding the changes, you need to commit them using `git commit -m ''`(look at the commit guidelines below for commit messages). - 1. You can link and automatically close the issue tied to your pull request by [using a supported keyword in either the pull request's description or in a commit message.](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) This is a very useful feature that helps to prevent zombie issues that never die. - -1. Once you have successfully committed your changes, you need to push the changes to the forked repo on GitHub using: `git push origin `.(Here, the branch name must be the name of the branch you want to push the changes to.) - -1. Now create a pull request to the Talawa repository from your forked repo. Open an issue regarding the same and link your PR to it. - -1. Ensure the test suite passes, either locally or on CI, once a PR has been created. - -1. Review and address comments on your pull request if requested. - -## General Guidelines - -Please also follow these general rules. - -### Folder Definition - -- `controllers`: The folder contains all the files responsible for managing the state. - ``` - 1. Files contain codes for all the business logic related to any screen. - 2. Files also contain the client-side query & mutation calls and server-side side response. - 3. Before adding any controller, make sure whether it already exists or not. - ``` -- `enum`: The folder contains all the enumerators used in the entire project. - ``` - 1. File contains an enum that is either used with controllers or widgets. - 2. Before creating new enum files, check if the existing enum can be modified to fulfill your requirements. - ``` -- `model`: The folder contains all the data models files. - ``` - 1. Files contain a data model that is used in the controller file that contains the server-side response in an organised form. - 2. These data models are used to effectively organise projects and render the data on widgets. - 3. In the controller file, convert every response to a particular data model type. - ``` -- `utils`: The folder contains all the external utility files. - ``` - 1. Codes related to an external utility like validator, UI-scaling, constant strings, etc. - 2. Any utility-related files should be created here if not already present. - ``` -- `views`: The folder contains all the files related to the UI display. - ``` - 1. Pages: Folder that contains all the pages related to sub-folder and code. - 2. Widgets: Folder that contains widget file for pages to avoid code duplication - ``` - -### File Definition - -- Filename should be created with lowercase and underscore letters -- The business logic & UI-based files should be separated from each other. - - `controllers`: Folder that contains all business logic files - - `views`: Folder that contains UI specific files -- If it is UI based file, try to use as much `stateless widget` as possible. -- Don't use the `print` statement in your code; instead use `debugPrint`. -- Constructor should be present just after the class declaration. -- Make sure to add proper `keyword` (final or const) and data types for any variable. -- In your files, structure code this way inside your widget class: - ``` - -- constructor - -- explicitly defined variables using its type (private if possible) - -- build method (Inside build(), use sub methods like _buildAppBar() - -- sub-build methods - -- other methods - -- utility methods - ``` - -**_Note: Don't use constant numerical value anywhere in your UI-related code. Use SizeConfig class to assign the constant value. SizeConfig class does the job of scaling the UI based on the device size._** - -Example: - -``` -Incorrect Way: -SizedBox(height: 8, width: 4) - -Correct Way: -SizedBox(height: SizeConfig.safeBlockVertical, width: SizeConfig.safeBlockHorizontal) -``` - -The value of `safeBlockVertical` and `safeBlockHorizontal` will be displayed in your `console` and varies based on the device being used. - -### PR Preparation: - - - All your file should contain at max `300` lines of code. - - Follow proper code formatting and run `flutter format .` before your PR. - - Run `flutter analyze` before your PR and make sure to resolve all the found issues. - -### Project Structure - -``` -app -- presentation: interactions and data presented to the user - - screens: app and feature screens - - - - .screen.dart - - widget: internal widgets related to a screen/feature - - viewmodels: shared business logic, so we can extract it easily soon as we modularize our app -- resources: local and remote data sources, other services - -components -- example: runnable app to view all components added in the app -- - - src - - component.configs.dart - - component.name.dart - -core -- enums: common enums shared -- models: business data models, entities -- theme: application theme, colors, dimens -- utils: utility classes -``` - -### Commit Guidelines - -``` -feat: (addition of a new feature) -rfac: (refactoring the code: optimization/ different logic of existing code - output doesn't change, just the way of execution changes) -docs: (documenting the code, be it readme, or extra comments) -bfix: (bug fixing) -chor: (chore - beautifying code, indents, spaces, camelCasing, changing variable names to have an appropriate meaning) -ptch: (patches - small changes in code, mainly UI, for example color of a button, increasing size of text, etc) -conf: (configurational settings - changing directory structure, updating gitignore, add libraries, changing manifest etc) -``` - -## Internships - -If you are participating in any of the various internship programs we ar members of then please read the [introduction guides on our documentation website](https://docs.talawa.io/docs/). - -## Community -There are many ways to communicate with the community. - -1. The Palisadoes Foundation has a Slack channel where members can assist with support and clarification. Visit the [Talawa GitHub repository home page](https://github.com/PalisadoesFoundation/talawa) for the link to join our slack channel. -1. We also have a technical email list run by [freelists.org](https://www.freelists.org/). Search for "palisadoes" and join. Members on this list are also periodically added to our marketing email list that focuses on less technical aspects of our work. diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md deleted file mode 100644 index aecf8cc13..000000000 --- a/DOCUMENTATION.md +++ /dev/null @@ -1,21 +0,0 @@ -# Documentation -Welcome to our documentation guide. Here are some useful tips you need to know! -## Where to find our documentation - -Our documentation can be found in ONLY TWO PLACES: - -1. ***Inline within the repository's code files***: We have automated processes to extract this information and place it in our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/). -1. ***In our `talawa-docs` repository***: Our [Talawa-Docs](https://github.com/PalisadoesFoundation/talawa-docs) repository contains user edited markdown files that are automatically integrated into our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/) using the [Docusaurus](https://docusaurus.io/) package. - -## How to use Docusaurus -The process in easy: -1. Install `talawa-docs` on your system -1. Launch docusaurus on your system according to the `talawa-docs`documentation. - - A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/ -1. Add/modify the markdown documents to the `docs/` directory of the `talawa-docs` repository -1. If adding a file, then you will also need to edit the `sidebars.js` which is used to generate the [docs.talawa.io](https://docs.talawa.io/) menus. -1. Always monitor the local website in your brower to make sure the changes are acceptable. - - You'll be able to see errors that you can use for troubleshooting in the CLI window you used to launch the local website. - -## Other information -***PLEASE*** do not add markdown files in this repository. Add them to `talawa-docs`! diff --git a/INSTALLATION.md b/INSTALLATION.md deleted file mode 100644 index 227e549f2..000000000 --- a/INSTALLATION.md +++ /dev/null @@ -1,68 +0,0 @@ -# Installation for Developers -Welcome to our installation guide for developers. Jump in and contribute! - -# Table of Contents - -1. [Pre-Requisites For Developers](#prerequisites-for-developers) - - [Talawa-API and Talawa-Admin](#talawa-api-and-talawa-admin) - - [Talawa Mobile App](#talawa-mobile-app) -1. [Installation](#installation) -1. [Operation](#operation) - -# Prerequisites for Developers -We recommend that you follow these steps before beginning development work on the Talawa mobile app. -## Talawa-API and Talawa-Admin - -For best results you should setup your own **_local instances_** of: -1. [Talawa-API](https://github.com/PalisadoesFoundation/talawa-api): The API system that the mobile app uses for accessing data. -1. [Talawa-admin](https://github.com/PalisadoesFoundation/talawa-admin): The system used by Administrators to manage user information. This is important as you will occasionally need to do administrative functions that cannot be done in the mobile app. - -The INSTALLATION.md files in both repositories show you how. The Talawa-API INSTALLATION.md will also show you the Organization URL to use when you first login to Talawa mobile. - -### Talawa Mobile App -**Note:** If you are an Android user, you may choose to directly use the `apk` file provided in this repo, and skip the manual setup part. For more information about this, see the [Installation section](#Installation). But if you want to setup the development environment for yourself, read along. - -You'll need to set up the IDE and mobile device emulator on your local system and have access to a system running the Talawa API, which the mobile needs to access to operate properly. - -1. **Development Environment**: You'll need to have the following installed: - 1. [Flutter SDK](https://flutter.dev/docs/get-started/install) - 1. [Android Studio](https://developer.android.com/studio) -1. **API Environment**: This part is very important. - 1. Make sure Talawa-API is up and running. - 1. You will need to enter the URL of the API server in the Talawa app when it first starts up. The URL could be active on a system you control or in our test environment. The Talawa-API INSTALLATION.md will provide that information. - -# Installation - -You can start using Talawa by any of the two methods: - -1. Install the `apk` provided in the release section of this repo. It is built against the latest codebase. Please note that the release is provided only for Android. For iOS, you will still need to build the app yourself. - - Head over to the [release section](https://github.com/PalisadoesFoundation/talawa/releases) of Talawa repository. - - You will find a release with the name of `Automated Android Release`. Scroll a bit and you will find a file named `app-release.apk`. Click on it and have it downloaded. - - Head over to the downloads of your browser and then click on `app-release.apk` there. That will ask you to install the app. Click on `Install`. - - Once done, you can find `Talawa` in your apps list. Start using it from right there :) -2. Manually build the app by below described steps. - -## Manual Build and Installation - -We have tried to make the process simple. Here's what you need to do. - -1. Clone and change into the project. - ```sh - $ git clone https://github.com/PalisadoesFoundation/talawa.git - $ cd talawa - ``` -1. Install packages. - ```sh - $ cd talawa_lint - $ flutter pub get - $ cd .. - $ flutter pub get - ``` -1. Start developing! - -# Operation - -The Talawa Mobile app communicates with a Talawa-API server to get all its data. This access is provided via a URL. -When you first run the Talawa Mobile App you'll be prompted for the organization URL of a Talawa-API server. The URL to use will vary depending on the way you are using the Talawa Mobile app. - -For a list of organization URLs for each scenario, please refer to the Talawa-API [INSTALLATION.md](https://github.com/PalisadoesFoundation/talawa-api/blob/-/INSTALLATION.md) file diff --git a/ISSUE_GUIDELINES.md b/ISSUE_GUIDELINES.md deleted file mode 100644 index 6c8bfe8cf..000000000 --- a/ISSUE_GUIDELINES.md +++ /dev/null @@ -1,59 +0,0 @@ -# Issue Report Guidelines - -:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: - -In order to give everyone a chance to submit a issues reports and contribute to the Talawa project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon issue reports in the Talawa project. - -___ -## Table of Contents - - -- [Issue Report Guidelines](#issue-report-guidelines) - - [Table of Contents](#table-of-contents) - - [Issue Management](#issue-management) - - [New Issues](#new-issues) - - [Existing Issues](#existing-issues) - - [Feature Request Issues](#feature-request-issues) - - [Monitoring the Creation of New Issues](#monitoring-the-creation-of-new-issues) - - [General Guidelines](#general-guidelines) - - -___ -## Issue Management - -In all cases please use the [GitHub open issue search](https://github.com/PalisadoesFoundation/talawa/issues) to check whether the issue has already been reported. - -### New Issues -To create new issues follow these steps: - -1. Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created. -1. Verify whether the issue has been fixed by trying to reproduce it using the latest master or development branch in the repository. -1. Click on the [`New Issue`](https://github.com/PalisadoesFoundation/talawa/issues/new/choose) button -1. Use the templates to create a standardized report of what needs to be done and why. -1. If you want to be assigned the issue that you have created, then add a comment immediately after submitting it. - -We welcome contributors who find new ways to make the code better. - -### Existing Issues - -You can also be a valuable contributor by searching for dormant issues. Here's how you can do that: - -1. **Previously Assigned Issues**: We regularly review issues and add a [`no-issue-activity`](https://github.com/PalisadoesFoundation/talawa/issues?q=is%3Aissue+is%3Aopen+label%3Ano-issue-activity) label to them. Use the issue comments to ask whether the assignee is still working on the issue, and if not, ask for the issue to be assigned to you. -1. **Unassigned Issues**: If the issue is already reported and [not assigned to anyone](https://github.com/PalisadoesFoundation/talawa/issues?q=is%3Aissue+is%3Aopen+no%3Aassignee) and you are interested in working on the issue then: - 1. Ask for the issue to be assigned to you in the issue comments - 2. Ask our contributors to assign it to you in `#talawa` slack channel. - -Working on these types of existing issues is a good way of getting started with the community. - -### Feature Request Issues - -Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the mentors of the merits of this feature. Please provide as much detail and context as possible. - -### Monitoring the Creation of New Issues -1. Join our `#talawa-github` slack channel for automatic issue and pull request updates - -## General Guidelines - -1. Discuss issues in our various slack channels when necessary -2. Please do not derail or troll issues. -3. Keep the discussion on topic and respect the opinions of others. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702d2..000000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/PR_GUIDELINES.md b/PR_GUIDELINES.md deleted file mode 100644 index d7742a8c8..000000000 --- a/PR_GUIDELINES.md +++ /dev/null @@ -1,36 +0,0 @@ -# Pull Request Guidelines - -:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: - -In order to give everyone a chance to submit a pull request and contribute to the Talawa project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon pull requests in the Talawa project. - -## Pull Requests and Issues -1. Do not start working on any open issue and raise a PR unless the issue is assigned to you. PRs that don't meet these guidelines will be closed. -1. Pull requests must be based on [open issues](https://github.com/PalisadoesFoundation/talawa/issues) available. -1. [Use this method to automatically close the issue when the PR is completed.](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) - -## Testing -1. All pull requests must have test units. If, for some reason, it is not possible to add tests, please let us know and explain why. In that case, you'll need to tell us what steps you followed to manually test your changes. -1. Please read our [CONTRIBUTING.md](CONTRIBUTING.md) document for details on our testing policy. - -## Pull Request Processing -These are key guidelines for the procedure: - -### Only submit PRs against our `develop` branch, not the default `main` branch - -1. Only submit PRs against our `develop` branch. The default is `main`, so you will have to modify this before submitting your PR for review. PRs made against `main` will be closed. -1. We do not accept draft Pull Requests. They will be closed if submitted. We focus on work that is ready for immediate review. -1. Removing assigned reviewers from your Pull Request will cause it to be closed. The quality of our code is very important to us. Therefore we make experienced maintainers of our code base review your code. Removing these assigned persons is not in the best interest of this goal. -1. If you have not done so already, please read the `Pull Requests and Issues` and `Testing` sections above. -1. Each contributor may only create one pull request at a time. We have this rule in place due to our limited resources - if everyone was allowed to post multiple pull requests, we would not be able to review them properly. It is also better for contributors because you can focus on creating one quality PR - so spend time making sure it is as good as it can be. -1. Upon successful push to the fork, check if all tests are passing; if not, fix the issues and then create a pull request. -1. If the pull request's code quality is not up to par, or it would break the app, it will more likely be closed. So please be careful when creating a PR. -1. Please follow the PR template provided. Ensure the PR title clearly describes the problem it is solving. In the description, include the relevant issue number, snapshots, and videos after changes are added. -1. If you are borrowing a code, please disclose it. It is fine and sometimes even recommended to borrow code, but we need to know about it to assess your work. If we find out that your pull request contains a lot of code copied from elsewhere, we will close the pull request. -1. No Work In Progress. ONLY completed and working pull requests and with respective test units will be accepted. A WIP would fall under rule 4 and be closed immediately. -1. Please do not @mention contributors and mentors. Sometimes it takes time before we can review your pull request or answer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the pile of notifications we get and it won't make us look at your issue faster. -1. Do not force push. If you make changes to your pull request, please simply add a new commit, as that makes it easy for us to review your new changes. If you force push, we'll have to review everything from the beginning. -1. PR should be small, easy to review and should follow standard coding styles. -1. If PR has conflicts because of recently added changes to the same file, resolve issues, test new changes, and submit PR again for review. -1. PRs should be atomic. That is, they should address one item (issue or feature) -1. After submitting PR, if you are not replying within 48 hours, then in that case, we may need to assign the issue to other contributors based on the priority of the issue. diff --git a/README.md b/README.md deleted file mode 100644 index 351e606e3..000000000 --- a/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Talawa - -[💬 Join the community on Slack](https://github.com/PalisadoesFoundation/) - -![talawa-logo-lite-200x200](https://github.com/PalisadoesFoundation/talawa-admin/assets/16875803/26291ec5-d3c1-4135-8bc7-80885dff613d) - - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![GitHub stars](https://img.shields.io/github/stars/PalisadoesFoundation/talawa.svg?style=social&label=Star&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa) -[![GitHub forks](https://img.shields.io/github/forks/PalisadoesFoundation/talawa.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/PalisadoesFoundation/talawa) -[![codecov](https://codecov.io/gh/PalisadoesFoundation/talawa/graph/badge.svg?token=3PJXIKRS1S)](https://codecov.io/gh/PalisadoesFoundation/talawa) - -**Talawa** is a comprehensive platform that aims to revolutionize the way organizations manage and interact with their data and content. Talawa empowers administrators to access and manage content with ease through the Talawa Admin interface, ensuring that information remains up-to-date and accessible to the platform's members. - -With the Talawa API facilitating smooth communication between all parts of the platform, Talawa offers a cohesive and exceptional user experience for both administrators and members, making it a powerful tool for data management and content delivery seamlessly. Talawa is a modular open source project to manage group activities of both non-profit organizations and businesses. - -Core features include: - - 1. Membership management - 2. Groups management - 3. Event registrations - 4. Recurring meetings - 5. Facilities registrations - - ``talawa`` is based on the original ``quito`` code created by the [Palisadoes Foundation](http://www.palisadoes.org) as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities. - -# Talawa Components - -`talawa` has these major software components: - -1. **talawa**: [A mobile application with social media features](https://github.com/PalisadoesFoundation/talawa) -1. **talawa-api**: [An API providing access to user data and features](https://github.com/PalisadoesFoundation/talawa-api) -1. **talawa-admin**: [A web based administrative portal](https://github.com/PalisadoesFoundation/talawa-admin) -1. **talawa-docs**: [The online documentation website](https://github.com/PalisadoesFoundation/talawa-docs) - -# Documentation - -1. You can install the software for this repository using the steps in our [INSTALLATION.md](INSTALLATION.md) file. -1. Do you want to contribute to our code base? Look at our [CONTRIBUTING.md](CONTRIBUTING.md) file to get started. There you'll also find links to: - 1. Our code of conduct documentation in the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file. - 1. How we handle the processing of new and existing issues in our [ISSUE_GUIDELINES.md](ISSUE_GUIDELINES.md) file. - 1. The methodologies we use to manage our pull requests in our [PR_GUIDELINES.md](PR_GUIDELINES.md) file. -1. The `talawa` documentation can be found at our [docs.talawa.io](https://docs.talawa.io) site. - 1. It is automatically generated from the markdown files stored in our [Talawa-Docs GitHub repository](https://github.com/PalisadoesFoundation/talawa-docs). This makes it easy for you to update our documenation. - -# Videos - -1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights - 1. The "Getting Started - Developers" videos are extremely helpful for new open source contributors. - diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index 2aef38bdb..000000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,88 +0,0 @@ -include: package:lint/analysis_options.yaml - -analyzer: - exclude: - - lib/generated_plugin_registrant.dart - - test/helpers/test_helpers.mocks.dart - - plugins: - - custom_lint - -custom_lint: - rules: - - talawa_lint - - exclude: - - test - -linter: - rules: - # Make constructors the first thing in every class - sort_constructors_first: true - - # Use parameter order as in json response - always_put_required_named_parameters_first: false - - # Util classes - avoid_classes_with_only_static_members: false - - avoid_redundant_argument_values: false - - # Unnecessary use of this in constructors should not be done - unnecessary_this: false - - # source files name using lowercase_with_underscores - file_names: true - - leading_newlines_in_multiline_strings: false - - # Forces explicit return type declaration - always_declare_return_types: true - - type_annotate_public_apis: false - - # To make a quick navigation to particular files - always_use_package_imports: true - - directives_ordering: true - - # In case of production should be set to true - avoid_print: false - - avoid_unnecessary_containers: false - - prefer_if_elements_to_conditional_expressions: false - - avoid_function_literals_in_foreach_calls: false - - join_return_with_assignment: false - - prefer_const_literals_to_create_immutables: false - - depend_on_referenced_packages: true - - # This new lint rule advises to use methods on dynamic objects - # only after properly type casting. It's quite good and will avoid - # null errors. - # For now, it affects the whole code base; wherever we have done - # something like - # - # ``` - # var obj = json_data['obj']; - # obj.fun_call(param); - # ``` - # - # To fix: Turn on this lint and type cast the object of your file as - # - # ``` - # MyObj obj = json_data['obj'] as MyObj; - # ``` - - avoid_dynamic_calls: true - - ############################################# - ################### REMOVE ################## - ############################################# - unreachable_from_main: false - implicit_call_tearoffs: false - dangling_library_doc_comments: false diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index 0a741cb43..000000000 --- a/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app -key.properties diff --git a/android/app/build.gradle b/android/app/build.gradle deleted file mode 100644 index 410706e21..000000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,70 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - - -android { - packagingOptions { - exclude 'META-INF/services/javax.annotation.processing.Processor' - } - - compileSdkVersion 34 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.talawa" - minSdkVersion 21 - - targetSdkVersion 34 - multiDexEnabled true - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - multiDexEnabled true - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation 'com.android.support:multidex:1.0.3' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.10" -} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index d1b4ad2aa..000000000 --- a/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index e33bf89ba..000000000 --- a/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/kotlin/com/example/talawa/MainActivity.kt b/android/app/src/main/kotlin/com/example/talawa/MainActivity.kt deleted file mode 100644 index 7366da855..000000000 --- a/android/app/src/main/kotlin/com/example/talawa/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.talawa - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/android/app/src/main/res/drawable-night/launch_background.xml b/android/app/src/main/res/drawable-night/launch_background.xml deleted file mode 100644 index 81618253b..000000000 --- a/android/app/src/main/res/drawable-night/launch_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable-night/launch_image.png b/android/app/src/main/res/drawable-night/launch_image.png deleted file mode 100644 index 9ebc349e6..000000000 Binary files a/android/app/src/main/res/drawable-night/launch_image.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-night/launcher_image.xml b/android/app/src/main/res/drawable-night/launcher_image.xml deleted file mode 100644 index 72ffd0710..000000000 --- a/android/app/src/main/res/drawable-night/launcher_image.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f..000000000 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/drawable/chat_icon.png b/android/app/src/main/res/drawable/chat_icon.png deleted file mode 100644 index 068a4df64..000000000 Binary files a/android/app/src/main/res/drawable/chat_icon.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/event_icon.png b/android/app/src/main/res/drawable/event_icon.png deleted file mode 100644 index 07d77b642..000000000 Binary files a/android/app/src/main/res/drawable/event_icon.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 8b8748cca..000000000 --- a/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/launch_image.png b/android/app/src/main/res/drawable/launch_image.png deleted file mode 100644 index 9ebc349e6..000000000 Binary files a/android/app/src/main/res/drawable/launch_image.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/launcher_image.xml b/android/app/src/main/res/drawable/launcher_image.xml deleted file mode 100644 index 72ffd0710..000000000 --- a/android/app/src/main/res/drawable/launcher_image.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/drawable/newsfeed_icon.png b/android/app/src/main/res/drawable/newsfeed_icon.png deleted file mode 100644 index ee35b8464..000000000 Binary files a/android/app/src/main/res/drawable/newsfeed_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index afb72e056..000000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 12fd512e0..000000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index e4c088414..000000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 3c689750f..000000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 133cc242f..000000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 449a9f930..000000000 --- a/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml deleted file mode 100644 index c88cf94be..000000000 --- a/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - #ffffff - #18191A - \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 2ba34d5e4..000000000 --- a/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/xml/filepaths.xml b/android/app/src/main/res/xml/filepaths.xml deleted file mode 100644 index c0f3b318d..000000000 --- a/android/app/src/main/res/xml/filepaths.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index debef2160..000000000 --- a/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 3d4dae489..000000000 --- a/android/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 4d3226abc..000000000 --- a/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index cfe88f690..000000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index 61f635fea..000000000 --- a/android/settings.gradle +++ /dev/null @@ -1,28 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() - - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.2" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.10" apply false - id("com.google.gms.google-services") version "4.4.1" apply false - -} - -include ":app" \ No newline at end of file diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/android/settings_aar.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/assets/fonts/OpenSans-Bold.ttf b/assets/fonts/OpenSans-Bold.ttf deleted file mode 100644 index efdd5e84a..000000000 Binary files a/assets/fonts/OpenSans-Bold.ttf and /dev/null differ diff --git a/assets/fonts/OpenSans-Regular.ttf b/assets/fonts/OpenSans-Regular.ttf deleted file mode 100644 index 29bfd35a2..000000000 Binary files a/assets/fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/assets/fonts/OpenSans-SemiBold.ttf b/assets/fonts/OpenSans-SemiBold.ttf deleted file mode 100644 index 54e7059cf..000000000 Binary files a/assets/fonts/OpenSans-SemiBold.ttf and /dev/null differ diff --git a/assets/fonts/ProductSans-Bold.ttf b/assets/fonts/ProductSans-Bold.ttf deleted file mode 100644 index 96619df92..000000000 Binary files a/assets/fonts/ProductSans-Bold.ttf and /dev/null differ diff --git a/assets/fonts/ProductSans-Medium.ttf b/assets/fonts/ProductSans-Medium.ttf deleted file mode 100644 index fd818d6f5..000000000 Binary files a/assets/fonts/ProductSans-Medium.ttf and /dev/null differ diff --git a/assets/fonts/ProductSans-Regular.ttf b/assets/fonts/ProductSans-Regular.ttf deleted file mode 100644 index e2c69c3fb..000000000 Binary files a/assets/fonts/ProductSans-Regular.ttf and /dev/null differ diff --git a/assets/icons/Info.svg b/assets/icons/Info.svg deleted file mode 100644 index 93411f2da..000000000 --- a/assets/icons/Info.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/angel.svg b/assets/icons/angel.svg deleted file mode 100644 index 7fa8d6c75..000000000 --- a/assets/icons/angel.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/assets/icons/angry.svg b/assets/icons/angry.svg deleted file mode 100644 index 678171ffe..000000000 --- a/assets/icons/angry.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/happy.svg b/assets/icons/happy.svg deleted file mode 100644 index d883c3441..000000000 --- a/assets/icons/happy.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/assets/icons/laugh.svg b/assets/icons/laugh.svg deleted file mode 100644 index a6e532f0e..000000000 --- a/assets/icons/laugh.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/love.svg b/assets/icons/love.svg deleted file mode 100644 index 4d62a5dc3..000000000 --- a/assets/icons/love.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/icons/tear.svg b/assets/icons/tear.svg deleted file mode 100644 index 0d572d65f..000000000 --- a/assets/icons/tear.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/Group 8948.png b/assets/images/Group 8948.png deleted file mode 100644 index 7dcd1b989..000000000 Binary files a/assets/images/Group 8948.png and /dev/null differ diff --git a/assets/images/Organisation_Default_Image.jpeg b/assets/images/Organisation_Default_Image.jpeg deleted file mode 100644 index 590eb4ca2..000000000 Binary files a/assets/images/Organisation_Default_Image.jpeg and /dev/null differ diff --git a/assets/images/Vector.svg b/assets/images/Vector.svg deleted file mode 100644 index 2baabbc08..000000000 --- a/assets/images/Vector.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/images/comment.svg b/assets/images/comment.svg deleted file mode 100644 index cd248c9fb..000000000 --- a/assets/images/comment.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/assets/images/launcher_icon.png b/assets/images/launcher_icon.png deleted file mode 100644 index 9ebc349e6..000000000 Binary files a/assets/images/launcher_icon.png and /dev/null differ diff --git a/assets/images/no_internet.png b/assets/images/no_internet.png deleted file mode 100644 index c267a80f5..000000000 Binary files a/assets/images/no_internet.png and /dev/null differ diff --git a/assets/images/pfp2.png b/assets/images/pfp2.png deleted file mode 100644 index c267a80f5..000000000 Binary files a/assets/images/pfp2.png and /dev/null differ diff --git a/assets/images/repost.svg b/assets/images/repost.svg deleted file mode 100644 index 036dc9442..000000000 --- a/assets/images/repost.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/talawa-logo-lite-200x200.png b/assets/images/talawa-logo-lite-200x200.png deleted file mode 100644 index 9d3413766..000000000 Binary files a/assets/images/talawa-logo-lite-200x200.png and /dev/null differ diff --git "a/assets/images/\360\237\246\206 icon _like_.svg" "b/assets/images/\360\237\246\206 icon _like_.svg" deleted file mode 100644 index 686cd5b4e..000000000 --- "a/assets/images/\360\237\246\206 icon _like_.svg" +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/coderabbit.yaml b/coderabbit.yaml deleted file mode 100644 index 46e2d25b8..000000000 --- a/coderabbit.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json -language: "en-US" -early_access: false -reviews: - profile: "chill" - request_changes_workflow: true - high_level_summary: true - poem: true - review_status: true - collapse_walkthrough: false - auto_review: - enabled: true - drafts: false - base_branches: - - develop -chat: - auto_reply: true \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore deleted file mode 100644 index 151026b91..000000000 --- a/ios/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f97..000000000 --- a/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f3..000000000 --- a/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe2..000000000 --- a/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile deleted file mode 100644 index 2c068c404..000000000 --- a/ios/Podfile +++ /dev/null @@ -1,41 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '12.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/ios/Podfile.lock b/ios/Podfile.lock deleted file mode 100644 index 8d5953fa6..000000000 --- a/ios/Podfile.lock +++ /dev/null @@ -1,115 +0,0 @@ -PODS: - - connectivity_plus (0.0.1): - - Flutter - - Reachability - - Flutter (1.0.0) - - FMDB (2.7.5): - - FMDB/standard (= 2.7.5) - - FMDB/standard (2.7.5) - - image_cropper (0.0.4): - - Flutter - - TOCropViewController (~> 2.6.1) - - image_picker (0.0.1): - - Flutter - - MTBBarcodeScanner (5.0.11) - - path_provider_ios (0.0.1): - - Flutter - - "permission_handler (5.1.0+2)": - - Flutter - - qr_code_scanner (0.2.0): - - Flutter - - MTBBarcodeScanner - - quick_actions (0.0.1): - - Flutter - - Reachability (3.2) - - shared_preferences (0.0.1): - - Flutter - - social_share (0.0.1): - - Flutter - - sqflite (0.0.2): - - Flutter - - FMDB (>= 2.7.5) - - TOCropViewController (2.6.1) - - uni_links (0.0.1): - - Flutter - - vibration (1.7.4-nullsafety.0): - - Flutter - - video_player (0.0.1): - - Flutter - -DEPENDENCIES: - - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - - Flutter (from `Flutter`) - - image_cropper (from `.symlinks/plugins/image_cropper/ios`) - - image_picker (from `.symlinks/plugins/image_picker/ios`) - - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - - permission_handler (from `.symlinks/plugins/permission_handler/ios`) - - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) - - quick_actions (from `.symlinks/plugins/quick_actions/ios`) - - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - - social_share (from `.symlinks/plugins/social_share/ios`) - - sqflite (from `.symlinks/plugins/sqflite/ios`) - - uni_links (from `.symlinks/plugins/uni_links/ios`) - - vibration (from `.symlinks/plugins/vibration/ios`) - - video_player (from `.symlinks/plugins/video_player/ios`) - -SPEC REPOS: - trunk: - - FMDB - - MTBBarcodeScanner - - Reachability - - TOCropViewController - -EXTERNAL SOURCES: - connectivity_plus: - :path: ".symlinks/plugins/connectivity_plus/ios" - Flutter: - :path: Flutter - image_cropper: - :path: ".symlinks/plugins/image_cropper/ios" - image_picker: - :path: ".symlinks/plugins/image_picker/ios" - path_provider_ios: - :path: ".symlinks/plugins/path_provider_ios/ios" - permission_handler: - :path: ".symlinks/plugins/permission_handler/ios" - qr_code_scanner: - :path: ".symlinks/plugins/qr_code_scanner/ios" - quick_actions: - :path: ".symlinks/plugins/quick_actions/ios" - shared_preferences: - :path: ".symlinks/plugins/shared_preferences/ios" - social_share: - :path: ".symlinks/plugins/social_share/ios" - sqflite: - :path: ".symlinks/plugins/sqflite/ios" - uni_links: - :path: ".symlinks/plugins/uni_links/ios" - vibration: - :path: ".symlinks/plugins/vibration/ios" - video_player: - :path: ".symlinks/plugins/video_player/ios" - -SPEC CHECKSUMS: - connectivity_plus: 5f0eb61093bec56935f21a1699dd2758bc895587 - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a - FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98 - image_picker: e06f7a68f000bd36f552c1847e33cda96ed31f1f - MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5 - permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 - qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e - quick_actions: 6cb2390c4dab0e737c94573c27e18d9666710720 - Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d - social_share: 702a5e3842addd22db515aa9e1e00a4b80a0296d - sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863 - uni_links: d97da20c7701486ba192624d99bffaaffcfc298a - vibration: 1ec279c4a1a7a646627b54039d812334b3f1114a - video_player: ecd305f42e9044793efd34846e1ce64c31ea6fcb - -PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea - -COCOAPODS: 1.11.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 39eccc98c..000000000 --- a/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,565 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 6915D38338D0ADAB147B5DB7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11EBC6466495142DFCF23943 /* Pods_Runner.framework */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - AA09F252DE0CCC7E69DE3E12 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69935DC81F37E501ACAA4312 /* Pods_Runner.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 11EBC6466495142DFCF23943 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 1EAE81F3FE5F67128E58B85C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 69935DC81F37E501ACAA4312 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 786A3858C1D311840AA1B4F9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 93F84FD8134080F559F7DA61 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C1864E0A0142AEF880972331 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - F0F18908A6BD606AFFAECAC6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AA09F252DE0CCC7E69DE3E12 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 15ED1F9ED2C51FEC3C38506F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 69935DC81F37E501ACAA4312 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 987BE9FBF8B99A813F359646 /* Pods */, - 15ED1F9ED2C51FEC3C38506F /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 987BE9FBF8B99A813F359646 /* Pods */ = { - isa = PBXGroup; - children = ( - 93F84FD8134080F559F7DA61 /* Pods-Runner.debug.xcconfig */, - C1864E0A0142AEF880972331 /* Pods-Runner.release.xcconfig */, - F0F18908A6BD606AFFAECAC6 /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 7AE1B0F508BCAB74F4600E45 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - F5E55538C6E5FA6AF4D9E28D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 13FF27AB0F3886FAC5A400E8 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 7AE1B0F508BCAB74F4600E45 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - F5E55538C6E5FA6AF4D9E28D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 3db53b6e1..000000000 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14c..000000000 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5e..000000000 --- a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a8..000000000 --- a/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png deleted file mode 100644 index 11d3da689..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png deleted file mode 100644 index 4ec6dfae1..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png deleted file mode 100644 index f40d5e03f..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png deleted file mode 100644 index 37acc361b..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png deleted file mode 100644 index 9b1922180..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png deleted file mode 100644 index 463b58b71..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png deleted file mode 100644 index d93204039..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png deleted file mode 100644 index a6393d471..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png deleted file mode 100644 index cac6dfba0..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png deleted file mode 100644 index cda9658a6..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png deleted file mode 100644 index fbde3620c..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 73d3b7f6d..000000000 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1 +0,0 @@ -{"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"}]} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada472..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf030..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0b..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde12118..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7e..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306c..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd967..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f5..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b8609..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164a..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d39..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e1..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f5853..000000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json deleted file mode 100644 index 9f447e1b3..000000000 --- a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png deleted file mode 100644 index e29b3b59f..000000000 Binary files a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 00cabce83..000000000 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 67774cf3d..000000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 67774cf3d..000000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 67774cf3d..000000000 Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b7..000000000 --- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index c9811f020..000000000 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516f..000000000 --- a/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist deleted file mode 100644 index f7df0c453..000000000 --- a/ios/Runner/Info.plist +++ /dev/null @@ -1,68 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - talawa - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - UIStatusBarHidden - - LSApplicationQueriesSchemes - - instagram-stories - facebook-stories - facebook - instagram - twitter - whatsapp - tg - - io.flutter.embedded_views_preview - - NSCameraUsageDescription - This app needs camera access to scan QR codes - LSApplicationQueriesSchemes - - sms - tel - - NSPhotoLibraryUsageDescription - Allow access to photo library - - \ No newline at end of file diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a560..000000000 --- a/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/lang/de.json b/lang/de.json deleted file mode 100644 index d1e979820..000000000 --- a/lang/de.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "Hallo", - "User Name": "Nutzername", - "we've": "temos", - "got you covered": "hast du abgedeckt", - "password": "Passwort", - "Enter new password": "Neues Passwort eingeben", - "Re-Enter your password": "Wiederhole die Eingabe deines Passwortes", - "Change Password": "Passwort ändern", - "Email Hint": "test@test.org", - "Enter your registered Email": "Geben Sie Ihre registrierte E-Mail-Adresse ein", - "Enter your password": "Geben Sie Ihr Passwort ein", - "Forgot password": "Passwort vergessen", - "Login": "Anmeldung", - "Sit back relax, we'll": "Lehnen Sie sich entspannt zurück, wir werden", - "Recover": "Genesen", - "your password": "Ihr Passwort", - "Recover Password": "Passwort wiederherstellen", - "Select Language": "Sprache auswählen", - "Default": "Standard", - "Select": "Auswählen", - "Selected Organization": "Ausgewählte Organisation", - "Continue": "Weitermachen", - "Enter Community URL": "Geben Sie die Community-URL ein", - "Verify": "Verifizieren", - "Sign Up": "Anmeldung", - "Change language": "Sprache ändern", - "First Name Hint": "John", - "Enter your first name": "Geben Sie Ihren Vornamen ein", - "Last Name Hint": "Carlos", - "Enter your last name": "Geben Sie Ihren Nachnamen ein", - "Confirm your password": "Bestätigen Sie Ihr Passwort", - "Next": "Nächste", - "Request Sent to": "Anfrage gesendet an", - "Log out": "Ausloggen", - "Join": "Verbinden", - "and": "und", - "Collaborate": "Zusammenarbeiten", - "with your": "mit Ihrem", - "Organizations": "Organisationen", - "Title from the viewMode GSoC branch": "Titel aus dem Ansichtsmodus GSoC-Zweig", - "Please verify URL first": "Bitte zuerst URL bestätigen", - "Enter a valid URL": "Geben Sie eine gültige URL ein", - "Firstname must not be left blank.": "Der Vorname darf nicht leer bleiben.", - "Invalid Firstname": "Ungültiger Vorname", - "Lastname must not be left blank.": "Der Nachname darf nicht leer bleiben.", - "Invalid Lastname": "Ungültiger Nachname", - "Email must not be left blank": "E-Mail darf nicht leer sein", - "Please enter a valid Email Address": "Bitte geben Sie eine gültige E-Mail-Adresse ein", - "Password must not be left blank": "Passwort darf nicht leer bleiben", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "Ihr Passwort muss mindestens 8 Zeichen lang sein, mindestens eine Ziffer, einen Groß- und einen Kleinbuchstaben und ein Sonderzeichen (@, #, $, etc.) enthalten.", - "Password must not contain spaces": "Passwort darf keine Leerzeichen enthalten", - "Password does not match original": "Passwort stimmt nicht mit Original überein", - "Join Organisation": "Der Organisation beitreten", - "We're": "Wurden", - "Glad": "Froh", - "you're": "du bist", - "Back": "Zurück", - "Let's": "Lasst uns", - "get": "werden", - "you": "Sie", - "SignUp": "Anmeldung", - "Please wait": "Warten Sie mal", - "for organisation(s) to accept your invitation.": "für Organisationen, um Ihre Einladung anzunehmen.", - "Add Event Title": "Ereignistitel hinzufügen", - "Where is the event": "Wo ist die Veranstaltung", - "Add Location": "Ort hinzufügen", - "Describe the event": "Beschreiben Sie die Veranstaltung", - "Add Description": "Beschreibung hinzufügen", - "Add Event": "Ereignis hinzufügen", - "Add": "Anzeige", - "Add Image": "Bild hinzufügen", - "Select Start Date": "Startdatum auswählen", - "Select End Date": "Enddatum auswählen", - "Select Start Date and Time": "Wählen Sie Startdatum und -uhrzeit", - "Select End Date and Time": "Wählen Sie Enddatum und -uhrzeit", - "Does not repeat": "Wiederholt sich nicht", - "Keep Public": "Öffentlich halten", - "Keep Registerable": "Registrierbar bleiben", - "Event Details": "Veranstaltungsdetails", - "Register": "Registrieren", - "Created by": "Erstellt von", - "public": "öffentlich", - "private": "Privatgelände", - "Description": "Beschreibung", - "Admins": "Admins", - "Attendees": "Teilnehmerinnen", - "See all": "Alles sehen", - "Start Date": "Startdatum", - "End Date": "Endtermin", - "Cancel": "Abbrechen", - "Done": "Fertig", - "Explore Events": "Veranstaltungen erkunden", - "Filters": "Filter", - "Filter by Date": "Filtern nach Datum", - "Show all events": "Alle Veranstaltungen anzeigen", - "Show all events created by you": "Alle Veranstaltungen anzeigen, die von Ihnen erstellt wurden", - "Show all events you have registered": "Alle Veranstaltungen anzeigen, für die Sie sich registriert haben", - "Show events for all": "Alle Veranstaltungen anzeigen", - "Show invite-only events": "Nur Einladungsveranstaltungen anzeigen", - "Add Date": "Datum hinzufügen", - "Event": "Vorfall", - "My Events": "Meine Veranstaltungen", - "Public Events": "Öffentliche Veranstaltungen", - "Private Events": "Private Veranstaltungen", - "Liked by": "Beliebt bei", - "Comments": "Kommentare", - "FirstName LastName": "Vorname Nachname", - "Pinned Posts": "Angepinnte Beiträge", - "Profile": "Profil", - "Email": "Email", - "Update": "Aktualisieren", - "App Settings": "App Einstellungen", - "Language": "Sprache", - "dark mode": "Dunkelmodus", - "font size": "Schriftgröße", - "Help": "Hilfe", - "Reach out to us for help": "Wenden Sie sich an uns, um Hilfe zu erhalten", - "Donate Us": "Spenden Sie uns", - "Help us to develop for you": "Helfen Sie uns, für Sie zu entwickeln", - "Log out from Talawa": "Abmelden von Talawa", - "Share News": "Neuigkeiten teilen", - "Post": "Post", - "Organization Name": "Organisationsname", - "Add hasthtag": "Hashtag hinzufügen", - "Write here what do you want to share": "Schreiben Sie hier, was Sie teilen möchten", - "Join selected organisation": "Ausgewählter Organisation beitreten", - "Home": "Heim", - "Events": "Veranstaltungen", - "Chat": "Plaudern", - "Chat Screen": "Chat-Bildschirm", - "Confirm": "Bestätigen Sie", - "Confirmation": "Bestätigung", - "Close": "Nah dran", - "Switch Organization": "Organisation wechseln", - "Join new Organization": "Treten Sie einer neuen Organisation bei", - "Leave Current Organization": "Aktuelle Organisation verlassen", - "Creator": "Schöpferin", - "Public": "Öffentlich", - "Private": "Privatgelände", - "No Internet": "Ohne Internet", - "Subscribed": "Gezeichnet", - "from": "von", - "See all Pinned news": "Alle gepinnten Nachrichten ansehen", - "show more": "Zeig mehr", - "show less": "zeige weniger", - "Likes": "Likes", - "comments": "Kommentare", - "Final": "Finale", - "Enter Details": "Details eingeben", - "Select\nOrganization": "Organisation\nauswählen", - "already selected": "bereits ausgewählt", - "Switched to": "Gewechselt zu", - "Organisation already joined": "Organisation bereits beigetreten", - "Membership request already sent": "Mitgliedsantrag bereits gesendet", - "Select one organization to continue": "Wählen Sie eine Organisation aus, um fortzufahren", - "Something went wrong": "Etwas ist schief gelaufen", - "Join in request sent to": "Beitrittsanfrage gesendet an", - "successfully": "erfolgreich", - "Are you sure you want to logout?": "Möchten Sie sich wirklich abmelden?", - "Logout": "Ausloggen", - "Settings": "Einstellungen", - "Dark Theme": "Dunkles Thema", - "Error": "Fout", - "Warning": "Waarschuwing", - "Information": "Informatie", - "No account registered with this email": "Server werkt niet/verkeerde url", - "Dismiss": "afwijzen", - "No organizations found Please contact your admin": "Geen organisaties gevonden! Neem contact op met uw beheerder", - "Notification Feature is not installed": "Meddelelsesfunktionen er ikke installeret", - "For complete access, please": "Für vollständigen Zugriff bitte", - "join an organization.": " einer Organisation beitreten.", - "JOIN": "BEITRETEN", - "Camera": "Kamera", - "Gallery": "Galerie", - "NEXT": "NÄCHSTE", - "COMPLETE": "VOLLSTÄNDIG", - "Start app tour to know talawa functioning": "Starten Sie die App-Tour, um die Funktionsweise von Talawa zu erfahren", - "Scan QR": "QR scannen", - "Add tag": "Tag hinzufügen", - "Enter the Tag": "Geben Sie das Tag ein", - "Title": "Titel", - "Where is the event?": "Wo ist das Ereignis?", - "Add Members": "Mitglieder hinzufügen", - "All Events": "Alle Veranstaltungen", - "Created Events": "Erstellte Veranstaltungen", - "Registered Events": "Registrierte Veranstaltungen", - "Send": "Senden", - "Write your comment here..": "Schreiben Sie hier Ihren Kommentar..", - "You need access": "Sie benötigen Zugang", - "Request access, or switch to an account with access": "Fordern Sie Zugang an oder wechseln Sie zu einem Konto mit Zugang", - "Request Access": "Zugang anfordern", - "Last Name": "Nachname", - "First Name": "Vorname", - "Edit Profile": "Profil bearbeiten", - "Log Out": "Ausloggen", - "Please Select an amount": "Bitte wählen Sie einen Betrag", - "Input custom amount": "Benutzerdefinierten Betrag eingeben", - "Organisation Name": "Name der Organisation", - "Choose an Organization": "Wählen Sie eine Organisation", - "Your Report has been sent to the Admin": "Ihr Bericht wurde an den Admin gesendet", - "Report the post to the Admin": "Melden Sie den Beitrag dem Admin", - "Do you really want to delete the post?": "Möchten Sie den Beitrag wirklich löschen?", - "Liked": "Gefällt", - "Looks like there aren't any events.": "Es scheint keine Veranstaltungen zu geben.", - "You have not created any event.": "Sie haben keine Veranstaltung erstellt.", - "No registered events are present": "Keine registrierten Veranstaltungen vorhanden", - "There aren't any public events.": "Es gibt keine öffentlichen Veranstaltungen.", - "There aren't any private events.": "Es gibt keine privaten Veranstaltungen.", - "Donate to the Community": "An die Gemeinschaft spenden", - "Donating to": "Spenden an", - "Are you sure you want to delete this event?": "Sind Sie sicher, dass Sie diese Veranstaltung löschen möchten?", - "Are you sure you want to exit this organization?": "Sind Sie sicher, dass Sie diese Organisation verlassen möchten?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "Dies ist der Profil-Tab, hier können Sie alle Optionen im Zusammenhang mit dem Konto, den App-Einstellungen, der Einladung, der Hilfe usw. sehen", - "You can edit application settings like language, theme etc from here": "Sie können die Einstellungen der Anwendung wie Sprache, Thema usw. von hier aus bearbeiten", - "For any help we are always there. You can reach us from here": "Für jede Hilfe sind wir immer da. Sie können uns von hier aus erreichen", - "Current selected Organization Name": "Name der aktuell ausgewählten Organisation", - "Click this button to see options related to switching, joining and leaving organization(s)": "Klicken Sie auf diese Schaltfläche, um Optionen zum Wechseln, Beitreten und Verlassen von Organisation(en) zu sehen", - "Current selected Organization's Name appears here": "Der Name der aktuell ausgewählten Organisation erscheint hier", - "All your joined organizations appear over here you can click on them to change the current organization": "Alle beigetretenen Organisationen erscheinen hier, Sie können darauf klicken, um die aktuelle Organisation zu wechseln", - "From this button you can join other listed organizations": "Über diese Schaltfläche können Sie anderen aufgeführten Organisationen beitreten", - "To leave the current organization you can use this option": "Um die aktuelle Organisation zu verlassen, können Sie diese Option nutzen", - "This is the post card you can like and comment on the post from the options available": "Dies ist die Postkarte, Sie können den Beitrag über die verfügbaren Optionen liken und kommentieren", - "This is the Events tab here you can see all event related information of the current selected organization": "Dies ist der Veranstaltungs-Tab, hier können Sie alle ereignisbezogenen Informationen der aktuell ausgewählten Organisation sehen", - "This is the home tab here you can see the latest post from other members of the current organization": "Dies ist der Home-Tab, hier können Sie den neuesten Beitrag von anderen Mitgliedern der aktuellen Organisation sehen", - "This section displays all the important post set by the organization admin(s)": "Dieser Abschnitt zeigt alle wichtigen Beiträge, die von den Admin(s) der Organisation festgelegt wurden", - "Filter Events based on categories": "Veranstaltungen nach Kategorien filtern", - "Filter Events between selected dates": "Veranstaltungen zwischen ausgewählten Daten filtern", - "Description of event to see more details click on the card": "Beschreibung der Veranstaltung, um weitere Details zu sehen, klicken Sie auf die Karte", - "This is the Create post tab here you can add post to the current selected organization": "Dies ist der Tab 'Beitrag erstellen', hier können Sie der aktuell ausgewählten Organisation einen Beitrag hinzufügen", - "This is the Chat tab here you can see all your messages of the current selected organization": "Dies ist der Chat-Tab, hier können Sie alle Ihre Nachrichten der aktuell ausgewählten Organisation sehen", - "To help your organization grow you can support them financially from here": "Um Ihre Organisation zu unterstützen, können Sie sie finanziell von hier aus unterstützen.", - "You have no event in this organization": "Sie haben keine Veranstaltung in dieser Organisation", - "Create your first event": "Erstellen Sie Ihr erstes Event", - "You are all set to go let's get you in": "Sie sind bereit zu gehen, lassen Sie uns Ihnen helfen.", - "There are no posts in this organization": "Es gibt keine Beiträge in dieser Organisation", - "Create your first post": "Erstellen Sie Ihren ersten Beitrag", - "You have no post in this organization": "Sie haben keinen Beitrag in dieser Organisation", - "You can create a new event from here": "Hier können Sie eine neue Veranstaltung erstellen", - "You are all set to go lets get you in": "Sie sind bereit zu gehen, lassen Sie uns Sie hereinbringen", - "App Tour": "App-Tour", - "Start": "Starten", - "Skip": "Überspringen", - "Posts": "Beiträge", - "Tasks": "Aufgaben", - "Or": "Oder", - "Please select any amount": "Bitte wählen Sie einen Betrag aus", - "Registered": "Registriert", - "Not Registrable": "Nicht registrierbar", - "Enter the title of your post": "Gib den Titel deines Beitrags ein", - "General": "Allgemein", - "Help & Support": "Hilfe & Support", - "Talawa Docs": "Talawa Dokumentation", - "All day": "Den ganzen Tag", - "Join an Organisation": "Einer Organisation beitreten", - "DONATE": "SPENDEN", - "Permission Denied": "Berechtigung verweigert", - "Camera permission is required, to use this feature, give permission from app settings": "Die Kamera-Berechtigung ist erforderlich, um diese Funktion zu verwenden. Erteilen Sie die Berechtigung über die App-Einstellungen.", - "SETTINGS": "EINSTELLUNGEN", - "LogOut": "Ausloggen", - "Membership request already exist": "Mitgliedsantrag existiert bereits", - "Enter a valid password": "Geben Sie ein gültiges Passwort ein", - "Organization Not Found": "Organisation nicht gefunden", - "Account with this email already registered": "Konto mit dieser E-Mail bereits registriert", - "Something went wrong!": "Etwas ist schief gelaufen!", - "URL doesn't exist/no connection please check": "URL existiert nicht/keine Verbindung, bitte überprüfen Sie", - "The QR is not Working": "Der QR-Code funktioniert nicht", - "This QR version is not Supported.": "Diese QR-Version wird nicht unterstützt.", - "Comment sent": "Kommentar gesendet", - "Server not running/wrong url": "Server wird nicht ausgeführt/falsche URL", - "Couldn't update User details": "Benutzerdetails konnten nicht aktualisiert werden", - "Image is added": "Bild hinzugefügt", - "Post is uploaded": "Beitrag hochgeladen", - "Profile updated successfully": "Profil erfolgreich aktualisiert", - "The Camera is not working": "Die Kamera funktioniert nicht", - "This QR is not for the App": "Dieser QR-Code ist nicht für die App", - "The tag was added": "Der Tag wurde hinzugefügt", - "Start time must be before end time": "Die Startzeit muss vor der Endzeit liegen", - "Organisation on different server, logout and scan qr again": "Organisation auf einem anderen Server, ausloggen und QR-Code erneut scannen", - "Post was deleted if you had the rights!": "Der Beitrag wurde gelöscht, wenn Sie die Berechtigungen hatten!", - "Members": "Mitglieder" -} diff --git a/lang/en.json b/lang/en.json deleted file mode 100644 index a110b9ae4..000000000 --- a/lang/en.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "Hello", - "User Name": "User Name", - "we've": "we've", - "got you covered": "got you covered", - "password": "password", - "Enter new password": "Enter new password", - "Re-Enter your password": "Re-Enter your password", - "Change Password": "Change Password", - "Email Hint": "test@test.org", - "Enter your registered Email": "Enter your registered Email", - "Enter your password": "Enter your password", - "Forgot password": "Forgot password", - "Login": "Login", - "Notification Feature is not installed": "Notification Feature is not installed", - "Sit back relax, we'll": "Sit back relax, we'll", - "Recover": "Recover", - "your password": "your password", - "Recover Password": "Recover Password", - "Select Language": "Select Language", - "Default": "Default", - "Select": "Select", - "Selected Organization": "Selected Organization", - "Continue": "Continue", - "Enter Community URL": "Enter Community URL", - "Verify": "Verify", - "Sign Up": "Sign Up", - "Change language": "Change language", - "First Name Hint": "John", - "Enter your first name": "Enter your first name", - "Last Name Hint": "Carlos", - "Enter your last name": "Enter your last name", - "Confirm your password": "Confirm your password", - "Next": "Next", - "Request Sent to": "Request Sent to", - "Log out": "Log out", - "Error": "Error", - "Warning": "Warning", - "Information": "Information", - "No account registered with this email": "No account registered with this email", - "Dismiss": "Dismiss", - "Join": "Join", - "and": "and", - "Collaborate": "Collaborate", - "with your": "with your", - "Organizations": "Organizations", - "Title from the viewMode GSoC branch": "Title from the viewMode GSoC branch", - "Please verify URL first": "Please verify URL first", - "Enter a valid URL": "Enter a valid URL", - "Firstname must not be left blank.": "Firstname must not be left blank.", - "Invalid Firstname": "Invalid Firstname", - "Lastname must not be left blank.": "Lastname must not be left blank.", - "Invalid Lastname": "Invalid Lastname", - "Email must not be left blank": "Email must not be left blank", - "Please enter a valid Email Address": "Please enter a valid Email Address", - "Password must not be left blank": "Password must not be left blank", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)", - "Password must not contain spaces": "Password must not contain spaces", - "Password does not match original": "Password does not match original", - "Join Organisation": "Join Organisation", - "We're": "We're", - "Glad": "Glad", - "you're": "you're", - "Back": "Back", - "Let's": "Let's", - "get": "get", - "you": "you", - "SignUp": "SignUp", - "Please wait": "Please wait", - "for organisation(s) to accept your invitation.": "for organisation(s) to accept your invitation.", - "Add Event Title": "Add Event Title", - "Where is the event": "Where is the event", - "Add Location": "Add Location", - "Describe the event": "Describe the event", - "Add Description": "Add Description", - "Add Event": "Add Event", - "Add": "Add", - "Add Image": "Add Image", - "Select Start Date": "Select Start Date", - "Select End Date": "Select End Date", - "Select Start Date and Time": "Select Start Date and Time", - "Select End Date and Time": "Select End Date and Time", - "Does not repeat": "Does not repeat", - "Keep Public": "Keep Public", - "Keep Registerable": "Keep Registerable", - "Event Details": "Event Details", - "Register": "Register", - "Created by": "Created by", - "public": "public", - "private": "private", - "Description": "Description", - "Admins": "Admins", - "Attendees": "Attendees", - "See all": "See all", - "Start Date": "Start Date", - "End Date": "End Date", - "Cancel": "Cancel", - "Done": "Done", - "Explore Events": "Explore Events", - "Filters": "Filters", - "Filter by Date": "Filter by Date", - "Show all events": "Show all events", - "Show all events created by you": "Show all events created by you", - "Show all events you have registered": "Show all events you have registered", - "Show events for all": "Show events for all", - "Show invite-only events": "Show invite-only events", - "Add Date": "Add Date", - "Event": "Event", - "My Events": "My Events", - "Public Events": "Public Events", - "Private Events": "Private Events", - "Liked by": "Liked by", - "Comments": "Comments", - "FirstName LastName": "FirstName LastName", - "Pinned Posts": "Pinned Posts", - "Profile": "Profile", - "Email": "Email", - "Update": "Update", - "App Settings": "App Settings", - "Language": "Language", - "dark mode": "dark mode", - "font size": "font size", - "Help": "Help", - "Reach out to us for help": "Reach out to us for help", - "Donate Us": "Donate Us", - "Help us to develop for you": "Help us to develop for you", - "Log out from Talawa": "Log out from Talawa", - "Share News": "Share News", - "Post": "Post", - "Organization Name": "Organization Name", - "Add hasthtag": "Add hasthtag", - "Write here what do you want to share": "Write here what do you want to share", - "Join selected organisation": "Join selected organisation", - "Home": "Home", - "Events": "Events", - "Chat": "Chat", - "Chat Screen": "Chat Screen", - "Confirm": "Confirm", - "Confirmation": "Confirmation", - "Close": "Close", - "Switch Organization": "Switch Organization", - "Join new Organization": "Join new Organization", - "Leave Current Organization": "Leave Current Organization", - "Creator": "Creator", - "Public": "Public", - "Private": "Private", - "No Internet": "No Internet", - "Subscribed": "Subscribed", - "from": "from", - "See all Pinned news": "See all Pinned news", - "show more": "show more", - "show less": "show less", - "Likes": "Likes", - "comments": "comments", - "Final": "Final", - "Enter Details": "Enter Details", - "Select\nOrganization": "Select\nOrganization", - "already selected": "already selected", - "Switched to": "Switched to", - "Organisation already joined": "Organisation already joined", - "Membership request already sent": "Membership request already sent", - "Select one organization to continue": "Select one organization to continue", - "Something went wrong": "Something went wrong", - "Join in request sent to": "Join in request sent to", - "successfully": "successfully", - "Are you sure you want to logout?": "Are you sure you want to logout?", - "Logout": "Logout", - "Settings": "Settings", - "Dark Theme": "Dark Theme", - "No organizations found Please contact your admin": "No organizations found ! Please contact your admin", - "For complete access, please": "For complete access, please", - "join an organization.": " join an organization.", - "JOIN": "JOIN", - "Camera": "Camera", - "Gallery": "Gallery", - "NEXT": "NEXT", - "COMPLETE": "COMPLETE", - "Start app tour to know talawa functioning": "Start app tour to know talawa functioning", - "Scan QR": "Scan QR", - "Add tag": "Add tag", - "Enter the Tag": "Enter the Tag", - "Title": "Title", - "Where is the event?": "Where is the event?", - "Add Members": "Add Members", - "All Events": "All Events", - "Created Events": "Created Events", - "Registered Events": "Registered Events", - "Send": "Send", - "Write your comment here..": "Write your comment here..", - "You need access": "You need access", - "Request access, or switch to an account with access": "Request access, or switch to an account with access", - "Request Access": "Request Access", - "Last Name": "Last Name", - "First Name": "First Name", - "Edit Profile": "Edit Profile", - "Log Out": "Log Out", - "Please Select an amount": "Please Select an amount", - "Input custom amount": "Input custom amount", - "Organisation Name": "Organisation Name", - "Choose an Organization": "Choose an Organization", - "Your Report has been sent to the Admin": "Your Report has been sent to the Admin", - "Report the post to the Admin": "Report the post to the Admin", - "Do you really want to delete the post?": "Do you really want to delete the post?", - "Liked": "Liked", - "Looks like there aren't any events.": "Looks like there aren't any events.", - "You have not created any event.": "You have not created any event.", - "No registered events are present": "No registered events are present", - "There aren't any public events.": "There aren't any public events.", - "There aren't any private events.": "There aren't any private events.", - "Donate to the Community": "Donate to the Community", - "Donating to": "Donating to", - "Are you sure you want to delete this event?": "Are you sure you want to delete this event?", - "Are you sure you want to exit this organization?": "Are you sure you want to exit this organization?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc.", - "You can edit application settings like language, theme etc from here": "You can edit application settings like language, theme etc from here.", - "For any help we are always there. You can reach us from here": "For any help, we are always there. You can reach us from here.", - "Current selected Organization Name": "Current selected Organization Name", - "Click this button to see options related to switching, joining and leaving organization(s)": "Click this button to see options related to switching, joining and leaving organization(s).", - "Current selected Organization's Name appears here": "Current selected Organization's Name appears here.", - "All your joined organizations appear over here you can click on them to change the current organization": "All your joined organizations appear over here you can click on them to change the current organization.", - "From this button you can join other listed organizations": "From this button you can join other listed organizations.", - "To leave the current organization you can use this option": "To leave the current organization you can use this option.", - "This is the post card you can like and comment on the post from the options available": "This is the post card you can like and comment on the post from the options available.", - "This is the Events tab here you can see all event related information of the current selected organization": "This is the Events tab here you can see all event related information of the current selected organization.", - "This is the home tab here you can see the latest post from other members of the current organization": "This is the home tab here you can see the latest post from other members of the current organization.", - "This section displays all the important post set by the organization admin(s)": "This section displays all the important post set by the organization admin(s).", - "Filter Events based on categories": "Filter Events based on categories.", - "Filter Events between selected dates": "Filter Events between selected dates.", - "Description of event to see more details click on the card": "Description of event to see more details click on the card.", - "This is the Create post tab here you can add post to the current selected organization": "This is the Create post tab here you can add post to the current selected organization.", - "This is the Chat tab here you can see all your messages of the current selected organization": "This is the Chat tab here you can see all your messages of the current selected organization.", - "To help your organization grow you can support them financially from here": "To help your organization grow you can support them financially from here.", - "You are all set to go let's get you in": "You are all set to go let's get you in.", - "You have no event in this organization": "You have no event in this organization", - "Create your first event": "Create your first event", - "There are no posts in this organization": "There are no posts in this organization", - "Create your first post": "Create your first post", - "You have no post in this organization": "You have no post in this organization", - "You can create a new event from here": "You can create a new event from here", - "You are all set to go lets get you in": "You are all set to go lets get you in", - "App Tour": "App Tour", - "Start": "Start", - "Skip": "Skip", - "Posts": "Posts", - "Tasks": "Tasks", - "Or": "Or", - "Please select any amount": "Please select any amount", - "Registered": "Registered", - "Not Registrable": "Not Registrable", - "Enter the title of your post": "Enter the title of your post", - "General": "General", - "Help & Support": "Help & Support", - "Talawa Docs": "Talawa Docs", - "All day": "All day", - "Join an Organisation": "Join an Organisation", - "DONATE": "DONATE", - "Permission Denied": "Permission Denied", - "Camera permission is required, to use this feature, give permission from app settings": "Camera permission is required, to use this feature, give permission from app settings", - "SETTINGS": "SETTINGS", - "LogOut": "LogOut", - "Membership request already exist": "Membership request already exist", - "Enter a valid password": "Enter a valid password", - "Organization Not Found": "Organization Not Found", - "Account with this email already registered": "Account with this email already registered", - "Something went wrong!": "Something went wrong!", - "URL doesn't exist/no connection please check": "URL doesn't exist/no connection please check", - "The QR is not Working": "The QR is not Working", - "This QR version is not Supported.": "This QR version is not Supported.", - "Comment sent": "Comment sent", - "Server not running/wrong url": "Server not running/wrong url", - "Couldn't update User details": "Couldn't update User details", - "Image is added": "Image is added", - "Post is uploaded": "Post is uploaded", - "Profile updated successfully": "Profile updated successfully", - "The Camera is not working": "The Camera is not working", - "This QR is not for the App": "This QR is not for the App", - "The tag was added": "The tag was added", - "Start time must be before end time": "Start time must be before end time", - "Organisation on different server, logout and scan qr again": "Organisation on different server, logout and scan qr again", - "Post was deleted if you had the rights!": "Post was deleted if you had the rights!", - "Members": "Members" -} diff --git a/lang/es.json b/lang/es.json deleted file mode 100644 index 9885c9af3..000000000 --- a/lang/es.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "hola", - "User Name": "Nombre de usuario", - "we've": "tenemos", - "got you covered": "te cubrió", - "password": "contraseña", - "Enter new password": "Introduzca nueva contraseña", - "Re-Enter your password": "Vuelva a ingresar su contraseña", - "Change Password": "Cambiar contraseña", - "Email Hint": "test@test.org", - "Enter your registered Email": "Ingrese su correo electrónico registrado", - "Enter your password": "Ingresa tu contraseña", - "Forgot password": "¿Olvidaste la contraseña?", - "Login": "Acceso", - "Sit back relax, we'll": "Siéntese, ", - "Recover": "", - "Notification Feature is not installed": "La función de notificación no está instalada", - "your password": "relájese, recuperaremos su contraseña", - "Recover Password": "Recupera tu contraseña", - "Select Language": "Seleccione el idioma", - "Default": "Valor por defecto", - "Select": "Seleccione", - "Selected Organization": "Organización seleccionada", - "Continue": "Continuar", - "Enter Community URL": "Ingrese la URL de la comunidad", - "Verify": "Verificarlo", - "Sign Up": "Inscribirse", - "Change language": "Cambiar idioma", - "First Name Hint": "Isabela", - "Enter your first name": "Ponga su primer nombre", - "Last Name Hint": "Rossellini", - "Enter your last name": "Ingrese su apellido", - "Confirm your password": "Confirmar la contraseña", - "Next": "Próximo", - "Request Sent to": "Solicitud enviada a", - "Log out": "Cerrar sesión", - "Join": "Únase", - "and": "y", - "Collaborate": "colabore", - "with your": "con sus", - "Organizations": "organizaciones", - "Title from the viewMode GSoC branch": "Título de la rama viewMode GSoC", - "Please verify URL first": "Primero verifique la URL", - "Enter a valid URL": "Ingrese una URL válida", - "Firstname must not be left blank.": "El nombre no debe dejarse en blanco.", - "Invalid Firstname": "Nombre inválido", - "Lastname must not be left blank.": "El apellido no debe dejarse en blanco.", - "Invalid Lastname": "Apellido inválido", - "Email must not be left blank": "El correo electrónico no debe dejarse en blanco", - "Please enter a valid Email Address": "Por favor, introduce una dirección de correo electrónico válida", - "Password must not be left blank": "La contraseña no debe dejarse en blanco", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "Su contraseña debe tener al menos 8 caracteres, contener al menos una letra numérica, una mayúscula y una minúscula y un carácter especial (@, #, $, etc.)", - "Password must not contain spaces": "La contraseña no debe contener espacios", - "Password does not match original": "La contraseña no coincide con la original", - "Join Organisation": "Unirse a la organización", - "We're": "Nos", - "Glad": "alegra que", - "you're": "hayas", - "Back": "vuelto", - "Let's": "Consigamos", - "get": "que", - "you": "te", - "SignUp": "registres", - "Please wait": "Espere por favor", - "for organisation(s) to accept your invitation.": "para que la (s) organización (es) acepten su invitación..", - "Add Event Title": "Agregar título de evento", - "Where is the event": "Donde es el evento", - "Add Location": "Añadir lugar", - "Describe the event": "Describe el evento", - "Add Description": "Añadir descripción", - "Add Event": "Añadir evento", - "Add": "Agregarlo", - "Add Image": "Añadir imagen", - "Select Start Date and Time": "Seleccione la fecha y hora de inicio", - "Select End Date and Time": "Seleccione la fecha y hora de finalización", - "Select Start Date": "Seleccionar fecha de inicio", - "Select End Date": "Seleccionar fecha de finalización", - "Does not repeat": "No se repite", - "Keep Public": "Mantener pública", - "Keep Registerable": "Mantener registrable", - "Event Details": "Detalles del evento", - "Register": "Registrarse", - "Created by": "Creado por", - "public": "pública", - "private": "privada", - "Description": "Descripción", - "Admins": "Administradoras", - "Attendees": "Asistentes", - "See all": "Ver todo", - "Start Date": "Fecha de inicio", - "End Date": "Fecha final", - "Cancel": "Cancelar", - "Done": "Hecho", - "Explore Events": "Explorar eventos", - "Filters": "Filtros", - "Filter by Date": "Filtrar por fecha", - "Show all events": "Mostrar todos los eventos", - "Show all events created by you": "Mostrar todos los eventos creados por ti", - "Show all events you have registered": "Mostrar todos los eventos en los que te has registrado", - "Show events for all": "Mostrar eventos para todos", - "Show invite-only events": "Mostrar eventos solo por invitación", - "Add Date": "Agregar fecha", - "Event": "Evento", - "My Events": "Mis Eventos", - "Public Events": "Eventos publicos", - "Private Events": "Eventos privados", - "Liked by": "Gustado por", - "Comments": "Comentarios", - "FirstName LastName": "Nombre Apellido", - "Pinned Posts": "Puestos fijadas", - "Profile": "Perfil", - "Email": "Correo electrónico", - "Update": "Actualizar", - "App Settings": "Ajustes de Aplicacion", - "Language": "Idioma", - "dark mode": "modo oscuro", - "font size": "tamaño de fuente", - "Help": "Ayudar", - "Reach out to us for help": "Comuníquese con nosotros para obtener ayuda", - "Donate Us": "Donarnos", - "Help us to develop for you": "Ayúdanos a desarrollar para ti", - "Log out from Talawa": "Cerrar sesión en Talawa", - "Share News": "Compartir noticias", - "Post": "Correo", - "Organization Name": "Nombre de la Organización", - "Add hasthtag": "Agregar hashtag", - "Write here what do you want to share": "Escribe aquí lo que quieres compartir", - "Join selected organisation": "Unirse a la organización seleccionada", - "Home": "Casa", - "Events": "Eventos", - "Chat": "Chat", - "Chat Screen": "Pantalla de chat", - "Confirm": "Confirmar", - "Confirmation": "Confirmación", - "Close": "Cerca", - "Switch Organization": "Cambiar de organización", - "Join new Organization": "Unirse a una nueva organización", - "Leave Current Organization": "Dejar la organización actual", - "Creator": "Creadora", - "Public": "Pública", - "Private": "Privada", - "No Internet": "No Internet", - "Subscribed": "Suscrita", - "from": "de", - "See all Pinned news": "Ver todas las noticias fijadas", - "show more": "mostrar más", - "show less": "Muestra menos", - "Likes": "Gustos", - "comments": "comentarios", - "Final": "Final", - "Enter Details": "Ingrese detalles", - "Select\nOrganization": "Seleccione\nOrganización", - "already selected": "ya seleccionado", - "Switched to": "Cambiado a", - "Organisation already joined": "Organización ya unida", - "Membership request already sent": "Solicitud de membresía ya enviada", - "Select one organization to continue": "Seleccione una organización para continuar", - "Something went wrong": "Algo salió mal", - "Join in request sent to": "Únase a la solicitud enviada a", - "successfully": "exitosamente", - "Are you sure you want to logout?": "¿Estás segura de que quieres cerrar sesión?", - "Logout": "Cerrar sesión", - "Settings": "Ajustes", - "Dark Theme": "Tema oscuro", - "Error": "Error", - "Warning": "Advertencia", - "Information": "Información", - "No account registered with this email": "El servidor no se está ejecutando/url", - "Dismiss": "despedir", - "No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton", - "For complete access, please": "Para acceso completo, por favor", - "join an organization.": " unirse a una organización.", - "JOIN": "UNIRSE", - "Camera": "Cámara", - "Gallery": "Galería", - "NEXT": "SIGUIENTE", - "COMPLETE": "COMPLETO", - "Start app tour to know talawa functioning": "Inicie el recorrido por la aplicación para conocer el funcionamiento de talawa", - "Scan QR": "Escanear QR", - "Add tag": "Añadir etiqueta", - "Enter the Tag": "Ingrese la Etiqueta", - "Title": "Título", - "Where is the event?": "¿Dónde está el evento?", - "Add Members": "Añadir miembros", - "All Events": "Todos los eventos", - "Created Events": "Eventos creados", - "Registered Events": "Eventos registrados", - "Send": "Enviar", - "Write your comment here..": "Escribe tu comentario aquí..", - "You need access": "Necesitas acceso", - "Request access, or switch to an account with access": "Solicitar acceso o cambiar a una cuenta con acceso", - "Request Access": "Solicitar acceso", - "Last Name": "Apellido", - "First Name": "Nombre", - "Edit Profile": "Editar perfil", - "Log Out": "Cerrar sesión", - "Please Select an amount": "Por favor, seleccione una cantidad", - "Input custom amount": "Ingresar cantidad personalizada", - "Organisation Name": "Nombre de la organización", - "Choose an Organization": "Elija una Organización", - "Your Report has been sent to the Admin": "Su informe ha sido enviado al Administrador", - "Report the post to the Admin": "Reportar la publicación al Administrador", - "Do you really want to delete the post?": "¿Realmente quieres eliminar la publicación?", - "Liked": "Gustado", - "Looks like there aren't any events.": "Parece que no hay eventos.", - "You have not created any event.": "No has creado ningún evento.", - "No registered events are present": "No hay eventos registrados", - "There aren't any public events.": "No hay eventos públicos.", - "There aren't any private events.": "No hay eventos privados.", - "Donate to the Community": "Donar a la Comunidad", - "Donating to": "Donando a", - "Are you sure you want to delete this event?": "¿Estás seguro de que quieres eliminar este evento?", - "Are you sure you want to exit this organization?": "¿Estás seguro de que quieres salir de esta organización?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "Esta es la pestaña de Perfil, aquí puedes ver todas las opciones relacionadas con la cuenta, configuración de la aplicación, invitación, ayuda, etc.", - "You can edit application settings like language, theme etc from here": "Puedes editar la configuración de la aplicación, como el idioma, el tema, etc., desde aquí", - "For any help we are always there. You can reach us from here": "Para cualquier ayuda, siempre estamos aquí. Puedes contactarnos desde aquí", - "Current selected Organization Name": "Nombre de la organización actualmente seleccionada", - "Click this button to see options related to switching, joining and leaving organization(s)": "Haz clic en este botón para ver opciones relacionadas con cambiar, unirse y salir de organizaciones", - "Current selected Organization's Name appears here": "El nombre de la organización actualmente seleccionada aparece aquí", - "All your joined organizations appear over here you can click on them to change the current organization": "Todas las organizaciones a las que te has unido aparecen aquí; puedes hacer clic en ellas para cambiar la organización actual", - "From this button you can join other listed organizations": "Desde este botón, puedes unirte a otras organizaciones enumeradas", - "To leave the current organization you can use this option": "Para salir de la organización actual, puedes usar esta opción", - "This is the post card you can like and comment on the post from the options available": "Esta es la tarjeta de la publicación; puedes darle me gusta y comentar en la publicación desde las opciones disponibles", - "This is the Events tab here you can see all event related information of the current selected organization": "Esta es la pestaña de Eventos; aquí puedes ver toda la información relacionada con eventos de la organización actualmente seleccionada", - "This is the home tab here you can see the latest post from other members of the current organization": "Esta es la pestaña de Inicio; aquí puedes ver la última publicación de otros miembros de la organización actual", - "This section displays all the important post set by the organization admin(s)": "Esta sección muestra todas las publicaciones importantes establecidas por el(los) administrador(es) de la organización", - "Filter Events based on categories": "Filtrar eventos según categorías", - "Filter Events between selected dates": "Filtrar eventos entre las fechas seleccionadas", - "Description of event to see more details click on the card": "Descripción del evento; para ver más detalles, haz clic en la tarjeta", - "This is the Create post tab here you can add post to the current selected organization": "Esta es la pestaña de Crear publicación; aquí puedes agregar una publicación a la organización actualmente seleccionada", - "This is the Chat tab here you can see all your messages of the current selected organization": "Esta es la pestaña de Chat; aquí puedes ver todos tus mensajes de la organización actualmente seleccionada", - "To help your organization grow you can support them financially from here": "Para ayudar a que tu organización crezca, puedes apoyarla financieramente desde aquí", - "You are all set to go let's get you in": "Estás listo para ir, vamos a empezar", - "You have no event in this organization": "No tienes ningún evento en esta organización", - "Create your first event": "Crea tu primer evento", - "There are no posts in this organization": "No hay publicaciones en esta organización", - "Create your first post": "Crea tu primera publicación", - "You have no post in this organization": "No tienes ninguna publicación en esta organización", - "You can create a new event from here": "Puede crear un nuevo evento desde aquí", - "You are all set to go lets get you in": "Ya estás listo para irte, vamos a meterte", - "App Tour": "Tour de la aplicación", - "Start": "Comenzar", - "Skip": "Saltar", - "Posts": "Publicaciones", - "Tasks": "Tareas", - "Or": "O", - "Please select any amount": "Por favor, seleccione una cantidad", - "Registered": "Registrado", - "Not Registrable": "No registrable", - "Enter the title of your post": "Ingrese el título de su publicación", - "General": "General", - "Help & Support": "Ayuda y soporte", - "Talawa Docs": "Talawa Documentos", - "All day": "Todo el día", - "Join an Organisation": "Únete a una organización", - "DONATE": "DONAR", - "Permission Denied": "Permiso denegado", - "Camera permission is required, to use this feature, give permission from app settings": "Se requiere permiso de cámara para usar esta función. Otorgue el permiso desde la configuración de la aplicación.", - "SETTINGS": "AJUSTES", - "LogOut": "Cerrar sesión", - "Membership request already exist": "Ya existe una solicitud de membresía", - "Enter a valid password": "Ingrese una contraseña válida", - "Organization Not Found": "Organización no encontrada", - "Account with this email already registered": "Cuenta con este correo electrónico ya registrada", - "Something went wrong!": "¡Algo salió mal!", - "URL doesn't exist/no connection please check": "La URL no existe/no hay conexión, verifique", - "The QR is not Working": "El código QR no funciona", - "This QR version is not Supported.": "Esta versión de QR no es compatible.", - "Comment sent": "Comentario enviado", - "Server not running/wrong url": "Servidor no en ejecución/URL incorrecta", - "Couldn't update User details": "No se pudieron actualizar los detalles del usuario", - "Image is added": "Se agregó la imagen", - "Post is uploaded": "Se subió la publicación", - "Profile updated successfully": "Perfil actualizado correctamente", - "The Camera is not working": "La cámara no funciona", - "This QR is not for the App": "Este código QR no es para la aplicación", - "The tag was added": "Se agregó la etiqueta", - "Start time must be before end time": "La hora de inicio debe ser anterior a la hora de finalización", - "Organisation on different server, logout and scan qr again": "Organización en un servidor diferente, cierre la sesión y escanee el código QR nuevamente", - "Post was deleted if you had the rights!": "¡Se eliminó la publicación si tenías los derechos!", - "Members": "Miembros" -} diff --git a/lang/fr.json b/lang/fr.json deleted file mode 100644 index c6535f724..000000000 --- a/lang/fr.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "Bonjour", - "User Name": "Nom d'utilisateur", - "we've": "on a", - "got you covered": "vous a couvert", - "password": "le mot de passe", - "Enter new password": "Entrez un nouveau mot de passe", - "Re-Enter your password": "Entrez à nouveau votre mot de passe", - "Change Password": "Changer le mot de passe", - "Email Hint": "test@test.org", - "Notification Feature is not installed": "La fonction de notification n'est pas installée", - "Enter your registered Email": "Entrez votre email enregistré", - "Enter your password": "Tapez votre mot de passe", - "Forgot password": "Mot de passe oublié", - "Login": "Connexion", - "Sit back relax, we'll": "Asseyez-vous, détendez-vous, nous récupérerons", - "Recover": "votre mot", - "your password": "de passe", - "Recover Password": "Récupérer mot de passe", - "Select Language": "Choisir la langue", - "Default": "Défaut", - "Select": "Sélectionner", - "Selected Organization": "Organisation sélectionnée", - "Continue": "Continuer", - "Enter Community URL": "Entrez l'URL de la communauté", - "Verify": "Vérifier", - "Sign Up": "S'inscrire", - "Change language": "Changer de langue", - "First Name Hint": "John", - "Enter your first name": "Entrez votre prénom", - "Last Name Hint": "Carlos", - "Enter your last name": "Entrez votre nom de famille", - "Confirm your password": "Confirmer votre mot de passe", - "Next": "Suivante", - "Request Sent to": "Demande envoyée à", - "Log out": "Se déconnecter", - "Join": "Rejoignez", - "and": "et", - "Collaborate": "collaborez", - "with your": "avec vos", - "Organizations": "organisations", - "Error": "Erreur", - "Warning": "Avertissement", - "Information": "Information", - "No account registered with this email": "Le serveur ne fonctionne pas/mauvaise URL", - "Dismiss": "Rejeter", - "Title from the viewMode GSoC branch": "Titre de la branche viewMode GSoC", - "Please verify URL first": "Veuillez d'abord vérifier l'URL", - "Enter a valid URL": "Saisissez une URL valide", - "Firstname must not be left blank.": "Le prénom ne doit pas être laissé en blanc.", - "Invalid Firstname": "Prénom invalide", - "Lastname must not be left blank.": "Le nom de famille ne doit pas être laissé vide.", - "Invalid Lastname": "Nom de famille invalide", - "Email must not be left blank": "L'e-mail ne doit pas être laissé vide", - "Please enter a valid Email Address": "S'il vous plaît, mettez une adresse email valide", - "Password must not be left blank": "Le mot de passe ne doit pas être laissé vide", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "Votre mot de passe doit comporter au moins 8 caractères, contenir au moins un chiffre, une lettre majuscule et une lettre minuscule et un caractère spécial (@, #, $, etc.)", - "Password must not contain spaces": "Le mot de passe ne doit pas contenir d'espaces", - "Password does not match original": "Le mot de passe ne correspond pas à l'original", - "Join Organisation": "Rejoindre l'organisation", - "We're": "Nous sommes", - "Glad": "heureux que vous", - "you're": "soyez de", - "Back": "retour", - "Let's": "Laissez-nous vous inscrire", - "get": "", - "you": "vous", - "SignUp": "inscrire", - "Please wait": "S'il vous plaît, attendez", - "for organisation(s) to accept your invitation.": "pour que les organisations acceptent votre invitation.", - "Add Event Title": "Ajouter le titre de l'événement", - "Where is the event": "Où est l'événement", - "Add Location": "Ajouter un emplacement", - "Describe the event": "Décrivez l'événement", - "Add Description": "Ajouter une description", - "Add Event": "Ajouter un évènement", - "Add": "Ajoutez-le", - "Add Image": "Ajouter une image", - "Select Start Date": "Sélectionner la date de début", - "Select End Date": "Sélectionner la date de fin", - "Select Start Date and Time": "Sélectionnez la date et l'heure de début", - "Select End Date and Time": "Sélectionnez la date et l'heure de fin", - "Does not repeat": "ça ne se répète pas", - "Keep Public": "Garder public", - "Keep Registerable": "Garder enregistrable", - "Event Details": "Détails de l'évènement", - "Register": "S'inscrire", - "Created by": "Créé par", - "public": "publique", - "private": "privée", - "Description": "La description", - "Admins": "Administratrices", - "Attendees": "Participantes", - "See all": "Voir tout", - "Start Date": "Date de début", - "End Date": "Date de fin", - "Cancel": "Annuler", - "Done": "Fait", - "Explore Events": "Explorer les événements", - "Filters": "Filtres", - "Filter by Date": "Filtrer par date", - "Show all events": "Afficher tous les événements", - "Show all events created by you": "Afficher tous les événements créés par vous", - "Show all events you have registered": "Afficher tous les événements auxquels vous êtes inscrit", - "Show events for all": "Afficher les événements pour tous", - "Show invite-only events": "Afficher les événements sur invitation uniquement", - "Add Date": "Ajouter une date", - "Event": "Événement", - "My Events": "Mes événements", - "Public Events": "Événements publics", - "Private Events": "Événements privés", - "Liked by": "Aimé par", - "Comments": "commentaires", - "FirstName LastName": "Prénom nom de famille", - "Pinned Posts": "Messages épinglés", - "Profile": "Profil", - "Email": "E-mail", - "Update": "Mettre à jour", - "App Settings": "Paramètres de l'application", - "Language": "Langue", - "dark mode": "mode sombre", - "font size": "taille de police", - "Help": "Aider", - "Reach out to us for help": "Contactez-nous pour obtenir de l'aide", - "Donate Us": "Faites-nous un don", - "Help us to develop for you": "Aidez-nous à développer pour vous", - "Log out from Talawa": "Se déconnecter de Talawa", - "Share News": "Partager Nouvelles", - "Post": "Poster", - "Organization Name": "nom de l'organisation", - "Add hasthtag": "Ajouter un hashtag", - "Write here what do you want to share": "Écrivez ici ce que vous voulez partager", - "Join selected organisation": "Rejoindre l'organisation sélectionnée", - "Home": "Domicile", - "Events": "Événements", - "Chat": "Discuter", - "Chat Screen": "Écran de discussion", - "Confirm": "Confirmer", - "Confirmation": "Confirmation", - "Close": "Fermer", - "Switch Organization": "Changer d'organisation", - "Join new Organization": "Rejoindre une nouvelle organisation", - "Leave Current Organization": "Quitter l'organisation actuelle", - "Creator": "Créatrice", - "Public": "Publique", - "Private": "Privée", - "No Internet": "Sans Internet", - "Subscribed": "Abonnée", - "from": "de", - "See all Pinned news": "Voir toutes les actualités épinglées", - "show more": "montre plus", - "show less": "Montrer moins", - "Likes": "Aime", - "comments": "commentaires", - "Final": "Finale", - "Enter Details": "Entrez les détails", - "Select\nOrganization": "Sélectionner\nOrganisation", - "already selected": "déjà sélectionné", - "Switched to": "Basculé vers", - "Organisation already joined": "Organisation déjà adhérée", - "Membership request already sent": "Demande d'adhésion déjà envoyée", - "Select one organization to continue": "Sélectionnez une organisation pour continuer", - "Something went wrong": "Quelque chose s'est mal passé", - "Join in request sent to": "Demande d'adhésion envoyée à", - "successfully": "avec succès", - "Are you sure you want to logout?": "Êtes-vous sûr de vouloir vous déconnecter?", - "Logout": "Se déconnecter", - "Settings": "Paramètres", - "Dark Theme": "Thème sombre", - "No organizations found Please contact your admin": "Aucune organisation trouvée ! Veuillez contacter votre administrateur", - "For complete access, please": "Pour un accès complet, veuillez", - "join an organization.": " rejoindre une organisation.", - "JOIN": "REJOINDRE", - "Camera": "Caméra", - "Gallery": "Galerie", - "NEXT": "SUIVANT", - "COMPLETE": "COMPLÉTER", - "Start app tour to know talawa functioning": "Démarrez la visite de l'application pour connaître le fonctionnement de talawa", - "Scan QR": "Scanner QR", - "Add tag": "Ajouter un tag", - "Enter the Tag": "Entrez le Tag", - "Title": "Titre", - "Where is the event?": "Où se trouve l'événement?", - "Add Members": "Ajouter des membres", - "All Events": "Tous les événements", - "Created Events": "Événements créés", - "Registered Events": "Événements enregistrés", - "Send": "Envoyer", - "Write your comment here..": "Écrivez votre commentaire ici..", - "You need access": "Vous avez besoin d'accès", - "Request access, or switch to an account with access": "Demander un accès ou passer à un compte avec accès", - "Request Access": "Demander l'accès", - "Last Name": "Nom de famille", - "First Name": "Prénom", - "Edit Profile": "Modifier le profil", - "Log Out": "Se déconnecter", - "Please Select an amount": "Veuillez sélectionner un montant", - "Input custom amount": "Entrer un montant personnalisé", - "Organisation Name": "Nom de l'organisation", - "Choose an Organization": "Choisissez une Organisation", - "Your Report has been sent to the Admin": "Votre rapport a été envoyé à l'Admin", - "Report the post to the Admin": "Signaler le post à l'Admin", - "Do you really want to delete the post?": "Voulez-vous vraiment supprimer le post?", - "Liked": "Aimé", - "Looks like there aren't any events.": "On dirait qu'il n'y a pas d'événements.", - "You have not created any event.": "Vous n'avez créé aucun événement.", - "No registered events are present": "Aucun événement enregistré n'est présent", - "There aren't any public events.": "Il n'y a pas d'événements publics.", - "There aren't any private events.": "Il n'y a pas d'événements privés.", - "Donate to the Community": "Faire un don à la Communauté", - "Donating to": "Don à", - "Are you sure you want to delete this event?": "Êtes-vous sûr de vouloir supprimer cet événement?", - "Are you sure you want to exit this organization?": "Êtes-vous sûr de vouloir quitter cette organisation?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "Ceci est l'onglet Profil où vous pouvez voir toutes les options liées au compte, aux paramètres de l'application, à l'invitation, à l'aide, etc.", - "You can edit application settings like language, theme etc from here": "Vous pouvez modifier les paramètres de l'application comme la langue, le thème, etc. depuis ici", - "For any help we are always there. You can reach us from here": "Pour toute aide, nous sommes toujours là. Vous pouvez nous joindre depuis ici", - "Current selected Organization Name": "Nom de l'organisation actuellement sélectionnée", - "Click this button to see options related to switching, joining and leaving organization(s)": "Cliquez sur ce bouton pour voir les options liées au changement, à l'adhésion et au départ d'organisation(s)", - "Current selected Organization's Name appears here": "Le nom de l'organisation actuellement sélectionnée apparaît ici", - "All your joined organizations appear over here you can click on them to change the current organization": "Toutes les organisations auxquelles vous avez adhéré apparaissent ici, vous pouvez cliquer sur elles pour changer l'organisation actuelle", - "From this button you can join other listed organizations": "À partir de ce bouton, vous pouvez rejoindre d'autres organisations répertoriées", - "To leave the current organization you can use this option": "Pour quitter l'organisation actuelle, vous pouvez utiliser cette option", - "This is the post card you can like and comment on the post from the options available": "Ceci est la carte de publication, vous pouvez aimer et commenter la publication à partir des options disponibles", - "This is the Events tab here you can see all event related information of the current selected organization": "Ceci est l'onglet Événements, ici vous pouvez voir toutes les informations liées aux événements de l'organisation actuellement sélectionnée", - "This is the home tab here you can see the latest post from other members of the current organization": "Ceci est l'onglet Accueil, ici vous pouvez voir le dernier post des autres membres de l'organisation actuelle", - "This section displays all the important post set by the organization admin(s)": "Cette section affiche tous les posts importants définis par le(s) administrateur(s) de l'organisation", - "Filter Events based on categories": "Filtrer les événements en fonction des catégories", - "Filter Events between selected dates": "Filtrer les événements entre les dates sélectionnées", - "Description of event to see more details click on the card": "Description de l'événement, pour voir plus de détails, cliquez sur la carte", - "This is the Create post tab here you can add post to the current selected organization": "Ceci est l'onglet Créer une publication, ici vous pouvez ajouter une publication à l'organisation actuellement sélectionnée", - "This is the Chat tab here you can see all your messages of the current selected organization": "Ceci est l'onglet Chat, ici vous pouvez voir tous vos messages de l'organisation actuellement sélectionnée", - "To help your organization grow you can support them financially from here": "Pour aider votre organisation à se développer, vous pouvez les soutenir financièrement depuis ici.", - "You are all set to go let's get you in": "Vous êtes prêt à partir, laissez-nous vous aider.", - "You have no event in this organization": "Vous n'avez aucun événement dans cette organisation", - "Create your first event": "Créez votre premier événement", - "There are no posts in this organization": "Il n'y a aucun article dans cette organisation", - "Create your first post": "Créez votre premier article", - "You have no post in this organization": "Vous n'avez aucun article dans cette organisation", - "You can create a new event from here": "Vous pouvez créer un nouvel événement à partir d'ici", - "You are all set to go lets get you in": "Vous êtes prêt à partir, laissez-nous vous faire entrer", - "App Tour": "Visite guidée de l'application", - "Start": "Démarrer", - "Skip": "Ignorer", - "Posts": "Publications", - "Tasks": "Tâches", - "Or": "Ou", - "Please select any amount": "Veuillez sélectionner un montant", - "Registered": "Enregistré", - "Not Registrable": "Non enregistrable", - "Enter the title of your post": "Entrez le titre de votre publication", - "General": "Général", - "Help & Support": "Aide et support", - "Talawa Docs": "Talawa Docs", - "All day": "Toute la journée", - "Join an Organisation": "Rejoindre une organisation", - "DONATE": "FAIRE UN DON", - "Permission Denied": "Autorisation refusée", - "Camera permission is required, to use this feature, give permission from app settings": "L'autorisation de la caméra est requise pour utiliser cette fonctionnalité. Accordez l'autorisation à partir des paramètres de l'application.", - "SETTINGS": "PARAMÈTRES", - "LogOut": "Se déconnecter", - "Membership request already exist": "La demande d'adhésion existe déjà", - "Enter a valid password": "Entrez un mot de passe valide", - "Organization Not Found": "Organisation non trouvée", - "Account with this email already registered": "Compte avec cet e-mail déjà enregistré", - "Something went wrong!": "Quelque chose s'est mal passé !", - "URL doesn't exist/no connection please check": "L'URL n'existe pas/pas de connexion, veuillez vérifier", - "The QR is not Working": "Le code QR ne fonctionne pas", - "This QR version is not Supported.": "Cette version de code QR n'est pas prise en charge.", - "Comment sent": "Commentaire envoyé", - "Server not running/wrong url": "Serveur non en cours d'exécution/mauvaise URL", - "Couldn't update User details": "Impossible de mettre à jour les détails de l'utilisateur", - "Image is added": "L'image a été ajoutée", - "Post is uploaded": "Le message a été téléchargé", - "Profile updated successfully": "Profil mis à jour avec succès", - "The Camera is not working": "La caméra ne fonctionne pas", - "This QR is not for the App": "Ce code QR n'est pas pour l'application", - "The tag was added": "La balise a été ajoutée", - "Start time must be before end time": "L'heure de début doit être antérieure à l'heure de fin", - "Organisation on different server, logout and scan qr again": "Organisation sur un serveur différent, déconnectez-vous et scannez à nouveau le code QR", - "Post was deleted if you had the rights!": "Le message a été supprimé si vous aviez les droits !", - "Members": " Membres" -} diff --git a/lang/hi.json b/lang/hi.json deleted file mode 100644 index 4cc46c1cc..000000000 --- a/lang/hi.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "नमस्ते", - "User Name": "उपयोगकर्ता नाम", - "we've": "हमने", - "got you covered": "आपको कवर कर लिया है", - "password": "पास वर्ड दर्ज करें", - "Enter new password": "नया पासवर्ड दर्ज करें", - "Re-Enter your password": "दुबारापासवडृ िलखो", - "Change Password": "पासवर्ड बदलें", - "Email Hint": "test@test.org", - "Enter your registered Email": "अपना पंजीकृत ईमेल दर्ज करें", - "Enter your password": "अपना पासवर्ड डालें", - "Forgot password": "क्या आप पासवर्ड भूल गए", - "Login": "लॉग इन करें", - "Sit back relax, we'll": "आराम से बैठें, हम", - "Recover": "रिकवर कर लेंगे", - "your password": "आपका पासवर्ड", - "Recover Password": "पासवर्ड पुनः प्राप्त करना", - "Select Language": "भाषा का चयन करें", - "Default": "डिफ़ॉल्ट मान", - "Select": "चुनते हैं", - "Notification Feature is not installed": "अधिसूचना सुविधा स्थापित नहीं है", - "Selected Organization": "चयनित संगठन", - "Continue": "जारी रखें", - "Enter Community URL": "समुदाय URL दर्ज करें", - "Verify": "सत्यापित करें", - "Sign Up": "साइन अप करें", - "Change language": "भाषा बदलें", - "First Name Hint": "राहुल", - "Enter your first name": "अपना पहला नाम दर्ज करें", - "Last Name Hint": "कुमार", - "Enter your last name": "अपना अंतिम नाम दर्ज करें", - "Confirm your password": "अपने पासवर्ड की पुष्टि करें", - "Next": "अगला", - "Request Sent to": "अनुरोध भेजा गया", - "Log out": "लॉग आउट", - "Join": "अपने संगठनों", - "and": "से", - "Collaborate": "जुड़ें", - "with your": "और सहयोग करें", - "Organizations": "", - "Title from the viewMode GSoC branch": "व्यूमोड जीएसओसी शाखा से शीर्षक", - "Please verify URL first": "कृपया पहले URL सत्यापित करें", - "Enter a valid URL": "एक मान्य यूआरएल दर्ज करें", - "Firstname must not be left blank.": "प्रथम नाम खाली नहीं छोड़ा जाना चाहिए।", - "Invalid Firstname": "अमान्य प्रथम नाम", - "Lastname must not be left blank.": "उपनाम खाली नहीं छोड़ा जाना चाहिए।", - "Invalid Lastname": "अमान्य अंतिम नाम", - "Email must not be left blank": "ईमेल खाली नहीं छोड़ना चाहिए", - "Please enter a valid Email Address": "कृपया एक वैध ई - मेल एड्रेस डालें", - "Password must not be left blank": "पासवर्ड खाली नहीं छोड़ना चाहिए", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "आपका पासवर्ड कम से कम 8 वर्णों का होना चाहिए, जिसमें कम से कम एक संख्यात्मक, एक अपरकेस और एक लोअरकेस अक्षर और एक विशेष वर्ण (@,#,$, आदि) हो।", - "Password must not contain spaces": "पासवर्ड में रिक्त स्थान नहीं होना चाहिए", - "Password does not match original": "पासवर्ड मूल से मेल नहीं खाता", - "Join Organisation": "संगठन में शामिल हों", - "We're": "हमें", - "Glad": "खुशी है कि", - "you're": "आप", - "Back": "वापस आ गए हैं", - "Let's": "आइए", - "get": "आपको", - "you": "साइनअप", - "SignUp": "कराते हैं", - "Please wait": "कृपया प्रतीक्षा कीजिये", - "for organisation(s) to accept your invitation.": "संगठन (ओं) के लिए आपका निमंत्रण स्वीकार करने के लिए।", - "Add Event Title": "घटना का शीर्षक जोड़ें", - "Where is the event": "घटना कहाँ है", - "Add Location": "स्थान जोड़ना", - "Describe the event": "घटना का वर्णन करें", - "Add Description": "विवरण जोड़ें", - "Add Event": "कार्यक्रम जोड़ें", - "Add": "इसे जोड़ें", - "Add Image": "छवि जोड़ें", - "Select Start Date": "शुरूआत की तिथि का चयन करें", - "Select End Date": "समाप्ति की तिथि का चयन करें", - "Select Start Date and Time": "प्रारंभ दिनांक और समय चुनें", - "Select End Date and Time": "समाप्ति तिथि और समय चुनें", - "Does not repeat": "यह दोहराता नहीं है", - "Keep Public": "सार्वजनिक रखें", - "Keep Registerable": "पंजीकरण योग्य रखें", - "Event Details": "घटना की जानकारी", - "Register": "पंजीकरण करें", - "Created by": "के द्वारा बनाई गई", - "public": "सह लोक", - "private": "निजी", - "Description": "विवरण", - "Admins": "व्यवस्थापक", - "Attendees": "सहभागी", - "See all": "सभी देखें", - "Start Date": "आरंभ करने की तिथि", - "End Date": "समाप्ति तिथि", - "Cancel": "रद्द करना", - "Done": "किया हुआ", - "Explore Events": "घटनाओं का अन्वेषण करें", - "Filters": "फ़िल्टर", - "Filter by Date": "तारीख़ से फ़िल्टर करें", - "Show all events": "सभी घटनाएँ दिखाएं", - "Show all events created by you": "आपके द्वारा बनाई गई सभी घटनाएँ दिखाएं", - "Show all events you have registered": "आपने जिन घटनाओं में पंजीकृत हुए हैं, उन सभी घटनाएँ दिखाएं", - "Show events for all": "सभी के लिए घटनाएँ दिखाएं", - "Show invite-only events": "आमंत्रित लोगों के लिए घटनाएँ दिखाएं", - "Add Date": "तिथि जोड़ें", - "Event": "इवेंट्स", - "My Events": "मेरे कार्यक्रम", - "Public Events": "सार्वजनिक कार्यक्रम", - "Private Events": "निजी कार्यक्रम", - "Liked by": "द्वारा पसंद किया गया", - "Comments": "टिप्पणियाँ", - "FirstName LastName": "प्रथम नाम अंतिम नाम", - "Pinned Posts": "चिपके पत्र", - "Profile": "प्रोफ़ाइल", - "Email": "ईमेल", - "Update": "अपडेट करें", - "App Settings": "एप्लिकेशन सेटिंग", - "Language": "भाषा: हिन्दी", - "dark mode": "डार्क मोड", - "font size": "फ़ॉन्ट आकार", - "Help": "मदद", - "Reach out to us for help": "मदद के लिए हमसे संपर्क करें", - "Donate Us": "हमें दान करें", - "Help us to develop for you": "आपके लिए विकास करने में हमारी सहायता करें", - "Log out from Talawa": "तलवा से लॉग आउट करें", - "Share News": "समाचार साझा करें", - "Post": "पद", - "Organization Name": "संगठन का नाम", - "Add hasthtag": "हैशटैग जोड़ें", - "Write here what do you want to share": "यहां लिखें कि आप क्या साझा करना चाहते हैं", - "Join selected organisation": "चयनित संगठन से जुड़ें", - "Home": "घर", - "Events": "इवेंट्स", - "Chat": "चैट", - "Chat Screen": "चैट स्क्रीन", - "Confirm": "पुष्टि करें", - "Confirmation": "पुष्टीकरण", - "Close": "बंद करे", - "Switch Organization": "संगठन स्विच करें", - "Join new Organization": "नए संगठन में शामिल हों", - "Leave Current Organization": "वर्तमान संगठन छोड़ें", - "Creator": "निर्माता", - "Public": "सार्वजनिक", - "Private": "निजी", - "No Internet": "कोई इंटरनेट नहीं", - "Subscribed": "सदस्यता ली गई", - "from": "से", - "See all Pinned news": "सभी पिन किए गए समाचार देखें", - "show more": "अधिक दिखाएं", - "show less": "कम दिखाएं", - "Likes": "पसंद", - "comments": "टिप्पणियां", - "Final": "फाइनल", - "Enter Details": "विवरण दर्ज करें", - "Select\nOrganization": "चुनते हैं\nसंगठन", - "already selected": "पहले से चयनित", - "Switched to": "इस पर स्विच किया गया", - "Organisation already joined": "संगठन पहले ही शामिल हो चुका है", - "Membership request already sent": "सदस्यता अनुरोध पहले ही भेजा जा चुका है", - "Select one organization to continue": "जारी रखने के लिए एक संगठन चुनें", - "Something went wrong": "कुछ गलत हो गया", - "Join in request sent to": "ज्वाइन इन रिक्वेस्ट इन को भेजा गया", - "successfully": "सफलतापूर्वक", - "Are you sure you want to logout?": "क्या आप वाकई लॉगआउट करना चाहते हैं?", - "Logout": "लॉगआउट", - "Settings": "अपनी सेटिंग्स बदलें", - "Dark Theme": "डार्क थीम", - "Error": "गलती", - "Warning": "चेतावनी", - "Information": "जानकारी", - "No account registered with this email": "सर्वर नहीं चल रहा/गलत url", - "Dismiss": "नकार", - "No organizations found Please contact your admin": "कोई संगठन नहीं मिला! कृपया अपने व्यवस्थापक से संपर्क करें", - "For complete access, please": "पूर्ण पहुंच के लिए, कृपया", - "join an organization.": " किसी संगठन से जुड़ें.", - "JOIN": "जोड़ना", - "Camera": "कैमरा", - "Gallery": "गैलरी", - "NEXT": "अगला", - "COMPLETE": "पूर्ण", - "Start app tour to know talawa functioning": "Talawa कार्यप्रणाली जानने के लिए ऐप टूर शुरू करें", - "Scan QR": "QR स्कैन करें", - "Add tag": "टैग जोड़ें", - "Enter the Tag": "टैग दर्ज करें", - "Title": "शीर्षक", - "Where is the event?": "इवेंट कहाँ है?", - "Add Members": "सदस्य जोड़ें", - "All Events": "सभी ईवेंट्स", - "Created Events": "बनाए गए ईवेंट्स", - "Registered Events": "पंजीकृत ईवेंट्स", - "Send": "भेजें", - "Write your comment here..": "यहां अपनी टिप्पणी लिखें..", - "You need access": "आपको पहुँच की आवश्यकता है", - "Request access, or switch to an account with access": "पहुँच का अनुरोध करें, या पहुँच वाले खाते में स्विच करें", - "Request Access": "पहुँच का अनुरोध करें", - "Last Name": "अंतिम नाम", - "First Name": "पहला नाम", - "Edit Profile": "प्रोफ़ाइल संपादित करें", - "Log Out": "लॉग आउट", - "Please Select an amount": "कृपया एक राशि चुनें", - "Input custom amount": "कस्टम राशि दर्ज करें", - "Organisation Name": "संगठन का नाम", - "Choose an Organization": "एक संगठन चुनें", - "Your Report has been sent to the Admin": "आपकी रिपोर्ट एडमिन को भेज दी गई है", - "Report the post to the Admin": "पोस्ट को एडमिन को रिपोर्ट करें", - "Do you really want to delete the post?": "क्या आप वाकई पोस्ट को हटाना चाहते हैं?", - "Liked": "पसंद किया", - "Looks like there aren't any events.": "लगता है कि कोई इवेंट नहीं हैं।", - "You have not created any event.": "आपने कोई इवेंट नहीं बनाया है।", - "No registered events are present": "कोई पंजीकृत इवेंट मौजूद नहीं हैं", - "There aren't any public events.": "कोई सार्वजनिक इवेंट नहीं हैं।", - "There aren't any private events.": "कोई निजी इवेंट नहीं हैं।", - "Donate to the Community": "समुदाय को दान करें", - "Donating to": "को दान देना", - "Are you sure you want to delete this event?": "क्या आप वाकई इस इवेंट को हटाना चाहते हैं?", - "Are you sure you want to exit this organization?": "क्या आप वाकई इस संगठन से बाहर जाना चाहते हैं?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "यह प्रोफाइल टैब है जहाँ आप खाता, ऐप सेटिंग, आमंत्रण, सहायता आदि से संबंधित सभी विकल्प देख सकते हैं", - "You can edit application settings like language, theme etc from here": "आप यहाँ से भाषा, थीम आदि जैसी एप्लिकेशन सेटिंग्स को संपादित कर सकते हैं", - "For any help we are always there. You can reach us from here": "किसी भी मदद के लिए हम हमेशा यहाँ होते हैं। आप हमसे यहाँ संपर्क कर सकते हैं", - "Current selected Organization Name": "वर्तमान चयनित संगठन का नाम", - "Click this button to see options related to switching, joining and leaving organization(s)": "स्विचिंग, ज्वाइनिंग और ऑर्गनाइजेशन छोड़ने से संबंधित विकल्प देखने के लिए इस बटन पर क्लिक करें।", - "Current selected Organization's Name appears here": "वर्तमान चयनित संगठन का नाम यहाँ दिखाई देता है।", - "All your joined organizations appear over here you can click on them to change the current organization": "यहाँ सभी आपके जुड़े हुए संगठन दिखाई देते हैं, आप इन पर क्लिक करके वर्तमान संगठन को बदल सकते हैं।", - "From this button you can join other listed organizations": "इस बटन से आप अन्य सूचीबद्ध संगठनों में शामिल हो सकते हैं।", - "To leave the current organization you can use this option": "वर्तमान संगठन छोड़ने के लिए आप इस विकल्प का उपयोग कर सकते हैं।", - "This is the post card you can like and comment on the post from the options available": "यह वह पोस्ट कार्ड है जिस पर आप उपलब्ध विकल्पों से पसंद और टिप्पणी कर सकते हैं।", - "This is the Events tab here you can see all event related information of the current selected organization": "यहाँ इवेंट्स टैब है जहाँ आप वर्तमान चयनित संगठन की सभी इवेंट संबंधित जानकारी देख सकते हैं।", - "This is the home tab here you can see the latest post from other members of the current organization": "यहाँ होम टैब है जहाँ आप वर्तमान संगठन के अन्य सदस्यों के नवीनतम पोस्ट देख सकते हैं।", - "This section displays all the important post set by the organization admin(s)": "यह खंड वह सभी महत्वपूर्ण पोस्ट दिखाता है जो संगठन एडमिन द्वारा निर्धारित की गई हैं।", - "Filter Events based on categories": "श्रेणियों के आधार पर इवेंट्स को फ़िल्टर करें।", - "Filter Events between selected dates": "चयनित तिथियों के बीच इवेंट्स को फ़िल्टर करें।", - "Description of event to see more details click on the card": "इवेंट का विवरण और विवरण देखने के लिए कार्ड पर क्लिक करें।", - "This is the Create post tab here you can add post to the current selected organization": "यह यहाँ से तैयार करें पोस्ट टैब है जहाँ आप वर्तमान चयनित संगठन में पोस्ट जोड़ सकते हैं।", - "This is the Chat tab here you can see all your messages of the current selected organization": "यहाँ चैट टैब है जहाँ आप वर्तमान चयनित संगठन के सभी संदेश देख सकते हैं।", - "To help your organization grow you can support them financially from here": "अपने संगठन को बढ़ावा देने के लिए आप उन्हें यहाँ से वित्तपोषण दे सकते हैं।", - "You are all set to go let's get you in": "आप तैयार हैं जाने के लिए, चलो आपको एंटर करते हैं।", - "You have no event in this organization": "इस संगठन में आपका कोई इवेंट नहीं है", - "Create your first event": "अपना पहला इवेंट बनाएं", - "There are no posts in this organization": "इस संगठन में कोई पोस्ट नहीं है", - "Create your first post": "अपनी पहली पोस्ट बनाएं", - "You have no post in this organization": "इस संगठन में आपका कोई पोस्ट नहीं है", - "You can create a new event from here": "यहां से आप एक नया इवेंट बना सकते हैं", - "You are all set to go lets get you in": "आप सभी सेट हैं जाने के लिए, चलो आपको भेजते हैं", - "App Tour": "ऐप टूर", - "Start": "शुरू करें", - "Skip": "छोड़ दें", - "Posts": "पोस्ट्स", - "Tasks": "टास्क", - "Or": "या", - "Please select any amount": "कृपया कोई राशि का चयन करें", - "Registered": "पंजीकृत", - "Not Registrable": "पंजीकरण योग्य नहीं", - "Enter the title of your post": "अपने पोस्ट का शीर्षक दर्ज करें", - "General": "सामान्य", - "Help & Support": "सहायता और समर्थन", - "Talawa Docs": "Talawa दस्तावेज", - "All day": "पूरा दिन", - "Join an Organisation": "एक संगठन से जुड़ें", - "DONATE": "दान करें", - "Permission Denied": "अनुमति अस्वीकृत", - "Camera permission is required, to use this feature, give permission from app settings": "कैमरे की अनुमति आवश्यक है, इस फ़ीचर का उपयोग करने के लिए, ऐप सेटिंग्स से अनुमति दें", - "SETTINGS": "सेटिंग्स", - "LogOut": "लॉगआउट", - "Membership request already exist": "सदस्यता अनुरोध पहले से ही मौजूद है", - "Enter a valid password": "कृपया एक मान्य पासवर्ड दर्ज करें", - "Organization Not Found": "संगठन नहीं मिला", - "Account with this email already registered": "इस ईमेल से पहले से ही खाता रजिस्टर किया गया है", - "Something went wrong!": "कुछ गलत हो गया!", - "URL doesn't exist/no connection please check": "URL मौजूद नहीं है/कृपया कनेक्शन की जाँच करें", - "The QR is not Working": "QR काम नहीं कर रहा है", - "This QR version is not Supported.": "यह QR वेर्जन समर्थित नहीं है।", - "Comment sent": "टिप्पणी भेज दी गई", - "Server not running/wrong url": "सर्वर रन नहीं हो रहा/गलत URL", - "Couldn't update User details": "उपयोगकर्ता विवरण अपडेट नहीं किये जा सके", - "Image is added": "छवि जोड़ी गई", - "Post is uploaded": "पोस्ट अपलोड किया गया", - "Profile updated successfully": "प्रोफ़ाइल सफलतापूर्वक अपडेट की गई", - "The Camera is not working": "कैमरा काम नहीं कर रहा है", - "This QR is not for the App": "यह QR ऐप के लिए नहीं है", - "The tag was added": "टैग जोड़ा गया था", - "Start time must be before end time": "शुरू समय अंत समय से पहले होना चाहिए", - "Organisation on different server, logout and scan qr again": "संगठन अलग सर्वर पर है, लॉगआउट करें और फिर से QR स्कैन करें", - "Post was deleted if you had the rights!": "यदि आपके पास अधिकार थे तो पोस्ट हटा दिया गया था!", - "Members": " सदस्य" -} diff --git a/lang/ja.json b/lang/ja.json deleted file mode 100644 index 75dd81dee..000000000 --- a/lang/ja.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "こんにちは", - "User Name": "ユーザー名", - "we've": "我々は持っています", - "got you covered": "あなたをカバーしました", - "password": "パスワード", - "Enter new password": "新しいパスワードを入力してください", - "Re-Enter your password": "パスワードを再入力してください", - "Change Password": "パスワードを変更する", - "Email Hint": "test@test.org", - "Enter your registered Email": "登録したメールアドレスを入力してください", - "Enter your password": "パスワードを入力してください", - "Forgot password": "パスワードをお忘れですか", - "Login": "ログイン", - "Sit back relax, we'll": "ゆったりとおくつろぎください。", - "Recover": "回復", - "Notification Feature is not installed": "通知機能がインストールされていません", - "your password": "あなたのパスワード", - "Recover Password": "パスワードを回復", - "Select Language": "言語を選択する", - "Default": "ディフォルト", - "Select": "選択する", - "Selected Organization": "選択した組織", - "Continue": "継続する", - "Enter Community URL": "コミュニティの URL を入力してください", - "Verify": "確認", - "Sign Up": "サインアップ", - "Change language": "言語を変更", - "First Name Hint": "John", - "Enter your first name": "名を入力してください", - "Last Name Hint": "Carlos", - "Enter your last name": "姓を入力してください", - "Confirm your password": "あなたのパスワードを確認", - "Next": "次", - "Request Sent to": "送信先のリクエスト", - "Log out": "ログアウト", - "Join": "加入", - "and": "と", - "Collaborate": "コラボレーション", - "with your": "あなたと", - "Organizations": "組織", - "Title from the viewMode GSoC branch": "ビューモードGSoCブランチからのタイトル", - "Please verify URL first": "最初にURLを確認してください", - "Enter a valid URL": "有効なURLを入力してください", - "Firstname must not be left blank.": "名を空白のままにしないでください。", - "Invalid Firstname": "無効な名", - "Lastname must not be left blank.": "姓を空白のままにしないでください。", - "Invalid Lastname": "無効な姓", - "Email must not be left blank": "メールを空白のままにしないでください", - "Please enter a valid Email Address": "有効なメールアドレスを入力してください", - "Password must not be left blank": "パスワードは空白のままにしないでください", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "パスワードは8文字以上で、数字が1つ、大文字と小文字が1つ、特殊文字(@、#、$など)が1つ含まれている必要があります。", - "Password must not contain spaces": "パスワードにスペースを含めることはできません", - "Password does not match original": "パスワードが元のパスワードと一致しません", - "Join Organisation": "組織に参加する", - "We're": "私たちです", - "Glad": "嬉しい", - "you're": "あなたは", - "Back": "戻る", - "Let's": "しましょう", - "get": "得る", - "you": "あなた", - "SignUp": "サインアップ", - "Please wait": "お待ちください", - "for organisation(s) to accept your invitation.": "組織があなたの招待を受け入れるために。", - "Add Event Title": "イベントタイトルを追加", - "Where is the event": "イベントはどこですか", - "Add Location": "場所を追加", - "Describe the event": "イベントについて説明する", - "Add Description": "説明を追加", - "Add Event": "イベントを追加", - "Add": "追加", - "Add Image": "画像を追加", - "Select Start Date": "開始日を選択", - "Select End Date": "終了日を選択", - "Select Start Date and Time": "開始日時を選択します", - "Select End Date and Time": "終了日時を選択します", - "Does not repeat": "繰り返さない", - "Keep Public": "公開する", - "Keep Registerable": "登録可能に保つ", - "Event Details": "イベントの詳細", - "Register": "登録", - "Created by": "によって作成された", - "public": "公衆", - "private": "プライベート", - "Description": "説明", - "Admins": "管理者", - "Attendees": "参加者", - "See all": "すべてを見る", - "Start Date": "開始日", - "End Date": "終了日", - "Cancel": "キャンセル", - "Done": "終わり", - "Explore Events": "イベントを探索する", - "Filters": "フィルター", - "Filter by Date": "日付で絞り込む", - "Show all events": "すべてのイベントを表示", - "Show all events created by you": "あなたが作成したすべてのイベントを表示", - "Show all events you have registered": "あなたが登録したすべてのイベントを表示", - "Show events for all": "すべてのイベントを表示", - "Show invite-only events": "招待限定イベントを表示", - "Add Date": "日付を追加", - "Event": "イベント", - "My Events": "私のイベント", - "Public Events": "公開イベント", - "Private Events": "プライベートイベント", - "Liked by": "によって好まれる", - "Comments": "コメント", - "FirstName LastName": "名前苗字", - "Pinned Posts": "固定された投稿", - "Profile": "プロフィール", - "Email": "Eメール", - "Update": "アップデート", - "App Settings": "アプリの設定", - "Language": "言語", - "dark mode": "ダークモード", - "font size": "フォントサイズ", - "Help": "ヘルプ", - "Reach out to us for help": "助けを求めて私たちに連絡してください", - "Donate Us": "寄付してください", - "Help us to develop for you": "あなたのために開発するのを手伝ってください", - "Log out from Talawa": "タラワからログアウトする", - "Share News": "ニュースを共有する", - "Post": "役職", - "Organization Name": "組織名", - "Add hasthtag": "ハッシュタグを追加", - "Write here what do you want to share": "ここに何を共有したいですか", - "Join selected organisation": "選択した組織に参加する", - "Home": "家", - "Events": "イベント", - "Chat": "チャット", - "Chat Screen": "チャット画面", - "Confirm": "確認", - "Confirmation": "確認", - "Close": "選ぶ", - "Switch Organization": "組織の切り替え", - "Join new Organization": "新しい組織に参加する", - "Leave Current Organization": "現在の組織を離れる", - "Creator": "クリエイター", - "Public": "公衆", - "Private": "プライベート", - "No Internet": "インターネットなし", - "Subscribed": "購読済み", - "from": "から", - "See all Pinned news": "ピン留めされたニュースをすべて表示", - "show more": "もっと見せる", - "show less": "表示を減らす", - "Likes": "いいね", - "comments": "コメント", - "Final": "最後の", - "Enter Details": "詳細を入力", - "Select\nOrganization": "組織を選択", - "already selected": "すでに選択済み", - "Switched to": "に切り替え", - "Organisation already joined": "組織はすでに参加しています", - "Membership request already sent": "メンバーシップリクエストはすでに送信されています", - "Select one organization to continue": "続行するには組織を1つ選択してください", - "Something went wrong": "何かがうまくいかなかった", - "Join in request sent to": "に送信されたリクエストに参加する", - "successfully": "正常に", - "Are you sure you want to logout?": "ログアウトしてもよろしいですか?", - "Logout": "ログアウト", - "Settings": "設定", - "Dark Theme": "暗いテーマ", - "Error": "エラー", - "Warning": "警告", - "Information": "情報", - "No account registered with this email": "サーバーが実行されていない/間違った URL", - "Dismiss": "解散", - "No organizations found Please contact your admin": "組織が見つかりません!管理者に連絡してください", - "For complete access, please": "完全にアクセスするには、", - "join an organization.": " 組織に参加します。", - "JOIN": "参加する", - "Camera": "カメラ", - "Gallery": "ギャラリー", - "NEXT": "次へ", - "COMPLETE": "完了", - "Start app tour to know talawa functioning": "タラワの機能を知るためにアプリツアーを開始する", - "Scan QR": "QRをスキャン", - "Add tag": "タグを追加する", - "Enter the Tag": "タグを入力してください", - "Title": "タイトル", - "Where is the event?": "イベントはどこですか?", - "Add Members": "メンバーを追加する", - "All Events": "すべてのイベント", - "Created Events": "作成されたイベント", - "Registered Events": "登録されたイベント", - "Send": "送信", - "Write your comment here..": "ここにコメントを書いてください..", - "You need access": "アクセスが必要です", - "Request access, or switch to an account with access": "アクセスを要求するか、アクセス権のあるアカウントに切り替える", - "Request Access": "アクセスをリクエストする", - "Last Name": "苗字", - "First Name": "名", - "Edit Profile": "プロフィールを編集", - "Log Out": "ログアウト", - "Please Select an amount": "金額を選択してください", - "Input custom amount": "カスタム金額を入力", - "Organisation Name": "組織の名前", - "Choose an Organization": "組織を選択する", - "Your Report has been sent to the Admin": "あなたのレポートは管理者に送信されました", - "Report the post to the Admin": "投稿を管理者に報告する", - "Do you really want to delete the post?": "本当に投稿を削除しますか?", - "Liked": "いいね", - "Looks like there aren't any events.": "イベントがないようです。", - "You have not created any event.": "あなたはどんなイベントも作成していません。", - "No registered events are present": "登録されたイベントは存在しません", - "There aren't any public events.": "公開イベントはありません。", - "There aren't any private events.": "プライベートイベントはありません。", - "Donate to the Community": "コミュニティに寄付する", - "Donating to": "に寄付する", - "Are you sure you want to delete this event?": "このイベントを削除してもよろしいですか?", - "Are you sure you want to exit this organization?": "この組織を退出してもよろしいですか?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "これはプロファイルタブです。ここでは、アカウント、アプリの設定、招待、ヘルプなどに関連するすべてのオプションを見ることができます。", - "You can edit application settings like language, theme etc from here": "ここから言語、テーマなどのアプリケーションの設定を編集できます。", - "For any help we are always there. You can reach us from here": "お手伝いが必要な場合はいつでもお手伝いします。ここからお問い合わせいただけます。", - "Current selected Organization Name": "現在選択されている組織の名前", - "Click this button to see options related to switching, joining and leaving organization(s)": "組織の切り替え、参加、退出に関連するオプションを見るには、このボタンをクリックしてください。", - "Current selected Organization's Name appears here": "現在選択されている組織の名前がここに表示されます。", - "All your joined organizations appear over here you can click on them to change the current organization": "参加したすべての組織がここに表示され、現在の組織を変更するにはそれらをクリックできます。", - "From this button you can join other listed organizations": "このボタンから他のリストされた組織に参加できます。", - "To leave the current organization you can use this option": "現在の組織を退出するには、このオプションを使用できます。", - "This is the post card you can like and comment on the post from the options available": "これは投稿カードです。利用可能なオプションから投稿にいいねやコメントをすることができます。", - "This is the Events tab here you can see all event related information of the current selected organization": "これはイベントタブです。ここでは、現在選択されている組織の関連するすべてのイベント情報を見ることができます。", - "This is the home tab here you can see the latest post from other members of the current organization": "これはホームタブです。ここでは、現在の組織の他のメンバーの最新の投稿を見ることができます。", - "This section displays all the important post set by the organization admin(s)": "このセクションには組織の管理者によって設定されたすべての重要な投稿が表示されます。", - "Filter Events based on categories": "カテゴリに基づいてイベントをフィルタリング", - "Filter Events between selected dates": "選択した日付の間でイベントをフィルタリング", - "Description of event to see more details click on the card": "詳細を見るには、イベントの説明をクリックしてください。", - "This is the Create post tab here you can add post to the current selected organization": "これは投稿を作成するタブです。ここでは、現在選択されている組織に投稿を追加できます。", - "This is the Chat tab here you can see all your messages of the current selected organization": "これはチャットタブです。ここでは、現在選択されている組織のすべてのメッセージを見ることができます。", - "To help your organization grow you can support them financially from here": "組織の成長をサポートするためには、ここから経済的にサポートできます。", - "You are all set to go let's get you in": "準備が整いました。さあ、始めましょう。", - "You have no event in this organization": "この組織にはイベントがありません", - "Create your first event": "最初のイベントを作成してください", - "There are no posts in this organization": "この組織には投稿がありません", - "Create your first post": "最初の投稿を作成してください", - "You have no post in this organization": "この組織には投稿がありません", - "You can create a new event from here": "ここから新しいイベントを作成できます", - "You are all set to go lets get you in": "あなたは完全に準備が整いました。入れてあげましょう。", - "App Tour": "アプリトール", - "Start": "開始", - "Skip": "スキップ", - "Posts": "投稿", - "Tasks": "タスク", - "Or": "または", - "Please select any amount": "金額を選択してください", - "Registered": "登録済み", - "Not Registrable": "登録不可", - "Enter the title of your post": "投稿タイトルを入力してください", - "General": "一般", - "Help & Support": "ヘルプとサポート", - "Talawa Docs": "Talawa ドキュメント", - "All day": "1日中", - "Join an Organisation": "団体に参加する", - "DONATE": "寄付する", - "Permission Denied": "許可が拒否されました", - "Camera permission is required, to use this feature, give permission from app settings": "この機能を使用するには、カメラの許可が必要です。アプリの設定から許可を与えてください。", - "SETTINGS": "設定", - "LogOut": "ログアウト", - "Membership request already exist": "メンバーシップリクエストはすでに存在しています", - "Enter a valid password": "有効なパスワードを入力してください", - "Organization Not Found": "組織が見つかりません", - "Account with this email already registered": "このメールアドレスではすでにアカウントが登録されています", - "Something went wrong!": "何かが間違っています!", - "URL doesn't exist/no connection please check": "URLが存在しない/接続がないため、確認してください", - "The QR is not Working": "QRコードが動作していません", - "This QR version is not Supported.": "このQRバージョンはサポートされていません。", - "Comment sent": "コメントを送信しました", - "Server not running/wrong url": "サーバーが実行されていません/URLが違います", - "Couldn't update User details": "ユーザーの詳細を更新できませんでした", - "Image is added": "画像が追加されました", - "Post is uploaded": "投稿がアップロードされました", - "Profile updated successfully": "プロファイルを正常に更新しました", - "The Camera is not working": "カメラが動作していません", - "This QR is not for the App": "このQRコードはアプリには使用できません", - "The tag was added": "タグが追加されました", - "Start time must be before end time": "開始時間は終了時間より前でなければなりません", - "Organisation on different server, logout and scan qr again": "異なるサーバー上の組織です。ログアウトして、QRコードを再びスキャンしてください。", - "Post was deleted if you had the rights!": "権限がある場合、投稿は削除されました!", - "Members": " メンバー " -} diff --git a/lang/pt.json b/lang/pt.json deleted file mode 100644 index 861139a63..000000000 --- a/lang/pt.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "Olá", - "User Name": "Nome do usuário", - "we've": "wir haben", - "got you covered": "te cobrimos", - "password": "senha", - "Enter new password": "Insira a nova senha", - "Re-Enter your password": "Digite sua senha novamente", - "Change Password": "Mudar senha", - "Email Hint": "test@test.org", - "Enter your registered Email": "Digite seu e-mail cadastrado", - "Enter your password": "Coloque sua senha", - "Forgot password": "Esqueceu sua senha", - "Login": "Conecte-se", - "Sit back relax, we'll": "Sente-se relaxe, vamos", - "Notification Feature is not installed": "O recurso de notificação não está instalado", - "Recover": "Recuperar", - "your password": "sua senha", - "Recover Password": "Recuperar senha", - "Select Language": "Selecione o idioma", - "Default": "Predefinição", - "Select": "Selecione", - "Selected Organization": "Organização Selecionada", - "Continue": "Prosseguir", - "Enter Community URL": "Insira o URL da sua comunidade", - "Verify": "Verificar", - "Sign Up": "Inscrever-se", - "Change language": "Mudar idioma", - "First Name Hint": "John", - "Enter your first name": "Digite seu primeiro nome", - "Last Name Hint": "Carlos", - "Enter your last name": "Digite seu sobrenome", - "Confirm your password": "Confirme sua senha", - "Next": "Próxima", - "Request Sent to": "Pedido enviado para", - "Log out": "Sair", - "Join": "Juntar", - "and": "e", - "Collaborate": "Colaborar", - "with your": "com o seu", - "Organizations": "Organizações", - "Title from the viewMode GSoC branch": "Título da ramificação viewMode GSoC", - "Please verify URL first": "Verifique o URL primeiro", - "Enter a valid URL": "Insira um URL válido", - "Firstname must not be left blank.": "O nome não deve ser deixado em branco.", - "Invalid Firstname": "Nome Inválido", - "Lastname must not be left blank.": "O sobrenome não deve ser deixado em branco.", - "Invalid Lastname": "Sobrenome inválido", - "Email must not be left blank": "O e-mail não deve ser deixado em branco", - "Please enter a valid Email Address": "Por favor insira um endereço de e-mail válido", - "Password must not be left blank": "A senha não deve ser deixada em branco", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "Sua senha deve ter pelo menos 8 caracteres, conter pelo menos um número, uma letra maiúscula e uma minúscula e um caractere especial (@,#,$,etc.)", - "Password must not contain spaces": "A senha não deve conter espaços", - "Password does not match original": "A senha não corresponde ao original", - "Join Organisation": "Junte-se à organização", - "We're": "Estamos", - "Glad": "Alegre", - "you're": "você é", - "Back": "Voltar", - "Let's": "Vamos", - "get": "pegue", - "you": "tu", - "SignUp": "Inscrever-se", - "Please wait": "Por favor, espere", - "for organisation(s) to accept your invitation.": "para a (s) organização (ões) aceitarem o seu convite.", - "Add Event Title": "Adicionar Título do Evento", - "Where is the event": "Onde é o evento", - "Add Location": "Adicionar local", - "Describe the event": "Descreva o evento", - "Add Description": "Adicionar descrição", - "Add Event": "Adicionar Evento", - "Add": "Adicionar", - "Add Image": "Adicionar imagem", - "Select Start Date": "Selecionar data de início", - "Select End Date": "Selecionar data de término", - "Select Start Date and Time": "Selecione a data e hora de início", - "Select End Date and Time": "Selecione a data e hora de término", - "Does not repeat": "Não repete", - "Keep Public": "Manter público", - "Keep Registerable": "Manter registrável", - "Event Details": "detalhes do evento", - "Register": "Registro", - "Created by": "Created by", - "public": "pública", - "private": "privada", - "Description": "Descrição", - "Admins": "Admins", - "Attendees": "Participantes", - "See all": "Ver tudo", - "Start Date": "Data de início", - "End Date": "Data final", - "Cancel": "Cancelar", - "Done": "Feita", - "Explore Events": "Explorar eventos", - "Filters": "Filtros", - "Filter by Date": "Filtrar por data", - "Show all events": "Mostrar todos os eventos", - "Show all events created by you": "Mostrar todos os eventos criados por você", - "Show all events you have registered": "Mostrar todos os eventos em que você se registrou", - "Show events for all": "Mostrar eventos para todos", - "Show invite-only events": "Mostrar apenas eventos com convite", - "Add Date": "Adicionar Data", - "Event": "Evento", - "My Events": "Meus Eventos", - "Public Events": "Eventos Públicos", - "Private Events": "Eventos Privados", - "Liked by": "Curtido por", - "Comments": "Comentários", - "FirstName LastName": "Primeiro nome, ultimo nome", - "Pinned Posts": "Postagens fixadas", - "Profile": "Perfil", - "Email": "O email", - "Update": "Atualizar", - "App Settings": "Configurações do aplicativo", - "Language": "Língua", - "dark mode": "modo escuro", - "font size": "tamanho da fonte", - "Help": "Ajuda", - "Reach out to us for help": "Entre em contato conosco para obter ajuda", - "Donate Us": "Doe-nos", - "Help us to develop for you": "Ajude-nos a desenvolver para você", - "Log out from Talawa": "Saia de Talawa", - "Share News": "Compartilhe notícias", - "Post": "Publicar", - "Organization Name": "Nome da organização", - "Add hasthtag": "Adicionar hashtag", - "Write here what do you want to share": "Escreva aqui o que você deseja compartilhar", - "Join selected organisation": "Junte-se à organização selecionada", - "Home": "Casa", - "Events": "Eventos", - "Chat": "Bate-papo", - "Chat Screen": "Tela de bate-papo", - "Confirm": "confirme", - "Confirmation": "Confirmação", - "Close": "Fechar", - "Switch Organization": "Mudar de organização", - "Join new Organization": "Junte-se a uma nova organização", - "Leave Current Organization": "Sair da Organização Atual", - "Creator": "Criadora", - "Public": "Pública", - "Private": "Privada", - "No Internet": "Sem internet", - "Subscribed": "Subscrito", - "from": "a partir de", - "See all Pinned news": "Ver todas as notícias fixadas", - "show more": "mostre mais", - "show less": "mostre menos", - "Likes": "Gosta", - "comments": "comentários", - "Final": "Final", - "Enter Details": "Insira os detalhes", - "Select\nOrganization": "Selecione a Organização", - "already selected": "já selecionado", - "Switched to": "Transferido para", - "Organisation already joined": "Organização já aderiu", - "Membership request already sent": "Pedido de adesão já enviado", - "Select one organization to continue": "Selecione uma organização para continuar", - "Something went wrong": "Algo deu errado", - "Join in request sent to": "Solicitação de adesão enviada para", - "successfully": "com sucesso", - "Are you sure you want to logout?": "Tem certeza que deseja sair?", - "Logout": "Sair", - "Settings": "Definições", - "Dark Theme": "Tema escuro", - "Error": "Erro", - "Warning": "Aviso", - "Information": "Informação", - "No account registered with this email": "Servidor não está em execução/url errado", - "Dismiss": "liberar", - "No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton", - "For complete access, please": "Para acesso completo, por favor", - "join an organization.": " ingressar em uma organização.", - "JOIN": "ENTRAR", - "Camera": "Câmera", - "Gallery": "Galeria", - "NEXT": "PRÓXIMO", - "COMPLETE": "COMPLETO", - "Start app tour to know talawa functioning": "Inicie o tour do aplicativo para conhecer o funcionamento do talawa", - "Scan QR": "Escanear QR", - "Add tag": "Adicionar tag", - "Enter the Tag": "Digite a Tag", - "Title": "Título", - "Where is the event?": "Onde é o evento?", - "Add Members": "Adicionar membros", - "All Events": "Todos os eventos", - "Created Events": "Eventos criados", - "Registered Events": "Eventos registrados", - "Send": "Enviar", - "Write your comment here..": "Escreva seu comentário aqui..", - "You need access": "Você precisa de acesso", - "Request access, or switch to an account with access": "Solicitar acesso ou mudar para uma conta com acesso", - "Request Access": "Solicitar acesso", - "Last Name": "Sobrenome", - "First Name": "Nome", - "Edit Profile": "Editar perfil", - "Log Out": "Sair", - "Please Select an amount": "Por favor, selecione um valor", - "Input custom amount": "Inserir valor personalizado", - "Organisation Name": "Nome da Organização", - "Choose an Organization": "Escolha uma Organização", - "Your Report has been sent to the Admin": "Seu relatório foi enviado ao Administrador", - "Report the post to the Admin": "Reportar a postagem ao Administrador", - "Do you really want to delete the post?": "Você realmente quer deletar a postagem?", - "Liked": "Curtido", - "Looks like there aren't any events.": "Parece que não há eventos.", - "You have not created any event.": "Você não criou nenhum evento.", - "No registered events are present": "Não há eventos registrados", - "There aren't any public events.": "Não há eventos públicos.", - "There aren't any private events.": "Não há eventos privados.", - "Donate to the Community": "Doar para a Comunidade", - "Donating to": "Doando para", - "Are you sure you want to delete this event?": "Tem certeza de que deseja excluir este evento?", - "Are you sure you want to exit this organization?": "Tem certeza de que deseja sair desta organização?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "Esta é a aba de Perfil, onde você pode ver todas as opções relacionadas à conta, configurações do aplicativo, convites, ajuda, etc.", - "You can edit application settings like language, theme etc from here": "Você pode editar as configurações do aplicativo, como idioma, tema, etc., a partir daqui", - "For any help we are always there. You can reach us from here": "Para qualquer ajuda, estamos sempre aqui. Você pode nos contatar a partir daqui", - "Current selected Organization Name": "Nome da organização atualmente selecionada", - "Click this button to see options related to switching, joining and leaving organization(s)": "Clique neste botão para ver opções relacionadas a trocar, juntar-se e sair de organizações", - "Current selected Organization's Name appears here": "O nome da organização atualmente selecionada aparece aqui", - "All your joined organizations appear over here you can click on them to change the current organization": "Todas as organizações às quais você se juntou aparecem aqui; você pode clicar nelas para mudar a organização atual", - "From this button you can join other listed organizations": "A partir deste botão, você pode se juntar a outras organizações listadas", - "To leave the current organization you can use this option": "Para sair da organização atual, você pode usar esta opção", - "This is the post card you can like and comment on the post from the options available": "Este é o cartão de postagem; você pode curtir e comentar na postagem a partir das opções disponíveis", - "This is the Events tab here you can see all event related information of the current selected organization": "Esta é a aba de Eventos; aqui você pode ver todas as informações relacionadas a eventos da organização atualmente selecionada", - "This is the home tab here you can see the latest post from other members of the current organization": "Esta é a aba Início; aqui você pode ver a última postagem de outros membros da organização atual", - "This section displays all the important post set by the organization admin(s)": "Esta seção exibe todas as postagens importantes definidas pelos administradores da organização", - "Filter Events based on categories": "Filtre eventos com base em categorias", - "Filter Events between selected dates": "Filtre eventos entre as datas selecionadas", - "Description of event to see more details click on the card": "Descrição do evento; para ver mais detalhes, clique no cartão", - "This is the Create post tab here you can add post to the current selected organization": "Esta é a aba de Criar postagem; aqui você pode adicionar uma postagem à organização atualmente selecionada", - "This is the Chat tab here you can see all your messages of the current selected organization": "Esta é a aba de Chat; aqui você pode ver todas as suas mensagens da organização atualmente selecionada", - "To help your organization grow you can support them financially from here": "Para ajudar sua organização a crescer, você pode apoiá-la financeiramente a partir daqui", - "You are all set to go let's get you in": "Você está pronto para ir; vamos começar", - "You have no event in this organization": "Você não tem nenhum evento nesta organização", - "Create your first event": "Crie seu primeiro evento", - "There are no posts in this organization": "Não há posts nesta organização", - "Create your first post": "Crie sua primeira postagem", - "You have no post in this organization": "Você não tem nenhuma postagem nesta organização", - "You can create a new event from here": "Você pode criar um novo evento aqui", - "You are all set to go lets get you in": "Você está tudo pronto para ir, vamos te levar", - "App Tour": "Tour do aplicativo", - "Start": "Iniciar", - "Skip": "Pular", - "Posts": "Postagens", - "Tasks": "Tarefas", - "Or": "Ou", - "Please select any amount": "Por favor, selecione uma quantia", - "Registered": "Registado", - "Not Registrable": "Não registrável", - "Enter the title of your post": "Insira o título do seu post", - "General": "Geral", - "Help & Support": "Ajuda e suporte", - "Talawa Docs": "Talawa Documentos", - "All day": "Todo o dia", - "Join an Organisation": "Junte-se a uma organização", - "DONATE": "DOAR", - "Permission Denied": "Permissão negada", - "Camera permission is required, to use this feature, give permission from app settings": "É necessária permissão de câmera para usar este recurso. Conceda permissão pelas configurações do aplicativo.", - "SETTINGS": "CONFIGURAÇÕES", - "LogOut": "Sair", - "Membership request already exist": "Solicitação de associação já existe", - "Enter a valid password": "Insira uma senha válida", - "Organization Not Found": "Organização não encontrada", - "Account with this email already registered": "Conta com este e-mail já está registrada", - "Something went wrong!": "Algo deu errado!", - "URL doesn't exist/no connection please check": "A URL não existe/não há conexão, verifique", - "The QR is not Working": "O código QR não está funcionando", - "This QR version is not Supported.": "Esta versão do QR não é suportada.", - "Comment sent": "Comentário enviado", - "Server not running/wrong url": "Servidor não está em execução/URL errada", - "Couldn't update User details": "Não foi possível atualizar os detalhes do usuário", - "Image is added": "Imagem adicionada", - "Post is uploaded": "Postagem enviada", - "Profile updated successfully": "Perfil atualizado com sucesso", - "The Camera is not working": "A câmera não está funcionando", - "This QR is not for the App": "Este código QR não é para o aplicativo", - "The tag was added": "A tag foi adicionada", - "Start time must be before end time": "O horário de início deve ser anterior ao horário de término", - "Organisation on different server, logout and scan qr again": "Organização em servidor diferente, faça logout e escaneie o QR novamente", - "Post was deleted if you had the rights!": "A postagem foi excluída se você tiver os direitos!", - "Members": "Membros" -} diff --git a/lang/zh.json b/lang/zh.json deleted file mode 100644 index 68e3dc825..000000000 --- a/lang/zh.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "Hello": "你好", - "User Name": "用户名", - "we've": "我们已经", - "got you covered": "为您服务", - "password": "输入您的密码", - "Enter new password": "输入新密码", - "Re-Enter your password": "重新输入您的密码", - "Change Password": "更改密码", - "Email Hint": "test@test.org", - "Enter your registered Email": "输入您的注册邮箱", - "Enter your password": "输入您的密码", - "Forgot password": "你忘记密码了吗", - "Login": "登录", - "Sit back relax, we'll": "高枕无忧, ", - "Recover": "", - "Notification Feature is not installed": "未安装通知功能\n", - "your password": "我们会找回您的密码", - "Recover Password": "恢复你的密码", - "Select Language": "选择语言", - "Default": "默认值", - "Select": "选择", - "Selected Organization": "选定组织", - "Continue": "继续", - "Enter Community URL": "输入您的社区网址", - "Verify": "验证一下", - "Sign Up": "报名", - "Change language": "改变语言", - "First Name Hint": "杰基", - "Enter your first name": "输入您的名字", - "Last Name Hint": "陈", - "Enter your last name": "输入您的姓氏", - "Confirm your password": "确认你的密码", - "Next": "下一个", - "Request Sent to": "请求发送至", - "Log out": "登出", - "Join": "加入您的组织并与之协作", - "and": "", - "Collaborate": "", - "with your": "", - "Organizations": "", - "Title from the viewMode GSoC branch": "来自 viewMode GSoC 分支的标题", - "Please verify URL first": "请先验证网址", - "Enter a valid URL": "输入有效的网址", - "Firstname must not be left blank.": "名字不能留空。", - "Invalid Firstname": "名字无效", - "Lastname must not be left blank.": "姓氏不能留空。", - "Invalid Lastname": "无效的姓氏", - "Email must not be left blank": "电子邮件不得留空", - "Please enter a valid Email Address": "请输入有效的电子邮件地址", - "Password must not be left blank": "密码不能为空", - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,$,etc.)": "您的密码长度必须至少为 8 个字符,至少包含 1 个数字、1 个大写和 1 个小写字母以及 1 个特殊字符(@、#、$ 等)", - "Password must not contain spaces": "密码不能包含空格", - "Password does not match original": "密码与原密码不符", - "Join Organisation": "加入组织", - "We're": "我们很高兴", - "Glad": "", - "you're": "你回来了", - "Back": "", - "Let's": "让我们", - "get": "帮", - "you": "", - "SignUp": "你注册", - "Please wait": "请稍等", - "for organisation(s) to accept your invitation.": "以便组织接受您的邀请。", - "Add Event Title": "添加活动标题", - "Where is the event": "活动地点", - "Add Location": "添加位置", - "Describe the event": "描述事件", - "Add Description": "添加描述", - "Add Event": "添加事件", - "Add": "添加", - "Add Image": "添加图片", - "Select Start Date": "选择开始日期", - "Select End Date": "选择结束日期", - "Select Start Date and Time": "选择开始日期和时间", - "Select End Date and Time": "选择结束日期和时间", - "Does not repeat": "不重复", - "Keep Public": "保持公开", - "Keep Registerable": "保持注册", - "Event Details": "活动详情", - "Register": "注册", - "Created by": "创建者", - "public": "公开", - "private": "私人", - "Description": "说明", - "Admins": "管理员", - "Attendees": "与会者", - "See all": "查看全部", - "Start Date": "开始日期", - "End Date": "结束日期", - "Cancel": "取消", - "Done": "完成", - "Explore Events": "探索事件", - "Filters": "过滤器", - "Filter by Date": "按日期过滤", - "Show all events": "显示所有活动", - "My Events": "我的活动", - "Show all events created by you": "显示由您创建的所有活动", - "Show all events you have registered": "显示您已注册的所有活动", - "Public Events": "公共活动", - "Show events for all": "显示所有人的活动", - "Private Events": "私人活动", - "Show invite-only events": "仅显示邀请活动", - "Add Date": "添加日期", - "Event": "事件", - "Liked by": "喜欢的人", - "Comments": "评论", - "FirstName LastName": "名字姓氏", - "Pinned Posts": "已标记的帖子", - "Profile": "简介", - "Email": "电子邮件", - "Update": "更新", - "App Settings": "应用设置", - "Language": "语言", - "dark mode": "黑暗模式", - "font size": "字体大小", - "Help": "帮助", - "Reach out to us for help": "联系我们寻求帮助", - "Donate Us": "捐赠我们", - "Help us to develop for you": "帮助我们为您开发", - "Log out from Talawa": "从 Talawa 注销", - "Share News": "分享新闻", - "Post": "邮政", - "Organization Name": "机构名称", - "Add hasthtag": "添加主题标签", - "Write here what do you want to share": "在这里写下您想分享的内容", - "Join selected organisation": "加入选定的组织", - "Home": "家", - "Events": "事件", - "Chat": "聊天", - "Chat Screen": "聊天画面", - "Confirm": "确认", - "Confirmation": "确认", - "Close": "关闭", - "Switch Organization": "切换组织", - "Join new Organization": "加入新组织", - "Leave Current Organization": "离开当前组织", - "Creator": "创造者", - "Public": "公共", - "Private": "私人", - "No Internet": "没有互联网", - "Subscribed": "订阅", - "from": "来自", - "See all Pinned news": "查看所有置顶新闻", - "show more": "显示更多", - "show less": "显示较少", - "Likes": "喜欢", - "comments": "评论", - "Final": "最终", - "Enter Details": "输入详细信息", - "Select\nOrganization": "Select\nOrganization", - "already selected": "已选", - "Switched to": "切换到", - "Organisation already joined": "组织已加入", - "Membership request already sent": "会员申请已发送", - "Select one organization to continue": "选择一个组织继续", - "Something went wrong": "出问题了", - "Join in request sent to": "加入请求发送至", - "successfully": "成功", - "Are you sure you want to logout?": "您确定要退出吗?", - "Logout": "登出", - "Settings": "设置", - "Dark Theme": "黑暗主题", - "Error": "错误", - "Warning": "警告", - "Information": "信息", - "No account registered with this email": "服务器未运行/网址错误", - "Dismiss": "解雇", - "No organizations found Please contact your admin": "未找到任何组织。请联系您的管理员。", - "For complete access, please": "如需完整访问,请", - "join an organization.": " 加入一个组织。", - "JOIN": "加入", - "Camera": "相机", - "Gallery": "画廊", - "NEXT": "下一个", - "COMPLETE": "完成", - "Start app tour to know talawa functioning": "启动应用程序导览以了解塔拉瓦的功能", - "Scan QR": "扫描QR码", - "Add tag": "添加标签", - "Enter the Tag": "输入标签", - "Title": "标题", - "Where is the event?": "事件在哪里?", - "Add Members": "添加成员", - "All Events": "所有活动", - "Created Events": "创建的活动", - "Registered Events": "注册的活动", - "Send": "发送", - "Write your comment here..": "在此处写下您的评论..", - "You need access": "您需要访问权限", - "Request access, or switch to an account with access": "请求访问权限,或切换到有访问权限的账户", - "Request Access": "请求访问", - "Last Name": "姓氏", - "First Name": "名字", - "Edit Profile": "编辑个人资料", - "Log Out": "登出", - "Please Select an amount": "请选择一个金额", - "Input custom amount": "输入自定义金额", - "Organisation Name": "组织名称", - "Choose an Organization": "选择一个组织", - "Your Report has been sent to the Admin": "您的报告已发送给管理员", - "Report the post to the Admin": "向管理员举报帖子", - "Do you really want to delete the post?": "您真的想要删除这个帖子吗?", - "Liked": "喜欢", - "Looks like there aren't any events.": "看起来没有任何活动。", - "You have not created any event.": "您还没有创建任何活动。", - "No registered events are present": "没有注册的活动", - "There aren't any public events.": "没有公开的活动。", - "There aren't any private events.": "没有私人活动。", - "Donate to the Community": "向社区捐款", - "Donating to": "捐赠给", - "Are you sure you want to delete this event?": "您确定要删除此活动吗?", - "Are you sure you want to exit this organization?": "您确定要退出这个组织吗?", - "This is the Profile tab here you can see all options related to account, app setting, invitation, help etc": "这是个人资料选项卡,您可以在此处查看与帐户、应用设置、邀请、帮助等相关的所有选项。", - "You can edit application settings like language, theme etc from here": "您可以从这里编辑应用程序设置,如语言、主题等。", - "For any help we are always there. You can reach us from here": "任何帮助我们都会在这里。您可以通过这里联系我们。", - "Current selected Organization Name": "当前选择的组织名称", - "Click this button to see options related to switching, joining and leaving organization(s)": "单击此按钮以查看与切换、加入和离开组织相关的选项。", - "Current selected Organization's Name appears here": "当前选择的组织名称将显示在此处。", - "All your joined organizations appear over here you can click on them to change the current organization": "您加入的所有组织都会显示在这里,您可以单击它们以更改当前的组织。", - "From this button you can join other listed organizations": "您可以通过此按钮加入其他列出的组织。", - "To leave the current organization you can use this option": "要离开当前组织,您可以使用此选项。", - "This is the post card you can like and comment on the post from the options available": "这是帖子卡片,您可以从可用的选项中点赞并评论帖子。", - "This is the Events tab here you can see all event related information of the current selected organization": "这是活动选项卡,您可以在此处查看当前选择组织的所有与活动相关的信息。", - "This is the home tab here you can see the latest post from other members of the current organization": "这是主页选项卡,您可以在此处查看当前组织其他成员的最新帖子。", - "This section displays all the important post set by the organization admin(s)": "此部分显示由组织管理员设置的所有重要帖子。", - "Filter Events based on categories": "基于类别筛选事件", - "Filter Events between selected dates": "在选定的日期之间筛选事件", - "Description of event to see more details click on the card": "事件描述以查看更多详情,请单击卡片。", - "This is the Create post tab here you can add post to the current selected organization": "这是创建帖子选项卡,您可以在此处向当前选择的组织添加帖子。", - "This is the Chat tab here you can see all your messages of the current selected organization": "这是聊天选项卡,您可以在此处查看当前选择组织的所有消息。", - "To help your organization grow you can support them financially from here": "要帮助您的组织成长,您可以从这里提供财务支持。", - "You are all set to go let's get you in": "您已经准备好了,让我们开始吧。", - "You have no event in this organization": "您在此组织中没有活动", - "Create your first event": "创建您的第一个活动", - "There are no posts in this organization": "此组织中没有帖子", - "Create your first post": "创建您的第一篇帖子", - "You have no post in this organization": "您在此组织中没有帖子", - "You can create a new event from here": "您可以从这里创建一个新活动", - "You are all set to go lets get you in": "您已经准备好出发了,让我们带您进去", - "App Tour": "应用导览", - "Start": "开始", - "Skip": "跳过", - "Posts": "帖子", - "Tasks": "任务", - "Or": "或者", - "Please select any amount": "请选择任何金额", - "Registered": "已注册", - "Not Registrable": "不可注册", - "Enter the title of your post": "请输入您的帖子标题", - "General": "普通", - "Help & Support": "帮助和支持", - "Talawa Docs": "Talawa 文档", - "All day": "一整天", - "Join an Organisation": "加入一个组织", - "DONATE": "捐赠", - "Permission Denied": "权限被拒绝", - "Camera permission is required, to use this feature, give permission from app settings": "使用此功能需要摄像头权限。请从应用设置中授予权限。", - "SETTINGS": "设置", - "LogOut": "登出", - "Membership request already exist": "已存在会员请求", - "Enter a valid password": "请输入有效密码", - "Organization Not Found": "未找到组织", - "Account with this email already registered": "该电子邮件已注册帐户", - "Something went wrong!": "出错了!", - "URL doesn't exist/no connection please check": "URL不存在/没有连接,请检查", - "The QR is not Working": "二维码无法使用", - "This QR version is not Supported.": "不支持此二维码版本。", - "Comment sent": "已发送评论", - "Server not running/wrong url": "服务器未运行/URL错误", - "Couldn't update User details": "无法更新用户详细信息", - "Image is added": "已添加图像", - "Post is uploaded": "已上传帖子", - "Profile updated successfully": "已成功更新资料", - "The Camera is not working": "相机无法使用", - "This QR is not for the App": "此二维码不适用于本应用", - "The tag was added": "已添加标签", - "Start time must be before end time": "开始时间必须在结束时间之前", - "Organisation on different server, logout and scan qr again": "组织在不同的服务器上,请注销并重新扫描二维码", - "Post was deleted if you had the rights!": "如果您有权限,则已删除帖子!", - "Members": "成员" -} diff --git a/lib/apptheme.dart b/lib/apptheme.dart deleted file mode 100644 index c036bf6bc..000000000 --- a/lib/apptheme.dart +++ /dev/null @@ -1,165 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; - -/// Apptheme class. -/// -class AppTheme { - // Text Styles - /// Custom theme for the app. - /// - static TextStyle title = const TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - decorationThickness: 0, - ); - - /// Custom theme for the app. - static TextStyle headline1 = const TextStyle( - fontSize: 24, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle headline2 = const TextStyle( - fontSize: 18, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle headline3 = const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle headline4 = const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle headline5 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle headline6 = const TextStyle( - fontSize: 10, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle subtitle1 = const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle subtitle2 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w500, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle bodyText1 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle bodyText2 = const TextStyle( - fontSize: 8, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle bodyText3 = const TextStyle( - fontSize: 10, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle overline = const TextStyle( - fontSize: 6, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', - ); - - /// Custom theme for the app. - static TextStyle button = const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: primary, - fontFamily: 'OpenSans', - ); - - /// Colors. - /// - /// Custom colors for the app. - static const Color primary = Color(0xFFFFC107); - - /// Custom colors for the app. - static const Color secondary = Color(0xFF795548); - - /// Custom colors for the app. - static const Color tertiary = Color(0xFFA16938); - - /// Custom colors for the app. - static const Color white = Color(0xFFFFFFFF); - - /// Custom colors for the app. - static const Color red = Color(0xFFEB5757); - - /// Custom colors for the app. - static const Color blue = Color(0xFF2196F3); - - /// Custom colors for the app. - static const Color yellow = Color(0xffF6BA18); - - /// Custom colors for the app. - static const Color green = Color(0xFF2ACC00); - - /// Custom colors for the app. - static const Color grey = Color(0xFFD2D2D2); - - /// Custom colors for the app. - static const Color lightGrey = Color(0xFFECECEC); - - /// Custom colors for the app. - static const Color blackPrimary = Color(0xFF3E3E3E); - - /// Custom colors for the app. - static const Color blackSecondary = Color(0xFF636363); - - /// Custom colors for the app. - static const Color blackTertiary = Color(0xFFAEAEAE); - - /// Custom colors for the app. - static const Color shadow = Color(0x408E8E8E); -} diff --git a/lib/constants/constants.dart b/lib/constants/constants.dart deleted file mode 100644 index 5cf96cdd4..000000000 --- a/lib/constants/constants.dart +++ /dev/null @@ -1,152 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:talawa/models/language/language_model.dart'; - -/// This file contains the prototypes of all the languages available and supported currencies. -List languages = [ - Language( - countryCode: 'US', - langCode: 'en', - langName: 'English', - langSample: 'Welcome User', - ), - Language( - countryCode: 'IN', - langCode: 'hi', - langName: 'हिंदी', - langSample: 'स्वागत उपयोगकर्ता', - ), - Language( - countryCode: 'CN', - langCode: 'zh', - langName: '中国人', - langSample: '欢迎用户', - ), - Language( - countryCode: 'FR', - langCode: 'fr', - langName: 'français', - langSample: 'Bienvenue utilisateur', - ), - Language( - countryCode: 'ES', - langCode: 'es', - langName: 'Española', - langSample: 'Bienvenida usuario', - ), - Language( - countryCode: 'JP', - langCode: 'ja', - langName: '日本', - langSample: 'ようこそユーザー', - ), - Language( - countryCode: 'GE', - langCode: 'de', - langName: 'Deutsch', - langSample: 'Willkommen Benutzer', - ), - Language( - countryCode: 'PE', - langCode: 'pt', - langName: 'português', - langSample: 'Bem-vindo, usuário', - ), -]; - -List supportedCurrencies = [ - 'AED', - 'ALL', - 'AMD', - 'ARS', - 'AUD', - 'AWG', - 'BBD', - 'BDT', - 'BMD', - 'BND', - 'BOB', - 'BSD', - 'BWP', - 'BZD', - 'CAD', - 'CHF', - 'CNY', - 'COP', - 'CRC', - 'CUP', - 'CZK', - 'DKK', - 'DOP', - 'DZD', - 'EGP', - 'ETB', - 'EUR', - 'FJD', - 'GBP', - 'GHS', - 'GIP', - 'GMD', - 'GTQ', - 'GYD', - 'HKD', - 'HNL', - 'HRK', - 'HTG', - 'HUF', - 'IDR', - 'ILS', - 'INR', - 'JMD', - 'KES', - 'KGS', - 'KHR', - 'KYD', - 'KZT', - 'LAK', - 'LBP', - 'LKR', - 'LRD', - 'LSL', - 'MAD', - 'MDL', - 'MKD', - 'MMK', - 'MNT', - 'MOP', - 'MUR', - 'MVR', - 'MWK', - 'MXN', - 'MYR', - 'NAD', - 'NGN', - 'NIO', - 'NOK', - 'NPR', - 'NZD', - 'PEN', - 'PGK', - 'PHP', - 'PKR', - 'QAR', - 'RUB', - 'SAR', - 'SCR', - 'SEK', - 'SGD', - 'SLL', - 'SOS', - 'SSP', - 'SVC', - 'SZL', - 'THB', - 'TTD', - 'TZS', - 'USD', - 'UYU', - 'UZS', - 'YER', - 'ZAR', -]; diff --git a/lib/constants/custom_theme.dart b/lib/constants/custom_theme.dart deleted file mode 100644 index 8f01eee81..000000000 --- a/lib/constants/custom_theme.dart +++ /dev/null @@ -1,145 +0,0 @@ -import 'package:flutter/material.dart'; - -///This file contains various custom themes. -/// -///For instance, lightTheme, darkTheme, _lightTextTheme, _darkTextTheme, etc. -///These are imported to other files/widgets to apply the required themes. -class TalawaTheme { - static const Color _lightCursorColor = Color(0xff34AD64); - static const Color _lightAccentColor = Color(0xff34AD64); - static const Color _lightScaffoldColor = Colors.white; - static const Color _lightPrimaryColor = Colors.white; - static const Color _lightPrimaryVariantColor = Color(0xFFe5e5e5); - static const Color _lightIconColor = Color(0xff8C8E8D); - static const Color _lightInBlack = Color(0xff000000); - static const Color _lightColorSchemePrimary = Color(0xfffabc57); - - static const Color _darkCursorColor = Color(0xff34AD64); - static const Color _darkAccentColor = Color(0xff34AD64); - static const Color _darkScaffoldColor = Color(0xff18191A); - static const Color _darkPrimaryColor = Colors.black; - static const Color _darkPrimaryVariantColor = Colors.black; - static const Color _darkIconColor = Colors.white70; - static const Color _darkInWhite = Color(0xffffffff); - static const Color _darkColorSchemePrimary = Color(0xfffabc57); - - /// Theme for light mode. - static final lightTheme = ThemeData( - scaffoldBackgroundColor: _lightScaffoldColor, - textSelectionTheme: const TextSelectionThemeData( - cursorColor: _lightCursorColor, - ), - primaryColor: _lightPrimaryColor, - iconTheme: const IconThemeData( - color: _lightIconColor, - ), - fontFamily: 'product-sans', - textTheme: _lightTextTheme, - inputDecorationTheme: _lightInputDecor, - colorScheme: const ColorScheme.light( - primaryContainer: _lightPrimaryVariantColor, - primary: _lightColorSchemePrimary, - secondary: Color(0xffF5F5F5), - onSecondary: Colors.black, - secondaryContainer: _darkScaffoldColor, - tertiary: Colors.black26, - tertiaryContainer: Color.fromARGB(255, 231, 231, 231), - ).copyWith(secondary: _lightAccentColor), - ); - - /// Theme for dark mode. - static final darkTheme = ThemeData( - textSelectionTheme: const TextSelectionThemeData( - cursorColor: _darkCursorColor, - ), - scaffoldBackgroundColor: _darkScaffoldColor, - primaryColor: _darkPrimaryColor, - iconTheme: const IconThemeData( - color: _darkIconColor, - ), - fontFamily: 'product-sans', - textTheme: _darkTextTheme, - inputDecorationTheme: _darkInputDecor, - colorScheme: const ColorScheme.dark( - primaryContainer: _darkPrimaryVariantColor, - primary: _darkColorSchemePrimary, - secondary: Colors.black, - onSecondary: Colors.white, - secondaryContainer: _lightScaffoldColor, - tertiary: Colors.white70, - tertiaryContainer: Color.fromARGB(255, 61, 61, 61), - ).copyWith(secondary: _darkAccentColor), - ); - - static const TextTheme _lightTextTheme = TextTheme( - headlineMedium: TextStyle( - fontWeight: FontWeight.w700, - fontSize: 34, - ), - headlineSmall: TextStyle( - color: _lightInBlack, - fontSize: 20, - ), - titleLarge: TextStyle( - fontSize: 16, - color: Color(0xFF737373), - ), - bodyLarge: TextStyle(fontSize: 14, color: Color(0xFF737373)), - bodyMedium: TextStyle(fontSize: 14), - bodySmall: TextStyle( - fontWeight: FontWeight.w400, - color: Color(0xFF737373), - fontSize: 12.0, - ), - ); - - static const TextTheme _darkTextTheme = TextTheme( - headlineMedium: TextStyle( - fontWeight: FontWeight.w700, - fontSize: 34, - ), - headlineSmall: TextStyle(color: _darkInWhite, fontSize: 20), - titleLarge: TextStyle( - fontSize: 16, - color: Color(0xFF737373), - ), - bodyLarge: TextStyle( - fontSize: 14, - color: Colors.white, - ), - bodyMedium: TextStyle( - fontSize: 14, - color: Colors.white, - ), - bodySmall: TextStyle( - fontWeight: FontWeight.w400, - color: Color(0xFF737373), - fontSize: 12.0, - ), - ); - - static const InputDecorationTheme _lightInputDecor = InputDecorationTheme( - border: InputBorder.none, - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Color(0xFF008A37)), - ), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Colors.grey), - ), - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - errorMaxLines: 3, - ); - static const InputDecorationTheme _darkInputDecor = InputDecorationTheme( - border: InputBorder.none, - focusedBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Color(0xFF008A37)), - ), - enabledBorder: UnderlineInputBorder( - borderSide: BorderSide(color: Colors.grey), - ), - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - errorMaxLines: 3, - ); -} diff --git a/lib/constants/quick_actions.dart b/lib/constants/quick_actions.dart deleted file mode 100644 index 690fbbd08..000000000 --- a/lib/constants/quick_actions.dart +++ /dev/null @@ -1,32 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:quick_actions/quick_actions.dart'; - -///This file contains the shortcuts by which user can manage and interact with the -///application. quick_actions package is used for this purpose. -class ShortCutMenu { - static final quickActionsList = [ - eventAction, - feedAction, - chatAction, - ]; - - static const eventAction = ShortcutItem( - type: "events_action", - localizedTitle: "Events", - icon: "event_icon", - ); - - static const feedAction = ShortcutItem( - type: "feed_action", - localizedTitle: "NewsFeed", - icon: "newsfeed_icon", - ); - - static const chatAction = ShortcutItem( - type: "chat_action", - localizedTitle: "Messages", - icon: "chat_icon", - ); -} diff --git a/lib/constants/recurrence_values.dart b/lib/constants/recurrence_values.dart deleted file mode 100644 index ff55d17c7..000000000 --- a/lib/constants/recurrence_values.dart +++ /dev/null @@ -1,279 +0,0 @@ -import 'dart:core'; -import 'package:intl/intl.dart'; - -/// Class containing constants for event intervals. -class EventIntervals { - /// Constant representing an event that occurs every day. - static const daily = 'day'; - - /// Constant representing an event that occurs every week. - static const weekly = 'week'; - - /// Constant representing an event that occurs every month. - static const monthly = 'month'; - - /// Constant representing an event that occurs every year. - static const yearly = 'year'; -} - -/// Class containing constants for event end types. -class EventEndTypes { - /// Constant representing an event that never ends. - static const never = 'never'; - - /// Constant representing an event that ends on a specific date. - static const on = 'on'; - - /// Constant representing an event that ends after a specified number of occurrences. - static const after = 'after'; -} - -/// Class containing constants for frequency options. -class Frequency { - /// Constant representing an event that occurs every day. - static const daily = 'DAILY'; - - /// Constant representing an event that occurs every week. - static const weekly = 'WEEKLY'; - - /// Constant representing an event that occurs every month. - static const monthly = 'MONTHLY'; - - /// Constant representing an event that occurs every year. - static const yearly = 'YEARLY'; -} - -/// Class containing constants for week days. -class WeekDays { - /// Constant representing Sunday. - static const sunday = 'SUNDAY'; - - /// Constant representing Monday. - static const monday = 'MONDAY'; - - /// Constant representing Tuesday. - static const tuesday = 'TUESDAY'; - - /// Constant representing Wednesday. - static const wednesday = 'WEDNESDAY'; - - /// Constant representing Thursday. - static const thursday = 'THURSDAY'; - - /// Constant representing Friday. - static const friday = 'FRIDAY'; - - /// Constant representing Saturday. - static const saturday = 'SATURDAY'; -} - -/// Class containing constants for recurrence end types. -class RecurringEventMutationType { - /// Constant representing mutation of current instance only. - static const thisInstance = 'ThisInstance'; - - /// constant representing mutation of current and following instances. - static const thisAndFollowingInstances = 'ThisAndFollowingInstances'; - - /// constant representing mutation of all instances. - static const allInstances = 'AllInstances'; -} - -/// represents all the days in a week. -List days = [ - WeekDays.monday, - WeekDays.tuesday, - WeekDays.wednesday, - WeekDays.thursday, - WeekDays.friday, - WeekDays.saturday, - WeekDays.sunday, -]; - -/// conatins all neccessary utils. -class RecurrenceUtils { - /// represents all the months. - static const List monthNames = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ]; - - /// represents all the week day occurences. - static const List weekDayOccurences = [ - 'First', - 'Second', - 'Third', - 'Fourth', - 'Last', - ]; - - /// represents all the week days. - static const List weekDays = [ - 'Monday', - 'Tuesday', - 'Wednesday', - 'Thursday', - 'Friday', - 'Saturday', - 'Sunday', - ]; - - /// 'getRecurrenceRuleText' return text for various recurrence rules. - /// - /// **params**: - /// * `frequency`: Frequency of the event. - /// * `weekDays`: List of week days. - /// * `interval`: Interval of the event. - /// * `count`: Count of the event. - /// * `weekDayOccurenceInMonth`: Week day occurence in month. - /// * `startDate`: Start date of the event. - /// * `endDate`: End date of the event. - /// - /// **returns**: - /// * `String`: Recurrence rule text. - static String getRecurrenceRuleText( - String frequency, - Set? weekDays, - int? interval, - int? count, - int? weekDayOccurenceInMonth, - DateTime startDate, - DateTime? endDate, - ) { - String recurrenceRuleText = ''; - - switch (frequency) { - case Frequency.daily: - if (interval != null && interval > 1) { - recurrenceRuleText = 'Every $interval days'; - } else { - recurrenceRuleText = 'Daily'; - } - break; - case Frequency.weekly: - if (weekDays == null) { - break; - } - if (interval != null && interval > 1) { - recurrenceRuleText = 'Every $interval weeks on '; - } else { - recurrenceRuleText = 'Weekly on '; - } - recurrenceRuleText += getWeekDaysString(weekDays.toList()); - break; - case Frequency.monthly: - if (interval != null && interval > 1) { - recurrenceRuleText = 'Every $interval months on '; - } else { - recurrenceRuleText = 'Monthly on '; - } - - if (weekDayOccurenceInMonth != null) { - final getOccurence = - weekDayOccurenceInMonth != -1 ? weekDayOccurenceInMonth - 1 : 4; - recurrenceRuleText += - '${weekDayOccurences[getOccurence]} ${RecurrenceUtils.weekDays[startDate.weekday - 1]}'; - } else { - recurrenceRuleText += 'Day ${startDate.day}'; - } - break; - case Frequency.yearly: - if (interval != null && interval > 1) { - recurrenceRuleText = 'Every $interval years on '; - } else { - recurrenceRuleText = 'Annually on '; - } - recurrenceRuleText += - '${monthNames[startDate.month - 1]} ${startDate.day}'; - break; - } - - if (endDate != null) { - final formatter = DateFormat('MMMM dd, yyyy'); - recurrenceRuleText += ', until ${formatter.format(endDate)}'; - } - - if (count != null) { - recurrenceRuleText += ', $count ${count > 1 ? 'times' : 'time'}'; - } - - return recurrenceRuleText; - } - - /// 'getWeekDaysString' returns string for weekDays. - /// - /// **params**: - /// * `weekDays`: List of Weekdays - /// - /// **returns**: - /// * `String`: returns string for weekDays. - static String getWeekDaysString(List weekDays) { - final fullDayNames = weekDays - .map((day) => RecurrenceUtils.weekDays[weekDays.indexOf(day)]) - .toList(); - - String weekDaysString = fullDayNames.join(', '); - - final lastCommaIndex = weekDaysString.lastIndexOf(','); - if (lastCommaIndex != -1) { - weekDaysString = - '${weekDaysString.substring(0, lastCommaIndex)} &${weekDaysString.substring(lastCommaIndex + 1)}'; - } - - return weekDaysString; - } - - /// 'getWeekDayOccurenceInMonth' returns the week day occurence in month. - /// - /// **params**: - /// * `date`: Date of the event. - /// - /// **returns**: - /// * `int`: Week day occurence in month. - static int getWeekDayOccurenceInMonth(DateTime date) { - final dayOfMonth = date.day; - - // Calculate the current occurrence - final occurrence = (dayOfMonth / 7).ceil(); - - return occurrence; - } - - /// Function to check whether cuurent event instance is Last occurence of Week Day. - /// - /// **params**: - /// * `date`: Date of the event. - /// - /// **returns**: - /// * `bool`: Returns true if the current event instance is the last occurence of the week day. - static bool isLastOccurenceOfWeekDay(DateTime date) { - final currentDay = date.weekday; - - DateTime lastOccurenceInMonth = DateTime( - date.year, - date.month + 1, - 0, - ); - - // set the lastOccurenceInMonth to that day's last occurence - while (lastOccurenceInMonth.weekday != currentDay) { - lastOccurenceInMonth = DateTime( - lastOccurenceInMonth.year, - lastOccurenceInMonth.month, - lastOccurenceInMonth.day - 1, - ); - } - - return date.day == lastOccurenceInMonth.day; - } -} diff --git a/lib/constants/routing_constants.dart b/lib/constants/routing_constants.dart deleted file mode 100644 index 389607c6e..000000000 --- a/lib/constants/routing_constants.dart +++ /dev/null @@ -1,117 +0,0 @@ -///This file contains the routes. These can be used to make push screen call via Routes.splashScreen to access these string. - -class Routes { - /// static variables. - static const String demoPageViewRoute = "/demoPageViewRoute"; - - /// static variables. - static const String splashScreen = "/"; - - /// static variables. - static const String languageSelectionRoute = "/selectLang"; - - /// static variables. - static const String setUrlScreen = "/setUrl"; - - /// static variables. - static const String loginScreen = "/login"; - - /// static variables. - static const String selectOrgScreen = "/selectOrg"; - - /// static variables. - static const String signupDetailScreen = "/signupDetails"; - - /// static variables. - static const String waitingScreen = "/waiting"; - - /// static variables. - static const String recoverScreen = "/recover"; - - /// static variables. - static const String updateScreen = "/update"; - - /// static variables. - static const String homeScreen = "/homeScreen"; - - /// static variables. - static const String demoHomeScreen = "/demoHomeScreen"; - - /// static variables. - static const String mainScreen = "/mainScreen"; - - /// static variables. - static const String progressDialog = "/progress"; - - /// static variables. - static const String individualPost = "/individualPost"; - - /// static variables. - static const String pinnedPostPage = "/pinnedPostPage"; - - /// static variables. - static const String exploreEventsScreen = "/exploreEvents"; - - /// static variables. - static const String demoExploreEventsScreen = "/demoExploreEvents"; - - /// static variables. - static const String eventInfoPage = "/eventInfo"; - - /// static variables. - static const String createEventPage = "/createEventPage"; - - /// static variables. - static const String customRecurrencePage = "/customRecurrencePage"; - - /// static variables. - static const String profilePage = "/profilePage"; - - /// static variables. - static const String demoProfilePage = "/demoProfilePage"; - - /// static variables. - static const String editProfilePage = "/editProfilePage"; - - /// static variables. - static const String joinOrg = '/joinOrg'; - - /// static variables. - static const String requestAccess = '/requestAccess'; - - /// static variables. - static const String editEventPage = "/editEventPage"; - - /// static variables. - static const String appSettings = '/appSettingsPage'; - - /// static variables. - static const String chatMessageScreen = '/chatMessageScreen'; - - /// static variables. - static const String calendar = '/calendar'; - - /// static variables. - static const String eventTasks = '/event_tasks'; - - /// static variables. - static const String userTasks = '/user_tasks'; - - /// static variables. - static const String addTask = '/addTask'; - - /// static variables. - static const String editTask = '/editTask'; - - /// static variables. - static const String selectContact = '/selectContact'; - - /// static variable to access pinnedpostscreen. - static const String pinnedPostScreen = '/pinnedpostscreen'; - - /// static variable to access addPostScreen. - static const String addPostScreen = '/addpostscreen'; - - /// static variable to access org info screen. - static const String orgInfoScreen = '/OrganisationInfoScreen'; -} diff --git a/lib/constants/timeout.dart b/lib/constants/timeout.dart deleted file mode 100644 index 810a3c944..000000000 --- a/lib/constants/timeout.dart +++ /dev/null @@ -1,11 +0,0 @@ -/// Class to define constant timeout to bring consistency in the code. -class TimeOuts { - /// For small timeout, used for small data fetch. - static const small = 5; - - /// For medium timeout, used for medium data fetch. - static const mediums = 100; - - /// For large timeout, used for large data fetch. - static const large = 300; -} diff --git a/lib/custom_painters/language_icon.dart b/lib/custom_painters/language_icon.dart deleted file mode 100644 index dbc2d1d87..000000000 --- a/lib/custom_painters/language_icon.dart +++ /dev/null @@ -1,330 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; - -///This class draws the language icon using custom paint. -///CustomPaint is a widget from the Flutter SDK, which enables -/// you to use a canvas to draw different shapes. -class LanguageIcon extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.2376568, size.height * 0.4381250); - path_0.cubicTo( - size.width * 0.2321886, - size.height * 0.4003127, - size.width * 0.2254689, - size.height * 0.3343750, - size.width * 0.2254689, - size.height * 0.3343750, - ); - path_0.lineTo(size.width * 0.2246875, size.height * 0.3343750); - path_0.cubicTo( - size.width * 0.2246875, - size.height * 0.3343750, - size.width * 0.2179686, - size.height * 0.4003127, - size.width * 0.2125000, - size.height * 0.4381250, - ); - path_0.lineTo(size.width * 0.1951561, size.height * 0.5553136); - path_0.lineTo(size.width * 0.2546886, size.height * 0.5553136); - path_0.lineTo(size.width * 0.2376568, size.height * 0.4381250); - path_0.close(); - path_0.moveTo(size.width * 0.9625000, 0); - path_0.lineTo(size.width * 0.5250000, 0); - path_0.lineTo(size.width * 0.5250000, size.height); - path_0.lineTo(size.width * 0.9625000, size.height); - path_0.cubicTo( - size.width * 0.9832818, - size.height, - size.width, - size.height * 0.9665636, - size.width, - size.height * 0.9250000, - ); - path_0.lineTo(size.width, size.height * 0.07500000); - path_0.cubicTo( - size.width, - size.height * 0.03343750, - size.width * 0.9832818, - 0, - size.width * 0.9625000, - 0, - ); - path_0.close(); - path_0.moveTo(size.width * 0.9250000, size.height * 0.3750000); - path_0.cubicTo( - size.width * 0.9250000, - size.height * 0.3956250, - size.width * 0.9165636, - size.height * 0.4125000, - size.width * 0.9062500, - size.height * 0.4125000, - ); - path_0.lineTo(size.width * 0.8884364, size.height * 0.4125000); - path_0.cubicTo( - size.width * 0.8776568, - size.height * 0.4862500, - size.width * 0.8545318, - size.height * 0.5606227, - size.width * 0.8217182, - size.height * 0.6309364, - ); - path_0.cubicTo( - size.width * 0.8348432, - size.height * 0.6509364, - size.width * 0.8484364, - size.height * 0.6700000, - size.width * 0.8625000, - size.height * 0.6871864, - ); - path_0.cubicTo( - size.width * 0.8710932, - size.height * 0.6978136, - size.width * 0.8739068, - size.height * 0.7200000, - size.width * 0.8689068, - size.height * 0.7378136, - ); - path_0.lineTo(size.width * 0.8565636, size.height * 0.7812500); - path_0.cubicTo( - size.width * 0.8512500, - size.height * 0.7996864, - size.width * 0.8395318, - size.height * 0.8056227, - size.width * 0.8304682, - size.height * 0.7946864, - ); - path_0.cubicTo( - size.width * 0.8107818, - size.height * 0.7703136, - size.width * 0.7921886, - size.height * 0.7443727, - size.width * 0.7751568, - size.height * 0.7168727, - ); - path_0.cubicTo( - size.width * 0.7581250, - size.height * 0.7440636, - size.width * 0.7396886, - size.height * 0.7703136, - size.width * 0.7198432, - size.height * 0.7946864, - ); - path_0.cubicTo( - size.width * 0.7107818, - size.height * 0.8056227, - size.width * 0.6990636, - size.height * 0.7996864, - size.width * 0.6937500, - size.height * 0.7812500, - ); - path_0.lineTo(size.width * 0.6814068, size.height * 0.7378136); - path_0.cubicTo( - size.width * 0.6764068, - size.height * 0.7203136, - size.width * 0.6792182, - size.height * 0.6978136, - size.width * 0.6879682, - size.height * 0.6871864, - ); - path_0.cubicTo( - size.width * 0.7025000, - size.height * 0.6693727, - size.width * 0.7160932, - size.height * 0.6506273, - size.width * 0.7287500, - size.height * 0.6309364, - ); - path_0.cubicTo( - size.width * 0.7164068, - size.height * 0.6046864, - size.width * 0.7054682, - size.height * 0.5778136, - size.width * 0.6959386, - size.height * 0.5506273, - ); - path_0.cubicTo( - size.width * 0.6896886, - size.height * 0.5328136, - size.width * 0.6925000, - size.height * 0.5081273, - size.width * 0.7017182, - size.height * 0.4971864, - ); - path_0.lineTo(size.width * 0.7118750, size.height * 0.4850000); - path_0.lineTo(size.width * 0.7232818, size.height * 0.4715636); - path_0.cubicTo( - size.width * 0.7317182, - size.height * 0.4615636, - size.width * 0.7426568, - size.height * 0.4662500, - size.width * 0.7482818, - size.height * 0.4821864, - ); - path_0.cubicTo( - size.width * 0.7560932, - size.height * 0.5040636, - size.width * 0.7651568, - size.height * 0.5259364, - size.width * 0.7754682, - size.height * 0.5475000, - ); - path_0.cubicTo( - size.width * 0.7965614, - size.height * 0.5031273, - size.width * 0.8126568, - size.height * 0.4571864, - size.width * 0.8223432, - size.height * 0.4125000, - ); - path_0.lineTo(size.width * 0.6437500, size.height * 0.4125000); - path_0.cubicTo( - size.width * 0.6334386, - size.height * 0.4125000, - size.width * 0.6250000, - size.height * 0.3956250, - size.width * 0.6250000, - size.height * 0.3750000, - ); - path_0.lineTo(size.width * 0.6250000, size.height * 0.3250000); - path_0.cubicTo( - size.width * 0.6250000, - size.height * 0.3043750, - size.width * 0.6334386, - size.height * 0.2875000, - size.width * 0.6437500, - size.height * 0.2875000, - ); - path_0.lineTo(size.width * 0.7437500, size.height * 0.2875000); - path_0.lineTo(size.width * 0.7437500, size.height * 0.2375000); - path_0.cubicTo( - size.width * 0.7437500, - size.height * 0.2168750, - size.width * 0.7521886, - size.height * 0.2000000, - size.width * 0.7625000, - size.height * 0.2000000, - ); - path_0.lineTo(size.width * 0.7875000, size.height * 0.2000000); - path_0.cubicTo( - size.width * 0.7978136, - size.height * 0.2000000, - size.width * 0.8062500, - size.height * 0.2168750, - size.width * 0.8062500, - size.height * 0.2375000, - ); - path_0.lineTo(size.width * 0.8062500, size.height * 0.2875000); - path_0.lineTo(size.width * 0.9062500, size.height * 0.2875000); - path_0.cubicTo( - size.width * 0.9165636, - size.height * 0.2875000, - size.width * 0.9250000, - size.height * 0.3043750, - size.width * 0.9250000, - size.height * 0.3250000, - ); - path_0.lineTo(size.width * 0.9250000, size.height * 0.3750000); - path_0.close(); - path_0.moveTo(0, size.height * 0.07500000); - path_0.lineTo(0, size.height * 0.9250000); - path_0.cubicTo( - 0, - size.height * 0.9665636, - size.width * 0.01671875, - size.height, - size.width * 0.03750000, - size.height, - ); - path_0.lineTo(size.width * 0.4750000, size.height); - path_0.lineTo(size.width * 0.4750000, 0); - path_0.lineTo(size.width * 0.03750000, 0); - path_0.cubicTo( - size.width * 0.01671875, - 0, - 0, - size.height * 0.03343750, - 0, - size.height * 0.07500000, - ); - path_0.close(); - path_0.moveTo(size.width * 0.09203136, size.height * 0.7503136); - path_0.lineTo(size.width * 0.1818750, size.height * 0.2218750); - path_0.cubicTo( - size.width * 0.1845314, - size.height * 0.2065623, - size.width * 0.1915625, - size.height * 0.1965623, - size.width * 0.1996875, - size.height * 0.1965623, - ); - path_0.lineTo(size.width * 0.2504682, size.height * 0.1965623); - path_0.cubicTo( - size.width * 0.2584386, - size.height * 0.1965623, - size.width * 0.2656250, - size.height * 0.2068750, - size.width * 0.2682818, - size.height * 0.2218750, - ); - path_0.lineTo(size.width * 0.3581250, size.height * 0.7503136); - path_0.cubicTo( - size.width * 0.3621864, - size.height * 0.7746864, - size.width * 0.3532818, - size.height * 0.8000000, - size.width * 0.3403136, - size.height * 0.8000000, - ); - path_0.lineTo(size.width * 0.3045318, size.height * 0.8000000); - path_0.cubicTo( - size.width * 0.3004886, - size.height * 0.7999955, - size.width * 0.2965523, - size.height * 0.7973727, - size.width * 0.2933159, - size.height * 0.7925318, - ); - path_0.cubicTo( - size.width * 0.2900773, - size.height * 0.7876864, - size.width * 0.2877091, - size.height * 0.7808818, - size.width * 0.2865614, - size.height * 0.7731227, - ); - path_0.lineTo(size.width * 0.2718750, size.height * 0.6734364); - path_0.lineTo(size.width * 0.1778125, size.height * 0.6734364); - path_0.lineTo(size.width * 0.1635936, size.height * 0.7728136); - path_0.cubicTo( - size.width * 0.1612500, - size.height * 0.7887500, - size.width * 0.1539061, - size.height * 0.8000000, - size.width * 0.1456250, - size.height * 0.8000000, - ); - path_0.lineTo(size.width * 0.1098439, size.height * 0.8000000); - path_0.cubicTo( - size.width * 0.09703136, - size.height * 0.8000000, - size.width * 0.08796886, - size.height * 0.7746864, - size.width * 0.09203136, - size.height * 0.7503136, - ); - path_0.close(); - - final Paint paint0fill = Paint()..style = PaintingStyle.fill; - paint0fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_0, paint0fill); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; - } -} diff --git a/lib/custom_painters/talawa_logo.dart b/lib/custom_painters/talawa_logo.dart deleted file mode 100644 index f10f32b7e..000000000 --- a/lib/custom_painters/talawa_logo.dart +++ /dev/null @@ -1,433 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; - -///This class draws the app logo using custom paint. -///CustomPaint is a widget from the Flutter SDK, which enables -/// you to use a canvas to draw different shapes. -class AppLogo extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.6581984, size.height * 0.6200040); - path_0.cubicTo( - size.width * 0.6951984, - size.height * 0.6792024, - size.width * 0.7321984, - size.height * 0.7386032, - size.width * 0.7695992, - size.height * 0.7978016, - ); - path_0.cubicTo( - size.width * 0.7737976, - size.height * 0.8044008, - size.width * 0.7730000, - size.height * 0.8070040, - size.width * 0.7664008, - size.height * 0.8112024, - ); - path_0.cubicTo( - size.width * 0.7314008, - size.height * 0.8330040, - size.width * 0.6964008, - size.height * 0.8552024, - size.width * 0.6617976, - size.height * 0.8776032, - ); - path_0.cubicTo( - size.width * 0.6560000, - size.height * 0.8814008, - size.width * 0.6534008, - size.height * 0.8820040, - size.width * 0.6491984, - size.height * 0.8750040, - ); - path_0.cubicTo( - size.width * 0.5995992, - size.height * 0.7930040, - size.width * 0.5495992, - size.height * 0.7112024, - size.width * 0.4997976, - size.height * 0.6292024, - ); - path_0.cubicTo( - size.width * 0.4941984, - size.height * 0.6198016, - size.width * 0.4940000, - size.height * 0.6200040, - size.width * 0.4884008, - size.height * 0.6292024, - ); - path_0.cubicTo( - size.width * 0.4380000, - size.height * 0.7114008, - size.width * 0.3873992, - size.height * 0.7938016, - size.width * 0.3371992, - size.height * 0.8762024, - ); - path_0.cubicTo( - size.width * 0.3337992, - size.height * 0.8818016, - size.width * 0.3317992, - size.height * 0.8816032, - size.width * 0.3267992, - size.height * 0.8784008, - ); - path_0.cubicTo( - size.width * 0.2913992, - size.height * 0.8558016, - size.width * 0.2559992, - size.height * 0.8334008, - size.width * 0.2203992, - size.height * 0.8112024, - ); - path_0.cubicTo( - size.width * 0.2165992, - size.height * 0.8088016, - size.width * 0.2131992, - size.height * 0.8076032, - size.width * 0.2167992, - size.height * 0.8018016, - ); - path_0.cubicTo( - size.width * 0.2547992, - size.height * 0.7420040, - size.width * 0.2923992, - size.height * 0.6818016, - size.width * 0.3301992, - size.height * 0.6218016, - ); - path_0.cubicTo( - size.width * 0.3575992, - size.height * 0.5766032, - size.width * 0.3853992, - size.height * 0.5320040, - size.width * 0.4130000, - size.height * 0.4870040, - ); - path_0.cubicTo( - size.width * 0.4191984, - size.height * 0.4768016, - size.width * 0.4255992, - size.height * 0.4666032, - size.width * 0.4317976, - size.height * 0.4564008, - ); - path_0.cubicTo( - size.width * 0.4347976, - size.height * 0.4516032, - size.width * 0.4377976, - size.height * 0.4468016, - size.width * 0.4441984, - size.height * 0.4458016, - ); - path_0.cubicTo( - size.width * 0.4541984, - size.height * 0.4452024, - size.width * 0.4640000, - size.height * 0.4472024, - size.width * 0.4740000, - size.height * 0.4474008, - ); - path_0.cubicTo( - size.width * 0.4960000, - size.height * 0.4482024, - size.width * 0.5167976, - size.height * 0.4438016, - size.width * 0.5377976, - size.height * 0.4382024, - ); - path_0.cubicTo( - size.width * 0.5435992, - size.height * 0.4374008, - size.width * 0.5470000, - size.height * 0.4408016, - size.width * 0.5497976, - size.height * 0.4454008, - ); - path_0.cubicTo( - size.width * 0.5830000, - size.height * 0.5002024, - size.width * 0.6170000, - size.height * 0.5546032, - size.width * 0.6497976, - size.height * 0.6096032, - ); - path_0.cubicTo( - size.width * 0.6517976, - size.height * 0.6136032, - size.width * 0.6544008, - size.height * 0.6172024, - size.width * 0.6581984, - size.height * 0.6200040, - ); - path_0.close(); - - final Paint paint0fill = Paint()..style = PaintingStyle.fill; - paint0fill.color = const Color(0xff31BB6B).withOpacity(1.0); - canvas.drawPath(path_0, paint0fill); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.5405992, size.height * 0.4396032); - path_1.cubicTo( - size.width * 0.5084008, - size.height * 0.4512024, - size.width * 0.4754008, - size.height * 0.4532024, - size.width * 0.4418016, - size.height * 0.4472024, - ); - path_1.cubicTo( - size.width * 0.4292024, - size.height * 0.4490000, - size.width * 0.4184008, - size.height * 0.4428016, - size.width * 0.4078016, - size.height * 0.4382024, - ); - path_1.cubicTo( - size.width * 0.3772004, - size.height * 0.4248016, - size.width * 0.3516004, - size.height * 0.4048016, - size.width * 0.3326004, - size.height * 0.3768020, - ); - path_1.cubicTo( - size.width * 0.3302004, - size.height * 0.3732020, - size.width * 0.3276004, - size.height * 0.3696020, - size.width * 0.3278004, - size.height * 0.3650020, - ); - path_1.cubicTo( - size.width * 0.3124004, - size.height * 0.3368020, - size.width * 0.3032004, - size.height * 0.3070020, - size.width * 0.3040004, - size.height * 0.2746020, - ); - path_1.cubicTo( - size.width * 0.3056004, - size.height * 0.2126020, - size.width * 0.3322004, - size.height * 0.1636020, - size.width * 0.3842004, - size.height * 0.1300020, - ); - path_1.cubicTo( - size.width * 0.4872024, - size.height * 0.06320198, - size.width * 0.6244008, - size.height * 0.1212020, - size.width * 0.6494008, - size.height * 0.2418020, - ); - path_1.cubicTo( - size.width * 0.6554008, - size.height * 0.2704020, - size.width * 0.6535992, - size.height * 0.2994020, - size.width * 0.6452024, - size.height * 0.3276020, - ); - path_1.cubicTo( - size.width * 0.6444008, - size.height * 0.3302020, - size.width * 0.6440000, - size.height * 0.3328020, - size.width * 0.6434008, - size.height * 0.3354020, - ); - path_1.cubicTo( - size.width * 0.6380000, - size.height * 0.3574020, - size.width * 0.6260000, - size.height * 0.3756020, - size.width * 0.6118016, - size.height * 0.3924020, - ); - path_1.cubicTo( - size.width * 0.5960000, - size.height * 0.4108016, - size.width * 0.5770000, - size.height * 0.4252024, - size.width * 0.5548016, - size.height * 0.4354008, - ); - path_1.cubicTo( - size.width * 0.5500000, - size.height * 0.4376032, - size.width * 0.5455992, - size.height * 0.4394008, - size.width * 0.5405992, - size.height * 0.4396032, - ); - path_1.close(); - - final Paint paint1fill = Paint()..style = PaintingStyle.fill; - paint1fill.color = const Color(0xffFEBC59).withOpacity(1.0); - canvas.drawPath(path_1, paint1fill); - - final Path path_2 = Path(); - path_2.moveTo(size.width * 0.5405992, size.height * 0.4395992); - path_2.cubicTo( - size.width * 0.5880000, - size.height * 0.4200000, - size.width * 0.6224008, - size.height * 0.3870008, - size.width * 0.6410000, - size.height * 0.3386008, - ); - path_2.cubicTo( - size.width * 0.6414008, - size.height * 0.3374008, - size.width * 0.6425992, - size.height * 0.3364008, - size.width * 0.6434008, - size.height * 0.3354008, - ); - path_2.cubicTo( - size.width * 0.6850000, - size.height * 0.4020000, - size.width * 0.7265992, - size.height * 0.4688016, - size.width * 0.7685992, - size.height * 0.5352024, - ); - path_2.cubicTo( - size.width * 0.7742024, - size.height * 0.5440000, - size.width * 0.7724008, - size.height * 0.5470000, - size.width * 0.7642024, - size.height * 0.5520000, - ); - path_2.cubicTo( - size.width * 0.7285992, - size.height * 0.5740000, - size.width * 0.6924008, - size.height * 0.5954008, - size.width * 0.6584008, - size.height * 0.6200000, - ); - path_2.cubicTo( - size.width * 0.6535992, - size.height * 0.6225992, - size.width * 0.6520000, - size.height * 0.6190000, - size.width * 0.6502024, - size.height * 0.6158016, - ); - path_2.cubicTo( - size.width * 0.6158016, - size.height * 0.5590000, - size.width * 0.5814008, - size.height * 0.5022024, - size.width * 0.5470000, - size.height * 0.4455992, - ); - path_2.cubicTo( - size.width * 0.5452024, - size.height * 0.4430000, - size.width * 0.5440000, - size.height * 0.4402024, - size.width * 0.5405992, - size.height * 0.4395992, - ); - path_2.close(); - - final Paint paint2fill = Paint()..style = PaintingStyle.fill; - paint2fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_2, paint2fill); - - final Path path_3 = Path(); - path_3.moveTo(size.width * 0.3277992, size.height * 0.3651976); - path_3.cubicTo( - size.width * 0.3541992, - size.height * 0.4085992, - size.width * 0.3929992, - size.height * 0.4351984, - size.width * 0.4417976, - size.height * 0.4471984, - ); - path_3.cubicTo( - size.width * 0.4287976, - size.height * 0.4623968, - size.width * 0.4197976, - size.height * 0.4803968, - size.width * 0.4094008, - size.height * 0.4973968, - ); - path_3.cubicTo( - size.width * 0.3847992, - size.height * 0.5373968, - size.width * 0.3591992, - size.height * 0.5765992, - size.width * 0.3361992, - size.height * 0.6173968, - ); - path_3.cubicTo( - size.width * 0.3347992, - size.height * 0.6197976, - size.width * 0.3333992, - size.height * 0.6219960, - size.width * 0.3301992, - size.height * 0.6215992, - ); - path_3.cubicTo( - size.width * 0.3235992, - size.height * 0.6143968, - size.width * 0.3149992, - size.height * 0.6097976, - size.width * 0.3069992, - size.height * 0.6045992, - ); - path_3.cubicTo( - size.width * 0.2783992, - size.height * 0.5863968, - size.width * 0.2493992, - size.height * 0.5685992, - size.width * 0.2205992, - size.height * 0.5507976, - ); - path_3.cubicTo( - size.width * 0.2163992, - size.height * 0.5481984, - size.width * 0.2131992, - size.height * 0.5465992, - size.width * 0.2169992, - size.height * 0.5403968, - ); - path_3.cubicTo( - size.width * 0.2535992, - size.height * 0.4825992, - size.width * 0.2899992, - size.height * 0.4243968, - size.width * 0.3263992, - size.height * 0.3663976, - ); - path_3.cubicTo( - size.width * 0.3265992, - size.height * 0.3659976, - size.width * 0.3271992, - size.height * 0.3655976, - size.width * 0.3277992, - size.height * 0.3651976, - ); - path_3.close(); - - final Paint paint3fill = Paint()..style = PaintingStyle.fill; - paint3fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_3, paint3fill); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; - } -} diff --git a/lib/custom_painters/telegram_logo.dart b/lib/custom_painters/telegram_logo.dart deleted file mode 100644 index 7519d7bb4..000000000 --- a/lib/custom_painters/telegram_logo.dart +++ /dev/null @@ -1,123 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:ui' as ui; - -import 'package:flutter/material.dart'; - -///This class draws the telegram logo using custom paint. -///CustomPaint is a widget from the Flutter SDK, which enables -/// you to use a canvas to draw different shapes. - -//Copy this CustomPainter code to the Bottom of the File -class TelegramLogo extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - final Paint paint0Fill = Paint()..style = PaintingStyle.fill; - paint0Fill.shader = ui.Gradient.linear( - Offset(size.width * 0.6670000, size.height * 0.1670000), - Offset(size.width * 0.4170000, size.height * 0.7500000), [ - const Color(0xff37aee2).withOpacity(1), - const Color(0xff1e96c8).withOpacity(1), - ], [ - 0, - 1, - ]); - canvas.drawCircle( - Offset(size.width * 0.5000000, size.height * 0.5000000), - size.width * 0.5000000, - paint0Fill, - ); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.4083333, size.height * 0.7291667); - path_1.cubicTo( - size.width * 0.3921333, - size.height * 0.7291667, - size.width * 0.3948875, - size.height * 0.7230500, - size.width * 0.3893000, - size.height * 0.7076250, - ); - path_1.lineTo(size.width * 0.3416667, size.height * 0.5508625); - path_1.lineTo(size.width * 0.7083333, size.height * 0.3333333); - - final Paint paint1Fill = Paint()..style = PaintingStyle.fill; - paint1Fill.color = const Color(0xffc8daea).withOpacity(1.0); - canvas.drawPath(path_1, paint1Fill); - - final Path path_2 = Path(); - path_2.moveTo(size.width * 0.4083333, size.height * 0.7291667); - path_2.cubicTo( - size.width * 0.4208333, - size.height * 0.7291667, - size.width * 0.4263542, - size.height * 0.7234500, - size.width * 0.4333333, - size.height * 0.7166667, - ); - path_2.lineTo(size.width * 0.5000000, size.height * 0.6518417); - path_2.lineTo(size.width * 0.4168417, size.height * 0.6016958); - - final Paint paint2Fill = Paint()..style = PaintingStyle.fill; - paint2Fill.color = const Color(0xffa9c9dd).withOpacity(1.0); - canvas.drawPath(path_2, paint2Fill); - - final Path path_3 = Path(); - path_3.moveTo(size.width * 0.4168333, size.height * 0.6017083); - path_3.lineTo(size.width * 0.6183333, size.height * 0.7505792); - path_3.cubicTo( - size.width * 0.6413292, - size.height * 0.7632667, - size.width * 0.6579208, - size.height * 0.7566958, - size.width * 0.6636500, - size.height * 0.7292333, - ); - path_3.lineTo(size.width * 0.7456708, size.height * 0.3427208); - path_3.cubicTo( - size.width * 0.7540667, - size.height * 0.3090542, - size.width * 0.7328375, - size.height * 0.2937792, - size.width * 0.7108375, - size.height * 0.3037667, - ); - path_3.lineTo(size.width * 0.2292125, size.height * 0.4894792); - path_3.cubicTo( - size.width * 0.1963375, - size.height * 0.5026667, - size.width * 0.1965333, - size.height * 0.5210083, - size.width * 0.2232208, - size.height * 0.5291792, - ); - path_3.lineTo(size.width * 0.3468167, size.height * 0.5677583); - path_3.lineTo(size.width * 0.6329542, size.height * 0.3872375); - path_3.cubicTo( - size.width * 0.6464625, - size.height * 0.3790458, - size.width * 0.6588625, - size.height * 0.3834458, - size.width * 0.6486875, - size.height * 0.3924792, - ); - - final Paint paint3Fill = Paint()..style = PaintingStyle.fill; - paint3Fill.shader = ui.Gradient.linear( - Offset(size.width * 0.6600000, size.height * 0.4370000), - Offset(size.width * 0.8510000, size.height * 0.8020000), [ - const Color(0xffeff7fc).withOpacity(1), - const Color(0xffffffff).withOpacity(1), - ], [ - 0, - 1, - ]); - canvas.drawPath(path_3, paint3Fill); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; - } -} diff --git a/lib/custom_painters/whatsapp_logo.dart b/lib/custom_painters/whatsapp_logo.dart deleted file mode 100644 index fb150dd35..000000000 --- a/lib/custom_painters/whatsapp_logo.dart +++ /dev/null @@ -1,433 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; - -///This class draws the whatsapp logo using custom paint. -///CustomPaint is a widget from the Flutter SDK, which enables -/// you to use a canvas to draw different shapes. -class WhatsappLogo extends CustomPainter { - @override - void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.3580000, size.height * 0.1673307); - path_0.cubicTo( - size.width * 0.4170000, - size.height * 0.1406375, - size.width * 0.4836000, - size.height * 0.1314741, - size.width * 0.5480000, - size.height * 0.1400398, - ); - path_0.cubicTo( - size.width * 0.6134000, - size.height * 0.1486056, - size.width * 0.6760000, - size.height * 0.1764940, - size.width * 0.7260000, - size.height * 0.2193227, - ); - path_0.cubicTo( - size.width * 0.7740000, - size.height * 0.2595618, - size.width * 0.8106000, - size.height * 0.3129482, - size.width * 0.8308000, - size.height * 0.3719124, - ); - path_0.cubicTo( - size.width * 0.8540000, - size.height * 0.4390438, - size.width * 0.8558000, - size.height * 0.5133466, - size.width * 0.8360000, - size.height * 0.5810757, - ); - path_0.arcToPoint( - Offset(size.width * 0.7034000, size.height * 0.7677291), - radius: - Radius.elliptical(size.width * 0.3520000, size.height * 0.3505976), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_0.arcToPoint( - Offset(size.width * 0.5662000, size.height * 0.8264940), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_0.cubicTo( - size.width * 0.4822000, - size.height * 0.8424303, - size.width * 0.3930000, - size.height * 0.8268924, - size.width * 0.3202000, - size.height * 0.7826693, - ); - path_0.cubicTo( - size.width * 0.3156000, - size.height * 0.7806773, - size.width * 0.3112000, - size.height * 0.7756972, - size.width * 0.3058000, - size.height * 0.7778884, - ); - path_0.lineTo(size.width * 0.1780000, size.height * 0.8107570); - path_0.lineTo(size.width * 0.2120000, size.height * 0.6864542); - path_0.cubicTo( - size.width * 0.2140000, - size.height * 0.6820717, - size.width * 0.2100000, - size.height * 0.6784861, - size.width * 0.2080000, - size.height * 0.6745020, - ); - path_0.cubicTo( - size.width * 0.1694000, - size.height * 0.6159363, - size.width * 0.1494000, - size.height * 0.5454183, - size.width * 0.1514000, - size.height * 0.4752988, - ); - path_0.cubicTo( - size.width * 0.1534000, - size.height * 0.3318725, - size.width * 0.2454000, - size.height * 0.2183267, - size.width * 0.3574000, - size.height * 0.1665339, - ); - - final Paint paint0Fill = Paint()..style = PaintingStyle.fill; - paint0Fill.color = const Color(0xff40c351).withOpacity(1.0); - canvas.drawPath(path_0, paint0Fill); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.3760000, size.height * 0.2908367); - path_1.cubicTo( - size.width * 0.3854000, - size.height * 0.2910359, - size.width * 0.3916000, - size.height * 0.2994024, - size.width * 0.3952000, - size.height * 0.3067729, - ); - path_1.cubicTo( - size.width * 0.4072000, - size.height * 0.3326693, - size.width * 0.4168000, - size.height * 0.3593625, - size.width * 0.4282000, - size.height * 0.3854582, - ); - path_1.cubicTo( - size.width * 0.4306000, - size.height * 0.3908367, - size.width * 0.4322000, - size.height * 0.3968127, - size.width * 0.4302000, - size.height * 0.4025896, - ); - path_1.cubicTo( - size.width * 0.4242000, - size.height * 0.4195219, - size.width * 0.4102000, - size.height * 0.4316733, - size.width * 0.3990000, - size.height * 0.4452191, - ); - path_1.cubicTo( - size.width * 0.3950000, - size.height * 0.4498008, - size.width * 0.3954000, - size.height * 0.4563745, - size.width * 0.3986000, - size.height * 0.4611554, - ); - path_1.arcToPoint( - Offset(size.width * 0.5456000, size.height * 0.5876494), - radius: - Radius.elliptical(size.width * 0.2600000, size.height * 0.2589641), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.5516000, - size.height * 0.5902390, - size.width * 0.5588000, - size.height * 0.5896414, - size.width * 0.5630000, - size.height * 0.5844622, - ); - path_1.arcToPoint( - Offset(size.width * 0.5970000, size.height * 0.5428287), - radius: - Radius.elliptical(size.width * 0.5640000, size.height * 0.5617530), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.6062000, - size.height * 0.5308765, - size.width * 0.6142000, - size.height * 0.5342629, - size.width * 0.6262000, - size.height * 0.5392430, - ); - path_1.lineTo(size.width * 0.7030000, size.height * 0.5760956); - path_1.cubicTo( - size.width * 0.7090000, - size.height * 0.5786853, - size.width * 0.7150000, - size.height * 0.5830677, - size.width * 0.7144000, - size.height * 0.5900398, - ); - path_1.cubicTo( - size.width * 0.7184000, - size.height * 0.6418327, - size.width * 0.6718000, - size.height * 0.6820717, - size.width * 0.6230000, - size.height * 0.6836653, - ); - path_1.cubicTo( - size.width * 0.4970000, - size.height * 0.6745020, - size.width * 0.4110000, - size.height * 0.6047809, - size.width * 0.3490000, - size.height * 0.5243028, - ); - path_1.cubicTo( - size.width * 0.3286000, - size.height * 0.4960159, - size.width * 0.3070000, - size.height * 0.4675299, - size.width * 0.2958000, - size.height * 0.4338645, - ); - path_1.cubicTo( - size.width * 0.2852000, - size.height * 0.4043825, - size.width * 0.2848000, - size.height * 0.3707171, - size.width * 0.2974000, - size.height * 0.3416335, - ); - path_1.cubicTo( - size.width * 0.3168000, - size.height * 0.3027888, - size.width * 0.3338000, - size.height * 0.2878486, - size.width * 0.3766000, - size.height * 0.2902390, - ); - path_1.close(); - path_1.moveTo(size.width * 0.2580000, size.height * 0.1422311); - path_1.cubicTo( - size.width * 0.3504000, - size.height * 0.07649402, - size.width * 0.4700000, - size.height * 0.05139442, - size.width * 0.5820000, - size.height * 0.07370518, - ); - path_1.arcToPoint( - Offset(size.width * 0.7774000, size.height * 0.1699203), - radius: - Radius.elliptical(size.width * 0.4180000, size.height * 0.4163347), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.9178000, size.height * 0.4368526), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.8918000, size.height * 0.6380478), - radius: - Radius.elliptical(size.width * 0.4220000, size.height * 0.4203187), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.cubicTo( - size.width * 0.8622000, - size.height * 0.7137450, - size.width * 0.8098000, - size.height * 0.7802789, - size.width * 0.7434000, - size.height * 0.8272908, - ); - path_1.arcToPoint( - Offset(size.width * 0.5254000, size.height * 0.9039841), - radius: - Radius.elliptical(size.width * 0.4180000, size.height * 0.4163347), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.2994000, size.height * 0.8541833), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.lineTo(size.width * 0.07540000, size.height * 0.9119522); - path_1.lineTo(size.width * 0.1344000, size.height * 0.6968127); - path_1.cubicTo( - size.width * 0.1356000, - size.height * 0.6942231, - size.width * 0.1338000, - size.height * 0.6920319, - size.width * 0.1324000, - size.height * 0.6900398, - ); - path_1.arcToPoint( - Offset(size.width * 0.08240000, size.height * 0.4310757), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.2574000, size.height * 0.1422311), - radius: - Radius.elliptical(size.width * 0.4260000, size.height * 0.4243028), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.moveTo(size.width * 0.3568000, size.height * 0.1673307); - path_1.cubicTo( - size.width * 0.2898000, - size.height * 0.1972112, - size.width * 0.2328000, - size.height * 0.2486056, - size.width * 0.1964000, - size.height * 0.3121514, - ); - path_1.cubicTo( - size.width * 0.1676000, - size.height * 0.3619522, - size.width * 0.1516000, - size.height * 0.4187251, - size.width * 0.1504000, - size.height * 0.4760956, - ); - path_1.cubicTo( - size.width * 0.1484000, - size.height * 0.5462151, - size.width * 0.1684000, - size.height * 0.6165339, - size.width * 0.2070000, - size.height * 0.6752988, - ); - path_1.cubicTo( - size.width * 0.2090000, - size.height * 0.6788845, - size.width * 0.2126000, - size.height * 0.6826693, - size.width * 0.2110000, - size.height * 0.6872510, - ); - path_1.lineTo(size.width * 0.1770000, size.height * 0.8115538); - path_1.cubicTo( - size.width * 0.2196000, - size.height * 0.8007968, - size.width * 0.2622000, - size.height * 0.7892430, - size.width * 0.3050000, - size.height * 0.7784861, - ); - path_1.cubicTo( - size.width * 0.3104000, - size.height * 0.7764940, - size.width * 0.3150000, - size.height * 0.7808765, - size.width * 0.3194000, - size.height * 0.7832669, - ); - path_1.arcToPoint( - Offset(size.width * 0.5654000, size.height * 0.8272908), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.7026000, size.height * 0.7685259), - radius: - Radius.elliptical(size.width * 0.3460000, size.height * 0.3446215), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.8352000, size.height * 0.5818725), - radius: - Radius.elliptical(size.width * 0.3520000, size.height * 0.3505976), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.8300000, size.height * 0.3727092), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.7252000, size.height * 0.2201195), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.5470000, size.height * 0.1408367), - radius: - Radius.elliptical(size.width * 0.3480000, size.height * 0.3466135), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.4830000, - size.height * 0.1322709, - size.width * 0.4162000, - size.height * 0.1414343, - size.width * 0.3570000, - size.height * 0.1681275, - ); - path_1.close(); - - final Paint paint1fill = Paint()..style = PaintingStyle.fill; - paint1fill.color = const Color(0xfffcfcfc).withOpacity(1.0); - canvas.drawPath(path_1, paint1fill); - } - - @override - bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; - } -} diff --git a/lib/demo_server_data/direct_chat_demo_data.dart b/lib/demo_server_data/direct_chat_demo_data.dart deleted file mode 100644 index 7bd545d36..000000000 --- a/lib/demo_server_data/direct_chat_demo_data.dart +++ /dev/null @@ -1,167 +0,0 @@ -/// This file contains demo data. -/// -/// It contains a list of type Map and sample data of chats. -const directChatDemoData = [ - { - "sender": { - "name": "Sender 1", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Last message from the sender.", - "bool": "True", - }, - "unreadCount": 6, - }, - { - "sender": { - "name": "Sender 2", - "id": "sadiufghbasdqwuibnnads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Last message from the sender.", - "bool": "True", - }, - "unreadCount": 6, - }, - { - "sender": { - "name": "Sender 8", - "id": "sadiusfgafghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 7", - "id": "sasdasddiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 6", - "id": "sadiufghbassadasddqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 5", - "id": "sadiufghbasdqwsaduibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender 5", - "id": "sadiufghbasdqwdfdibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 4", - "id": "sadiufghbsdasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 41", - "id": "sadiufghbadgsdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 1, - }, - { - "sender": { - "name": "Sender 13", - "id": "sadiufghbadsfsdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url", - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True", - }, - "unreadCount": 8, - }, -]; diff --git a/lib/demo_server_data/events_demo_data.dart b/lib/demo_server_data/events_demo_data.dart deleted file mode 100644 index 9d22b4ef9..000000000 --- a/lib/demo_server_data/events_demo_data.dart +++ /dev/null @@ -1,223 +0,0 @@ -/// 'eventsDemoData' is a list of events that are used to display the events in the app. -/// -/// Each event has the following properties: -/// - title: The title of the event. -/// - description: The description of the event. -/// - location: The location of the event. -/// - recurring: Whether the event is recurring or not. -/// - allDay: Whether the event is an all-day event or not. -/// - startDate: The start date of the event. -/// - endDate: The end date of the event. -/// - startTime: The start time of the event. -/// - endTime: The end time of the event. -/// - recurrence: The recurrence of the event. -/// - isPublic: Whether the event is public or not. -/// - isSubscribed: Whether the user is subscribed to the event or not. -/// - isRegisterable: Whether the event is registerable or not. -/// - creator: The creator of the event. -/// - attendees: The attendees of the event. -/// - admins: The admins of the event. -/// - organization: The organization of the event. - -const eventsDemoData = [ - { - "title": "Calculus", - "description": - "This course introduces calculus using analytic geometry functions. Topics include limits and continuity, derivatives, optimization, related rates, graphing and other applications of derivatives, definite and indefinite integrals, and numerical integration.", - "location": "Lostilos", - "recurring": "false", - "allDay": "true", - "startDate": "1 Aug", - "endDate": "15 Aug", - "startTime": "11am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "false", - "isRegisterable": "true", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd", - }, - "attendees": [ - {"id": "attendee1", "firstName": "firstName1", "lastName": "lastName1"}, - {"id": "attendee2", "firstName": "firstName2", "lastName": "lastName2"}, - {"id": "attendee3", "firstName": "firstName3", "lastName": "lastName3"}, - {"id": "attendee4", "firstName": "firstName4", "lastName": "lastName4"}, - {"id": "attendee5", "firstName": "firstName5", "lastName": "lastName5"}, - {"id": "attendee6", "firstName": "firstName6", "lastName": "lastName6"}, - {"id": "attendee7", "firstName": "firstName7", "lastName": "lastName7"}, - {"id": "attendee8", "firstName": "firstName8", "lastName": "lastName8"}, - {"id": "attendee9", "firstName": "firstName9", "lastName": "lastName9"}, - { - "id": "attendee10", - "firstName": "firstName10", - "lastName": "lastName10", - }, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "name": 'Mathematicians', - "image": ' ', - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd", - }, - }, - }, - { - "title": "UI/UX", - "description": - "UX design refers to the term “user experience design”, while UI stands for “user interface design”. Both elements are crucial to a product and work closely together.", - "location": "Tokyo, Japan", - "recurring": "false", - "allDay": "true", - "startDate": "5 May", - "endDate": "13 May", - "startTime": "2am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "true", - "isRegisterable": "true", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd", - }, - "attendees": [ - {"id": "attendee1", "firstName": "firstName1", "lastName": "lastName1"}, - {"id": "attendee2", "firstName": "firstName2", "lastName": "lastName2"}, - {"id": "attendee3", "firstName": "firstName3", "lastName": "lastName3"}, - {"id": "attendee4", "firstName": "firstName4", "lastName": "lastName4"}, - {"id": "attendee5", "firstName": "firstName5", "lastName": "lastName5"}, - {"id": "attendee6", "firstName": "firstName6", "lastName": "lastName6"}, - {"id": "attendee7", "firstName": "firstName7", "lastName": "lastName7"}, - {"id": "attendee8", "firstName": "firstName8", "lastName": "lastName8"}, - {"id": "attendee9", "firstName": "firstName9", "lastName": "lastName9"}, - { - "id": "attendee10", - "firstName": "firstName10", - "lastName": "lastName10", - }, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "name": 'Courses', - "image": ' ', - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd", - }, - }, - }, - { - "title": "System Design", - "description": - "Systems design is the process of defining the architecture, product design, modules, interfaces, and data for a system to satisfy specified requirements. Systems design could be seen as the application of systems theory to product development.", - "location": "Shimla, India", - "recurring": "false", - "allDay": "true", - "startDate": "15 Dec", - "endDate": "18 Aug", - "startTime": "8am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "false", - "isSubscribed": "false", - "isRegisterable": "true", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd", - }, - "attendees": [ - {"id": "attendee1", "firstName": "firstName1", "lastName": "lastName1"}, - {"id": "attendee2", "firstName": "firstName2", "lastName": "lastName2"}, - {"id": "attendee3", "firstName": "firstName3", "lastName": "lastName3"}, - {"id": "attendee4", "firstName": "firstName4", "lastName": "lastName4"}, - {"id": "attendee5", "firstName": "firstName5", "lastName": "lastName5"}, - {"id": "attendee6", "firstName": "firstName6", "lastName": "lastName6"}, - {"id": "attendee7", "firstName": "firstName7", "lastName": "lastName7"}, - {"id": "attendee8", "firstName": "firstName8", "lastName": "lastName8"}, - {"id": "attendee9", "firstName": "firstName9", "lastName": "lastName9"}, - { - "id": "attendee10", - "firstName": "firstName10", - "lastName": "lastName10", - }, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "image": ' ', - "name": 'Computer Science', - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd", - }, - }, - }, - { - "title": "Gaming", - "description": - "Cyberpunk 2077 is a 2020 action role-playing v_ideo game developed and published by CD Projekt. The story takes place in Night City, an open world set in the Cyberpunk universe.", - "location": "Nagpur, India", - "recurring": "false", - "allDay": "true", - "startDate": "1 Aug", - "endDate": "15 Aug", - "startTime": "11am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "true", - "isRegisterable": "true", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd", - }, - "attendees": [ - {"id": "attendee1", "firstName": "firstName1", "lastName": "lastName1"}, - {"id": "attendee2", "firstName": "firstName2", "lastName": "lastName2"}, - {"id": "attendee3", "firstName": "firstName3", "lastName": "lastName3"}, - {"id": "attendee4", "firstName": "firstName4", "lastName": "lastName4"}, - {"id": "attendee5", "firstName": "firstName5", "lastName": "lastName5"}, - {"id": "attendee6", "firstName": "firstName6", "lastName": "lastName6"}, - {"id": "attendee7", "firstName": "firstName7", "lastName": "lastName7"}, - {"id": "attendee8", "firstName": "firstName8", "lastName": "lastName8"}, - {"id": "attendee9", "firstName": "firstName9", "lastName": "lastName9"}, - { - "id": "attendee10", - "firstName": "firstName10", - "lastName": "lastName10", - }, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "image": ' ', - "name": 'Cyclone', - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd", - }, - }, - } -]; diff --git a/lib/demo_server_data/pinned_post_demo_data.dart b/lib/demo_server_data/pinned_post_demo_data.dart deleted file mode 100644 index fad34c4b6..000000000 --- a/lib/demo_server_data/pinned_post_demo_data.dart +++ /dev/null @@ -1,160 +0,0 @@ -///This file contains demo data for pinned posts. It contains a list of type Map and sample data. - -const pinnedPostsDemoData = [ - { - "_id": "1", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"}, - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "2", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Ranchhod Das", - "lastName": "Chanchad", - "id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"}, - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "3", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"}, - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "4", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"}, - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - ], - }, -]; diff --git a/lib/demo_server_data/post_demo_data.dart b/lib/demo_server_data/post_demo_data.dart deleted file mode 100644 index adf832ec6..000000000 --- a/lib/demo_server_data/post_demo_data.dart +++ /dev/null @@ -1,183 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -///This file contains demo data for posts. It contains a list of type Map -/// and sample data of posts. -const postsDemoData = [ - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"}, - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "5", "_id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Ranchhod Das Chhanchad", - "lastName": "Chandla", - "_id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"}, - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"}, - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - ], - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shengde", - "_id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"}, - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"}, - }, - ], - }, -]; diff --git a/lib/enums/enums.dart b/lib/enums/enums.dart deleted file mode 100644 index f2bb7274e..000000000 --- a/lib/enums/enums.dart +++ /dev/null @@ -1,71 +0,0 @@ -/// Represents the state of the view. -enum ViewState { - /// The view is not doing anything. - idle, - - /// The view is loading something. - busy, -} - -/// Represents the state of the chat. -enum ChatState { - /// The chat is at initial state. - initial, - - /// The chat is loading something. - loading, - - /// The chat state is complete. - complete -} - -/// Represents the type of the tile. -enum TileType { - /// Represents the tile of the user. - user, - - /// Represents the tile of the attendee. - attendee, - - /// Represents the tile of the organization. - org, - - /// Represents the tile of the option. - option -} - -/// Represents the type of the Message. -enum MessageType { - /// Represents error message. - error, - - /// Represents warning message. - warning, - - /// Represents info message. - info, - - /// Represents random message. - random -} - -/// Represents the type of CallFor. -enum CallFor { - /// Represents the call for login. - login, - - /// Represents the call for signup. - signup, - - /// Represents the call for joining Public organization. - joinPublicOrg -} - -/// Represents the type of ModalSheet. -enum ModalSheet { - /// Represents the modal sheet for donation. - donation, - - /// Represents the modal sheet for invite. - invite -} diff --git a/lib/locator.dart b/lib/locator.dart deleted file mode 100644 index 495e8fad1..000000000 --- a/lib/locator.dart +++ /dev/null @@ -1,153 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:get_it/get_it.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:talawa/main.dart'; -import 'package:talawa/services/chat_service.dart'; -import 'package:talawa/services/comment_service.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/image_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/org_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/session_manager.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/access_request_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/login_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/set_url_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/waiting_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/comments_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/progress_dialog_view_model.dart'; - -// Instance of GetIt and storing it in a global variable -/// Intializaing the locator. -GetIt locator = GetIt.instance; - -///GetIt for UserConfig. -final userConfig = locator(); - -///GetIt for NavigationService. -final navigationService = locator(); - -///GetIt for DataBaseMutationFunctions. -final databaseFunctions = locator(); - -///GetIt for GraphqlConfig. -final graphqlConfig = locator(); - -///GetIt for SizeConfig. -final sizeConfig = locator(); - -///GetIt for Queries. -final queries = locator(); - -///GetIt for Connectivity. -final connectivity = locator(); - -///GetIt for OrganizationService. -final organizationService = locator(); - -///GetIt for ImageService. -final imageService = locator(); - -///GetIt for SessionManager. -final sessionManager = locator(); - -/// This function registers the widgets/objects in "GetIt". -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void setupLocator() { - //services - locator.registerSingleton(NavigationService()); - - //sizeConfig - locator.registerSingleton(SizeConfig()); - - locator.registerSingleton(Validator()); - - //userConfig - locator.registerSingleton(UserConfig()); - - //sessionManager - locator.registerSingleton(SessionManager()); - - //Services - locator.registerLazySingleton(() => PostService()); - locator.registerLazySingleton(() => EventService()); - locator.registerLazySingleton(() => CommentService()); - locator.registerLazySingleton(() => OrganizationService()); - locator.registerLazySingleton(() => MultiMediaPickerService()); - locator.registerLazySingleton(() => Connectivity()); - locator.registerLazySingleton(() => ChatService()); - locator.registerLazySingleton(() => ImageService()); - locator.registerLazySingleton(() => ImagePicker()); - locator.registerLazySingleton(() => ImageCropper()); - - //graphql - locator.registerSingleton(GraphqlConfig()); - - //databaseMutationFunction - locator.registerSingleton(DataBaseMutationFunctions()); - - //queries - locator.registerSingleton(Queries()); - - //Page viewModels - locator.registerFactory(() => DemoViewModel()); - // locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => SetUrlViewModel()); - locator.registerFactory(() => LoginViewModel()); - - locator.registerFactory(() => SelectOrganizationViewModel()); - locator.registerFactory(() => SignupDetailsViewModel()); - locator.registerFactory(() => WaitingViewModel()); - locator.registerFactory(() => ExploreEventsViewModel()); - locator.registerFactory(() => MainScreenViewModel()); - locator.registerFactory(() => ProfilePageViewModel()); - locator.registerFactory(() => EditProfilePageViewModel()); - locator.registerFactory(() => CreateEventViewModel()); - locator.registerFactory(() => EditEventViewModel()); - locator.registerFactory(() => EventCalendarViewModel()); - locator.registerFactory(() => AddPostViewModel()); - locator.registerFactory(() => EventInfoViewModel()); - locator.registerFactory(() => AppSettingViewModel()); - - //Widgets viewModels - locator.registerFactory(() => ProgressDialogViewModel()); - locator.registerFactory(() => CustomDrawerViewModel()); - locator.registerFactory(() => LikeButtonViewModel()); - locator.registerFactory(() => AppLanguage()); - locator.registerFactory(() => CommentsViewModel()); - locator.registerFactory(() => AppTheme()); - locator.registerFactory(() => DirectChatViewModel()); - locator.registerFactory(() => AccessScreenViewModel()); -} diff --git a/lib/main.dart b/lib/main.dart deleted file mode 100644 index 2237cf4d7..000000000 --- a/lib/main.dart +++ /dev/null @@ -1,216 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart' as fs; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:hive/hive.dart'; -import 'package:path_provider/path_provider.dart' as path; -import 'package:provider/provider.dart'; -import 'package:quick_actions/quick_actions.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/constants/quick_actions.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/asymetric_keys/asymetric_keys.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/plugins/fetch_plugin_list.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -Future main() async { - // Returns an instance of the binding that implements WidgetsBinding. - WidgetsFlutterBinding.ensureInitialized(); - - final Directory dir = await path.getApplicationDocumentsDirectory(); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()) - ..registerAdapter(AsymetricKeysAdapter()); - - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - await Hive.openBox('user_keys'); - await Hive.openBox('pluginBox'); - await Hive.openBox('url'); - - setupLocator(); - // The runApp() function takes the given Widget and makes it the root of the widget tree. - runApp(MyApp()); -} - -/// Main widget that sets up the quick actions, internationalization, routing , notifications. -class MyApp extends StatefulWidget { - // This widget is the root of your application. - @override - _MyAppState createState() => _MyAppState(); -} - -/// The _MyAppState class extends the State. -/// -/// All the coding related to state updation is inside this class. -class _MyAppState extends State { - /// Initializing the Quickactions to enable them on long press of app icon in device. - final quickActions = const QuickActions(); - - /// Initializing the mainScreen window to 1 to show the events by default after app in opened. - late int mainScreenQuickActionindex = 0; - @override - void initState() { - // initState() is a method that is called once when the Stateful Widget - // is inserted in the widget tree. We generally override this method if - // we need to do some sort of initialization work like - // registering a listener because, unlike build(), this method is called once. - super.initState(); - - initQuickActions(); - - final urlBox = Hive.box('url'); - if (urlBox.get('url') != null) { - FetchPluginList(); - } - - fs.SystemChrome.setPreferredOrientations( - [ - fs.DeviceOrientation.portraitUp, - fs.DeviceOrientation.portraitDown, - ], - ); - } - - /// It allows to manage and interact with the application’s home screen quick actions. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - -// ignore: avoid_void_async - void initQuickActions() async { - final bool userLoggedIn = await userConfig.userLoggedIn(); - if (userLoggedIn && - userConfig.currentUser.joinedOrganizations!.isNotEmpty) { - quickActions.initialize((type) { - if (type == ShortCutMenu.eventAction.type) { - mainScreenQuickActionindex = 1; - } else if (type == ShortCutMenu.feedAction.type) { - mainScreenQuickActionindex = 0; - } else if (type == ShortCutMenu.chatAction.type) { - mainScreenQuickActionindex = 3; - } - }); - - /// Registering quick action list in the app.zx - quickActions.setShortcutItems(ShortCutMenu.quickActionsList); - } - } - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: langModel.appLocal, - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - AppLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - title: 'Talawa', - theme: Provider.of(context).isdarkTheme - ? TalawaTheme.darkTheme - : TalawaTheme.lightTheme, - debugShowCheckedModeBanner: false, - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - localeResolutionCallback: - (Locale? locale, Iterable supportedLocales) { - if (locale == null) { - debugPrint("*language locale is null!!!"); - return supportedLocales.first; - } - for (final Locale supportedLocale in supportedLocales) { - if (supportedLocale.languageCode == locale.languageCode || - supportedLocale.countryCode == locale.countryCode) { - return supportedLocale; - } - } - return supportedLocales.first; - }, - initialRoute: '/', - onGenerateInitialRoutes: (String initialRouteName) { - return [ - router.generateRoute( - RouteSettings( - name: '/', - arguments: mainScreenQuickActionindex, - ), - ), - ]; - }, - ); - }, - ); - }, - ); - } -} - -/// PageView is a scrollable list that works page by page. -/// -/// DemoPageView is demo PageView of Talawa Mobile App. -class DemoPageView extends StatelessWidget { - const DemoPageView({required Key key}) : super(key: key); - @override - Widget build(BuildContext context) { - FetchPluginList(); - return BaseView( - builder: (context, model, child) => Scaffold( - appBar: AppBar( - title: - Text(AppLocalizations.of(context)!.strictTranslate('Demo Page')), - ), - body: Container( - child: Text(model.title), - ), - ), - ); - } -} - -/// ViewModel uses property-based data binding to establish a connection. -/// -/// between the ViewModel and the View, and drives the View changes -/// through the ViewModel. DemoViewModel is the ViewModel for DemoPageView. -class DemoViewModel extends BaseModel { - /// Demo title to be used. - final String _title = "Title from the viewMode GSoC branch"; - - /// Getter function of the title. - /// - /// params: - /// None - /// returns: - /// * `String`: title of the model - String get title => _title; -} diff --git a/lib/models/app_tour.dart b/lib/models/app_tour.dart deleted file mode 100644 index 055821831..000000000 --- a/lib/models/app_tour.dart +++ /dev/null @@ -1,187 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -/// Class that handles all the apptour routines. -class AppTour { - AppTour({ - required this.model, - }); - - ///instance of mainscreenviewmodel. - MainScreenViewModel model; - - ///instance of tutorialCoachMark. - late TutorialCoachMark tutorialCoachMark; - - /// This function show tutorial to user. - /// - /// **params**: - /// * `onClickTarget`: Its a function which is required to run desired tasks on click. - /// * `onFinish`: Its a function which is required to run desired tasks on finish - /// * `targets`: [FocusTargets] to show the tour on. - /// - /// **returns**: - /// None - - void showTutorial({ - required Function(TargetFocus) onClickTarget, - required dynamic Function() onFinish, - required List targets, - }) { - tutorialCoachMark = TutorialCoachMark( - targets: targets.map((target) => target.focusWidget).toList(), - colorShadow: Theme.of(model.context).colorScheme.secondaryContainer, - textSkip: "SKIP", - textStyleSkip: TextStyle( - color: Theme.of(model.context).colorScheme.background, - fontSize: 20, - ), - paddingFocus: 10, - opacityShadow: 1.0, - onFinish: onFinish, - onClickTarget: onClickTarget, - onSkip: () { - if (MainScreenViewModel.scaffoldKey.currentState!.isDrawerOpen) { - navigationService.pop(); - } - model.tourSkipped = true; - model.onTabTapped(0); - return true; - }, - onClickOverlay: (target) { - onClickTarget(target); - }, - ); - if (!model.testMode) tutorialCoachMark.show(context: model.context); - } -} - -/// Class that represents FocusTarget. -class FocusTarget { - /// This returns a widget for a step in a tutorial. - /// - /// **params**: - /// * `key`: key of type GlobalKey. - /// * `keyName`: key where the widget shows. - /// * `description`: description of the step. - /// * `isCircle`: bool to specify if circle - /// * `align`: align of type ContentAlign to align button. - /// * `crossAlign`: Cross align axes - /// * `skipAlignment`: to give alignment of skip option - /// * `next`: Function` type, this show the next step or `key` to show the tour of. - /// * `nextCrossAlign`: nextCrossAlign to give alignment of next option - /// * `isEnd`: true if last step of the tour. - /// * `tutorialCoachMark`: instance of tutorialCoachMark to which this focusTarget is linked. - FocusTarget({ - required this.key, - required this.keyName, - required this.description, - required this.appTour, - this.isCircle = false, - this.align = ContentAlign.bottom, - this.crossAlign = CrossAxisAlignment.start, - this.skipAlignment = Alignment.topRight, - this.next, - this.nextCrossAlign = CrossAxisAlignment.end, - this.isEnd = false, - }) { - this.focusWidget = TargetFocus( - enableOverlayTab: true, - color: Colors.transparent, - identify: keyName, - keyTarget: key, - alignSkip: skipAlignment, - shape: isCircle ? ShapeLightFocus.Circle : ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: align, - builder: (context, controller) { - return Container( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: crossAlign, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate(description), - style: TextStyle( - color: Theme.of(context).colorScheme.secondary, - fontSize: 20, - ), - ), - ], - ), - ); - }, - ), - TargetContent( - align: ContentAlign.custom, - customPosition: CustomTargetContentPosition( - bottom: SizeConfig.screenHeight! * 0.025, - ), - builder: (context, controller) { - return GestureDetector( - onTap: () { - next?.call(); - appTour.tutorialCoachMark.next(); - }, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: nextCrossAlign, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate(isEnd ? 'COMPLETE' : 'NEXT'), - style: TextStyle( - color: Theme.of(context).colorScheme.secondary, - fontSize: 20, - ), - ), - ], - ), - ); - }, - ), - ], - ); - } - - /// represents the key of the target that is intended to be focused. - GlobalKey key; - - /// keyName of the target in mainScreenViewModel. - String keyName; - - /// description of the target. - String description; - - /// true if focusing shape is circle. - bool isCircle; - - /// alignment of description text. - ContentAlign align; - - /// crossAxisAlignment. - CrossAxisAlignment crossAlign; - - /// skip alignment configuration. - Alignment skipAlignment; - - /// instance of AppTour. - AppTour appTour; - - /// next callback that is executed on pressing this target. - Function()? next; - - /// next target's crossAxisAlignment. - CrossAxisAlignment nextCrossAlign; - - /// true current target ends ths appTour. - bool isEnd; - - /// Target focus widget with all above properties. - late TargetFocus focusWidget; -} diff --git a/lib/models/asymetric_keys/asymetric_keys.dart b/lib/models/asymetric_keys/asymetric_keys.dart deleted file mode 100644 index bdd971a77..000000000 --- a/lib/models/asymetric_keys/asymetric_keys.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:hive/hive.dart'; -import 'package:pointycastle/api.dart'; -part 'asymetric_keys.g.dart'; - -// This model is created to save Asymmetric Keys to the Hive as Hive doesn't allow to store objects other than Arrays, List, int, Strings etc. -@HiveType(typeId: 7) - -/// Hive Type for [AssymetricKeys]. -class AsymetricKeys extends HiveObject { - AsymetricKeys({required this.keyPair}); - @HiveField(0) - - /// The key pair to work with. - final AsymmetricKeyPair keyPair; -} diff --git a/lib/models/asymetric_keys/asymetric_keys.g.dart b/lib/models/asymetric_keys/asymetric_keys.g.dart deleted file mode 100644 index 5661ba4f0..000000000 --- a/lib/models/asymetric_keys/asymetric_keys.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'asymetric_keys.dart'; - -// ************************************************************************** -// TypeAdapterGenerator -// ************************************************************************** - -class AsymetricKeysAdapter extends TypeAdapter { - @override - final int typeId = 7; - - @override - AsymetricKeys read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return AsymetricKeys( - keyPair: fields[0] as AsymmetricKeyPair, - ); - } - - @override - void write(BinaryWriter writer, AsymetricKeys obj) { - writer - ..writeByte(1) - ..writeByte(0) - ..write(obj.keyPair); - } - - @override - int get hashCode => typeId.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AsymetricKeysAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -} diff --git a/lib/models/chats/chat_list_tile_data_model.dart b/lib/models/chats/chat_list_tile_data_model.dart deleted file mode 100644 index 6e0949fc8..000000000 --- a/lib/models/chats/chat_list_tile_data_model.dart +++ /dev/null @@ -1,25 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:json_annotation/json_annotation.dart'; -import 'package:talawa/models/chats/chat_user.dart'; - -part 'chat_list_tile_data_model.g.dart'; - -@JsonSerializable() - -/// This class creates JSON code using the JsonSerializable package. -class ChatListTileDataModel { - ChatListTileDataModel(this.users, this.id); - - // Connect the generated [_$ChatListTileDataModelFromJson] function to the `fromJson` - // factory. - factory ChatListTileDataModel.fromJson(Map json) => - _$ChatListTileDataModelFromJson(json); - - // Connect the generated [_$ChatListTileDataModelToJson] function to the `toJson` method. - Map toJson() => _$ChatListTileDataModelToJson(this); - - List? users; - String? id; -} diff --git a/lib/models/chats/chat_list_tile_data_model.g.dart b/lib/models/chats/chat_list_tile_data_model.g.dart deleted file mode 100644 index 200e51549..000000000 --- a/lib/models/chats/chat_list_tile_data_model.g.dart +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'chat_list_tile_data_model.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -ChatListTileDataModel _$ChatListTileDataModelFromJson( - Map json, -) => - ChatListTileDataModel( - (json['users'] as List?) - ?.map((e) => ChatUser.fromJson(e as Map)) - .toList(), - json['id'] as String?, - ); - -Map _$ChatListTileDataModelToJson( - ChatListTileDataModel instance, -) => - { - 'users': instance.users, - 'id': instance.id, - }; diff --git a/lib/models/chats/chat_message.dart b/lib/models/chats/chat_message.dart deleted file mode 100644 index cbfd6d7b2..000000000 --- a/lib/models/chats/chat_message.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:json_annotation/json_annotation.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -part 'chat_message.g.dart'; - -@JsonSerializable(explicitToJson: true) - -/// This class creates JSON code for chat message using the JsonSerializable package. - -class ChatMessage { - ChatMessage( - this.id, - this.sender, - this.messageContent, - this.receiver, - ); - // Connect the generated [_$ChatMessageFromJson] function to the `fromJson` - // factory. - factory ChatMessage.fromJson(Map json) => - _$ChatMessageFromJson(json); - - // Connect the generated [_$ChatMessageToJson] function to the `toJson` method. - Map toJson() => _$ChatMessageToJson(this); - - String? id; - ChatUser? sender; - ChatUser? receiver; - String? messageContent; -} diff --git a/lib/models/chats/chat_message.g.dart b/lib/models/chats/chat_message.g.dart deleted file mode 100644 index 24dedabc9..000000000 --- a/lib/models/chats/chat_message.g.dart +++ /dev/null @@ -1,26 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'chat_message.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -ChatMessage _$ChatMessageFromJson(Map json) => ChatMessage( - json['id'] as String?, - json['sender'] == null - ? null - : ChatUser.fromJson(json['sender'] as Map), - json['messageContent'] as String?, - json['receiver'] == null - ? null - : ChatUser.fromJson(json['receiver'] as Map), - ); - -Map _$ChatMessageToJson(ChatMessage instance) => - { - 'id': instance.id, - 'sender': instance.sender?.toJson(), - 'receiver': instance.receiver?.toJson(), - 'messageContent': instance.messageContent, - }; diff --git a/lib/models/chats/chat_user.dart b/lib/models/chats/chat_user.dart deleted file mode 100644 index d12b3c51d..000000000 --- a/lib/models/chats/chat_user.dart +++ /dev/null @@ -1,24 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:json_annotation/json_annotation.dart'; -part 'chat_user.g.dart'; - -@JsonSerializable() - -/// This class creates JSON code for chat user using the JsonSerializable package. -class ChatUser { - ChatUser({this.firstName, this.id, this.image}); - - // Connect the generated [_$ChatUserFromJson] function to the `fromJson` - // factory. - factory ChatUser.fromJson(Map json) => - _$ChatUserFromJson(json); - - // Connect the generated [_$ChatUserFromJson] function to the `toJson` method. - Map toJson() => _$ChatUserToJson(this); - - String? firstName; - String? id; - String? image; -} diff --git a/lib/models/chats/chat_user.g.dart b/lib/models/chats/chat_user.g.dart deleted file mode 100644 index beeef4f36..000000000 --- a/lib/models/chats/chat_user.g.dart +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'chat_user.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -ChatUser _$ChatUserFromJson(Map json) => ChatUser( - firstName: json['firstName'] as String?, - id: json['id'] as String?, - image: json['image'] as String?, - ); - -Map _$ChatUserToJson(ChatUser instance) => { - 'firstName': instance.firstName, - 'id': instance.id, - 'image': instance.image, - }; diff --git a/lib/models/comment/comment_model.dart b/lib/models/comment/comment_model.dart deleted file mode 100644 index 8455e52b5..000000000 --- a/lib/models/comment/comment_model.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:talawa/models/user/user_info.dart'; - -///This class returns a Comment instance. -class Comment { - Comment({this.text, this.createdAt, this.creator, this.post, this.likeCount}); - //Creating a new Comment instance from a map structure. - factory Comment.fromJson(Map json) { - return Comment( - text: json['text'] as String?, - createdAt: json['createdAt'] as String?, - creator: json['creator'] == null - ? null - //Creating a new User instance from a map structure. - : User.fromJson( - json['creator'] as Map, - fromOrg: true, - ), - post: json['post'] as String?, - likeCount: json['likeCount'] as String?, - ); - } - - String? text; - String? createdAt; - User? creator; - String? post; - String? likeCount; -} diff --git a/lib/models/events/event_model.dart b/lib/models/events/event_model.dart deleted file mode 100644 index a15db5925..000000000 --- a/lib/models/events/event_model.dart +++ /dev/null @@ -1,162 +0,0 @@ -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -///This class creates an event model and returns an Event instance. -class Event { - Event({ - this.id, - this.title, - this.description, - this.attendees, - this.location, - this.recurring, - this.allDay, - this.startDate, - this.endDate, - this.startTime, - this.endTime, - this.isPublic, - this.isRegistered, - this.isRegisterable, - this.creator, - this.organization, - this.admins, - }); - //Creating a new Event instance from a map structure. - factory Event.fromJson( - Map json, - ) { - return Event( - id: json['_id'] as String, - title: json['title'] as String?, - description: json['description'] as String?, - location: json['location'] as String?, - recurring: json['recurring'] as bool?, - allDay: json['allDay'] as bool?, - startDate: json['startDate'] as String?, - endDate: json['endDate'] as String?, - startTime: json['startTime'] as String?, - endTime: json['endTime'] as String?, - isPublic: json['isPublic'] as bool?, - isRegistered: json['isRegistered'] as bool?, - isRegisterable: json['isRegisterable'] as bool?, - creator: json['creator'] == null - ? null - : User.fromJson( - json['creator'] as Map, - fromOrg: true, - ), - organization: json['organization'] == null - ? null - : OrgInfo.fromJson(json['organization'] as Map), - admins: json['admins'] == null - ? null - : (json['admins'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList(), - attendees: (json["attendees"] as List?)?.isEmpty ?? true - ? null - : (json['attendees'] as List?) - ?.map( - (e) => Attendee.fromJson(e as Map), - ) - .toList(), - ); - } - - ///Unique identifier for the event. - String? id; - - /// The title of the event. - String? title; - - /// The description of the event. - String? description; - - /// The location of the event. - String? location; - - /// A boolean value that indicates if the event is recurring. - bool? recurring; - - /// A boolean value that indicates if the event is an all-day event. - bool? allDay; - - /// The start date of the event. - String? startDate; - - /// The end date of the event. - String? endDate; - - /// The start time of the event. - String? startTime; - - /// The end time of the event. - String? endTime; - - /// A boolean value that indicates if the event is public. - bool? isPublic; - - /// A boolean value that indicates if the user is registered for the event. - bool? isRegistered; - - /// A boolean value that indicates if the event is registerable. - bool? isRegisterable; - - /// The creator of the event. - User? creator; - - /// The organization of the event. - OrgInfo? organization; - - /// The admins of the event. - List? admins; - - /// The attendees of the event. - List? attendees; -} - -///This class creates an attendee model and returns an Attendee instance. -class Attendee { - Attendee({this.id, this.firstName, this.lastName, this.image}); - - Attendee.fromJson(Map json) { - id = json['_id'] as String?; - firstName = json['firstName'] as String?; - lastName = json['lastName'] as String?; - image = json['image'] as String?; - } - - ///Unique identifier for the attendee. - String? id; - - /// The first name of the attendee. - String? firstName; - - /// The last name of the attendee. - String? lastName; - - /// The image of the attendee. - String? image; - - /// Converts the Attendee instance to a map structure.. - /// - /// This method is used to convert the Attendee instance to a map structure that can be converted to a JSON object. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: A map structure that can be converted to a JSON object. - - Map toJson() { - final Map data = {}; - data['_id'] = this.id; - data['firstName'] = this.firstName; - data['lastName'] = this.lastName; - data['image'] = this.image; - return data; - } -} diff --git a/lib/models/language/language_model.dart b/lib/models/language/language_model.dart deleted file mode 100644 index 15f643fc1..000000000 --- a/lib/models/language/language_model.dart +++ /dev/null @@ -1,17 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -///This class creates an langauge model. -class Language { - Language({ - required this.countryCode, - required this.langCode, - required this.langName, - required this.langSample, - }); - - final String countryCode; - final String langCode; - final String langName; - final String langSample; -} diff --git a/lib/models/mainscreen_navigation_args.dart b/lib/models/mainscreen_navigation_args.dart deleted file mode 100644 index a23caaff2..000000000 --- a/lib/models/mainscreen_navigation_args.dart +++ /dev/null @@ -1,42 +0,0 @@ -/// This class creates a MainScreenArgs model. -class MainScreenArgs { - MainScreenArgs({ - this.fromSignUp = false, - required this.mainScreenIndex, - this.toggleDemoMode = false, - }); - - /// Indicates whether the user navigated to the main screen from the signup page. - final bool fromSignUp; - - /// Represents the index of the current page. - final int mainScreenIndex; - - /// Determines if the application is in demo mode. - final bool toggleDemoMode; - - /// Overrides the equality operator to compare instances of the MainScreenArgs class. - /// - /// Checks whether the [other] object is of the same type and compares its properties: - /// If all properties match, returns `true`; otherwise, returns `false`. - /// - /// **params**: - /// * `other`: The object to compare against this MainScreenArgs instance. - /// - /// **returns**: - /// * `bool`: Returns `true` if the properties of both instances match; otherwise, `false`. - @override - bool operator ==(Object other) => - identical(this, other) || - other is MainScreenArgs && - other.fromSignUp == fromSignUp && - other.mainScreenIndex == mainScreenIndex && - other.toggleDemoMode == toggleDemoMode; - - /// Overrides the hashCode getter to generate a hash code based on the properties of the MainScreenArgs instance. - /// - /// Returns an integer value representing the combined hash codes. - @override - int get hashCode => - fromSignUp.hashCode ^ mainScreenIndex.hashCode ^ toggleDemoMode.hashCode; -} diff --git a/lib/models/options/options.dart b/lib/models/options/options.dart deleted file mode 100644 index 828fccb33..000000000 --- a/lib/models/options/options.dart +++ /dev/null @@ -1,19 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; - -///This class creates a Option model. -class Options { - Options({ - required this.icon, - required this.title, - required this.subtitle, - this.trailingIconButton, - }); - - Widget icon; - String title; - String subtitle; - IconButton? trailingIconButton; -} diff --git a/lib/models/organization/org_info.dart b/lib/models/organization/org_info.dart deleted file mode 100644 index 961ce9965..000000000 --- a/lib/models/organization/org_info.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'package:hive/hive.dart'; -import 'package:talawa/models/organization/org_info_address.dart'; -import 'package:talawa/models/user/user_info.dart'; - -part 'org_info.g.dart'; - -@HiveType(typeId: 2) - -///This class creates an organization-information model and returns an OrgInfo instance. -class OrgInfo { - OrgInfo({ - this.admins, - this.members, - this.creatorInfo, - this.description, - this.id, - this.image, - this.userRegistrationRequired, - this.name, - this.address, - }); - - factory OrgInfo.fromJson( - Map json1, { - bool memberRequest = false, - }) { - Map json; - if (memberRequest) { - json = json1['organization'] as Map; - } else { - json = json1; - } - return OrgInfo( - id: json['_id'] != null ? json['_id'] as String : null, - image: json['image'] != null ? json['image'] as String? : null, - name: json['name'] != null ? json['name'] as String? : null, - description: - json['description'] != null ? json['description'] as String? : null, - userRegistrationRequired: json['userRegistrationRequired'] != null - ? json['userRegistrationRequired'] as bool? - : null, - creatorInfo: json['creator'] != null - ? User.fromJson( - json['creator'] as Map, - fromOrg: true, - ) - : null, - members: json['members'] != null - ? (json['members'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList() - : null, - admins: json['admins'] != null - ? (json['admins'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList() - : null, - address: json['address'] != null - ? Address.fromJson(json['address'] as Map) - : null, - ); - } - - /// The conventional function to parse json, check flutter docs to know more. - /// - /// - /// **params**: - /// * `json`: Passing the json to be parsed. - /// - /// **returns**: - /// * `List`: returning the OrgInfo object containing the json data - List fromJsonToList(dynamic json) { - final List orgList = []; - - if (json is List) { - for (final dynamic outerElement in json) { - if (outerElement is List) { - for (final dynamic innerElement in outerElement) { - if (innerElement is Map) { - final OrgInfo org = OrgInfo.fromJson(innerElement); - orgList.add(org); - } - } - } else if (outerElement is Map) { - final OrgInfo org = OrgInfo.fromJson(outerElement); - orgList.add(org); - } - } - } - - return orgList; - } - - /// contains the Image url. - @HiveField(0) - String? image; - - /// The org id. - @HiveField(1) - String? id; - - /// The org name. - @HiveField(2) - String? name; - - /// The org admins. - @HiveField(3) - List? admins; - - /// The org name. - @HiveField(4) - List? members; - - /// The org descriptions. - @HiveField(5) - String? description; - - /// The org registration is required. - @HiveField(6) - bool? userRegistrationRequired; - - /// The org creatorInfo. - @HiveField(7) - User? creatorInfo; - - /// Address of the Organisation. - @HiveField(8) - Address? address; -} diff --git a/lib/models/organization/org_info.g.dart b/lib/models/organization/org_info.g.dart deleted file mode 100644 index 1deae17c9..000000000 --- a/lib/models/organization/org_info.g.dart +++ /dev/null @@ -1,65 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'org_info.dart'; - -// ************************************************************************** -// TypeAdapterGenerator -// ************************************************************************** - -class OrgInfoAdapter extends TypeAdapter { - @override - final int typeId = 2; - - @override - OrgInfo read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return OrgInfo( - admins: (fields[3] as List?)?.cast(), - members: (fields[4] as List?)?.cast(), - creatorInfo: fields[7] as User?, - description: fields[5] as String?, - id: fields[1] as String?, - image: fields[0] as String?, - userRegistrationRequired: fields[6] as bool?, - name: fields[2] as String?, - address: fields[8] as Address?, - ); - } - - @override - void write(BinaryWriter writer, OrgInfo obj) { - writer - ..writeByte(9) - ..writeByte(0) - ..write(obj.image) - ..writeByte(1) - ..write(obj.id) - ..writeByte(2) - ..write(obj.name) - ..writeByte(3) - ..write(obj.admins) - ..writeByte(4) - ..write(obj.members) - ..writeByte(5) - ..write(obj.description) - ..writeByte(6) - ..write(obj.userRegistrationRequired) - ..writeByte(7) - ..write(obj.creatorInfo) - ..writeByte(8) - ..write(obj.address); - } - - @override - int get hashCode => typeId.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is OrgInfoAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -} diff --git a/lib/models/organization/org_info_address.dart b/lib/models/organization/org_info_address.dart deleted file mode 100644 index 13664655f..000000000 --- a/lib/models/organization/org_info_address.dart +++ /dev/null @@ -1,52 +0,0 @@ -/// Model for the address of an organisation. -class Address { - /// Constructs an Address object. - Address({ - this.city, - this.countryCode, - this.dependentLocality, - this.line1, - this.line2, - this.postalCode, - this.sortingCode, - this.state, - }); - - /// Factory method to construct an Address from a JSON object. - factory Address.fromJson(Map json) { - return Address( - city: json['city'] as String?, - countryCode: json['countryCode'] as String?, - dependentLocality: json['dependentLocality'] as String?, - line1: json['line1'] as String?, - line2: json['line2'] as String?, - postalCode: json['postalCode'] as String?, - sortingCode: json['sortingCode'] as String?, - state: json['state'] as String?, - ); - } - - /// The city of the address. - final String? city; - - /// The country code of the address. - final String? countryCode; - - /// The dependent locality of the address. - final String? dependentLocality; - - /// The first line of the address. - final String? line1; - - /// The second line of the address. - final String? line2; - - /// The postal code of the address. - final String? postalCode; - - /// The sorting code of the address. - final String? sortingCode; - - /// The state of the address. - final String? state; -} diff --git a/lib/models/post/post_model.dart b/lib/models/post/post_model.dart deleted file mode 100644 index 1e5b52a69..000000000 --- a/lib/models/post/post_model.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -///This class creates a Post model. -class Post { - Post({ - required this.sId, - this.description, - this.createdAt, - this.imageUrl, - this.base64String, - this.videoUrl, - required this.creator, - this.organization, - this.likedBy, - this.comments, - }); - - ///Creating a new Post instance from a map structure. - - /// - /// params: - /// None - /// returns: - /// * `PostObject`: Dart Object for posts - Post.fromJson(Map json) { - sId = json['_id'] as String; - description = json['text'] as String?; - createdAt = DateTime.parse(json['createdAt'] as String); - imageUrl = json['imageUrl'] as String?; - base64String = json['base64String'] as String?; - videoUrl = json['videoUrl'] as String?; - creator = json['creator'] != null - ? User.fromJson(json['creator'] as Map, fromOrg: true) - : null; - organization = json['organization'] != null - ? OrgInfo.fromJson(json['organization'] as Map) - : null; - if (json['likedBy'] != null) { - likedBy = []; - (json['likedBy'] as List).forEach((v) { - likedBy?.add(LikedBy.fromJson(v as Map)); - }); - } - if (json['comments'] != null) { - comments = []; - (json['comments'] as List).forEach((v) { - comments?.add(Comments.fromJson(v as Map)); - }); - } - } - - /// unique identifier for post. - late String sId; - - /// description for post. - String? description; - - /// createdAt for post. - DateTime? createdAt; - - /// imageUrl for post. - String? imageUrl; - - /// base64String for Image. - String? base64String; - - /// videoUrl for post. - String? videoUrl; - - /// creator for post. - User? creator; - - /// organization for post. - OrgInfo? organization; - - /// likedBy for post. - List? likedBy; - - /// comments for post. - List? comments; - - /// this is to get duration of post. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: date is returned in ago form. - String getPostCreatedDuration() { - if (DateTime.now().difference(this.createdAt!).inSeconds < 60) { - return '${DateTime.now().difference(this.createdAt!).inSeconds} Seconds Ago'; - } else if (DateTime.now().difference(this.createdAt!).inMinutes < 60) { - return '${DateTime.now().difference(this.createdAt!).inMinutes} Minutes Ago'; - } else if (DateTime.now().difference(this.createdAt!).inHours < 24) { - return '${DateTime.now().difference(this.createdAt!).inHours} Hours Ago'; - } else if (DateTime.now().difference(this.createdAt!).inDays < 30) { - return '${DateTime.now().difference(this.createdAt!).inDays} Days Ago'; - } else if (DateTime.now().difference(this.createdAt!).inDays < 365) { - return '${DateTime.now().difference(this.createdAt!).inDays ~/ 30} Months Ago'; - } else { - return '${DateTime.now().difference(this.createdAt!).inDays ~/ 365} Years Ago'; - } - } -} - -/// This class convert between json and object for likedby. -class LikedBy { - LikedBy({this.sId}); - - /// JSON factory constructor. - LikedBy.fromJson(Map json) { - sId = json['_id'] as String?; - } - - /// These are dart object. - /// - /// params: - /// * `sId` : unique identifier for post - String? sId; - - /// Convert dart object to json. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: json is returned. - Map toJson() { - final Map data = {}; - data['_id'] = this.sId; - return data; - } -} - -/// This class convert between json and object for comments. -class Comments { - Comments({this.sId}); - - /// Convert json to dart object. - /// - /// params: - /// None - /// returns: - /// * `Map`: Dart object is returned. - Comments.fromJson(Map json) { - sId = json['_id'] as String?; - } - - /// these are dart object. - /// - /// params: - /// * `sId` : unique identifier for post - String? sId; - - /// Convert dart object to json. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: json is returned. - Map toJson() { - final Map data = {}; - data['_id'] = this.sId; - return data; - } -} diff --git a/lib/models/user/user_info.dart b/lib/models/user/user_info.dart deleted file mode 100644 index f71c98893..000000000 --- a/lib/models/user/user_info.dart +++ /dev/null @@ -1,203 +0,0 @@ -// ignore_for_file: use_setters_to_change_properties - -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/models/organization/org_info.dart'; - -part 'user_info.g.dart'; - -@HiveType(typeId: 1) - -/// This class creates a User model and returns a user instance. -class User extends HiveObject { - User({ - this.adminFor, - this.createdOrganizations, - this.email, - this.firstName, - this.id, - this.image, - this.joinedOrganizations, - this.lastName, - this.authToken, - this.refreshToken, - this.membershipRequests, - }); - - factory User.fromJson(Map json1, {bool fromOrg = false}) { - Map json; - Map? appUserProfile; - if (fromOrg) { - json = json1; - appUserProfile = json1; - } else { - json = json1['user'] as Map; - appUserProfile = json1['appUserProfile'] as Map?; - } - - return User( - authToken: fromOrg ? ' ' : json1['accessToken'] as String?, - refreshToken: fromOrg ? ' ' : json1['refreshToken'] as String?, - id: json['_id'] as String?, - firstName: - json['firstName'] != null ? json['firstName'] as String? : null, - lastName: json['lastName'] != null ? json['lastName'] as String? : null, - email: json['email'] != null ? json['email'] as String? : null, - image: json['image'] != null ? json['image'] as String? : null, - adminFor: appUserProfile?['adminFor'] != null - ? (appUserProfile!['adminFor'] as List) - .map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - createdOrganizations: appUserProfile?['createdOrganizations'] != null - ? (appUserProfile!['createdOrganizations'] as List) - .map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - joinedOrganizations: json['joinedOrganizations'] != null - ? (json['joinedOrganizations'] as List) - .map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - membershipRequests: json['membershipRequests'] != null - ? (json['membershipRequests'] as List) - .map( - (e) => OrgInfo.fromJson( - e as Map, - memberRequest: true, - ), - ) - .toList() - : null, - ); - } - - /// Method to print the User details. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void print() { - debugPrint('authToken: ${this.authToken}'); - debugPrint('refreshToken: ${this.refreshToken}'); - debugPrint('_id: ${this.id}'); - debugPrint('firstName: ${this.firstName}'); - debugPrint('lastName: ${this.lastName}'); - debugPrint('image: ${this.image}'); - debugPrint('email: ${this.email}'); - debugPrint('joinedOrganizations: ${this.joinedOrganizations}'); - debugPrint('adminFor: ${this.adminFor}'); - debugPrint('createdOrganizations: ${this.createdOrganizations}'); - debugPrint('membershipRequests: ${this.membershipRequests}'); - } - - /// HiveField for authToken. - @HiveField(0) - String? authToken; - - /// HiveField for refreshToken. - @HiveField(1) - String? refreshToken; - - /// HiveField for userID. - @HiveField(2) - String? id; - - /// HiveField for user's first name. - @HiveField(3) - String? firstName; - - /// HiveField for user's last name. - @HiveField(4) - String? lastName; - - /// HiveField for user's Email. - @HiveField(5) - String? email; - - /// HiveField for user's avatar. - @HiveField(6) - String? image; - - /// /// HiveField for all organisations joined by user. - @HiveField(7) - List? joinedOrganizations = []; - - /// HiveField for all organisations created by user. - @HiveField(8) - List? createdOrganizations = []; - - /// HiveField for all organisations user is admin of. - @HiveField(9) - List? adminFor = []; - - /// HiveField for all organisations user has sent membership request. - @HiveField(10) - List? membershipRequests = []; - - /// Method to updated joinedOrganisation list. - /// - /// **params**: - /// * `orgList`: List of organsaitions user has joined. - /// - /// **returns**: - /// None - void updateJoinedOrg(List orgList) { - this.joinedOrganizations = orgList; - } - - /// Method to updated createdOrganisation list. - /// - /// **params**: - /// * `orgList`: List of organsaitions user has created. - /// - /// **returns**: - /// None - void updateCreatedOrg(List orgList) { - this.createdOrganizations = orgList; - } - - /// Method to update membershipRequests List. - /// - /// **params**: - /// * `orgList`: List of organisations user have sent membership request. - /// - /// **returns**: - /// None - void updateMemberRequestOrg(List orgList) { - this.membershipRequests = [...membershipRequests!, ...orgList]; - } - - /// Method to update adminFor List. - /// - /// **params**: - /// * `orgList`: List of organisations user is admin of. - /// - /// **returns**: - /// None - void updateAdminFor(List orgList) { - this.adminFor = orgList; - } - - /// Method to update the user details. - /// - /// **params**: - /// * `details`: updated user Info/details - /// - /// **returns**: - /// None - void update(User details) { - this.firstName = details.firstName; - this.lastName = details.lastName; - this.email = details.email; - this.image = details.image; - this.authToken = details.authToken; - this.refreshToken = details.refreshToken; - this.joinedOrganizations = details.joinedOrganizations; - this.createdOrganizations = details.createdOrganizations; - this.membershipRequests = details.membershipRequests; - this.adminFor = details.adminFor; - } -} diff --git a/lib/models/user/user_info.g.dart b/lib/models/user/user_info.g.dart deleted file mode 100644 index 3b89a5ff1..000000000 --- a/lib/models/user/user_info.g.dart +++ /dev/null @@ -1,71 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'user_info.dart'; - -// ************************************************************************** -// TypeAdapterGenerator -// ************************************************************************** - -class UserAdapter extends TypeAdapter { - @override - final int typeId = 1; - - @override - User read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return User( - adminFor: (fields[9] as List?)?.cast(), - createdOrganizations: (fields[8] as List?)?.cast(), - email: fields[5] as String?, - firstName: fields[3] as String?, - id: fields[2] as String?, - image: fields[6] as String?, - joinedOrganizations: (fields[7] as List?)?.cast(), - lastName: fields[4] as String?, - authToken: fields[0] as String?, - refreshToken: fields[1] as String?, - membershipRequests: (fields[10] as List?)?.cast(), - ); - } - - @override - void write(BinaryWriter writer, User obj) { - writer - ..writeByte(11) - ..writeByte(0) - ..write(obj.authToken) - ..writeByte(1) - ..write(obj.refreshToken) - ..writeByte(2) - ..write(obj.id) - ..writeByte(3) - ..write(obj.firstName) - ..writeByte(4) - ..write(obj.lastName) - ..writeByte(5) - ..write(obj.email) - ..writeByte(6) - ..write(obj.image) - ..writeByte(7) - ..write(obj.joinedOrganizations) - ..writeByte(8) - ..write(obj.createdOrganizations) - ..writeByte(9) - ..write(obj.adminFor) - ..writeByte(10) - ..write(obj.membershipRequests); - } - - @override - int get hashCode => typeId.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is UserAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -} diff --git a/lib/plugins/fetch_plugin_list.dart b/lib/plugins/fetch_plugin_list.dart deleted file mode 100644 index 5513a5e2b..000000000 --- a/lib/plugins/fetch_plugin_list.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/locator.dart'; - -/// This class fetch plugins list. -class FetchPluginList { - /// Constructor of the class. - FetchPluginList() { - fetchList(); - } - - /// late initialize the box. - late Box box; - - /// Fetches plugins from server and stores them in Hive `pluginBox`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future fetchList() async { - late final GraphQLClient client = graphqlConfig.clientToQuery(); - final QueryResult result = await client.query( - QueryOptions( - document: gql(queries.getPluginsList()), - ), - ); - box = Hive.box('pluginBox'); - box.put('plugins', result.data?["getPlugins"]); - } -} diff --git a/lib/plugins/talawa_plugin_provider.dart b/lib/plugins/talawa_plugin_provider.dart deleted file mode 100644 index 528ad4180..000000000 --- a/lib/plugins/talawa_plugin_provider.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/user_config.dart'; - -/// TalwaPluginProvider provides ability to implement features as plugins. -class TalawaPluginProvider extends StatelessWidget { - const TalawaPluginProvider({ - super.key, - @required this.child, - required this.visible, - required this.pluginName, - }); - - ///child contains the widget for the plugin UI. - final Widget? child; - - ///visible is the property that decides visibility of the UI. - final bool visible; - - ///name of plugin preferred with underscores(_) instead of spaces. - final String pluginName; - - /// This function checks if the plugin is insatlled and therefore determine visibility of the plugin. - /// - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `bool`: define_the_return - bool checkFromPluginList() { - final UserConfig userConfig = locator(); - final Box box; - bool res = false; - box = Hive.box('pluginBox'); - final List> pluginList = - (box.get('plugins') as List>?) ?? []; - - ///mapping over the list from the server - pluginList.forEach((plugin) { - if (plugin["pluginName"] == pluginName) { - res = plugin["pluginInstallStatus"] as bool || - (plugin["installedOrgs"] as List) - .contains(userConfig.currentOrg.id); - } - }); - return res; - } - - @override - Widget build(BuildContext context) { - var serverVisible = false; - serverVisible = checkFromPluginList(); - return serverVisible || visible ? child! : Container(); - } -} diff --git a/lib/router.dart b/lib/router.dart deleted file mode 100644 index fe1dd2347..000000000 --- a/lib/router.dart +++ /dev/null @@ -1,320 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/main.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/splash_screen.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/views/after_auth_screens/add_post_page.dart'; -import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart'; -import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart'; -import 'package:talawa/views/after_auth_screens/chat/select_contact.dart'; -import 'package:talawa/views/after_auth_screens/events/create_custom_recurring_event.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_page.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_event_page.dart'; -import 'package:talawa/views/after_auth_screens/events/event_calendar.dart'; -import 'package:talawa/views/after_auth_screens/events/event_info_page.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -import 'package:talawa/views/after_auth_screens/feed/individual_post.dart'; -import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_page.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/access_request_screen.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart'; -import 'package:talawa/views/after_auth_screens/org_info_screen.dart'; -import 'package:talawa/views/after_auth_screens/profile/edit_profile_page.dart'; -import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; -import 'package:talawa/views/demo_screens/explore_events_demo.dart'; -import 'package:talawa/views/demo_screens/organization_feed_demo.dart'; -import 'package:talawa/views/demo_screens/profile_page_demo.dart'; -import 'package:talawa/views/main_screen.dart'; -import 'package:talawa/views/pre_auth_screens/change_password.dart'; -import 'package:talawa/views/pre_auth_screens/login.dart'; -import 'package:talawa/views/pre_auth_screens/recover.dart'; -import 'package:talawa/views/pre_auth_screens/select_language.dart'; -import 'package:talawa/views/pre_auth_screens/select_organization.dart'; -import 'package:talawa/views/pre_auth_screens/set_url.dart'; -import 'package:talawa/views/pre_auth_screens/signup_details.dart'; -import 'package:talawa/views/pre_auth_screens/waiting_screen.dart'; - -/// The MaterialApp provides us with a property called generateRoute where. -/// -/// -/// we can pass in a Function that returns a Route and takes in RouteSettings -/// Thus for this purpose, we create a function named generateRoute -/// -/// **params**: -/// * `settings`: RouteSetting have been passed -/// -/// **returns**: -/// * `Route`: Return a Route -Route generateRoute(RouteSettings settings) { - // The settings contains the route information of the requested route. - // It provides two key things to us: the name, and the arguments. - // We use the name to determine which view to return. - switch (settings.name) { - // Returns the SplashScreen - case Routes.splashScreen: - final int mainScreenIndex = settings.arguments! as int; - return MaterialPageRoute( - builder: (context) => SplashScreen( - key: const Key('SplashScreen'), - mainScreenIndex: mainScreenIndex, - ), - ); - - // Returns the SelectLanguage Widget - case Routes.languageSelectionRoute: - return MaterialPageRoute( - builder: (context) => const SelectLanguage(key: Key('SelectLanguage')), - ); - - // Returns the SetUrl Widget - case Routes.setUrlScreen: - final String uri = settings.arguments!.toString(); - return MaterialPageRoute( - builder: (context) => SetUrl( - key: const Key('SetUrl'), - uri: uri, - ), - ); - - // Returns the Login Widget - case Routes.loginScreen: - return MaterialPageRoute( - builder: (context) => const Login(key: Key('Login')), - ); - - // Returns the SelectOrganization Widget - case Routes.selectOrgScreen: - final String id = settings.arguments!.toString(); - return CupertinoPageRoute( - builder: (context) => SelectOrganization( - key: const Key('Signup'), - selectedOrgId: id, - ), - ); - - // Returns the SignUpDetails Widget - case Routes.signupDetailScreen: - final OrgInfo org = settings.arguments! as OrgInfo; - return CupertinoPageRoute( - builder: (context) => SignUpDetails( - key: const Key('Signup'), - selectedOrg: org, - ), - ); - - // Returns the WaitingPge Widget - case Routes.waitingScreen: - return CupertinoPageRoute( - builder: (context) => const WaitingPage(key: Key('Waiting')), - ); - - // Returns the Recover Widget - case Routes.recoverScreen: - return MaterialPageRoute( - builder: (context) => const Recover(key: Key('Recover')), - ); - - // Returns the ChangePass Widget - case Routes.updateScreen: - return MaterialPageRoute( - builder: (context) => const ChangePass(key: Key('Update')), - ); - - // Returns the OrganizationFeed Widget - case Routes.homeScreen: - return MaterialPageRoute( - builder: (context) => const OrganizationFeed(key: Key('HomeScreen')), - ); - - // Returns the DemoOrganizationFeed Widget - case Routes.demoHomeScreen: - return MaterialPageRoute( - builder: (context) => - const DemoOrganizationFeed(key: Key('DemoHomeScreen')), - ); - - // Returns the MainScreen Widget - case Routes.mainScreen: - final MainScreenArgs mainScreenArgs = - settings.arguments! as MainScreenArgs; - // final bool fromSignUp = settings.arguments! as bool; - return MaterialPageRoute( - builder: (context) => MainScreen( - key: const Key('MainScreen'), - mainScreenArgs: mainScreenArgs, - ), - ); - - // Returns the IndividualPostView Widget - case Routes.individualPost: - final Post post = settings.arguments! as Post; - return MaterialPageRoute( - builder: (context) => IndividualPostView( - key: const Key('IndividualPost'), - post: post, - ), - ); - - // Returns the PinnedPostPgae Widget - case Routes.pinnedPostPage: - final List pinnedPosts = settings.arguments! as List; - return MaterialPageRoute( - builder: (context) => PinnedPostPage(pinnedPosts: pinnedPosts), - ); - - // Returns the ExploreEvents Widget - case Routes.exploreEventsScreen: - return MaterialPageRoute( - builder: (context) => const ExploreEvents(key: Key('ExploreEvents')), - ); - - // Returns the DemoExploreEvents Widget - case Routes.demoExploreEventsScreen: - return MaterialPageRoute( - builder: (context) => - const DemoExploreEvents(key: Key('DemoExploreEvents')), - ); - - // Returns the EventInfoPage Widget - case Routes.eventInfoPage: - final Map args = - settings.arguments! as Map; - return MaterialPageRoute( - builder: (context) => EventInfoPage( - key: const Key('EventInfo'), - args: args, - ), - ); - - // Returns the CreateEventPage Widget - case Routes.createEventPage: - return MaterialPageRoute( - builder: (context) => const CreateEventPage(key: Key('CreateEvent')), - ); - - // Returns the CreateEventPage Widget - case Routes.customRecurrencePage: - final model = settings.arguments! as CreateEventViewModel; - return MaterialPageRoute( - builder: (context) => CustomRecurrencePage( - key: const Key('CreateEvent'), - model: model, - ), - ); - - // Returns the ProfilePage Widget - case Routes.profilePage: - return MaterialPageRoute( - builder: (context) => const ProfilePage(key: Key('Profile')), - ); - - // Return the DemoProfilePage Widget - case Routes.demoProfilePage: - return MaterialPageRoute( - builder: (context) => const DemoProfilePage(key: Key('DemoProfile')), - ); - - // Returns the EditProfilePage Widget - case Routes.editProfilePage: - return MaterialPageRoute( - builder: (context) => const EditProfilePage(key: Key('EditProfile')), - ); - - // Returns the JoinOrganizationAfterAuth Widget - case Routes.joinOrg: - final String id = settings.arguments!.toString(); - return MaterialPageRoute( - builder: (context) => JoinOrganisationAfterAuth( - key: const Key('JoinOrganisationAfterAuth'), - orgId: id, - ), - ); - - case Routes.requestAccess: - final OrgInfo org = settings.arguments! as OrgInfo; - return CupertinoPageRoute( - builder: (context) => SendAccessRequest( - key: const Key('Signup'), - org: org, - ), - ); - // Returns the EditEventPage Widget - case Routes.editEventPage: - final Event event = settings.arguments! as Event; - return MaterialPageRoute( - builder: (context) => EditEventPage( - key: const Key('EditEvent'), - event: event, - ), - ); - case Routes.pinnedPostScreen: - // final Map post = settings.arguments! as Map ; - final Map post = - settings.arguments! as Map; - - return MaterialPageRoute( - builder: (context) => PinnedPostScreen(post: post), - ); - // Returns the AppSettingsPage Widget - case Routes.appSettings: - return MaterialPageRoute( - builder: (context) => const AppSettingsPage(key: Key('AppSettings')), - ); - - // Returns the ChatMessageScreen Widget - case Routes.chatMessageScreen: - final List arguments = settings.arguments! as List; - final String chatId = arguments[0] as String; - final DirectChatViewModel model = arguments[1] as DirectChatViewModel; - return MaterialPageRoute( - builder: (context) => ChatMessageScreen( - key: const Key('ChatMessageScreen'), - chatId: chatId, - model: model, - ), - ); - - case Routes.calendar: - return MaterialPageRoute( - builder: (context) => EventCalendar( - settings.arguments! as List, - key: const Key('Calendar'), - ), - ); - - case Routes.selectContact: - return MaterialPageRoute( - builder: (context) => const SelectContact(key: Key('selectContact')), - ); - - case Routes.addPostScreen: - return MaterialPageRoute( - builder: (context) => const AddPost( - key: Key('AddPostPage'), - ), - ); - - case Routes.orgInfoScreen: - final OrgInfo orgInfo = settings.arguments! as OrgInfo; - return MaterialPageRoute( - builder: (context) => OrganisationInfoScreen( - orgInfo: orgInfo, - key: const Key('orginfoscreen'), - ), - ); - - default: - return MaterialPageRoute( - builder: (context) => const DemoPageView( - key: Key("DemoPage"), - ), - ); - } -} diff --git a/lib/services/chat_service.dart b/lib/services/chat_service.dart deleted file mode 100644 index ebb216412..000000000 --- a/lib/services/chat_service.dart +++ /dev/null @@ -1,147 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/foundation.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/chat_queries.dart'; - -/// Provides different services for direct chats of the user. -/// -/// Services include: -/// * `sendMessageToDirectChat` - used to send messages. -/// * `getDirectChatsByUserId` - used to get all chats by the user. -/// * `getDirectChatMessagesByChatId` - gets all chats of a user with -/// another user. -class ChatService { - ChatService() { - _dbFunctions = locator(); - _chatListStream = _chatController.stream.asBroadcastStream(); - _chatMessagesStream = _chatMessageController.stream.asBroadcastStream(); - } - - /// Database mutation functions. - late DataBaseMutationFunctions _dbFunctions; - - /// Stream for chat list data. - late Stream _chatListStream; - - /// Stream for chat messages. - late Stream _chatMessagesStream; - - /// User configuration instance. - final _userConfig = locator(); - - /// Stream for GraphQL query results. - late Stream chatStream; - - /// Controller for chat list stream. - final StreamController _chatController = - StreamController(); - - /// Controller for chat messages stream. - final StreamController _chatMessageController = - StreamController(); - - /// Getter for chat list stream. - Stream get chatListStream => _chatListStream; - - /// Getter for chat messages stream. - Stream get chatMessagesStream => _chatMessagesStream; - - // Stream getMessagesFromDirectChat() async* { - // final operation = SubscriptionOptions( - // document: gql(ChatQueries().messageSentToDirectChatsubscription), - // operationName: 'messageSentToDirectChat'); - // chatStream = graphqlConfig.clientToQuery().subscribe(operation); - - // _cha - // } - - /// Sends a message to a direct chat. - /// - /// **params**: - /// * `chatId`: The ID of the chat where the message will be sent. - /// * `messageContent`: The content of the message to be sent. - /// - /// **returns**: - /// None - Future sendMessageToDirectChat( - String chatId, - String messageContent, - ) async { - // trigger graphQL mutation to push the message in the Database. - final result = await _dbFunctions.gqlAuthMutation( - ChatQueries().sendMessageToDirectChat(), - variables: {"chatId": chatId, "messageContent": messageContent}, - ); - - final message = ChatMessage.fromJson( - (result as QueryResult).data?['sendMessageToDirectChat'] - as Map, - ); - - _chatMessageController.add(message); - - debugPrint(result.data.toString()); - } - - /// Retrieves direct chats by user ID. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future getDirectChatsByUserId() async { - final userId = _userConfig.currentUser.id; - - // trigger graphQL query to get all the chats - // of the user using [userId]. - final String query = ChatQueries().fetchDirectChatsByUserId(userId!); - - final result = await _dbFunctions.gqlAuthQuery(query); - - final directMessageList = - (result as QueryResult).data?['directChatsByUserID'] as List; - - // loop through the result [directMessageList] - // and append the element to the directChat. - directMessageList.forEach((chat) { - final directChat = - ChatListTileDataModel.fromJson(chat as Map); - - directChat.users!.forEach((element) { - if (element.id != userId) _chatController.add(directChat); - }); - }); - } - - /// This function retrieves direct chat messages by chat ID. - /// - /// **params**: - /// * `chatId`: The ID of the chat for which messages - /// are to be retrieved. - /// - /// **returns**: - /// None - Future getDirectChatMessagesByChatId(chatId) async { - // trigger graphQL query to get all the chat messages - // of a particular chat using [chatId]. - final String query = - ChatQueries().fetchDirectChatMessagesByChatId(chatId as String); - - final result = await _dbFunctions.gqlAuthQuery(query); - - final messages = - (result as QueryResult).data?['directChatsMessagesByChatID'] as List; - - messages.forEach((message) { - final chatMessage = ChatMessage.fromJson(message as Map); - _chatMessageController.add(chatMessage); - }); - } -} diff --git a/lib/services/comment_service.dart b/lib/services/comment_service.dart deleted file mode 100644 index b118b6c00..000000000 --- a/lib/services/comment_service.dart +++ /dev/null @@ -1,77 +0,0 @@ -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/utils/comment_queries.dart'; - -/// CommentService class have different member functions which provides service in the context of commenting. -/// -/// Services include: -/// * `createComments` - used to add comment on the post. -/// * `getCommentsForPost` - used to get all comments on the post. -class CommentService { - CommentService() { - _dbFunctions = locator(); - _navigationService = locator(); - } - late DataBaseMutationFunctions _dbFunctions; - late NavigationService _navigationService; - - /// This function is used to add comment on the post. - /// - /// To verify things are working, check out the native platform logs. - /// **params**: - /// * `postId`: The post id on which comment is to be added. - /// * `text`: The comment text. - /// - /// **returns**: - /// None - Future createComments(String postId, String text) async { - final String createCommentQuery = CommentQueries().createComment(); - - try { - await _dbFunctions.gqlAuthMutation( - createCommentQuery, - variables: { - 'postId': postId, //Add your variables here - 'text': text, - }, - ); - - _navigationService.showTalawaErrorSnackBar( - "Comment sent", - MessageType.info, - ); - } on Exception catch (_) { - _navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ); - } - } - - /// This function is used to get all comments on the post. - /// - /// To verify things are working, check out the native platform logs. - /// **params**: - /// * `postId`: The post id for which comments are to be fetched. - /// - /// **returns**: - /// * `Future>`: promise that will be fulfilled with list of comments. - /// - Future> getCommentsForPost(String postId) async { - final String getCommmentQuery = CommentQueries().getPostsComments(postId); - - final dynamic result = await _dbFunctions.gqlAuthMutation(getCommmentQuery); - - if (result == null) { - return []; - } - final resultData = (result as QueryResult).data; - - final resultDataPostComments = (resultData?['post'] - as Map)['comments'] as List; - return resultDataPostComments; - } -} diff --git a/lib/services/database_mutation_functions.dart b/lib/services/database_mutation_functions.dart deleted file mode 100644 index 5760616c2..000000000 --- a/lib/services/database_mutation_functions.dart +++ /dev/null @@ -1,405 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/utils/queries.dart'; - -/// DataBaseMutationFunctions class provides different services that are under the context of graphQL mutations and queries. -/// -/// Services include: -/// * `encounteredExceptionOrError` -/// * `gqlAuthQuery` -/// * `gqlAuthMutation` -/// * `gqlNonAuthMutation` -/// * `gqlNonAuthQuery` -/// * `refreshAccessToken` -/// * `fetchOrgById` -class DataBaseMutationFunctions { - /// Client Auth for handling non-authenticated request. - late GraphQLClient clientNonAuth; - - /// Client Auth for handling authenticated request. - late GraphQLClient clientAuth; - - /// Query passed by fucntion calling this function. - late Queries _query; - - /// Initialization function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void init() { - clientNonAuth = graphqlConfig.clientToQuery(); - clientAuth = graphqlConfig.authClient(); - _query = Queries(); - } - - /// Initializes [clientNonAuth] function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initClientNonAuth() { - graphqlConfig.getOrgUrl(); - clientNonAuth = graphqlConfig.clientToQuery(); - _query = Queries(); - } - - /// Graphql error for handling. - GraphQLError userNotFound = const GraphQLError(message: 'User not found'); - - /// Graphql error for handling. - GraphQLError userNotAuthenticated = - const GraphQLError(message: 'User is not authenticated'); - - /// Graphql error for handling. - GraphQLError emailAccountPresent = - const GraphQLError(message: 'Email address already exists'); - - /// Graphql error for handling. - GraphQLError wrongCredentials = - const GraphQLError(message: 'Invalid credentials'); - - /// Graphql error for handling. - GraphQLError organizationNotFound = - const GraphQLError(message: 'Organization not found'); - - /// Graphql error for handling. - GraphQLError refreshAccessTokenExpiredException = const GraphQLError( - message: - 'Access Token has expired. Please refresh session.: Undefined location', - ); - - /// Graphql error for handling. - GraphQLError memberRequestExist = - const GraphQLError(message: 'Membership Request already exists'); - - /// Graphql error for handling. - GraphQLError notifFeatureNotInstalled = const GraphQLError( - message: - 'Failed to determine project ID: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND', - ); - - /// This function is used to check if any exceptions or error encountered. The return type is [boolean]. - /// - /// **params**: - /// * `exception`: OperationException which occur when calling for graphql post request - /// * `showSnackBar`: Tell if the the place where this function is called wants a SnackBar on error - /// - /// **returns**: - /// * `bool?`: returns a bool whether or not their is error, can be null - bool? encounteredExceptionOrError( - OperationException exception, { - bool showSnackBar = true, - }) { - // If server link is wrong. - if (exception.linkException != null) { - debugPrint(exception.linkException.toString()); - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorSnackBar( - "Server not running/wrong url", - MessageType.info, - ), - ); - } - return false; - } - - /// Looping through graphQL errors. - debugPrint(exception.graphqlErrors.toString()); - for (int i = 0; i < exception.graphqlErrors.length; i++) { - // if the error message is "Access Token has expired. Please refresh session.: Undefined location" - if (exception.graphqlErrors[i].message == - refreshAccessTokenExpiredException.message) { - print('token refreshed'); - refreshAccessToken(userConfig.currentUser.refreshToken!).then( - (value) => graphqlConfig - .getToken() - .then((value) => databaseFunctions.init()), - ); - print('client refreshed'); - return true; - } - - /// If the error message is "User is not authenticated" - if (exception.graphqlErrors[i].message == userNotAuthenticated.message) { - print('client refreshed'); - refreshAccessToken(userConfig.currentUser.refreshToken!).then( - (value) => graphqlConfig - .getToken() - .then((value) => databaseFunctions.init()), - ); - return true; - } - - /// If the error message is "User not found" - if (exception.graphqlErrors[i].message == userNotFound.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "No account registered with this email", - MessageType.error, - ), - ); - } - return false; - } - - /// If the error message is "Membership Request already exists" - if (exception.graphqlErrors[i].message == memberRequestExist.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Membership request already exist", - MessageType.error, - ), - ); - } - return false; - } - - /// If the error message is "Invalid credentials" - if (exception.graphqlErrors[i].message == wrongCredentials.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Enter a valid password", - MessageType.error, - ), - ); - } - return false; - } - - /// If the error message is "Organization not found" - if (exception.graphqlErrors[i].message == organizationNotFound.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Organization Not Found", - MessageType.error, - ), - ); - } - return false; - } - - /// If the error message is "Email address already exists" - if (exception.graphqlErrors[i].message == emailAccountPresent.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Account with this email already registered", - MessageType.error, - ), - ); - } - return false; - } - } - // If the error is unknown - - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Something went wrong!", - MessageType.error, - ), - ); - return false; - } - - /// This function is used to run the graph-ql query for authentication. - /// - /// **params**: - /// * `query`: query is used to fetch data in graphql, for more info read graphql docs - /// * `variables`: variables to be passed with query - /// - /// **returns**: - /// * `Future`: it returns Future of dynamic - Future gqlAuthQuery( - String query, { - Map? variables, - }) async { - final QueryOptions options = QueryOptions( - document: gql(query), - variables: variables ?? {}, - ); - final QueryResult result = await clientAuth.query(options); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - gqlAuthQuery(query, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; - } - - /// This function is used to run the graph-ql mutation for authenticated user. - /// - /// **params**: - /// * `mutation`: mutation is used to change/add/delete data in graphql, for more info read graphql docs - /// * `variables`: variables to be passed with mutation - /// - /// **returns**: - /// * `Future`: it returns Future of dynamic - Future gqlAuthMutation( - String mutation, { - Map? variables, - }) async { - final QueryResult result = await clientAuth.mutate( - MutationOptions( - document: gql(mutation), - variables: variables ?? {}, - ), - ); - // If there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - gqlAuthMutation(mutation, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; - } - - /// This function is used to run the graph-ql mutation to authenticate the non signed-in user. - /// - /// - /// **params**: - /// * `mutation`: mutation is used to change/add/delete data in graphql, for more info read graphql docs - /// * `variables`: variables to be passed with mutation - /// * `reCall`: when not first fetch call - /// - /// **returns**: - /// * `Future`: it returns Future of dynamic - Future gqlNonAuthMutation( - String mutation, { - Map? variables, - bool reCall = true, - }) async { - final QueryResult result = await clientNonAuth.mutate( - MutationOptions( - document: gql(mutation), - variables: variables ?? {}, - ), - ); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception! && reCall) { - gqlNonAuthMutation(mutation, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; - } - - /// This function is used to run the graph-ql query for the non signed-in user. - /// - /// **params**: - /// * `query`: query is used to fetch data in graphql, for more info read graphql docs - /// * `variables`: variables to be passed with query - /// - /// **returns**: - /// * `Future?>`: it returns Future of QueryResult, contains all data - Future?> gqlNonAuthQuery( - String query, { - Map? variables, - }) async { - final queryOptions = QueryOptions( - document: gql(query), - variables: variables ?? {}, - ); - final result = await clientNonAuth.query(queryOptions); - QueryResult? finalRes; - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - finalRes = await gqlNonAuthQuery(query, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return finalRes; - } - - /// This function is used to refresh the Authenication token to access the application. - /// - /// **params**: - /// * `refreshToken`: Needed for authentication - /// - /// **returns**: - /// * `Future`: it returns Future of dynamic - Future refreshAccessToken(String refreshToken) async { - // run the graphQL mutation - final QueryResult result = await clientNonAuth.mutate( - MutationOptions( - document: gql( - _query.refreshToken(refreshToken), - ), - ), - ); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - refreshAccessToken(refreshToken); - } else { - navigationService.pop(); - } - } else if (result.data != null && result.isConcrete) { - userConfig.updateAccessToken( - refreshToken: (result.data!['refreshToken'] - as Map)['refreshToken'] - .toString(), - accessToken: (result.data!['refreshToken'] - as Map)['accessToken'] - .toString(), - ); - databaseFunctions.init(); - return true; - } - return false; - } - - /// This function fetch the organization using the [id] passed. - /// - /// **params**: - /// * `id`: id that identifies a particular org - /// - /// **returns**: - /// * `Future`: it returns Future of dynamic - Future fetchOrgById(String id) async { - final QueryResult result = await clientNonAuth - .mutate(MutationOptions(document: gql(_query.fetchOrgById(id)))); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - fetchOrgById(id); - } - } else if (result.data != null && result.isConcrete) { - print(result.data!['organizations']); - return OrgInfo.fromJson( - // ignore: collection_methods_unrelated_type - (result.data!['organizations'] as List>)[0], - ); - } - return false; - } -} diff --git a/lib/services/event_service.dart b/lib/services/event_service.dart deleted file mode 100644 index 6b3146ec8..000000000 --- a/lib/services/event_service.dart +++ /dev/null @@ -1,182 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/event_queries.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// EventService class provides different services in the context of Event. -/// -/// Services include: -/// * `setOrgStreamSubscription` : to set organization stream subscription for user. -/// * `getEvents` : to get all events of the organization. -/// * `fetchAttendeesByEvent` : to fetch all attendees of an event. -/// * `registerForAnEvent` : to register for an event. -/// * `deleteEvent` : to delete an event. -/// * `editEvent` : to edit the event. -/// * `dispose` : to cancel the stream subscription of an organization. -class EventService { - EventService() { - _eventStream = _eventStreamController.stream.asBroadcastStream(); - _currentOrg = _userConfig.currentOrg; - _userConfig.initialiseStream(); - setOrgStreamSubscription(); - } - - // variables declaration - final _userConfig = locator(); - final _dbFunctions = locator(); - - late OrgInfo _currentOrg; - late StreamSubscription _currentOrganizationStreamSubscription; - late Stream _eventStream; - - final StreamController _eventStreamController = - StreamController(); - - /// The event stream. - /// - /// params: - /// None - /// returns: - /// * `Stream`: returns the event stream - Stream get eventStream => _eventStream; - - /// This function is used to set stream subscription for an organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void setOrgStreamSubscription() { - _currentOrganizationStreamSubscription = - _userConfig.currentOrgInfoStream.listen((updatedOrganization) { - _currentOrg = updatedOrganization; - }); - } - - /// This function is used to fetch all the events of an organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future getEvents() async { - // get current organization id - final String currentOrgID = _currentOrg.id!; - // mutation to fetch the events - final String mutation = EventQueries().fetchOrgEvents(currentOrgID); - final result = await _dbFunctions.gqlAuthMutation(mutation); - - if (result == null) return; - - final List eventsJson = - (result as QueryResult).data!["eventsByOrganizationConnection"] as List; - eventsJson.forEach((eventJsonData) { - final Event event = Event.fromJson(eventJsonData as Map); - event.isRegistered = event.attendees?.any( - (attendee) => attendee.id == _userConfig.currentUser.id, - ) ?? - false; - _eventStreamController.add(event); - }); - } - - /// This function is used to fetch all registrants of an event. - /// - /// **params**: - /// * `eventId`: id of an event. - /// - /// **returns**: - /// * `Future`: Information about event registrants. - Future fetchAttendeesByEvent(String eventId) async { - final result = await _dbFunctions.gqlAuthQuery( - EventQueries().attendeesByEvent(eventId), - ); - return result; - } - - /// This function is used to register user for an event. - /// - /// **params**: - /// * `eventId`: id of an event. - /// - /// **returns**: - /// * `Future`: Information about the event registration. - Future registerForAnEvent(String eventId) async { - final Map variables = {'eventId': eventId}; - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().registerForEvent(), - variables: variables, - ); - return result; - } - - /// This function is used to delete the event. - /// - /// **params**: - /// * `eventId`: id of an event - /// - /// **returns**: - /// * `Future`: Information about the event deletion - Future deleteEvent(String eventId) async { - navigationService.pushDialog( - const CustomProgressDialog(key: Key('DeleteEventProgress')), - ); - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().deleteEvent(eventId), - ); - navigationService.pop(); - return result; - } - - /// This function is used to edit an event. - /// - /// **params**: - /// * `eventId`: id of an event - /// * `variables`: this will be `map` type and contain all the event details need to be update. - /// - /// **returns**: - /// None - Future editEvent({ - required String eventId, - required Map variables, - }) async { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('EditEventProgress'), - ), - ); - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().updateEvent(eventId: eventId), - variables: variables, - ); - navigationService.pop(); - if (result != null) { - navigationService.removeAllAndPush( - Routes.exploreEventsScreen, - Routes.mainScreen, - arguments: MainScreenArgs(mainScreenIndex: 0, fromSignUp: false), - ); - } - } - - /// This function is used to cancel the stream subscription of an organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void dispose() { - _currentOrganizationStreamSubscription.cancel(); - } -} diff --git a/lib/services/graphql_config.dart b/lib/services/graphql_config.dart deleted file mode 100644 index 374485d08..000000000 --- a/lib/services/graphql_config.dart +++ /dev/null @@ -1,82 +0,0 @@ -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:http/http.dart' as http; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; - -/// GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. -/// Talawa uses graphQL for the integrating with the API's. -/// You can go through talawa-api, [here](https://github.com/PalisadoesFoundation/talawa-api). -/// GraphqlConfig class provides service to configure graph ql API with talawa mobile-app. -class GraphqlConfig { - // variable declaration - static const imageUrlKey = "imageUrl"; - static const urlKey = "url"; - static String? orgURI = ' '; - static String? token; - late HttpLink httpLink; - late WebSocketLink webSocketLink; - -//prefix route for showing images - String? displayImgRoute; - - /// This function is used to get user the access token. - Future getToken() async { - final authToken = userConfig.currentUser.authToken; - token = authToken; - getOrgUrl(); - return true; - } - - /// This function is used to get the organization URL. - void getOrgUrl() { - final box = Hive.box('url'); - final String? url = box.get(urlKey) as String?; - final String? imgUrl = box.get(imageUrlKey) as String?; - orgURI = url ?? ' '; - displayImgRoute = imgUrl ?? ' '; - httpLink = HttpLink(orgURI!); - } - - GraphQLClient clientToQuery() { - //TODO: Implement websocket link from OrgUrl - // final link = Link.split( - // (request) => request.isSubscription, webSocketLink, httpLink); - return GraphQLClient( - cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - link: httpLink, - ); - } - - GraphQLClient authClient() { - final AuthLink authLink = AuthLink(getToken: () async => 'Bearer $token'); - final Link finalAuthLink = authLink.concat(httpLink); - return GraphQLClient( - cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - link: finalAuthLink, - ); - } - - void test() { - httpLink = HttpLink( - 'https://talawa-graphql-api.herokuapp.com/graphql', - httpClient: MockHttpClient(), - ); - } -} - -/// A mock HTTP client designed for use when testing code that uses BaseClient. -class MockHttpClient extends Mock implements http.Client { - @override - Future send(http.BaseRequest? request) => - // ignore: invalid_use_of_visible_for_testing_member - super.noSuchMethod( - Invocation.method(#send, [request]), - returnValue: Future.value( - http.StreamedResponse( - Stream.fromIterable(const [[]]), - 500, - ), - ), - ) as Future; -} diff --git a/lib/services/image_service.dart b/lib/services/image_service.dart deleted file mode 100644 index 3d57e3ebf..000000000 --- a/lib/services/image_service.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:talawa/locator.dart'; - -/// ImageService class provides different functions as service in the context of Images. -/// -/// Services include: -/// * `cropImage` -/// * `convertToBase64` -class ImageService { - /// Global instance of ImageCropper. - final ImageCropper _imageCropper = locator(); - - /// Crops the image selected by the user. - /// - /// **params**: - /// * `imageFile`: the image file to be cropped. - /// - /// **returns**: - /// * `Future`: the image after been cropped. - /// - /// **throws**: - /// - `Exception`: If an error occurs during the image cropping process. - Future cropImage({required File imageFile}) async { - // try, to crop the image and returns a File with cropped image path. - try { - final CroppedFile? croppedImage = await _imageCropper.cropImage( - sourcePath: imageFile.path, - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: [ - AndroidUiSettings( - toolbarTitle: 'Crop Image', - toolbarColor: const Color(0xff18191A), - toolbarWidgetColor: Colors.white, - backgroundColor: Colors.black, - cropGridColor: Colors.white, - initAspectRatio: CropAspectRatioPreset.original, - lockAspectRatio: false, - ), - IOSUiSettings( - minimumAspectRatio: 1.0, - ), - ], - ); - - if (croppedImage != null) { - return File(croppedImage.path); - } - } catch (e) { - throw Exception( - "ImageService : $e.", - ); - } - - return null; - } - - /// Converts the image into Base64 format. - /// - /// **params**: - /// * `file`: Image as a File object. - /// - /// **returns**: - /// * `Future`: image in string format - Future convertToBase64(File file) async { - try { - final List bytes = await file.readAsBytes(); - final String base64String = base64Encode(bytes); - return base64String; - } catch (error) { - return null; - } - } -} diff --git a/lib/services/navigation_service.dart b/lib/services/navigation_service.dart deleted file mode 100644 index baecf3dc5..000000000 --- a/lib/services/navigation_service.dart +++ /dev/null @@ -1,193 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/talawa_error_dialog.dart'; -import 'package:talawa/widgets/talawa_error_snackbar.dart'; - -/// NavigationService class provides different functions as service in the context of navigation. -/// -/// Services include: -/// * `pushScreen` -/// * `popAndPushScreen` -/// * `pushReplacementScreen` -/// * `removeAllAndPush` -/// * `showSnackBar` -/// * `pushDialog` -/// * `showTalawaErrorWidget` -/// * `showTalawaErrorDialog` -/// * `pop` -class NavigationService { - /// Key for Navigator State. - GlobalKey navigatorKey = GlobalKey(); - - /// Pushes a Screen. - /// - /// **params**: - /// * `routeName`: Name of the Route - /// * `arguments`: Set of arguments - /// - /// **returns**: - /// * `Future`: resolves if the Screen was succesfully pushed. - Future pushScreen(String routeName, {dynamic arguments}) { - return navigatorKey.currentState! - .pushNamed(routeName, arguments: arguments); - } - - /// This function pop the initial route and push the new route to the navigator. - /// - /// **params**: - /// * `routeName`: Name of the Route - /// * `arguments`: Set of arguments - /// - /// **returns**: - /// * `Future`: resolves if the Screen was succesfully popAndPushed. - Future popAndPushScreen(String routeName, {dynamic arguments}) { - navigatorKey.currentState!.pop(); - return pushScreen(routeName, arguments: arguments); - } - - /// This function push the route and replace the screen. - /// - /// **params**: - /// * `routeName`: Name of the Route - /// * `arguments`: Set of arguments - /// - /// **returns**: - /// * `Future`: resolves if the Screen was succesfully pushedReplacementScreen. - Future pushReplacementScreen(String routeName, {dynamic arguments}) { - return navigatorKey.currentState! - .pushReplacementNamed(routeName, arguments: arguments); - } - - // void fromInviteLink(List routeNames, List arguments) { - // int i = 0; - // removeAllAndPush('/${routeNames[i]}', '/', arguments: arguments[i]); - // for (i = 1; i < routeNames.length; i++) { - // pushScreen('/${routeNames[i]}', arguments: arguments[i]); - // } - // } - - /// This function remove all the routes till the particular route and add new route. - /// - /// **params**: - /// * `routeName`: Name of the Route - /// * `tillRoute`: Route till we want to remove - /// * `arguments`: Set of arguments - /// - /// **returns**: - /// * `Future`: resolves if the Screen was succesfully removeAllAndPushed. - Future removeAllAndPush( - String routeName, - String tillRoute, { - dynamic arguments, - }) { - return navigatorKey.currentState!.pushNamedAndRemoveUntil( - routeName, - ModalRoute.withName(tillRoute), - arguments: arguments, - ); - } - - /// This function remove all the routes till the particular route and add new route. - /// - /// **params**: - /// * `dialog`: Widget to show - /// - /// **returns**: - /// None - void pushDialog(Widget dialog) { - showDialog( - context: navigatorKey.currentContext!, - barrierColor: Colors.transparent, - barrierDismissible: false, - builder: (BuildContext context) { - return dialog; - }, - ); - } - - /// This is used for the quick alert of `duration: 2 seconds` with text message(passed). - /// - /// **params**: - /// * `message`: Message would be shown on snackbar - /// * `duration`: Duration of Snackbar - /// - /// **returns**: - /// None - void showSnackBar( - String message, { - Duration duration = const Duration(seconds: 2), - }) { - ScaffoldMessenger.of(navigatorKey.currentContext!).showSnackBar( - SnackBar( - behavior: SnackBarBehavior.floating, - duration: duration, - content: Text( - AppLocalizations.of(navigatorKey.currentContext!)! - .strictTranslate(message), - ), - ), - ); - } - - /// This is used for the quick error of `duration: 2 seconds`. - /// - /// **params**: - /// * `errorMessage`: Error Message shown in snackbar - /// * `messageType`: Type of Message - /// * `duration`: Duration of snackbar - /// - /// **returns**: - /// None - void showTalawaErrorSnackBar( - String errorMessage, - MessageType messageType, - ) { - final Duration duration = Duration(milliseconds: errorMessage.length * 80); - ScaffoldMessenger.of(navigatorKey.currentContext!).showSnackBar( - SnackBar( - padding: EdgeInsets.zero, - duration: duration, - content: TalawaErrorSnackBar( - duration: duration, - messageType: messageType, - errorMessage: errorMessage, - ), - backgroundColor: const Color.fromRGBO(65, 65, 66, 1), - ), - ); - } - - /// Shows an Error Dialog Box. - /// - /// **params**: - /// * `errorMessage`: Message shown in dialog - /// * `messageType`: Type of Message - /// - /// **returns**: - /// None - void showTalawaErrorDialog(String errorMessage, MessageType messageType) { - showDialog( - context: navigatorKey.currentContext!, - barrierColor: Colors.transparent, - barrierDismissible: false, - builder: (BuildContext context) { - return TalawaErrorDialog( - errorMessage, - messageType: messageType, - ); - }, - ); - } - - /// This function pops the current state. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void pop() { - return navigatorKey.currentState!.pop(); - } -} diff --git a/lib/services/org_service.dart b/lib/services/org_service.dart deleted file mode 100644 index 40b4e5703..000000000 --- a/lib/services/org_service.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/utils/queries.dart'; - -/// Provides the Services in the context of organizations. -/// -/// Services include: -/// * `getOrgMembersList` : to get all organizations members -class OrganizationService { - // constructor - OrganizationService() { - _dbFunctions = locator(); - } - late DataBaseMutationFunctions _dbFunctions; - - /// Retrieves a list of organization members. - /// - /// **params**: - /// * `orgId`: The ID of the organization to fetch members from. - /// - /// **returns**: - /// * `Future>`: A promise that will be fulfilled - /// with the list of organization members. - Future> getOrgMembersList(String orgId) async { - final String query = Queries().fetchOrgDetailsById(orgId); - // fetching from database using graphQL mutations. - final result = await _dbFunctions.gqlAuthMutation(query); - final organizations = - (result as QueryResult).data?['organizations'] as List; - final List orgMembersResult = - (organizations[0] as Map)['members'] as List; - final List orgMembersList = []; - orgMembersResult.forEach((jsonElement) { - final User member = - User.fromJson(jsonElement as Map, fromOrg: true); - orgMembersList.add(member); - }); - - // return list - return orgMembersList; - } -} diff --git a/lib/services/post_service.dart b/lib/services/post_service.dart deleted file mode 100644 index 4b893277b..000000000 --- a/lib/services/post_service.dart +++ /dev/null @@ -1,263 +0,0 @@ -// ignore_for_file: talawa_good_doc_comments, talawa_api_doc -import 'dart:async'; - -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/post_queries.dart'; - -/// PostService class provides functions in the context of a Post. -/// -/// Services include: -/// * `getPosts` : to get all posts of the organization. -/// * `addLike` : to add like to the post. -/// * `removeLike` : to remove the like from the post. -class PostService { - // constructor - PostService() { - _postStream = _postStreamController.stream.asBroadcastStream(); - _updatedPostStream = - _updatedPostStreamController.stream.asBroadcastStream(); - _currentOrg = _userConfig.currentOrg; - setOrgStreamSubscription(); - getPosts(); - } - // Stream for entire posts - final StreamController> _postStreamController = - StreamController>(); - late Stream> _postStream; - - //Stream for individual post update - final StreamController _updatedPostStreamController = - StreamController(); - late Stream _updatedPostStream; - - final _userConfig = locator(); - final _dbFunctions = locator(); - late OrgInfo _currentOrg; - final Set _renderedPostID = {}; - // ignore: prefer_final_fields - List _posts = []; - - Map? postInfo; - String? after; - String? before; - int? first = 5; - int? last; - - /// Getter for Stream of posts. - Stream> get postStream => _postStream; - - /// Getter for Stream of update in any post. - Stream get updatedPostStream => _updatedPostStream; - - ///This method sets up a stream that constantly listens to change in current org. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void setOrgStreamSubscription() { - _userConfig.currentOrgInfoStream.listen((updatedOrganization) { - if (updatedOrganization != _currentOrg) { - _renderedPostID.clear(); - _currentOrg = updatedOrganization; - getPosts(); - } - }); - } - - /// Method used to fetch all posts of the current organisation. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: returns future void - Future getPosts() async { - // variables - final String currentOrgID = _currentOrg.id!; - final String query = - PostQueries().getPostsById(currentOrgID, after, before, first, last); - final result = await _dbFunctions.gqlAuthQuery(query); - //Checking if the dbFunctions return the postJSON, if not return. - if (result == null || (result as QueryResult).data == null) { - // Handle the case where the result or result.data is null - return; - } - - final organizations = result.data!['organizations'] as List; - final posts = (organizations[0] as Map)['posts']; - final List postsJson = (posts as Map)['edges'] as List; - postInfo = posts['pageInfo'] as Map; - postsJson.forEach((postJson) { - final Post post = Post.fromJson( - (postJson as Map)['node'] as Map, - ); - if (!_renderedPostID.contains(post.sId)) { - _posts.insert(0, post); - _renderedPostID.add(post.sId); - } - }); - _postStreamController.add(_posts); - } - - /// Method to refresh feed of current selected organisation. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: returns future void - Future refreshFeed() async { - _posts.clear(); - _renderedPostID.clear(); - await getPosts(); - } - - ///Method to add newly created post at the very top of the feed. - /// - /// **params**: - /// * `newPost`: new post made by user to add in feed - /// - /// **returns**: - /// None - void addNewpost(Post newPost) { - if (!_posts.contains(newPost)) { - _posts.insert(0, newPost); - } - _postStreamController.add(_posts); - } - - ///Method to add like on a Post. - /// - /// This method basically update likedBy list of a Post - /// in database. - /// - /// **params**: - /// * `postID`: ID of the post to add like in database - /// - /// **returns**: - /// * `Future`: define_the_return - Future addLike(String postID) async { - _localAddLike(postID); - final String mutation = PostQueries().addLike(); - // run the graphQl mutation. - final result = await _dbFunctions - .gqlAuthMutation(mutation, variables: {"postID": postID}); - print(result); - // return result - return result; - } - - /// Locally add like on a Post and updates it using updated Post Stream. - /// - /// **params**: - /// * `postID`: ID of the post to add like locally - /// - /// **returns**: - /// None - void _localAddLike(String postID) { - _posts.forEach((post) { - if (post.sId == postID) { - post.likedBy!.add(LikedBy(sId: _userConfig.currentUser.id)); - _updatedPostStreamController.add(post); - } - }); - } - - /// Method to remove like in a Post. - /// - /// This method basically update likedBy list of a Post - /// and removes the like of a user in database. - /// - /// **params**: - /// * `postID`: ID of the post to remove like in database. - /// - /// **returns**: - /// * `Future`: nothing - Future removeLike(String postID) async { - _removeLocal(postID); - final String mutation = PostQueries().removeLike(); - final result = await _dbFunctions - .gqlAuthMutation(mutation, variables: {"postID": postID}); - print(result); - return result; - } - - /// Locally removes the like of a user and update the Post UI. - /// - /// **params**: - /// * `postID`: ID of the post to remove like locally - /// - /// **returns**: - /// None - void _removeLocal(String postID) { - _posts.forEach((post) { - if (post.sId == postID) { - post.likedBy!.removeWhere( - (likeUser) => likeUser.sId == _userConfig.currentUser.id, - ); - _updatedPostStreamController.add(post); - } - }); - } - - ///Method to add comment of a user and update comments using updated Post Stream. - /// - /// **params**: - /// * `postID`: ID of the post to add comment locally - /// - /// **returns**: - /// None - void addCommentLocally(String postID) { - for (int i = 0; i < _posts.length; i++) { - if (_posts[i].sId == postID) { - _posts[i].comments!.add(Comments(sId: postID)); - _updatedPostStreamController.add(_posts[i]); - } - } - } - - /// Method to handle pagination by fetching next page of posts. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future nextPage() async { - if (postInfo!['hasNextPage'] == true) { - _posts.clear(); - _renderedPostID.clear(); - after = postInfo!['endCursor'] as String; - before = null; - first = 5; - last = null; - await getPosts(); - } - } - - /// Method to handle pagination by fetching previous page of posts. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future previousPage() async { - if (postInfo!['hasPreviousPage'] == true) { - _posts.clear(); - _renderedPostID.clear(); - before = postInfo!['startCursor'] as String; - after = null; - last = 5; - first = null; - await getPosts(); - } - } -} diff --git a/lib/services/session_manager.dart b/lib/services/session_manager.dart deleted file mode 100644 index 76df5bfa0..000000000 --- a/lib/services/session_manager.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'dart:async'; - -import 'package:talawa/locator.dart'; - -/// Manages user sessions and periodically refreshes access tokens. -class SessionManager { - SessionManager() { - initializeSessionRefresher(); - } - - /// returns refresh interval of Session Manager. - int get refreshInterval => _refreshInterval; - - /// refresh interval in seconds. - static const int _refreshInterval = 600; - - /// Initializes as session refresher. - /// - /// Invokes [refreshSession] periodically at regular - /// refresh intervals. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Timer`: refresh timer. - Timer initializeSessionRefresher() { - return Timer.periodic( - const Duration(seconds: _refreshInterval), - (Timer timer) async { - refreshSession(); - }, - ); - } - - /// Asynchronously refreshes the user session. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: indicates if session refresh was - /// successful. - Future refreshSession() async { - if (userConfig.loggedIn && userConfig.currentUser.refreshToken != null) { - final refreshed = await databaseFunctions - .refreshAccessToken(userConfig.currentUser.refreshToken!); - return refreshed; - } - return false; - } -} diff --git a/lib/services/size_config.dart b/lib/services/size_config.dart deleted file mode 100644 index 10d8c6bda..000000000 --- a/lib/services/size_config.dart +++ /dev/null @@ -1,54 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/widgets.dart'; - -/// SizeConfig class is used to initialise the height and width of the media. -class SizeConfig { - // variables - static late MediaQueryData _mediaQueryData; - static double? screenWidth; - static double? screenHeight; - static double? blockSizeHorizontal; - static double? blockSizeVertical; - static double? paddingTop; - - static late double _safeAreaHorizontal; - static late double _safeAreaVertical; - static double? safeBlockHorizontal; - static double? safeBlockVertical; - - // function to initialise the width and height. - void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - blockSizeHorizontal = screenWidth! / 100; - blockSizeVertical = screenHeight! / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight! - _safeAreaVertical) / 100; - debugPrint("safeBlockHorizontal: $safeBlockHorizontal"); - debugPrint("safeBlockVertical: $safeBlockVertical"); - } - - void test() { - _mediaQueryData = - const MediaQueryData(size: Size(360, 684), padding: EdgeInsets.zero); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - blockSizeHorizontal = screenWidth! / 100; - blockSizeVertical = screenHeight! / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight! - _safeAreaVertical) / 100; - } -} diff --git a/lib/services/third_party_service/multi_media_pick_service.dart b/lib/services/third_party_service/multi_media_pick_service.dart deleted file mode 100644 index 616c0dc31..000000000 --- a/lib/services/third_party_service/multi_media_pick_service.dart +++ /dev/null @@ -1,114 +0,0 @@ -/* This is an abstraction service for picking up Photos/videos -Library used: image_picker (https://pub.dev/packages/image_picker) -Service usage: "add_post_view_model.dart" -*/ - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/image_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; - -/// This is a third party service which provide the service to select the image from. -/// -/// gallery and then image can be cropped as well. -/// -/// Services include: -/// * `getPhotoFromGallery` - Used to select photo from gallery. -/// * `cropImage` - Used to crop the selected image. -class MultiMediaPickerService { - MultiMediaPickerService() { - _picker = locator(); - _fileStream = _fileStreamController.stream.asBroadcastStream(); - _imageService = imageService; - } - - /// Controller for handling the stream of selected files. - final StreamController _fileStreamController = StreamController(); - - /// Stream of selected files. - late Stream _fileStream; - - /// [ImagePicker] used for selecting images or videos. - late ImagePicker _picker; - - /// [ImageService] for additional image-related operations. - late ImageService _imageService; - - /// Provides a stream of selected multimedia files. - /// - /// params: - /// None. - /// - /// returns: - /// * `Stream`: Stream of files. - Stream get fileStream => _fileStream; - - /// Picks the image from gallery or to click the image from user's camera. - /// - /// First ask for the permission to access the camera, if denied then returns a message in. - /// custom Dialog Box. Returns a File type for which `camera` variable is false by default. - /// - /// **params**: - /// * `camera`: if true then open camera for image, else open gallery to select image. - /// - /// **returns**: - /// * `Future`: the image the user choosed. - Future getPhotoFromGallery({bool camera = false}) async { - // asking for user's camera access permission. - try { - // checking for the image source, it could be camera or gallery. - final image = await _picker.pickImage( - source: camera ? ImageSource.camera : ImageSource.gallery, - ); - // if image is selected or not null, call the cropImage function that provide service to crop the selected image. - if (image != null) { - return await _imageService.cropImage( - imageFile: File(image.path), - ); - } - } catch (e) { - // if the permission denied or error occurs. - if (e is PlatformException && e.code == 'camera_access_denied') { - // push the dialog alert with the message. - locator().pushDialog( - permissionDeniedDialog(), - ); - } - debugPrint( - "MultiMediaPickerService : Exception occurred while choosing photo from the gallery $e", - ); - } - - return null; - } - - /// Generates a custom alert dialog for permission denial. - /// - /// When called, it creates and returns a `CustomAlertDialog` widget with pre-defined settings. - /// This dialog prompts the user to grant camera permissions from the app settings. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `CustomAlertDialog`: Custom Alert Dialog widget. - CustomAlertDialog permissionDeniedDialog() { - return CustomAlertDialog( - success: () { - locator().pop(); - openAppSettings(); - }, - dialogTitle: 'Permission Denied', - successText: 'SETTINGS', - dialogSubTitle: - "Camera permission is required, to use this feature, give permission from app settings", - ); - } -} diff --git a/lib/services/user_config.dart b/lib/services/user_config.dart deleted file mode 100644 index 047159587..000000000 --- a/lib/services/user_config.dart +++ /dev/null @@ -1,288 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// Provides different services in the context of the User. -/// -/// Services include: -/// * `userLoggedIn` : helps to make user logged in to the application. -/// * `updateUserJoinedOrg` : helps to update the user joined organization. -/// * `updateUserCreatedOrg` : helps to update the user created organization. -/// * `updateUserMemberRequestOrg` : helps to update the User membership -/// request for the organization. -/// * `updateUserAdminOrg` : helps to update the Admin of the Organization. -/// * `updateAccessToken` : helps to update the access token of an user. -/// * `updateUser` : helps to update the user. -class UserConfig { - // variables - late User? _currentUser = User(id: 'null', authToken: 'null'); - late OrgInfo? _currentOrg = OrgInfo(name: 'Organization Name', id: 'null'); - late Stream _currentOrgInfoStream; - final StreamController _currentOrgInfoController = - StreamController.broadcast(); - - /// Retrieves the stream of current organization information. - Stream get currentOrgInfoStream => _currentOrgInfoStream; - - /// Retrieves the stream controller for current organization information. - StreamController get currentOrgInfoController => - _currentOrgInfoController; - - /// Retrieves the current organization information. - OrgInfo get currentOrg => _currentOrg!; - - /// Retrieves the name of the current organization. - String get currentOrgName => _currentOrg!.name!; - - /// Checks if a user is logged in. - bool get loggedIn => _currentUser?.id != 'null'; - - /// Updates the current organization information. - set currentOrg(OrgInfo org) => _currentOrg = org; - - /// Retrieves the current user. - User get currentUser => _currentUser!; - - /// Updates the current user. - set currentUser(User user) { - _currentUser = user; - } - - /// initialise. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialiseStream() { - _currentOrgInfoStream = - _currentOrgInfoController.stream.asBroadcastStream(); - } - - /// This function is used to log in the user. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: returns future of bool type. - Future userLoggedIn() async { - initialiseStream(); - final boxUser = Hive.box('currentUser'); - final boxOrg = Hive.box('currentOrg'); - _currentOrg = - boxOrg.get('org') ?? OrgInfo(name: 'Organization Name', id: 'null'); - _currentOrgInfoController.add(_currentOrg!); - - _currentUser = boxUser.get('user'); - - // if there is not currentUser then returns false. - if (_currentUser == null) { - _currentUser = User(id: 'null', authToken: 'null'); - return false; - } - databaseFunctions.initClientNonAuth(); - await sessionManager.refreshSession(); - // generate access token - graphqlConfig.getToken().then((value) async { - try { - final QueryResult result = await databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: {'id': currentUser.id}, - ) as QueryResult; - final List users = result.data!['users'] as List; - final User userInfo = User.fromJson( - users[0] as Map, - fromOrg: false, - ); - userInfo.authToken = userConfig.currentUser.authToken; - userInfo.refreshToken = userConfig.currentUser.refreshToken; - userConfig.updateUser(userInfo); - _currentOrg ??= _currentUser!.joinedOrganizations![0]; - _currentOrgInfoController.add(_currentOrg!); - saveUserInHive(); - return true; - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - "Couldn't update User details", - MessageType.error, - ); - } - }); - return true; - } - - /// Logs out the current user. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: returns future of bool type. - Future userLogOut() async { - bool isLogOutSuccessful = false; - try { - final result = await databaseFunctions.gqlAuthMutation(queries.logout()) - as QueryResult?; - if (result != null && result.data!['logout'] == true) { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('LogoutProgress'), - ), - ); - // throw StateError('error'); - - final user = Hive.box('currentUser'); - final url = Hive.box('url'); - // final androidFirebaseOptionsBox = Hive.box('androidFirebaseOptions'); - // final iosFirebaseOptionsBox = Hive.box('iosFirebaseOptions'); - final organisation = Hive.box('currentOrg'); - await user.clear(); - await url.clear(); - // androidFirebaseOptionsBox.clear(); - // iosFirebaseOptionsBox.clear(); - // try { - // Firebase.app() - // .delete(); // Deleting app will stop all Firebase plugins - // } catch (e) { - // debugPrint("ERROR: Unable to delete firebase app $e"); - // } - await organisation.clear(); - _currentUser = User(id: 'null', authToken: 'null'); - isLogOutSuccessful = true; - } - } catch (e) { - isLogOutSuccessful = false; - } - return isLogOutSuccessful; - } - - /// Updates the user joined organization. - /// - /// **params**: - /// * `orgDetails`: details of the organization that user joined. - /// - /// **returns**: - /// * `Future`: returns future of void type. - Future updateUserJoinedOrg(List orgDetails) async { - _currentUser!.updateJoinedOrg(orgDetails); - saveUserInHive(); - } - - /// Updates the user created organization. - /// - /// **params**: - /// * `orgDetails`: details of the organization that user joined. - /// - /// **returns**: - /// * `Future`: returns future of void type. - Future updateUserCreatedOrg(List orgDetails) async { - _currentUser!.updateCreatedOrg(orgDetails); - saveUserInHive(); - } - - /// Updates the user request to join the organization. - /// - /// **params**: - /// * `orgDetails`: details of the organization that user joined. - /// - /// **returns**: - /// * `Future`: returns future of void type. - Future updateUserMemberRequestOrg(List orgDetails) async { - _currentUser!.updateMemberRequestOrg(orgDetails); - saveUserInHive(); - } - - /// Updates the organization admin. - /// - /// **params**: - /// * `orgDetails`: details of the organization that user joined. - /// - /// **returns**: - /// * `Future`: returns future of void type. - Future updateUserAdminOrg(List orgDetails) async { - _currentUser!.updateAdminFor(orgDetails); - saveUserInHive(); - } - - /// Updates the access token of the user. - /// - /// **params**: - /// * `accessToken`: current user's accesstoken. - /// * `refreshToken`: current user's refreshtoken. - /// - /// **returns**: - /// * `Future`: returns future of void type. - Future updateAccessToken({ - required String accessToken, - required String refreshToken, - }) async { - _currentUser!.refreshToken = refreshToken; - _currentUser!.authToken = accessToken; - saveUserInHive(); - } - - /// Updates the user details. - /// - /// **params**: - /// * `updatedUserDetails`: `User` type variable containing - /// all the details of an user need to be updated. - /// - /// **returns**: - /// * `Future`: returns future of bool type. - Future updateUser(User updatedUserDetails) async { - try { - _currentUser = updatedUserDetails; - saveUserInHive(); - graphqlConfig.getToken(); - databaseFunctions.init(); - return true; - } on Exception catch (e) { - debugPrint(e.toString()); - return false; - } - } - - /// save user in hive. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void saveUserInHive() { - final box = Hive.box('currentUser'); - if (box.get('user') == null) { - box.put('user', _currentUser!); - } else { - box.put('user', _currentUser!); - } - } - - /// save current organization details in hive. - /// - /// **params**: - /// * `saveOrgAsCurrent`: instance of OrgInfo - /// - /// **returns**: - /// None - void saveCurrentOrgInHive(OrgInfo saveOrgAsCurrent) { - _currentOrg = saveOrgAsCurrent; - _currentOrgInfoController.add(_currentOrg!); - final box = Hive.box('currentOrg'); - if (box.get('org') == null) { - box.put('org', _currentOrg!); - } else { - box.put('org', _currentOrg!); - } - } -} diff --git a/lib/splash_screen.dart b/lib/splash_screen.dart deleted file mode 100644 index 89290d1ee..000000000 --- a/lib/splash_screen.dart +++ /dev/null @@ -1,314 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/custom_painters/talawa_logo.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:uni_links/uni_links.dart'; - -/// This widget return the SplashScreen. Splash Screen is the first screen that we see when we run our application. It is also known as Launch Screen. -class SplashScreen extends StatefulWidget { - const SplashScreen({required Key key, this.mainScreenIndex = 0}) - : super(key: key); - - /// This is required if url requires us to push different Screen to Home Screen. - final int mainScreenIndex; - - @override - _SplashScreenState createState() => _SplashScreenState(); -} - -/// This return state for the SplashScreen Widget. -class _SplashScreenState extends State { - Uri? _initialUri; - Uri? _latestUri; - late StreamSubscription _sub; - - // Flutter supports deep linking on iOS, Android, and web browsers. - // Opening a URL displays that screen in your app. - // `_handleInitialUri` is an async function that is used to hanlde - // the initial uri of the application. - - /// Opening a URL displays that screen in your app. - /// - /// Used to handle the initial uri of the application. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future _handleInitialUri() async { - _sub = uriLinkStream.listen( - (Uri? uri) { - // After creating a State object and before calling initState, the framework - // "mounts" the State object by associating it with a BuildContext. - if (!mounted) return; - setState(() { - _latestUri = uri; - }); - }, - onError: (Object err) { - if (!mounted) return; - setState(() { - _latestUri = null; - }); - }, - ); - try { - // Retrieving the initial URI from getInitialUri function. - final uri = await getInitialUri(); - if (!mounted) return; - setState(() => _initialUri = uri); - } on PlatformException { - if (!mounted) return; - setState(() => _initialUri = null); - } on FormatException catch (err) { - debugPrint(err.toString()); - if (!mounted) return; - setState(() => _initialUri = null); - } - final bool userLoggedIn = userConfig.loggedIn; - _initialUri = null; - _latestUri = null; - if (_latestUri == null && _initialUri == null) { - _handleUserLogIn(userLoggedIn); - return; - } - - // if (_initialUri != null) { - // await _handleDeepLinks(userLoggedIn); - // } - } - - // Future _handleDeepLinks(bool userLoggedIn) async { - // final keys = _initialUri!.queryParameters.keys; - // final values = _initialUri!.queryParameters.values; - - // final fromInviteLink = navigationService.fromInviteLink; - // final showSnackBar = navigationService.showTalawaErrorSnackBar; - // final pushReplacementScreen = navigationService.pushReplacementScreen; - - // final orgURI = GraphqlConfig.orgURI!; - // final mainScreenArgs = - // MainScreenArgs(mainScreenIndex: widget.mainScreenIndex); - - // if (_initialUri!.pathSegments[1] == 'invite') { - // if (!userLoggedIn) { - // fromInviteLink( - // keys.toList(growable: false), - // values.toList(growable: false), - // ); - // return; - // } - - // final setUrl = values.toList(growable: false)[1]; - // if (setUrl.compareTo(orgURI) != 0) { - // showSnackBar( - // 'Organisation on different server! Logout and open link again', - // MessageType.error, - // ); - // return; - // } - - // if (keys.last.compareTo('selectOrg') != 0) { - // showSnackBar('Invalid url', MessageType.error); - // return; - // } - - // final routeNames = [ - // Routes.mainScreen.split('/').last, - // Routes.joinOrg.split('/').last, - // ]; - // final arguments = [ - // mainScreenArgs, - // values.last, - // ]; - // fromInviteLink(routeNames, arguments); - // return; - // } - // if (_initialUri!.pathSegments[1] == 'eventInvite') { - // if (!userLoggedIn) { - // pushReplacementScreen( - // Routes.languageSelectionRoute, - // arguments: 'en', - // ); - // return; - // } - - // final setUrl = values.toList(growable: false)[0]; - // if (setUrl.compareTo(orgURI) != 0) { - // Clipboard.setData(ClipboardData(text: setUrl)); - // showSnackBar( - // 'Organisation on different server! Url copied to clipboard.', - // MessageType.error, - // ); - // pushReplacementScreen( - // Routes.mainScreen, - // arguments: mainScreenArgs, - // ); - // return; - // } - - // final currentOrgId = userConfig.currentOrg.id!; - // if (values.toList()[1].compareTo(currentOrgId) != 0) { - // pushReplacementScreen(Routes.joinOrg, arguments: values.toList()[1]); - // return; - // } - - // final routeNames = [ - // Routes.mainScreen.split('/').last, - // Routes.eventInfoPage.split('/').last, - // ]; - - // final model = locator(); - // await model.initialise(); - - // await Future.delayed(Duration.zero); - // Event? event; - // for (final ele in model.events) { - // if (ele.id == values.last) event = ele; - // } - - // if (event == null) { - // showSnackBar('Event not found', MessageType.error); - // pushReplacementScreen( - // Routes.mainScreen, - // arguments: mainScreenArgs, - // ); - // return; - // } - - // final arguments = [ - // MainScreenArgs(mainScreenIndex: 1), - // { - // "event": event, - // "exploreEventViewModel": model, - // }, - // ]; - - // fromInviteLink(routeNames, arguments); - // return; - // } - // } - - /// Handles User Login. - /// - /// **params**: - /// * `userLoggedIn`: Bool for if user is logged in already or not - /// - /// **returns**: - /// None - void _handleUserLogIn(bool userLoggedIn) { - Future.delayed(const Duration(milliseconds: 750)).then((value) async { - final pushReplacementScreen = navigationService.pushReplacementScreen; - if (!userLoggedIn) { - pushReplacementScreen(Routes.languageSelectionRoute, arguments: 'en'); - return; - } - - final currentUser = userConfig.currentUser; - if (currentUser.joinedOrganizations!.isNotEmpty) { - final mainScreenArgs = MainScreenArgs( - mainScreenIndex: widget.mainScreenIndex, - fromSignUp: false, - ); - pushReplacementScreen(Routes.mainScreen, arguments: mainScreenArgs); - return; - } - - if (currentUser.membershipRequests!.isNotEmpty) { - pushReplacementScreen(Routes.waitingScreen, arguments: '0'); - return; - } - - pushReplacementScreen(Routes.joinOrg, arguments: '-1'); - }); - } - - @override - void initState() { - super.initState(); - _handleInitialUri(); - } - - @override - void dispose() { - _sub.cancel(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - sizeConfig.init(context); - return Scaffold( - key: const Key('SplashScreenScaffold'), - body: Stack( - children: [ - Center( - child: CustomPaint( - key: const Key('LogoPainter'), - size: Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - painter: AppLogo(), - ), - ), - Positioned( - top: SizeConfig.screenHeight! / 1.5, - left: 0.0, - right: 0.0, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'TALAWA', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - Positioned( - top: SizeConfig.screenHeight! / 1.08, - left: 0.0, - right: 0.0, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate('from'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ), - Positioned( - top: SizeConfig.screenHeight! / 1.05, - left: 0.0, - right: 0.0, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'PALISADOES', - style: Theme.of(context) - .textTheme - .titleSmall! - .copyWith(fontWeight: FontWeight.w700), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/lib/utils/app_localization.dart b/lib/utils/app_localization.dart deleted file mode 100644 index 7446a530b..000000000 --- a/lib/utils/app_localization.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:convert'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -///This class provides methods to localize the application so that it can be available -///to users with different languages. -class AppLocalizations { - AppLocalizations( - this.locale, { - this.isTest = false, - }); - - late Map _localizedStrings; - final Locale locale; - bool isTest; - - // Helper method to keep the code in the widgets concise - static AppLocalizations? of(BuildContext context) { - return Localizations.of(context, AppLocalizations); - } - - // Static member to have a simple access to the delegate from the MaterialApp - static const LocalizationsDelegate delegate = - AppLocalizationsDelegate(); - - Future loadTest(Locale locale) async { - return AppLocalizations(locale); - } - - Future load() async { - // Load the language JSON file from the "lang" folder - final String jsonString = - await rootBundle.loadString('lang/${locale.languageCode}.json'); - final Map jsonMap = - json.decode(jsonString) as Map; - - _localizedStrings = jsonMap.map((key, value) { - return MapEntry(key, value.toString()); - }); - - return true; - } - - // This method will be called from every widget which needs a localized text - String? translate(String? key) { - if (isTest) return key; - - // ignore: unnecessary_null_comparison - if (key == null) { - return '...'; - } - return _localizedStrings[key]; - } - - // This method will be called from every widget which needs a localized text - String strictTranslate(String key) { - if (isTest) return key; - - // ignore: unnecessary_null_comparison - if (key == null) { - return '...'; - } - - final String translate = _localizedStrings[key] ?? key; - return translate; - } -} - -class AppLocalizationsDelegate extends LocalizationsDelegate { - const AppLocalizationsDelegate({ - this.isTest = false, - }); - final bool isTest; - - @override - bool isSupported(Locale locale) { - // Include all of your supported language codes here - return ['en', 'es', 'fr', 'hi', 'zh', 'de', 'ja', 'pt'] - .contains(locale.languageCode); - } - - @override - Future load(Locale locale) async { - // AppLocalizations class is where the JSON loading actually runs - final AppLocalizations localizations = - AppLocalizations(locale, isTest: isTest); - if (isTest) { - await localizations.loadTest(locale); - } else { - await localizations.load(); - } - - return localizations; - } - - @override - bool shouldReload(AppLocalizationsDelegate old) => false; -} diff --git a/lib/utils/chat_queries.dart b/lib/utils/chat_queries.dart deleted file mode 100644 index 06f75da4f..000000000 --- a/lib/utils/chat_queries.dart +++ /dev/null @@ -1,87 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -///This class creates the queries dealing with chats. - -class ChatQueries { - //Returns a query to fetch direct chat using userId - String fetchDirectChatsByUserId(String userId) { - return ''' - query { - directChatsByUserID(id: "$userId") { - _id - users{ - _id - firstName - email - } - } - } - '''; - } - - //Returns query to fetch direct chat messages using chatId - String fetchDirectChatMessagesByChatId(String chatId) { - return ''' - query { - directChatsMessagesByChatID(id: "$chatId") { - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } - '''; - } - - //Gets messages sent to direct chat subscription - String get messageSentToDirectChatsubscription => ''' - subscription{ - messageSentToDirectChat{ - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } - '''; - - //Send message to direct chat. - String sendMessageToDirectChat() { - return ''' - mutation sendMessageToDirectChat( - \$chatId: ID! - \$messageContent: String! - ){ - sendMessageToDirectChat( - chatId: \$chatId - messageContent: \$messageContent - ) { - messageContent - sender{ - firstName - } - receiver{ - firstName - } - } - } - '''; - } -} diff --git a/lib/utils/comment_queries.dart b/lib/utils/comment_queries.dart deleted file mode 100644 index fa11f6c18..000000000 --- a/lib/utils/comment_queries.dart +++ /dev/null @@ -1,49 +0,0 @@ -///This class creates the queries dealing with comments. -class CommentQueries { - /// Creating a comment. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: The query for creating a comment - String createComment() { - return """ - mutation createComment(\$postId: ID!, \$text: String!) { - createComment(postId: \$postId, - data:{ - text: \$text, - } - ){ - _id - } - } - """; - } - - /// Get all comments for a post. - /// - /// **params**: - /// * `postId`: The id of the post to get comments for. - /// - /// **returns**: - /// * `String`: The query for getting all comments for a post. - String getPostsComments(String postId) { - return """ - query { - post(id: "$postId") - { _id, - comments{ - _id, - text, - createdAt - creator{ - firstName - lastName - } - } - } - } -"""; - } -} diff --git a/lib/utils/encryptor.dart b/lib/utils/encryptor.dart deleted file mode 100644 index becf9a455..000000000 --- a/lib/utils/encryptor.dart +++ /dev/null @@ -1,162 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; -import 'dart:typed_data'; - -import 'package:crypto/crypto.dart'; -import 'package:hive/hive.dart'; -import 'package:pointycastle/asymmetric/oaep.dart'; -import 'package:pointycastle/asymmetric/rsa.dart'; -import 'package:pointycastle/key_generators/rsa_key_generator.dart'; -import 'package:pointycastle/pointycastle.dart'; -import 'package:pointycastle/random/fortuna_random.dart'; -import 'package:talawa/models/asymetric_keys/asymetric_keys.dart'; - -/// Handles all of the encryption tasks in the codebase. -class Encryptor { - /// A global switch to flag the encryption. - /// - /// Since adding encryption invalidates all of the previous - /// data, disabling it by default will help in keeping - /// other contributors working without any issue. - /// TODO: Remove this and make encryption default. - static bool shouldEncrypt = false; - - /// Encrypts a given string with SHA256 Encryption. - /// - /// **params**: - /// * `data`: The string data to encrypt - /// - /// **returns**: - /// * `String`: SHA256 encrypted data - static String encryptString(String data) { - if (!shouldEncrypt) return data; - return sha256.convert(utf8.encode(data)).toString(); - } - - /// Generates RSA Key Pairs (Public/Private). - /// - /// Should be called only during app's first initialization, - /// and any future usage should be done by getting the keys - /// from the local storage. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `AsymmetricKeyPair`: The generated - /// public and private keys. - AsymmetricKeyPair generateRSAKeyPair() { - final secureRandom = FortunaRandom(); - final random = Random.secure(); - final List seeds = []; - for (int i = 0; i < 32; i++) { - seeds.add(random.nextInt(255)); - } - secureRandom.seed(KeyParameter(Uint8List.fromList(seeds))); - final rsapars = RSAKeyGeneratorParameters(BigInt.from(65537), 2048, 64); - final params = ParametersWithRandom(rsapars, secureRandom); - final keyGenerator = RSAKeyGenerator(); - keyGenerator.init(params); - return keyGenerator.generateKeyPair(); - } - - /// Saves the generated key pair to local storage. - /// - /// Any future usage of the keys must be initiated from here. - /// - /// **params**: - /// * `keyPair`: [AsymmetricKeyPair] to save. - /// * `hive`: The [HiveInterface] to store keys in. - /// - /// **returns**: - /// None - Future saveKeyPair( - AsymmetricKeyPair keyPair, - HiveInterface hive, - ) async { - // TODO: Implement secure storage here - final Box keysBox = - await hive.openBox('user_keys'); - keysBox.put('key_pair', AsymetricKeys(keyPair: keyPair)); - } - - /// Loads secret keys from the Hive db. - /// - /// **params**: - /// * `hive`: The [HiveInterface] to load keys from. - /// - /// **returns**: - /// * `Future>`: The public and - /// private key pair - Future> loadKeyPair( - HiveInterface hive, - ) async { - final keysBox = await hive.openBox('user_keys'); - return keysBox.get('key_pair')!.keyPair; - } - - /// Encrypts the given string data with Recipient's Public Key. - /// - /// **params**: - /// * `data`: The string to encrypt - /// * `recipientPublicKey`: Key to be used to encrypt. Recipient's public - /// key in our case. - /// - /// **returns**: - /// * `String`: Encrypted string - String assymetricEncryptString(String data, RSAPublicKey recipientPublicKey) { - final cipher = OAEPEncoding(RSAEngine()) - ..init(true, PublicKeyParameter(recipientPublicKey)); - - final encryptedBytes = cipher.process(Uint8List.fromList(data.codeUnits)); - return base64Encode(encryptedBytes); - } - - /// Encrypts the given string data with user's Private Key. - /// - /// **params**: - /// * `data`: The string to decrypt - /// * `privateKey`: Key to be used to decrypt. User's private key in our case. - /// - /// **returns**: - /// * `String`: Decrypted string - String assymetricDecryptString(String data, RSAPrivateKey privateKey) { - final cipher = OAEPEncoding(RSAEngine()) - ..init(false, PrivateKeyParameter(privateKey)); - - final decryptedBytes = cipher.process(base64Decode(data)); - return String.fromCharCodes(decryptedBytes); - } - - // TODO: Use this somewhere - - /// Helper function to decrypt the message. - /// - /// Internally uses the [loadKeyPair] function to get private key and - /// [assymetricDecryptString] to decrypt the given message. - /// - /// **params**: - /// * `message`: Message object containing a field named [encryptedMessage] - /// which is supposed to contained user's message in encrypted format. - /// * `hive`: The [HiveInterface] to store things in. - /// - /// **returns**: - /// None - Future receiveMessage( - Map message, - HiveInterface hive, - ) async { - try { - final encryptedMessage = message['encryptedMessage'] as String; - final privateKey = (await loadKeyPair(hive)).privateKey; - final decryptedMessage = assymetricDecryptString( - encryptedMessage, - privateKey as RSAPrivateKey, - ); - - print('Decrypted Message: $decryptedMessage'); - } catch (e) { - throw Exception('Error'); - } - } -} diff --git a/lib/utils/event_queries.dart b/lib/utils/event_queries.dart deleted file mode 100644 index 554c180f4..000000000 --- a/lib/utils/event_queries.dart +++ /dev/null @@ -1,193 +0,0 @@ -///This class creates queries related to the events. -class EventQueries { - /// Fetches events by organization ID. - /// - /// **params**: - /// * `orgId`: The ID of the organization to fetch events for. - /// - /// **returns**: - /// * `String`: Returns a GraphQL query string to fetch events associated with the specified organization ID. - /// - /// This function generates a GraphQL query string to retrieve events - /// based on the provided organization ID. - - String fetchOrgEvents(String orgId) { - return """ - query { - eventsByOrganizationConnection( - where: { - organization_id: "$orgId" - } - ) { - _id - organization { - _id - image - } - title - description - isPublic - isRegisterable - recurring - startDate - endDate - allDay - startTime - endTime - location - creator { - _id - firstName - lastName - } - admins { - _id - firstName - lastName - } - attendees { - _id - firstName - lastName - image - } - } - } - """; - } - - /// Fetches attendees by event ID. - /// - /// **params**: - /// * `eventId`: The ID of the event to fetch registrants for. - /// - /// **returns**: - /// * `String`: Returns a GraphQL query string to retrieve registrants associated with the specified event ID. - /// - /// This function generates a GraphQL query string to fetch registrants - /// based on the provided event ID. - String attendeesByEvent(String eventId) { - return ''' - query { - getEventAttendeesByEventId(eventId: "$eventId") { - eventId - userId - isRegistered - isInvited - isCheckedIn - isCheckedOut - } - } - '''; - } - - /// Creates a GraphQL mutation for adding an event. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: Returns a GraphQL mutation string to create an event. - /// - /// This function generates a GraphQL mutation string for creating an event. - String addEvent() { - return """ - mutation Mutation(\$data: EventInput!, \$recurrenceRuleData: RecurrenceRuleInput) { - createEvent(data: \$data, recurrenceRuleData: \$recurrenceRuleData) { - _id - title - description - } - } - """; - } - - /// Creates a GraphQL mutation for registering for an event. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: Returns a GraphQL mutation string to register for the specified event. - /// - /// This function generates a GraphQL mutation string for registering an individual for an event. - String registerForEvent() { - return """ - mutation registerForEvent(\$eventId: ID!) { - registerForEvent(id: \$eventId) { - _id - } - } - """; - } - - /// Creates a GraphQL mutation for deleting an event. - /// - /// **params**: - /// * `id`: The ID of the event to delete. - /// - /// **returns**: - /// * `String`: Returns a GraphQL mutation string to delete the specified event. - /// - /// This function generates a GraphQL mutation string for removing/deleting an event - /// based on the provided event ID. - String deleteEvent(String id) { - return """ - mutation { - removeEvent( - id: "$id", - ){ - _id - } - } - """; - } - - /// Creates a GraphQL mutation for updating an event. - /// - /// **params**: - /// * `eventId`: The ID of the event to update. - /// - /// **returns**: - /// * `String`: Returns a GraphQL mutation string to update the specified event. - /// - /// This function generates a GraphQL mutation string for updating an event - /// based on the provided parameters. It takes the event ID along with updated - /// details. - /// The mutation updates the event details and returns the ID, title, and description - /// of the updated event. - String updateEvent({ - eventId, - }) { - return """mutation updateEvent( - \$title:String!, - \$description: String!, - \$startTime: Time, - \$endTime: Time, - \$allDay: Boolean!, - \$recurring: Boolean!, - \$isPublic: Boolean!, - \$isRegisterable: Boolean!, - \$location: String, - ) { - updateEvent( - id: "$eventId" - data:{ - title: \$title, - description: \$description, - isPublic: \$isPublic, - isRegisterable: \$isRegisterable, - recurring: \$recurring, - allDay: \$allDay, - startTime: \$startTime - endTime: \$endTime - location: \$location - } - ){ - _id - title - description - } - }"""; - } -} diff --git a/lib/utils/post_queries.dart b/lib/utils/post_queries.dart deleted file mode 100644 index 2b4a82ace..000000000 --- a/lib/utils/post_queries.dart +++ /dev/null @@ -1,225 +0,0 @@ -///This class creates queries related to posts. -class PostQueries { - /// Getting Posts by Id. - /// - /// **params**: - /// * `orgId`: The organisation id - /// * `after`: The cursor after which the posts are to be fetched - /// * `before`: The cursor before which the posts are to be fetched - /// * `first`: The number of posts to be fetched from the start - /// * `last`: The number of posts to be fetched from the end - /// - /// **returns**: - /// * `String`: The query related to gettingPostsbyId - String getPostsById( - String orgId, - String? after, - String? before, - int? first, - int? last, - ) { - print(after); - final String? afterValue = after != null ? '"$after"' : null; - final String? beforeValue = before != null ? '"$before"' : null; - - return """ - query { - organizations(id: "$orgId") { - posts(first: $first, last:$last,after: $afterValue, before: $beforeValue) { - edges { - node { - _id - title - text - imageUrl - videoUrl - creator { - _id - firstName - lastName - email - } - createdAt - likeCount - commentCount - likedBy{ - _id - } - comments{ - _id - } - pinned - } - cursor - } - pageInfo { - startCursor - endCursor - hasNextPage - hasPreviousPage - } - totalCount - } - } - } -"""; - } - - /// Getting Post by Post Id. - /// - /// **params**: - /// * `postId`: The post id - /// - /// **returns**: - /// * `String`: The query related to gettingPostsbyId - String getPostById(String postId) { - return """ - query { - post(id: "$postId") - { - _id - text - createdAt - imageUrl - videoUrl - title - commentCount - likeCount - creator{ - _id - firstName - lastName - image - } - organization{ - _id - } - likedBy{ - _id - } - comments{ - _id, - text, - createdAt - creator{ - firstName - lastName - } - } - } - } -"""; - } - - /// Add Like to a post. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: The query related to addingLike - String addLike() { - return """ - mutation likePost(\$postID: ID!) { - likePost( id: \$postID,) - { - _id - } - } - """; - } - - /// Remove Like from a post. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: The query related to removingLike - String removeLike() { - return """ - mutation unlikePost(\$postID: ID!) { - unlikePost( id: \$postID,) - { - _id - likedBy{ - _id - } - } - } - """; - } - - /// Upload a post to database. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: The query related to uploadingPost. - String uploadPost() { - return ''' - mutation CreatePost( - \$text: String! - \$title: String! - \$imageUrl: URL - \$videoUrl: URL - \$organizationId: ID! - \$file: String - ) { - createPost( - data: { - text: \$text - title: \$title - imageUrl: \$imageUrl - videoUrl: \$videoUrl - organizationId: \$organizationId - } - file: \$file - ) { - _id - text - createdAt - imageUrl - videoUrl - title - commentCount - likeCount - creator{ - _id - firstName - lastName - image - } - organization{ - _id - } - likedBy{ - _id - } - comments{ - _id - } - } - } - '''; - } - - /// Mutation to remove the post. - /// - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: query is returned - String removePost() { - return ''' - mutation RemovePost(\$id: ID!) { - removePost(id: \$id) { - _id - } - } - '''; - } -} diff --git a/lib/utils/queries.dart b/lib/utils/queries.dart deleted file mode 100644 index 942490911..000000000 --- a/lib/utils/queries.dart +++ /dev/null @@ -1,592 +0,0 @@ -///This class returns some queries for the application. -class Queries { - //Returns a query to register a user. - - /// Mutation to register a user. - /// - /// - /// **params**: - /// * `firstName`: user's data. - /// * `lastName`: user's data. - /// * `email`: user's data. - /// * `password`: user's data. - /// * `selectedOrganization`: ID of the selected organization. - /// - /// **returns**: - /// * `String`: Return the mutation in string type to be passed to graphql client. - String registerUser( - String firstName, - String lastName, - String email, - String password, - String? selectedOrganization, - ) { - return """ - mutation{ - signUp(data: {firstName: "$firstName", lastName: "$lastName", email: "$email", password: "$password", selectedOrganization: "$selectedOrganization"}) - { - appUserProfile{ - adminFor{ - _id - name - } - createdOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - user{ - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - } - refreshToken - accessToken - } - } - """; - } - - //Returns a query to login the user - /// mutation to login the user. - /// - /// **params**: - /// * `email`: user's data - /// * `password`: user's data - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String loginUser(String email, String password) { - return """ - mutation { - login(data: {email: "$email", password: "$password"}){ - appUserProfile{ - adminFor{ - _id - name - } - createdOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - user{ - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - } - refreshToken - accessToken - } - } - """; - } - - /// to update user profile. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: return a mutation - String updateUserProfile() { - return """ - mutation UpdateUserProfile( - \$firstName: String - \$lastName: String - \$email: EmailAddress - \$file: String - ) { - updateUserProfile( - data: { firstName: \$firstName, lastName: \$lastName, email: \$email } - file: \$file - ) { - _id - } - } - """; - } - - /// logout muiation. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: simple mutation - String logout() { - return """ - mutation { - logout - } - """; - } - - /// getter for joined org. - /// - String get fetchJoinInOrg { - return """ - query organizationsConnection(\$first: Int, \$skip: Int){ - organizationsConnection( - first: \$first, - skip: \$skip, - orderBy: name_ASC - ){ - image - _id - name - image - description - address{ - city - countryCode - state - } - userRegistrationRequired - creator{ - firstName - lastName - } - members{ - firstName - lastName - image - } - admins{ - firstName - lastName - image - } - } - } -"""; - } - - /// getter for fetchJoinInOrgByName. - String get fetchJoinInOrgByName { - return """ - query organizationsConnection( - \$first: Int, - \$skip: Int, - \$nameStartsWith: String - ){ - organizationsConnection( - where:{ - name_starts_with: \$nameStartsWith, - visibleInSearch: true, - userRegistrationRequired: true, - } - first: \$first, - skip: \$skip, - orderBy: name_ASC - ){ - image - _id - name - image - userRegistrationRequired - creator{ - firstName - lastName - } - } - } -"""; - } - - /// make mutation string for joiining org by ord.id. - /// - /// - /// **params**: - /// * `orgId`: refer org object. - /// - /// **returns**: - /// * `String`: returns a string for client - String joinOrgById(String orgId) { - return ''' - mutation { - joinPublicOrganization(organizationId: "$orgId") { - joinedOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - - } - } - } - '''; - } - - /// mutation to send the member request. - /// - /// - /// **params**: - /// * `orgId`: refer org object - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String sendMembershipRequest(String orgId) { - return ''' - mutation { - sendMembershipRequest(organizationId: "$orgId"){ - organization{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - } - '''; - } - - /// mutation in string form, to be passed on to graphql client.. - String fetchUserInfo = ''' - query Users(\$id: ID!){ - users(where: { id: \$id }) { - appUserProfile{ - adminFor{ - _id - name - } - createdOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - user{ - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - description - userRegistrationRequired - creator{ - _id - firstName - lastName - image - } - } - } - } - } - } - '''; - - /// mutation for refresh token. - /// - /// **params**: - /// * `refreshToken`: related to auth, token based authentication, mutation to refresh the token - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String refreshToken(String refreshToken) { - return ''' - mutation{ - refreshToken(refreshToken: "$refreshToken"){ - accessToken - refreshToken - } - } - '''; - } - - /// lang update mutation. - /// - /// **params**: - /// * `languageCode`: lang code to identify the lang, refer lang jsons - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String updateLanguage(String languageCode) { - return ''' - mutation { - updateLanguage(languageCode: "$languageCode"){ - _id - firstName - appLanguageCode - } - } - '''; - } - - /// fetching org details with the help of id. - /// - /// - /// **params**: - /// * `orgId`: Org identifier - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String fetchOrgById(String orgId) { - return ''' - query{ - organizations(id: "$orgId"){ - image - _id - name - image - userRegistrationRequired - creator{ - firstName - lastName - } - } - } - '''; - } - - /// query to fetch user lang. - /// - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: query in string form, to be passed on to graphql client. - String userLanguage() { - return ''' - query{ - myLanguage - } - '''; - } - - /// query for new user language . - /// - /// - /// **params**: - /// * `userId`: user identifier - /// - /// **returns**: - /// * `String`: query in string form, to be passed on to graphql client. - String newUserLanguage(String userId) { - return ''' - query{ - userLanguage(userId:"$userId") - } - '''; - } - - /// query to fetch org details. - /// - /// **params**: - /// * `orgId`: org identifier - /// - /// **returns**: - /// * `String`: query in string form, to be passed on to graphql client. - String fetchOrgDetailsById(String orgId) { - return ''' - query{ - organizations(id: "$orgId"){ - image - _id - name - admins{ - _id - } - description - userRegistrationRequired - creator{ - _id - firstName - lastName - } - members{ - _id - firstName - lastName - image - } - } - } - '''; - } - - ///`getPluginList` queries all properties of pluginList from the server. - /// - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: query in string form, to be passed on to graphql client. - String getPluginsList() { - return ''' -query { - getPlugins { - _id - pluginName - pluginCreatedBy - pluginDesc - pluginInstallStatus - installedOrgs - } -} - '''; - } - - /// `createDonation` creates a new donation transaction by taking the userId ,orgId ,nameOfOrg ,nameOfUser as parameters. - /// - /// more_info_if_required - /// - /// **params**: - /// * `userId`: user identifier - /// * `orgId`: org identifier - /// * `nameOfOrg`: org data - /// * `nameOfUser`: user data - /// * `payPalId`: for payment - /// * `amount`: amount - /// - /// **returns**: - /// * `String`: mutation in string form, to be passed on to graphql client. - String createDonation( - String userId, - String orgId, - String nameOfOrg, - String nameOfUser, - String payPalId, - double amount, - ) { - return ''' - mutation createDonationMutation { createDonation( - userId :"$userId" - orgId :"$orgId", - nameOfOrg:"$nameOfOrg", - nameOfUser:"$nameOfUser", - payPalId:"$payPalId" - amount :$amount - ){ - _id - payPalId - userId - orgId - payPalId - nameOfUser - } - } - '''; - } -} diff --git a/lib/utils/validators.dart b/lib/utils/validators.dart deleted file mode 100644 index bc38df304..000000000 --- a/lib/utils/validators.dart +++ /dev/null @@ -1,194 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; - -///This class creats various validator methods for the application. -/// -///They are used to validate information given by the users. -class Validator { - /// Method to validate an organization's URL. - /// - /// **params**: - /// * `value`: the URL of the organization - /// - /// **returns**: - /// * `String?`: error message if URL is invalid. - static String? validateURL( - String value, - ) { - if (value.isEmpty) { - return 'Please verify URL first'; - } - final bool validURL = Uri.parse(value).isAbsolute; - if (!validURL) { - return 'Enter a valid URL'; - } - return null; - } - - /// Method to validate a user's first name. - /// - /// **params**: - /// * `value`: the value of the first name - /// - /// **returns**: - /// * `String?`: error message if first name is invalid. - static String? validateFirstName(String value) { - if (value.isEmpty) { - return 'Firstname must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r'(?=.*?[A-Za-z]).+'; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid Firstname"; - } - return null; - } - - /// Method to validate a user's last name. - /// - /// **params**: - /// * `value`: the value of the last name - /// - /// **returns**: - /// * `String?`: error message if last name is invalid. - static String? validateLastName(String value) { - if (value.isEmpty) { - return 'Lastname must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r"(?=.*?[A-Za-z]).+"; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid Lastname"; - } - return null; - } - - /// Method to validate a user's email. - /// - /// **params**: - /// * `email`: the entered email - /// - /// **returns**: - /// * `String?`: error message if email is invalid. - static String? validateEmail( - String email, - ) { - // If email is empty return. - if (email.isEmpty) { - return "Email must not be left blank"; - } - const String pattern = - r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$"; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(email)) { - return 'Please enter a valid Email Address'; - } - return null; - } - - /// Method to validate password. - /// - /// **params**: - /// * `password`: the entered password - /// - /// **returns**: - /// * `String?`: error message if password is invalid. - static String? validatePassword( - String password, - ) { - // If password is empty return. - if (password.isEmpty) { - return "Password must not be left blank"; - } - const String pattern = - r'^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[!@#\$&*%^~.]).{8,}$'; - final RegExp regExp = RegExp(pattern); - - //Regex for no spaces allowed - const String noSpaces = r'^\S+$'; - final RegExp noSpaceRegex = RegExp(noSpaces); - - if (!noSpaceRegex.hasMatch(password)) { - return "Password must not contain spaces"; - } - if (!regExp.hasMatch(password)) { - return "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)"; - } - - return null; - } - - /// Method to valid password re-entered for confirmation. - /// - /// **params**: - /// * `value`: the entered password - /// * `comparator`: the original password - /// - /// **returns**: - /// * `String?`: error message if password is invalid. - static String? validatePasswordConfirm( - String value, - String comparator, - ) { - if (value != comparator) { - return 'Password does not match original'; - } - return null; - } - - /// Method to validate already exisiting URL. - /// - /// **params**: - /// * `url`: the entered URL - /// - /// **returns**: - /// * `Future`: true if URL exists, false otherwise. - Future validateUrlExistence(String url) async { - try { - await http.get(Uri.parse(url)); - return true; - } on Exception catch (e) { - debugPrint(e.toString()); - return false; - } - } - - /// Method to validate event form. - /// - /// **params**: - /// * `value`: the value of the field - /// * `label`: the (optional) label of the field - /// - /// **returns**: - /// * `String?`: error message if field is invalid. - static String? validateEventForm(String value, String? label) { - if (value.isEmpty) { - return '$label must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r'(?=.*?[A-Za-z]).+'; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid $label"; - } - return null; - } - - /// Method to validate event time. - /// - /// **params**: - /// * `startTime`: the start time of the event - /// * `endTime`: the end time of the event - /// - /// **returns**: - /// * `String?`: error message if time is invalid. - static String? validateEventTime(TimeOfDay startTime, TimeOfDay endTime) { - if (startTime.hour > endTime.hour || - (startTime.hour == endTime.hour && startTime.minute > endTime.minute)) { - return 'Start time must be before or equal to end time'; - } - return null; - } -} diff --git a/lib/view_model/access_request_view_model.dart b/lib/view_model/access_request_view_model.dart deleted file mode 100644 index 2057499c6..000000000 --- a/lib/view_model/access_request_view_model.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// AccessScreenViewModel widget. -class AccessScreenViewModel extends BaseModel { - /// selectedOrganization list. - late OrgInfo selectedOrganization = OrgInfo(id: '-1'); - - /// organizations list. - late List organizations = []; - - /// org identifier. - late String orgId; - - /// text controller for optional message during the request. - final optionalMessageController = TextEditingController(); - - /// Initialization function. - /// - /// **params**: - /// * `org`: Org to send request to. - /// - /// **returns**: - /// None - Future initialise(OrgInfo org) async { - selectedOrganization = org; - } - - /// Sending member ship request function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future sendMembershipRequest() async { - //TODO: Implement Message arg for below function - final result = await databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(selectedOrganization.id!), - ); - if (result != null) { - final OrgInfo membershipRequest = OrgInfo.fromJson( - (((result as QueryResult).data!)['sendMembershipRequest'] - as Map)['organization'] as Map, - ); - userConfig.updateUserMemberRequestOrg([membershipRequest]); - if (userConfig.currentUser.joinedOrganizations!.isEmpty) { - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - 'Join in request sent to ${selectedOrganization.name} successfully', - MessageType.info, - ); - } - } - } -} diff --git a/lib/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart b/lib/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart deleted file mode 100644 index 0885df8ea..000000000 --- a/lib/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart +++ /dev/null @@ -1,219 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/image_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/post_queries.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// AddPostViewModel class have different functions. -/// -/// They are used to interact with the model to add a new post in the -/// organization. -class AddPostViewModel extends BaseModel { - AddPostViewModel({this.demoMode = false}); - - // Services - late MultiMediaPickerService _multiMediaPickerService; - late NavigationService _navigationService; - late ImageService _imageService; - - late File? _imageFile; - late String? _imageInBase64; - late OrgInfo _selectedOrg; - final TextEditingController _controller = TextEditingController(); - final TextEditingController _textHashTagController = TextEditingController(); - final TextEditingController _titleController = TextEditingController(); - - /// Whether the app is running in Demo Mode. - late bool demoMode; - - /// The image file that is to be uploaded. - /// - /// params: - /// None - /// returns: - /// * `File?`: The image file - File? get imageFile => _imageFile; - - /// Method to set image. - /// - /// - /// **params**: - /// * `file`: The file to set - /// - /// **returns**: - /// None - void setImageFile(File? file) { - _imageFile = file; - notifyListeners(); - } - - /// Getter to access the base64 type. - String? get imageInBase64 => _imageInBase64; - - /// Method to set Image in Bsse64. - /// - /// **params**: - /// * `file`: The file to convert. - /// - /// **returns**: - /// None - Future setImageInBase64(File file) async { - _imageInBase64 = await _imageService.convertToBase64(file); - notifyListeners(); - } - - /// The username of the currentUser. - String get userName => - userConfig.currentUser.firstName! + userConfig.currentUser.lastName!; - - /// User profile picture. - String? get userPic => userConfig.currentUser.image; - - /// The organisation name. - String get orgName => _selectedOrg.name!; - - /// The main text controller of the post body. - TextEditingController get controller => _controller; - - /// The main text controller of the hashtag. - TextEditingController get textHashTagController => _textHashTagController; - - /// The text controller of the title body. - TextEditingController get titleController => _titleController; - late DataBaseMutationFunctions _dbFunctions; - - /// This function is usedto do initialisation of stuff in the view model. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialise() { - _navigationService = locator(); - _imageFile = null; - _imageInBase64 = null; - _multiMediaPickerService = locator(); - _imageService = locator(); - if (!demoMode) { - _dbFunctions = locator(); - _selectedOrg = locator().currentOrg; - } - } - - /// This function is used to get the image from gallery. - /// - /// The function uses the `_multiMediaPickerService` services. - /// - /// **params**: - /// * `camera`: if true then open camera for image, else open gallery to select image. - /// - /// **returns**: - /// None - Future getImageFromGallery({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - // convertImageToBase64(image!.path); - if (image != null) { - _imageFile = image; - // convertImageToBase64(image.path); - _imageInBase64 = await _imageService.convertToBase64(image); - // print(_imageInBase64); - _navigationService.showTalawaErrorSnackBar( - "Image is added", - MessageType.info, - ); - notifyListeners(); - } - } - - /// This function uploads the post finally, and navigate the success message or error message in Snack Bar. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future uploadPost() async { - // {TODO: Image not getting uploaded} - if (_imageFile == null) { - try { - final result = await _dbFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": "${_controller.text} #${_textHashTagController.text}", - "organizationId": _selectedOrg.id, - "title": _titleController.text, - }, - ); - final Post newPost = Post.fromJson( - (result as QueryResult).data!['createPost'] as Map, - ); - locator().addNewpost(newPost); - _navigationService.showTalawaErrorSnackBar( - "Post is uploaded", - MessageType.info, - ); - } on Exception catch (e) { - print(e); - _navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ); - } - } else { - try { - final result = await _dbFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": _controller.text, - "organizationId": _selectedOrg.id, - "title": _titleController.text, - "file": 'data:image/png;base64,${_imageInBase64!}', - }, - ); - final Post newPost = Post.fromJson( - (result as QueryResult).data!['createPost'] as Map, - ); - locator().addNewpost(newPost); - _navigationService.showTalawaErrorSnackBar( - "Post is uploaded", - MessageType.info, - ); - } on Exception catch (_) { - _navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ); - } - } - removeImage(); - _controller.text = ""; - _titleController.text = ""; - notifyListeners(); - } - - /// This function removes the image selected. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void removeImage() { - _imageFile = null; - notifyListeners(); - } -} diff --git a/lib/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart b/lib/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart deleted file mode 100644 index 5a4db6a25..000000000 --- a/lib/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart +++ /dev/null @@ -1,121 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:async'; - -import 'package:flutter/widgets.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -import 'package:talawa/services/chat_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// This ViewModel class have different functions that are used interact with model in the context of Direct Chat. -/// -/// Functions include: -/// * `initialise` : Initialise the states. -/// * `getChatMessages` : to get all the messages of a chat. -/// * `sendMessageToDirectChat` : to send the message to chat. -class DirectChatViewModel extends BaseModel { - final ChatService _chatService = locator(); - late StreamSubscription _chatListSubscription; - StreamSubscription? _chatMessageSubscription; - - final listKey = GlobalKey(); - - ChatState chatState = ChatState.initial; - - String? name; - - final Set _uniqueChatIds = {}; - final List _chats = []; - - List get chats => _chats; - - final Map> _chatMessagesByUser = {}; - - Map> get chatMessagesByUser => _chatMessagesByUser; - - /// This function refresh the chats. - void refreshChats() { - _chats.clear(); - _uniqueChatIds.clear(); - notifyListeners(); - _chatService.getDirectChatsByUserId(); - } - - // initialise - Future initialise() async { - setState(ViewState.busy); - chatState = ChatState.loading; - - _chatListSubscription = _chatService.chatListStream.listen((newChat) { - _uniqueChatIds.add(newChat.id!); - _chats.insert(0, newChat); - }); - - await _chatService.getDirectChatsByUserId(); - - chatState = ChatState.complete; - setState(ViewState.idle); - } - - /// This function get all messages for a chat. - /// - /// params: - /// * [chatId] : id of a chat for which messages need to be fetched. - Future getChatMessages(String chatId) async { - _chatMessagesByUser.clear(); - chatState = ChatState.loading; - // await _chatService.getMessagesFromDirectChat(); - // variable - final List messages = []; - _chatMessageSubscription = - _chatService.chatMessagesStream.listen((newMessage) { - messages.add(newMessage); - _chatMessagesByUser[chatId] = messages; - }); - // use `chatService` services - await _chatService.getDirectChatMessagesByChatId(chatId); - chatState = ChatState.complete; - notifyListeners(); - } - - /// This function send the message to Direct Chat. - /// - /// params: - /// * [chatId] : id of a chat where message need to be send. - /// * [messageContent] : content of a message. - Future sendMessageToDirectChat( - String chatId, - String messageContent, - ) async { - chatState = ChatState.loading; - _chatService.chatMessagesStream.listen((newMessage) { - _chatMessagesByUser[chatId]!.add(newMessage); - }); - await _chatService.sendMessageToDirectChat(chatId, messageContent); - chatState = ChatState.complete; - } - - @override - void dispose() { - _chatMessageSubscription?.cancel(); - _chatListSubscription.cancel(); - super.dispose(); - } - - // return chat name. - void chatName(chatId) { - final List users = - _chats.firstWhere((element) => element.id == chatId).users!; - - users.forEach((element) { - if (element.id != userConfig.currentUser.id!) { - name = element.firstName; - } - }); - } -} diff --git a/lib/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart b/lib/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart deleted file mode 100644 index fe5e174df..000000000 --- a/lib/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:talawa/locator.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/org_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// SelectContactViewModel class have different functions to interact with model. -/// -/// Functions include: -/// * `getCurrentOrgUsersList` : to get all users of current organization. -class SelectContactViewModel extends BaseModel { - late OrganizationService _organizationService; - - /// orgMembersList is used to store all users of current organization. - late List orgMembersList = []; - - /// This function initializes the [SelectContactViewModel] class. - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialise() { - _organizationService = locator(); - } - - /// function to get all users of current organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future getCurrentOrgUsersList() async { - if (orgMembersList.isEmpty) { - orgMembersList = await _organizationService - .getOrgMembersList(userConfig.currentOrg.id!); - notifyListeners(); - } - } -} diff --git a/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart deleted file mode 100644 index dd2ec28dd..000000000 --- a/lib/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart +++ /dev/null @@ -1,360 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/event_queries.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// CreateEventViewModel class have methods to interact with model in. -/// -/// the context of creating the event in the organization. -/// -/// Methods include: -/// * `createEvent` : to create an event. -/// * `getImageFromGallery` : to select image for a post. -/// * `removeImage` : to remove the image. -/// * `getCurrentOrgUsersList` : to get all user list of current organization. -/// * `removeUserFromList` : to remove a user from list. -class CreateEventViewModel extends BaseModel { - late MultiMediaPickerService _multiMediaPickerService; - late File? _imageFile; - - /// Event Title Text Controller. - TextEditingController eventTitleTextController = TextEditingController(); - - /// Event Location Text Controller. - TextEditingController eventLocationTextController = TextEditingController(); - - /// Event Description Text Controller. - TextEditingController eventDescriptionTextController = - TextEditingController(); - - /// Repeats Every count controller. - TextEditingController repeatsEveryCountController = - TextEditingController(text: '1'); - - /// Event ends After n occurences controller. - TextEditingController endOccurenceController = - TextEditingController(text: '1'); - - /// Event Start Time. - TimeOfDay eventStartTime = TimeOfDay.now(); - - /// Event End Time. - TimeOfDay eventEndTime = TimeOfDay.now().replacing( - hour: (TimeOfDay.now().hour + (TimeOfDay.now().minute >= 30 ? 1 : 0)) % 24, - minute: (TimeOfDay.now().minute + 30) % 60, - ); - - /// Event Start Date. - DateTime eventStartDate = DateTime.now(); - - /// Event End Date. - DateTime eventEndDate = DateTime.now(); - - /// Event Start Date for recurrence. - DateTime recurrenceStartDate = DateTime.now(); - - /// Event End Date for recurrence. - DateTime? recurrenceEndDate; - - /// Public Event or Not. - bool isPublicSwitch = true; - - /// If event is registerable after creation. - bool isRegisterableSwitch = true; - - /// TitleFocus FocusNode. - FocusNode titleFocus = FocusNode(); - - /// LocationFocus FocusNode. - FocusNode locationFocus = FocusNode(); - - /// DescriptionFocus FocusNode. - FocusNode descriptionFocus = FocusNode(); - - /// is an allday event. - bool isAllDay = true; - - /// Is a recurring event. - bool isRecurring = false; - - /// RecurrenceRuleData frequency. - String recurrenceInterval = EventIntervals.weekly; - - /// Event end type. - String eventEndType = EventEndTypes.never; - - /// represents the frequency of the event. - String frequency = Frequency.weekly; - - /// represents the week days of the event. - Set weekDays = { - days[DateTime.now().weekday - 1], - }; - - /// represents the interval of the event. - int interval = 1; - - /// represents the count of the event. - int? count; - - /// represents the week day occurence in Month. - int? weekDayOccurenceInMonth; - - /// represents the recurrence label. - String recurrenceLabel = 'Does not repeat'; - - //late OrganizationService _organizationService; - late final Map _memberCheckedMap = {}; - late final List _selectedMembers = []; - - /// Organisation Members List. - late List orgMembersList = []; - - /// Global FormKey. - final formKey = GlobalKey(); - final _eventService = locator(); - - /// AutoValidateMode default to disabled. - AutovalidateMode validate = AutovalidateMode.disabled; - - late OrgInfo _currentOrg; - final _userConfig = locator(); - - /// Getter to return selected members. - /// - /// params: - /// None - /// - /// returns: - /// * `List`: Returns a list of selectedMembers for events - List get selectedMembers => _selectedMembers; - - /// Getter to return members map. - /// - /// params: - /// None - /// - /// returns: - /// * `Map`: Returns a map of entries with id and boolean if they are - /// selected for events or not in bottom sheet. - Map get memberCheckedMap => _memberCheckedMap; - - /// Getter to return imageFile. - /// - /// params: - /// None - /// - /// returns: - /// * `File?`: Returns imageFile. - File? get imageFile => _imageFile; - - /// Function To Initialize. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialize() { - _currentOrg = _userConfig.currentOrg; - //_organizationService = locator(); - - _imageFile = null; - _multiMediaPickerService = locator(); - } - - /// This function is used to create the event for the organization. - /// - /// The function uses `database_mutation_functions` services to call the graphQL mutation - /// for creating an event and passes the required variables for the event. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future createEvent() async { - titleFocus.unfocus(); - locationFocus.unfocus(); - descriptionFocus.unfocus(); - validate = AutovalidateMode.always; - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - - // variables initialisation - final DateTime startTime = DateTime( - eventStartDate.year, - eventStartDate.month, - eventStartDate.day, - eventStartTime.hour, - eventStartTime.minute, - ); - final DateTime endTime = DateTime( - eventEndDate.year, - eventEndDate.month, - eventEndDate.day, - eventEndTime.hour, - eventEndTime.minute, - ); - // all required data for creating an event - final Map variables = { - "data": { - 'title': eventTitleTextController.text, - 'description': eventDescriptionTextController.text, - 'location': eventLocationTextController.text, - 'isPublic': isPublicSwitch, - 'isRegisterable': isRegisterableSwitch, - 'recurring': isRecurring, - 'allDay': isAllDay, - 'organizationId': _currentOrg.id, - 'startDate': DateFormat('yyyy-MM-dd').format(eventStartDate), - 'endDate': DateFormat('yyyy-MM-dd').format(eventEndDate), - 'startTime': - isAllDay ? null : '${DateFormat('HH:mm:ss').format(startTime)}Z', - 'endTime': - isAllDay ? null : '${DateFormat('HH:mm:ss').format(endTime)}Z', - }, - if (isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': DateFormat('yyyy-MM-dd').format( - recurrenceStartDate, - ), - 'recurrenceEndDate': recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(recurrenceEndDate!) - : null, - 'frequency': frequency, - 'weekDays': (frequency == Frequency.weekly || - (frequency == Frequency.monthly && - weekDayOccurenceInMonth != null)) - ? weekDays.toList() - : null, - 'interval': interval, - 'count': count, - 'weekDayOccurenceInMonth': weekDayOccurenceInMonth, - }, - }; - - navigationService.pushDialog( - const CustomProgressDialog(key: Key('EventCreationProgress')), - ); - // invoke the `gqlAuthMutation` function of `databaseFunctions` - // service along with the mutation query and variable map. - final result = await databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: variables, - ); - navigationService.pop(); - if (result != null) { - navigationService.pop(); - await _eventService.getEvents(); - } - } - } - - /// This function is used to get the image from gallery. - /// - /// The function uses the `_multiMediaPickerService` services. - /// - /// **params**: - /// * `camera`: if true then open camera for image, else open gallery to select image. - /// - /// **returns**: - /// None - Future getImageFromGallery({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - if (image != null) { - _imageFile = image; - notifyListeners(); - } - } - - /// This function remove the selected image. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void removeImage() { - _imageFile = null; - notifyListeners(); - } - - /// This function fetch all the users in the current organization and return `List`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future>`: Current Organization Users List - Future> getCurrentOrgUsersList() async { - if (orgMembersList.isEmpty) { - orgMembersList = await organizationService - .getOrgMembersList(userConfig.currentOrg.id!); - } - - // loop through list - orgMembersList.forEach((orgMember) { - _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - }); - // return list - return orgMembersList; - } - - /// This function build the user list. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void buildUserList() { - _selectedMembers.clear(); - - // loop through the organization member list - - orgMembersList.forEach((orgMember) { - if (_memberCheckedMap[orgMember.id] == true) { - _selectedMembers.add(orgMember); - } - }); - notifyListeners(); - } - - /// This function is used to remove a user from user's list. - /// - /// **params**: - /// * `userId`: id of the user that need to be removed. - /// - /// **returns**: - /// None - void removeUserFromList({required String userId}) { - _selectedMembers.removeWhere((user) => user.id == userId); - _memberCheckedMap[userId] = false; - - notifyListeners(); - } - - /// Updates the event end date to selected event end date. - /// - /// **params**: - /// * `selectedEndDate`: new event end date selected by user. - /// - /// **returns**: - /// None - void setEventEndDate(DateTime selectedEndDate) { - eventEndDate = selectedEndDate; - notifyListeners(); - } -} diff --git a/lib/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart deleted file mode 100644 index f7800f059..000000000 --- a/lib/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart +++ /dev/null @@ -1,98 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// EditEventViewModel class have methods to interact with model in -/// the context of editing the event in the organization. -/// -/// Methods include: -/// * `updateEvent` : to update an event. -class EditEventViewModel extends BaseModel { - late Event _event; - TextEditingController eventTitleTextController = TextEditingController(); - TextEditingController eventLocationTextController = TextEditingController(); - TextEditingController eventDescriptionTextController = - TextEditingController(); - TimeOfDay eventStartTime = TimeOfDay.now(); - TimeOfDay eventEndTime = TimeOfDay.now(); - DateTime eventStartDate = DateTime.now(); - DateTime eventEndDate = DateTime.now(); - bool isPublicSwitch = true; - bool isRegisterableSwitch = false; - FocusNode titleFocus = FocusNode(); - FocusNode locationFocus = FocusNode(); - FocusNode descriptionFocus = FocusNode(); - - final formKey = GlobalKey(); - - final _eventService = locator(); - AutovalidateMode validate = AutovalidateMode.disabled; - - // initialiser, invoke `_fillEditForm` function. - void initialize(Event event) { - _event = event; - _fillEditForm(); - } - - /// This function initialises the controller with the data. - void _fillEditForm() { - eventTitleTextController.text = _event.title!; - eventLocationTextController.text = _event.location!; - eventDescriptionTextController.text = _event.description!; - isPublicSwitch = _event.isPublic!; - isRegisterableSwitch = _event.isRegisterable!; - eventStartDate = DateFormat().add_yMd().parse(_event.startDate!); - eventEndDate = DateFormat().add_yMd().parse(_event.endDate!); - eventStartTime = - TimeOfDay.fromDateTime(DateFormat("h:mm a").parse(_event.startTime!)); - eventEndTime = - TimeOfDay.fromDateTime(DateFormat("h:mm a").parse(_event.endTime!)); - } - - /// This function is used to update an event. - /// The function uses `editEvent` function provided by `eventService` service. - Future updateEvent() async { - titleFocus.unfocus(); - locationFocus.unfocus(); - descriptionFocus.unfocus(); - validate = AutovalidateMode.always; - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - final DateTime startTime = DateTime( - eventStartDate.year, - eventStartDate.month, - eventStartDate.day, - eventStartTime.hour, - eventStartTime.minute, - ); - final DateTime endTime = DateTime( - eventEndDate.year, - eventEndDate.month, - eventEndDate.day, - eventEndTime.hour, - eventEndTime.minute, - ); - // map for the required data to update an event. - final Map variables = { - 'title': eventTitleTextController.text, - 'description': eventDescriptionTextController.text, - 'location': eventLocationTextController.text, - 'isPublic': isPublicSwitch, - 'isRegisterable': isRegisterableSwitch, - 'recurring': false, - 'allDay': false, - 'startDate': DateFormat('yyyy-MM-dd').format(eventStartDate), - 'endDate': DateFormat('yyyy-MM-dd').format(eventEndDate), - 'startTime': '${DateFormat('HH:mm:ss').format(startTime)}Z', - 'endTime': '${DateFormat('HH:mm:ss').format(endTime)}Z', - }; - _eventService.editEvent(eventId: _event.id!, variables: variables); - } - } -} diff --git a/lib/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart deleted file mode 100644 index 03b86bfe0..000000000 --- a/lib/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart +++ /dev/null @@ -1,104 +0,0 @@ -import 'package:flutter/scheduler.dart'; -import 'package:syncfusion_flutter_calendar/calendar.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// ViewModel for managing events and calendar view. -/// -/// This ViewModel handles operations related to events and calendar views. -class EventCalendarViewModel extends BaseModel { - /// List of events managed by the ViewModel. - late List _eventList = []; - - /// Controller for managing the calendar. - final CalendarController _calendarController = CalendarController(); - - /// Controller for managing the date range picker. - final DateRangePickerController _dateRangePickerController = - DateRangePickerController(); - - /// The current view of the calendar. - late CalendarView _calendarView; - - /// Getter for accessing the calendar controller. - CalendarController get calendarController => _calendarController; - - /// Getter for accessing the date range picker controller. - DateRangePickerController get dateRangePickerController => - _dateRangePickerController; - - /// Getter for accessing the current view of the calendar. - CalendarView get calendarView => _calendarView; - - /// Getter for accessing the current list of events. - List get eventList => _eventList; - - /// Initializes the view model. - /// - /// **params**: - /// * `eventList`: list of events. - /// - /// **returns**: - /// None - void initialize(List eventList) { - _eventList = eventList; - _calendarView = CalendarView.schedule; - } - - /// The function to triggered when the view is changed. - /// - /// **params**: - /// * `viewChangedDetails`: The dates that visible on the view changes in SfCalendar. type is ViewChangedDetails - /// - /// **returns**: - /// None - void viewChanged(ViewChangedDetails viewChangedDetails) { - print("came"); - SchedulerBinding.instance.addPostFrameCallback((timeStamp) { - _dateRangePickerController.selectedDate = - viewChangedDetails.visibleDates[0]; - _dateRangePickerController.displayDate = - viewChangedDetails.visibleDates[0]; - }); - } - - /// Changes the view of the calendar. - /// - /// **params**: - /// * `view`: String representing the desired view ("Day", "Month", "Schedule"). - /// - /// **returns**: - /// None - void changeView(String view) { - switch (view) { - case "Day": - _calendarView = CalendarView.day; - break; - case "Month": - _calendarView = CalendarView.month; - break; - case "Schedule": - _calendarView = CalendarView.schedule; - break; - default: - break; - } - calendarController.view = _calendarView; - notifyListeners(); - } - - /// function to be triggered when selection is changed. - /// - /// - /// **params**: - /// * `args`: Object of type DateRangePickerSelectionChangedArgs, The selected dates or ranges changes in the SfDateRangePicker. - /// - /// **returns**: - /// None - void selectionChanged(DateRangePickerSelectionChangedArgs args) { - SchedulerBinding.instance.addPostFrameCallback((timeStamp) { - _calendarController.displayDate = args.value as DateTime?; - }); - } -} diff --git a/lib/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart deleted file mode 100644 index 8835a662e..000000000 --- a/lib/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// EventInfoViewModel class helps interacting with model to serve view with the event information data. -class EventInfoViewModel extends BaseModel { - /// ExploreEventsViewModel instance to fetch the event data. - late ExploreEventsViewModel exploreEventsInstance; - - /// Event instance to store the event data. - late Event event; - - /// String type variable to store the FAB title. - late String fabTitle; - - /// List of Attendee type to store the attendees data. - late List attendees = []; - - /// This function initializes the EventInfoViewModel class with the required arguments. - /// - /// **params**: - /// * `args`: A map of arguments required to initialize the EventInfoViewModel class. - /// - /// **returns**: - /// None - Future initialize({required Map args}) async { - event = args["event"] as Event; - exploreEventsInstance = - args["exploreEventViewModel"] as ExploreEventsViewModel; - fabTitle = getFabTitle(); - setState(ViewState.busy); - - attendees = event.attendees ?? []; - setState(ViewState.idle); - } - - /// The function allows user to register for an event. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future registerForEvent() async { - // if event registration is open and user not already registered for the event. - if (event.isRegisterable == true && event.isRegistered == false) { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('RegisterEvent'), - ), - ); - - // use `registerForAnEvent` function provided by `EventService` service. - final registerResult = - await locator().registerForAnEvent(event.id!); - if (registerResult != null) { - event.isRegistered = true; - final userConfig = locator(); - attendees.add( - Attendee( - id: userConfig.currentUser.id, - firstName: userConfig.currentUser.firstName, - lastName: userConfig.currentUser.lastName, - image: userConfig.currentUser.image, - ), - ); - } - fabTitle = getFabTitle(); - navigationService.pop(); - notifyListeners(); - await locator().getEvents(); - } - } - - /// The funtion returns title to be displayed on Floating Action Button. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `String`: Returns the title to be displayed on Floating Action Button. - String getFabTitle() { - if (event.isRegisterable == false) { - return "Not Registrable"; - } else if (event.isRegistered == true) { - return "Registered"; - } else { - return "Register"; - } - } -} diff --git a/lib/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart b/lib/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart deleted file mode 100644 index 7b792d7be..000000000 --- a/lib/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart +++ /dev/null @@ -1,256 +0,0 @@ -import 'dart:async'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; - -/// ExploreEventsViewModel class helps to interact with model to serve data to view for event explore section. -/// -/// Methods include: -/// * `fetchNewEvents` : to fetch new events in the organization. -/// * `refreshEvents` : to refersh the event. -/// * `checkIfExistsAndAddNewEvent` : to check if the event exists or not, if now add a new event. -/// * `deleteEvent` : to delete the event. -/// * `choseValueFromDropdown` : to return the relevant message in the dropdown after any action. -class ExploreEventsViewModel extends BaseModel { - ExploreEventsViewModel({this.demoMode = false}); - - /// flag to check if the app is in demo mode. - bool demoMode; - - final _eventService = locator(); - late StreamSubscription _eventStreamSubscription; - - String _chosenValue = 'All Events'; - String _emptyListMessage = "Looks like there aren't any events."; - List _events = []; - final List _userEvents = []; - final Set _uniqueEventIds = {}; - late StreamSubscription _currentOrganizationStreamSubscription; - late final List _bufferEvents; - - /// Getter method to retrieve the list of events. - List get events => _events; - - /// Getter method to retrieve the list of User events. - List get userEvents => _userEvents; - - /// Getter method to retrieve the EventService instance. - EventService get eventService => _eventService; - - /// Getter method to retrieve the empty list message. - String get emptyListMessage => _emptyListMessage; - - /// Getter method to retrieve the chosen value. - String get chosenValue => _chosenValue; - - /// This function is used to fetch new events in the organization. - /// - /// The function uses `getEvents` method from `EventService`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future fetchNewEvents() async { - setState(ViewState.busy); - notifyListeners(); - await _eventService.getEvents(); - setState(ViewState.idle); - } - - /// This function is used to refresh the events in the organization. - /// - /// The function uses `getEvents` method from `EventService`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future refreshEvents() async { - setState(ViewState.busy); - _events.clear(); - _userEvents.clear(); - _uniqueEventIds.clear(); - await _eventService.getEvents(); - setState(ViewState.idle); - } - - /// initialiser. - /// - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future initialise() async { - setState(ViewState.busy); - if (!demoMode) { - _currentOrganizationStreamSubscription = userConfig.currentOrgInfoStream - .listen((updatedOrganization) => refreshEvents()); - await _eventService.getEvents(); - - _eventStreamSubscription = _eventService.eventStream.listen( - (newEvent) => checkIfExistsAndAddNewEvent(newEvent), - ); - _bufferEvents = _events; - } - setState(ViewState.idle); - } - - /// This function add a new event if the event not exist. - /// - /// **params**: - /// * `newEvent`: `Event` type variable containing data to create a new event. - /// - /// **returns**: - /// None - Future checkIfExistsAndAddNewEvent(Event newEvent) async { - // Check if the event is unique and belongs to the current organization - if (!_uniqueEventIds.contains(newEvent.id) && - newEvent.organization!.id == userConfig.currentOrg.id) { - _uniqueEventIds.add(newEvent.id!); - _events.insert(0, newEvent); - } - if (!_userEvents.any((event) => event.id == newEvent.id) && - newEvent.creator!.id == userConfig.currentUser.id) { - _userEvents.insert(0, newEvent); - } - notifyListeners(); - } - - /// This function deletes the event. - /// - /// **params**: - /// * `eventId`: id of the event that need to be delete. - /// - /// **returns**: - /// None - Future deleteEvent({required String eventId}) async { - // push the custom alert dialog to ask for confirmation. - navigationService.pushDialog( - CustomAlertDialog( - reverse: true, - dialogSubTitle: 'Are you sure you want to delete this event?', - successText: 'Delete', - success: () { - navigationService.pop(); - _eventService.deleteEvent(eventId).then( - (result) async { - if (result != null) { - navigationService.pop(); - setState(ViewState.busy); - _uniqueEventIds.remove(eventId); - _events.removeWhere((element) => element.id == eventId); - _userEvents.removeWhere((element) => element.id == eventId); - await Future.delayed(const Duration(milliseconds: 500)); - setState(ViewState.idle); - } - }, - ); - }, - ), - ); - } - - /// This function takes the choosen value from dropdown and return the filter events, if empty list then return relevant message. - /// - /// **params**: - /// * `value`: choosen value from dropdown. - /// - /// - /// **returns**: - /// None - Future choseValueFromDropdown(String value) async { - _chosenValue = value; - notifyListeners(); - setState(ViewState.busy); - - if (!demoMode) { - switch (_chosenValue) { - // if `_chosenValue` is "All events". - case 'All Events': - { - // all events - _events = _bufferEvents; - // if list is empty - _emptyListMessage = "Looks like there aren't any events."; - } - break; - // if `_chosenValue` is "created event". - case 'My Events': - { - // loop through the `_events` list and check - // for the creator id matched the current user id. - _events = List.from( - _bufferEvents.where( - (element) => element.creator!.id == userConfig.currentUser.id, - ), - ); - // if list is empty - _emptyListMessage = "You have not created any event."; - } - break; - // if `_chosenValue` is "Registered Events". - case 'Registered Events': - { - // loop through the `_events` list and filter elements - // if `element.isRegistered` is true and user is not the creator. - _events = List.from( - _bufferEvents.where( - (element) => - element.isRegistered == true && - element.creator!.id != userConfig.currentUser.id, - ), - ); - // if list is empty - _emptyListMessage = "No registered events are present"; - } - break; - // if `_chosenValue` is "Registered Events". - case 'Public Events': - { - // loop through the `_events` list and filter elements - // with the `isPublic` as true. - _events = _bufferEvents - .where((element) => element.isPublic == true) - .toList(); - - // if list is empty - _emptyListMessage = "There aren't any public events."; - } - break; - case 'Private Events': - { - // loop through the `_events` list and filter elements - // with the `isPublic` as false. - _events = _bufferEvents - .where((element) => element.isPublic == false) - .toList(); - // if list is empty - _emptyListMessage = "There aren't any private events."; - } - break; - - default: - { - _events = _bufferEvents; - } - } - } - await Future.delayed(const Duration(milliseconds: 500)); - setState(ViewState.idle); - } - - @override - void dispose() { - _eventStreamSubscription.cancel(); - _currentOrganizationStreamSubscription.cancel(); - super.dispose(); - } -} diff --git a/lib/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart b/lib/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart deleted file mode 100644 index 496f8724c..000000000 --- a/lib/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart +++ /dev/null @@ -1,304 +0,0 @@ -import 'dart:async'; - -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/demo_server_data/pinned_post_demo_data.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/post_queries.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// OrganizationFeedViewModel class helps to interact with model to serve data to view for organization feed section. -/// -/// Methods include: -/// * `setCurrentOrganizationName` : to set current organization name. -/// * `fetchNewPosts` : to fetch new posts in the organization. -/// * `navigateToIndividualPage` : to navigate to individual page. -/// * `navigateToPinnedPostPage` : to navigate to pinned post page. -/// * `addNewPost` : to add new post in the organization. -/// * `updatedPost` : to update a post in the organization. -class OrganizationFeedViewModel extends BaseModel { - // Local caching variables for a session. - // ignore: prefer_final_fields - List _posts = []; - final List _userPosts = []; - - /// flag for the test. - /// - bool istest = false; - List _pinnedPosts = - pinnedPostsDemoData.map((e) => Post.fromJson(e)).toList(); - final Set _renderedPostID = {}; - late String _currentOrgName = ""; - - // Importing services. - final NavigationService _navigationService = locator(); - final UserConfig _userConfig = locator(); - final PostService _postService = locator(); - late DataBaseMutationFunctions _dbFunctions; - - // Stream variables - late StreamSubscription _currentOrganizationStreamSubscription; - late StreamSubscription _postsSubscription; - late StreamSubscription _updatePostSubscription; - - // Getters - /// getter for the posts. - /// - List get posts { - // if (istest) { - // _posts = pinnedPostsDemoData.map((e) => Post.fromJson(e)).toList(); - // return _posts; - // } - return _posts; - } - - /// Getter for User Posts. - List get userPosts { - return _userPosts; - } - - /// getter for the pinned post. - /// - List get pinnedPosts { - if (istest) { - _pinnedPosts = []; - return _pinnedPosts; - } - return _pinnedPosts; - } - - /// getter for the currentOrgName. - /// - String get currentOrgName => _currentOrgName; - - bool _isFetchingPosts = false; - - /// getter for isFetchingPosts to show loading indicator. - bool get isFetchingPosts => _isFetchingPosts; - - /// This function sets the organization name after update. - /// - /// more_info_if_required - /// - /// **params**: - /// * `updatedOrganization`: updated organization name. - /// - /// **returns**: - /// None - void setCurrentOrganizationName(String updatedOrganization) { - // if `updatedOrganization` is not same to `_currentOrgName`. - if (updatedOrganization != _currentOrgName) { - _isFetchingPosts = true; - notifyListeners(); - _userPosts.clear(); - _posts.clear(); - _renderedPostID.clear(); - _currentOrgName = updatedOrganization; - notifyListeners(); - } - // _postService.getPosts(); - } - - /// This function fetches new posts in the organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void fetchNewPosts() { - _postService.refreshFeed(); - } - - /// To initialize the view model. - /// - /// more_info_if_required - /// - /// **params**: - /// * `isTest`: for test - /// - /// **returns**: - /// None - void initialise({ - bool isTest = false, - }) { - _isFetchingPosts = true; - - // For caching/initializing the current organization after the stream subscription has canceled and the stream is updated - _currentOrgName = _userConfig.currentOrg.name!; - // ------ - // Attaching the stream subscription to rebuild the widgets automatically - _currentOrganizationStreamSubscription = - _userConfig.currentOrgInfoStream.listen( - (updatedOrganization) => - setCurrentOrganizationName(updatedOrganization.name!), - ); - - _postsSubscription = _postService.postStream.listen((newPosts) { - return buildNewPosts(newPosts); - }); - - _updatePostSubscription = - _postService.updatedPostStream.listen((post) => updatedPost(post)); - - _dbFunctions = locator(); - if (isTest) { - istest = true; - } - _isFetchingPosts = false; - } - - // /// initializing the demo data. - // /// - // /// - // /// **params**: - // /// None - // /// - // /// **returns**: - // /// None - // void initializeWithDemoData() { - // // final postJsonResult = postsDemoData; - // // - // // ------ - // // // Calling function to ge the post for the only 1st time. - // // _postService.getPosts(); - // // - // // //fetching pinnedPosts - // // final pinnedPostJsonResult = pinnedPostsDemoData; - // // pinnedPostJsonResult.forEach((pinnedPostJsonData) { - // // _pinnedPosts.add(Post.fromJson(pinnedPostJsonData)); - // // }); - // } - - /// This function initialise `_posts` with `newPosts`. - /// - /// more_info_if_required - /// - /// **params**: - /// * `newPosts`: new post - /// - /// **returns**: - /// None - void buildNewPosts(List newPosts) { - _posts = newPosts; - final currentUserId = _userConfig.currentUser.id!; - _userPosts.clear(); - for (final post in newPosts) { - if (!_userPosts.any((element) => element.sId == post.sId) && - post.creator!.id == currentUserId) { - _userPosts.insert(0, post); - } - } - _isFetchingPosts = false; - notifyListeners(); - } - - /// This function navigate to individual post page.. - /// - /// **params**: - /// * `post`: define_the_param - /// - /// **returns**: - /// None - void navigateToIndividualPage(Post post) { - // uses `pushScreen` method by `navigationService` service. - _navigationService.pushScreen(Routes.individualPost, arguments: post); - } - - /// This function navigate to pinned post page. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void navigateToPinnedPostPage() { - // uses `pushScreen` method by `navigationService` service. - _navigationService.pushScreen( - Routes.pinnedPostPage, - arguments: _pinnedPosts, - ); - } - - @override - void dispose() { - // Canceling the subscription so that there will be no rebuild after the widget is disposed. - _currentOrganizationStreamSubscription.cancel(); - _postsSubscription.cancel(); - _updatePostSubscription.cancel(); - super.dispose(); - } - - /// This function adds new Post. - /// - /// **params**: - /// * `newPost`: define_the_param - /// - /// **returns**: - /// None - void addNewPost(Post newPost) { - _posts.insert(0, newPost); - notifyListeners(); - } - - /// This function updates the post. - /// - /// **params**: - /// * `post`: post object - /// - /// **returns**: - /// None - void updatedPost(Post post) { - for (int i = 0; i < _posts.length; i++) { - if (_posts[i].sId == post.sId) { - _posts[i] = post; - notifyListeners(); - break; - } - } - } - - /// function to remove the post. - /// - /// **params**: - /// * `post`: post object - /// - /// **returns**: - /// None - Future removePost(Post post) async { - await _dbFunctions.gqlAuthMutation( - PostQueries().removePost(), - variables: { - "id": post.sId, - }, - ); - _posts.remove(post); - notifyListeners(); - } - - /// Method to fetch next posts. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void nextPage() { - _postService.nextPage(); - } - - /// Method to fetch previous posts. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void previousPage() { - _postService.previousPage(); - } -} diff --git a/lib/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart b/lib/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart deleted file mode 100644 index f6e93eec6..000000000 --- a/lib/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart +++ /dev/null @@ -1,174 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// EditProfilePageViewModel class helps to interact with model to serve data to edit profile views. -/// -/// Methods include: -/// * `getImageFromGallery` -class EditProfilePageViewModel extends BaseModel { - /// current user. - final user = userConfig.currentUser; - late MultiMediaPickerService _multiMediaPickerService; - - /// profile image. - late File? imageFile; - - /// profile image in base64. - String? base64Image; - - /// first name controller. - late TextEditingController firstNameTextController; - - /// last name controller. - late TextEditingController lastNameTextController; - - /// Focus node tpo control focus. - FocusNode firstNameFocus = FocusNode(); - - /// Focus node tpo control focus. - FocusNode lastNameFocus = FocusNode(); - - /// Graphql client. - final databaseService = databaseFunctions; - - /// initialization function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialize() { - imageFile = null; - _multiMediaPickerService = locator(); - firstNameTextController = TextEditingController(text: user.firstName); - lastNameTextController = TextEditingController(text: user.lastName); - } - - /// This function is used to get the image from gallery. - /// - /// The function uses the `_multiMediaPickerService` services. - /// - /// **params**: - /// * `camera`: if true then open camera for image, else open gallery to select image. - /// - /// **returns**: - /// None - Future selectImage({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - if (image != null) { - imageFile = image; - notifyListeners(); - } - } - - /// This function is used to convert the image into Base64 format. - /// - /// **params**: - /// * `file`: Takes the image in format of file. - /// - /// **returns**: - /// * `Future`: image in string format - Future convertToBase64(File file) async { - try { - final List bytes = await file.readAsBytes(); - base64Image = base64Encode(bytes); - return base64Image!; - } catch (error) { - return ''; - } - } - - /// Method to update user profile. - /// - /// **params**: - /// * `firstName`: updated first name. - /// * `lastName`: updated last name. - /// * `newImage`: New profile picture that is to be updated. - /// - /// **returns**: - /// None - Future updateUserProfile({ - String? firstName, - String? lastName, - File? newImage, - }) async { - if (firstName == user.firstName && - newImage == null && - lastName == user.lastName) { - return; - } - try { - final Map variables = {}; - if (firstName != null) { - variables["firstName"] = firstName; - } - if (lastName != null) { - variables["lastName"] = lastName; - } - if (newImage != null) { - final String imageAsString = await convertToBase64(newImage); - variables["file"] = 'data:image/png;base64,$imageAsString'; - } - if (variables.isNotEmpty) { - await databaseService.gqlAuthMutation( - queries.updateUserProfile(), - variables: variables, - ); - // Fetch updated user info from the database and save it in hivebox. - final QueryResult result = await databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: {'id': user.id}, - ) as QueryResult; - - final List users = result.data!['users'] as List; - - final User userInfo = User.fromJson( - users[0] as Map, - fromOrg: false, - ); - userInfo.authToken = userConfig.currentUser.authToken; - userInfo.refreshToken = userConfig.currentUser.refreshToken; - - await userConfig.updateUser(userInfo); - notifyListeners(); - - user.firstName = firstName ?? user.firstName; - user.lastName = lastName ?? user.lastName; - firstNameTextController.text = user.firstName!; - lastNameTextController.text = user.lastName!; - - navigationService.showTalawaErrorSnackBar( - "Profile updated successfully", - MessageType.info, - ); - notifyListeners(); - } - } on Exception catch (_) { - navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ); - } - } - - /// This function remove the selected image. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void removeImage() { - imageFile = null; - notifyListeners(); - } -} diff --git a/lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart b/lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart deleted file mode 100644 index b8444880b..000000000 --- a/lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart +++ /dev/null @@ -1,295 +0,0 @@ -import 'package:currency_picker/currency_picker.dart'; -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:talawa/constants/constants.dart'; -import 'package:talawa/custom_painters/talawa_logo.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; - -/// ProfilePageViewModel class helps to interact with model to serve data and react to user's input in Profile Page view. -/// -/// Methods include: -/// * `logout` -class ProfilePageViewModel extends BaseModel { - // Services - final _userConfig = locator(); - final _navigationService = locator(); - final _appLanguageService = locator(); - - /// GlobalKey for scaffoldKey. - final GlobalKey scaffoldKey = GlobalKey(); - - /// FocusNode for donationField. - final FocusNode donationField = FocusNode(); - - /// Text Controller for donation Amount. - TextEditingController donationAmount = TextEditingController(); - - /// Hive Box of user. - late final Box user; - - /// Hive Box of url. - late final Box url; - - /// Hive Box of organisation. - late final Box organisation; - - /// Holds Current Organization. - late OrgInfo currentOrg; - - /// Holds Current user. - late User currentUser; - - /// Size of Bottom Sheet Height. - double bottomSheetHeight = SizeConfig.screenHeight! * 0.68; - - /// donationCurrency. - String donationCurrency = "USD"; - - /// Currency Symbol. - String donationCurrencySymbol = "\$"; - - /// denomination. - final List denomination = ['1', '5', '10']; - - /// First function to initialize the viewmodel. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialize() { - setState(ViewState.busy); - currentOrg = _userConfig.currentOrg; - currentUser = _userConfig.currentUser; - setState(ViewState.idle); - } - - /// This method changes the currency of the user for donation purpose. - /// - /// **params**: - /// * `context`: BuildContext of the widget - /// * `setter`: Setter Function - /// - /// **returns**: - /// None - void changeCurrency( - BuildContext context, - void Function(void Function()) setter, - ) { - showCurrencyPicker( - context: context, - currencyFilter: supportedCurrencies, - onSelect: (Currency currency) { - setter(() { - donationCurrency = currency.code; - donationCurrencySymbol = currency.symbol; - }); - }, - ); - } - - /// This Function creates a QR Code for latest release . - /// - /// **params**: - /// * `context`: Build Context - /// - /// **returns**: - /// None - void invite(BuildContext context) { - _appLanguageService.initialize(); - final String qrData = - '${GraphqlConfig.orgURI}?orgid=${userConfig.currentOrg.id!}'; - - showDialog( - context: context, - builder: (BuildContext context) { - return Dialog( - backgroundColor: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20.0), - ), - child: Container( - padding: const EdgeInsets.all(20), - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.80, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - iconButton( - CustomPaint( - size: const Size(48, 48 * 1), - painter: AppLogo(), - ), - () {}, - ), - const SizedBox(height: 20), - Text( - '${userConfig.currentOrg.name}', - style: const TextStyle( - fontSize: 22, - fontWeight: FontWeight.bold, - color: Colors.black87, - ), - ), - const SizedBox(height: 20), - QrImageView( - data: qrData, - version: QrVersions.auto, - size: 200.0, - ), - const SizedBox(height: 20), - Text( - AppLocalizations.of(context)!.strictTranslate('JOIN'), - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Colors.black87, - ), - ), - const SizedBox(height: 30), - ], - ), - ), - ); - }, - ); - } - - /// This widget returns the button for social media sharing option. - /// - /// **params**: - /// * `icon`: This is Widget type with icon details. - /// * `onTap`: This is Function which invoke on tap. - /// - /// **returns**: - /// * `Widget`: Icon Button - Widget iconButton(Widget icon, void Function() onTap) { - return Stack( - children: [ - IconButton( - key: const Key('iconbtn1'), - onPressed: () { - print('tapped'); - onTap(); - }, - icon: icon, - ), - ], - ); - } - - /// This widget returns button for domination. - /// - /// **params**: - /// * `amount`: donation Amount. - /// * `context`: BuildContext. - /// * `setter`: `Function` type, which on tap set the amount to `donationAmount`. - /// - /// **returns**: - /// * `Widget`: Icon Button - Widget dominationButton( - String amount, - BuildContext context, - void Function(void Function()) setter, - ) { - return InkWell( - key: Key('domBtn_$amount'), - onTap: () { - setter(() { - donationAmount.text = amount; - }); - }, - child: Container( - padding: EdgeInsets.symmetric( - vertical: SizeConfig.screenHeight! * 0.02, - horizontal: SizeConfig.screenWidth! * 0.075, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: donationAmount.text == amount - ? Theme.of(context).colorScheme.secondary - : Theme.of(context).colorScheme.primary, - ), - child: Text( - '$donationCurrencySymbol $amount', - style: Theme.of(context).textTheme.titleMedium, - ), - ), - ); - } - - /// This widget returns button for domination. - /// - /// **params**: - /// * `setter`: SetState holder. - /// - /// **returns**: - /// None - void attachListener(void Function(void Function()) setter) { - donationField.addListener(() { - if (donationField.hasFocus) { - setter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.8725; - }); - } else { - Future.delayed(const Duration(milliseconds: 300), () { - { - setter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.68; - }); - } - }); - } - }); - } - - /// pop the route from `navigationService`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void popBottomSheet() { - _navigationService.pop(); - } - - /// to update the bottom sheet height. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void updateSheetHeight() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.65; - notifyListeners(); - } - - /// show message on Snack Bar. - /// - /// **params**: - /// * `message`: String Message to show on snackbar - /// - /// **returns**: - /// None - void showSnackBar(String message) { - _navigationService.showTalawaErrorDialog(message, MessageType.error); - } -} diff --git a/lib/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart b/lib/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart deleted file mode 100644 index 49da3a680..000000000 --- a/lib/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:talawa/locator.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:url_launcher/url_launcher_string.dart'; - -/// ViewModel for the App Settings functionality. -/// -/// This ViewModel handles the logic and data for the application settings. -class AppSettingViewModel extends BaseModel { - // final _appLanguageService = locator(); - - /// This method destroys the user's session or sign out the user from app, The function asks for the confimation in Custom Alert Dialog. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: Logs the user out and returns the logout status as a [bool]. - Future logout() async { - // push custom alert dialog with the confirmation message. - final bool isloggedOut = await userConfig.userLogOut(); - return isloggedOut; - } - - /// Launches a website using the provided URL. - /// - /// **params**: - /// * `url`: A [String] representing the URL of the website to be launched. - /// - /// **returns**: - /// * `Future`: A [Future] that resolves to a [bool] value indicating - /// whether the website launch was successful. - Future launchWebsite(String url) async => await launchUrlString(url); -} diff --git a/lib/view_model/base_view_model.dart b/lib/view_model/base_view_model.dart deleted file mode 100644 index 840d03bac..000000000 --- a/lib/view_model/base_view_model.dart +++ /dev/null @@ -1,17 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; - -class BaseModel extends ChangeNotifier { - ViewState _state = ViewState.idle; - - ViewState get state => _state; - bool get isBusy => _state == ViewState.busy; - - void setState(ViewState viewState) { - _state = viewState; - notifyListeners(); - } -} diff --git a/lib/view_model/lang_view_model.dart b/lib/view_model/lang_view_model.dart deleted file mode 100644 index 061cf63e6..000000000 --- a/lib/view_model/lang_view_model.dart +++ /dev/null @@ -1,207 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// AppLanguage view model class interact with modal in the context of the App Language. -/// -/// The class provides methods that set's the language, change the language in the modal. -/// -/// Methods include: -/// * `fetchLocale` -/// * `changeLanguage` -/// * `selectLanguagePress` -/// * `dbLanguageUpdate` -/// * `appLanguageQuery` -/// * `userLanguageQuery` -class AppLanguage extends BaseModel { - AppLanguage({this.isTest = false}); - - /// Represents a boolean value indicating whether the current environment is a test environment. - final bool isTest; - - /// A service that provides navigation-related functionalities. - final navigationService = locator(); - - /// Functions related to database mutations. - final databaseFunctions = locator(); - - late Locale _appLocale; - - /// getter for appLocal. - Locale get appLocal => _appLocale; - - /// initialiser. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future initialize() async { - _appLocale = const Locale('en'); - await fetchLocale(); - } - - /// This function fetch the language of the user's app. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future fetchLocale() async { - final prefs = await SharedPreferences.getInstance(); - final String langCode = prefs.getString('language_code') ?? 'en'; - _appLocale = Locale(langCode); - - notifyListeners(); - } - - /// This function change the app default language. - /// - /// **params**: - /// * `type`: `Locale` type, the language need to be updated with. - /// - /// **returns**: - /// None - Future changeLanguage(Locale type) async { - // if the app language is of same [type]. - if (_appLocale == type) { - return; - } - - if (isTest) { - _appLocale = type; - } else { - final prefs = await SharedPreferences.getInstance(); - if (type == const Locale("es")) { - //If selected language is spanish - _appLocale = const Locale("es"); - await prefs.setString('language_code', 'es'); - await prefs.setString('countryCode', 'ES'); - } else if (type == const Locale("fr")) { - //If selected language is french - _appLocale = const Locale("fr"); - await prefs.setString('language_code', 'fr'); - await prefs.setString('countryCode', 'FR'); - } else if (type == const Locale("hi")) { - //If selected language is hindi - _appLocale = const Locale("hi"); - await prefs.setString('language_code', 'hi'); - await prefs.setString('countryCode', 'IN'); - } else if (type == const Locale("zh")) { - //If selected language is Chinese - _appLocale = const Locale("zh"); - await prefs.setString('language_code', 'zh'); - await prefs.setString('countryCode', 'CN'); - } else if (type == const Locale("de")) { - //If selected language is Chinese - _appLocale = const Locale("de"); - await prefs.setString('language_code', 'de'); - await prefs.setString('countryCode', 'GE'); - } else if (type == const Locale("ja")) { - //If selected language is Chinese - _appLocale = const Locale("ja"); - await prefs.setString('language_code', 'ja'); - await prefs.setString('countryCode', 'JP'); - } else if (type == const Locale("pt")) { - //If selected language is Chinese - _appLocale = const Locale("pt"); - await prefs.setString('language_code', 'pt'); - await prefs.setString('countryCode', 'PT'); - } else { - //If selected language is english - _appLocale = const Locale("en"); - await prefs.setString('language_code', 'en'); - await prefs.setString('countryCode', 'US'); - } - } - - /// notifying the consumers - notifyListeners(); - } - - /// Navigates the user after choosing lthe anguage. - /// - /// This function navigate user to `/appSettingsPage` route if the user - /// is authenticated else navigate to `demoMode - /MainScreenPage` route. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future selectLanguagePress() async { - if (userConfig.currentUser.id != 'null') { - dbLanguageUpdate(); - navigationService.popAndPushScreen('/appSettingsPage', arguments: ''); - } else { - navigationService.pushScreen( - Routes.mainScreen, - arguments: MainScreenArgs( - mainScreenIndex: 0, - fromSignUp: false, - toggleDemoMode: true, - ), - ); - } - } - - /// This function updates the Database Language by running the graphQL `mutations`. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future dbLanguageUpdate() async { - try { - await databaseFunctions - .gqlAuthMutation(queries.updateLanguage(_appLocale.languageCode)); - print('Language Updated in Database'); - } catch (e) { - print(e); - } - } - - /// Queries the app language. - /// - /// Performs graphQL query to check the app language. - /// The function uses `gqlAuthQuery` method provided by Database - /// Functions Services. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future appLanguageQuery() async { - try { - await databaseFunctions.gqlAuthQuery(queries.userLanguage()); - } catch (e) { - print(e); - } - } - - /// This function perform graphQL query to check the user's language in the database. - /// - /// The function uses `gqlAuthQuery` method provided by Database Functions Services. - /// - /// **params**: - /// * `userId`: user for which language need to be fetch. - /// - /// **returns**: - /// None - Future userLanguageQuery(String userId) async { - try { - await databaseFunctions.gqlAuthQuery(queries.newUserLanguage(userId)); - } catch (e) { - print(e); - } - } -} diff --git a/lib/view_model/main_screen_view_model.dart b/lib/view_model/main_screen_view_model.dart deleted file mode 100644 index 2cb601310..000000000 --- a/lib/view_model/main_screen_view_model.dart +++ /dev/null @@ -1,761 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/app_tour.dart'; -import 'package:talawa/plugins/fetch_plugin_list.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -// import 'package:talawa/views/after_auth_screens/chat/chat_list_screen.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; -import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; -import 'package:talawa/views/demo_screens/explore_events_demo.dart'; -import 'package:talawa/views/demo_screens/organization_feed_demo.dart'; -import 'package:talawa/views/demo_screens/profile_page_demo.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -import 'package:talawa/widgets/theme_switch.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -/// MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views. -/// -/// The functions in this class are -/// mainly in the context of Tutorials for different componenets of the App. -/// -/// Functions include: -/// * `showTutorial` -/// * `showHome` -/// * `tourEventTargets` -/// * `tourAddPost` -/// * `tourChat` -/// * `tourProfile` -class MainScreenViewModel extends BaseModel { - /// static variables. - static final GlobalKey scaffoldKey = - GlobalKey(); - - /// static variables. - final GlobalKey keyBNHome = GlobalKey(debugLabel: "HomeTab"); - - /// static variables. - final GlobalKey keyBNDemoHome = GlobalKey(debugLabel: "DemoHomeTab"); - - /// static variables. - final GlobalKey keySHPinnedPost = - GlobalKey(debugLabel: "HomeScreenPinnedPost"); - - /// static variables. - final GlobalKey keySHPost = GlobalKey(debugLabel: "HomeScreenPost"); - - /// static variables. - final GlobalKey keySHOrgName = GlobalKey(debugLabel: "HomeScreenOrgName"); - - /// static variables. - final GlobalKey keySHMenuIcon = GlobalKey(debugLabel: "HomeScreenMenuIcon"); - - /// static variables. - static final GlobalKey keyDrawerCurOrg = - GlobalKey(debugLabel: "DrawerCurrentOrg"); - - /// static variables. - static final GlobalKey keyDrawerSwitchableOrg = - GlobalKey(debugLabel: "DrawerSwitchableOrg"); - - /// static variables. - static final GlobalKey keyDrawerJoinOrg = - GlobalKey(debugLabel: "DrawerJoinOrg"); - - /// static variables. - static final GlobalKey keyDrawerLeaveCurrentOrg = - GlobalKey(debugLabel: "DrawerLeaveCurrentOr"); - - /// static variables. - final GlobalKey keyBNEvents = GlobalKey(debugLabel: "EventTab"); - - /// static variables. - final GlobalKey keyBNDemoEvents = GlobalKey(debugLabel: "DemoEventTab"); - - /// static variables. - final GlobalKey keySECategoryMenu = - GlobalKey(debugLabel: "EventScreenCategory"); - - /// static variables. - final GlobalKey keySEDateFilter = - GlobalKey(debugLabel: "EventScreenDateFilter"); - - /// static variables. - final GlobalKey keySEAdd = GlobalKey(debugLabel: "EventScreenAdd"); - - /// static variables. - final GlobalKey keySECard = GlobalKey(debugLabel: "EventScreenCard"); - - /// static variables. - final GlobalKey keyBNPost = GlobalKey(debugLabel: "PostTab"); - - /// static variables. - final GlobalKey keyBNDemoPost = GlobalKey(debugLabel: "DemoPostTab"); - - /// static variables. - final GlobalKey keyBNChat = GlobalKey(debugLabel: "ChatTab"); - - /// static variables. - final GlobalKey keyBNProfile = GlobalKey(debugLabel: "ProfileTab"); - - /// static variables. - final GlobalKey keyBNDemoProfile = GlobalKey(debugLabel: "DemoProfileTab"); - - /// static variables. - final GlobalKey keySPEditProfile = GlobalKey(debugLabel: "ProfileScreenEdit"); - - /// static variables. - final GlobalKey keySPAppSetting = - GlobalKey(debugLabel: "ProfileScreenAppSetting"); - - /// static variables. - final GlobalKey keySPHelp = GlobalKey(debugLabel: "ProfileScreenHelp"); - - /// static variables. - final GlobalKey keySPDonateUs = - GlobalKey(debugLabel: "ProfileScreenDonateUs"); - - /// static variables. - final GlobalKey keySPInvite = GlobalKey(debugLabel: "ProfileScreenInvite"); - - /// static variables. - final GlobalKey keySPLogout = GlobalKey(debugLabel: "ProfileScreenLogout"); - - /// static variables. - final GlobalKey keySPPalisadoes = - GlobalKey(debugLabel: "ProfileScreenPalisadoes"); - - /// bool to determine if we wanna show the apptour. - late bool showAppTour; - - /// bool to determine if apptour is complete. - bool tourComplete = false; - - /// bool to determine if apptour is skipped. - bool tourSkipped = false; - - /// context consist of parent info. - late BuildContext context; - - /// tutorialCoachMark consist of coach used to give tutorial. - late AppTour appTour = AppTour(model: this); - - /// array of target. - final List targets = []; - - /// flag to represent if app is in demoMode. - bool demoMode = false; - - /// flag to represent if app is in testMode. - bool testMode = false; - - /// Initalizing function. - /// - /// **params**: - /// * `ctx`: BuildContext, contain parent info - /// * `fromSignUp`: Bool to find user entry - /// * `mainScreenIndex`: Index to find tab on mainScreen - /// * `demoMode`: Whether the app is in demo mode - /// * `testMode`: Whether the app is in test mode - /// - /// **returns**: - /// None - void initialise( - BuildContext ctx, { - required bool fromSignUp, - required int mainScreenIndex, - bool demoMode = false, - bool testMode = false, - }) { - this.testMode = testMode; - this.demoMode = demoMode; - currentPageIndex = mainScreenIndex; - showAppTour = fromSignUp || demoMode; - context = ctx; - - print(ctx); - print(context); - pluginPrototypeData = { - "Donation": { - "icon": Icons.attach_money_outlined, - "page": const ChangeThemeTile(), - }, - }; - - notifyListeners(); - if (!showAppTour) { - tourComplete = true; - tourSkipped = false; - } else { - Future.delayed( - const Duration(seconds: 1), - () => navigationService.pushDialog( - appTourDialog(ctx), - ), - ); - } - } - - /// Contains the Widgets to be rendered for corresponding navbar items. - /// - /// Features that should be implemented as plugins should be kept here. - List pages = []; - - /// Actual [BottomNavigationBarItem]s that show up on the screen. - List navBarItems = []; - - /// Maps the feature names with their proper Icon and Page. - /// - /// `icon` contains the [IconData] corresponding to plugin's icon. - /// `page` contains the corresponding page to be displayed. - /// Name of the feature provided by the admin must [exactly] match with the. - /// name stored here. - Map pluginPrototypeData = {}; - - /// list of all the pluginList. - List pluginList = []; - - /// Dynamically adds [BottomNavigationBarItems] in `BottomNavigationBar`. - /// - /// by mapping over the data received from the server. - /// - /// **params**: - /// * `context`: its the same context you use everywhere in the flutter framework refer flutter docs for more info. - /// - /// **returns**: - /// None - void fetchAndAddPlugins( - BuildContext context, - ) { - navBarItems = [ - BottomNavigationBarItem( - icon: Icon( - Icons.home, - key: keyBNHome, - ), - label: AppLocalizations.of(context)!.strictTranslate('Home'), - ), - BottomNavigationBarItem( - icon: Icon( - Icons.event_note, - key: keyBNEvents, - ), - label: AppLocalizations.of(context)!.strictTranslate('Events'), - ), - - /// Makes chat inaccessible for the user - //TODO: add chat functionality - // BottomNavigationBarItem( - // icon: Icon( - // Icons.chat_outlined, - // key: keyBNChat, - // ), - // label: AppLocalizations.of(context)!.strictTranslate('Chat'), - // ), - BottomNavigationBarItem( - icon: Icon( - Icons.account_circle, - key: keyBNProfile, - ), - label: AppLocalizations.of(context)!.strictTranslate('Profile'), - ), - ]; - - if (!demoMode) { - pages = [ - OrganizationFeed( - key: const Key("HomeView"), - homeModel: this, - ), - ExploreEvents( - key: const Key('ExploreEvents'), - homeModel: this, - ), - // AddPost( - // key: const Key('AddPost'), - // drawerKey: MainScreenViewModel.scaffoldKey, - // ), - // const ChatPage( - // key: Key('Chats'), - // ), - ProfilePage( - key: keySPEditProfile, - homeModel: this, - ), - ]; - pluginList = - (Hive.box('pluginBox').get('plugins') ?? []) as List; - - print(pluginPrototypeData); - pluginList.forEach((plugin) { - if (pluginPrototypeData.containsKey( - (plugin as Map)["pluginName"] as String, - ) && - plugin["pluginInstallStatus"] as bool) { - navBarItems.add( - BottomNavigationBarItem( - icon: Icon( - (pluginPrototypeData[plugin["pluginName"]] - as Map)["icon"] as IconData, - ), - label: AppLocalizations.of(context)!.strictTranslate( - plugin["pluginName"] as String, - ), - ), - ); - pages.add( - (pluginPrototypeData[plugin["pluginName"]] - as Map)["class"] as StatelessWidget, - ); - } - }); - - /// Causes the app check the plugins updates in every 300 sec - /// - /// updated and re-render the navbar - Timer.periodic(Duration(seconds: (testMode ? 1 : 300)), (timer) { - FetchPluginList(); - final newPluginList = - (Hive.box('pluginBox').get('plugins') ?? []) as List; - - if (listEquals(pluginList, newPluginList)) { - // notifyListeners(); - } - if (testMode) timer.cancel(); - }); - } else { - pages = [ - DemoOrganizationFeed( - key: const Key("DemoHomeView"), - homeModel: this, - ), - DemoExploreEvents( - key: const Key('DemoExploreEvents'), - homeModel: this, - ), - // DemoAddPost( - // key: const Key('DemoAddPost'), - // drawerKey: MainScreenViewModel.scaffoldKey, - // ), - // const ChatPage( - // key: Key('Chats'), - // ), - DemoProfilePage( - key: const Key('DemoProfile'), - homeModel: this, - ), - ]; - } - } - - /// var for current page in index. - int currentPageIndex = 0; - - /// Handles click on [BottomNavigationBarItem]. - /// - /// **params**: - /// * `index`: it is track of current page index. - /// - /// **returns**: - /// None - void onTabTapped(int index) { - currentPageIndex = index; - notifyListeners(); - } - - /// Builds and returns an AppTourDialog. - /// - /// **params**: - /// * `ctx`: The build context to work with. - /// - /// **returns**: - /// * `Widget`: The built [Dialog] - Widget appTourDialog(BuildContext ctx) { - return CustomAlertDialog( - dialogTitle: 'App Tour', - dialogSubTitle: 'Start app tour to know talawa functioning', - successText: 'Start', - secondaryButtonText: 'Skip', - success: () { - navigationService.pop(); - print(MainScreenViewModel.scaffoldKey.currentState?.isDrawerOpen); - if (MainScreenViewModel.scaffoldKey.currentState?.isDrawerOpen ?? - false) { - MainScreenViewModel.scaffoldKey.currentState?.closeDrawer(); - } - tourHomeTargets(); - }, - secondaryButtonTap: () { - tourComplete = false; - tourSkipped = true; - navigationService.pop(); - notifyListeners(); - }, - ); - } - - /// Starts the tour and info to be displayed is mentioned in this functions. - /// - /// **params**: - /// * `givenUserConfig`: Mock user config that helps in testing. - /// - /// **returns**: - /// None - void tourHomeTargets([UserConfig? givenUserConfig]) { - final UserConfig localUserConfig = givenUserConfig ?? userConfig; - targets.clear(); - targets.add( - FocusTarget( - key: keySHOrgName, - keyName: 'keySHOrgName', - description: 'Current selected Organization Name', - appTour: appTour, - ), - ); - targets.add( - FocusTarget( - key: keySHMenuIcon, - keyName: 'keySHMenuIcon', - description: - 'Click this button to see options related to switching, joining and leaving organization(s)', - isCircle: true, - next: () => scaffoldKey.currentState!.openDrawer(), - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keyDrawerCurOrg, - keyName: 'keyDrawerCurOrg', - description: "Current selected Organization's Name appears here", - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keyDrawerSwitchableOrg, - keyName: 'keyDrawerSwitchableOrg', - description: - "All your joined organizations appear over here you can click on them to change the current organization", - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keyDrawerJoinOrg, - keyName: 'keyDrawerJoinOrg', - description: "From this button you can join other listed organizations", - appTour: appTour, - align: ContentAlign.top, - next: () { - if (!localUserConfig.loggedIn) { - navigationService.pop(); - } - }, - ), - ); - - if (localUserConfig.loggedIn) { - targets.add( - FocusTarget( - key: keyDrawerLeaveCurrentOrg, - keyName: 'keyDrawerLeaveCurrentOrg', - description: - "To leave the current organization you can use this option", - align: ContentAlign.top, - next: () => navigationService.pop(), - appTour: appTour, - ), - ); - } - - targets.add( - FocusTarget( - key: keyBNHome, - keyName: 'keyBNHome', - description: - "This is the home tab here you can see the latest post from other members of the current organization", - isCircle: true, - align: ContentAlign.top, - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySHPinnedPost, - keyName: 'keySHPinnedPost', - description: - "This section displays all the important post set by the organization admin(s)", - align: ContentAlign.bottom, - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySHPost, - keyName: 'keySHPost', - description: - "This is the post card you can like and comment on the post from the options available", - align: ContentAlign.bottom, - appTour: appTour, - ), - ); - appTour.showTutorial( - onClickTarget: showHome, - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourEventTargets(); - } - }, - targets: targets, - ); - } - - /// This function shows the Home screen. - /// - /// **params**: - /// * `clickedTarget`: object to identify clickedTarget. - /// - /// **returns**: - /// None - void showHome(TargetFocus clickedTarget) { - switch (clickedTarget.identify) { - case "keySHMenuIcon": - scaffoldKey.currentState!.openDrawer(); - break; - case "keyDrawerLeaveCurrentOrg": - navigationService.pop(); - } - } - - /// This function show the tutorial for Events. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void tourEventTargets() { - targets.clear(); - targets.add( - FocusTarget( - key: keyBNEvents, - keyName: 'keyBNEvents', - description: - 'This is the Events tab here you can see all event related information of the current selected organization', - isCircle: true, - align: ContentAlign.top, - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySECategoryMenu, - keyName: 'keySECategoryMenu', - description: 'Filter Events based on categories', - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySEDateFilter, - keyName: 'keySEDateFilter', - description: 'Filter Events between selected dates', - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySECard, - keyName: 'keySECard', - description: - 'Description of event to see more details click on the card', - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySEAdd, - keyName: 'keySEAdd', - description: 'You can create a new event from here', - align: ContentAlign.top, - appTour: appTour, - ), - ); - - appTour.showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourProfile(); - } - }, - onClickTarget: (TargetFocus a) {}, - targets: targets, - ); - } - - /// This function show the tutorial to add Post in the organization. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void tourAddPost() { - targets.clear(); - targets.add( - FocusTarget( - key: keyBNPost, - keyName: 'keyBNPost', - description: - 'This is the Create post tab here you can add post to the current selected organization', - isCircle: true, - align: ContentAlign.top, - appTour: appTour, - ), - ); - appTour.showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - // tourChat(); - tourProfile(); - } - }, - onClickTarget: (TargetFocus a) {}, - targets: targets, - ); - } - - /// This function show the tour of chats. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void tourChat() { - targets.clear(); - targets.add( - FocusTarget( - key: keyBNChat, - keyName: 'keyBNChat', - description: - 'This is the Chat tab here you can see all your messages of the current selected organization', - isCircle: true, - align: ContentAlign.top, - appTour: appTour, - ), - ); - appTour.showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourProfile(); - } - }, - onClickTarget: (TargetFocus a) {}, - targets: targets, - ); - } - - /// This function show the tutorial for the profile page. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void tourProfile() { - targets.clear(); - targets.add( - FocusTarget( - key: keyBNProfile, - keyName: 'keyBNProfile', - description: - 'This is the Profile tab here you can see all options related to account, app setting, invitation, help etc', - isCircle: true, - align: ContentAlign.top, - nextCrossAlign: CrossAxisAlignment.start, - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySPAppSetting, - keyName: 'keySPAppSetting', - description: - 'You can edit application settings like language, theme etc from here', - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySPHelp, - keyName: 'keySPHelp', - description: - 'For any help we are always there. You can reach us from here', - appTour: appTour, - ), - ); - - targets.add( - FocusTarget( - key: keySPDonateUs, - keyName: 'keySPDonateUs', - description: - 'To help your organization grow you can support them financially from here', - appTour: appTour, - ), - ); - -// Uncomment the section below if you want to add the keySPInvite target -// targets.add( -// FocusTarget( -// key: keySPInvite, -// keyName: 'keySPInvite', -// description: 'Wanna invite colleague, invite them from here', -// ), -// ); - - targets.add( - FocusTarget( - key: keySPPalisadoes, - keyName: 'keySPPalisadoes', - description: 'You are all set to go lets get you in', - isEnd: true, - appTour: appTour, - ), - ); - - appTour.showTutorial( - onFinish: () { - if (!tourComplete && !tourSkipped) { - tourComplete = true; - onTabTapped(0); - } - }, - onClickTarget: (TargetFocus a) {}, - targets: targets, - ); - } -} diff --git a/lib/view_model/pre_auth_view_models/login_view_model.dart b/lib/view_model/pre_auth_view_models/login_view_model.dart deleted file mode 100644 index 1ee86fc15..000000000 --- a/lib/view_model/pre_auth_view_models/login_view_model.dart +++ /dev/null @@ -1,159 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; - -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -// import 'package:talawa/main.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/utils/encryptor.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// LoginViewModel class helps to interact with model to serve data. -/// -/// Reacts to user's input in Login View. -/// -/// Methods include: -/// * `login` -class LoginViewModel extends BaseModel { - /// GlobalKey to identify and manage the state of a form widget. - final formKey = GlobalKey(); - - /// List of maps to store greetings.. - late List> greeting; - - /// TextEditingController for handling password input field. - TextEditingController password = TextEditingController(); - - /// TextEditingController for handling email input field. - TextEditingController email = TextEditingController(); - - /// FocusNode to manage focus for the password input field. - FocusNode passwordFocus = FocusNode(); - - /// FocusNode to manage focus for the email input field. - FocusNode emailFocus = FocusNode(); - - /// Determines when to perform automatic validation of form fields. - AutovalidateMode validate = AutovalidateMode.disabled; - - /// Toggles password visibility (true for hidden, false for visible). - bool hidePassword = true; - - /// Initializes the greeting message. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void initialize() { - greeting = [ - { - 'text': "We're ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Glad ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - { - 'text': "you're ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Back ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - ]; - } - - /// Performs the login operation. - /// - /// Handles the login process by performing the following steps: - /// 1. Unfocusing the email and password text fields. - /// 2. Setting validation mode to `AutovalidateMode.always`. - /// 3. Validating the email and password fields using the form key. - /// 4. If validation is successful, disabling auto-validation mode - /// and initiating the login process. - /// 5. Displaying a custom progress dialog during login. - /// 6. Initializing database functions. - /// 7. Performing a GraphQL mutation to login the user by providing - /// the email and encrypted password. - /// 8. Handling the result of the login operation: - /// - Updating the current user with the received data. - /// - Redirecting the user based on their status in the application. - /// - Handling Firebase options for Android and iOS if available. - /// - Configuring Firebase and saving FCM token to the database. - /// - /// In case of any exceptions during the login process, - /// this function catches and prints the error. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future login() async { - emailFocus.unfocus(); - passwordFocus.unfocus(); - validate = AutovalidateMode.always; - // if the email and password are not empty. - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - navigationService - .pushDialog(const CustomProgressDialog(key: Key('LoginProgress'))); - databaseFunctions.init(); - try { - // run the graph QL query to login the user, - // passing `email` and `password`. - final result = await databaseFunctions.gqlNonAuthMutation( - queries.loginUser( - email.text, - Encryptor.encryptString( - password.text, - ), - ), - ); - navigationService.pop(); - // if user found. - if (result != null) { - final User loggedInUser = User.fromJson( - (result as QueryResult).data!['login'] as Map, - ); - userConfig.updateUser(loggedInUser); - // if user has not already joined any organization. - if (userConfig.currentUser.joinedOrganizations!.isEmpty) { - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } else { - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: MainScreenArgs(mainScreenIndex: 0, fromSignUp: false), - ); - } - } - } on Exception catch (e) { - print('here'); - print(e); - } - } - } -} diff --git a/lib/view_model/pre_auth_view_models/select_organization_view_model.dart b/lib/view_model/pre_auth_view_models/select_organization_view_model.dart deleted file mode 100644 index 98b4ad528..000000000 --- a/lib/view_model/pre_auth_view_models/select_organization_view_model.dart +++ /dev/null @@ -1,269 +0,0 @@ -// ignore_for_file: talawa_good_doc_comments, talawa_api_doc -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// SelectOrganizationViewModel class helps to interact with model to serve data and react to user's input in Select Organization View. -/// -/// Methods include: -/// * `selectOrg` -/// * `onTapJoin` -class SelectOrganizationViewModel extends BaseModel { - // variables - /// Organization selection required data. - final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); - - /// Organization selection required data. - late Barcode result; - - /// Organization selection required data. - final ScrollController allOrgController = ScrollController(); - - /// Organization selection required data. - final ScrollController controller = ScrollController(); - - /// Organization selection required data. - final FocusNode searchFocus = FocusNode(); - - /// Organization selection required data. - final TextEditingController searchController = TextEditingController(); - - /// Organization selection required data. - late OrgInfo selectedOrganization = OrgInfo(id: '-1'); - - /// Organization selection required data. - late List organizations = []; - - /// Organization selection required data. - bool searching = false; - - /// Organization selection required data. - late Widget showSearchOrgList = Container(); - - /// Organization selection required data. - late String orgId; - - /// if search is enabled. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void searchActive() { - if (searchFocus.hasFocus) { - organizations = []; - searching = true; - setState(ViewState.idle); - } - } - - /// initializer. - /// - /// **params**: - /// * `initialData`: data - /// - /// **returns**: - /// * `Future`: None - Future initialise(String initialData) async { - searchFocus.addListener(searchActive); - if (!initialData.contains('-1')) { - databaseFunctions.init(); - final fetch = await databaseFunctions.fetchOrgById(initialData); - if (fetch.runtimeType == OrgInfo) { - selectedOrganization = fetch as OrgInfo; - if (userConfig.currentUser.refreshToken?.isEmpty ?? true) { - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } else { - selectOrg(selectedOrganization); - } - setState(ViewState.idle); - } - } - } - - /// This function select the organization. - /// - /// **params**: - /// * `item`: Selected organization data. - /// - /// **returns**: - /// * `Future`: None - Future selectOrg(OrgInfo item) async { - print(item.id); - bool orgAlreadyJoined = false; - bool orgRequestAlreadyPresent = false; - final bool userLoggedIn = await userConfig.userLoggedIn(); - // if user session not expirec - if (userLoggedIn) { - // check if user has already joined the selected organization. - userConfig.currentUser.joinedOrganizations!.forEach((element) { - if (element.id! == item.id) { - orgAlreadyJoined = true; - } - }); - // check if user has already send the membership request to the selected organization. - userConfig.currentUser.membershipRequests!.forEach((element) { - if (element.id! == item.id) { - orgRequestAlreadyPresent = true; - } - }); - // if not already joined and not memebrship request. - if (!orgAlreadyJoined && !orgRequestAlreadyPresent) { - selectedOrganization = item; - notifyListeners(); - onTapJoin(); - - if (selectedOrganization.userRegistrationRequired!) { - navigationService.pushScreen( - Routes.requestAccess, - arguments: selectedOrganization, - ); - } - } else if (orgAlreadyJoined) { - selectedOrganization = OrgInfo(id: '-1'); - navigationService.showTalawaErrorSnackBar( - 'Organisation already joined', - MessageType.warning, - ); - } else { - navigationService.showTalawaErrorSnackBar( - 'Membership request already sent', - MessageType.warning, - ); - } - } else { - selectedOrganization = item; - notifyListeners(); - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } - } - - /// Helper for listener to check if user can tap on continue option or not. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void onTapContinue() { - // if user selected any organization. - if (selectedOrganization.id != '-1') { - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } else { - navigationService.showTalawaErrorSnackBar( - 'Select one organization to continue', - MessageType.warning, - ); - } - } - - /// This function make user to join the selected organization. - /// - /// - /// The function uses `joinOrgById` graph QL query - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Future`: None - Future onTapJoin() async { - // if `selectedOrganization` registrations is not required. - if (selectedOrganization.userRegistrationRequired == false) { - try { - // run the graph QL mutation - final QueryResult result = await databaseFunctions.gqlAuthMutation( - queries.joinOrgById(selectedOrganization.id!), - ) as QueryResult; - - final List? joinedOrg = - ((result.data!['joinPublicOrganization'] - as Map)['joinedOrganizations'] - as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList(); - userConfig.updateUserJoinedOrg(joinedOrg!); - // if user joined organization length is 1 - if (userConfig.currentUser.joinedOrganizations!.length == 1) { - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: MainScreenArgs(mainScreenIndex: 0), - ); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - 'Joined ${selectedOrganization.name} successfully', - MessageType.info, - ); - } - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'Something went wrong', - MessageType.error, - ); - } - } - // else { - // try { - // // navigationService.pushScreen(Routes.requestAccess); - // } on Exception catch (e) { - // print(e); - // navigationService.showTalawaErrorSnackBar( - // 'SomeThing went wrong', - // MessageType.error, - // ); - // } - // } - } - - /// This function fetch more option. - /// - /// - /// **params**: - /// * `fetchMore`: client function - /// * `organizations`: org list - /// - /// **returns**: - /// None - void fetchMoreHelper(FetchMore fetchMore, List organizations) { - fetchMore( - FetchMoreOptions( - variables: { - "first": organizations.length + 15, - "skip": organizations.length, - }, - updateQuery: (existingOrganizations, newOrganizations) { - return { - 'organizationsConnection': - (existingOrganizations!["organizationsConnection"] - as List) + - (newOrganizations!['organizationsConnection'] - as List), - }; - }, - ), - ); - } -} diff --git a/lib/view_model/pre_auth_view_models/set_url_view_model.dart b/lib/view_model/pre_auth_view_models/set_url_view_model.dart deleted file mode 100644 index f9ec9324b..000000000 --- a/lib/view_model/pre_auth_view_models/set_url_view_model.dart +++ /dev/null @@ -1,312 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; -import 'package:vibration/vibration.dart'; - -/// SetUrlViewModel class helps to interact with model to serve data. -/// -/// and react to user's input for Set Url Section. -/// Methods include: -/// * `checkURLandNavigate` -/// * `scanQR` -/// * `initialise` -/// * `checkURLandNavigate` -/// * `checkURLandShowPopUp` -/// * `scanQR` -/// * `_onQRViewCreated` - -class SetUrlViewModel extends BaseModel { - // variables - - /// formKey. - final formKey = GlobalKey(); - - /// qrKey. - final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); - - /// qrText. - late Barcode result; - - /// organizationID. - String orgId = '-1'; - - /// imageUrlKey. - static const imageUrlKey = "imageUrl"; - - /// urlKey. - static const urlKey = "url"; - - /// url. - TextEditingController url = TextEditingController(); - - /// urlFocus. - FocusNode urlFocus = FocusNode(); - - /// qrController. - late List> greeting; - - /// qrValidator. - AutovalidateMode validate = AutovalidateMode.disabled; - - /// This function initialises the variables. - /// - /// **params**: - /// * `inviteUrl`: url - /// - /// **returns**: - /// None - - void initialise({String inviteUrl = ''}) { - final uri = inviteUrl; - if (uri.isNotEmpty) { - /// assigning the invite server url to the url text controller. - url.text = uri; - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - graphqlConfig.getOrgUrl(); - } - - /// greeting message. - greeting = [ - { - 'text': 'Join ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'and ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Collaborate ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'with your ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Organizations', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall! - .copyWith(fontSize: 24, color: const Color(0xFF4285F4)), - }, - ]; - notifyListeners(); - } - - /// This function check the URL and navigate to the respective URL. - /// - /// **params**: - /// * `navigateTo`: url - /// * `argument`: message - /// - /// **returns**: - /// None - - Future checkURLandNavigate(String navigateTo, String argument) async { - urlFocus.unfocus(); - validate = AutovalidateMode.always; - - /// if the url is valid. - if (formKey.currentState!.validate()) { - navigationService - .pushDialog(const CustomProgressDialog(key: Key('UrlCheckProgress'))); - validate = AutovalidateMode.disabled; - final String uri = url.text.trim(); - final bool? urlPresent = - await locator().validateUrlExistence(uri); - if (urlPresent! == true) { - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - - navigationService.pop(); - graphqlConfig.getOrgUrl(); - navigationService.pushScreen(navigateTo, arguments: argument); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - "URL doesn't exist/no connection please check", - MessageType.error, - ); - } - } - } - - /// This function check the URL and navigate to the respective URL. - /// - /// **params**: - /// * `argument`: message - /// - /// **returns**: - /// None - - Future checkURLandShowPopUp(String argument) async { - urlFocus.unfocus(); - validate = AutovalidateMode.always; - - // if the url is valid. - if (formKey.currentState!.validate()) { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('UrlCheckProgress'), - ), - ); - validate = AutovalidateMode.disabled; - final String uri = url.text.trim(); - final bool? urlPresent = - await locator().validateUrlExistence(uri); - if (urlPresent! == true) { - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - navigationService.pop(); - graphqlConfig.getOrgUrl(); - navigationService.showSnackBar("Url is valid"); - } else { - navigationService.pop(); - navigationService.showTalawaErrorDialog( - "URL doesn't exist/no connection please check", - MessageType.info, - ); - } - } - } - - /// This function create a widget which is used to scan the QR-code. - /// - /// **params**: - /// * `context`: BuildContext - /// - /// **returns**: - /// None - - void scanQR(BuildContext context) { - showModalBottomSheet( - context: context, - barrierColor: Colors.transparent, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.width, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 250, - width: 250, - child: QRView( - key: qrKey, - onQRViewCreated: _onQRViewCreated, - overlay: QrScannerOverlayShape( - borderRadius: 10, - borderLength: 20, - borderWidth: 10, - cutOutSize: 250, - ), - /*overlayMargin: EdgeInsets.all(50)*/ - ), - ), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - const Text('Scan QR'), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - ], - ), - ), - ); - }, - ); - } - - /// This is the helper function which execute when the on QR view created. - /// - /// **params**: - /// * `controller`: QRViewController - /// - /// **returns**: - /// None - - void _onQRViewCreated(QRViewController controller) { - controller.scannedDataStream.listen((scanData) { - /// if the scanData is not empty. - if (scanData.code!.isNotEmpty) { - print(scanData.code); - try { - final List data = scanData.code!.split('?'); - url.text = data[0]; - final List queries = data[1].split('&'); - orgId = queries[0].split('=')[1]; - Vibration.vibrate(duration: 100); - controller.stopCamera(); - controller.dispose(); - final box = Hive.box('url'); - box.put(urlKey, url.text); - box.put(imageUrlKey, "${url.text}/talawa/"); - graphqlConfig.getOrgUrl(); - Navigator.pop(navigationService.navigatorKey.currentContext!); - navigationService.pushScreen('/selectOrg', arguments: orgId); - } on CameraException catch (e) { - debugPrint(e.toString()); - navigationService.showTalawaErrorSnackBar( - "The Camera is not working", - MessageType.error, - ); - } on QrEmbeddedImageException catch (e) { - debugPrint(e.toString()); - navigationService.showTalawaErrorDialog( - "The QR is not Working", - MessageType.error, - ); - } on QrUnsupportedVersionException catch (e) { - debugPrint(e.toString()); - navigationService.showTalawaErrorDialog( - "This QR version is not Supported.", - MessageType.error, - ); - } on Exception catch (e) { - debugPrint(e.toString()); - navigationService.showTalawaErrorSnackBar( - "This QR is not for the App", - MessageType.error, - ); - } - } - }); - } -} diff --git a/lib/view_model/pre_auth_view_models/signup_details_view_model.dart b/lib/view_model/pre_auth_view_models/signup_details_view_model.dart deleted file mode 100644 index 494afac0b..000000000 --- a/lib/view_model/pre_auth_view_models/signup_details_view_model.dart +++ /dev/null @@ -1,218 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/utils/encryptor.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -/// SignupDetailsViewModel class helps to interact with model to serve data and react to user's input for Sign Up Details section. -/// -/// Methods include: -/// * `signUp` -class SignupDetailsViewModel extends BaseModel { - /// GlobalKey to identify and manage the state of a form widget. - final formKey = GlobalKey(); - - /// List of maps to store greeting information, where each greeting is represented by a map with String keys and dynamic values. - late List> greeting; - - /// Represents information about the selected organization. - late OrgInfo selectedOrganization; - - /// TextEditingController for handling confirmation password input field. - TextEditingController confirmPassword = TextEditingController(); - - /// TextEditingController for handling first name input field. - TextEditingController firstName = TextEditingController(); - - /// TextEditingController for handling last name input field. - TextEditingController lastName = TextEditingController(); - - /// TextEditingController for handling password input field. - TextEditingController password = TextEditingController(); - - /// TextEditingController for handling email input field. - TextEditingController email = TextEditingController(); - - /// AutovalidateMode to determine when to perform automatic validation of form fields. - AutovalidateMode validate = AutovalidateMode.disabled; - - /// FocusNode to manage focus for the confirmation password input field. - FocusNode confirmFocus = FocusNode(); - - /// Boolean to toggle password visibility (true for hidden, false for visible). - bool hidePassword = true; - - /// Initializes the greeting message for a selected organization. - /// - /// **params**: - /// * `org`: OrgInfo - the organization information to set as selected. - /// - /// **returns**: - /// None - void initialise(OrgInfo org) { - selectedOrganization = org; - // greeting message - greeting = [ - { - 'text': "Let's ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'get ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': "you ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'SignUp ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - ]; - } - - /// Initiates the sign-up process. - /// - /// Handles the sign-up process by performing the following steps: - /// 1. Unfocusing the current focus scope. - /// 2. Setting the view state to `ViewState.busy`. - /// 3. Setting validation mode to `AutovalidateMode.always`. - /// 4. Setting the view state to `ViewState.idle`. - /// 5. Validating the form using the form key. - /// 6. If validation is successful, disabling auto-validation mode and - /// initiating the sign-up. - /// 7. Displaying a custom progress dialog during sign-up. - /// 8. Initializing database functions. - /// 9. Performing a GraphQL mutation to register the user with provided - /// details (first name, last name, email, password). - /// 10. Handling the result of the sign-up operation: - /// - Updating the current user with the received data. - /// - Refreshing the access token. - /// - Joining a public organization or sending a membership request - /// based on the selected organization. - /// - /// In case of any exceptions during the sign-up process, this function - /// catches and prints the error - /// and displays a Talawa error snackbar with a corresponding message. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - Future signUp() async { - FocusScope.of(navigationService.navigatorKey.currentContext!).unfocus(); - setState(ViewState.busy); - validate = AutovalidateMode.always; - setState(ViewState.idle); - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - navigationService - .pushDialog(const CustomProgressDialog(key: Key('SignUpProgress'))); - databaseFunctions.init(); - try { - final result = await databaseFunctions.gqlNonAuthMutation( - queries.registerUser( - firstName.text, - lastName.text, - email.text, - Encryptor.encryptString( - password.text, - ), - selectedOrganization.id, - ), - ); - navigationService.pop(); - if (result != null) { - final User signedInUser = User.fromJson( - (result as QueryResult).data!['signUp'] as Map, - ); - final bool userSaved = await userConfig.updateUser(signedInUser); - final bool tokenRefreshed = await graphqlConfig.getToken() as bool; - // if user successfully saved and access token is also generated. - if (userSaved && tokenRefreshed) { - // if the selected organization userRegistration not required. - if (!selectedOrganization.userRegistrationRequired!) { - try { - final QueryResult result = - await databaseFunctions.gqlAuthMutation( - queries.joinOrgById(selectedOrganization.id!), - ) as QueryResult; - - final joinPublicOrganization = result - .data!['joinPublicOrganization'] as Map; - final List? joinedOrg = (joinPublicOrganization[ - 'joinedOrganizations'] as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList(); - userConfig.updateUserJoinedOrg(joinedOrg!); - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: - MainScreenArgs(mainScreenIndex: 0, fromSignUp: true), - ); - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'Something went wrong', - MessageType.error, - ); - } - } else { - try { - final QueryResult result = - await databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(selectedOrganization.id!), - ) as QueryResult; - - final sendMembershipRequest = result - .data!['sendMembershipRequest'] as Map; - final OrgInfo membershipRequest = OrgInfo.fromJson( - sendMembershipRequest['organization'] as Map, - ); - userConfig.updateUserMemberRequestOrg([membershipRequest]); - navigationService.pop(); - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'Something went wrong', - MessageType.error, - ); - } - } - } - } - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'Something went wrong', - MessageType.error, - ); - } - } - } -} diff --git a/lib/view_model/pre_auth_view_models/waiting_view_model.dart b/lib/view_model/pre_auth_view_models/waiting_view_model.dart deleted file mode 100644 index 150859248..000000000 --- a/lib/view_model/pre_auth_view_models/waiting_view_model.dart +++ /dev/null @@ -1,60 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// WaitingViewModel class helps to interact with model to serve data -/// and react to user's input for Waiting section. -/// -/// Methods include: -/// * `logout` -class WaitingViewModel extends BaseModel { - late List> greeting; - late List pendingRequestOrg; - late User currentUser; - - // initialiser - void initialise(BuildContext context) { - currentUser = userConfig.currentUser; - pendingRequestOrg = currentUser.membershipRequests!; - // greetings - greeting = [ - { - 'text': "Please wait", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - { - 'text': " ${currentUser.firstName} ", - 'textStyle': - Theme.of(context).textTheme.titleLarge!.copyWith(fontSize: 24), - }, - { - 'text': "for organisation(s) to accept your invitation.", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - ]; - } - - /// This function ends the session for the user or logout the user from the application. - void logout() { - final user = Hive.box('currentUser'); - final url = Hive.box('url'); - user.clear(); - url.clear(); - navigationService.removeAllAndPush( - Routes.languageSelectionRoute, - Routes.splashScreen, - arguments: '0', - ); - } - - void joinOrg() { - navigationService.pushScreen(Routes.joinOrg, arguments: '-1'); - } -} diff --git a/lib/view_model/theme_view_model.dart b/lib/view_model/theme_view_model.dart deleted file mode 100644 index af40c9a34..000000000 --- a/lib/view_model/theme_view_model.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// AppTheme class is a type of View Model to serve data from modal to views in the context of App Themes. -/// -/// Methods include: -/// * `switchTheme` -class AppTheme extends BaseModel { - final String key = "DynamicTheme"; - - late SharedPreferences _pref; - late bool _isDarkMode; - bool get isdarkTheme => _isDarkMode; - - // initializer - void initialize() { - _isDarkMode = true; - _loadFromPrefs(); - } - - /// This function switches the app theme. - /// - /// * `Dart` -> `Light` - /// * `Light` -> `Dark` - void switchTheme({required bool isOn}) { - _isDarkMode = isOn; - _saveToPrefs(); - notifyListeners(); - } - - Future _initPrefs() async { - _pref = await SharedPreferences.getInstance(); - } - - Future _loadFromPrefs() async { - await _initPrefs(); - _isDarkMode = _pref.getBool(key) ?? true; - notifyListeners(); - } - - Future _saveToPrefs() async { - await _initPrefs(); - _pref.setBool(key, _isDarkMode); - } -} diff --git a/lib/view_model/widgets_view_models/comments_view_model.dart b/lib/view_model/widgets_view_models/comments_view_model.dart deleted file mode 100644 index ed9de75ea..000000000 --- a/lib/view_model/widgets_view_models/comments_view_model.dart +++ /dev/null @@ -1,102 +0,0 @@ -// ignore_for_file: talawa_api_doc -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/services/comment_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// CommentsViewModel class helps to serve the data from model and to react to user's input for Comment Widget. -/// -/// Methods include: -/// * `getComments` : to get all comments on the post. -/// * `createComment` : to add comment on the post. -class CommentsViewModel extends BaseModel { - /// Constructor - late CommentService _commentService; - - /// PostService instance. - late PostService _postService; - - /// Post id on which comments are to be fetched. - late String _postID; - - /// List of comments on the post. - late List _commentlist; - - /// UserConfig instance. - late UserConfig _userConfig; - - // Getters - List get commentList => _commentlist; - String get postId => _postID; - - /// This function is used to initialise the CommentViewModel. - /// - /// To verify things are working, check out the native platform logs. - /// **params**: - /// * `postID`: The post id for which comments are to be fetched. - /// - /// **returns**: - /// None - Future initialise(String postID) async { - _commentlist = []; - _postID = postID; - _commentService = locator(); - _userConfig = locator(); - _postService = locator(); - notifyListeners(); - await getComments(); - } - - /// This function is used to get all comments on the post. - /// - /// To verify things are working, check out the native platform logs. - /// **params**: - /// None - /// - /// **returns**: - /// None - Future getComments() async { - setState(ViewState.busy); - final List commentsJSON = await _commentService.getCommentsForPost(_postID); - print(commentsJSON); - commentsJSON.forEach((commentJson) { - _commentlist.add(Comment.fromJson(commentJson as Map)); - }); - setState(ViewState.idle); - } - - /// This function add comment on the post. The function uses `createComments` method provided by Comment Service. - /// - /// **params**: - /// * `msg`: The comment text. - /// - /// **returns**: - /// None - Future createComment(String msg) async { - print("comment viewModel called"); - await _commentService.createComments(_postID, msg); - addCommentLocally(msg); - } - - /// This function add comment locally. - /// - /// **params**: - /// * `msg`: BuildContext, contain parent info - /// - /// **returns**: - /// None - void addCommentLocally(String msg) { - _postService.addCommentLocally(_postID); - final creator = _userConfig.currentUser; - final Comment localComment = Comment( - text: msg, - createdAt: DateTime.now().toString(), - creator: creator, - ); - _commentlist.add(localComment); - notifyListeners(); - } -} diff --git a/lib/view_model/widgets_view_models/custom_drawer_view_model.dart b/lib/view_model/widgets_view_models/custom_drawer_view_model.dart deleted file mode 100644 index 564ef0f39..000000000 --- a/lib/view_model/widgets_view_models/custom_drawer_view_model.dart +++ /dev/null @@ -1,161 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/view_model/base_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -/// CustomDrawerViewModel class helps to serve the data and to react to user's input for Custom Dialog Widget. -/// -/// Functions include: -/// * `switchOrg` -/// * `isPresentinSwitchableOrg` -/// * `setSelectedOrganizationName` -class CustomDrawerViewModel extends BaseModel { - // getters - - /// Scroll controller for managing scrolling behavior. - final ScrollController controller = ScrollController(); - - /// List of TargetFocus objects used for tutorial coaching. - final List targets = []; - - /// Instance of TutorialCoachMark responsible for providing tutorial guidance. - late TutorialCoachMark tutorialCoachMark; - late User _currentUser; - late List _switchAbleOrg; - bool _disposed = false; - OrgInfo? _selectedOrg; - StreamSubscription? _currentOrganizationStreamSubscription; - - //// Getter method to retrieve the selected organization. - OrgInfo? get selectedOrg => _selectedOrg; - - /// Getter method to retrieve the switchAble organization. - // ignore: unnecessary_getters_setters - List get switchAbleOrg => _switchAbleOrg; - - /// Setter method for switchAble organization. - set switchAbleOrg(List switchableOrg) => - _switchAbleOrg = switchableOrg; - - /// initializer. - /// - /// **params**: - /// * `homeModel`: instance of MainScreenViewModel. - /// * `context`: instance of BuildContext. - /// - /// **returns**: - /// None - void initialize(MainScreenViewModel homeModel, BuildContext context) { - _currentOrganizationStreamSubscription = - userConfig.currentOrgInfoStream.listen( - (updatedOrganization) { - setSelectedOrganizationName(updatedOrganization); - }, - ); - _currentUser = userConfig.currentUser; - _selectedOrg = userConfig.currentOrg; - _switchAbleOrg = _currentUser.joinedOrganizations ?? []; - } - - /// This function switches the organization to the specified `switchToOrg`. - /// - /// If `selectedOrg` is equal to `switchToOrg` and `switchToOrg` is present, a warning message is displayed using a custom Snackbar. - /// Otherwise, it saves the `switchToOrg` as the current organization, updates the selected organization name, - /// and displays an informational message using a custom Snackbar. - /// - /// **params**: - /// * `switchToOrg`: The organization to switch to. - /// - /// **returns**: - /// None - void switchOrg(OrgInfo switchToOrg) { - // if `selectedOrg` is equal to `switchOrg` and `switchToOrg` present or not. - if ((selectedOrg == switchToOrg) && - (isPresentinSwitchableOrg(switchToOrg))) { - // _navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - '${switchToOrg.name} already selected', - MessageType.warning, - ); - } else { - userConfig.saveCurrentOrgInHive(switchToOrg); - setSelectedOrganizationName(switchToOrg); - navigationService.showTalawaErrorSnackBar( - 'Switched to ${switchToOrg.name}', - MessageType.info, - ); - } - navigationService.pop(); - } - - /// This function checks `switchOrg` is present in the `switchAbleOrg`. - /// - /// **params**: - /// * `switchToOrg`: `OrgInfo` type of organization want to switch into. - /// - /// **returns**: - /// * `bool`: returns true if switchToOrg is in switchAbleOrg list. - bool isPresentinSwitchableOrg(OrgInfo switchToOrg) { - var isPresent = false; - for (final OrgInfo orgs in switchAbleOrg) { - if (orgs.id == switchToOrg.id) { - isPresent = true; - } - } - return isPresent; - } - - @override - void notifyListeners() { - if (!_disposed) { - super.notifyListeners(); - } - } - - /// returns an exit alert dialog. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `CustomAlertDialog`: returns customAlertDialogBox. - CustomAlertDialog exitAlertDialog() { - return CustomAlertDialog( - key: const Key("Exit?"), - reverse: true, - dialogSubTitle: 'Are you sure you want to exit this organization?', - successText: 'Exit', - success: () {}, - ); - } - - /// This function switches the current organization to new organization. - /// - /// **params**: - /// * `updatedOrganization`: `OrgInfo` type, new organization. - /// - /// **returns**: - /// None - void setSelectedOrganizationName(OrgInfo updatedOrganization) { - // if current and updated organization are not same. - if (_selectedOrg != updatedOrganization) { - _selectedOrg = updatedOrganization; - // update in `UserConfig` variable. - userConfig.currentOrgInfoController.add(_selectedOrg!); - notifyListeners(); - } - } - - @override - void dispose() { - _disposed = true; - _currentOrganizationStreamSubscription?.cancel(); - super.dispose(); - } -} diff --git a/lib/view_model/widgets_view_models/event_card_view_model.dart b/lib/view_model/widgets_view_models/event_card_view_model.dart deleted file mode 100644 index cd3c21f21..000000000 --- a/lib/view_model/widgets_view_models/event_card_view_model.dart +++ /dev/null @@ -1,38 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// import 'package:flutter/material.dart'; -// import 'package:talawa/locator.dart'; -// import 'package:talawa/models/events/event_badge_helper_model.dart'; -// import 'package:talawa/models/events/event_model.dart'; -// import 'package:talawa/view_model/base_view_model.dart'; - -// class EventCardViewModel extends BaseModel { -// late final Event _event; -// Event get event => _event; -// late final bool isRegistered; -// late EventBadge eventBadge; -// initialize({required Event event}) { -// _event = event; -// isRegistered = _event.isRegistered ?? false; -// initBadge(); -// } - -// void initBadge() {} - -// Map badgeDetails() { -// if (_event.creator!.id == userConfig.currentUser.id) { -// return { -// "BadgeTitle": "Created", -// }; -// } else if (isRegistered) { -// return { -// "BadgeTitle": "Subscribed", -// }; -// } else { -// return { -// "BadgeTitle": "", -// }; -// } -// } -// } diff --git a/lib/view_model/widgets_view_models/like_button_view_model.dart b/lib/view_model/widgets_view_models/like_button_view_model.dart deleted file mode 100644 index 67b8013ce..000000000 --- a/lib/view_model/widgets_view_models/like_button_view_model.dart +++ /dev/null @@ -1,115 +0,0 @@ -// ignore_for_file: talawa_api_doc -import 'dart:async'; - -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// LikeButtonViewModel class helps to serve the data and to react to user's input for Like Button Widget. -/// -/// -/// Methods include: -/// * `toggleIsLiked` -/// * `setIsLiked` -/// * `updatePost` -class LikeButtonViewModel extends BaseModel { - // Services - final _userConfig = locator(); - final _postService = locator(); - - // Local Variables for session caching - bool _isLiked = false; - late User _user; - List _likedBy = []; - late String _postID; - - // ignore: unused_field - late StreamSubscription _updatePostSubscription; - - ///Getters. - bool get isLiked => _isLiked; - List get likedBy => _likedBy; - int get likesCount => _likedBy.length; - - /// First function to initialize the ViewModel. - /// - /// **params**: - /// * `likedBy`: List of LikedBy Objects - /// * `postID`: Post Id of the Post - /// - /// **returns**: - /// None - void initialize(List likedBy, String postID) { - _postID = postID; - _user = _userConfig.currentUser; - _likedBy = likedBy; - notifyListeners(); - checkAndSetTheIsLiked(); - _updatePostSubscription = - _postService.updatedPostStream.listen((post) => updatePost(post)); - } - - /// function to toggleisLiked boolean. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void toggleIsLiked() { - if (!_isLiked) { - _postService.addLike(_postID); - } - } - - /// function to set isLiked boolean. - /// - /// **params**: - /// * `val`: value to set bool to. - /// - /// **returns**: - /// None - void setIsLiked({bool val = true}) { - _isLiked = val; - notifyListeners(); - } - - /// function to set isLiked boolean and check. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void checkAndSetTheIsLiked() { - setIsLiked(val: false); - for (var i = 0; i < _likedBy.length; i++) { - if (_likedBy[i].sId == _user.id) { - setIsLiked(); - } - } - } - - /// function to update the Post. - /// - /// **params**: - /// * `post`: Post Object - /// - /// **returns**: - /// None - void updatePost(Post post) { - if (_postID == post.sId) { - _likedBy = post.likedBy!; - checkAndSetTheIsLiked(); - } - } - - @override - // ignore: must_call_super - void dispose() { - _updatePostSubscription.cancel(); - } -} diff --git a/lib/view_model/widgets_view_models/progress_dialog_view_model.dart b/lib/view_model/widgets_view_models/progress_dialog_view_model.dart deleted file mode 100644 index 9f4997543..000000000 --- a/lib/view_model/widgets_view_models/progress_dialog_view_model.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -/// ProgressDialogViewModel class helps to serve the data and -/// to react to user's input for Progress Dialog Widget. -class ProgressDialogViewModel extends BaseModel { - late ConnectivityResult connectivityResult; - bool connectivityPresent = false; - - // initialiser - Future initialise() async { - setState(ViewState.busy); - connectivityResult = await connectivity.checkConnectivity(); - if (connectivityResult == ConnectivityResult.none) { - connectivityPresent = false; - Future.delayed(const Duration(seconds: 2)) - .then((value) => navigationService.pop()); - } else { - connectivityPresent = true; - } - setState(ViewState.idle); - } -} diff --git a/lib/views/after_auth_screens/add_post_page.dart b/lib/views/after_auth_screens/add_post_page.dart deleted file mode 100644 index 9ec32746c..000000000 --- a/lib/views/after_auth_screens/add_post_page.dart +++ /dev/null @@ -1,248 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; - -/// Add Post View Model. -late AddPostViewModel model; - -/// AddPost returns a widget to add(upload) the post. -class AddPost extends StatefulWidget { - const AddPost({super.key, this.drawerKey}); - - /// DrawerKey. - final GlobalKey? drawerKey; - - @override - State createState() => _AddPostState(); -} - -class _AddPostState extends State { - @override - Widget build(BuildContext context) { - // final Uint8List imageBytes = base64Decode(sampleBase64Image); - // final Uint8List bytes = BASE64.decode(_base64); - return Scaffold( - resizeToAvoidBottomInset: false, - // header for the widget - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.9, - centerTitle: true, - // header title - title: Text( - AppLocalizations.of(context)!.strictTranslate('Share News'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - //TODO: showing the null pointer exception - key: const Key('add_post_icon_button1'), - color: Theme.of(context).iconTheme.color, - icon: const Icon( - Icons.arrow_back, - size: 36, - ), - onPressed: () { - navigationService.pop(); - }, - ), - // button to upload the post. - actions: [ - TextButton( - key: const Key('add_post_text_btn1'), - onPressed: () { - model.uploadPost(); - navigationService.pop(); - // convertImageToBase64(sampleBase64Image); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate("Post"), - style: Theme.of(context).textTheme.headlineSmall!.copyWith( - fontWeight: FontWeight.w600, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - // Image.memory(imageBytes) - ], - ), - body: BaseView( - onModelReady: (m) { - m.initialise(); - model = m; - }, - builder: (context, model, child) { - return SingleChildScrollView( - child: Column( - children: [ - ListTile( - leading: CustomAvatar( - isImageNull: model.userPic == null, - firstAlphabet: model.userName.substring(0, 1).toUpperCase(), - imageUrl: model.userPic, - fontSize: SizeConfig.screenHeight! * 0.018, - ), - title: Text(model.userName), - subtitle: Text( - AppLocalizations.of(context)! - .strictTranslate(model.orgName), - ), - ), - // renders icon button to upload post files. - Row( - children: [ - // button to select the photo from gallery. - IconButton( - key: const Key('add_post_icon_button2'), - onPressed: () => model.getImageFromGallery(), - icon: const Icon(Icons.photo), - ), - // button to capture the image. - IconButton( - key: const Key('add_post_icon_button3'), - onPressed: () => model.getImageFromGallery(camera: true), - icon: const Icon(Icons.camera_alt), - ), - // button to add hastags to the post. - TextButton( - key: const Key('add_post_text_btn2'), - onPressed: () { - showDialog( - context: context, - builder: (BuildContext context) { - return AlertDialog( - title: Text( - AppLocalizations.of(context)! - .strictTranslate("Enter the Tag"), - ), - content: TextField( - controller: model.textHashTagController, - ), - actions: [ - TextButton( - key: const Key("add_hashtag_button"), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - "The tag was added", - MessageType.info, - ); - Navigator.of(context).pop(); - }, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Add"), - ), - ), - TextButton( - key: const Key("cancel_hashtag_button"), - onPressed: () { - Navigator.of(context).pop(); - }, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Cancel"), - ), - ), - ], - ); - }, - ); - }, - child: Text( - model.textHashTagController.text == "" - ? '# ${AppLocalizations.of(context)!.strictTranslate("Add tag")}' - : model.textHashTagController.text, - style: Theme.of(context).textTheme.titleLarge, - ), - ), - ], - ), - const Divider(), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: TextField( - controller: model.titleController, - // input field to write the description of the post. - decoration: InputDecoration( - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - hintText: AppLocalizations.of(context)!.strictTranslate( - "Enter the title of your post", - ), - label: Text( - AppLocalizations.of(context)!.strictTranslate( - "Title", - ), - ), - ), - ), - ), - const Divider(), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: TextField( - controller: model.controller, - maxLines: null, - // input field to write the description of the post. - decoration: InputDecoration( - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - hintText: AppLocalizations.of(context)!.strictTranslate( - "Write here what do you want to share", - ), - ), - ), - ), - // if the image for the post is added then render button to remove it. - model.imageFile != null - // ignore: sized_box_for_whitespace - ? Container( - height: 230, - padding: const EdgeInsets.all(8.0), - child: Stack( - children: [ - // Image.file( - // model.imageFile!, - // fit: BoxFit.cover, - // width: MediaQuery.of(context).size.width, - // ), - Image.file(model.imageFile!), - Positioned( - right: 5, - top: 5, - child: IconButton( - key: const Key("remove_icon"), - onPressed: () { - model.removeImage(); - }, - icon: const Icon( - Icons.cancel, - color: Colors.black, - ), - ), - ), - ], - ), - ) - : Container(), - ], - ), - ); - }, - ), - ); - } -} diff --git a/lib/views/after_auth_screens/app_settings/app_settings_page.dart b/lib/views/after_auth_screens/app_settings/app_settings_page.dart deleted file mode 100644 index c718f5cb8..000000000 --- a/lib/views/after_auth_screens/app_settings/app_settings_page.dart +++ /dev/null @@ -1,348 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -import 'package:talawa/widgets/lang_switch.dart'; -import 'package:talawa/widgets/talawa_error_dialog.dart'; -import 'package:talawa/widgets/theme_switch.dart'; - -/// Widget representing the App Settings page. -/// -/// This widget represents the settings page of the application. -/// It allows users to configure various application settings. -class AppSettingsPage extends StatelessWidget { - const AppSettingsPage({ - super.key, - }); - - @override - Widget build(BuildContext context) { - const String talawaDocs = 'https://docs.talawa.io'; - const String talawaGithub = - 'https://github.com/PalisadoesFoundation/talawa'; - return BaseView( - builder: (context, model, child) { - return Scaffold( - key: const Key('AppSettingScaffold'), - // AppBar is a horizontal bar typically shown at the top of an app using the appBar property. - appBar: AppBar( - iconTheme: Theme.of(context).iconTheme, - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - // title of the page in appBar property - title: Text( - // title text translation according to the app language. - AppLocalizations.of(context)!.strictTranslate('Settings'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: () => navigationService.pop(), - ), - ), - // style of the AppBar. - body: Padding( - padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 20), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Column( - children: [ - userConfig.loggedIn - ? category( - context: context, - title: 'Profile', - listItems: [ - customListTile( - leading: const Icon(Icons.edit), - content: Text( - AppLocalizations.of(context)! - .strictTranslate('Edit Profile'), - ), - trailing: chevronButton(context: context), - onTap: () { - navigationService - .pushScreen(Routes.editProfilePage); - }, - ), - ], - ) - : Container(), - category( - context: context, - title: 'General', - listItems: [ - const ChangeThemeTile(), - const LanguageTile(), - ], - ), - category( - context: context, - title: 'Help & Support', - listItems: [ - customListTile( - leading: const Icon(Icons.description), - content: Text( - AppLocalizations.of(context)! - .strictTranslate('Talawa Docs'), - ), - trailing: chevronButton( - context: context, - ), - onTap: () { - model.launchWebsite(talawaDocs); - }, - ), - customListTile( - leading: const Icon(Icons.code), - content: Text( - AppLocalizations.of(context)! - .strictTranslate('Talawa GitHub'), - ), - trailing: chevronButton( - context: context, - ), - onTap: () { - model.launchWebsite(talawaGithub); - }, - ), - ], - ), - ], - ), - ), - ), - footerTile(context: context, model: model), - ], - ), - ), - ); - }, - ); - } - - /// Generates an Icon widget for a chevron (right arrow). - /// - /// **params**: - /// * `context`: The BuildContext of the widget used to derive the theme's primary color. - /// - /// **returns**: - /// * `Icon`: An Icon widget representing a chevron (right arrow). - Icon chevronButton({required BuildContext context}) { - return Icon( - Icons.chevron_right, - color: Theme.of(context).colorScheme.primary, - ); - } - - /// Custom List Tile Widget. - /// - /// This widget creates a custom list tile with customizable components such as - /// leading, content, trailing, and an optional onTap callback. - /// - /// **params**: - /// * `leading`: Widget displayed at the start of the list tile. - /// * `content`: Widget displayed as the main content of the list tile. - /// * `trailing`: Widget displayed at the end of the list tile. - /// * `onTap`: Callback function triggered when the list tile is tapped. - /// - /// **returns**: - /// * `Widget`: Returns a ListTile widget customized with the provided components. - Widget customListTile({ - Widget? leading, - required Widget content, - required Widget trailing, - required void Function()? onTap, - }) { - return ListTile( - contentPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.blockSizeHorizontal!, - ), - leading: leading, - title: content, - trailing: trailing, - onTap: onTap, - ); - } - - /// Widget representing a category with a title and a list of items. - /// - /// Displays a category title along with a list of widgets. - /// - /// **params**: - /// * `context`: The [BuildContext] of the widget. - /// * `title`: The title of the category to be displayed. - /// * `listItems`: A list of [Widget]s representing items in the category. - /// - /// **returns**: - /// * `Widget`: A [Padding] widget containing a [Column] with the category title displayed using - /// [catergoryHeader] and followed by the list of `listItems`. - Widget category({ - required BuildContext context, - required String title, - required List listItems, - }) { - return Padding( - padding: - EdgeInsets.symmetric(vertical: SizeConfig.blockSizeVertical! * 1.5), - child: Column( - children: [ - catergoryHeader(context: context, title: title), - ] + - listItems, - ), - ); - } - - /// Creates a header widget for a category. - /// - /// This widget displays a title for a category with a divider line underneath. - /// - /// **params**: - /// * `context`: The [BuildContext] associated with the widget. - /// * `title`: The title string to be displayed for the category. - /// - /// **returns**: - /// * `Widget`: Returns a [Widget] that represents the category header. - Widget catergoryHeader({ - required BuildContext context, - required String title, - }) { - return Padding( - padding: EdgeInsets.only(top: SizeConfig.blockSizeVertical!), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: 2), - child: Text( - AppLocalizations.of(context)!.strictTranslate(title), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(color: Theme.of(context).colorScheme.primary), - ), - ), - customDivider(context: context), - ], - ), - ); - } - - /// Widget representing a footer tile that performs different actions based on user login status. - /// - /// **params**: - /// * `context`: The [BuildContext] of the widget. - /// * `model`: An instance of [AppSettingViewModel] used for handling app settings. - /// - /// **returns**: - /// * `Widget`: Returns a [Column] widget displaying a divider and a [TextButton] that varies its behavior based on user login status. - Widget footerTile({ - required BuildContext context, - required AppSettingViewModel model, - }) { - return Column( - children: [ - customDivider(context: context), - TextButton( - key: const Key('Logout'), - child: Center( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - userConfig.loggedIn - ? const Icon( - Icons.logout, - color: Colors.red, - ) - : Icon( - Icons.add, - color: Theme.of(context).colorScheme.secondary, - ), - SizedBox( - width: SizeConfig.blockSizeHorizontal! * 3, - ), - Text( - AppLocalizations.of(context)!.strictTranslate( - userConfig.loggedIn ? 'Logout' : 'Join an Organisation', - ), - style: Theme.of(context).textTheme.bodyLarge, - ), - ], - ), - ), - onPressed: () { - userConfig.loggedIn - ? showDialog( - context: context, - builder: (context) { - return CustomAlertDialog( - reverse: true, - dialogSubTitle: 'Are you sure you want to logout?', - successText: 'Logout', - success: () async { - try { - final bool isLogoutSuccessful = - await model.logout(); - if (!isLogoutSuccessful) { - throw Error(); //checks whether the logout was successful or not. - } - navigationService.pop(); - navigationService.removeAllAndPush( - Routes.setUrlScreen, - Routes.splashScreen, - arguments: '', - ); - } catch (e) { - navigationService.pushDialog( - const TalawaErrorDialog( - 'Unable to logout, please try again.', - key: Key('TalawaError'), - messageType: MessageType.error, - ), - ); - } - }, - ); - }, - ) - : navigationService.pushScreen( - Routes.setUrlScreen, - arguments: '', - ); - }, - ), - ], - ); - } - - /// Builds a customized Divider widget based on the provided [BuildContext]. - /// - /// This function creates a Divider widget using the provided [context] to obtain - /// the appropriate divider color from the current app's theme. - /// - /// **params**: - /// * `context`: The BuildContext used to access the current app's theme. - /// - /// **returns**: - /// * `Widget`: Returns a Divider widget customized with the color from the app's theme. - Widget customDivider({ - required BuildContext context, - }) { - return Divider( - color: Theme.of(context).dividerColor, - ); - } -} diff --git a/lib/views/after_auth_screens/chat/chat_list_screen.dart b/lib/views/after_auth_screens/chat/chat_list_screen.dart deleted file mode 100644 index d872a7266..000000000 --- a/lib/views/after_auth_screens/chat/chat_list_screen.dart +++ /dev/null @@ -1,54 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/views/after_auth_screens/chat/direct_chats.dart'; -import 'package:talawa/views/after_auth_screens/chat/select_contact.dart'; - -/// ChatPage returns a stateless widget. -/// -/// That renders a list of users with whom the current user has chatted. -class ChatPage extends StatelessWidget { - const ChatPage({super.key}); - - @override - Widget build(BuildContext context) { - return DefaultTabController( - length: 1, - child: Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - title: Text( - "Chats", - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - bottom: const TabBar( - tabs: [ - Tab( - text: "Direct", - ), - ], - ), - ), - // returns a tabs on the top for current user to switch between DirectChats and EventChats. - body: const TabBarView( - children: [ - DirectChats(), - ], - ), - floatingActionButton: FloatingActionButton( - // onPressed to FloatingActionButton renders SelectContact Widget to chat with other users in the connection. - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => const SelectContact()), - ); - }, - child: const Icon(Icons.add), - ), - ), - ); - } -} diff --git a/lib/views/after_auth_screens/chat/chat_message_screen.dart b/lib/views/after_auth_screens/chat/chat_message_screen.dart deleted file mode 100644 index 7d8b86b8c..000000000 --- a/lib/views/after_auth_screens/chat/chat_message_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/views/after_auth_screens/chat/widgets/chat_input_field.dart'; -import 'package:talawa/views/after_auth_screens/chat/widgets/chat_message_bubble.dart'; -import 'package:talawa/views/base_view.dart'; - -/// ChatMessageScreen returns a StatelessWidget for showing the chat message screen. -class ChatMessageScreen extends StatelessWidget { - const ChatMessageScreen({ - super.key, - required this.chatId, - required this.model, - }); - - final String chatId; - final DirectChatViewModel model; - - @override - Widget build(BuildContext context) { - model.getChatMessages(chatId); - model.chatName(chatId); - return Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: Row( - children: [ - IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: () => Navigator.pop(context), - ), - SizedBox(width: SizeConfig.safeBlockHorizontal! * 3), - CircleAvatar( - backgroundColor: Colors.white, - radius: SizeConfig.blockSizeVertical! * 2.3, - ), - SizedBox(width: SizeConfig.safeBlockHorizontal! * 3), - Text('${model.name}'), - ], - ), - ), - body: BaseView( - onModelReady: (model) => model.getChatMessages(chatId), - builder: (context, model, child) => - (Provider.of(context).chatState == - ChatState.complete) - ? Column( - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 3, - ), - child: ListView.builder( - itemCount: model.chatMessagesByUser[chatId]!.length, - itemBuilder: (context, index) { - return Message( - message: - model.chatMessagesByUser[chatId]![index], - ); - }, - ), - ), - ), - ChatInputField(chatId: chatId, model: model), - ], - ) - : const Center( - child: CircularProgressIndicator(), - ), - ), - ); - } -} diff --git a/lib/views/after_auth_screens/chat/direct_chats.dart b/lib/views/after_auth_screens/chat/direct_chats.dart deleted file mode 100644 index e76cd37f8..000000000 --- a/lib/views/after_auth_screens/chat/direct_chats.dart +++ /dev/null @@ -1,53 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -/// DirectChats return a statelessWidget for rendering all the directs -/// chats of the current user in the Chat List Screen -class DirectChats extends StatelessWidget { - const DirectChats({super.key}); - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return ListView.builder( - // key: model.listKey, - itemCount: model.chats.length, - itemBuilder: (context, index) { - return ChatTile( - chat: model.chats[index], - model: model, - ); - }, - ); - }, - ); - } -} - -/// ChatTile return a widget for a tile in the list of Direct Chats in the Chat List Screen. -class ChatTile extends StatelessWidget { - const ChatTile({super.key, required this.chat, required this.model}); - - final ChatListTileDataModel chat; - final DirectChatViewModel model; - @override - Widget build(BuildContext context) { - return ListTile( - onTap: () => navigationService - .pushScreen(Routes.chatMessageScreen, arguments: [chat.id, model]), - leading: const CircleAvatar( - radius: 20, - ), - title: Text(chat.users![0].firstName!), - ); - } -} diff --git a/lib/views/after_auth_screens/chat/select_contact.dart b/lib/views/after_auth_screens/chat/select_contact.dart deleted file mode 100644 index 180abe47c..000000000 --- a/lib/views/after_auth_screens/chat/select_contact.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -/// SelectContact returns a widget that has mutable state _SelectContactState. -class SelectContact extends StatefulWidget { - const SelectContact({super.key}); - - @override - _SelectContactState createState() => _SelectContactState(); -} - -/// _SelectContactState returns a widget that renders the list of the users that current user can chat with. -class _SelectContactState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.black, - centerTitle: true, - leading: IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: () { - navigationService.pop(); - }, - ), - title: Text( - "Select Contacts", - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - ), - body: BaseView( - onModelReady: (model) async { - model.initialise(); - await model.getCurrentOrgUsersList(); - }, - builder: (context, model, child) { - return ListView.builder( - itemCount: model.orgMembersList.length, - itemBuilder: (context, index) { - return GestureDetector( - key: Key('select_contact_gesture_$index'), - onTap: () { - // Navigator.push(context, MaterialPageRoute(builder: (context)=>ChatMessageScreen(chat: ChatListTileDataModel(ChatUser(model.orgMembersList[index].firstName,model.orgMembersList[index].id,model.orgMembersList[index].image),null,0)))); - }, - child: Container( - child: Padding( - padding: const EdgeInsets.all(5.0), - child: ListTile( - leading: const CircleAvatar( - radius: 25, - ), - title: Text( - model.orgMembersList[index].firstName.toString(), - ), - ), - ), - ), - ); - }, - ); - }, - ), - ); - } -} diff --git a/lib/views/after_auth_screens/chat/widgets/chat_input_field.dart b/lib/views/after_auth_screens/chat/widgets/chat_input_field.dart deleted file mode 100644 index c9606800d..000000000 --- a/lib/views/after_auth_screens/chat/widgets/chat_input_field.dart +++ /dev/null @@ -1,114 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; - -/// ChatInputField returns a widget that has mutable state _ChatInputFieldState. -class ChatInputField extends StatefulWidget { - const ChatInputField({ - required this.chatId, - required this.model, - super.key, - }); - - /// DirectChatViewModel instance. - final DirectChatViewModel model; - - /// ChatId. - final String chatId; - - @override - State createState() => _ChatInputFieldState(); -} - -/// _ChatInputFieldState is a mutable state which return a widget for Input Field in Chat section. -class _ChatInputFieldState extends State { - // controllers are a means to give control to the parent widget over its child state - /// TextEditingController for input field. - final controller = TextEditingController(); - - @override - // dispose function declaration - void dispose() { - controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - // return a container - return Container( - // styling - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.blockSizeHorizontal! * 2, - vertical: SizeConfig.blockSizeVertical!, - ), - // input field decoration - decoration: BoxDecoration( - // background theme for text field - color: Theme.of(context).scaffoldBackgroundColor, - // box shadow - boxShadow: [ - BoxShadow( - offset: const Offset(0, 4), - blurRadius: 32, - color: const Color(0xFF087949).withOpacity(0.08), - ), - ], - ), - child: Row( - children: [ - Expanded( - child: Container( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.blockSizeHorizontal! * 3, - ), - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: BorderRadius.circular(40), - ), - child: Row( - children: [ - SizedBox(width: SizeConfig.blockSizeHorizontal), - Expanded( - // TextField is commonly used text input widget that - //allows users to collect inputs from the keyboard into an app. - child: TextField( - key: const Key('InputFieldKey'), - controller: controller, - decoration: InputDecoration( - enabledBorder: InputBorder.none, - disabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - suffixIcon: GestureDetector( - key: const Key('InputFieldGestureKey'), - onTap: () { - widget.model.sendMessageToDirectChat( - widget.chatId, - controller.text, - ); - controller.clear(); - }, - child: Icon( - Icons.send, - color: Theme.of(context) - .textTheme - .bodyLarge! - .color! - .withOpacity(0.64), - ), - ), - // Placeholder text for the text field - hintText: "Type a message", - border: InputBorder.none, - ), - ), - ), - ], - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/chat/widgets/chat_message_bubble.dart b/lib/views/after_auth_screens/chat/widgets/chat_message_bubble.dart deleted file mode 100644 index 6487db912..000000000 --- a/lib/views/after_auth_screens/chat/widgets/chat_message_bubble.dart +++ /dev/null @@ -1,65 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/services/size_config.dart'; - -/// Message returns a widget for chat message in the bubble form. -class Message extends StatelessWidget { - const Message({super.key, required this.message}); - - final ChatMessage message; - - @override - Widget build(BuildContext context) { - // styling - return Padding( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical! * 2), - child: Row( - mainAxisAlignment: - message.sender!.firstName == userConfig.currentUser.firstName - ? MainAxisAlignment.end - : MainAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 2, - vertical: SizeConfig.blockSizeVertical! * 1.2, - ), - decoration: BoxDecoration( - // if the message is sent by current user, then the background color will be white else green - color: - message.sender!.firstName == userConfig.currentUser.firstName - ? Colors.white - : Colors.green, - borderRadius: - message.sender!.firstName == userConfig.currentUser.firstName - ? const BorderRadius.only( - bottomRight: Radius.circular(15), - topLeft: Radius.circular(15), - bottomLeft: Radius.circular(15), - ) - : const BorderRadius.only( - bottomRight: Radius.circular(15), - topRight: Radius.circular(15), - bottomLeft: Radius.circular(15), - ), - ), - child: Text( - message.messageContent!, - // if the message is sent by current user, then the text color will be black else theme bodyText color - style: TextStyle( - color: message.sender!.firstName == - userConfig.currentUser.firstName - ? Colors.black - : Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/events/create_custom_recurring_event.dart b/lib/views/after_auth_screens/events/create_custom_recurring_event.dart deleted file mode 100644 index 0667482d9..000000000 --- a/lib/views/after_auth_screens/events/create_custom_recurring_event.dart +++ /dev/null @@ -1,332 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/widgets/create_recurring_event_helper_widgets.dart'; -import 'package:talawa/widgets/custom_weekday_selector.dart'; - -/// custom padding. -final _sectionPadding = SizeConfig.blockSizeHorizontal! * 8; - -/// Widget to build custom recurrence page. -class CustomRecurrencePage extends StatefulWidget { - const CustomRecurrencePage({super.key, required this.model}); - - /// Instance of create event view model. - final CreateEventViewModel model; - - @override - State createState() => _CustomRecurrencePageState(); -} - -class _CustomRecurrencePageState extends State { - /// Instance of create event view model. - late CreateEventViewModel viewModel; - - @override - void initState() { - super.initState(); - viewModel = widget.model; - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 1, - centerTitle: true, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Custom recurrence'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - actions: [ - TextButton( - onPressed: () { - setState(() { - if (viewModel.eventEndType == EventEndTypes.never) { - viewModel.recurrenceEndDate = null; - } else if (viewModel.eventEndType == EventEndTypes.after) { - viewModel.count = - int.parse(viewModel.endOccurenceController.text); - } - viewModel.interval = - int.parse(viewModel.repeatsEveryCountController.text); - viewModel.recurrenceLabel = - RecurrenceUtils.getRecurrenceRuleText( - viewModel.frequency, - viewModel.weekDays, - viewModel.interval, - viewModel.count, - viewModel.weekDayOccurenceInMonth, - viewModel.recurrenceStartDate, - viewModel.recurrenceEndDate, - ); - }); - navigationService.pop(); - }, - child: Text(AppLocalizations.of(context)!.strictTranslate('Done')), - ), - ], - ), - body: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: _buildRecurrenceOptions(context), - ), - ); - } - - /// Utility to build recurrence options widgets. - /// - /// **params**: - /// * `context`: BuildContext of the widget. - /// - /// **returns**: - /// * `Column`: Column of recurrence options widgets. - Column _buildRecurrenceOptions(BuildContext context) { - final List monthlyOptions = [ - RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - null, - int.parse(viewModel.repeatsEveryCountController.text), - int.parse(viewModel.endOccurenceController.text), - null, - viewModel.recurrenceStartDate, - viewModel.recurrenceEndDate, - ), - RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - { - RecurrenceUtils - .weekDays[widget.model.recurrenceStartDate.weekday - 1], - }, - int.parse(viewModel.repeatsEveryCountController.text), - int.parse(viewModel.endOccurenceController.text), - RecurrenceUtils.getWeekDayOccurenceInMonth( - widget.model.recurrenceStartDate, - ), - viewModel.recurrenceStartDate, - viewModel.recurrenceEndDate, - ), - RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - { - RecurrenceUtils - .weekDays[widget.model.recurrenceStartDate.weekday - 1], - }, - int.parse(viewModel.repeatsEveryCountController.text), - int.parse(viewModel.endOccurenceController.text), - -1, - viewModel.recurrenceStartDate, - viewModel.recurrenceEndDate, - ), - ]; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(_sectionPadding), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - inputFieldHeading('Repeats every'), - _section1InputFields(), - ], - ), - ), - (viewModel.recurrenceInterval == EventIntervals.daily || - viewModel.recurrenceInterval == EventIntervals.yearly) - ? Divider(color: Theme.of(context).hintColor) - : Column( - children: [ - Divider(color: Theme.of(context).hintColor), - Container( - padding: EdgeInsets.fromLTRB( - _sectionPadding, - _sectionPadding, - 90, - _sectionPadding, - ), - child: viewModel.recurrenceInterval == - EventIntervals.monthly - ? Row( - children: [ - RecurrenceFrequencyDropdown( - model: viewModel, - options: [ - monthlyOptions[0], - if (RecurrenceUtils - .getWeekDayOccurenceInMonth( - widget.model.recurrenceStartDate, - ) != - 5) - monthlyOptions[1], - if (RecurrenceUtils.isLastOccurenceOfWeekDay( - widget.model.recurrenceStartDate, - )) - monthlyOptions[2], - ], - selectedOption: monthlyOptions[0], - onSelected: (String value) { - Set tempWeekDays; - int? tempWeekDayOccurenceInMonth; - if (value == monthlyOptions[0]) { - tempWeekDays = {}; - tempWeekDayOccurenceInMonth = null; - } else if (value == monthlyOptions[1]) { - tempWeekDays = { - RecurrenceUtils.weekDays[widget.model - .recurrenceStartDate.weekday - - 1], - }; - tempWeekDayOccurenceInMonth = - RecurrenceUtils - .getWeekDayOccurenceInMonth( - widget.model.recurrenceStartDate, - ); - } else { - tempWeekDays = { - RecurrenceUtils.weekDays[widget.model - .recurrenceStartDate.weekday - - 1], - }; - tempWeekDayOccurenceInMonth = -1; - } - setState(() { - viewModel.frequency = Frequency.monthly; - viewModel.recurrenceLabel = value; - viewModel.weekDays = tempWeekDays; - viewModel.weekDayOccurenceInMonth = - tempWeekDayOccurenceInMonth; - }); - }, - ), - ], - ) - : Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - inputFieldHeading('Repeats on'), - CustomWeekDaySelector( - model: viewModel, - ), - ], - ), - ), - Divider(color: Theme.of(context).hintColor), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: - EdgeInsets.only(top: _sectionPadding, left: _sectionPadding), - child: inputFieldHeading('Ends'), - ), - EventEndOptions(model: viewModel), - ], - ), - ], - ); - } - - /// Input Fields of repeats every section. - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Row`: Row of Custom input fields. - Row _section1InputFields() { - return Row( - children: [ - SizedBox( - width: SizeConfig.screenWidth! * 0.15, - child: CustomTextField( - key: const Key('inputsection1TextField'), - maxTextLength: 2, - textEditingController: viewModel.repeatsEveryCountController, - ), - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.03, - ), - RecurrenceFrequencyDropdown( - model: viewModel, - options: [ - EventIntervals.daily, - EventIntervals.weekly, - EventIntervals.monthly, - EventIntervals.yearly, - ], - selectedOption: viewModel.recurrenceInterval, - onSelected: (String value) { - switch (value) { - case EventIntervals.daily: - updateModel(Frequency.daily, value, null, null); - break; - case EventIntervals.weekly: - updateModel(Frequency.weekly, value, null, null); - break; - case EventIntervals.monthly: - updateModel(Frequency.monthly, value, null, null); - break; - case EventIntervals.yearly: - updateModel(Frequency.yearly, value, null, null); - break; - } - }, - ), - ], - ); - } - - /// Custom heading for input fields. - /// - /// **params**: - /// * `title`: Text displayed as heading. - /// - /// **returns**: - /// * `Container`: Container containing the heading text. - Container inputFieldHeading(String title) => Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title), - const SizedBox( - height: 12, - ), - ], - ), - ); - - /// Returns the updated model with the selected recurrence options. - /// - /// **params**: - /// * `frequency`: represent the frequency of the event. - /// * `value`: represent the interval of the event. - /// * `weekDayOccurenceInMonth`: represent the week day occurence in month. - /// * `weekDays`: represent the list of week days. - /// - /// **returns**: - /// None - void updateModel( - String frequency, - String value, - int? weekDayOccurenceInMonth, - Set? weekDays, - ) { - setState(() { - widget.model.frequency = frequency; - widget.model.recurrenceInterval = value; - widget.model.weekDayOccurenceInMonth = weekDayOccurenceInMonth; - widget.model.weekDays = weekDays ?? {}; - }); - } -} diff --git a/lib/views/after_auth_screens/events/create_event_form.dart b/lib/views/after_auth_screens/events/create_event_form.dart deleted file mode 100644 index caac2c137..000000000 --- a/lib/views/after_auth_screens/events/create_event_form.dart +++ /dev/null @@ -1,125 +0,0 @@ -// ignore_for_file: talawa_good_doc_comments, talawa_api_doc -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; - -/// CreateEventForm returns a widget of a Form for creating events in the organization. -/// This widget is used in CreateEventPage widget. -class CreateEventForm extends StatelessWidget { - const CreateEventForm({super.key, required this.model}); - final CreateEventViewModel model; - @override - Widget build(BuildContext context) { - // Form class is a container for grouping together multiple form field widgets. - return Form( - key: model.formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Text field for event title. - TextFormField( - key: const Key('create_event_form_tff1'), - textInputAction: TextInputAction.next, - controller: model.eventTitleTextController, - keyboardType: TextInputType.name, - maxLength: 20, - focusNode: model.titleFocus, - validator: (value) => Validator.validateEventForm(value!, 'Title'), - decoration: InputDecoration( - // placeholder of the text field - labelText: AppLocalizations.of(context)! - .strictTranslate('Add Event Title'), - isDense: true, - labelStyle: Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - counterText: "", - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.title, - size: 25, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for the location. - TextFormField( - key: const Key('create_event_form_tff2'), - textInputAction: TextInputAction.next, - keyboardType: TextInputType.streetAddress, - controller: model.eventLocationTextController, - focusNode: model.locationFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Location'), - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .strictTranslate('Where is the event?'), - labelText: - AppLocalizations.of(context)!.strictTranslate('Add Location'), - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.place, - size: 25, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for event description. - TextFormField( - key: const Key('create_event_form_tff3'), - keyboardType: TextInputType.multiline, - controller: model.eventDescriptionTextController, - focusNode: model.descriptionFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Description'), - maxLines: 10, - minLines: 1, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .strictTranslate('Describe the event'), - labelText: AppLocalizations.of(context)! - .strictTranslate('Add Description'), - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.view_headline, - size: 25, - ), - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/events/create_event_page.dart b/lib/views/after_auth_screens/events/create_event_page.dart deleted file mode 100644 index 99cd94457..000000000 --- a/lib/views/after_auth_screens/events/create_event_page.dart +++ /dev/null @@ -1,439 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_form.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/add_members_bottom_sheet.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; -import 'package:talawa/widgets/event_date_time_tile.dart'; -import 'package:talawa/widgets/member_name_tile.dart'; -import 'package:talawa/widgets/recurrence_dialog.dart'; - -/// CreateEventPage returns a widget that has mutable state _CreateEventPageState. -class CreateEventPage extends StatefulWidget { - const CreateEventPage({super.key}); - - @override - _CreateEventPageState createState() => _CreateEventPageState(); -} - -/// _CreateEventPageState returns a widget for a Page to Creatxe the Event in the Organization. -class _CreateEventPageState extends State { - @override - Widget build(BuildContext context) { - final TextStyle subtitleTextStyle = - Theme.of(context).textTheme.headlineSmall!.copyWith(fontSize: 16); - final navigationServiceLocal = locator(); - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return Scaffold( - // AppBar is the header of the page - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 1, - centerTitle: true, - leading: GestureDetector( - onTap: () => navigationServiceLocal.pop(), - child: const Icon(Icons.close), - ), - title: Text( - AppLocalizations.of(context)!.strictTranslate('Add Event'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - actions: [ - TextButton( - key: const Key('addButton'), - onPressed: () { - if (userConfig.loggedIn) { - model.createEvent(); - } else { - navigationService.pop(); - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - } - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Add'), - style: Theme.of(context).textTheme.bodyLarge!.copyWith( - fontSize: 16, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - ], - ), - body: Scrollbar( - thickness: 2, - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(15), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - const Icon( - Icons.image, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.036, - ), - TextButton( - key: const Key('txt_btn_cep'), - onPressed: () { - model.getImageFromGallery(); - }, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Add Image"), - style: subtitleTextStyle, - ), - ), - ], - ), - model.imageFile != null - ? Container( - height: 300, - padding: const EdgeInsets.all(8.0), - child: Stack( - children: [ - Image.file( - model.imageFile!, - fit: BoxFit.fitWidth, - width: MediaQuery.of(context).size.width, - ), - Positioned( - right: 5, - top: 5, - child: IconButton( - onPressed: () => model.removeImage(), - icon: const Icon( - Icons.cancel, - color: Colors.black, - ), - ), - ), - ], - ), - ) - : Container(), - const Divider(), - CreateEventForm( - model: model, - ), - SizedBox(height: SizeConfig.screenHeight! * 0.013), - const Divider(), - SizedBox( - width: SizeConfig.screenWidth, - child: Wrap( - alignment: WrapAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate('Keep Registerable'), - style: subtitleTextStyle, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.005, - ), - Switch( - value: model.isRegisterableSwitch, - onChanged: (value) { - setState(() { - model.isRegisterableSwitch = value; - }); - }, - activeColor: - Theme.of(context).colorScheme.primary, - ), - ], - ), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate('All day'), - style: subtitleTextStyle, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.005, - ), - Switch( - // Switch to select the visibility of the event. - value: model.isAllDay, - onChanged: (value) { - setState(() { - model.isAllDay = value; - }); - }, - activeColor: - Theme.of(context).colorScheme.primary, - ), - ], - ), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate('Keep Public'), - style: subtitleTextStyle, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.005, - ), - Switch( - value: model.isPublicSwitch, - onChanged: (value) { - setState(() { - model.isPublicSwitch = value; - }); - }, - activeColor: - Theme.of(context).colorScheme.primary, - ), - ], - ), - ], - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - const Divider(), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Text( - AppLocalizations.of(context)!.strictTranslate( - model.isAllDay - ? 'Select Start Date' - : 'Select Start Date and Time', - ), - style: subtitleTextStyle, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // DateTimeTile is custom widget that returns a tile to select date and time. - DateTimeTile( - isAllDay: model.isAllDay, - date: "${model.eventStartDate.toLocal()}".split(' ')[0], - time: model.eventStartTime.format(context), - setDate: () async { - final date = await customDatePicker( - initialDate: model.eventStartDate, - ); - if (date.isBefore(DateTime.now())) { - navigationServiceLocal.showSnackBar( - "Cannot create events having date prior than today ", - ); - } - setState(() { - if (model.eventStartDate != date) { - model.eventStartDate = date; - model.recurrenceStartDate = date; - model.recurrenceLabel = 'Does not repeat'; - model.isRecurring = false; - model.frequency = Frequency.weekly; - model.weekDays = {}; - model.weekDayOccurenceInMonth = null; - } - }); - }, - setTime: () async { - final time = await customTimePicker( - initialTime: model.eventStartTime, - ); - final validationError = Validator.validateEventTime( - time, - model.eventEndTime, - ); - if (validationError != null) { - // coverage:ignore-start - navigationService.showTalawaErrorSnackBar( - 'Start time must be before end time', - MessageType.error, - ); - // coverage:ignore-end - } else { - setState(() { - model.eventStartTime = time; - }); - } - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.026, - ), - Text( - AppLocalizations.of(context)!.strictTranslate( - model.isAllDay - ? 'Select End Date' - : 'Select End Date and Time', - ), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - DateTimeTile( - key: const Key('key for test cep'), - isAllDay: model.isAllDay, - date: "${model.eventEndDate.toLocal()}".split(' ')[0], - time: model.eventEndTime.format(context), - setDate: () async { - final date = await customDatePicker( - initialDate: model.eventEndDate, - ); - final startDate = model.eventStartDate; - // coverage:ignore-start - if (startDate.compareTo(date) < 0) { - setState(() { - if (model.eventEndDate != date) { - model.eventEndDate = date; - model.recurrenceLabel = 'Does not repeat'; - model.recurrenceEndDate = null; - model.isRecurring = false; - model.frequency = Frequency.weekly; - model.weekDays = {}; - model.weekDayOccurenceInMonth = null; - } - }); - // coverage:ignore-end - } else { - navigationServiceLocal.showSnackBar( - "End Date cannot be after start date ", - ); - } - }, - setTime: () async { - final time = await customTimePicker( - initialTime: model.eventEndTime, - ); - final validationError = Validator.validateEventTime( - model.eventStartTime, - time, - ); - final showSnackBar = - navigationService.showTalawaErrorSnackBar; - if (validationError != null) { - // coverage:ignore-start - showSnackBar( - 'Start time must be before end time', - MessageType.error, - ); - // coverage:ignore-end - } else { - setState(() { - model.eventEndTime = time; - }); - } - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.026, - ), - InkWell( - key: const Key('inkwell_recurrLabel'), - child: Row( - children: [ - const Icon(Icons.restore), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - Expanded( - child: Text( - AppLocalizations.of(context)! - .strictTranslate(model.recurrenceLabel), - style: subtitleTextStyle, - overflow: TextOverflow.ellipsis, - ), - ), - ], - ), - onTap: () async { - final String? selectedReccurence; - selectedReccurence = await showDialog( - context: context, - builder: (context) { - return ShowRecurrenceDialog( - model: model, - ); - }, - ); - setState(() { - if (selectedReccurence != null) { - model.recurrenceLabel = selectedReccurence; - } - }); - }, - ), - SizedBox(height: SizeConfig.screenHeight! * 0.026), - const Divider(), - InkWell( - key: const Key('inwell_cep2'), - onTap: () { - EventBottomSheet().addUserBottomSheet( - context: context, - model: model, - ); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate("Add Members"), - style: subtitleTextStyle, - ), - Icon( - Icons.add, - color: Theme.of(context).colorScheme.secondary, - ), - ], - ), - ), - Wrap( - children: model.selectedMembers - .map( - (user) => MemberNameTile( - userName: "${user.firstName!} ${user.lastName!}", - userImage: user.image, - onDelete: () { - model.removeUserFromList( - userId: user.id!, - ); - }, - ), - ) - .toList() - .cast(), - ), - ], - ), - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/events/edit_event_page.dart b/lib/views/after_auth_screens/events/edit_event_page.dart deleted file mode 100644 index 8ea4d2a6d..000000000 --- a/lib/views/after_auth_screens/events/edit_event_page.dart +++ /dev/null @@ -1,230 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_events_form.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; -import 'package:talawa/widgets/event_date_time_tile.dart'; - -/// EditEventPage returns a widget that has mutable state _EditEventPageState. -class EditEventPage extends StatefulWidget { - const EditEventPage({super.key, required this.event}); - - /// Represents event instance to be edited. - final Event event; - - @override - _EditEventPageState createState() => _EditEventPageState(); -} - -/// _EditEventPageState returns a widget to edit the event that is being posted by the current user. -class _EditEventPageState extends State { - @override - Widget build(BuildContext context) { - final TextStyle subtitleTextStyle = - Theme.of(context).textTheme.headlineSmall!.copyWith(fontSize: 16); - return BaseView( - onModelReady: (model) => model.initialize(widget.event), - builder: (context, model, child) { - return Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 1, - centerTitle: true, - leading: GestureDetector( - onTap: () { - navigationService.pop(); - }, - child: const Icon(Icons.close), - ), - // Title of the app bar(header). - title: Text( - 'Edit Event', - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - actions: [ - // Button for "Done". - TextButton( - onPressed: () { - model.updateEvent(); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Done'), - style: Theme.of(context).textTheme.bodyLarge!.copyWith( - fontSize: 16, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - ], - ), - body: SingleChildScrollView( - // SingleChildScrollView is a box in which a single widget can be scrolled. - child: Padding( - padding: const EdgeInsets.all(15), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - const Icon( - Icons.image, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.036, - ), - TextButton( - onPressed: () {}, - child: Text("Add Image", style: subtitleTextStyle), - ), - ], - ), - const Divider(), - EditEventForm( - model: model, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - const Divider(), - Text('Select Start Date and Time', style: subtitleTextStyle), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - DateTimeTile( - isAllDay: false, - // variables and member functions initialisation. - date: "${model.eventStartDate.toLocal()}".split(' ')[0], - time: model.eventStartTime.format(context), - setDate: () async { - final date = await customDatePicker( - initialDate: model.eventStartDate, - ); - setState(() { - model.eventStartDate = date; - }); - }, - setTime: () async { - final time = await customTimePicker( - initialTime: model.eventStartTime, - ); - setState(() { - model.eventStartTime = time; - }); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.026, - ), - Text( - 'Select End Date and Time', - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - DateTimeTile( - isAllDay: false, - date: "${model.eventEndDate.toLocal()}".split(' ')[0], - time: model.eventEndTime.format(context), - setDate: () async { - final date = await customDatePicker( - initialDate: model.eventEndDate, - ); - setState(() { - model.eventEndDate = date; - }); - }, - setTime: () async { - final time = await customTimePicker( - initialTime: model.eventEndTime, - ); - - setState(() { - model.eventEndTime = time; - }); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.026, - ), - Row( - children: [ - const Icon(Icons.restore), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - Text('Does not repeat', style: subtitleTextStyle), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.026, - ), - const Divider(), - SizedBox( - width: SizeConfig.screenWidth, - child: Wrap( - alignment: WrapAlignment.spaceBetween, - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text('Keep Public', style: subtitleTextStyle), - SizedBox( - width: SizeConfig.screenWidth! * 0.005, - ), - Switch( - value: model.isPublicSwitch, - onChanged: (value) { - setState(() { - model.isPublicSwitch = value; - }); - }, - activeColor: - Theme.of(context).colorScheme.primary, - ), - ], - ), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - 'Keep Registerable', - style: subtitleTextStyle, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.005, - ), - Switch( - value: model.isRegisterableSwitch, - onChanged: (value) { - setState(() { - model.isRegisterableSwitch = value; - }); - }, - activeColor: - Theme.of(context).colorScheme.primary, - ), - ], - ), - ], - ), - ), - ], - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/events/edit_events_form.dart b/lib/views/after_auth_screens/events/edit_events_form.dart deleted file mode 100644 index 68f7f514d..000000000 --- a/lib/views/after_auth_screens/events/edit_events_form.dart +++ /dev/null @@ -1,135 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; - -/// EditEventForm returns a widget of a Form for editing an event. -/// This widget is used in EditEventPage widget. -class EditEventForm extends StatelessWidget { - const EditEventForm({super.key, required this.model}); - final EditEventViewModel model; - @override - Widget build(BuildContext context) { - // Form class is a container for grouping together multiple form field widgets. - return Form( - key: model.formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Text field for event title. - TextFormField( - textInputAction: TextInputAction.next, - controller: model.eventTitleTextController, - keyboardType: TextInputType.name, - maxLength: 20, - focusNode: model.titleFocus, - validator: (value) => Validator.validateEventForm(value!, 'Title'), - decoration: InputDecoration( - labelText: 'Add Event Title', - isDense: true, - labelStyle: Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - counterText: "", - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.title, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.titleFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for the location. - TextFormField( - textInputAction: TextInputAction.next, - keyboardType: TextInputType.streetAddress, - controller: model.eventLocationTextController, - focusNode: model.locationFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Location'), - decoration: InputDecoration( - hintText: 'Where is the event?', - labelText: 'Add Location', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.place, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.locationFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for event description. - TextFormField( - keyboardType: TextInputType.multiline, - controller: model.eventDescriptionTextController, - focusNode: model.descriptionFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Description'), - maxLines: 10, - minLines: 1, - decoration: InputDecoration( - hintText: 'Describe the event', - labelText: 'Add Description', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.view_headline, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.descriptionFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - ], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/events/event_calendar.dart b/lib/views/after_auth_screens/events/event_calendar.dart deleted file mode 100644 index e444b6271..000000000 --- a/lib/views/after_auth_screens/events/event_calendar.dart +++ /dev/null @@ -1,190 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_calendar/calendar.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; - -/// EventCalendar returns a widget that has mutable state _EventCalendarState. -class EventCalendar extends StatelessWidget { - const EventCalendar(this.eventList, {super.key}); - - /// List of events that needs to bge passed when the calling this widget. - final List eventList; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(eventList), - builder: (context, model, child) { - print(model.calendarView); - return Scaffold( - // header of the page. - appBar: AppBar( - title: const Text('Event Calendar'), - actions: [ - IconButton( - // button to select the date and time of an event. - onPressed: () async { - // initially pickedDate is initialised with current time. - final pickedDate = - await customDatePicker(initialDate: DateTime.now()); - model.selectionChanged( - DateRangePickerSelectionChangedArgs(pickedDate), - ); - }, - icon: const Icon(Icons.date_range), - ), - calendarViewSelection(model), - ], - ), - body: Column( - children: [ - // SizedBox( - // height: 100, - // // The SfDateRangePicker widget provides four different types of views to display. - // //It can be assigned to the widget constructor by using the view property. - // child: SfDateRangePicker( - // view: DateRangePickerView.month, - // controller: model.dateRangePickerController, - // showNavigationArrow: true, - // allowViewNavigation: false, - // monthViewSettings: const DateRangePickerMonthViewSettings( - // numberOfWeeksInView: 1, - // dayFormat: 'EEE', - // ), - // onSelectionChanged: model.selectionChanged, - // ), - // ), - Expanded( - child: SfCalendar( - view: model.calendarView, - headerHeight: 60, - viewHeaderHeight: 60, - controller: model.calendarController, - dataSource: _getCalendarDataSource(eventList), - onViewChanged: model.viewChanged, - ), - ), - ], - ), - ); - }, - ); - } - - /// Popupmenu Button to select calendar view. - /// - /// **params**: - /// * `model`: EventCalendarViewModel. - /// - /// **returns**: - /// * `PopupMenuButton`: custom PopupMenuButton.. - PopupMenuButton calendarViewSelection(EventCalendarViewModel model) { - final List views = ["Day", "Month", "Schedule"]; - return PopupMenuButton( - itemBuilder: (context) { - return >[ - for (final view in views) - PopupMenuItem( - value: view, - child: Text(view), - ), - ]; - }, - onSelected: (value) { - model.changeView(value); - }, - ); - } -} - -/// function to convert List to Appointment object. -/// -/// Appointment is provided by the calender external library -/// -/// **params**: -/// * `eventsList`: list of events to be converted -/// -/// **returns**: -/// * `_AppointmentDataSource`: Entire data in [](list) format -_AppointmentDataSource _getCalendarDataSource(List eventsList) { - final appointments = []; - final colors = [ - Colors.green, - Colors.blue, - Colors.red, - Colors.orange, - Colors.purple, - Colors.pink, - ]; - int index = 0; - // looping through all the events created in the organization. - eventsList.forEach((event) { - DateTime startDate; - DateTime endDate; - if (event.startDate!.contains('/')) { - startDate = DateFormat('MM/dd/yyyy').parse(event.startDate!); - } else { - startDate = DateFormat('yyyy-MM-dd').parse(event.startDate!); - } - - if (event.endDate!.contains('/')) { - endDate = DateFormat('MM/dd/yyyy').parse(event.endDate!); - } else { - endDate = DateFormat('yyyy-MM-dd').parse(event.endDate!); - } - print("${event.startTime!}##############################"); - final startTime = parseTime(event.startTime ?? '14:23:01'); - final endTime = parseTime(event.endTime ?? '21:23:01'); - - // adding appointments on the calender for event[index] date time. - appointments.add( - Appointment( - startTime: startDate - .add(Duration(hours: startTime.hour, minutes: startTime.minute)), - endTime: - endDate.add(Duration(hours: endTime.hour, minutes: endTime.minute)), - subject: event.title!, - color: colors[index % colors.length], - location: event.location, - id: event.id, - ), - ); - index++; - }); - - return _AppointmentDataSource(appointments); -} - -/// a_line_ending_with_end_punctuation. -/// -/// **params**: -/// * `time`: define_the_param -/// -/// **returns**: -/// * `DateTime`: define_the_return -DateTime parseTime(String time) { - try { - return DateFormat('h:mm a', 'en_US').parse(time); - } on FormatException { - print('Caught FormatException: $time'); - try { - return DateFormat('Hms').parse(time); - } catch (e) { - print('Caught error: $e'); - throw Exception('Invalid time format: $time'); - } - } -} - -/// class for handling the data source. -/// -/// assign the appointments value -class _AppointmentDataSource extends CalendarDataSource { - _AppointmentDataSource(List source) { - appointments = source; - } -} diff --git a/lib/views/after_auth_screens/events/event_filter_bottomsheet.dart b/lib/views/after_auth_screens/events/event_filter_bottomsheet.dart deleted file mode 100644 index a16452148..000000000 --- a/lib/views/after_auth_screens/events/event_filter_bottomsheet.dart +++ /dev/null @@ -1,150 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/apptheme.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; - -/// Shows a list of dropdown taken from `model` and `context`. -/// -/// **params**: -/// * `model`: contains the events data -/// * `context`: the overall context of UI -/// -/// **returns**: -/// * `Widget`: the dropdown -Widget dropDownList( - ExploreEventsViewModel model, - BuildContext context, -) { - final Map filters = { - 'All Events': 'Show all events', - 'My Events': 'Show all events created by you', - 'Registered Events': 'Show all events you have registered', - 'Public Events': 'Show events for all', - 'Private Events': 'Show invite-only events', - }; - return SizedBox( - height: SizeConfig.screenHeight, - width: SizeConfig.screenWidth, - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 10, - ), - child: StatefulBuilder( - builder: (_, StateSetter setState) { - return SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - height: SizeConfig.safeBlockVertical, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - AppLocalizations.of( - context, - )! - .strictTranslate( - "Filters", - ), - style: Theme.of( - context, - ).textTheme.headlineSmall, - ), - IconButton( - key: const Key('close'), - onPressed: () { - Navigator.pop(context); - }, - icon: const Icon( - Icons.close, - ), - ), - ], - ), - ...List.generate( - filters.length, - (index) { - return Padding( - padding: EdgeInsets.symmetric( - vertical: SizeConfig.safeBlockVertical! * 2, - ), - child: GestureDetector( - onTap: () { - model.choseValueFromDropdown( - filters.keys.toList()[index], - ); - setState(() {}); - }, - child: Container( - key: Key( - filters.keys.toList()[index], - ), - decoration: BoxDecoration( - color: model.chosenValue == - filters.keys.toList()[index] - ? Theme.of(context).colorScheme.secondary - : AppTheme.white, - borderRadius: BorderRadius.all( - Radius.circular( - SizeConfig.safeBlockHorizontal! * 2, - ), - ), - ), - width: SizeConfig.screenWidth! - 60, - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 5, - vertical: SizeConfig.safeBlockVertical! / 2, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate( - filters.keys.toList()[index], - ), - style: Theme.of(context) - .textTheme - .labelLarge! - .copyWith( - color: model.chosenValue == - filters.keys.toList()[index] - ? AppTheme.white - : AppTheme.blackPrimary, - ), - ), - Text( - AppLocalizations.of(context)!.strictTranslate( - filters.values.toList()[index], - ), - style: Theme.of(context) - .textTheme - .labelSmall! - .copyWith( - color: model.chosenValue == - filters.keys.toList()[index] - ? AppTheme.white - : AppTheme.blackSecondary, - ), - ), - ], - ), - ), - ), - ), - ); - }, - ), - ], - ), - ); - }, - ), - ), - ); -} diff --git a/lib/views/after_auth_screens/events/event_info_body.dart b/lib/views/after_auth_screens/events/event_info_body.dart deleted file mode 100644 index 65f516282..000000000 --- a/lib/views/after_auth_screens/events/event_info_body.dart +++ /dev/null @@ -1,259 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/widgets/custom_list_tile.dart'; - -/// EventInfoBody returns a stateless widget which describes the body of a particular event. -class EventInfoBody extends StatelessWidget { - const EventInfoBody({super.key}); - - @override - Widget build(BuildContext context) { - // fetching the event data from model - final model = Provider.of(context); - final event = model.event; - // Slivers are special-purpose widgets that can be combined using a - //CustomScrollView to create custom scroll effects. A SliverToBoxAdapter - //is a basic sliver that creates a bridge back to one of the usual box-based widgets. - return SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - padding: EdgeInsets.only( - right: SizeConfig.safeBlockHorizontal! * 15, - ), - child: Row( - children: [ - Flexible( - child: Text( - // event title - event.title!, - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(fontSize: 26), - ), - ), - ], - ), - ), - Positioned( - right: SizeConfig.screenWidth! * 0.002, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - (model.event.creator!.id == userConfig.currentUser.id) - ? IconButton( - onPressed: () => navigationService.pushScreen( - "/editEventPage", - arguments: model.event, - ), - icon: const Icon(Icons.edit), - ) - : Container(), - const Icon(Icons.chat_bubble_outline), - ], - ), - ), - ], - ), - Text( - // Display event creator full name. - "${AppLocalizations.of(context)!.strictTranslate("Created by")}: ${event.creator!.firstName} ${event.creator!.lastName}", - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontWeight: FontWeight.w600), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon( - Icons.calendar_today, - size: 13, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - Text( - // Display start and end date of the Event. - "${event.startDate} - ${event.endDate}", - style: Theme.of(context).textTheme.bodySmall, - ), - const Spacer(), - // If event type is public then renders lock_open icon else renders lock icon. - event.isPublic! - ? Icon( - Icons.lock_open, - size: 13, - color: Theme.of(context).colorScheme.secondary, - ) - : Icon( - Icons.lock, - size: 13, - color: Theme.of(context).colorScheme.primary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - // If event type is public then renders 'public' - // else renders 'private' text translated into the app language. - event.isPublic! - ? Text( - AppLocalizations.of(context)!.strictTranslate('public'), - style: Theme.of(context).textTheme.bodySmall, - ) - : Text( - AppLocalizations.of(context)! - .strictTranslate('private'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - if (event.startTime != null && event.endTime != null) - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // display schedule icon with the start and end date of the time. - const Icon( - Icons.schedule, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.025, - ), - Text( - "${event.startTime} - ${event.endTime}", - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon( - Icons.place, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - Text( - event.location!, - style: Theme.of(context).textTheme.bodySmall, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - maxLines: 3, - ), - const Spacer(), - ], - ), - const Divider(), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Text( - AppLocalizations.of(context)!.strictTranslate("Description"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - SizedBox(width: SizeConfig.screenWidth! * 0.013), - Text( - // Display the Description of the event if not null. - event.description!, - style: Theme.of(context).textTheme.bodySmall, - ), - SizedBox(height: SizeConfig.screenHeight! * 0.013), - Text( - AppLocalizations.of(context)!.strictTranslate("Admins"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 2, - ), - ListView.builder( - padding: EdgeInsets.zero, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: event.admins!.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: Key( - '${AppLocalizations.of(context)!.strictTranslate("Admins")}$index', - ), - index: index, - type: TileType.user, - userInfo: event.admins![index], - onTapUserInfo: () {}, - ); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Text( - AppLocalizations.of(context)!.strictTranslate("Attendees"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 2, - ), - if (model.isBusy) - // if the model is still fetching the attendees details then display Circular Progress Indicator Icon. - const Padding( - padding: EdgeInsets.only(top: 12.0), - child: Center(child: CircularProgressIndicator()), - ) - else - // else if the model fetched the attendees details successfully - //then renders all the attendees in ListView. - ListView.builder( - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: model.attendees.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: Key( - 'Attendee$index', - ), - index: index, - type: TileType.attendee, - attendeeInfo: model.attendees[index], - onTapAttendeeInfo: () {}, - ); - }, - ), - ], - ), - ), - ); - } -} diff --git a/lib/views/after_auth_screens/events/event_info_page.dart b/lib/views/after_auth_screens/events/event_info_page.dart deleted file mode 100644 index 3e96d7b55..000000000 --- a/lib/views/after_auth_screens/events/event_info_page.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_info_body.dart'; -import 'package:talawa/views/base_view.dart'; - -/// EventInfoPage returns a widget that has mutable state _EventInfoPageState. -class EventInfoPage extends StatefulWidget { - const EventInfoPage({super.key, required this.args}); - - /// Takes in Arguments for the Page. - final Map args; - @override - _EventInfoPageState createState() => _EventInfoPageState(); -} - -/// _EventInfoPageState returns a widget of a Page for particular event. -class _EventInfoPageState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(args: widget.args), - builder: (context, model, child) { - return Scaffold( - body: CustomScrollView( - slivers: [ - // SliverAppBar is a Material Design app bar that integrates with a CustomScrollView. - SliverAppBar( - // Translated title of the App bar. - title: Text( - AppLocalizations.of(context)! - .strictTranslate('Event Details'), - ), - // actions: [ - // IconButton( - // // Button to share the event in the social medias. - // icon: const Icon(Icons.share), - // onPressed: () => SocialShare.shareOptions( - // 'https://cyberwake.github.io/applink/eventInvite?setUrl=${GraphqlConfig.orgURI}&selectOrg=${userConfig.currentOrg.id!}&eventId=${model.event.id}', - // ), - // ), - // ], - pinned: true, - expandedHeight: SizeConfig.screenWidth, - flexibleSpace: FlexibleSpaceBar( - background: Image.network( - 'https://picsum.photos/id/26/200/300', - fit: BoxFit.fill, - ), - ), - ), - const EventInfoBody(), - ], - ), - // if the event is created by current user then renders explore - // button in the event page else renders register button. - floatingActionButton: - model.event.creator!.id != userConfig.currentUser.id - ? FloatingActionButton.extended( - onPressed: () { - model.registerForEvent(); - }, - label: Text( - AppLocalizations.of(context)! - .strictTranslate(model.fabTitle), - style: Theme.of(context).textTheme.bodyMedium, - ), - ) - : FloatingActionButton( - onPressed: () { - (widget.args["exploreEventViewModel"] - as ExploreEventsViewModel) - .deleteEvent(eventId: model.event.id!); - }, - foregroundColor: Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).primaryColor, - child: const Icon( - Icons.delete, - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/events/explore_event_dialogue.dart b/lib/views/after_auth_screens/events/explore_event_dialogue.dart deleted file mode 100644 index 4155a6762..000000000 --- a/lib/views/after_auth_screens/events/explore_event_dialogue.dart +++ /dev/null @@ -1,157 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; - -/// ExploreEventDialog returns a widget that has mutable state _ExploreEventDialogState. -class ExploreEventDialog extends StatefulWidget { - const ExploreEventDialog({required Key key}) : super(key: key); - @override - _ExploreEventDialogState createState() => _ExploreEventDialogState(); -} - -/// _ExploreEventDialogState returns a widget that show explored dialog of the event. -class _ExploreEventDialogState extends State { - DateTime _startDate = DateTime.now(); - DateTime _endDate = DateTime.now().add(const Duration(days: 1)); - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.15, - ), - content: SizedBox( - height: SizeConfig.screenHeight! * 0.33, - // width: SizeConfig.screenWidth! * 0.3, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 6), - child: Column( - children: [ - datePicker( - context, - key: const Key('StartDateSelector'), - title: 'Start Date', - date: _startDate, - onTap: () async { - final date = - await customDatePicker(initialDate: _startDate); - setState(() { - _startDate = date; - }); - }, - ), - datePicker( - context, - key: const Key('EndDateSelector'), - title: 'End Date', - date: _endDate, - onTap: () async { - final date = - await customDatePicker(initialDate: _endDate); - setState(() { - _endDate = date; - }); - }, - ), - ], - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( - key: const Key('CancelButton'), - onPressed: () { - navigationService.pop(); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Cancel'), - style: Theme.of(context).textTheme.bodyMedium, - ), - ), - TextButton( - key: const Key('DoneButton'), - onPressed: () { - navigationService.pop(); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Done'), - style: const TextStyle( - fontSize: 14, - color: Color(0xff4285F4), - ), - ), - ), - ], - ), - ], - ), - ), - ); - } - - /// Creates a column with a date picker. - /// - /// **params**: - /// * `context`: A `BuildContext` representing the build context. - /// * `title`: A `String` representing the title of the date picker. - /// * `onTap`: A `void Function()` callback triggered when the date picker is tapped. - /// * `date`: A `DateTime` representing the selected date for the date picker. - /// * `key`: A `Key` to identify and differentiate the date picker widget. - /// - /// **returns**: - /// * `Column`: Returns a `Column` widget containing the date picker elements. - Column datePicker( - BuildContext context, { - required String title, - required void Function()? onTap, - required DateTime date, - required Key key, - }) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate(title), - ), - const SizedBox( - height: 5, - ), - GestureDetector( - key: key, - onTap: onTap, - child: SizedBox( - height: SizeConfig.screenHeight! * 0.08, - child: Card( - color: Theme.of(context).colorScheme.primaryContainer, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - const Padding( - padding: EdgeInsets.symmetric(horizontal: 10), - child: Icon( - Icons.calendar_today, - size: 20, - ), - ), - Expanded( - // shows the end date of the event - child: Text( - "${date.toLocal()}".split(' ')[0], - // maxLines: 1, - ), - ), - ], - ), - ), - ), - ), - ], - ); - } -} diff --git a/lib/views/after_auth_screens/events/explore_events.dart b/lib/views/after_auth_screens/events/explore_events.dart deleted file mode 100644 index 16fe3561d..000000000 --- a/lib/views/after_auth_screens/events/explore_events.dart +++ /dev/null @@ -1,295 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_filter_bottomsheet.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_event_dialogue.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_card.dart'; -import 'package:talawa/widgets/event_search_delegate.dart'; - -/// Shows the list of events with options to categorize them. -class ExploreEvents extends StatelessWidget { - const ExploreEvents({ - required Key key, - this.homeModel, - }) : super(key: key); - - /// Represents the view model for the home screen. - final MainScreenViewModel? homeModel; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return Scaffold( - appBar: AppBar( - backgroundColor: Colors.green, - key: const Key( - "ExploreEventsAppBar", - ), - elevation: 0.0, - automaticallyImplyLeading: false, - centerTitle: true, - title: Text( - AppLocalizations.of(context)!.strictTranslate( - 'Explore Events', - ), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - color: Colors.white, - ), - ), - leading: IconButton( - color: Colors.white, - icon: const Icon( - Icons.menu, - ), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - actions: [ - Padding( - padding: EdgeInsets.only( - right: SizeConfig.screenWidth! * 0.027, - ), - child: model.events.isNotEmpty - ? IconButton( - onPressed: () { - showSearch( - context: context, - delegate: EventSearch( - eventList: model.events, - exploreEventsViewModel: model, - ), - ); - }, - icon: const Icon( - Icons.search, - color: Colors.white, - ), - ) - : const SizedBox(), - ), - ], - ), - body: model.isBusy - ? const Center( - child: CircularProgressIndicator(), - ) - : RefreshIndicator( - onRefresh: () async => model.refreshEvents(), - child: Stack( - children: [ - SingleChildScrollView( - physics: const AlwaysScrollableScrollPhysics(), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.010, - ), - child: Column( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 2, - child: GestureDetector( - onTap: () => showModalBottomSheet( - backgroundColor: Colors.white, - context: context, - builder: (_) => dropDownList( - model, - context, - ), - ), - child: Card( - surfaceTintColor: Theme.of(context) - .colorScheme - .secondaryContainer, - color: Theme.of(context) - .colorScheme - .onPrimary, - child: Container( - padding: const EdgeInsets.symmetric( - vertical: 12, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - SizedBox( - width: SizeConfig - .safeBlockHorizontal, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate( - "Filters", - ), - ), - SizedBox( - width: SizeConfig - .safeBlockHorizontal, - ), - ], - ), - ), - ), - ), - ), - Expanded( - flex: 3, - child: GestureDetector( - onTap: () => showDialog( - context: context, - builder: (_) => - const ExploreEventDialog( - key: Key('ExploreEvents'), - ), - ), - child: Card( - surfaceTintColor: Theme.of(context) - .colorScheme - .secondaryContainer, - key: homeModel?.keySEDateFilter, - color: Theme.of(context) - .colorScheme - .onPrimary, - child: Container( - padding: const EdgeInsets.symmetric( - vertical: 12, - ), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - SizedBox( - width: SizeConfig - .safeBlockHorizontal, - ), - const Icon( - Icons.calendar_today, - color: Color(0xff524F4F), - ), - SizedBox( - width: SizeConfig - .safeBlockHorizontal, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate( - "Filter by Date", - ), - ), - SizedBox( - width: SizeConfig - .safeBlockHorizontal, - ), - ], - ), - ), - ), - ), - ), - Expanded( - flex: 1, - child: Card( - surfaceTintColor: Theme.of(context) - .colorScheme - .secondaryContainer, - color: Theme.of(context) - .colorScheme - .onPrimary, - child: IconButton( - onPressed: () { - navigationService.pushScreen( - Routes.calendar, - arguments: model.events, - ); - }, - icon: const Icon( - Icons.calendar_month, - ), - ), - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.020, - ), - model.events.isEmpty - ? SizedBox( - height: SizeConfig.screenHeight! * 0.5, - child: Center( - child: Text( - AppLocalizations.of(context)! - .strictTranslate( - model.emptyListMessage, - ), - ), - ), - ) - : ListView.builder( - physics: - const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.events.length, - itemBuilder: - (BuildContext context, int index) { - return GestureDetector( - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": model.events[index], - "exploreEventViewModel": model, - }, - ); - }, - child: EventCard( - event: model.events[index], - isSearchItem: false, - ), - ); - }, - ), - ], - ), - ), - ), - ], - ), - ), - floatingActionButton: FloatingActionButton.extended( - key: homeModel?.keySEAdd, - heroTag: "AddEventFab", - backgroundColor: Theme.of(context).colorScheme.background, - onPressed: () => navigationService.pushScreen("/createEventPage"), - icon: Icon( - Icons.add, - color: Theme.of(context).colorScheme.secondary, - ), - label: Text( - AppLocalizations.of(context)!.strictTranslate("Event"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(color: Theme.of(context).colorScheme.secondary), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/feed/individual_post.dart b/lib/views/after_auth_screens/feed/individual_post.dart deleted file mode 100644 index dcef443eb..000000000 --- a/lib/views/after_auth_screens/feed/individual_post.dart +++ /dev/null @@ -1,309 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/widgets_view_models/comments_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_widget.dart'; - -// Global State, should be removed in next few iterations - -/// Comment view model. -late CommentsViewModel _commentViewModel; - -/// IndividualPostView returns a widget that has mutable state _IndividualPostViewState. -class IndividualPostView extends StatefulWidget { - const IndividualPostView({super.key, required this.post}); - - /// Individual Post. - final Post post; - - @override - _IndividualPostViewState createState() => _IndividualPostViewState(); -} - -class _IndividualPostViewState extends State { - final TextEditingController _controller = TextEditingController(); - bool _isCommentValid = false; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - elevation: 0.0, - ), - bottomSheet: Container( - height: 60, - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Row( - children: [ - Expanded( - // TextField to send the comment on the post. - child: TextField( - key: const Key('indi_post_tf_key'), - controller: _controller, - textInputAction: TextInputAction.send, - onChanged: (msg) { - if (msg.isEmpty && _isCommentValid == true) { - setState(() { - _isCommentValid = false; - }); - } - if (msg.isEmpty == false && _isCommentValid == false) { - setState(() { - _isCommentValid = true; - }); - } - }, - textAlign: TextAlign.start, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)!.strictTranslate( - "Write your comment here..", - ), - contentPadding: const EdgeInsets.all(8.0), - focusColor: Colors.black, - border: InputBorder.none, - ), - keyboardType: TextInputType.text, - ), - ), - // Button to send the comment. - TextButton( - key: const Key('sendButton'), - style: _isCommentValid == false - ? ButtonStyle( - overlayColor: - MaterialStateProperty.all(Colors.transparent), - ) - : null, - //check if button is enabled when comment is valid - onPressed: _isCommentValid - ? () { - _commentViewModel.createComment(_controller.text); - _controller.text = ""; - - setState(() { - _isCommentValid = false; - }); - } - : null, - child: Text( - AppLocalizations.of(context)!.strictTranslate( - "Send", - ), - style: !_isCommentValid - ? const TextStyle(color: Colors.grey) - : null, - ), - ), - ], - ), - ), - body: ListView( - children: [ - // Post - NewsPost( - post: widget.post, - ), - Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenHeight! * 0.010, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // renders the number of users liked the post. - IndividualPageLikeSection( - usersLiked: widget.post.likedBy!, - ), - // renders the number of users commented on the post. - IndividualPostCommentSection( - comments: widget.post.comments!, - postID: widget.post.sId, - ), - const SizedBox( - height: 200, - ), - ], - ), - ), - ], - ), - ); - } -} - -/// Generates a `Padding` widget with customizable vertical padding around a text element. -/// -/// **params**: -/// * `context`: The build context in which the padding method is called. -/// * `text`: The text on which padding should be applied. -/// -/// **returns**: -/// * `Padding`: Padding widget with vertical padding applied to the provided text. -Padding buildPadding(BuildContext context, String text) { - return Padding( - padding: EdgeInsets.symmetric(vertical: SizeConfig.screenHeight! * 0.006), - child: Text( - AppLocalizations.of(context)!.strictTranslate(text), - style: Theme.of(context).textTheme.titleLarge, - ), - ); -} - -/// IndividualPageLikeSection returns a widget that show the list of all the users liked the post. -class IndividualPageLikeSection extends StatelessWidget { - const IndividualPageLikeSection({ - super.key, - required this.usersLiked, - }); - - /// Represents a list of users who have liked a post. - final List usersLiked; - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildPadding( - context, - AppLocalizations.of(context)!.strictTranslate( - "Liked by", - ), - ), - Row( - children: [ - // Looping through the usersLiked list, - for (int i = 0; i < usersLiked.length; i++) - // renders the custom widget for invidual user. - likedUserCircleAvatar(usersLiked[i]), - ], - ), - ], - ); - } -} - -/// Widget representing the comment section of an individual post. -/// -/// The `IndividualPostCommentSection` widget displays a list of comments on a post. -class IndividualPostCommentSection extends StatelessWidget { - const IndividualPostCommentSection({ - super.key, - required this.comments, - required this.postID, - }); - - /// List of comments on a post. - final List comments; - - /// ID of a post with associated comments. - final String postID; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) async { - await model.initialise(postID); - // print(model.commentList.first.creator); - _commentViewModel = model; - }, - builder: (context, model, child) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildPadding(context, "Comments"), - // Looping through the commentList list, - for (int i = 0; i < model.commentList.length; i++) - // renders the custom widget for invidual user. - CommentTemplate(comment: model.commentList[i]), - ], - ), - ); - } -} - -/// CommentTemplate returns a widget of the individual user commented on the post. -class CommentTemplate extends StatelessWidget { - const CommentTemplate({ - super.key, - required this.comment, - }); - - /// Instance of comment. - final Comment comment; - - @override - Widget build(BuildContext context) { - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const CircleAvatar(), - Expanded( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).iconTheme.color!.withOpacity(0.2), - borderRadius: const BorderRadius.all(Radius.circular(8)), - ), - padding: const EdgeInsets.all(16.0), - margin: const EdgeInsets.only(left: 8.0, bottom: 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: Text( - "${comment.creator!.firstName!} ${comment.creator!.lastName!}", - style: Theme.of(context).textTheme.bodyMedium, - ), - ), - Text( - comment.text!, - style: Theme.of(context) - .textTheme - .bodyLarge! - .copyWith(fontSize: 16.0), - ), - ], - ), - ), - ), - ], - ); - } -} - -/// Generates a Circle Avatar representing a user who liked the post. -/// -/// **params**: -/// * `user`: The user who liked the post, represented by the `LikedBy` class. -/// -/// **returns**: -/// * `Widget`: Circle Avatar of the user who liked the post. -Widget likedUserCircleAvatar(LikedBy user) { - return const Padding( - padding: EdgeInsets.only(right: 10.0, bottom: 16.0), - child: Stack( - clipBehavior: Clip.none, - alignment: Alignment.center, - children: [ - CircleAvatar( - backgroundColor: Color(0xfff2f2f2), - radius: 20, - ), - Positioned( - top: 30, - right: 0, - bottom: 20, - left: 20, - child: Icon( - Icons.thumb_up, - color: Colors.blue, - size: 20, - ), - ), - ], - ), - ); -} diff --git a/lib/views/after_auth_screens/feed/organization_feed.dart b/lib/views/after_auth_screens/feed/organization_feed.dart deleted file mode 100644 index 5913f121e..000000000 --- a/lib/views/after_auth_screens/feed/organization_feed.dart +++ /dev/null @@ -1,185 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/pinned_post.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; - -/// OrganizationFeed returns a widget that shows the feed of the organization. -class OrganizationFeed extends StatefulWidget { - const OrganizationFeed({ - required Key key, - this.homeModel, - this.forTest = false, - }) : super(key: key); - - /// MainScreenViewModel. - final MainScreenViewModel? homeModel; - - /// To implement the test. - final bool forTest; - - @override - State createState() => _OrganizationFeedState(); -} - -class _OrganizationFeedState extends State { - final ScrollController _scrollController = ScrollController(); - - /// Counter for first time scrolling when at the start of the list. - int firstDownScroll = 0; - - /// Counter for first time scrolling when at the start of the list. - int firstUpScroll = 0; - @override - void dispose() { - _scrollController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(isTest: widget.forTest), - builder: (context, model, child) { - return Scaffold( - floatingActionButton: FloatingActionButton( - shape: const CircleBorder(side: BorderSide.none), - key: const Key('floating_action_btn'), - backgroundColor: Colors.green, - onPressed: () { - navigationService.pushScreen('/addpostscreen'); - }, - child: Icon( - Icons.add, - size: SizeConfig.screenHeight! * 0.045, - color: Colors.white, - ), - ), - appBar: AppBar( - backgroundColor: Colors.green, - elevation: 0.0, - centerTitle: true, - title: Text( - model.currentOrgName, - key: widget.homeModel?.keySHOrgName, - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - color: Colors.white, - ), - ), - leading: IconButton( - key: widget.homeModel?.keySHMenuIcon, - icon: const Icon( - Icons.menu, - color: Colors.white, - ), - onPressed: () { - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(); - }, - ), - ), - // if the model is fetching the data then renders Circular Progress Indicator else renders the result. - body: model.isFetchingPosts || model.isBusy - ? const Center(child: CircularProgressIndicator()) - : RefreshIndicator( - onRefresh: () async => model.fetchNewPosts(), - child: NotificationListener( - onNotification: (notification) { - final currentScroll = _scrollController.position.pixels; - - if (notification is ScrollEndNotification && - notification.metrics.atEdge) { - if (firstDownScroll > 0) { - model.nextPage(); - firstDownScroll = 0; - } else { - firstDownScroll++; - } - } - if (notification is ScrollEndNotification && - notification.metrics.atEdge && - currentScroll <= 0) { - if (firstUpScroll > 0) { - model.previousPage(); - firstUpScroll = 0; - } else { - firstUpScroll++; - } - } - // Reset counters if scrolling occurs anywhere other than at the edge - if (!notification.metrics.atEdge) { - firstDownScroll = 0; - firstUpScroll = 0; - } - - return false; - }, - child: ListView( - controller: _scrollController, - key: const Key('listView'), - shrinkWrap: true, - children: [ - // Always show PinnedPost if available - if (model.pinnedPosts.isNotEmpty) - PinnedPost( - key: const Key('pinnedPosts'), - pinnedPost: model.pinnedPosts, - model: widget.homeModel!, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - model.posts.isNotEmpty - ? PostListWidget( - key: widget.homeModel?.keySHPost, - posts: model.posts, - function: model.navigateToIndividualPage, - deletePost: model.removePost, - ) - : // if there is no post in an organisation then show text button to create a post. - Column( - children: [ - Padding( - padding: EdgeInsets.only( - top: SizeConfig.screenHeight! * 0.21, - ), - child: Text( - AppLocalizations.of(context)! - .strictTranslate( - 'There are no posts in this organization', - ), - style: TextStyle( - fontSize: - SizeConfig.screenHeight! * 0.026, - ), - textAlign: TextAlign.center, - ), - ), - TextButton( - onPressed: () { - navigationService - .pushScreen('/addpostscreen'); - }, - child: Text( - AppLocalizations.of(context)! - .strictTranslate( - 'Create your first post', - ), - ), - ), - ], - ), - ], - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/feed/pinned_post_page.dart b/lib/views/after_auth_screens/feed/pinned_post_page.dart deleted file mode 100644 index 028ae73f2..000000000 --- a/lib/views/after_auth_screens/feed/pinned_post_page.dart +++ /dev/null @@ -1,34 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; - -/// PinnedPostPage returns a widget that shows the list of all the pinned post. -class PinnedPostPage extends StatelessWidget { - const PinnedPostPage({super.key, required this.pinnedPosts}); - final List pinnedPosts; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - iconTheme: Theme.of(context).iconTheme, - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Pinned Posts'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - ), - body: ListView( - children: [PostListWidget(posts: pinnedPosts)], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/feed/pinned_post_screen.dart b/lib/views/after_auth_screens/feed/pinned_post_screen.dart deleted file mode 100644 index f2112770e..000000000 --- a/lib/views/after_auth_screens/feed/pinned_post_screen.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:talawa/apptheme.dart'; - -import 'package:talawa/services/size_config.dart'; - -/// Pinned post screen. -/// -class PinnedPostScreen extends StatefulWidget { - const PinnedPostScreen({super.key, required this.post, this.cacheManager}); - - /// Contains the data of the post. - /// - final Map post; - - /// Custom avatar data. - final BaseCacheManager? cacheManager; - - @override - State createState() => _PinnedPostScreenState(); -} - -class _PinnedPostScreenState extends State { - @override - Widget build(BuildContext context) { - return SafeArea( - child: Container( - decoration: const BoxDecoration(color: Colors.black38), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(18.0), - child: Text( - widget.post['title']!, - maxLines: 2, - style: AppTheme.title.copyWith( - color: Colors.white, - decorationThickness: 0, - ), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - '${widget.post['time']!}hr', - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.w200, - fontSize: 14, - decorationThickness: 0, - ), - ), - ), - ], - ), - CachedNetworkImage( - cacheManager: widget.cacheManager, - imageUrl: widget.post['imageUrl']!, - errorWidget: (context, url, error) { - return const SizedBox( - child: Center( - child: CircularProgressIndicator(), - ), - ); - }, - height: SizeConfig.screenHeight! * .75, - fit: BoxFit.cover, - ), - ], - ), - ), - ); - } -} diff --git a/lib/views/after_auth_screens/join_org_after_auth/access_request_screen.dart b/lib/views/after_auth_screens/join_org_after_auth/access_request_screen.dart deleted file mode 100644 index f6c1a8150..000000000 --- a/lib/views/after_auth_screens/join_org_after_auth/access_request_screen.dart +++ /dev/null @@ -1,103 +0,0 @@ -// ignore_for_file: talawa_good_doc_comments, talawa_api_doc -import 'package:flutter/material.dart'; -import 'package:talawa/apptheme.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/view_model/access_request_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -///requestAccess. -class SendAccessRequest extends StatelessWidget { - const SendAccessRequest({ - super.key, - required this.org, - // required this.model - }); - - /// OrgInfo object. - final OrgInfo org; - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(org), - builder: (context, model, child) { - return SafeArea( - child: Scaffold( - appBar: AppBar( - backgroundColor: Colors.transparent, - ), - resizeToAvoidBottomInset: false, - body: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset('assets/images/Group 8948.png'), - Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "You need access", - style: AppTheme.title.copyWith(color: AppTheme.white), - ), - const SizedBox( - height: 5, - ), - const Text( - "Request access, or switch to an account with access", - ), - const SizedBox( - height: 20, - ), - Container( - child: TextField( - style: const TextStyle(color: AppTheme.blackPrimary), - minLines: 15, - maxLines: 20, - decoration: InputDecoration( - constraints: const BoxConstraints( - maxWidth: 400, - minWidth: 100, - ), - enabledBorder: UnderlineInputBorder( - borderRadius: BorderRadius.circular(20.0), - borderSide: const BorderSide( - width: 3, - color: Colors.white, - ), - ), - hintText: "Message (optional)", - hintStyle: const TextStyle( - color: AppTheme.blackSecondary, - ), - filled: true, - fillColor: AppTheme.white, - ), - ), - ), - ], - ), - ), - Center( - child: TextButton( - onPressed: () { - model.sendMembershipRequest(); - }, - style: - TextButton.styleFrom(backgroundColor: AppTheme.green), - child: const Text( - "Request Access", - style: TextStyle( - color: AppTheme.white, - ), - ), - ), - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart b/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart deleted file mode 100644 index fa519edbb..000000000 --- a/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart +++ /dev/null @@ -1,185 +0,0 @@ -// ignore_for_file: talawa_api_doc, talawa_good_doc_comments -import 'package:flutter/material.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/organization_list.dart'; -import 'package:talawa/widgets/organization_search_list.dart'; -import 'package:vibration/vibration.dart'; - -/// JoinOrganisationAfterAuth returns a widget for page to join the organization just after user authentication. -class JoinOrganisationAfterAuth extends StatelessWidget { - const JoinOrganisationAfterAuth({super.key, required this.orgId}); - - /// org identifier. - /// - final String orgId; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(orgId), - builder: (context, model, child) { - return Scaffold( - key: const Key('JoinOrgScreen'), - // header for the widget - appBar: AppBar( - centerTitle: true, - // title of the header. - title: Text( - AppLocalizations.of(context)! - .strictTranslate('Join Organisation'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - // action button for the option to join the organization using QR code. - actions: [ - IconButton( - icon: const Icon( - Icons.qr_code_scanner, - size: 30, - semanticLabel: 'Join Organisation with QR', - ), - onPressed: () => scanQR(context, model), - ), - ], - ), - body: Column( - children: [ - const Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0), - child: Divider( - color: Colors.grey, - thickness: 2.0, - ), - ), - Expanded( - // if model searching is under process then renders OrganizationSearchList widget - // else renders OrganizationList widget. - child: model.searching - ? OrganizationSearchList(model: model) - : OrganizationList(model: model), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ); - }, - ); - } - - /// scanQR returns a widget that is use in joining the organization via the QR code. - /// - /// **params**: - /// * `context`: Build context to perform context related operation - /// * `model`: Viewmodel - /// - /// **returns**: - /// None - void scanQR(BuildContext context, SelectOrganizationViewModel model) { - showModalBottomSheet( - context: context, - barrierColor: Colors.transparent, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.width, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 250, - width: 250, - child: QRView( - key: model.qrKey, - onQRViewCreated: (controller) => - _onQRViewCreated(controller, model), - overlay: QrScannerOverlayShape( - overlayColor: Theme.of(context).colorScheme.secondary, - borderRadius: 10, - borderLength: 20, - borderWidth: 10, - cutOutSize: 250, - ), - /*overlayMargin: EdgeInsets.all(50)*/ - ), - ), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - Text( - AppLocalizations.of(context)!.strictTranslate('Scan QR'), - ), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - ], - ), - ), - ); - }, - ); - } - - /// To handle to qr. - /// - /// **params**: - /// * `controller`: Controller to manage qr activity - /// * `model`: Viewmodel - /// - /// **returns**: - /// None - void _onQRViewCreated( - QRViewController controller, - SelectOrganizationViewModel model, - ) { - controller.scannedDataStream.listen((scanData) { - if (scanData.code!.isNotEmpty) { - print(scanData.code); - try { - final List data = scanData.code!.split('?'); - final String url = data[0]; - Vibration.vibrate(duration: 100); - if (url == GraphqlConfig.orgURI) { - final List queries = data[1].split('&'); - model.orgId = queries[0].split('=')[1]; - controller.stopCamera(); - controller.dispose(); - Navigator.pop(navigationService.navigatorKey.currentContext!); - model.initialise(model.orgId); - } else { - navigationService.showTalawaErrorSnackBar( - "Organisation on different server, logout and scan qr again", - MessageType.error, - ); - } - } on Exception catch (e) { - print(e); - print('invalid app qr'); - } - } - }); - } -} diff --git a/lib/views/after_auth_screens/org_info_screen.dart b/lib/views/after_auth_screens/org_info_screen.dart deleted file mode 100644 index f1a3fdfae..000000000 --- a/lib/views/after_auth_screens/org_info_screen.dart +++ /dev/null @@ -1,445 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; - -/// A screen widget to display detailed information about an organization. -class OrganisationInfoScreen extends StatelessWidget { - const OrganisationInfoScreen({super.key, required this.orgInfo}); - - /// The organization information to be displayed on the screen. - final OrgInfo orgInfo; - - @override - Widget build(BuildContext context) { - SizeConfig().init( - context, - ); - final double imageHeight = SizeConfig.screenHeight! * 0.38; - final SelectOrganizationViewModel model = SelectOrganizationViewModel(); - final Map joinedOrgsMap = {}; - for (final org in userConfig.currentUser.joinedOrganizations!) { - joinedOrgsMap[org.id!] = org; - } - - return Scaffold( - extendBodyBehindAppBar: true, - floatingActionButton: !joinedOrgsMap.containsKey(orgInfo.id) - ? FloatingActionButton.extended( - onPressed: () { - model.selectOrg(orgInfo); - }, - label: Text( - 'Join', - style: TextStyle( - color: const Color.fromARGB(255, 255, 255, 255), - fontSize: SizeConfig.screenHeight! * 0.022, - ), - ), - backgroundColor: const Color.fromARGB(255, 86, 194, 65), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20), - ), - ) - : FloatingActionButton.extended( - onPressed: () {}, - label: Text( - 'Leave', - style: TextStyle( - color: const Color.fromARGB(255, 255, 255, 255), - fontSize: SizeConfig.screenHeight! * 0.022, - ), - ), - backgroundColor: const Color.fromARGB(255, 208, 51, 51), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20), - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, - appBar: AppBar( - leading: IconButton( - icon: const Icon(Icons.arrow_back, color: Colors.white), - onPressed: () => Navigator.of(context).pop(), - ), - backgroundColor: Colors.transparent, - elevation: 0, - ), - body: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Stack( - alignment: Alignment.center, - children: [ - Stack( - children: [ - orgInfo.image != null - ? Image.network( - orgInfo.image!, - height: imageHeight, - width: double.infinity, - fit: BoxFit.cover, - ) - : ClipRRect( - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(20.0), - bottomRight: Radius.circular(20.0), - ), - child: Image.asset( - 'assets/images/Organisation_Default_Image.jpeg', - height: imageHeight, - width: double.infinity, - fit: BoxFit.cover, - ), - ), - Container( - key: const Key('image_container'), - height: imageHeight, - width: double.infinity, - decoration: BoxDecoration( - color: Colors.black.withOpacity(0.55), - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(20.0), - bottomRight: Radius.circular(20.0), - ), - ), - ), - ], - ), - Positioned( - bottom: 45, - left: 16, - child: Row( - children: [ - Text( - orgInfo.name ?? 'Organization Name', - style: const TextStyle( - fontSize: 28.0, - fontWeight: FontWeight.bold, - color: Colors.white, - ), - ), - if (orgInfo.address != null) - Padding( - padding: const EdgeInsets.only(top: 8, left: 8), - child: Center( - child: Text( - '${orgInfo.address?.city}, ${orgInfo.address?.countryCode}', - style: const TextStyle( - fontSize: 16.0, - color: Color.fromARGB(255, 179, 168, 168), - ), - ), - ), - ), - ], - ), - ), - Positioned( - bottom: 24, - left: 16, - child: Text( - 'Created by: ${orgInfo.creatorInfo?.firstName ?? 'User name'} ${orgInfo.creatorInfo?.lastName ?? ''}', - style: const TextStyle( - fontSize: 16.0, - color: Color.fromARGB(255, 255, 255, 255), - fontWeight: FontWeight.w500, - ), - ), - ), - ], - ), - Padding( - padding: const EdgeInsets.only(top: 16, left: 16, right: 20), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - 'Description', - style: - TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0), - ), - Row( - mainAxisSize: MainAxisSize.min, - children: [ - !orgInfo.userRegistrationRequired! - ? const Icon( - Icons.lock_open, - size: 18, - color: Colors.green, - ) - : Icon( - Icons.lock, - size: 18, - color: Theme.of(context).colorScheme.primary, - ), - const SizedBox(width: 8), - !orgInfo.userRegistrationRequired! - ? Text( - "Public", - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith( - color: - const Color.fromARGB(255, 98, 98, 98), - ), - ) - : Text( - "Private", - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith( - color: const Color.fromARGB( - 255, - 103, - 103, - 103, - ), - ), - ), - ], - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.only( - top: 10, - left: 16, - right: 20, - bottom: 10, - ), - child: Text( - orgInfo.description ?? 'No description provided.', - style: const TextStyle(fontSize: 16.0), - ), - ), - _buildSectionTitle( - context, - 'Admins', - orgInfo.admins, - () => _showAllMembersBottomSheet( - context, - orgInfo.admins!, - 'Admins', - ), - 2, - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 1, - endIndent: 16, - indent: 16, - ), - _buildUserList(context, orgInfo.admins, 2), - _buildSectionTitle( - context, - 'Members', - orgInfo.members, - () => _showAllMembersBottomSheet( - context, - orgInfo.members!, - 'Members', - ), - 4, - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 1, - endIndent: 16, - indent: 16, - ), - _buildUserList(context, orgInfo.members, 4), - ], - ), - ), - ); - } - - /// Builds a section title widget. - /// - /// **params**: - /// * `context`: The build context. - /// * `title`: The title of the section. - /// * `users`: The list of users - /// * `onSeeAllTap`: Callback when "See all" is tapped. - /// * `maxUsers`: The maximum number of users to display. - /// - /// **returns**: - /// * `Widget`: Returns a section title widget. - Widget _buildSectionTitle( - BuildContext context, - String title, - List? users, - VoidCallback onSeeAllTap, - int maxUsers, - ) { - return Padding( - padding: const EdgeInsets.only(left: 16.0, right: 16, top: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - title, - style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0), - ), - if (users != null && users.length > maxUsers) - GestureDetector( - onTap: onSeeAllTap, - child: const Text( - 'See all', - style: TextStyle( - fontSize: 16.0, - color: Colors.blue, - ), - ), - ), - ], - ), - ); - } - - /// Builds a list of users widget. - /// - /// **params**: - /// * `context`: The build context. - /// * `users`: The list of users - /// * `maxDisplay`: The maximum number of users to display. - /// - /// **returns**: - /// * `Widget`: Returns a list of users widget. - Widget _buildUserList( - BuildContext context, - List? users, - int maxDisplay, - ) { - if (users == null || users.isEmpty) { - return const Padding( - padding: EdgeInsets.symmetric(horizontal: 16.0), - child: Text('No users to display'), - ); - } - - final List displayedUsers = users.take(maxDisplay).toList(); - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Column( - children: displayedUsers - .map( - (user) => Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).brightness == Brightness.dark - ? const Color.fromARGB(255, 50, 50, 50) - : const Color.fromARGB(255, 226, 226, 226), - borderRadius: BorderRadius.circular(20), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 1, - blurRadius: - Theme.of(context).brightness == Brightness.dark - ? 1 - : 6, - offset: Theme.of(context).brightness == Brightness.dark - ? Offset.zero - : const Offset(0, 3), - ), - ], - ), - height: 60, - child: Row( - children: [ - Expanded( - flex: 1, - child: CustomAvatar( - isImageNull: user.image == null, - firstAlphabet: - user.firstName!.substring(0, 1).toUpperCase(), - imageUrl: - '${'${GraphqlConfig.orgURI}'.replaceFirst('/graphql', '')}/${user.image}', - fontSize: SizeConfig.screenHeight! * 0.018, - ), - ), - Expanded( - flex: 3, - child: Text( - '${user.firstName ?? 'No Name'} ${user.lastName ?? ''}', - ), - ), - ], - ), - ), - ), - ) - .toList(), - ), - ); - } - - /// Shows a bottom sheet with all members. - /// - /// **params**: - /// * `context`: The build context. - /// * `users`: The list of users. - /// * `title`: The title of the bottom sheet. - /// - /// **returns**: - /// None - void _showAllMembersBottomSheet( - BuildContext context, - List users, - String title, - ) { - showModalBottomSheet( - context: context, - builder: (BuildContext bc) { - return SafeArea( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - AppBar( - title: Text(title), - leading: IconButton( - key: const Key('modalSheetbackBtn'), - icon: const Icon(Icons.close), - onPressed: () => Navigator.of(bc).pop(), - ), - ), - Flexible( - child: ListView.builder( - itemCount: users.length, - itemBuilder: (BuildContext context, int index) { - return ListTile( - leading: CustomAvatar( - isImageNull: users[index].image == null, - firstAlphabet: users[index] - .firstName! - .substring(0, 1) - .toUpperCase(), - imageUrl: - '${'${GraphqlConfig.orgURI}'.replaceFirst('/graphql', '')}/${users[index].image}', - fontSize: SizeConfig.screenHeight! * 0.018, - ), - title: Text( - '${users[index].firstName ?? 'No Name'} ${users[index].lastName ?? ''}', - ), - ); - }, - ), - ), - ], - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/profile/edit_profile_page.dart b/lib/views/after_auth_screens/profile/edit_profile_page.dart deleted file mode 100644 index 6fa5c662f..000000000 --- a/lib/views/after_auth_screens/profile/edit_profile_page.dart +++ /dev/null @@ -1,303 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -/// EditProfilePage returns a widget that has mutable state _EditProfilePageState. -class EditProfilePage extends StatefulWidget { - const EditProfilePage({super.key}); - - @override - _EditProfilePageState createState() => _EditProfilePageState(); -} - -/// _EditProfilePageState returns a widget for a Page to edit the user profile. -class _EditProfilePageState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return Scaffold( - key: const Key('EditProfileScreenScaffold'), - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Profile'), - key: const Key('ProfileText'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: SizeConfig.screenHeight! * 0.03, - ), - ), - ), - body: SingleChildScrollView( - child: Column( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.068, - ), - Center( - child: Stack( - children: [ - // if the profile pic is not empty then render Circle Avatar with image as background image - // else render Circle Avatar with grey background color. - CircleAvatar( - key: const Key('profilepic'), - radius: SizeConfig.screenHeight! * 0.082, - backgroundImage: model.imageFile != null - ? Image.file( - model.imageFile!, - fit: BoxFit.fitWidth, - ).image - : model.user.image != null - ? NetworkImage(model.user.image!) - : null, - backgroundColor: - model.imageFile == null && model.user.image == null - ? Colors.grey.withOpacity(0.2) - : null, - child: model.imageFile == null - ? model.user.image == null - ? Text( - '${model.user.firstName![0].toUpperCase()}${model.user.lastName![0].toUpperCase()}', - style: Theme.of(context) - .textTheme - .headlineMedium, - ) - : null - : null, - ), - Positioned( - bottom: 0, - right: 0, - child: InkWell( - key: const Key('AddRemoveImageButton'), - onTap: () { - // modal sheet for image selection from camera or gallery. - model.imageFile == null - ? showModalBottomSheet( - context: context, - builder: (BuildContext context) { - return Container( - height: - SizeConfig.screenHeight! * 0.135, - padding: const EdgeInsets.all(17), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - _createModalSheetButton( - context, - Icons.camera_alt, - 'Camera', - () { - Navigator.of(context).pop(); - model.selectImage( - camera: true, - ); - }, - ), - _createModalSheetButton( - context, - Icons.photo_library, - 'Gallery', - () { - Navigator.of(context).pop(); - model.selectImage(); - }, - ), - ], - ), - ); - }, - ) - : model.removeImage(); - }, - child: CircleAvatar( - radius: SizeConfig.screenHeight! * 0.034, - backgroundColor: model.imageFile == null - ? Theme.of(context).colorScheme.secondary - : Theme.of(context).colorScheme.secondary, - child: model.imageFile == null - ? const Icon( - Icons.photo_camera, - color: Colors.white, - ) - : const Icon( - Icons.close, - color: Colors.white, - ), - ), - ), - ), - ], - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.068, - ), - const Divider(), - Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - Row( - children: [ - // Flexible is a widget that controls how a child of a Row, Column, or Flex flexes. - Flexible( - // Text field for first name with value text of user's first name. - child: TextFormField( - key: const Key('FirstNameTextField'), - controller: model.firstNameTextController, - focusNode: model.firstNameFocus, - keyboardType: TextInputType.name, - decoration: InputDecoration( - labelText: AppLocalizations.of(context)! - .strictTranslate('First Name'), - labelStyle: - Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: const Icon(Icons.person), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus( - model.firstNameFocus, - ); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - ), - ], - ), - Row( - children: [ - Flexible( - // Text field for first name with value text of user's last name. - child: TextFormField( - controller: model.lastNameTextController, - focusNode: model.lastNameFocus, - keyboardType: TextInputType.name, - decoration: InputDecoration( - labelText: AppLocalizations.of(context)! - .strictTranslate('Last Name'), - labelStyle: - Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: const Icon(Icons.person), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus( - model.lastNameFocus, - ); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - ), - ], - ), - ], - ), - ), - const Divider(), - Padding( - padding: const EdgeInsets.all(20), - child: Row( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.027, - width: SizeConfig.screenWidth! * 0.055, - child: const Icon(Icons.email), - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate('Email'), - style: - Theme.of(context).textTheme.bodySmall!.copyWith( - color: Theme.of(context) - .colorScheme - .onBackground, - ), - ), - // Text for first name with value text of user's first name. - Text( - model.user.email!, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontSize: 18), - ), - ], - ), - ], - ), - ), - const Divider(), - TextButton( - key: const Key('updatebtn'), - onPressed: () { - model.updateUserProfile( - firstName: model.firstNameTextController.text, - newImage: model.imageFile, - lastName: model.lastNameTextController.text, - ); - FocusScope.of(context).unfocus(); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Update'), - ), - ), - ], - ), - ), - ); - }, - ); - } - - /// Button for the different image selection methods. - /// - /// **params**: - /// * `context`:context for the sheet - /// * `icon`: icon for the method - /// * `label`: label for the method - /// * `onTap`: onTap funtionality for the method - /// - /// **returns**: - /// * `Widget`: Icon Button for selecting different image selection method. - Widget _createModalSheetButton( - BuildContext context, - IconData icon, - String label, - VoidCallback onTap, - ) { - return GestureDetector( - key: Key('select$label'), - onTap: onTap, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - icon, - size: SizeConfig.screenHeight! * 0.05, - ), - Text(AppLocalizations.of(context)!.strictTranslate(label)), - ], - ), - ); - } -} diff --git a/lib/views/after_auth_screens/profile/profile_page.dart b/lib/views/after_auth_screens/profile/profile_page.dart deleted file mode 100644 index fa43731b2..000000000 --- a/lib/views/after_auth_screens/profile/profile_page.dart +++ /dev/null @@ -1,472 +0,0 @@ -import 'package:contained_tab_bar_view/contained_tab_bar_view.dart'; -import 'package:flutter/material.dart'; -// import 'package:flutter_braintree/flutter_braintree.dart'; -// import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/plugins/talawa_plugin_provider.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/profile/user_event.dart'; -import 'package:talawa/views/after_auth_screens/profile/user_feed.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; - -/// ProfilePage returns a widget that renders a page of user's profile. -class ProfilePage extends StatelessWidget { - const ProfilePage({ - required Key key, - this.homeModel, - }) : super(key: key); - - /// represents MainScreenViewModel. - final MainScreenViewModel? homeModel; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return Scaffold( - key: model.scaffoldKey, - appBar: AppBar( - backgroundColor: Colors.green, - elevation: 0.0, - centerTitle: true, - leading: IconButton( - color: Colors.white, - icon: const Icon(Icons.menu), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - key: const Key("ProfilePageAppBar"), - title: Text( - AppLocalizations.of(context)!.strictTranslate('Profile'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - color: Colors.white, - ), - ), - actions: [ - IconButton( - key: const Key('settingIcon'), - onPressed: () { - navigationService.pushScreen(Routes.appSettings); - }, - icon: const Icon( - Icons.settings, - color: Colors.white, - ), - ), - ], - ), - // if data fetching is under process then renders Circular Progress Icon - // else renders the widget. - body: model.isBusy - ? const CircularProgressIndicator() - : RefreshIndicator( - onRefresh: () async => model.initialize(), - child: SingleChildScrollView( - child: Column( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - Row( - children: [ - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: CustomAvatar( - key: const Key('profilepic'), - isImageNull: model.currentUser.image == null, - firstAlphabet: model.currentUser.firstName! - .substring(0, 1), - imageUrl: model.currentUser.image, - fontSize: Theme.of(context) - .textTheme - .titleLarge! - .fontSize, - maxRadius: SizeConfig.screenHeight! * 0.02, - ), - ), - ), - Expanded( - flex: 3, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Text( - '${model.currentUser.firstName!} ${model.currentUser.lastName!}', - style: TextStyle( - fontSize: SizeConfig.screenHeight! * 0.025, - ), - ), - ), - ), - Expanded( - flex: 1, - child: IconButton( - key: const Key('inviteicon'), - icon: Icon( - Icons.share, - color: - Theme.of(context).colorScheme.secondary, - ), - onPressed: () => model.invite(context), - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.02, - ), - TalawaPluginProvider( - pluginName: "Donation", - visible: true, - child: Column( - children: [ - RaisedRoundedButton( - key: homeModel!.keySPDonateUs, - buttonLabel: AppLocalizations.of(context)! - .strictTranslate( - 'Donate to the Community', - ), - onTap: () => donate(context, model), - textColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - backgroundColor: - Theme.of(context).colorScheme.tertiary, - ), - ], - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.68, - width: double.infinity, - child: ContainedTabBarView( - tabs: [ - Tab( - text: AppLocalizations.of(context)! - .strictTranslate( - 'Posts', - ), - key: const Key('UserpostTab'), - ), - Tab( - text: AppLocalizations.of(context)! - .strictTranslate( - 'Events', - ), - key: const Key('UserEventsTab'), - ), - ], - views: [ - const UserFeed(key: Key("UserFeed")), - const UserEvents(key: Key("UserEvents")), - ], - ), - ), - ], - ), - ), - ), - ); - }, - ); - } - - /// donate widget, this widget is used in donate custom tile. - /// - /// **params**: - /// * `context`: Build context to perform context related operation - /// * `model`: Viewmodel - /// - /// **returns**: - /// None - void donate(BuildContext context, ProfilePageViewModel model) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return StatefulBuilder( - builder: (context, setState) { - model.attachListener(setState); - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: SizedBox( - height: model.bottomSheetHeight, - child: Scaffold( - // background color set to Primary - backgroundColor: - Theme.of(context).colorScheme.primaryContainer, - // header - appBar: AppBar( - centerTitle: true, - automaticallyImplyLeading: false, - backgroundColor: Colors.transparent, - elevation: 0.0, - toolbarHeight: SizeConfig.screenHeight! * 0.15, - title: Padding( - padding: const EdgeInsets.only(top: 8.0), - // display title - child: Text( - '${AppLocalizations.of(context)!.strictTranslate('Donating to')}\n${model.currentOrg.name}', - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(fontSize: 24), - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - ), - ), - actions: [ - Padding( - padding: EdgeInsets.only( - right: 8.0, - top: SizeConfig.screenHeight! * 0.01, - ), - child: IconButton( - icon: Icon( - Icons.cancel, - color: Theme.of(context).colorScheme.primary, - ), - onPressed: model.popBottomSheet, - ), - ), - ], - ), - body: SingleChildScrollView( - // SingleChildScrollView is a box in which a single widget can be scrolled. - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Please select any amount'), - style: Theme.of(context).textTheme.headlineSmall, - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // looping through and renders button for donation amounts. - children: List.generate( - 3, - (index) => model.dominationButton( - model.denomination[index], - context, - setState, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Text( - AppLocalizations.of(context)!.strictTranslate( - 'Or', - ), - style: Theme.of(context).textTheme.headlineSmall, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Input custom amount'), - style: Theme.of(context).textTheme.headlineSmall, - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - // containers for custom amount - Container( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.05, - ), - child: TextField( - key: const Key('custom_amt'), - controller: model.donationAmount, - focusNode: model.donationField, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.number, - autofillHints: const [AutofillHints.email], - enableSuggestions: true, - style: Theme.of(context).textTheme.titleLarge, - onChanged: (text) { - setState(() {}); - }, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .translate("Enter donation amount"), - labelText: AppLocalizations.of(context)! - .translate("Enter custom donation amount"), - labelStyle: - Theme.of(context).textTheme.titleMedium, - prefixIcon: GestureDetector( - key: const Key('currency_btn'), - onTap: () { - model.changeCurrency(context, setState); - }, - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 15.0, - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - model.donationCurrency, - textAlign: TextAlign.center, - style: Theme.of(context) - .textTheme - .headlineSmall, - ), - const Icon( - Icons.arrow_drop_down_circle_outlined, - ), - ], - ), - ), - ), - enabledBorder: OutlineInputBorder( - borderRadius: const BorderRadius.all( - Radius.circular(12.0), - ), - borderSide: BorderSide( - color: - Theme.of(context).colorScheme.secondary, - width: 2, - ), - ), - focusedBorder: OutlineInputBorder( - borderRadius: const BorderRadius.all( - Radius.circular(10.0), - ), - borderSide: BorderSide( - color: - Theme.of(context).colorScheme.secondary, - ), - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - ElevatedButton( - key: const Key('DONATE'), - onPressed: () async { - ///required fields for donation transaction - // late final String userId; - // late final String orgId; - // late final String nameOfOrg; - // late final String nameOfUser; - // late final String payPalId; - // late final double amount; - // orgId = model.currentOrg.id!; - // userId = model.currentUser.id!; - // nameOfUser = - // "${model.currentUser.firstName!} ${model.currentUser.lastName!}"; - // nameOfOrg = model.currentOrg.name!; - - // amount = double.parse(model.donationAmount.text); - // final request = BraintreeDropInRequest( - // tokenizationKey: - // '', - // collectDeviceData: true, - // paypalRequest: BraintreePayPalRequest( - // amount: model.donationAmount.text, - // displayName: "Talawa", - // ), - // cardEnabled: true, - // ); - - // final BraintreeDropInResult? result = - // await BraintreeDropIn.start(request); - // if (result != null) { - // ///saving the donation in server - // late final GraphQLClient client = - // graphqlConfig.clientToQuery(); - - // ///getting transaction id from `brainTree` API - // payPalId = result.paymentMethodNonce.nonce; - - // final QueryResult donationResult = - // await client.mutate( - // MutationOptions( - // document: gql( - // queries.createDonation( - // userId, - // orgId, - // nameOfOrg, - // nameOfUser, - // payPalId, - // amount, - // ), - // ), - // ), - // ); - // if (donationResult.hasException) { - // model.showSnackBar( - // "Error occurred while making a donation", - // ); - // } - - // /// hiding the donation UI once it is successful - // model.popBottomSheet(); - // model.showSnackBar( - // 'Donation Successful,Thanks for the support !', - // ); - // } - }, - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - // if the donation amount entered or selected is empty then renders grey color - // else render primary color - model.donationAmount.text.isEmpty - ? Colors.grey - : Theme.of(context).colorScheme.primary, - ), - ), - child: Text( - AppLocalizations.of(context)!.strictTranslate( - 'DONATE', - ), - style: Theme.of(context).textTheme.labelLarge, - ), - ), - ], - ), - ), - ), - ), - ); - }, - ); - }, - ).then((value) => model.updateSheetHeight()); - } -} diff --git a/lib/views/after_auth_screens/profile/user_event.dart b/lib/views/after_auth_screens/profile/user_event.dart deleted file mode 100644 index e9fea98b0..000000000 --- a/lib/views/after_auth_screens/profile/user_event.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_card.dart'; - -///UserEvents to show events created by user in current organisation . -class UserEvents extends StatefulWidget { - const UserEvents({ - required super.key, - }); - - @override - State createState() => _UserEventsState(); -} - -class _UserEventsState extends State - with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; - - @override - Widget build(BuildContext context) { - super.build(context); - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return Scaffold( - body: model.isBusy - ? const Center(child: CircularProgressIndicator()) - : model.userEvents.isEmpty - ? Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate( - 'You have no event in this organization', - ), - style: TextStyle( - fontSize: SizeConfig.screenHeight! * 0.026, - ), - ), - TextButton( - onPressed: () { - navigationService.pushScreen( - "/createEventPage", - ); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate( - 'Create your first event', - ), - ), - ), - ], - ), - ) - : SingleChildScrollView( - key: const Key('UserEventsList'), - child: ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.userEvents.length, - itemBuilder: (BuildContext context, int index) { - return GestureDetector( - key: Key('event$index'), - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": model.userEvents[index], - "exploreEventViewModel": model, - }, - ); - }, - child: EventCard( - event: model.userEvents[index], - isSearchItem: false, - ), - ); - }, - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/after_auth_screens/profile/user_feed.dart b/lib/views/after_auth_screens/profile/user_feed.dart deleted file mode 100644 index f8130d69a..000000000 --- a/lib/views/after_auth_screens/profile/user_feed.dart +++ /dev/null @@ -1,76 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; - -/// User Feed to shows posts by user in current organisation. -class UserFeed extends StatefulWidget { - const UserFeed({ - required Key key, - this.forTest = false, - }) : super(key: key); - - /// for testing. - final bool forTest; - - @override - State createState() => _UserFeedState(); -} - -class _UserFeedState extends State - with AutomaticKeepAliveClientMixin { - @override - bool get wantKeepAlive => true; - - @override - Widget build(BuildContext context) { - super.build(context); - return BaseView( - onModelReady: (model) => model.initialise(isTest: widget.forTest), - builder: (context, model, child) { - model.userPosts.sort((a, b) => b.createdAt!.compareTo(a.createdAt!)); - return Scaffold( - body: model.isFetchingPosts - ? const Center(child: CircularProgressIndicator()) - : (model.userPosts.isEmpty - ? Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppLocalizations.of(context)!.strictTranslate( - 'You have no post in this organization', - ), - style: TextStyle( - fontSize: SizeConfig.screenHeight! * 0.026, - ), - ), - TextButton( - onPressed: () { - navigationService.pushScreen('/addpostscreen'); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate( - 'Create your first post', - ), - ), - ), - ], - ), - ) - : SingleChildScrollView( - child: PostListWidget( - key: const Key('UserPostWidget'), - posts: model.userPosts, - function: model.navigateToIndividualPage, - deletePost: model.removePost, - ), - )), - ); - }, - ); - } -} diff --git a/lib/views/base_view.dart b/lib/views/base_view.dart deleted file mode 100644 index b0d2578aa..000000000 --- a/lib/views/base_view.dart +++ /dev/null @@ -1,40 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/locator.dart'; - -class BaseView extends StatefulWidget { - const BaseView({ - required this.builder, - this.onModelReady, - }); - final Function(T)? onModelReady; - final Widget Function(BuildContext, T, Widget?) builder; - - @override - _BaseViewState createState() => _BaseViewState(); -} - -class _BaseViewState extends State> { - T model = locator(); - - @override - void initState() { - widget.onModelReady?.call(model); - super.initState(); - } - - @override - Widget build( - BuildContext context, - ) { - return ChangeNotifierProvider( - create: (context) => model, - child: Consumer( - builder: widget.builder, - ), - ); - } -} diff --git a/lib/views/demo_screens/explore_events_demo.dart b/lib/views/demo_screens/explore_events_demo.dart deleted file mode 100644 index 24204d896..000000000 --- a/lib/views/demo_screens/explore_events_demo.dart +++ /dev/null @@ -1,266 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_event_dialogue.dart'; -import 'package:talawa/widgets/event_card.dart'; - -/// Shows the list of events with options to categorize them. -class DemoExploreEvents extends StatelessWidget { - const DemoExploreEvents({ - required Key key, - this.homeModel, - }) : super(key: key); - - /// [homeModal] is a type of [MainScreenViewModel] which provides methods to handle the data for this component. - final MainScreenViewModel? homeModel; - - @override - Widget build(BuildContext context) { - final model = locator(); - return Scaffold( - appBar: AppBar( - // AppBar returns widget for the header. - backgroundColor: Theme.of(context).primaryColor, - key: const Key("ExploreEventsAppBar"), - elevation: 0.0, - automaticallyImplyLeading: false, - centerTitle: true, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Explore Events'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - // returns a button of menu icon to redirect to home. - color: Theme.of(context).iconTheme.color, - icon: const Icon(Icons.menu), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - actions: [ - Padding( - padding: EdgeInsets.only( - right: SizeConfig.screenWidth! * 0.027, - ), - // if the events is not empty then renders button for searching the events else renders just a box. - // child: model.events.isNotEmpty - // ? IconButton( - // onPressed: () { - // showSearch( - // context: context, - // delegate: EventSearch( - // eventList: model.events, - // exploreEventsViewModel: model, - // ), - // ); - // }, - // icon: const Icon(Icons.search, size: 20), - // ) - // : const SizedBox(), - child: const SizedBox(), - ), - ], - ), - // if the model is still fetching the events list then renders the Circular Progress Indicator - // else render refresh icon along with the list of searched events for exploration. - body: Stack( - children: [ - SingleChildScrollView( - physics: const AlwaysScrollableScrollPhysics(), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.010, - ), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 3, - child: Card( - color: Theme.of(context).colorScheme.onPrimary, - elevation: 2, - child: Container( - padding: const EdgeInsets.symmetric( - horizontal: 20, - ), - //width: SizeConfig.screenWidth! * 0.45, - child: DropdownButtonHideUnderline( - child: dropDownList(model, context), - ), - ), - ), - ), - Expanded( - flex: 2, - child: GestureDetector( - onTap: () { - showDialog( - // on tap open the Explore Event Dialog. - context: context, - builder: (_) { - return const ExploreEventDialog( - key: Key('ExploreEvents'), - ); - }, - ); - }, - child: Card( - key: homeModel?.keySEDateFilter, - color: Theme.of(context).colorScheme.onPrimary, - child: Container( - padding: const EdgeInsets.symmetric( - vertical: 12, - ), - // width: SizeConfig.screenWidth! * 0.30, - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - const Icon( - Icons.calendar_today, - color: Color(0xff524F4F), - ), - const SizedBox( - width: 8, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate( - "Add Date", - ), - ), - ], - ), - ), - ), - ), - ), - Expanded( - flex: 1, - child: Card( - color: Theme.of(context).colorScheme.onPrimary, - child: IconButton( - onPressed: () { - navigationService.pushScreen( - Routes.calendar, - arguments: model.events, - ); - }, - icon: const Icon( - Icons.calendar_month, - ), - ), - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.027, - ), - // if the events model is empty then renders a box with text as "Empty List" - // else renders lists of the all event tile. - model.events.isEmpty - ? SizedBox( - height: SizeConfig.screenHeight! * 0.5, - child: Center( - child: Text(model.emptyListMessage), - ), - ) - : ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.events.length, - itemBuilder: (BuildContext context, int index) { - return GestureDetector( - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": model.events[index], - "exploreEventViewModel": model, - }, - ); - }, - child: EventCard( - event: model.events[index], - isSearchItem: false, - ), - ); - }, - ), - ], - ), - ), - ), - ], - ), - - floatingActionButton: FloatingActionButton.extended( - key: homeModel?.keySEAdd, - heroTag: "AddEventFab", - backgroundColor: Theme.of(context).colorScheme.background, - onPressed: () { - navigationService.pushScreen( - "/createEventPage", - ); - }, - icon: Icon( - Icons.add, - color: Theme.of(context).colorScheme.secondary, - ), - label: Text( - AppLocalizations.of(context)!.strictTranslate("Event"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(color: Theme.of(context).colorScheme.secondary), - ), - ), - ); - } - - /// Shows a list of dropdown taken from `model` and `context`. - /// - /// **params**: - /// * `model`: contains the events data - /// * `context`: the overall context of UI - /// - /// **returns**: - /// * `Widget`: the dropdown - Widget dropDownList(ExploreEventsViewModel model, BuildContext context) { - return DropdownButton( - key: homeModel?.keySECategoryMenu, - value: model.chosenValue, - isExpanded: true, - items: [ - 'All Events', - 'Created Events', - 'Registered Events', - 'Public Events', - 'Private Events', - ].map>((String value) { - return DropdownMenuItem( - value: value, - child: Text( - AppLocalizations.of(context)!.strictTranslate(value), - style: Theme.of(context) - .textTheme - .titleLarge! - .copyWith(color: Theme.of(context).colorScheme.secondary), - ), - ); - }).toList(), - onChanged: (value) { - model.choseValueFromDropdown(value!); - }, - ); - } -} diff --git a/lib/views/demo_screens/organization_feed_demo.dart b/lib/views/demo_screens/organization_feed_demo.dart deleted file mode 100644 index 65a5f0463..000000000 --- a/lib/views/demo_screens/organization_feed_demo.dart +++ /dev/null @@ -1,142 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/widgets/pinned_post.dart'; - -/// OrganizationFeed returns a widget that shows the feed of the organization. -class DemoOrganizationFeed extends StatelessWidget { - const DemoOrganizationFeed({ - required Key key, - this.homeModel, - this.forTest = false, - }) : super(key: key); - - /// MainScreenViewModel. - final MainScreenViewModel? homeModel; - - /// To implement the test. - final bool forTest; - - /// List of dummy pinned posts. - static const List> pinnedPosts = [ - { - 'text': 'Church Meeting', - '_id': 'hdkahfu567', - 'imageUrl': - 'https://i2-prod.manchestereveningnews.co.uk/incoming/article25630061.ece/ALTERNATES/s615/2_Church-PA.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'Russia-Ukraine war leads to Hike in Gas prices in Europe.', - '_id': 'hfkajhk669', - 'imageUrl': - 'https://gdb.voanews.com/3B960F7F-786C-452C-8ABD-9D5AEEAED9D9.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'Flood in near village.', - '_id': 'adadada555', - 'imageUrl': - 'https://www.deccanherald.com/sites/dh/files/styles/article_detail/public/articleimages/2022/08/03/file7m4trf3i92e1krs53cn6-1132513-1659475940.jpg?itok=oVs3TTP8', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'The craze behind auto-tech stocks.', - '_id': 'nvikaebkf', - 'imageUrl': - 'https://akm-img-a-in.tosshub.com/businesstoday/images/assets/202303/stock-market-02136-4-sixteen_nine.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'High seas treaty', - '_id': 'nfqbkbd', - 'imageUrl': - 'https://ichef.bbci.co.uk/news/976/cpsprodpb/A194/production/_128846314_humpbackwhale.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'WWE Wrestking and Gambling', - '_id': 'dadadada', - 'imageUrl': - 'https://staticc.sportskeeda.com/editor/2023/03/a9b3a-16783664764772-1920.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'Dead of Silicon Valley Bank.', - '_id': 'hfkaaddadajhk669', - 'imageUrl': - 'https://thechainsaw.com/wp-content/uploads/2023/03/2023-50.jpg?w=1200', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'What if women were paid for chores', - '_id': 'kofapjfn', - 'imageUrl': - 'https://www.shethepeople.tv/wp-content/uploads/2019/06/household.png', - 'createdAt': '2023-12-14T08:30:00Z', - }, - { - 'text': 'Debate over stocks bybacks.', - '_id': 'agdjvfhsjaf', - 'imageUrl': - 'https://m.wsj.net/video/20200105/wsjglossarystockbuybackssplash/wsjglossarystockbuybackssplash_640x360.jpg', - 'createdAt': '2023-12-14T08:30:00Z', - }, - ]; - - /// function returns a widget that shows the feed of the organization. - /// - /// **params**: - /// * `context`: build context of the widget. - /// - /// **returns**: - /// * `Widget`: returns a widget that shows the feed of the organization. - Widget demoOrganisationFeedPage(BuildContext context) { - return Scaffold( - appBar: AppBar( - // AppBar returns a widget for the header of the page. - backgroundColor: Colors.green, - // Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - title: Text( - AppLocalizations.of(context)!.strictTranslate("Organisation Name"), - key: homeModel?.keySHOrgName, - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontSize: 20, - color: Colors.white, - ), - ), - leading: IconButton( - key: homeModel?.keySHMenuIcon, - icon: Icon( - Icons.menu, - color: Theme.of(context).iconTheme.color, - ), - onPressed: () { - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(); - }, - ), - ), - // if the model is fetching the data then renders Circular Progress Indicator else renders the result. - body: ListView( - shrinkWrap: true, - children: [ - // If the organization has pinned posts then renders PinnedPostCarousel widget else Container. - PinnedPost( - pinnedPost: pinnedPosts.map((map) => Post.fromJson(map)).toList(), - model: homeModel!, - ), - // If the organization has posts then renders PostListWidget widget else Container. - Container(), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - return demoOrganisationFeedPage(context); - } -} diff --git a/lib/views/demo_screens/profile_page_demo.dart b/lib/views/demo_screens/profile_page_demo.dart deleted file mode 100644 index 7210cfcd0..000000000 --- a/lib/views/demo_screens/profile_page_demo.dart +++ /dev/null @@ -1,251 +0,0 @@ -import 'package:contained_tab_bar_view/contained_tab_bar_view.dart'; -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/from_palisadoes.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; - -/// ProfilePage returns a widget that renders a page of user's profile. -class DemoProfilePage extends StatelessWidget { - const DemoProfilePage({ - required Key key, - this.homeModel, - }) : super(key: key); - - /// MainScreenViewModel. - /// - final MainScreenViewModel? homeModel; - - @override - Widget build(BuildContext context) { - print(userConfig.loggedIn); - return Scaffold( - key: const Key('DemoProfilePage'), - appBar: AppBar( - backgroundColor: Colors.green, - // Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - leading: IconButton( - color: Theme.of(context).iconTheme.color, - icon: const Icon(Icons.menu), - onPressed: () { - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(); - }, - ), - key: const Key("ProfilePageAppBar"), - title: Text( - AppLocalizations.of(context)!.strictTranslate('Profile'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - // fontWeight: FontWeight.w600, - fontSize: 20, - fontFamily: 'open-sans', - color: Colors.white, - ), - ), - actions: [ - IconButton( - key: const Key('settingIcon'), - onPressed: () { - print('came'); - navigationService.pushScreen(Routes.appSettings); - }, - icon: const Icon(Icons.settings), - ), - ], - ), - // if data fetching is under process then renders Circular Progress Icon - // else renders the widget. - body: guestViewWidget(context), - ); - } - - /// guestViewWidget, this widget is shown if user is not logged in. - /// - /// **params**: - /// * `context`: Build context to perform context related operation - /// - /// **returns**: - /// * `Widget`: Widget - Widget guestViewWidget(BuildContext context) { - return SingleChildScrollView( - child: Column( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - Row( - children: [ - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: CustomAvatar( - isImageNull: true, - firstAlphabet: "U", - imageUrl: null, - fontSize: Theme.of(context).textTheme.titleLarge!.fontSize, - maxRadius: 30, - ), - ), - ), - const Expanded( - flex: 3, - child: Padding( - padding: EdgeInsets.all(8.0), - child: Text( - 'User', - style: TextStyle( - color: Colors.white, - fontSize: 20, - fontFamily: 'open-sans', - ), - ), - ), - ), - // Expanded( - // flex: 1, - // child: IconButton( - // icon: Icon( - // Icons.share, - // color: - // Theme.of(context).colorScheme.secondary, - // ), - // onPressed: () => model.invite(context), - // ), - // ), - ], - ), - const SizedBox( - height: 20, - ), - RaisedRoundedButton( - key: homeModel!.keySPDonateUs, - buttonLabel: AppLocalizations.of(context)!.strictTranslate( - 'Donate to the Community', - ), - onTap: () { - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - }, - textColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - backgroundColor: Theme.of(context).colorScheme.secondaryContainer, - ), - SizedBox( - height: 600, - width: double.infinity, - child: ContainedTabBarView( - tabs: [ - Tab( - text: AppLocalizations.of(context)!.strictTranslate('Posts'), - ), - Tab( - text: AppLocalizations.of(context)!.strictTranslate('Events'), - ), - Tab( - text: AppLocalizations.of(context)!.strictTranslate('Tasks'), - ), - ], - views: [ - ColoredBox( - color: Theme.of(context).colorScheme.background, - child: GridView.count( - mainAxisSpacing: 5, - crossAxisCount: 3, - children: [ - Image.asset('assets/images/pfp2.png'), - Image.asset('assets/images/pfp2.png'), - Image.asset('assets/images/pfp2.png'), - Image.asset('assets/images/pfp2.png'), - Image.asset('assets/images/pfp2.png'), - ], - ), - ), - Container( - color: Theme.of(context).colorScheme.background, - ), - Container( - color: Theme.of(context).colorScheme.onPrimary, - ), - ], - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.67, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - - /// `Donation` acts as plugin. If visible is true the it will be always visible. - /// even if it's uninstalled by the admin (for development purposes) - //TODO: custom tile for Invitation. - // CustomListTile( - // key: homeModel!.keySPInvite, - // index: 3, - // type: TileType.option, - // option: Options( - // icon: Icon( - // Icons.share, - // color: - // Theme.of(context).colorScheme.secondary, - // size: 30, - // ), - // // title - // title: AppLocalizations.of(context)! - // .strictTranslate('Invite'), - // // subtitle - // subtitle: AppLocalizations.of(context)! - // .strictTranslate('Invite to org'), - // ), - // // on tap call the invite function - // onTapOption: () => model.invite(context), - // ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - // Custom tile for Logout option. - //TODO: logout - // CustomListTile( - // key: homeModel!.keySPLogout, - // index: 3, - // type: TileType.option, - // option: Options( - // icon: Icon( - // Icons.logout, - // color: - // Theme.of(context).colorScheme.secondary, - // size: 30, - // ), - // title: AppLocalizations.of(context)! - // .strictTranslate('Log out'), - // subtitle: AppLocalizations.of(context)! - // .strictTranslate('Log out from Talawa'), - // ), - // // on tap calls the logout function - // onTapOption: () => model.logout(context), - // ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - FromPalisadoes(key: homeModel!.keySPPalisadoes), - ], - ), - ), - ], - ), - ); - } -} diff --git a/lib/views/main_screen.dart b/lib/views/main_screen.dart deleted file mode 100644 index f3239cf49..000000000 --- a/lib/views/main_screen.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_drawer.dart'; - -/// This widget is responsible for displaying the main screen of the application. -class MainScreen extends StatefulWidget { - const MainScreen({super.key, required this.mainScreenArgs}); - - /// Holds data for the MainScreenArgs model, providing information to MainScreen. - final MainScreenArgs mainScreenArgs; - - @override - State createState() => _MainScreenState(); -} - -class _MainScreenState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) { - model.initialise( - context, - fromSignUp: widget.mainScreenArgs.fromSignUp, - mainScreenIndex: widget.mainScreenArgs.mainScreenIndex, - demoMode: widget.mainScreenArgs.toggleDemoMode, - ); - }, - builder: (context, model, child) { - // Checks for updates in plugins from the server. - // Will continously hit the server and fetch plugin information. - model.fetchAndAddPlugins(context); - return Scaffold( - key: MainScreenViewModel.scaffoldKey, - drawer: CustomDrawer( - homeModel: model, - key: const Key("Custom Drawer"), - ), - body: Stack( - children: [ - IndexedStack( - index: model.currentPageIndex, - children: model.pages, - ), - widget.mainScreenArgs.toggleDemoMode - ? Positioned( - bottom: 0, // Adjust this value as per your UI - left: 0, - right: 0, - child: InkWell( - key: const Key('banner'), - onTap: () => navigationService - .pushScreen(Routes.setUrlScreen, arguments: ''), - child: Container( - height: 30.0, // Set the desired height of the banner - color: Theme.of(context) - .canvasColor, // Change color as needed - child: Center( - child: RichText( - text: TextSpan( - children: [ - TextSpan( - text: AppLocalizations.of(context)! - .strictTranslate( - 'For complete access, please', - ), - style: - Theme.of(context).textTheme.bodySmall, - ), - TextSpan( - text: AppLocalizations.of(context)! - .strictTranslate( - 'join an organization.', - ), - style: TextStyle( - color: Theme.of(context) - .colorScheme - .secondary, - ), - ), - ], - ), - ), - ), - ), - ), - ) - : Container(), - ], - ), - bottomNavigationBar: BottomNavigationBar( - type: BottomNavigationBarType.fixed, - currentIndex: model.currentPageIndex, - onTap: model.onTabTapped, - selectedItemColor: const Color(0xff34AD64), - items: model.navBarItems, - ), - ); - }, - ); - } -} diff --git a/lib/views/pre_auth_screens/change_password.dart b/lib/views/pre_auth_screens/change_password.dart deleted file mode 100644 index 9f292b3fe..000000000 --- a/lib/views/pre_auth_screens/change_password.dart +++ /dev/null @@ -1,160 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -/// This widget lets the user change his/her password. -/// There are two input fields. The first one is for entering the new password, and the -/// second one is for re-entering the password for verification. -/// There is a raised button which finally updates the password when pressed. -class ChangePass extends StatefulWidget { - const ChangePass({required Key key}) : super(key: key); - - @override - _ChangePassState createState() => _ChangePassState(); -} - -class _ChangePassState extends State { - final formKey = GlobalKey(); - final TextEditingController newPassword = TextEditingController(); - final TextEditingController reNewPassword = TextEditingController(); - final FocusNode newPasswordFocus = FocusNode(); - final FocusNode reNewPasswordFocus = FocusNode(); - - @override - Widget build(BuildContext context) { - //custom text variable (List). - final text = [ - { - 'text': "${AppLocalizations.of(context)!.translate("Hello")}, ", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - { - 'text': '${AppLocalizations.of(context)!.translate("User Name")} ', - 'textStyle': - Theme.of(context).textTheme.titleLarge!.copyWith(fontSize: 24), - }, - { - 'text': "${AppLocalizations.of(context)!.translate("we've")} ", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(context)!.translate("got you covered")} ', - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - ]; - return Scaffold( - key: const Key('ChangePassScreenScaffold'), - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - leading: IconButton( - icon: const Icon( - Icons.arrow_back, - color: Colors.black, - ), - onPressed: () { - navigationService.pop(); - }, - ), - ), - body: SingleChildScrollView( - physics: const NeverScrollableScrollPhysics(), - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.2, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - width: SizeConfig.screenWidth, - height: SizeConfig.screenHeight, - child: Form( - key: formKey, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRichText( - key: const Key('ChangePageText'), - words: text, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - // Text field taking the input of the password - TextFormField( - key: const Key('PassInputField'), - controller: newPassword, - focusNode: newPasswordFocus, - textInputAction: TextInputAction.done, - keyboardType: TextInputType.text, - enableSuggestions: true, - autofillHints: const [AutofillHints.password], - obscureText: true, - validator: (pass) => Validator.validatePassword(pass!), - decoration: InputDecoration( - hintText: - AppLocalizations.of(context)!.translate('password'), - labelText: - '${AppLocalizations.of(context)!.translate("Enter new password")} *', - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.025, - ), - // Text field taking the input of the password again for verification - TextFormField( - key: const Key('PassRepeatInputField'), - controller: reNewPassword, - focusNode: reNewPasswordFocus, - textInputAction: TextInputAction.done, - keyboardType: TextInputType.text, - enableSuggestions: true, - autofillHints: const [AutofillHints.password], - obscureText: true, - validator: (pass) => Validator.validatePasswordConfirm( - pass!, - newPassword.text, - ), - decoration: InputDecoration( - hintText: - AppLocalizations.of(context)!.translate('password'), - labelText: - '${AppLocalizations.of(context)!.translate("Re-Enter your password")} *', - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.086, - ), - // Button for changing the password - RaisedRoundedButton( - buttonLabel: - '${AppLocalizations.of(context)!.translate("Change Password")} ', - onTap: () { - formKey.currentState!.validate(); - newPasswordFocus.unfocus(); - reNewPasswordFocus.unfocus(); - }, - textColor: const Color(0xFF008A37), - key: const Key('ChangePasswordButton'), - backgroundColor: Colors.white, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ), - ), - ), - ); - } -} diff --git a/lib/views/pre_auth_screens/login.dart b/lib/views/pre_auth_screens/login.dart deleted file mode 100644 index 6495c6cd4..000000000 --- a/lib/views/pre_auth_screens/login.dart +++ /dev/null @@ -1,198 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/pre_auth_view_models/login_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -/// This is the login widget. -/// -/// There are two input fiels. The first one takes in the email and -/// the second one takes in the password of the user. -/// There is also a "Forgot Password" text button, which directs to -/// the "recover password" screen when pressed. -/// At the bottom, there is a login button to initiate the login. -class Login extends StatefulWidget { - const Login({required Key key}) : super(key: key); - - @override - _LoginState createState() => _LoginState(); -} - -class _LoginState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return Scaffold( - resizeToAvoidBottomInset: true, - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - leading: IconButton( - icon: const Icon( - Icons.arrow_back, - ), - onPressed: () { - navigationService.pop(); - }, - ), - ), - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.2, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - width: SizeConfig.screenWidth, - height: SizeConfig.screenHeight, - child: Form( - key: model.formKey, - autovalidateMode: model.validate, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - //Custom greeting text. - CustomRichText( - key: const Key('UrlPageText'), - words: model.greeting, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - //Input form for the email of the user. - TextFormField( - key: const Key('EmailInputField'), - controller: model.email, - focusNode: model.emailFocus, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.emailAddress, - autofillHints: const [AutofillHints.email], - enableSuggestions: true, - validator: (value) { - final String? err = Validator.validateEmail(value!); - if (err != null) { - return AppLocalizations.of(context)!.translate(err); - } - - return null; - }, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .translate("Email Hint"), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your registered Email")} *', - labelStyle: Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.025, - ), - //Input form for the password of the user. - TextFormField( - key: const Key('PasswordInputField'), - controller: model.password, - focusNode: model.passwordFocus, - textInputAction: TextInputAction.done, - keyboardType: TextInputType.text, - enableSuggestions: true, - autofillHints: const [AutofillHints.password], - obscureText: model.hidePassword, - validator: (value) { - final String? err = Validator.validatePassword(value!); - if (err != null) { - return AppLocalizations.of(context)!.translate(err); - } - - return null; - }, - decoration: InputDecoration( - suffixIcon: IconButton( - onPressed: () { - setState(() { - model.hidePassword = !model.hidePassword; - }); - }, - icon: Icon( - model.hidePassword - ? Icons.visibility_off - : Icons.visibility, - ), - ), - hintText: - AppLocalizations.of(context)!.translate('password'), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your password")} *', - labelStyle: Theme.of(context).textTheme.titleMedium, - ), - ), - //Option to recover the password if the user forgets his/her password. - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - TextButton( - onPressed: () { - navigationService.showTalawaErrorSnackBar( - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - MessageType.info, - ); - }, - child: const Text( - 'Tip', - style: TextStyle( - fontSize: 14, - color: Colors.green, - fontFamily: 'open-sans', - ), - ), - ), - TextButton( - onPressed: () { - model.emailFocus.unfocus(); - model.passwordFocus.unfocus(); - navigationService.pushScreen('/recover'); - }, - child: Text( - '${AppLocalizations.of(context)!.translate("Forgot password")}?', - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - fontSize: 14, - color: const Color(0xFF4285F4), - ), - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.086, - ), - //Button to initiate the login. - RaisedRoundedButton( - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Login'), - onTap: () => model.login(), - textColor: const Color(0xFF008A37), - key: const Key('LoginButton'), - backgroundColor: Theme.of(context).colorScheme.tertiary, - ), - SizedBox(height: SizeConfig.screenHeight! * 0.0215), - ], - ), - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/pre_auth_screens/recover.dart b/lib/views/pre_auth_screens/recover.dart deleted file mode 100644 index 59c89799a..000000000 --- a/lib/views/pre_auth_screens/recover.dart +++ /dev/null @@ -1,123 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -/// This class recovers the users password. -/// The users needs to enter his/her email and press on the button at the bottom to recover his/her password. -class Recover extends StatefulWidget { - const Recover({required Key key}) : super(key: key); - - @override - _RecoverState createState() => _RecoverState(); -} - -class _RecoverState extends State { - final TextEditingController email = TextEditingController(); - final formKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - final text = [ - { - 'text': - "${AppLocalizations.of(context)!.translate("Sit back relax, we'll")} ", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - { - 'text': '${AppLocalizations.of(context)!.translate("Recover")} ', - 'textStyle': - Theme.of(context).textTheme.titleLarge!.copyWith(fontSize: 24), - }, - { - 'text': AppLocalizations.of(context)!.translate("your password"), - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - ]; - return Scaffold( - key: const Key('RecoverScreenScaffold'), - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - leading: IconButton( - icon: const Icon( - Icons.arrow_back, - ), - onPressed: () { - navigationService.pop(); - }, - ), - ), - body: SingleChildScrollView( - physics: const NeverScrollableScrollPhysics(), - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.2, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - width: SizeConfig.screenWidth, - height: SizeConfig.screenHeight, - //custom text at the top of the screen - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRichText( - key: const Key('RecoverPageText'), - words: text, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - //This form takes the email of the user as an input - Form( - key: formKey, - child: TextFormField( - key: const Key('EmailInputField'), - controller: email, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.emailAddress, - autofillHints: const [AutofillHints.email], - enableSuggestions: true, - validator: (email) => Validator.validateEmail(email!), - decoration: InputDecoration( - hintText: - AppLocalizations.of(context)!.translate("Email Hint"), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your registered Email")} *', - labelStyle: Theme.of(context).textTheme.titleMedium, - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.086, - ), - //Button to initiate the process of recovering password. - RaisedRoundedButton( - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Recover Password'), - onTap: () { - formKey.currentState!.validate(); - }, - textColor: const Color(0xFF008A37), - key: const Key('RecoverButton'), - backgroundColor: Colors.white, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/views/pre_auth_screens/select_language.dart b/lib/views/pre_auth_screens/select_language.dart deleted file mode 100644 index ef71ca2b1..000000000 --- a/lib/views/pre_auth_screens/select_language.dart +++ /dev/null @@ -1,160 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/constants/constants.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; - -/// This widget enables us to select a different language. -/// -/// The default language is English. We can choose among the options to switch the language. -/// There is a text button at the right bottom of the screen which changes the language when tapped. -/// The user finally gets redirected to the previous screen. -class SelectLanguage extends StatefulWidget { - const SelectLanguage({required Key key}) : super(key: key); - - @override - _SelectLanguageState createState() => _SelectLanguageState(); -} - -class _SelectLanguageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - key: const Key('SelectLanguageScreenScaffold'), - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - body: Padding( - padding: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.safeBlockVertical! * 4, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(top: SizeConfig.screenWidth! * 0.06), - child: SizedBox( - height: SizeConfig.screenHeight! * 0.045, - child: FittedBox( - // Heading of the screen: "Select Language" - child: Text( - AppLocalizations.of(context)! - .strictTranslate('Select Language'), - style: Theme.of(context).textTheme.headlineSmall, - key: const Key('Select Language'), - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.018, - ), - // const CupertinoSearchTextField( - // key: Key('SearchField'), - // ), - SizedBox( - height: SizeConfig.screenHeight! * 0.016, - ), - Expanded( - child: ListView.builder( - key: const Key('LanguagesList'), - itemCount: languages.length, - itemBuilder: (BuildContext context, int index) { - // Returns a list of all the languages available - return InkWell( - key: Key( - Provider.of(context).appLocal.languageCode == - languages[index].langCode - ? 'Selected' - : 'NotSelected', - ), - onTap: () async { - await Provider.of( - context, - listen: false, - ).changeLanguage( - Locale(languages[index].langCode), - ); - }, - child: Consumer( - builder: (context, appLang, _) { - return Container( - key: Key('LanguageItem$index'), - alignment: Alignment.centerLeft, - height: SizeConfig.screenHeight! * 0.063, - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.06, - ), - decoration: BoxDecoration( - color: languages[index].langCode == - appLang.appLocal.languageCode - ? const Color(0xFFC4C4C4).withOpacity(0.15) - : Colors.transparent, - ), - child: index == 0 - ? Row( - key: const Key('LanguageItem'), - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Text( - languages[index].langName, - style: Theme.of(context) - .textTheme - .titleLarge, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Default'), - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - color: const Color(0xFF4285F4), - ), - ), - ], - ) - : Text( - languages[index].langName, - style: Theme.of(context).textTheme.titleLarge, - key: const Key('LanguageItem'), - ), - ); - }, - ), - ); - }, - ), - ), - const Divider( - color: Color(0xffe5e5e5), - ), - // Text Button which changes the language when tapped. - Container( - height: SizeConfig.screenHeight! * 0.08, - alignment: Alignment.centerRight, - child: TextButton( - key: const Key('NavigateToMainScreen'), - onPressed: () async { - Provider.of(context, listen: false) - .selectLanguagePress(); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Select'), - style: Theme.of(context).textTheme.headlineSmall!.copyWith( - fontSize: 18, - color: const Color(0xFF008A37), - ), - key: const Key('SelectLangTextButton'), - ), - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/views/pre_auth_screens/select_organization.dart b/lib/views/pre_auth_screens/select_organization.dart deleted file mode 100644 index 1c89c3993..000000000 --- a/lib/views/pre_auth_screens/select_organization.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/organization_list.dart'; - -/// This widget lets the user select new organizations. -/// -/// There is a list tile which displays the organization selected by the user. -/// He/she needs to press the "continue" button to proceed. -class SelectOrganization extends StatefulWidget { - const SelectOrganization({required Key key, required this.selectedOrgId}) - : super(key: key); - - /// Contains Integer value for selected org id. - final String selectedOrgId; - - @override - _SelectOrganizationState createState() => _SelectOrganizationState(); -} - -class _SelectOrganizationState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(widget.selectedOrgId), - builder: (context, model, child) { - return Scaffold( - extendBodyBehindAppBar: false, - appBar: AppBar( - backgroundColor: Colors.transparent, - ), - body: Padding( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical!), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 18, - ), - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Choose an Organization"), - style: const TextStyle(fontSize: 40), - ), - ), - Expanded(child: OrganizationList(model: model)), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/pre_auth_screens/set_url.dart b/lib/views/pre_auth_screens/set_url.dart deleted file mode 100644 index 520811c85..000000000 --- a/lib/views/pre_auth_screens/set_url.dart +++ /dev/null @@ -1,236 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/custom_painters/language_icon.dart'; -import 'package:talawa/custom_painters/talawa_logo.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/pre_auth_view_models/set_url_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -/// This widget lets a user sign in/up with the organization url. -/// -/// The user can enter an organization through the QR code scanner, -/// or enter the organization URL and then login. -/// There is also a signup option which navigates to a screen for the user -/// to select an organization. -/// At the bottom, there is also a gesture detector for changing the language. -class SetUrl extends StatefulWidget { - const SetUrl({required Key key, required this.uri}) : super(key: key); - - /// Variable. - final String uri; - - @override - _SetUrlState createState() => _SetUrlState(); -} - -class _SetUrlState extends State { - @override - Widget build(BuildContext context) { - print("built"); - return BaseView( - onModelReady: (model) => model.initialise(inviteUrl: widget.uri), - builder: (context, model, child) { - return Scaffold( - key: const Key('SetUrlScreenScaffold'), - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - body: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.safeBlockVertical! * 4, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - width: SizeConfig.screenWidth, - height: SizeConfig.screenHeight, - alignment: Alignment.center, - child: SingleChildScrollView( - child: Form( - key: model.formKey, - autovalidateMode: model.validate, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - alignment: Alignment.centerRight, - margin: EdgeInsets.only( - top: SizeConfig.safeBlockVertical! * 2, - ), - // QR code scanner for joining the organization. - child: IconButton( - icon: const Icon( - Icons.qr_code_scanner, - size: 30, - semanticLabel: 'Join Organisation with QR', - ), - onPressed: () => model.scanQR(context), - // model.scanQR(context), - ), - ), - Padding( - padding: EdgeInsets.only( - top: SizeConfig.screenHeight! * 0.08, - ), - child: CustomPaint( - key: const Key('LogoPainter'), - size: Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - painter: AppLogo(), - ), - ), - CustomRichText( - key: const Key('UrlPageText'), - words: model.greeting, - ), - //Form input for entering the organization URL - TextFormField( - key: const Key('UrlInputField'), - controller: model.url, - focusNode: model.urlFocus, - textInputAction: TextInputAction.done, - keyboardType: TextInputType.text, - enableSuggestions: true, - validator: (value) { - final String? msg = Validator.validateURL(value!); - if (msg == null) { - return null; - } - - return AppLocalizations.of(context)!.translate(msg); - }, - onFieldSubmitted: (value) => - AppLocalizations.of(context)! - .translate(Validator.validateURL(value)), - decoration: InputDecoration( - labelText: - '${AppLocalizations.of(context)!.translate("Enter Community URL")} *', - labelStyle: Theme.of(context).textTheme.titleMedium, - suffixIcon: InkWell( - key: const Key('VerifyButton'), - onTap: () async { - model.urlFocus.unfocus(); - model.validate = AutovalidateMode.always; - model.formKey.currentState!.validate(); - - /// Checking url. If valid, than show the pop-up - await model.checkURLandShowPopUp(''); - }, - child: Container( - height: 48, - width: 48, - alignment: Alignment.center, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Verify"), - style: Theme.of(context).textTheme.bodyLarge, - textAlign: TextAlign.center, - ), - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.086, - ), - //Login button. - RaisedRoundedButton( - key: const Key('LoginButton'), - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Login'), - onTap: () async { - /// Checking url. If valid, than navigating to login route - await model.checkURLandNavigate('/login', ''); - }, - showArrow: true, - textColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - backgroundColor: Theme.of(context).colorScheme.tertiary, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - //Sign up button. - RaisedRoundedButton( - key: const Key('SignUpButton'), - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Sign Up'), - onTap: () => model.checkURLandNavigate( - '/selectOrg', - model.orgId, - ), - showArrow: true, - textColor: - Theme.of(context).colorScheme.secondaryContainer, - backgroundColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.06, - ), - //Gesture Detector which navigates to a different screen for changing the language. - GestureDetector( - key: const Key('ChangeLanguage'), - onTap: () { - navigationService - .pushScreen(Routes.languageSelectionRoute); - }, - child: Padding( - padding: EdgeInsets.only( - bottom: SizeConfig.safeBlockVertical! * 2, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - CustomPaint( - size: Size( - SizeConfig.screenWidth! * 0.125, - SizeConfig.screenWidth! * 0.125 * 0.5, - ), - painter: LanguageIcon(), - ), - const SizedBox( - width: 10, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Change language'), - style: Theme.of(context) - .textTheme - .titleLarge! - .copyWith( - color: Theme.of(context) - .colorScheme - .onBackground - .withOpacity(0.8), - ), - ), - ], - ), - ), - ), - ], - ), - ), - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/pre_auth_screens/signup_details.dart b/lib/views/pre_auth_screens/signup_details.dart deleted file mode 100644 index 06a39bb5c..000000000 --- a/lib/views/pre_auth_screens/signup_details.dart +++ /dev/null @@ -1,303 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; -import 'package:talawa/widgets/signup_progress_indicator.dart'; - -/// This widget takes the user details for signup. The form includes first name, last name, email, password, and password confirmation inputs. -class SignUpDetails extends StatefulWidget { - const SignUpDetails({required Key key, required this.selectedOrg}) - : super(key: key); - - /// Details of selected Organisation. - final OrgInfo selectedOrg; - @override - _SignUpDetailsState createState() => _SignUpDetailsState(); -} - -class _SignUpDetailsState extends State { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(widget.selectedOrg), - builder: (context, model, child) { - return Scaffold( - resizeToAvoidBottomInset: - true, // To allow the keyboard to not overlap the form - extendBodyBehindAppBar: true, - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - automaticallyImplyLeading: false, - leading: IconButton( - icon: const Icon( - Icons.arrow_back, - ), - onPressed: () { - navigationService.pop(); - }, - ), - ), - body: Padding( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical! * 6), - child: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SignupProgressIndicator( - key: const Key('SelectOrg'), - currentPageIndex: 1, - ), - Form( - key: model.formKey, - autovalidateMode: model.validate, - child: Column( - children: [ - Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenWidth! * 0.05, - SizeConfig.screenWidth! * 0.06, - 0.0, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomRichText( - key: const Key('UrlPageText'), - words: model.greeting, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), //Input field for the first name of the user. - TextFormField( - key: const Key('FirstNameInputField'), - controller: model.firstName, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.text, - autofillHints: const [ - AutofillHints.givenName, - ], - enableSuggestions: true, - validator: (value) { - final String? msg = - Validator.validateFirstName( - value!, - ); - if (msg == null) { - return null; - } - return AppLocalizations.of(context)! - .translate( - Validator.validateFirstName( - value, - ), - ); - }, - decoration: InputDecoration( - hintText: AppLocalizations.of( - context, - )! - .translate('First Name Hint'), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your first name")}*', - labelStyle: - Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.015, - ), //Input field for the last name of the user. - TextFormField( - key: const Key('LastNameInputField'), - controller: model.lastName, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.text, - autofillHints: const [ - AutofillHints.familyName, - ], - enableSuggestions: true, - validator: (value) { - final String? msg = - Validator.validateLastName( - value!, - ); - if (msg == null) { - return null; - } - return AppLocalizations.of(context)! - .translate( - Validator.validateLastName(value), - ); - }, - decoration: InputDecoration( - hintText: AppLocalizations.of( - context, - )! - .translate('Last Name Hint'), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your last name")}*', - labelStyle: - Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.015, - ), - //Input field for the email of the user. - TextFormField( - key: const Key('signUpEmailField'), - controller: model.email, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.emailAddress, - autofillHints: const [ - AutofillHints.email, - ], - enableSuggestions: true, - validator: (value) { - final String? msg = - Validator.validateEmail(value!); - if (msg == null) { - return null; - } - - return AppLocalizations.of(context)! - .translate( - Validator.validateEmail(value), - ); - }, - decoration: InputDecoration( - hintText: 'test@test.org', - labelText: - '${AppLocalizations.of(context)!.translate("Enter your registered Email")}*', - labelStyle: - Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.015, - ), //Input field for the password of the user. - TextFormField( - key: const Key('signuppassword'), - controller: model.password, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.visiblePassword, - obscureText: model.hidePassword, - autofillHints: const [ - AutofillHints.password, - ], - enableSuggestions: true, - validator: (value) { - final String? msg = - Validator.validatePassword( - value!, - ); - if (msg == null) { - return null; - } - - return AppLocalizations.of(context)! - .translate( - Validator.validatePassword(value), - ); - }, - onFieldSubmitted: (done) { - FocusScope.of(context).requestFocus( - model.confirmFocus, - ); - }, - decoration: InputDecoration( - suffixIcon: IconButton( - onPressed: () { - setState(() { - model.hidePassword = - !model.hidePassword; - }); - }, - icon: Icon( - model.hidePassword - ? Icons.visibility_off - : Icons.visibility, - ), - ), - hintText: AppLocalizations.of(context)! - .translate('password'), - labelText: - '${AppLocalizations.of(context)!.translate("Enter your password")}*', - labelStyle: - Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.015, - ), //Input field for the confirmation of the password of the user. - TextFormField( - controller: model.confirmPassword, - focusNode: model.confirmFocus, - textInputAction: TextInputAction.done, - keyboardType: TextInputType.text, - enableSuggestions: true, - autofillHints: const [ - AutofillHints.password, - ], - obscureText: model.hidePassword, - validator: (value) { - final String? msg = - Validator.validatePasswordConfirm( - model.password.text, - value!, - ); - if (msg == null) { - return null; - } - return AppLocalizations.of(context)! - .translate( - Validator.validatePasswordConfirm( - model.password.text, - value, - ), - ); - }, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .translate('password'), - labelText: - '${AppLocalizations.of(context)!.translate("Confirm your password")}*', - labelStyle: - Theme.of(context).textTheme.titleMedium, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.086, - ), - ], - ), - ), //Sign up button. - RaisedRoundedButton( - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Next'), - onTap: model.signUp, - textColor: const Color(0xFF008A37), - key: const Key('SignUpLoginDetailsButton'), - backgroundColor: Colors.white, - ), - ], - ), - ), - ], - ), - ), - ), - ); - }, - ); - } -} diff --git a/lib/views/pre_auth_screens/waiting_screen.dart b/lib/views/pre_auth_screens/waiting_screen.dart deleted file mode 100644 index 5615793c1..000000000 --- a/lib/views/pre_auth_screens/waiting_screen.dart +++ /dev/null @@ -1,128 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/pre_auth_view_models/waiting_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_list_tile.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; -import 'package:talawa/widgets/signup_progress_indicator.dart'; - -/// Displays a screen instructing the user to wait for approval. -class WaitingPage extends StatelessWidget { - const WaitingPage({super.key}); - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(context), - builder: (context, model, child) { - return Scaffold( - key: const Key('WaitingPageScaffold'), - extendBodyBehindAppBar: true, - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - automaticallyImplyLeading: false, - ), - body: Container( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical! * 6), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SignupProgressIndicator( - key: const Key('Waiting'), - currentPageIndex: 2, - ), - Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.01, - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.01, - ), - width: SizeConfig.screenWidth, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - //Greeting text - CustomRichText( - key: const Key('WaitingPageText'), - words: model.greeting, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.03, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Request Sent to'), - style: Theme.of(context).textTheme.titleLarge, - ), - ], - ), - ), - //Information of the organization to which the request is sent. - Expanded( - child: ListView.builder( - key: const Key('PendingRequestList'), - shrinkWrap: true, - padding: EdgeInsets.zero, - itemCount: model.pendingRequestOrg.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: const Key('WaitingJoin'), - index: index, - type: TileType.org, - orgInfo: model.pendingRequestOrg[index], - onTapOrgInfo: (item) {}, - ); - }, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - //Join organization button - RaisedRoundedButton( - key: const Key('JoinOrg'), - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Join Organisation'), - onTap: model.joinOrg, - showArrow: true, - textColor: Theme.of(context).colorScheme.secondaryContainer, - backgroundColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - //Logout button - RaisedRoundedButton( - key: const Key('Logout'), - buttonLabel: - AppLocalizations.of(context)!.strictTranslate('Log out'), - onTap: model.logout, - textColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - backgroundColor: - Theme.of(context).colorScheme.secondaryContainer, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/widgets/add_members_bottom_sheet.dart b/lib/widgets/add_members_bottom_sheet.dart deleted file mode 100644 index 9344857d1..000000000 --- a/lib/widgets/add_members_bottom_sheet.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; - -/// Adds members to an event. -class EventBottomSheet { - /// This function creates a modal material design bottom sheet. - /// - /// to let the user add admin or members to an organization. - /// **params**: - /// * `context`: BuildContext - /// * `model`: CreateEventViewModel - /// - /// **returns**: - /// None - void addUserBottomSheet({ - required BuildContext context, - required CreateEventViewModel model, - }) { - // Returns a Future that resolves to the value ("context") passed - // to Navigator.pop - showModalBottomSheet( - context: context, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - isScrollControlled: true, - builder: (BuildContext context) { - return StatefulBuilder( - builder: (BuildContext context, StateSetter setState) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.height * 0.8, - decoration: BoxDecoration( - color: Theme.of(context).scaffoldBackgroundColor, - ), - child: Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - Text( - AppLocalizations.of(context)! - .strictTranslate("Add Members"), - style: const TextStyle(fontSize: 16), - ), - TextButton( - key: const Key('text_btn_ambs1'), - onPressed: () { - model.buildUserList(); - Navigator.pop(context); - }, - child: Text( - AppLocalizations.of(context)!.strictTranslate('Done'), - ), - ), - const Divider(), - FutureBuilder( - // an admin can access the list of the members in an organization - future: model.getCurrentOrgUsersList(), - builder: ( - BuildContext context, - AsyncSnapshot> snapshot, - ) { - if (snapshot.data == null) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return snapshot.data!.isEmpty - ? const Center( - child: Text( - "There aren't any members in this organization.", - ), - ) - // Displaying the list of the members - : Flexible( - child: ListView.builder( - shrinkWrap: true, - itemCount: snapshot.data!.length, - itemBuilder: (context, index) { - return CheckboxListTile( - checkColor: Theme.of(context) - .colorScheme - .background, - activeColor: Theme.of(context) - .colorScheme - .primary, - title: Text( - "${snapshot.data![index].firstName!} ${snapshot.data![index].lastName!}", - ), - value: model.memberCheckedMap[ - snapshot.data![index].id], - onChanged: (val) { - setState( - () { - model.memberCheckedMap[snapshot - .data![index].id!] = val!; - }, - ); - }, - ); - }, - ), - ); - } - }, - ), - ], - ), - ), - ), - ); - }, - ); - }, - ); - } -} diff --git a/lib/widgets/create_recurring_event_helper_widgets.dart b/lib/widgets/create_recurring_event_helper_widgets.dart deleted file mode 100644 index df3d0240e..000000000 --- a/lib/widgets/create_recurring_event_helper_widgets.dart +++ /dev/null @@ -1,326 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; - -/// Builds a rectangle with custom properties. -class CustomRectangle extends StatelessWidget { - const CustomRectangle({ - super.key, - required this.child, - }); - - /// widget that is wrapped with CustomRectangle. - final Widget child; - - @override - Widget build(BuildContext context) { - final repeatEveryBoxDecoration = BoxDecoration( - border: Border.all( - color: Theme.of(context).textTheme.bodyLarge!.color!, - width: 1, - ), - borderRadius: BorderRadius.circular(5), - ); - return Container( - decoration: repeatEveryBoxDecoration, - child: Center(child: child), - ); - } -} - -/// Builds a TextField with custom properties. -class CustomTextField extends StatelessWidget { - const CustomTextField({ - super.key, - this.maxTextLength, - required this.textEditingController, - this.readOnly = false, - this.enabled, - }); - - /// Max textLength the text field allows. - final int? maxTextLength; - - /// Controller of textField. - final TextEditingController textEditingController; - - /// Indicates wether text field is enabled. - final bool? enabled; - - /// Indicates wether text field is read only. - final bool readOnly; - - @override - Widget build(BuildContext context) { - final outLineBorder = OutlineInputBorder( - borderSide: - BorderSide(color: Theme.of(context).textTheme.bodyLarge!.color!), - ); - return SizedBox( - width: SizeConfig.screenWidth! * 0.15, - child: TextField( - maxLength: maxTextLength, - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - controller: textEditingController, - decoration: InputDecoration( - counterText: "", - enabledBorder: outLineBorder, - focusedBorder: outLineBorder, - border: outLineBorder, - disabledBorder: outLineBorder, - contentPadding: const EdgeInsets.symmetric(vertical: 14), - ), - enabled: enabled, - readOnly: readOnly, - ), - ); - } -} - -/// Recurrence Frequency selection widget. -class RecurrenceFrequencyDropdown extends StatefulWidget { - const RecurrenceFrequencyDropdown({ - required this.model, - required this.onSelected, - required this.options, - required this.selectedOption, - }); - - /// Instance of create event view model. - final CreateEventViewModel model; - - /// Callback to be executed when selected value changes. - final void Function(String)? onSelected; - - /// Options to be shown in dropdown. - final List options; - - /// Selected option. - final String selectedOption; - - @override - _RecurrenceFrequencyDropdownState createState() => - _RecurrenceFrequencyDropdownState(); -} - -class _RecurrenceFrequencyDropdownState - extends State { - @override - Widget build(BuildContext context) { - return CustomRectangle( - child: Container( - padding: const EdgeInsets.all(12), - child: Center( - child: Row( - mainAxisAlignment: MainAxisAlignment - .center, // Align the row's contents to the center horizontally - children: [ - PopupMenuButton( - offset: const Offset(0, 40), - itemBuilder: (BuildContext context) { - return >[ - for (int i = 0; i < widget.options.length; i++) - PopupMenuItem( - value: widget.options[i], - child: Text(widget.options[i]), - ), - ]; - }, - onSelected: widget.onSelected, - tooltip: 'Select option', - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - widget.selectedOption, - overflow: TextOverflow.ellipsis, - ), - const Icon(Icons.arrow_drop_down), - ], - ), - ), - ], - ), - ), - ), - ); - } -} - -/// Event ending configuration options. -class EventEndOptions extends StatefulWidget { - const EventEndOptions({super.key, required this.model}); - - /// Instance of create event view model. - final CreateEventViewModel model; - - @override - State createState() => _EventEndOptionsState(); -} - -class _EventEndOptionsState extends State { - /// Event end types. - List eventEndTypes = [ - EventEndTypes.never, - EventEndTypes.on, - EventEndTypes.after, - ]; - - /// Custom inline width. - static const inlineWidth = SizedBox( - width: 8, - ); - - @override - void initState() { - if (widget.model.eventEndType == EventEndTypes.never) { - widget.model.recurrenceEndDate = null; - } - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - radioButton( - key: const Key('neverRadioButton'), - child: const Text(EventEndTypes.never), - index: 0, - inputAction: () { - setState(() { - widget.model.count = null; - widget.model.recurrenceEndDate = null; - widget.model.eventEndType = EventEndTypes.never; - }); - }, - ), - radioButton( - key: const Key('onRadioButton'), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const Text(EventEndTypes.on), - inlineWidth, - CustomRectangle( - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 4), - child: IconButton( - key: const Key('dateSelectorCalendar'), - // button to select the date and time of an event. - onPressed: () async { - // initially pickedDate is initialised with current end time. - final pickedDate = await customDatePicker( - initialDate: DateTime.now(), - ); - setState(() { - widget.model.recurrenceEndDate = pickedDate; - widget.model.eventEndType = EventEndTypes.on; - }); - }, - icon: Text( - formatDate( - (widget.model.recurrenceEndDate ?? DateTime.now()) - .toString() - .split(" ")[0], - ), - style: widget.model.eventEndType == EventEndTypes.on - ? TextStyle(color: Theme.of(context).dividerColor) - : TextStyle( - color: Theme.of(context) - .dividerColor - .withOpacity(0.4), - ), - ), - ), - ), - ), - ], - ), - index: 1, - inputAction: () { - setState(() { - widget.model.recurrenceEndDate = DateTime.now(); - widget.model.eventEndType = EventEndTypes.on; - widget.model.count = null; - }); - }, - ), - radioButton( - key: const Key('afterRadioButton'), - child: Row( - children: [ - const Text(EventEndTypes.after), - inlineWidth, - CustomTextField( - enabled: widget.model.eventEndType == EventEndTypes.after, - maxTextLength: 3, - textEditingController: widget.model.endOccurenceController, - ), - inlineWidth, - const Text('occurrence'), - ], - ), - index: 2, - inputAction: () { - setState(() { - widget.model.recurrenceEndDate = null; - widget.model.eventEndType = EventEndTypes.after; - }); - }, - ), - ], - ); - } - - /// Custom radio button to select event ending eventEndType. - /// - /// **params**: - /// * `key`: Uniquely identifies the radioButton. - /// * `child`: RadioListTile widget. - /// * `index`: index of [eventEndType]. - /// * `inputAction`: Call back to be executed when clicked on radio button. - /// - /// **returns**: - /// * `Theme`: custom theme. - Theme radioButton({ - required Key key, - required Widget child, - required int index, - Function()? inputAction, - }) { - return Theme( - key: key, - data: Theme.of(context).copyWith(focusColor: Colors.transparent), - child: RadioListTile( - title: child, - value: eventEndTypes[index], - groupValue: widget.model.eventEndType, - onChanged: (value) { - setState(() { - widget.model.eventEndType = value!; - inputAction?.call(); - }); - }, - ), - ); - } - - /// Formats input date into [MMM d, yyyy] format. - /// - /// **params**: - /// * `inputDate`: Unformatted date. - /// - /// **returns**: - /// * `String`: formatted date. - String formatDate(String inputDate) { - final DateTime dateTime = DateTime.parse(inputDate); - return DateFormat("MMM d, yyyy").format(dateTime); - } -} diff --git a/lib/widgets/custom_alert_dialog.dart b/lib/widgets/custom_alert_dialog.dart deleted file mode 100644 index 7b434365e..000000000 --- a/lib/widgets/custom_alert_dialog.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; - -/// This Class returns CustomAlertDialog widget. Custom Alert Dialog is a popup. -/// -/// that appeared in the screen showing Alert message along with the event buttons. -/// This extends stateless widget that means it cannot change its state during the -/// runtime of a application. -class CustomAlertDialog extends StatelessWidget { - /// Constructs a [CustomAlertDialog] widget. - /// - /// [reverse] indicates whether the order of action buttons should be reversed. - /// [success] is the function triggered upon tapping the primary action button. - /// [secondaryButtonTap] is the function triggered upon tapping the secondary action button. - /// [successText] is the text displayed on the primary action button. - /// [dialogTitle] is the title displayed in the dialog (default value is 'Confirmation'). - /// [dialogSubTitle] is the subtitle or message content of the dialog. - /// [secondaryButtonText] is the text displayed on the secondary action button (default value is 'Close'). - - const CustomAlertDialog({ - super.key, - this.successText = 'Confirm', - this.dialogTitle = 'Confirmation', - this.reverse = false, - this.secondaryButtonText = 'Close', - this.secondaryButtonTap, - required this.success, - required this.dialogSubTitle, - }); - - /// Indicates whether the order of action buttons should be reversed. - final bool reverse; - - /// Function triggered upon tapping the primary action button. - final Function() success; - - /// Function triggered upon tapping the secondary action button. - final Function()? secondaryButtonTap; - - /// Text displayed on the primary action button. - final String successText; - - /// Title displayed in the dialog (default value is 'Confirmation'). - final String dialogTitle; - - /// Subtitle or message content of the dialog. - final String dialogSubTitle; - - /// Text displayed on the secondary action button (default value is 'Close'). - final String secondaryButtonText; - - @override - Widget build(BuildContext context) { - final List actions = [ - RaisedRoundedButton( - key: Key(secondaryButtonText), - onTap: () { - secondaryButtonTap != null - ? secondaryButtonTap!() - : navigationService.pop(); - }, - buttonLabel: - AppLocalizations.of(context)!.strictTranslate(secondaryButtonText), - textColor: Colors.white, - backgroundColor: const Color(0xFF008A37), - width: SizeConfig.screenWidth! * 0.2, - height: SizeConfig.screenHeight! * 0.06, - ), - RaisedRoundedButton( - key: Key(successText), - onTap: () => success(), - buttonLabel: AppLocalizations.of(context)!.strictTranslate(successText), - textColor: const Color(0xFF008A37), - backgroundColor: Theme.of(context).colorScheme.tertiary, - width: SizeConfig.screenWidth! * 0.2, - height: SizeConfig.screenHeight! * 0.06, - ), - ]; - return AlertDialog( - surfaceTintColor: Theme.of(context).colorScheme.secondaryContainer, - title: Text( - AppLocalizations.of(context)!.strictTranslate(dialogTitle), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontWeight: FontWeight.w800), - ), - content: Text( - AppLocalizations.of(context)!.strictTranslate(dialogSubTitle), - ), - buttonPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.05, - vertical: SizeConfig.screenHeight! * 0.05, - ), - actions: reverse ? actions.reversed.toList() : actions, - ); - } -} diff --git a/lib/widgets/custom_avatar.dart b/lib/widgets/custom_avatar.dart deleted file mode 100644 index 7d8ce4343..000000000 --- a/lib/widgets/custom_avatar.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:shimmer/shimmer.dart'; - -/// Creates a custom avatar. -/// -/// The avatar is created using the image provided, -/// or the first alphabet with a standard background color. -class CustomAvatar extends StatelessWidget { - const CustomAvatar({ - super.key, - required this.isImageNull, - this.firstAlphabet, - this.cacheManager, - this.imageUrl, - this.fontSize = 40, - this.maxRadius = 16, - }); - - /// Custom avatar data. - final bool isImageNull; - - /// Custom avatar data. - final String? firstAlphabet; - - /// Custom avatar data. - final String? imageUrl; - - /// Custom avatar data. - final double? fontSize; - - /// Custom avatar data. - final double? maxRadius; - - /// Custom avatar data. - final BaseCacheManager? cacheManager; - - @override - Widget build(BuildContext context) { - return isImageNull - //creating the avatar with the icon-theme color when the image is null - ? CircleAvatar( - backgroundColor: - Theme.of(context).iconTheme.color!.withOpacity(0.2), - maxRadius: maxRadius, - child: Center( - child: Text( - firstAlphabet!, - style: Theme.of(context).textTheme.bodySmall!.copyWith( - fontSize: fontSize, - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - ), - ) - //creating the avatar with the provided image - : CachedNetworkImage( - cacheManager: cacheManager, - imageBuilder: (context, imageProvider) { - return CircleAvatar( - backgroundColor: - Theme.of(context).iconTheme.color!.withOpacity(0.2), - backgroundImage: imageProvider, - ); - }, - imageUrl: imageUrl!, - placeholder: (context, url) => CircleAvatar( - child: Shimmer.fromColors( - baseColor: Colors.transparent, - highlightColor: Colors.white30, - child: const CircleAvatar(), - ), - ), - errorWidget: (context, url, error) => - const CircleAvatar(child: Icon(Icons.error)), - ); - } -} diff --git a/lib/widgets/custom_drawer.dart b/lib/widgets/custom_drawer.dart deleted file mode 100644 index 0ebe1f0b7..000000000 --- a/lib/widgets/custom_drawer.dart +++ /dev/null @@ -1,188 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/from_palisadoes.dart'; - -/// Creates a custom drawer for switching organizations. -/// -/// joining new organizations, or leaving an organization. -class CustomDrawer extends StatelessWidget { - const CustomDrawer({ - super.key, - required this.homeModel, - }); - - /// home model. - final MainScreenViewModel homeModel; - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(homeModel, context), - builder: (context, model, child) { - return Container( - width: SizeConfig.screenWidth! * 0.6, - alignment: Alignment.centerLeft, - child: Drawer( - key: const Key("Drawer"), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - //A material design Drawer header that identifies the app's user. - Expanded( - child: ListView( - children: [ - UserAccountsDrawerHeader( - currentAccountPicture: CustomAvatar( - isImageNull: model.selectedOrg?.image == null, - imageUrl: model.selectedOrg?.image, - firstAlphabet: - model.selectedOrg?.name!.substring(0, 1), - ), - accountName: Column( - key: MainScreenViewModel.keyDrawerCurOrg, - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.selectedOrg?.name! ?? "NULL", - ), - Text( - AppLocalizations.of(context)! - .strictTranslate("Selected Organization"), - ), - ], - ), - accountEmail: const SizedBox(), - ), - //Tile to Switch organizations - Column( - key: MainScreenViewModel.keyDrawerSwitchableOrg, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - vertical: 5, - horizontal: 8.0, - ), - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Switch Organization"), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.41, - child: Scrollbar( - controller: model.controller, - thumbVisibility: true, - child: ListView.builder( - key: const Key("Switching Org"), - controller: model.controller, - padding: EdgeInsets.zero, - itemCount: model.switchAbleOrg.length, - // itemCount: 3, - itemBuilder: (BuildContext context, int index) { - return ListTile( - key: const Key("Org"), - onTap: () => model.switchOrg( - model.switchAbleOrg[index], - ), - leading: CustomAvatar( - isImageNull: - model.switchAbleOrg[index].image == - null, - imageUrl: - model.switchAbleOrg[index].image, - firstAlphabet: model - .switchAbleOrg[index].name! - .substring(0, 1), - fontSize: 18, - ), - title: Text( - model.switchAbleOrg[index].name!, - ), - ); - }, - ), - ), - ), - ], - ), - ], - ), - ), - // A Tile to join a new organization - Container( - child: Align( - alignment: FractionalOffset.bottomCenter, - child: Container( - child: Column( - children: [ - const Divider(), - ListTile( - key: MainScreenViewModel.keyDrawerJoinOrg, - onTap: () { - if (userConfig.loggedIn) { - navigationService.popAndPushScreen( - Routes.joinOrg, - arguments: '-1', - ); - } else { - navigationService.popAndPushScreen( - Routes.setUrlScreen, - arguments: '', - ); - } - }, - leading: const Icon( - Icons.add, - size: 30, - ), - title: Text( - AppLocalizations.of(context)! - .strictTranslate("Join new Organization"), - ), - ), - userConfig.loggedIn - ? ListTile( - key: MainScreenViewModel - .keyDrawerLeaveCurrentOrg, - onTap: () => navigationService - .pushDialog(model.exitAlertDialog()), - leading: const Icon(Icons.logout, size: 30), - title: Text( - AppLocalizations.of(context)! - .strictTranslate( - "Leave Current Organization", - ), - ), - ) - : Container(), - SizedBox( - key: const Key("Sized Box Drawer"), - height: SizeConfig.screenHeight! * 0.03, - ), - const FromPalisadoes(key: Key("From Palisadoes")), - SizedBox( - key: const Key("Sized BottomBox Drawer"), - height: SizeConfig.screenHeight! * 0.03, - ), - ], - ), - ), - ), - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/lib/widgets/custom_list_tile.dart b/lib/widgets/custom_list_tile.dart deleted file mode 100644 index 9b0e9114a..000000000 --- a/lib/widgets/custom_list_tile.dart +++ /dev/null @@ -1,195 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/options/options.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -/// Returns a widget for rendering Customized tiles. -/// -/// A Tile shows the org info, user info, options that on tap user & org info. -class CustomListTile extends StatelessWidget { - const CustomListTile({ - required Key key, - required this.index, - required this.type, - this.showIcon = false, - this.orgInfo, - this.userInfo, - this.attendeeInfo, - this.option, - this.onTapOrgInfo, - this.onTapUserInfo, - this.onTapAttendeeInfo, - this.onTapOption, - }) : super(key: key); - - /// Index int of tiles. - final int index; - - /// Tiletype object to specify tle type. - final TileType type; - - /// Object containing all the necessary info regarding the org. - final OrgInfo? orgInfo; - - /// Object containing all the necessary info regarding the user. - final User? userInfo; - - /// Object containing all the necessary info regarding the Attendee. - final Attendee? attendeeInfo; - - /// Object containing all the necessary info regarding the options. - final Options? option; - - /// Object containing all the necessary info regarding the onTapOption. - final Function()? onTapOption; - - /// Function to handle the tap on user info. - final Function()? onTapUserInfo; - - /// Function to handle the tap on attendee info. - final Function()? onTapAttendeeInfo; - - /// Function to handle the tap on org info. - final Function(OrgInfo)? onTapOrgInfo; - - /// Flag to determine whether thge Icons should be shown. - final bool showIcon; - - @override - Widget build(BuildContext context) { - Function()? onTap; - - switch (type) { - case TileType.org: - onTap = () => onTapOrgInfo!(orgInfo!); - break; - case TileType.user: - onTap = onTapUserInfo; - break; - case TileType.attendee: - onTap = onTapAttendeeInfo; - break; - default: - onTap = onTapOption; - break; - } - - return InkWell( - // checking whether the tapped tile is of user or org. - onTap: onTap, - child: Padding( - padding: const EdgeInsets.all(18.0), - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(20), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.5), - spreadRadius: 1, - blurRadius: 6, - offset: const Offset(0, 3), - ), - ], - ), - height: 70, - child: Row( - children: [ - Expanded( - flex: 6, - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 25, - ), - child: type == TileType.org - ? RichText( - key: const Key('OrgNamewithOrgAddress'), - text: TextSpan( - text: orgInfo!.name, - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - fontSize: 19, - color: Colors.black, - ), - children: [ - if (orgInfo!.address != null) ...[ - const TextSpan(text: ' '), - TextSpan( - text: - '(${orgInfo!.address!.city}, ${orgInfo!.address!.countryCode})', - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith( - fontSize: 14, - color: const Color.fromARGB( - 255, - 112, - 112, - 112, - ), - ), - ), - ], - ], - ), - ) - : Text( - type == TileType.user - ? '${userInfo!.firstName!} ${userInfo!.lastName!}' - : type == TileType.attendee - ? '${attendeeInfo!.firstName!} ${attendeeInfo!.lastName!}' - : option!.title, - style: - type == TileType.user || type == TileType.attendee - ? Theme.of(context) - .textTheme - .titleLarge! - .copyWith( - fontSize: 18, - color: Colors.black, - ) - : option!.trailingIconButton == null - ? Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - fontSize: 18, - color: Colors.black, - ) - : Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - fontSize: 18, - color: Colors.black, - ), - ), - ), - ), - Expanded( - flex: 1, - child: type != TileType.user && type != TileType.attendee - ? type == TileType.org - ? Icon( - !orgInfo!.userRegistrationRequired! - ? Icons.lock_open - : Icons.lock, - color: !orgInfo!.userRegistrationRequired! - ? const Color(0xFF34AD64) - : const Color(0xffFABC57), - ) - : option!.trailingIconButton ?? const SizedBox() - : const SizedBox(), - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/widgets/custom_progress_dialog.dart b/lib/widgets/custom_progress_dialog.dart deleted file mode 100644 index f8e8b53b5..000000000 --- a/lib/widgets/custom_progress_dialog.dart +++ /dev/null @@ -1,64 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/widgets_view_models/progress_dialog_view_model.dart'; -import 'package:talawa/views/base_view.dart'; - -/// A progress dialogue which shows an activity indicator -/// spinning clockwise if there is internet connectivity. -/// Otherwise, it shows no-internet image and text. -class CustomProgressDialog extends StatelessWidget { - const CustomProgressDialog({required Key key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return Container( - margin: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.25, - vertical: SizeConfig.screenHeight! * 0.35, - ), - decoration: BoxDecoration( - color: Theme.of(context).textTheme.titleLarge!.color, - borderRadius: BorderRadius.circular(15), - ), - child: model.connectivityPresent - ? Center( - //An iOS-style activity indicator that spins clockwise. - - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ) - // Shows no-internet image and text on no connectivity - : Column( - children: [ - Container( - alignment: Alignment.bottomCenter, - height: SizeConfig.screenWidth! * 0.4, - width: SizeConfig.screenWidth! * 0.4, - padding: const EdgeInsets.only(bottom: 10), - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/images/no_internet.png'), - fit: BoxFit.scaleDown, - ), - ), - ), - Text( - '${AppLocalizations.of(context)!.strictTranslate("No Internet")}!', - style: Theme.of(context).textTheme.headlineSmall, - ), - ], - ), - ); - }, - ); - } -} diff --git a/lib/widgets/custom_weekday_selector.dart b/lib/widgets/custom_weekday_selector.dart deleted file mode 100644 index f46ef92d1..000000000 --- a/lib/widgets/custom_weekday_selector.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; - -/// Custom Widget to select weekdays. -class CustomWeekDaySelector extends StatefulWidget { - const CustomWeekDaySelector({required this.model}); - - /// instance of create event view model. - final CreateEventViewModel model; - - @override - _CustomWeekDaySelectorState createState() => _CustomWeekDaySelectorState(); -} - -class _CustomWeekDaySelectorState extends State { - @override - Widget build(BuildContext context) { - final Set weekdays = widget.model.weekDays; - return Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: List.generate(7, (index) { - final weekday = _getWeekdayAbbreviation(index); - return GestureDetector( - onTap: () { - setState(() { - if (weekdays.contains(weekday)) { - weekdays.remove(weekday); - } else { - weekdays.add(weekday); - } - widget.model.weekDays = weekdays; - }); - }, - child: Container( - width: 30, - height: 30, - decoration: BoxDecoration( - color: weekdays.contains(weekday) - ? Theme.of(context).colorScheme.primary.withOpacity(0.5) - : Colors.transparent, - border: Border.all( - width: weekdays.contains(weekday) ? 2 : 1, - color: weekdays.contains(weekday) - ? Theme.of(context).colorScheme.primary - : Theme.of(context).dividerColor, - ), - borderRadius: BorderRadius.circular(15), - ), - child: Center( - child: Text( - weekday[0], - style: TextStyle( - color: Theme.of(context).dividerColor, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ); - }), - ), - ); - } - - /// Maps isSelected index to weekday. - /// - /// **params**: - /// * `index`: of isSelected list. - /// - /// **returns**: - /// * `String`: Weekday as string. - String _getWeekdayAbbreviation(int index) { - switch (index) { - case 0: - return WeekDays.sunday; - case 1: - return WeekDays.monday; - case 2: - return WeekDays.tuesday; - case 3: - return WeekDays.wednesday; - case 4: - return WeekDays.thursday; - case 5: - return WeekDays.friday; - case 6: - return WeekDays.saturday; - default: - return ''; - } - } -} diff --git a/lib/widgets/date_time_picker.dart b/lib/widgets/date_time_picker.dart deleted file mode 100644 index 916a56ebc..000000000 --- a/lib/widgets/date_time_picker.dart +++ /dev/null @@ -1,41 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; - -/// Shows a dialog containing a Material Design date picker. -/// -/// The returned Future resolves to the date selected by the user when the user confirms the dialog. -/// If the user cancels the dialog, null is returned. -Future customDatePicker({required DateTime initialDate}) async { - // showDatePicker which shows a material design date range picker used to select a range of dates. - final DateTime? picked = await showDatePicker( - context: navigationService.navigatorKey.currentContext!, - initialDate: initialDate, - firstDate: DateTime(2015, 8), - lastDate: DateTime(2101), - ); - if (picked != null && picked != initialDate) { - return picked; - } - return initialDate; -} - -/// Shows a dialog containing a material design time picker. -/// -/// The returned Future resolves to the time selected by the user when the user closes the dialog. -/// If the user cancels the dialog, null is returned. -Future customTimePicker({required TimeOfDay initialTime}) async { - // showTimePicker which shows a material design time range picker used to select a range of times. - // Click ![here](https://api.flutter.dev/flutter/material/showTimePicker.html) to know more. - final TimeOfDay? pickedTime = await showTimePicker( - context: navigationService.navigatorKey.currentContext!, - initialTime: initialTime, - ); - - if (pickedTime != null && pickedTime != initialTime) { - return pickedTime; - } - return initialTime; -} diff --git a/lib/widgets/event_card.dart b/lib/widgets/event_card.dart deleted file mode 100644 index 52480d78b..000000000 --- a/lib/widgets/event_card.dart +++ /dev/null @@ -1,297 +0,0 @@ -import 'dart:math'; -import 'dart:ui'; -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// This class returns the EventCard widget. -class EventCard extends StatelessWidget { - const EventCard({ - super.key, - required this.event, - this.eventTitleHighlightedText, - this.eventTitleNormalText, - required this.isSearchItem, - }); - - /// instance of an event. - final Event event; - - /// Highlighted text of the event. - final String? eventTitleHighlightedText; - - /// Eventtile normal text. - final String? eventTitleNormalText; - - /// This flag indicates that if this event is searchable. - final bool isSearchItem; - - @override - Widget build(BuildContext context) { - final bool isRegistered = event.isRegistered ?? false; - return Padding( - padding: const EdgeInsets.only(bottom: 10), - child: Stack( - children: [ - Card( - surfaceTintColor: Theme.of(context).colorScheme.secondaryContainer, - shape: RoundedRectangleBorder( - side: - isRegistered && userConfig.currentUser.id != event.creator!.id - ? BorderSide( - color: Theme.of(context).colorScheme.secondary, - width: SizeConfig.screenWidth! * 0.008, - ) - : BorderSide.none, - ), - elevation: 3, - color: Theme.of(context).primaryColor, - child: Column( - children: [ - AspectRatio( - aspectRatio: 2.5, - child: Container( - height: SizeConfig.screenHeight! * 0.11, - width: double.infinity, - decoration: BoxDecoration( - color: Colors.grey.withOpacity(0.3), - image: const DecorationImage( - fit: BoxFit.fitWidth, - alignment: FractionalOffset.topCenter, - image: AssetImage('assets/images/pfp2.png'), - ), - ), - child: ClipRRect( - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), - child: Container( - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.0), - ), - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - Row( - children: [ - SizedBox( - width: SizeConfig.screenWidth! * 0.48, - child: isSearchItem - ? RichText( - text: TextSpan( - text: eventTitleHighlightedText, - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - fontWeight: FontWeight.bold, - ), - children: [ - TextSpan( - text: eventTitleNormalText, - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - color: Colors.grey, - ), - ), - ], - ), - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - ) - : Text( - event.title!, - style: Theme.of(context) - .textTheme - .headlineSmall, - ), - ), - const Spacer(), - const Icon( - Icons.calendar_today, - size: 13, - ), - const Spacer(), - Expanded( - child: Text( - "${event.startDate} - ${event.endDate}", - style: Theme.of(context).textTheme.bodySmall, - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.006, - ), - if (event.startTime != null && event.endTime != null) - Row( - children: [ - const Icon( - Icons.schedule, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.015, - ), - Text( - "${event.startTime} - ${event.endTime!}", - style: Theme.of(context).textTheme.bodySmall, - ), - const Spacer(), - const Icon( - Icons.place, - size: 12, - ), - SizedBox( - child: Text( - event.location!.substring( - 0, - min(event.location!.length, 20), - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: SizeConfig.screenWidth! * 0.55, - child: Text( - event.description!, - style: Theme.of(context).textTheme.bodySmall, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - maxLines: 3, - ), - ), - const Icon( - Icons.chevron_right, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.007, - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - userConfig.currentUser.id == event.creator!.id - ? Row( - children: [ - Icon( - Icons.verified, - size: 13, - color: Theme.of(context) - .colorScheme - .secondary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Created'), - style: - Theme.of(context).textTheme.bodySmall, - ), - ], - ) - : const SizedBox(), - const Spacer(), - event.isPublic! - ? Icon( - Icons.lock_open, - size: 13, - color: Theme.of(context).colorScheme.primary, - ) - : Icon( - Icons.lock, - size: 13, - color: Theme.of(context).colorScheme.primary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - event.isPublic! - ? Text( - AppLocalizations.of(context)! - .strictTranslate('public'), - style: Theme.of(context).textTheme.bodySmall, - ) - : Text( - AppLocalizations.of(context)! - .strictTranslate('private'), - style: Theme.of(context).textTheme.bodySmall, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - const Icon( - Icons.people_outline, - size: 13, - color: Color(0xff4285F4), - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - Text( - (event.attendees?.length ?? 0).toString(), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - ], - ), - ), - ], - ), - ), - Positioned( - top: SizeConfig.screenHeight! * 0.007, - right: SizeConfig.screenWidth! * 0.013, - child: isRegistered && - userConfig.currentUser.id != event.creator!.id - ? DecoratedBox( - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(15), - ), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center( - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Registered"), - style: - Theme.of(context).textTheme.titleLarge!.copyWith( - color: Colors.white, - fontWeight: FontWeight.w700, - ), - ), - ), - ), - ) - : const SizedBox(), - ), - ], - ), - ); - } -} diff --git a/lib/widgets/event_date_time_tile.dart b/lib/widgets/event_date_time_tile.dart deleted file mode 100644 index 459765823..000000000 --- a/lib/widgets/event_date_time_tile.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; - -/// Returns a widget tile(item) for displaying date and time. -class DateTimeTile extends StatelessWidget { - const DateTimeTile({ - super.key, - required this.date, - required this.time, - required this.setDate, - required this.setTime, - required this.isAllDay, - }); - - /// Represents a date in string format. - final String date; - - /// Represents a time in string format. - final String time; - - /// Represents a boolean value indicating if the event is all day. - final bool isAllDay; - - /// Function that sets the date. - final Function() setDate; - - /// Function that sets the time. - final Function() setTime; - - @override - Widget build(BuildContext context) { - return Container( - color: Theme.of(context).colorScheme.primaryContainer, - height: SizeConfig.screenHeight! * 0.068, - width: double.infinity, - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: SizeConfig.screenWidth! * 0.083), - child: Row( - children: [ - const Icon( - Icons.calendar_today, - color: Color(0xff524F4F), - size: 19, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - InkWell( - key: const Key('EventDateTimeTileDate'), - onTap: () async { - setDate(); - }, - child: Text( - date, - style: const TextStyle(fontSize: 16), - ), - ), - if (!isAllDay) ...[ - const Spacer(), - const Icon( - Icons.schedule, - color: Color(0xff524F4F), - size: 19, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - InkWell( - key: const Key('EventDateTimeTileTime'), - onTap: () async { - setTime(); - }, - child: Text( - time, - style: const TextStyle(fontSize: 16), - ), - ), - ], - ], - ), - ), - ); - } -} diff --git a/lib/widgets/event_search_delegate.dart b/lib/widgets/event_search_delegate.dart deleted file mode 100644 index d2e877924..000000000 --- a/lib/widgets/event_search_delegate.dart +++ /dev/null @@ -1,101 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/widgets/event_card.dart'; - -/// This class returns a list of the events which match the search query. -class EventSearch extends SearchDelegate { - EventSearch({required this.eventList, required this.exploreEventsViewModel}); - ExploreEventsViewModel exploreEventsViewModel; - - final List eventList; - - @override - List buildActions(BuildContext context) { - /// Returns an icon button which closes the search page and returns - /// to the underlying route if the query is empty. Otherwise it sets the - /// query empty. - return [ - IconButton( - onPressed: () { - query.isNotEmpty ? query = '' : close(context, eventList.first); - }, - icon: const Icon(Icons.clear), - ), - ]; - } - - @override - Widget buildLeading(BuildContext context) { - /// Returns an icon button which closes the search page and returns - /// to the underlying route - return IconButton( - onPressed: () { - close(context, eventList.first); - }, - icon: const Icon(Icons.arrow_back), - ); - } - - @override - Widget buildResults(BuildContext context) { - return Container(); - } - - @override - Widget buildSuggestions(BuildContext context) { - /// Returns a scrollable list through "buildSuggestionsSuccess" function. - /// where() method Returns a new lazy Iterable with all elements that satisfy the predicate test. - /// toList( ) method is used to convert an Iterable to a List. - /// toLowerCase() converts all characters in a string to lower case. - final suggestions = eventList.where((event) { - final eventLowerCase = event.title!.toLowerCase(); - final queryLowerCase = query.toLowerCase(); - return eventLowerCase.startsWith(queryLowerCase); - }).toList(); - return buildSuggestionsSucess(suggestions); - } - - Widget buildSuggestionsSucess(List suggestions) { - /// Takes a List of Events as parameter which is passed by the "buildSuggestions" function. - /// Returns a SingleChildScrollView of the events from the list. - /// SingleChildScrollView is box in which a single widget can be scrolled. - return SingleChildScrollView( - child: ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: suggestions.length, - itemBuilder: (BuildContext context, int index) { - final highlightedText = - suggestions[index].title!.substring(0, query.length); - final normalText = suggestions[index].title!.substring(query.length); - - /// Returns a widget that detects gestures. - /// Defers to its child for its sizing behavior. - /// Navigates to the screen with the event information. - return GestureDetector( - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": suggestions[index], - "exploreEventViewModel": exploreEventsViewModel, - }, - ); - }, - child: EventCard( - event: suggestions[index], - isSearchItem: true, - eventTitleHighlightedText: highlightedText, - eventTitleNormalText: normalText, - ), - ); - }, - ), - ); - } -} diff --git a/lib/widgets/from_palisadoes.dart b/lib/widgets/from_palisadoes.dart deleted file mode 100644 index 212d2b496..000000000 --- a/lib/widgets/from_palisadoes.dart +++ /dev/null @@ -1,51 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// This class generates the text "From Palisadoes" in a custom way. -class FromPalisadoes extends StatelessWidget { - const FromPalisadoes({super.key}); - - @override - Widget build(BuildContext context) { - return Column( - children: [ - // Customizing the word "from". - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // This method is called for localized text. - AppLocalizations.of(context)!.strictTranslate('from'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.blockSizeHorizontal, - ), - // Customizing the word "Palisadoes". - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'PALISADOES', - style: Theme.of(context) - .textTheme - .titleSmall! - .copyWith(fontWeight: FontWeight.w700), - ), - ], - ), - SizedBox( - height: SizeConfig.blockSizeHorizontal! * 5, - ), - ], - ); - } -} diff --git a/lib/widgets/invite_child.dart b/lib/widgets/invite_child.dart deleted file mode 100644 index 4e0e84e4c..000000000 --- a/lib/widgets/invite_child.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; - -/// Creating an instance of AppLangauge() to set up localized values for each locale that our app supports. -final _appLanguageService = locator(); - -/// We can use QR code scanner, social media platforms like twitter, whatsapp, telegram and many more.. -/// -/// more_info_if_required -/// -/// **params**: -/// * `context`: Build Context -/// -/// **returns**: -/// * `Widget`: Returns Column with QR Code -Widget invite(BuildContext context) { - _appLanguageService.initialize(); - - // final String url = - // 'https://cyberwake.github.io/applink/invite?selectLang=${_appLanguageService.appLocal.languageCode}&setUrl=${GraphqlConfig.orgURI}&selectOrg=${userConfig.currentOrg.id!}'; - const String qrData = - 'https://github.com/PalisadoesFoundation/talawa/releases/download/automated/app-release.apk'; - - // print(url); - // print(qrData); - - return Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - //Scan the below given QR code to join the organization. - QrImageView( - key: const Key("QRcode"), - data: qrData, - version: QrVersions.auto, - size: 200.0, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.08, - ), - Text( - 'Scan the QR to join ${userConfig.currentOrg.name}', - style: const TextStyle(color: Colors.black), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.02, - ), - //Tap on the Twitter icon to join the organization through Twitter. - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // mainAxisSize: MainAxisSize.min, - // children: [ - // iconButton( - // "Twitter", - // const FaIcon( - // FontAwesomeIcons.twitter, - // size: 35, - // color: Color(0xFF1DA1F2), - // ), - // () async => SocialShare.shareTwitter('Join us', url: url), - // ), - // //Tap on the Whatsapp icon to join the organization through Whatsapp. - // iconButton( - // "WhatsApp", - // CustomPaint( - // size: const Size( - // 50, - // 50 * 1.004, - // ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - // painter: WhatsappLogo(), - // ), - // () async => SocialShare.shareWhatsapp(url), - // ), - // iconButton( - // "Telegram", - // CustomPaint( - // size: Size( - // 45, - // (45 * 1).toDouble(), - // ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - // painter: TelegramLogo(), - // ), - // () async => SocialShare.shareTelegram(url), - // ), - // iconButton( - // "Alt", - // const FaIcon( - // FontAwesomeIcons.shareNodes, - // size: 30, - // color: Color(0xff40c351), - // ), - // () async => SocialShare.shareOptions(url), - // ), - // ], - // ), - ], - ); -} - -/// It prints "tapped" in the console for the developer to know that the button was tapped. -/// -/// **params**: -/// * `key`: Key of the Widget -/// * `icon`: Icon to be displayed -/// * `onTap`: on tap function -/// -/// **returns**: -/// * `Widget`: returns IconButton. -Widget iconButton(String key, Widget icon, void Function() onTap) { - return Stack( - children: [ - IconButton( - key: Key(key), - onPressed: () { - print('tapped'); - onTap(); - }, - icon: icon, - ), - ], - ); -} diff --git a/lib/widgets/lang_switch.dart b/lib/widgets/lang_switch.dart deleted file mode 100644 index 2ffa67209..000000000 --- a/lib/widgets/lang_switch.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/constants/constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/language/language_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; - -/// This widget enables language switch for "internationalizing our app". -class LanguageTile extends StatelessWidget { - const LanguageTile({super.key}); - - @override - Widget build(BuildContext context) { - //AppLanguage enables to set up localized values for each locale that our app supports. - //A locale is an identifier used to select a user's language and formatting preferences. - //This represents a Unicode Language Identifier (i.e. without Locale extensions), - //except variants are not supported. - return Consumer( - builder: (context, appLang, _) { - final Language userLanguage = languages.firstWhere( - (element) => element.langCode == appLang.appLocal.languageCode, - ); - return ListTile( - key: const Key('LanguageTile'), - contentPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.blockSizeHorizontal!, - ), - title: - Text(AppLocalizations.of(context)!.strictTranslate("Language")), - trailing: TextButton( - key: const Key('LanguageSelector'), - onPressed: () { - navigationService.pushReplacementScreen( - '/selectLang', - arguments: '0', - ); - }, - child: Text(userLanguage.langName), - ), - ); - }, - ); - } -} diff --git a/lib/widgets/member_name_tile.dart b/lib/widgets/member_name_tile.dart deleted file mode 100644 index 643b13b00..000000000 --- a/lib/widgets/member_name_tile.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; - -/// This widget returns a tile containing the name of the member. -/// -/// Along with the name, there is a circle avatar which -/// either contains the image uploaded by the user or the -/// first character of his/her name in uppercase. -class MemberNameTile extends StatelessWidget { - const MemberNameTile({ - super.key, - required this.userName, - this.userImage, - required this.onDelete, - }); - - /// Represents the user's name. - final String userName; - - /// Triggers the deletion of the user. - final Function() onDelete; - - /// Represents the URL or path to the user's image. - final String? userImage; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(top: 10, right: 5), - child: Container( - width: SizeConfig.screenWidth! * (0.3 + userName.length / 50), - height: SizeConfig.screenHeight! * 0.04, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(SizeConfig.screenHeight! * 0.02), - color: Theme.of(context).colorScheme.primaryContainer, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Background is set with the image uploaded by the user. - userImage != null - ? CircleAvatar( - radius: SizeConfig.screenHeight! * 0.0201, - backgroundImage: NetworkImage(userImage!), - ) - // If the user has not uploaded his/her image, - // then a circle avatar is created. - // It has the first character of the user's name - //in uppercase and the default background color. - : CircleAvatar( - radius: SizeConfig.screenHeight! * 0.0201, - backgroundColor: Theme.of(context).colorScheme.secondary, - child: Text( - userName.substring(0, 1).toUpperCase(), - style: const TextStyle(color: Colors.white), - ), - ), - // The name of the member in text form. - Padding( - padding: const EdgeInsets.only(left: 5), - child: Text( - userName, - ), - ), - IconButton( - padding: EdgeInsets.zero, - onPressed: () => onDelete(), - icon: const Icon( - Icons.cancel_rounded, - color: Color(0xff524F4F), - size: 19, - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/widgets/multi_reaction.dart b/lib/widgets/multi_reaction.dart deleted file mode 100644 index 2abec4d95..000000000 --- a/lib/widgets/multi_reaction.dart +++ /dev/null @@ -1,120 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_reaction_button/flutter_reaction_button.dart'; -import 'package:flutter_svg/flutter_svg.dart'; - -/// Reaction Button with multiple Emojis. -class MultiReactButton extends StatefulWidget { - const MultiReactButton({super.key, required this.toggle}); - - /// Toggle Function for react Button. - final VoidCallback toggle; - - @override - State createState() => _MultiReactionButtonState(); -} - -class _MultiReactionButtonState extends State { - @override - Widget build(BuildContext context) { - return ReactionButton( - itemSize: const Size.square(35), - onReactionChanged: (value) { - // ignore: unnecessary_statements - widget.toggle(); - }, - selectedReaction: Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/images/🦆 icon _like_.svg', - ), - ), - ), - value: 12, - ), - reactions: [ - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/angel.svg', - ), - ), - ), - value: 1, - ), - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/happy.svg', - ), - ), - ), - value: 3, - ), - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/laugh.svg', - ), - ), - ), - value: 4, - ), - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/love.svg', - ), - ), - ), - value: 1, - ), - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/tear.svg', - ), - ), - ), - value: 1, - ), - Reaction( - icon: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / 392) * 35, - width: (MediaQuery.sizeOf(context).width / 392) * 35, - child: SvgPicture.asset( - 'assets/icons/angry.svg', - ), - ), - ), - value: 2, - ), - ], - ); - } -} diff --git a/lib/widgets/organization_list.dart b/lib/widgets/organization_list.dart deleted file mode 100644 index 1f8183e1c..000000000 --- a/lib/widgets/organization_list.dart +++ /dev/null @@ -1,152 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/constants/timeout.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/widgets/custom_list_tile.dart'; -import 'package:visibility_detector/visibility_detector.dart'; - -/// This class returns the OrganizationList widget. -/// -/// which shows the list of all organizations exists in the URL. -/// This widget is used after the authentication. -class OrganizationList extends StatelessWidget { - const OrganizationList({required this.model, super.key}); - - /// [model] is a type of [SelectOrganizationViewModel] which provides methods to handle the data for this component. - final SelectOrganizationViewModel model; - @override - Widget build(BuildContext context) { - final navigationServiceLocal = locator(); - model.organizations = []; - int noOfRefetch = 0; - return GraphQLProvider( - client: ValueNotifier(graphqlConfig.clientToQuery()), - child: Query( - options: QueryOptions( - document: gql(queries.fetchJoinInOrg), - variables: { - // fetch 15 items only, will fetch more when scrolling index is at the 3rd last item! - 'first': 15, - 'skip': 0, - }, - ), - builder: ( - QueryResult result, { - Future Function(FetchMoreOptions)? fetchMore, - Future Function()? refetch, - }) { - // checking for any errors, if true fetch again! - if (result.hasException) { - final isException = databaseFunctions.encounteredExceptionOrError( - result.exception!, - showSnackBar: noOfRefetch == 0, - ); - if (isException != null) { - if (isException) { - refetch!(); - noOfRefetch++; - } else { - refetch!(); - noOfRefetch++; - } - } - } else { - // If the result is still loading! - if (!result.isLoading) { - // print(result.data!['organizationsConnection']); - model.organizations = OrgInfo().fromJsonToList( - result.data!['organizationsConnection'], - ); - } - - Timer(const Duration(seconds: TimeOuts.small), () { - if (model.organizations.isEmpty) { - navigationServiceLocal.showTalawaErrorDialog( - "No organizations found Please contact your admin", - MessageType.error, - ); - } - }); - return Scrollbar( - thumbVisibility: true, - interactive: true, - controller: model.allOrgController, - // Listview is a scrollable list of widgets arranged linearly. - child: ListView.separated( - controller: model.allOrgController, - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: result.isLoading - ? model.organizations.length + 1 - : model.organizations.length, - itemBuilder: (BuildContext context, int index) { - // If the index is at the end of the list! - if (index == model.organizations.length) { - // return the ListTile showing the loading icon! - return ListTile( - title: Center( - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ), - ); - } - // If the index is at the 3rd last item in the organization list. - if (index == model.organizations.length - 3) { - // return VisibilityDetector and fetch more items in the list to show up! - return VisibilityDetector( - key: const Key('OrgSelItem'), - onVisibilityChanged: (VisibilityInfo info) { - if (info.visibleFraction > 0) { - model.fetchMoreHelper( - fetchMore!, - model.organizations, - ); - } - }, - child: CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => Navigator.pushNamed( - context, - '/OrganisationInfoScreen', - arguments: model.organizations[index], - ), - key: Key('OrgSelItem$index'), - ), - ); - } - // return CustomeTile that shows a particular item in the list! - return CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => Navigator.pushNamed( - context, - '/OrganisationInfoScreen', - arguments: model.organizations[index], - ), - key: Key('OrgSelItem$index'), - ); - }, - separatorBuilder: (BuildContext context, int index) { - return Container(); - }, - ), - ); - } - return Container(); - }, - ), - ); - } -} diff --git a/lib/widgets/organization_search_list.dart b/lib/widgets/organization_search_list.dart deleted file mode 100644 index 7b432b1bd..000000000 --- a/lib/widgets/organization_search_list.dart +++ /dev/null @@ -1,135 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/widgets/custom_list_tile.dart'; -import 'package:visibility_detector/visibility_detector.dart'; - -/// This class returns the widget that shows all the matching orgs searched in the search bar. -class OrganizationSearchList extends StatelessWidget { - const OrganizationSearchList({required this.model, super.key}); - - /// model constructor for the selectOrganisation widget. - final SelectOrganizationViewModel model; - - @override - Widget build(BuildContext context) { - return GraphQLProvider( - client: ValueNotifier(graphqlConfig.authClient()), - child: Query( - options: QueryOptions( - document: gql(Queries().fetchJoinInOrgByName), - variables: { - 'nameStartsWith': model.searchController.text, - // fetch 30 items only, will fetch more when scrolling index is at the 3rd last item! - 'first': 30, - 'skip': 0, - }, - ), - builder: ( - QueryResult result, { - Future Function(FetchMoreOptions)? fetchMore, - Future Function()? refetch, - }) { - // checking for any errors, if true fetch again! - if (result.hasException) { - final isException = databaseFunctions.encounteredExceptionOrError( - result.exception!, - showSnackBar: false, - ); - if (isException!) { - refetch!(); - } else { - refetch!(); - } - } else { - // If the result is still loading! - if (!result.isLoading) { - model.organizations = OrgInfo().fromJsonToList( - result.data!['organizationsConnection'], - ); - } - // return the Scroll bar widget for scrolling down the organizations. - return Scrollbar( - thumbVisibility: true, - interactive: true, - controller: model.controller, - // Listview is a scrollable list of widgets arranged linearly. - child: ListView.separated( - controller: model.controller, - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: result.isLoading - ? model.organizations.length + 1 - : model.organizations.length, - itemBuilder: (BuildContext context, int index) { - // If the index is at the end of the list! - if (index == model.organizations.length) { - // return the ListTile showing the loading icon! - return ListTile( - title: Center( - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ), - ); - } - // If the index is at the 3rd last item in the organization list. - if (index == model.organizations.length - 3) { - // return VisibilityDetector and fetch more items in the list to show up! - return VisibilityDetector( - key: const Key('OrgSelItem'), - onVisibilityChanged: (VisibilityInfo info) { - if (info.visibleFraction > 0) { - print(model.organizations.length); - model.fetchMoreHelper( - fetchMore!, - model.organizations, - ); - print(model.organizations.length); - } - }, - child: CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ), - ); - } - // return CustomeTile that shows a particular item in the list! - return CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ); - }, - separatorBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.only( - left: SizeConfig.screenWidth! * 0.2, - right: 12, - ), - child: const Divider( - color: Color(0xFFE5E5E5), - thickness: 0.5, - ), - ); - }, - ), - ); - } - return Container(); - }, - ), - ); - } -} diff --git a/lib/widgets/pinned_carousel_widget.dart b/lib/widgets/pinned_carousel_widget.dart deleted file mode 100644 index b4f5bcf58..000000000 --- a/lib/widgets/pinned_carousel_widget.dart +++ /dev/null @@ -1,185 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// Generates carousel for pinned posts on the Home Screen's top. -/// -/// Tapping on a post will redirect you to the respective post screen. -class PinnedPostCarousel extends StatelessWidget { - const PinnedPostCarousel({ - super.key, - required this.pinnedPosts, - required this.navigateToPinnedPostPage, - required this.navigateToIndividualPostPage, - }); - - /// List of 'Post' objects representing pinned posts. - final List pinnedPosts; - - /// Function that navigates to a page displaying pinned posts. - final Function() navigateToPinnedPostPage; - - /// Function that navigates to an individual post page. - final Function navigateToIndividualPostPage; - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Container( - height: 220, - color: - Theme.of(context).colorScheme.primaryContainer.withOpacity(0.5), - child: CustomCarouselScroller( - pinnedPosts: pinnedPosts, - key: const Key('Carousel'), - navigateToIndividualPostPage: navigateToIndividualPostPage, - ), - ), - // Gesture Detector in Flutter is used to detect - // the user's gestures on the application. - // It is a non-visual widget. Inside the gesture detector, - // another widget is placed and - // the gesture detector will capture all these - // events (gestures) and execute the tasks accordingly. - GestureDetector( - onTap: () => navigateToPinnedPostPage(), - child: Container( - height: 50, - width: SizeConfig.screenWidth, - padding: const EdgeInsets.symmetric(horizontal: 16.0), - color: Theme.of(context).colorScheme.primaryContainer, - child: Row( - children: [ - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.only(right: 8.0), - child: Icon( - Icons.article, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - Expanded( - flex: 8, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("See all Pinned news"), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - const Expanded(flex: 1, child: Icon(Icons.arrow_forward_ios)), - ], - ), - ), - ), - ], - ); - } -} - -/// Class defining custom carousel. -@visibleForTesting -class CustomCarouselScroller extends StatefulWidget { - const CustomCarouselScroller({ - super.key, - required this.pinnedPosts, - required this.navigateToIndividualPostPage, - }); - - /// List of pinnedposts. - final List pinnedPosts; - - /// function to navigate to IndividualPostPage. - final Function navigateToIndividualPostPage; - - @override - CustomCarouselScrollerState createState() => CustomCarouselScrollerState(); -} - -@visibleForTesting -class CustomCarouselScrollerState extends State { - /// pageController. - final PageController controller = PageController(initialPage: 0); - - /// pageIndex. - int pindex = 0; - - @override - Widget build(BuildContext context) { - // Stack is a widget that positions its - // children relative to the edges of its box. - return Stack( - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - ListTile( - leading: const CircleAvatar( - radius: 15.0, - backgroundColor: Color(0xff737373), - ), - title: Text( - "${widget.pinnedPosts[pindex].creator!.firstName} ${widget.pinnedPosts[pindex].creator!.lastName}", - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Text( - widget.pinnedPosts[pindex].description!.length > 90 - ? "${widget.pinnedPosts[pindex].description!.substring(0, 90)}..." - : widget.pinnedPosts[pindex].description!, - style: Theme.of(context) - .textTheme - .bodyLarge! - .copyWith(color: const Color(0xFF737373)), - ), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16.0, - vertical: 10.0, - ), - child: Row( - children: [ - for (int i = 0; i < 4; i++) - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 5.0), - child: Divider( - thickness: 3.0, - color: pindex == i - ? Theme.of(context).colorScheme.primary - : Colors.grey, - ), - ), - ), - ], - ), - ), - ], - ), - ), - PageView( - scrollDirection: Axis.horizontal, - controller: controller, - onPageChanged: (index) { - setState(() { - pindex = index; - }); - }, - children: List.generate( - widget.pinnedPosts.length, - (index) => Container(), - ), - ), - ], - ); - } -} diff --git a/lib/widgets/pinned_post.dart b/lib/widgets/pinned_post.dart deleted file mode 100644 index 878df09a9..000000000 --- a/lib/widgets/pinned_post.dart +++ /dev/null @@ -1,141 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart'; - -/// PinnedPost returns a widget that shows the pinned post. -class PinnedPost extends StatelessWidget { - const PinnedPost({super.key, required this.pinnedPost, required this.model}); - - /// contains the pinned post. - final List pinnedPost; - - /// gives access mainScreenViewModel's attributes. - final MainScreenViewModel model; - - @override - Widget build(BuildContext context) { - return Container( - key: const Key('hello'), - child: pinnedPost.isNotEmpty - ? SizedBox( - height: SizeConfig.screenHeight! * 0.28, - child: ListView.builder( - itemCount: pinnedPost.length, - shrinkWrap: true, - scrollDirection: Axis.horizontal, - itemBuilder: (context, index) => Padding( - key: index == 0 ? model.keySHPinnedPost : const Key(''), - padding: const EdgeInsets.only( - left: 10, - top: 7, - ), - child: GestureDetector( - onTap: () { - // final Map arg = {"index": "$index","post": pinnedPost}; - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => PinnedPostScreen( - post: toMap(index), - ), - ), - ); - }, - child: SizedBox( - width: SizeConfig.screenWidth! / 4.1, - child: Column( - children: [ - Expanded( - child: CachedNetworkImage( - cacheKey: pinnedPost[index].sId, - imageUrl: - (pinnedPost[index].imageUrl ?? '').isEmpty - ? 'placeHolderUrl' - : pinnedPost[index].imageUrl!, - errorWidget: (context, url, error) { - print(error); - return const SizedBox( - child: Center( - child: CircularProgressIndicator(), - ), - ); - }, - height: SizeConfig.screenHeight! * 0.15, - fit: BoxFit.cover, - ), - ), - const SizedBox(height: 5), - Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.all(1.0), - child: Text( - getTimeDifferenceInHours( - pinnedPost[index] - .createdAt! - .toIso8601String(), - ), - style: const TextStyle( - color: Colors.grey, - fontWeight: FontWeight.w200, - ), - ), - ), - ), - ], - ), - const SizedBox(height: 5), - Text( - pinnedPost[index].description!, - maxLines: 2, - overflow: TextOverflow.ellipsis, - ), - ], - ), - ), - ), - ), - ), - ) - : Container( - key: const Key('hi'), - ), - ); - } - - /// Function returns the time difference in hours. - /// - /// **params**: - /// * `createdAtString`: the time from post - /// - /// **returns**: - /// * `String`: return a string - String getTimeDifferenceInHours(String createdAtString) { - final DateTime now = DateTime.now(); - final DateTime createdAt = DateTime.parse(createdAtString).toLocal(); - final Duration difference = now.difference(createdAt); - final int hours = difference.inHours; - return '$hours hrs'; - } - - /// converts post to mapped string. - /// - /// **params**: - /// * `index`: current index - /// - /// **returns**: - /// * `Map`: returns a map - Map toMap(int index) { - return { - 'title': this.pinnedPost[index].description!, - 'postId': this.pinnedPost[index].sId, - 'imageUrl': this.pinnedPost[index].imageUrl!, - 'time': getTimeDifferenceInHours( - this.pinnedPost[index].createdAt!.toIso8601String(), - ), - }; - } -} diff --git a/lib/widgets/post_container.dart b/lib/widgets/post_container.dart deleted file mode 100644 index 0ac3defa3..000000000 --- a/lib/widgets/post_container.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:math'; - -import 'package:flutter/material.dart'; -import 'package:visibility_detector/visibility_detector.dart'; - -/// the widget which contains the actual image. -/// -class PostContainer extends StatefulWidget { - const PostContainer({ - super.key, - required this.photoUrl, - }); - - /// image url. - /// - final String? photoUrl; - - @override - PostContainerState createState() => PostContainerState(); -} - -class PostContainerState extends State { - /// video was removed for mvp. - /// - bool startedPlaying = false; - - /// same as above. - /// - bool inView = true; - - @override - void initState() { - super.initState(); - } - - @override - void dispose() { - controller.dispose(); - super.dispose(); - } - - /// manage the carousel. - /// - - final PageController controller = PageController(initialPage: 0); - - /// to manage the image index in carousel. - /// - int pindex = 0; - @override - Widget build(BuildContext context) { - return VisibilityDetector( - key: Key(Random().nextInt(1000).toString()), - onVisibilityChanged: (info) { - info.visibleFraction > 0.5 ? inView = true : inView = false; - if (mounted) setState(() {}); - }, - child: Center( - child: widget.photoUrl != null - ? Image.network(widget.photoUrl!) - : Container(), - ), - ); - } -} diff --git a/lib/widgets/post_detailed_page.dart b/lib/widgets/post_detailed_page.dart deleted file mode 100644 index 42dbf68eb..000000000 --- a/lib/widgets/post_detailed_page.dart +++ /dev/null @@ -1,118 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// This class sets up the post page. -/// -/// To implement the "show less" and "show more" functions for the text, -/// we divide the text into two parts: firstHalf and secondHalf. A flag is set to -/// track whether to display either the firstHalf or both(the entire text). -class DescriptionTextWidget extends StatefulWidget { - const DescriptionTextWidget({required this.text}); - - /// actual description to be displayed. - final String text; - - @override - _DescriptionTextWidgetState createState() => _DescriptionTextWidgetState(); -} - -class _DescriptionTextWidgetState extends State { - /// before clicking show more. - late String firstHalf; - - /// After the show more. - late String secondHalf; - - /// tags in the post. - late String tag; - - /// setting the flag to true initially (is show more turned on). - bool flag = true; - - @override - void initState() { - super.initState(); - // If the length of the text is greater than 150, we divide it into two parts: firstHalf and secondHalf. - if (widget.text.length > 150) { - firstHalf = widget.text.substring(0, 150); - secondHalf = widget.text.substring(150, widget.text.length); - tag = ""; - } else { - if (widget.text.split("#").length == 2) { - firstHalf = widget.text.split("#")[0]; - tag = widget.text.split("#")[1]; - } else if (widget.text.split("#").length == 1) { - firstHalf = widget.text; - tag = ""; - } else { - firstHalf = widget.text.split("#")[0]; - tag = ""; - } - secondHalf = ""; - } - } - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 5.0), - child: secondHalf.isEmpty - ? Column( - children: [ - Text( - firstHalf, - textAlign: TextAlign.justify, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - fontFamily: 'open-sans', - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - tag != "" - ? Text( - "# $tag", - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - fontFamily: 'open-sans', - color: Theme.of(context).colorScheme.onSecondary, - ), - ) - : Container(), - ], - ) - : Column( - children: [ - Text( - // If the flag is true, we only display the firstHalf. - // If it is false, we display the entire text. - flag ? ("$firstHalf...") : (firstHalf + secondHalf), - textAlign: TextAlign.justify, - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - fontFamily: 'open-sans', - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - InkWell( - onTap: () { - setState(() { - //Setting the flag to false on tapping the "show more" text. - flag = !flag; - }); - }, - child: Text( - flag - ? AppLocalizations.of(context)! - .strictTranslate("show more") - : AppLocalizations.of(context)! - .strictTranslate("show less"), - style: const TextStyle(color: Colors.blue), - ), - ), - ], - ), - ], - ), - ); - } -} diff --git a/lib/widgets/post_list_widget.dart b/lib/widgets/post_list_widget.dart deleted file mode 100644 index 2364e16a6..000000000 --- a/lib/widgets/post_list_widget.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/widgets/post_widget.dart'; - -/// This class receives a List of all the Post widgets and returns a ListView. -class PostListWidget extends StatelessWidget { - const PostListWidget({ - super.key, - required this.posts, - this.function, - this.deletePost, - }); - - /// list of all the post. - final List posts; - - /// This function is passed for the handling the action to be performed when the comment button is clicked. - final Function(Post)? function; - - /// Function the deleting the post. - final Function(Post)? deletePost; - - @override - Widget build(BuildContext context) { - return ListView.builder( - scrollDirection: Axis.vertical, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: posts.length, - itemBuilder: (BuildContext context, int index) { - return Column( - children: [ - NewsPost( - key: ValueKey(posts[index].sId), - post: posts[index], - function: function, - deletePost: deletePost, - ), - ], - ); - }, - ); - } -} diff --git a/lib/widgets/post_modal.dart b/lib/widgets/post_modal.dart deleted file mode 100644 index d26a8c226..000000000 --- a/lib/widgets/post_modal.dart +++ /dev/null @@ -1,112 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; - -/// To add options to the bottom nav bar, increase the height too. -class PostBottomModal extends StatelessWidget { - const PostBottomModal({ - super.key, - this.function, - this.deletePost, - required this.post, - }); - - /// This function is passed for the handling the action to be performed when the comment button is clicked. - final Function(Post)? function; - - /// To delete the post if user can (only work if the post is made by the user). - final Function(Post)? deletePost; - - /// Post object containing all the data related to the post. - final Post post; - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Center( - child: Row( - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Icon( - Icons.report_gmailerrorred_outlined, - color: Theme.of(context).colorScheme.tertiary, - ), - ), - TextButton( - key: const Key('reportPost'), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - 'Your Report has been sent to the Admin', - MessageType.info, - ); - Navigator.pop(context); - }, - child: Text( - 'Report the post to the Admin', - style: Theme.of(context).textTheme.bodyLarge, - ), - ), - ], - ), - ), - Center( - child: Row( - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Icon( - Icons.delete, - color: Theme.of(context).colorScheme.tertiary, - ), - ), - TextButton( - key: const Key('deletePost'), - onPressed: () { - deletePost?.call(post); - showDialog( - context: context, - builder: (BuildContext builder) { - return AlertDialog( - title: const Text("Warning"), - content: const Text( - "Do you really want to delete the post?", - ), - actions: [ - TextButton( - key: const Key('alert_dialog_yes_btn'), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - 'Post was deleted if you had the rights!', - MessageType.info, - ); - Navigator.pop(context); - }, - child: const Text("Yes"), - ), - TextButton( - key: const Key('alert_dialog_no_btn'), - onPressed: () { - Navigator.pop(context); - }, - child: const Text("No"), - ), - ], - ); - }, - ); - }, - child: Text( - 'The post was deleted', - style: Theme.of(context).textTheme.bodyLarge, - ), - ), - ], - ), - ), - ], - ); - } -} diff --git a/lib/widgets/post_widget.dart b/lib/widgets/post_widget.dart deleted file mode 100644 index 807f49037..000000000 --- a/lib/widgets/post_widget.dart +++ /dev/null @@ -1,213 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/multi_reaction.dart'; -import 'package:talawa/widgets/post_container.dart'; -import 'package:talawa/widgets/post_detailed_page.dart'; -import 'package:talawa/widgets/post_modal.dart'; - -/// Stateless class to show the fetched post. -class NewsPost extends StatelessWidget { - const NewsPost({ - super.key, - required this.post, - this.function, - this.deletePost, - }); - - /// Post object containing all the data related to the post. - final Post post; - - /// This function is passed for the handling the action to be performed when the comment button is clicked. - final Function(Post)? function; - - /// To delete the post if user can (only work if the post is made by the user). - final Function(Post)? deletePost; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - surfaceTintColor: Theme.of(context).colorScheme.secondaryContainer, - color: Theme.of(context).colorScheme.tertiaryContainer, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ListTile( - leading: CustomAvatar( - isImageNull: post.creator!.image == null, - firstAlphabet: - post.creator!.firstName!.substring(0, 1).toUpperCase(), - imageUrl: - "${'${GraphqlConfig.orgURI}'.replaceFirst('/graphql', '')}/${post.creator!.image}", - fontSize: 20, - ), - title: Text( - "${post.creator!.firstName} ${post.creator!.lastName}", - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - trailing: IconButton( - key: const Key('reportButton'), - onPressed: () => showModalBottomSheet( - context: context, - builder: (BuildContext context1) => Container( - key: const Key('reportPost'), - height: 120, - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - borderRadius: const BorderRadius.only( - topRight: Radius.circular(16), - topLeft: Radius.circular(16), - ), - ), - child: PostBottomModal( - post: post, - deletePost: deletePost, - function: function, - ), - ), - ), - icon: Icon( - Icons.report_gmailerrorred_outlined, - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - ), - post.imageUrl != null - ? Container( - key: const Key('postParentContainer'), - height: 340, - color: Colors.white, - child: PostContainer(photoUrl: post.imageUrl), - ) - : DescriptionTextWidget(text: post.description!), - BaseView( - onModelReady: (model) { - model.initialize(post.likedBy ?? [], post.sId); - }, - builder: (context, model, child) => Column( - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 5), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - child: Column( - children: [ - MultiReactButton( - toggle: () => model.toggleIsLiked(), - ), - Text( - "${model.likedBy.length}", - style: TextStyle( - fontFamily: 'open-sans', - color: - Theme.of(context).colorScheme.onSecondary, - ), - ), - ], - ), - ), - Container( - child: Column( - children: [ - GestureDetector( - key: const Key('commentButton'), - onTap: () => function?.call(post), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - height: (MediaQuery.sizeOf(context).width / - 392) * - 35, - width: (MediaQuery.sizeOf(context).width / - 392) * - 35, - child: SvgPicture.asset( - 'assets/images/comment.svg', - ), - ), - ), - ), - Text( - "${post.comments!.length}", - style: TextStyle( - color: - Theme.of(context).colorScheme.onSecondary, - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(120, 0, 0, 0), - child: Text( - ' ${post.getPostCreatedDuration()}', - style: TextStyle( - color: Theme.of(context).colorScheme.onSecondary, - fontSize: 12, - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 0, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GestureDetector( - onTap: () => function?.call(post), - child: Text( - "${AppLocalizations.of(context)!.strictTranslate("Liked")} by ...", - style: TextStyle( - fontFamily: 'open-sans', - color: Theme.of(context).colorScheme.onSecondary, - ), - ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 6, - vertical: 5, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - if (post.imageUrl != null) - DescriptionTextWidget(text: post.description!), - ], - ), - ), - ], - ), - ), - ], - ), - ), - ); - } -} diff --git a/lib/widgets/raised_round_edge_button.dart b/lib/widgets/raised_round_edge_button.dart deleted file mode 100644 index 0ce734066..000000000 --- a/lib/widgets/raised_round_edge_button.dart +++ /dev/null @@ -1,99 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; - -/// This class returns a widget for a raised rounded button, -/// for example: login button in login screen. -class RaisedRoundedButton extends StatefulWidget { - // variables - const RaisedRoundedButton({ - required Key key, - required this.buttonLabel, - required this.backgroundColor, - required this.textColor, - required this.onTap, - this.height, - this.width, - this.showArrow = false, - }) : super(key: key); - final Color backgroundColor; - final Color textColor; - final bool showArrow; - final String buttonLabel; - final Function() onTap; - final double? height; - final double? width; - - @override - _RaisedRoundedButtonState createState() => _RaisedRoundedButtonState(); -} - -class _RaisedRoundedButtonState extends State { - @override - Widget build(BuildContext context) { - // Gesture Detector in Flutter is used to detect the user's gestures on the application. - return GestureDetector( - onTap: () { - widget.onTap(); - }, - child: Container( - width: widget.width ?? SizeConfig.screenWidth! * 0.94, - height: widget.height ?? SizeConfig.screenHeight! * 0.07, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: widget.backgroundColor, - ), - // If the widget.showArrow is true then show Row wrapper else FittedBox wrapper. - // By default it is false. The showArrow are true for some buttons like login & Sign up button in - // Organization URL Screen. - child: widget.showArrow - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - //unused - const Expanded( - child: Icon( - Icons.arrow_forward, - color: Colors.transparent, - ), - ), - Expanded( - child: Text( - widget.buttonLabel, - textAlign: TextAlign.center, - style: TextStyle( - fontWeight: FontWeight.w400, - fontSize: 18, - color: widget.textColor, - ), - ), - ), - Expanded( - child: Icon( - Icons.arrow_forward, - color: widget.textColor, - ), - ), - ], - ) - : FittedBox( - // FittedBox restricts its child widgets from growing its size beyond a certain limit - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 5.0), - child: Text( - widget.buttonLabel, - style: TextStyle( - fontWeight: FontWeight.w400, - fontSize: 18, - color: widget.textColor, - ), - ), - ), - ), - ), - ); - } -} diff --git a/lib/widgets/recurrence_dialog.dart b/lib/widgets/recurrence_dialog.dart deleted file mode 100644 index 2d35c103c..000000000 --- a/lib/widgets/recurrence_dialog.dart +++ /dev/null @@ -1,201 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; - -/// Dialog for showing recurrence options. -class ShowRecurrenceDialog extends StatefulWidget { - const ShowRecurrenceDialog({ - super.key, - required this.model, - }); - - /// Instance of create event view model. - final CreateEventViewModel model; - - @override - State createState() => _ShowRecurrenceDialogState(); -} - -class _ShowRecurrenceDialogState extends State { - @override - Widget build(BuildContext context) { - return Dialog( - child: SizedBox( - height: SizeConfig.screenHeight! * 0.74, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - radioButtonFixText( - "Does not repeat", - // coverage:ignore-start - (value) => updateModel(value!, false, null, null, null), - // coverage:ignore-end - ), - radioButton( - Frequency.daily, - widget.model.interval, - widget.model.count, - null, - null, - ), - radioButton(Frequency.weekly, widget.model.interval, - widget.model.count, null, [ - RecurrenceUtils - .weekDays[widget.model.recurrenceStartDate.weekday - 1], - ]), - radioButton( - Frequency.monthly, - widget.model.interval, - widget.model.count, - null, - null, - ), - if (RecurrenceUtils.getWeekDayOccurenceInMonth( - widget.model.recurrenceStartDate, - ) != - 5) - radioButton( - Frequency.monthly, - widget.model.interval, - widget.model.count, - RecurrenceUtils.getWeekDayOccurenceInMonth( - widget.model.recurrenceStartDate, - ), - [ - RecurrenceUtils - .weekDays[widget.model.recurrenceStartDate.weekday - 1], - ]), - if (RecurrenceUtils.isLastOccurenceOfWeekDay( - widget.model.recurrenceStartDate, - )) - radioButton(Frequency.monthly, widget.model.interval, - widget.model.count, -1, [ - RecurrenceUtils - .weekDays[widget.model.recurrenceStartDate.weekday], - ]), - radioButton( - Frequency.yearly, - widget.model.interval, - widget.model.count, - null, - null, - ), - radioButtonFixText( - 'Monday to Friday ${widget.model.recurrenceEndDate != null ? "until ${DateFormat('MMMM d, y').format(widget.model.recurrenceEndDate!)}" : ""}', - (value) => updateModel(value!, true, Frequency.weekly, null, { - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - }), - ), - radioButtonFixText("Custom...", (value) async { - widget.model.isRecurring = true; - await navigationService.pushScreen( - Routes.customRecurrencePage, - arguments: widget.model, - ); - setState(() { - Navigator.pop(context, widget.model.recurrenceLabel); - }); - }), - ], - ), - ), - ); - } - - /// custom radio list tile. - /// - /// **params**: - /// * `frequency`: represent the frequency of the event. - /// * `interval`: represent the interval of the event. - /// * `count`: represent the count of the event. - /// * `weekDayOccurenceInMonth`: represent the week day occurence in month. - /// * `weekDays`: represent the list of week days. - /// - /// **returns**: - /// * `RadioListTile`: returns radio list tile. - RadioListTile radioButton( - String frequency, - int? interval, - int? count, - int? weekDayOccurenceInMonth, - List? weekDays, - ) { - final String text = RecurrenceUtils.getRecurrenceRuleText( - frequency, - weekDays?.toSet(), - interval, - count, - weekDayOccurenceInMonth, - widget.model.recurrenceStartDate, - widget.model.recurrenceEndDate, - ); - return RadioListTile( - title: Text(text), - value: text, - groupValue: widget.model.recurrenceLabel, - onChanged: (value) => updateModel( - value!, - true, - frequency, - weekDayOccurenceInMonth, - weekDays?.map((day) => day.toUpperCase()).toSet(), - ), - ); - } - - /// custom radio list tile with fixed the text. - /// - /// **params**: - /// * `text`: represents the text of the radio button. - /// * `onChanged`: represents the function to be called when the radio button is pressed. - /// - /// **returns**: - /// * `RadioListTile`: returns radio list tile. - RadioListTile radioButtonFixText( - String text, - Function(String?)? onChanged, - ) { - return RadioListTile( - title: Text(text), - value: text, - groupValue: widget.model.recurrenceLabel, - onChanged: onChanged, - ); - } - - /// Returns the updated model with the selected recurrence options. - /// - /// **params**: - /// * `value`: represents text of the selected recurrence option. - /// * `isRecurring`: represent whether the event is recurring or not. - /// * `frequency`: represent the frequency of the event. - /// * `weekDayOccurenceInMonth`: represent the week day occurence in month. - /// * `weekDays`: represent the list of week days. - /// - /// **returns**: - /// None - void updateModel( - String value, - bool isRecurring, - String? frequency, - int? weekDayOccurenceInMonth, - Set? weekDays, - ) { - setState(() { - widget.model.isRecurring = isRecurring; - widget.model.recurrenceLabel = value; - widget.model.weekDays = weekDays ?? {}; - widget.model.weekDayOccurenceInMonth = weekDayOccurenceInMonth; - widget.model.frequency = frequency ?? Frequency.weekly; - Navigator.pop(context, value); - }); - } -} diff --git a/lib/widgets/rich_text.dart b/lib/widgets/rich_text.dart deleted file mode 100644 index 673634696..000000000 --- a/lib/widgets/rich_text.dart +++ /dev/null @@ -1,32 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/cupertino.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// CustomRichText class returns a widget for customized rich/bold text. -/// These rich text are being used in form for changing the password. -class CustomRichText extends StatelessWidget { - const CustomRichText({required Key key, required this.words}) - : super(key: key); - final List> words; - @override - Widget build(BuildContext context) { - return RichText( - textAlign: TextAlign.start, - text: TextSpan( - text: - "${AppLocalizations.of(context)!.strictTranslate(words[0]['text'].toString().trim())} ", - style: words[0]['textStyle'] as TextStyle, - children: List.generate( - words.length - 1, - (index) => TextSpan( - text: - "${AppLocalizations.of(context)!.strictTranslate(words[index + 1]['text'].toString().trim())} ", - style: words[index + 1]['textStyle'] as TextStyle, - ), - ), - ), - ); - } -} diff --git a/lib/widgets/signup_progress_indicator.dart b/lib/widgets/signup_progress_indicator.dart deleted file mode 100644 index 63322830e..000000000 --- a/lib/widgets/signup_progress_indicator.dart +++ /dev/null @@ -1,74 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:timelines/timelines.dart'; - -/// This class returns a widget for showing the -/// progress indicator/flow while Signing Up/ Registration. -class SignupProgressIndicator extends StatelessWidget { - SignupProgressIndicator({required Key key, required this.currentPageIndex}) - : super(key: key); - - final int currentPageIndex; - final List progressLabel = [ - 'Select\nOrganization', - 'Enter Details', - 'Final', - ]; - - @override - Widget build(BuildContext context) { - return Container( - alignment: Alignment.center, - height: SizeConfig.screenHeight! * 0.15, - child: Timeline.tileBuilder( - scrollDirection: Axis.horizontal, - physics: const NeverScrollableScrollPhysics(), - padding: EdgeInsets.zero, - builder: TimelineTileBuilder.connected( - contentsBuilder: (_, index) => Text( - AppLocalizations.of(context)!.strictTranslate(progressLabel[index]), - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - // If the flow index is greater than currentPageIndex then - // show green(visited) color else show fade(not visited) color. - color: index <= currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - ), - textAlign: TextAlign.center, - ), - connectorBuilder: (_, index, __) { - return SolidLineConnector( - space: 30, - // If the flow index is greater than currentPageIndex then - // show green(visited) color else show fade(not visited) color. - color: index < currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - ); - }, - indicatorBuilder: (_, index) { - return DotIndicator( - size: 25, - color: index <= currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - child: index < currentPageIndex - ? const Icon( - Icons.done, - color: Colors.white, - size: 20, - ) - : const SizedBox(), - ); - }, - itemExtentBuilder: (_, __) => MediaQuery.of(context).size.width / 3, - itemCount: 3, - ), - ), - ); - } -} diff --git a/lib/widgets/talawa_error_dialog.dart b/lib/widgets/talawa_error_dialog.dart deleted file mode 100644 index f7a252467..000000000 --- a/lib/widgets/talawa_error_dialog.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; - -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; - -/// Common Error Dialog box for the whole talawa app. -class TalawaErrorDialog extends StatelessWidget { - const TalawaErrorDialog( - this.errorMessage, { - super.key, - required this.messageType, - }); - - /// error message for the talawaDialogBox. - final String errorMessage; - - /// enum to what is the type of error message. - final MessageType messageType; - - @override - Widget build(BuildContext context) { - final screenWidth = MediaQuery.of(context).size.width; - return SizedBox( - width: screenWidth * 0.8, // Adjust the width based on screen size - child: AlertDialog( - content: SizedBox( - width: SizeConfig.screenWidth! * 0.65, - height: SizeConfig.screenWidth! * 0.38, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SvgPicture.asset( - messageType == MessageType.error - ? 'assets/images/Vector.svg' - : messageType == MessageType.warning - ? 'assets/images/Vector.svg' - : messageType == MessageType.info - ? 'assets/icons/Info.svg' - : 'assets/images/Vector.svg', - colorFilter: ColorFilter.mode( - messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - BlendMode.srcIn, - ), - ), - const SizedBox( - height: 5, - ), - Text( - messageType == MessageType.error - ? AppLocalizations.of(context)!.strictTranslate('Error') - : messageType == MessageType.warning - ? AppLocalizations.of(context)! - .strictTranslate('Warning') - : messageType == MessageType.info - ? AppLocalizations.of(context)! - .strictTranslate('Information') - : AppLocalizations.of(context)! - .strictTranslate('Error'), - style: TextStyle( - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - fontSize: screenWidth * - 0.04, // Adjust the font size based on screen width - ), - textAlign: TextAlign.center, - ), - const SizedBox( - height: 5, - ), - Expanded( - child: AutoSizeText( - AppLocalizations.of(context)!.strictTranslate(errorMessage), - style: const TextStyle(fontSize: 16), - maxLines: 3, - ), - ), - const SizedBox( - height: 19, - ), - ], - ), - ), - actions: [ - TextButton( - style: TextButton.styleFrom( - backgroundColor: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.red - : messageType == MessageType.info - ? Colors.black26 - : Colors.red, - foregroundColor: Colors.red, - ), - child: Text( - messageType == MessageType.error - ? 'Dismiss' - : messageType == MessageType.warning - ? 'Dismiss' - : messageType == MessageType.info - ? 'Close' - : 'Dismiss', - style: const TextStyle(color: Color.fromRGBO(202, 202, 202, 1)), - ), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - ], - ), - ); - } -} diff --git a/lib/widgets/talawa_error_snackbar.dart b/lib/widgets/talawa_error_snackbar.dart deleted file mode 100644 index 2a981b110..000000000 --- a/lib/widgets/talawa_error_snackbar.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:talawa/enums/enums.dart'; - -import 'package:talawa/utils/app_localization.dart'; - -/// Common Error Snack Bar for the whole talawa app. -class TalawaErrorSnackBar extends StatelessWidget { - const TalawaErrorSnackBar({ - super.key, - required this.duration, - required this.errorMessage, - required this.messageType, - }); - - /// Duration the snack bar is visible. - final Duration duration; - - /// error message for the talawa Snack Bar. - final String errorMessage; - - /// enum for the type of error message. - final MessageType messageType; - @override - Widget build(BuildContext context) { - final ScrollController scrollController = ScrollController(); - - WidgetsBinding.instance.addPostFrameCallback((_) { - scrollController.animateTo( - scrollController.position.maxScrollExtent, - duration: duration, - curve: Curves.linear, - ); - }); - - return Row( - children: [ - Container( - width: 20, - height: 80, - decoration: BoxDecoration( - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - ), - ), - const SizedBox( - width: 10, - ), - Icon( - messageType == MessageType.error - ? Icons.error - : messageType == MessageType.warning - ? Icons.error - : messageType == MessageType.info - ? Icons.info_outline - : Icons.error, - // Icons.error, - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - size: 35, - ), - const SizedBox( - width: 10, - ), - Expanded( - flex: 1, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - controller: scrollController, - child: Text( - AppLocalizations.of(context)!.strictTranslate(errorMessage), - style: const TextStyle(color: Colors.white), - ), - ), - ), - ], - ); - } -} diff --git a/lib/widgets/theme_switch.dart b/lib/widgets/theme_switch.dart deleted file mode 100644 index 4df56a15c..000000000 --- a/lib/widgets/theme_switch.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; - -/// This class enables theme switch. -class ChangeThemeTile extends StatelessWidget { - const ChangeThemeTile({super.key}); - - @override - Widget build(BuildContext context) { - final themeProvider = Provider.of(context); - return ListTile( - key: const Key('ThemeSwitch'), - contentPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.blockSizeHorizontal!, - ), - title: Text(AppLocalizations.of(context)!.strictTranslate("Dark Theme")), - trailing: Switch( - key: const Key('ToggleTheme'), - autofocus: true, - activeColor: Theme.of(context).colorScheme.primary, - value: themeProvider.isdarkTheme, - onChanged: (value) { - final provider = Provider.of(context, listen: false); - provider.switchTheme(isOn: value); - }, - ), - ); - } -} diff --git a/lib/widgets/video_widget.dart b/lib/widgets/video_widget.dart deleted file mode 100644 index 688f7c766..000000000 --- a/lib/widgets/video_widget.dart +++ /dev/null @@ -1,114 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:video_player/video_player.dart'; - -/// currently not part of MVP. -/// -/// This class creates a video widget. -class VideoWidget extends StatefulWidget { - const VideoWidget({super.key, required this.url, required this.play}); - - /// a_line_ending_with_end_punctuation. - /// - /// more_info_if_required - final String url; - - /// Is the video playing. - /// - final bool play; - - @override - _VideoWidgetState createState() => _VideoWidgetState(); -} - -class _VideoWidgetState extends State { - //Controls a platform video player, and provides updates when the state is changing - late VideoPlayerController _controller; - late Future _initializeVideoPlayerFuture; - //setting the mute variable to true initially - /// Is the Video muted. - /// - bool mute = true; - - @override - void initState() { - super.initState(); - //Constructs a [VideoPlayerController] playing a video from obtained from the network. - _controller = VideoPlayerController.networkUrl(widget.url as Uri); - _initializeVideoPlayerFuture = _controller.initialize().then((_) { - // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed. - if (widget.play) { - _controller.play(); - _controller.setLooping(true); - _controller.setVolume(0.0); - } - setState(() {}); - }); - } - - @override - void didUpdateWidget(VideoWidget oldWidget) { - if (oldWidget.play != widget.play) { - if (widget.play) { - _controller.play(); - _controller.setLooping(true); - } else { - _controller.pause(); - } - } - super.didUpdateWidget(oldWidget); - } - - @override - void dispose() { - _controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - /// This function returns a GestureDetector for controlling the volume. - ///On tap, the volume is either set to 1 or 0 depending on the previous value. - return FutureBuilder( - future: _initializeVideoPlayerFuture, - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done) { - return GestureDetector( - onTap: () { - _controller - .setVolume(_controller.value.volume == 1.0 ? 0.0 : 1.0); - setState(() { - if (_controller.value.volume == 1.0) { - // Set mute variable as false when the volume is increased to 1. - mute = false; - } else { - mute = true; - } - }); - }, - child: Stack( - children: [ - VideoPlayer(_controller), - Positioned( - bottom: 10.0, - right: 10.0, - child: CircleAvatar( - backgroundColor: Colors.black, - radius: 15.0, - child: Icon( - mute ? Icons.volume_off : Icons.volume_up, - color: Colors.white, - ), - ), - ), - ], - ), - ); - } else { - return const Center( - child: CircularProgressIndicator(), - ); - } - }, - ); - } -} diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 4088cf5d8..000000000 --- a/pubspec.lock +++ /dev/null @@ -1,1718 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - analyzer_plugin: - dependency: transitive - description: - name: analyzer_plugin - sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" - url: "https://pub.dev" - source: hosted - version: "0.11.3" - args: - dependency: transitive - description: - name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - auto_size_text: - dependency: "direct main" - description: - name: auto_size_text - sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_config: - dependency: transitive - description: - name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 - url: "https://pub.dev" - source: hosted - version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" - url: "https://pub.dev" - source: hosted - version: "2.4.9" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 - url: "https://pub.dev" - source: hosted - version: "7.2.11" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 - url: "https://pub.dev" - source: hosted - version: "8.8.1" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" - url: "https://pub.dev" - source: hosted - version: "3.3.1" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - ci: - dependency: transitive - description: - name: ci - sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 - url: "https://pub.dev" - source: hosted - version: "0.4.1" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0" - url: "https://pub.dev" - source: hosted - version: "5.0.2" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a - url: "https://pub.dev" - source: hosted - version: "1.2.4" - contained_tab_bar_view: - dependency: "direct main" - description: - name: contained_tab_bar_view - sha256: "87e35f47992764e45ab6205493f2f90c1e3fac4ad84f2b2285b73414727b756e" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - container_tab_indicator: - dependency: transitive - description: - name: container_tab_indicator - sha256: b0bdd73bb495c31c5711cefa363511b10bb3ebcfc007b603a2599401ebe6b2d9 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" - url: "https://pub.dev" - source: hosted - version: "0.3.4+1" - crypto: - dependency: "direct main" - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - csslib: - dependency: transitive - description: - name: csslib - sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - currency_picker: - dependency: "direct main" - description: - name: currency_picker - sha256: c9ab5c0da8ae4dcc6421064dccde072b44f5b44914691b967ea4cf45a266a658 - url: "https://pub.dev" - source: hosted - version: "2.0.21" - custom_lint: - dependency: "direct dev" - description: - name: custom_lint - sha256: dfb893ff17c83cf08676c6b64df11d3e53d80590978d7c1fb242afff3ba6dedb - url: "https://pub.dev" - source: hosted - version: "0.5.8" - custom_lint_builder: - dependency: transitive - description: - name: custom_lint_builder - sha256: "8df6634b38a36a6c6cb74a9c0eb02e9ba0b0ab89b29e38e6daa86e8ed2c6288d" - url: "https://pub.dev" - source: hosted - version: "0.5.8" - custom_lint_core: - dependency: transitive - description: - name: custom_lint_core - sha256: "2b235be098d157e244f18ea905a15a18c16a205e30553888fac6544bbf52f03f" - url: "https://pub.dev" - source: hosted - version: "0.5.8" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - dbus: - dependency: transitive - description: - name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" - url: "https://pub.dev" - source: hosted - version: "0.7.10" - device_info_plus: - dependency: transitive - description: - name: device_info_plus - sha256: "093b02a284b4969bb641a6236bbb8e626e4035c6ec9e30c20b65d505c24b3080" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - device_info_plus_platform_interface: - dependency: transitive - description: - name: device_info_plus_platform_interface - sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64 - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fake_async: - dependency: "direct dev" - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - file: - dependency: "direct main" - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" - url: "https://pub.dev" - source: hosted - version: "0.9.2+1" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 - url: "https://pub.dev" - source: hosted - version: "0.9.3+3" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.dev" - source: hosted - version: "2.6.2" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 - url: "https://pub.dev" - source: hosted - version: "0.9.3+1" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_braintree: - dependency: "direct main" - description: - name: flutter_braintree - sha256: d58a91212c21f97aa1e8fcbcbb394744eb5997c7ba929274daf3cf903ceef8db - url: "https://pub.dev" - source: hosted - version: "4.0.0" - flutter_cache_manager: - dependency: "direct main" - description: - name: flutter_cache_manager - sha256: "395d6b7831f21f3b989ebedbb785545932adb9afe2622c1ffacf7f4b53a7e544" - url: "https://pub.dev" - source: hosted - version: "3.3.2" - flutter_hooks: - dependency: transitive - description: - name: flutter_hooks - sha256: "09f64db63fee3b2ab8b9038a1346be7d8986977fae3fec601275bf32455ccfc0" - url: "https://pub.dev" - source: hosted - version: "0.20.4" - flutter_local_notifications: - dependency: "direct main" - description: - name: flutter_local_notifications - sha256: "8cdc719114ab1c86c64bb7a86d3a679674c3637edd229e3a994797d4a1504ce4" - url: "https://pub.dev" - source: hosted - version: "17.1.0" - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" - url: "https://pub.dev" - source: hosted - version: "4.0.0+1" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - sha256: "340abf67df238f7f0ef58f4a26d2a83e1ab74c77ab03cd2b2d5018ac64db30b7" - url: "https://pub.dev" - source: hosted - version: "7.1.0" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da - url: "https://pub.dev" - source: hosted - version: "2.0.17" - flutter_reaction_button: - dependency: "direct main" - description: - name: flutter_reaction_button - sha256: "9fe67f6e6dac65c5ee864c2ab03550b25e7fc82b9a800c885a87f85abe2c03c6" - url: "https://pub.dev" - source: hosted - version: "3.0.0+3" - flutter_speed_dial: - dependency: "direct main" - description: - name: flutter_speed_dial - sha256: "698a037274a66dbae8697c265440e6acb6ab6cae9ac5f95c749e7944d8f28d41" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - flutter_svg: - dependency: "direct main" - description: - name: flutter_svg - sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" - url: "https://pub.dev" - source: hosted - version: "2.0.10+1" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - font_awesome_flutter: - dependency: "direct main" - description: - name: font_awesome_flutter - sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f" - url: "https://pub.dev" - source: hosted - version: "10.7.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d - url: "https://pub.dev" - source: hosted - version: "2.4.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - get_it: - dependency: "direct main" - description: - name: get_it - sha256: ae30b28cc73053f79fd46b15f430db16cae22a0554e6cd25333c840b310b0270 - url: "https://pub.dev" - source: hosted - version: "7.6.9" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - gql: - dependency: transitive - description: - name: gql - sha256: "0bdd22c3a9464970ae590559e4f0568769b219dda9e94cb10c4cf999a3e263f7" - url: "https://pub.dev" - source: hosted - version: "1.0.1-alpha+1705114622973" - gql_dedupe_link: - dependency: transitive - description: - name: gql_dedupe_link - sha256: e5359dd0c7a38f95e2b12f6ab305989a4e30028e4032825c8e9f610150999c69 - url: "https://pub.dev" - source: hosted - version: "2.0.4-alpha+1705114623057" - gql_error_link: - dependency: transitive - description: - name: gql_error_link - sha256: "93901458f3c050e33386dedb0ca7173e08cebd7078e4e0deca4bf23ab7a71f63" - url: "https://pub.dev" - source: hosted - version: "1.0.0+1" - gql_exec: - dependency: transitive - description: - name: gql_exec - sha256: "394944626fae900f1d34343ecf2d62e44eb984826189c8979d305f0ae5846e38" - url: "https://pub.dev" - source: hosted - version: "1.1.1-alpha+1699813812660" - gql_http_link: - dependency: transitive - description: - name: gql_http_link - sha256: "1f922eed1b7078fdbfd602187663026f9f659fe9a9499e2207b5d5e01617f658" - url: "https://pub.dev" - source: hosted - version: "1.0.1+1" - gql_link: - dependency: transitive - description: - name: gql_link - sha256: "63941513a688d856546f0c3218e7ad94d47fc6e04662dcdb06de92a4cde2d7db" - url: "https://pub.dev" - source: hosted - version: "1.0.1-alpha+1705114622987" - gql_transform_link: - dependency: transitive - description: - name: gql_transform_link - sha256: "0645fdd874ca1be695fd327271fdfb24c0cd6fa40774a64b946062f321a59709" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - graphql: - dependency: transitive - description: - name: graphql - sha256: d066e53446166c12537458386b507f7426f2b8801ebafc184576aab3cbc64d56 - url: "https://pub.dev" - source: hosted - version: "5.2.0-beta.7" - graphql_flutter: - dependency: "direct main" - description: - name: graphql_flutter - sha256: "39b5e830bc654ab02c5b776c31675841d1a8c95840fdd284efba713b1d47e65d" - url: "https://pub.dev" - source: hosted - version: "5.2.0-beta.6" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - hive: - dependency: "direct main" - description: - name: hive - sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" - url: "https://pub.dev" - source: hosted - version: "2.2.3" - hive_generator: - dependency: "direct dev" - description: - name: hive_generator - sha256: "06cb8f58ace74de61f63500564931f9505368f45f98958bd7a6c35ba24159db4" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - hotreloader: - dependency: transitive - description: - name: hotreloader - sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e - url: "https://pub.dev" - source: hosted - version: "4.2.0" - html: - dependency: transitive - description: - name: html - sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.dev" - source: hosted - version: "0.15.4" - http: - dependency: "direct main" - description: - name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - image_cropper: - dependency: "direct main" - description: - name: image_cropper - sha256: f4bad5ed2dfff5a7ce0dfbad545b46a945c702bb6182a921488ef01ba7693111 - url: "https://pub.dev" - source: hosted - version: "5.0.1" - image_cropper_for_web: - dependency: transitive - description: - name: image_cropper_for_web - sha256: "865d798b5c9d826f1185b32e5d0018c4183ddb77b7b82a931e1a06aa3b74974e" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - image_cropper_platform_interface: - dependency: transitive - description: - name: image_cropper_platform_interface - sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e - url: "https://pub.dev" - source: hosted - version: "5.0.0" - image_picker: - dependency: "direct main" - description: - name: image_picker - sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" - url: "https://pub.dev" - source: hosted - version: "1.0.7" - image_picker_android: - dependency: transitive - description: - name: image_picker_android - sha256: "39f2bfe497e495450c81abcd44b62f56c2a36a37a175da7d137b4454977b51b1" - url: "https://pub.dev" - source: hosted - version: "0.8.9+3" - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 - url: "https://pub.dev" - source: hosted - version: "3.0.2" - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 - url: "https://pub.dev" - source: hosted - version: "0.8.9+1" - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b - url: "https://pub.dev" - source: hosted - version: "2.9.3" - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.dev" - source: hosted - version: "0.2.1+1" - intl: - dependency: "direct main" - description: - name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" - url: "https://pub.dev" - source: hosted - version: "0.18.1" - io: - dependency: transitive - description: - name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - json_annotation: - dependency: "direct main" - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - json_serializable: - dependency: "direct dev" - description: - name: json_serializable - sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b - url: "https://pub.dev" - source: hosted - version: "6.8.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - lint: - dependency: "direct dev" - description: - name: lint - sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - meta: - dependency: transitive - description: - name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e - url: "https://pub.dev" - source: hosted - version: "1.0.4" - mockito: - dependency: "direct main" - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - mocktail: - dependency: transitive - description: - name: mocktail - sha256: f603ebd85a576e5914870b02e5839fc5d0243b867bf710651cf239a28ebb365e - url: "https://pub.dev" - source: hosted - version: "1.0.2" - mocktail_image_network: - dependency: "direct dev" - description: - name: mocktail_image_network - sha256: "498726e24dd0aaf84329e6acf027549b292e9b782126f78406c25eeee70a0b9b" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - network_image_mock: - dependency: "direct main" - description: - name: network_image_mock - sha256: "855cdd01d42440e0cffee0d6c2370909fc31b3bcba308a59829f24f64be42db7" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - normalize: - dependency: transitive - description: - name: normalize - sha256: "8a60e37de5b608eeaf9b839273370c71ebba445e9f73b08eee7725e0d92dbc43" - url: "https://pub.dev" - source: hosted - version: "0.8.2+1" - octo_image: - dependency: transitive - description: - name: octo_image - sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.dev" - source: hosted - version: "1.0.1" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 - url: "https://pub.dev" - source: hosted - version: "2.1.3" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" - url: "https://pub.dev" - source: hosted - version: "11.3.1" - permission_handler_android: - dependency: transitive - description: - name: permission_handler_android - sha256: "758284a0976772f9c744d6384fc5dc4834aa61e3f7aa40492927f244767374eb" - url: "https://pub.dev" - source: hosted - version: "12.0.3" - permission_handler_apple: - dependency: transitive - description: - name: permission_handler_apple - sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 - url: "https://pub.dev" - source: hosted - version: "9.4.4" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" - url: "https://pub.dev" - source: hosted - version: "0.1.1" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - sha256: "23dfba8447c076ab5be3dee9ceb66aad345c4a648f0cac292c77b1eb0e800b78" - url: "https://pub.dev" - source: hosted - version: "4.2.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.dev" - source: hosted - version: "0.2.1" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - platform: - dependency: transitive - description: - name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" - url: "https://pub.dev" - source: hosted - version: "3.1.4" - plugin_platform_interface: - dependency: "direct main" - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pointycastle: - dependency: "direct main" - description: - name: pointycastle - sha256: "79fbafed02cfdbe85ef3fd06c7f4bc2cbcba0177e61b765264853d4253b21744" - url: "https://pub.dev" - source: hosted - version: "3.9.0" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" - provider: - dependency: "direct main" - description: - name: provider - sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c - url: "https://pub.dev" - source: hosted - version: "6.1.2" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 - url: "https://pub.dev" - source: hosted - version: "1.2.3" - qr: - dependency: transitive - description: - name: qr - sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - qr_code_scanner: - dependency: "direct main" - description: - name: qr_code_scanner - sha256: f23b68d893505a424f0bd2e324ebea71ed88465d572d26bb8d2e78a4749591fd - url: "https://pub.dev" - source: hosted - version: "1.0.1" - qr_flutter: - dependency: "direct main" - description: - name: qr_flutter - sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097" - url: "https://pub.dev" - source: hosted - version: "4.1.0" - quick_actions: - dependency: "direct main" - description: - name: quick_actions - sha256: b17da113df7a7005977f64adfa58ccc49c829d3ccc6e8e770079a8c7fbf2da9e - url: "https://pub.dev" - source: hosted - version: "1.0.7" - quick_actions_android: - dependency: transitive - description: - name: quick_actions_android - sha256: adb42f20a46b22fee4caef421c00ff9eb209f9d441010bc5d6e9afa824288cf6 - url: "https://pub.dev" - source: hosted - version: "1.0.10" - quick_actions_ios: - dependency: transitive - description: - name: quick_actions_ios - sha256: dd355101d0e9fef6176fa2ae2bf738bcafa8df09a1e17057fcb56475719793de - url: "https://pub.dev" - source: hosted - version: "1.0.10" - quick_actions_platform_interface: - dependency: transitive - description: - name: quick_actions_platform_interface - sha256: "81a1e40c519bb3cacfec38b3008b13cef665a75bd270da94f40091b57f0f9236" - url: "https://pub.dev" - source: hosted - version: "1.0.6" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.dev" - source: hosted - version: "0.27.7" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 - url: "https://pub.dev" - source: hosted - version: "2.2.3" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" - url: "https://pub.dev" - source: hosted - version: "2.3.5" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" - shimmer: - dependency: "direct main" - description: - name: shimmer - sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - social_share: - dependency: "direct main" - description: - name: social_share - sha256: eb19a0f6f5a29c7bb71e5bb1991145eb52472184363b6e2da70695befd8be041 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_helper: - dependency: transitive - description: - name: source_helper - sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" - url: "https://pub.dev" - source: hosted - version: "1.3.4" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - sha256: "5ce2e1a15e822c3b4bfb5400455775e421da7098eed8adc8f26298ada7c9308c" - url: "https://pub.dev" - source: hosted - version: "2.3.3" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6 - url: "https://pub.dev" - source: hosted - version: "2.5.0+2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - syncfusion_flutter_calendar: - dependency: "direct main" - description: - name: syncfusion_flutter_calendar - sha256: e06aff78dd2040a3239d59b8543020afd4bfcfde5d66d028d6ac04a84ed0e4b0 - url: "https://pub.dev" - source: hosted - version: "25.1.41" - syncfusion_flutter_core: - dependency: transitive - description: - name: syncfusion_flutter_core - sha256: "708425f534ef04253334763c8b75acc79eaec2d9b325bcd862575ea0a2207d87" - url: "https://pub.dev" - source: hosted - version: "25.1.41" - syncfusion_flutter_datepicker: - dependency: "direct main" - description: - name: syncfusion_flutter_datepicker - sha256: b6abaa80a6dff16552a5b7a7b3879094d285ae5a49a33466d4d1a62041e250dd - url: "https://pub.dev" - source: hosted - version: "25.1.41" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" - url: "https://pub.dev" - source: hosted - version: "3.1.0+1" - talawa_lint: - dependency: "direct dev" - description: - path: talawa_lint - relative: true - source: path - version: "0.0.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - timelines: - dependency: "direct main" - description: - name: timelines - sha256: "40214f5ab772ff45459cb8c15e5f60505a6828af0c0eb1eec6f29ed911a4c1c5" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - timezone: - dependency: transitive - description: - name: timezone - sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" - url: "https://pub.dev" - source: hosted - version: "0.9.2" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - tutorial_coach_mark: - dependency: "direct main" - description: - name: tutorial_coach_mark - sha256: "1f1fd234790afb929dec7391a4d90aa54ffe8c8e4d278d9283df8e3f5ac5d63e" - url: "https://pub.dev" - source: hosted - version: "1.2.11" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - uni_links: - dependency: "direct main" - description: - name: uni_links - sha256: "051098acfc9e26a9fde03b487bef5d3d228ca8f67693480c6f33fd4fbb8e2b6e" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - uni_links_platform_interface: - dependency: "direct main" - description: - name: uni_links_platform_interface - sha256: "929cf1a71b59e3b7c2d8a2605a9cf7e0b125b13bc858e55083d88c62722d4507" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - uni_links_web: - dependency: transitive - description: - name: uni_links_web - sha256: "7539db908e25f67de2438e33cc1020b30ab94e66720b5677ba6763b25f6394df" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" - url: "https://pub.dev" - source: hosted - version: "6.2.6" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" - url: "https://pub.dev" - source: hosted - version: "6.2.2" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" - url: "https://pub.dev" - source: hosted - version: "6.2.4" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 - url: "https://pub.dev" - source: hosted - version: "3.1.1" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 - url: "https://pub.dev" - source: hosted - version: "3.1.0" - url_launcher_platform_interface: - dependency: "direct dev" - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 - url: "https://pub.dev" - source: hosted - version: "3.1.1" - uuid: - dependency: transitive - description: - name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" - url: "https://pub.dev" - source: hosted - version: "4.4.0" - vector_graphics: - dependency: transitive - description: - name: vector_graphics - sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" - url: "https://pub.dev" - source: hosted - version: "1.1.11+1" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da - url: "https://pub.dev" - source: hosted - version: "1.1.11+1" - vector_graphics_compiler: - dependency: transitive - description: - name: vector_graphics_compiler - sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" - url: "https://pub.dev" - source: hosted - version: "1.1.11+1" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vibration: - dependency: "direct main" - description: - name: vibration - sha256: "778ace40e84852e6cf6017cdbaf6790a837d73ff3dd50b27da9ac232a19de8fc" - url: "https://pub.dev" - source: hosted - version: "1.8.4" - video_player: - dependency: "direct main" - description: - name: video_player - sha256: db6a72d8f4fd155d0189845678f55ad2fd54b02c10dcafd11c068dbb631286c0 - url: "https://pub.dev" - source: hosted - version: "2.8.6" - video_player_android: - dependency: transitive - description: - name: video_player_android - sha256: "7f8f25d7ad56819a82b2948357f3c3af071f6a678db33833b26ec36bbc221316" - url: "https://pub.dev" - source: hosted - version: "2.4.11" - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - sha256: "309e3962795e761be010869bae65c0b0e45b5230c5cee1bec72197ca7db040ed" - url: "https://pub.dev" - source: hosted - version: "2.5.6" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6" - url: "https://pub.dev" - source: hosted - version: "6.2.2" - video_player_web: - dependency: transitive - description: - name: video_player_web - sha256: "34beb3a07d4331a24f7e7b2f75b8e2b103289038e07e65529699a671b6a6e2cb" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - visibility_detector: - dependency: "direct main" - description: - name: visibility_detector - sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 - url: "https://pub.dev" - source: hosted - version: "0.4.0+2" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.dev" - source: hosted - version: "13.0.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - win32: - dependency: transitive - description: - name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" - url: "https://pub.dev" - source: hosted - version: "5.2.0" - win32_registry: - dependency: transitive - description: - name: win32_registry - sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.3.0 <3.19.0" - flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index dd898036e..000000000 --- a/pubspec.yaml +++ /dev/null @@ -1,116 +0,0 @@ -name: talawa -description: Welcome to the Talawa Project for the Palisadoes Foundation - Community Organization Management Software. - -publish_to: "none" # Remove this line if you wish to publish to pub.dev - -version: 1.0.0+1 - -homepage: https://github.com/PalisadoesFoundation/talawa - -repository: https://github.com/PalisadoesFoundation/talawa -environment: - sdk: ">=2.17.0 <3.19.0" - -dependencies: - ############# Remove ########### - # _fe_analyzer_shared: ^60.0.0 - # analyzer: - # analyzer_plugin: - ################################ - - auto_size_text: ^3.0.0 - cached_network_image: ^3.3.1 - connectivity_plus: ^5.0.2 - contained_tab_bar_view: ^0.8.0 - - crypto: ^3.0.3 - cupertino_icons: ^1.0.8 - currency_picker: ^2.0.21 - ############## Remove ########## - - # custom_lint_builder: ^0.4.0 - ################################ - file: ^7.0.0 - - flutter: - sdk: flutter - flutter_braintree: ^4.0.0 - flutter_cache_manager: ^3.3.2 - flutter_local_notifications: ^17.1.0 - flutter_localizations: - sdk: flutter - flutter_reaction_button: ^3.0.0+3 - flutter_speed_dial: ^7.0.0 - flutter_svg: ^2.0.10+1 - font_awesome_flutter: ^10.7.0 - get_it: ^7.6.9 - graphql_flutter: ^5.1.2 - hive: ^2.2.3 - http: ^1.2.1 - image_cropper: ^5.0.1 - image_picker: ^1.1.0 - intl: ^0.18.1 - json_annotation: ^4.7.0 - mockito: ^5.4.4 - network_image_mock: ^2.1.1 - path_provider: ^2.1.3 - permission_handler: 11.3.1 - plugin_platform_interface: ^2.1.7 - pointycastle: ^3.9.0 - provider: ^6.1.2 - qr_code_scanner: ^1.0.0 - qr_flutter: 4.1.0 - quick_actions: ^1.0.6 - shared_preferences: ^2.2.3 - shimmer: ^3.0.0 - social_share: ^2.2.1 - syncfusion_flutter_calendar: ^25.1.41 - syncfusion_flutter_datepicker: ^25.1.39 - timelines: ^0.1.0 - tutorial_coach_mark: ^1.2.11 - uni_links: ^0.5.1 - uni_links_platform_interface: ^1.0.0 - url_launcher: ^6.2.6 - vibration: ^1.8.4 - video_player: ^2.8.6 - visibility_detector: ^0.4.0+2 - -dev_dependencies: - build_runner: ^2.4.9 - custom_lint: 0.5.8 - fake_async: ^1.3.1 - flutter_test: - sdk: flutter - hive_generator: ^2.0.1 - - json_serializable: ^6.8.0 - lint: ^2.3.0 - - mocktail_image_network: ^1.1.0 - talawa_lint: - path: talawa_lint/ - - url_launcher_platform_interface: 2.3.2 - -flutter: - uses-material-design: true - assets: - - assets/images/ - - assets/icons/ - - lang/ - fonts: - - family: product-sans - fonts: - - asset: assets/fonts/ProductSans-Regular.ttf - - asset: assets/fonts/ProductSans-Medium.ttf - weight: 600 - - asset: assets/fonts/ProductSans-Bold.ttf - weight: 800 - - family: open-sans - fonts: - - asset: assets/fonts/OpenSans-Regular.ttf - - asset: assets/fonts/OpenSans-SemiBold.ttf - weight: 600 - - asset: assets/fonts/OpenSans-Bold.ttf - weight: 800 diff --git a/talawa-mobile-docs/TalawaAdmin.md b/talawa-mobile-docs/TalawaAdmin.md deleted file mode 100644 index 757a15bf4..000000000 --- a/talawa-mobile-docs/TalawaAdmin.md +++ /dev/null @@ -1 +0,0 @@ -file will be overwritten. \ No newline at end of file diff --git a/talawa-mobile-docs/__404error.md b/talawa-mobile-docs/__404error.md deleted file mode 100644 index 0fedbdcfd..000000000 --- a/talawa-mobile-docs/__404error.md +++ /dev/null @@ -1,6 +0,0 @@ -# 404 - -Oops, something's gone wrong :-( - -You've tried to visit a page that doesn't exist. Luckily this site has other -[pages](index.md). diff --git a/talawa-mobile-docs/apptheme/AppTheme-class.md b/talawa-mobile-docs/apptheme/AppTheme-class.md deleted file mode 100644 index 517eacb47..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme-class.md +++ /dev/null @@ -1,347 +0,0 @@ - - - -# AppTheme class - - - - - - - - - - - - - -## Constructors - -[AppTheme](../apptheme/AppTheme/AppTheme.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [bodyText1](../apptheme/AppTheme/bodyText1.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [bodyText2](../apptheme/AppTheme/bodyText2.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [bodyText3](../apptheme/AppTheme/bodyText3.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [button](../apptheme/AppTheme/button.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline1](../apptheme/AppTheme/headline1.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline2](../apptheme/AppTheme/headline2.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline3](../apptheme/AppTheme/headline3.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline4](../apptheme/AppTheme/headline4.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline5](../apptheme/AppTheme/headline5.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [headline6](../apptheme/AppTheme/headline6.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [overline](../apptheme/AppTheme/overline.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [subtitle1](../apptheme/AppTheme/subtitle1.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [subtitle2](../apptheme/AppTheme/subtitle2.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - -##### [title](../apptheme/AppTheme/title.md) ↔ [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) - - - - -_read / write_ - - - - - - - - -## Constants - -##### [blackPrimary](../apptheme/AppTheme/blackPrimary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [blackSecondary](../apptheme/AppTheme/blackSecondary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [blackTertiary](../apptheme/AppTheme/blackTertiary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [blue](../apptheme/AppTheme/blue-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [green](../apptheme/AppTheme/green-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [grey](../apptheme/AppTheme/grey-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [lightGrey](../apptheme/AppTheme/lightGrey-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [primary](../apptheme/AppTheme/primary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [red](../apptheme/AppTheme/red-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [secondary](../apptheme/AppTheme/secondary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [shadow](../apptheme/AppTheme/shadow-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [tertiary](../apptheme/AppTheme/tertiary-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [white](../apptheme/AppTheme/white-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - -##### [yellow](../apptheme/AppTheme/yellow-constant.md) const [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/AppTheme.md b/talawa-mobile-docs/apptheme/AppTheme/AppTheme.md deleted file mode 100644 index 4e8b04727..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/AppTheme.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# AppTheme constructor - - - - - - - -AppTheme() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/blackPrimary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/blackPrimary-constant.md deleted file mode 100644 index 19a5f3026..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/blackPrimary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blackPrimary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const blackPrimary - - - - - - - - -## Implementation - -```dart -static const Color blackPrimary = Color(0xFF3E3E3E); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/blackSecondary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/blackSecondary-constant.md deleted file mode 100644 index df8a790e6..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/blackSecondary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blackSecondary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const blackSecondary - - - - - - - - -## Implementation - -```dart -static const Color blackSecondary = Color(0xFF636363); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/blackTertiary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/blackTertiary-constant.md deleted file mode 100644 index 67e61ccee..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/blackTertiary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blackTertiary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const blackTertiary - - - - - - - - -## Implementation - -```dart -static const Color blackTertiary = Color(0xFFAEAEAE); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/blue-constant.md b/talawa-mobile-docs/apptheme/AppTheme/blue-constant.md deleted file mode 100644 index 3b83107b8..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/blue-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blue constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const blue - - - - - - - - -## Implementation - -```dart -static const Color blue = Color(0xFF2196F3); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/bodyText1.md b/talawa-mobile-docs/apptheme/AppTheme/bodyText1.md deleted file mode 100644 index 1319aea9a..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/bodyText1.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# bodyText1 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) bodyText1 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle bodyText1 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/bodyText2.md b/talawa-mobile-docs/apptheme/AppTheme/bodyText2.md deleted file mode 100644 index 447738bd6..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/bodyText2.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# bodyText2 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) bodyText2 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle bodyText2 = const TextStyle( - fontSize: 8, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/bodyText3.md b/talawa-mobile-docs/apptheme/AppTheme/bodyText3.md deleted file mode 100644 index f5b908271..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/bodyText3.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# bodyText3 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) bodyText3 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle bodyText3 = const TextStyle( - fontSize: 10, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/button.md b/talawa-mobile-docs/apptheme/AppTheme/button.md deleted file mode 100644 index 21a7c237e..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/button.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# button property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) button - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle button = const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: primary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/green-constant.md b/talawa-mobile-docs/apptheme/AppTheme/green-constant.md deleted file mode 100644 index c5b360b4e..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/green-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# green constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const green - - - - - - - - -## Implementation - -```dart -static const Color green = Color(0xFF2ACC00); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/grey-constant.md b/talawa-mobile-docs/apptheme/AppTheme/grey-constant.md deleted file mode 100644 index 782396813..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/grey-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# grey constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const grey - - - - - - - - -## Implementation - -```dart -static const Color grey = Color(0xFFD2D2D2); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline1.md b/talawa-mobile-docs/apptheme/AppTheme/headline1.md deleted file mode 100644 index 37af53874..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline1.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline1 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline1 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline1 = const TextStyle( - fontSize: 24, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline2.md b/talawa-mobile-docs/apptheme/AppTheme/headline2.md deleted file mode 100644 index 66e649046..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline2.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline2 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline2 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline2 = const TextStyle( - fontSize: 18, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline3.md b/talawa-mobile-docs/apptheme/AppTheme/headline3.md deleted file mode 100644 index c76880892..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline3.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline3 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline3 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline3 = const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline4.md b/talawa-mobile-docs/apptheme/AppTheme/headline4.md deleted file mode 100644 index 003c36282..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline4.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline4 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline4 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline4 = const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline5.md b/talawa-mobile-docs/apptheme/AppTheme/headline5.md deleted file mode 100644 index ef7db3e53..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline5.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline5 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline5 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline5 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/headline6.md b/talawa-mobile-docs/apptheme/AppTheme/headline6.md deleted file mode 100644 index 2928a6d0f..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/headline6.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# headline6 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) headline6 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle headline6 = const TextStyle( - fontSize: 10, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/lightGrey-constant.md b/talawa-mobile-docs/apptheme/AppTheme/lightGrey-constant.md deleted file mode 100644 index 2eb849d4d..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/lightGrey-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# lightGrey constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const lightGrey - - - - - - - - -## Implementation - -```dart -static const Color lightGrey = Color(0xFFECECEC); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/overline.md b/talawa-mobile-docs/apptheme/AppTheme/overline.md deleted file mode 100644 index 8e21f35cf..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/overline.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# overline property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) overline - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle overline = const TextStyle( - fontSize: 6, - fontWeight: FontWeight.w400, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/primary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/primary-constant.md deleted file mode 100644 index 038d130c5..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/primary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# primary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const primary - - - - - - - - -## Implementation - -```dart -static const Color primary = Color(0xFFFFC107); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/red-constant.md b/talawa-mobile-docs/apptheme/AppTheme/red-constant.md deleted file mode 100644 index 372e2ea7c..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/red-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# red constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const red - - - - - - - - -## Implementation - -```dart -static const Color red = Color(0xFFEB5757); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/secondary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/secondary-constant.md deleted file mode 100644 index 1f36d46c9..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/secondary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# secondary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const secondary - - - - - - - - -## Implementation - -```dart -static const Color secondary = Color(0xFF795548); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/shadow-constant.md b/talawa-mobile-docs/apptheme/AppTheme/shadow-constant.md deleted file mode 100644 index 28767a56f..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/shadow-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# shadow constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const shadow - - - - - - - - -## Implementation - -```dart -static const Color shadow = Color(0x408E8E8E); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/subtitle1.md b/talawa-mobile-docs/apptheme/AppTheme/subtitle1.md deleted file mode 100644 index 7aa5a306d..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/subtitle1.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# subtitle1 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) subtitle1 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle subtitle1 = const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/subtitle2.md b/talawa-mobile-docs/apptheme/AppTheme/subtitle2.md deleted file mode 100644 index cb3d34fad..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/subtitle2.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# subtitle2 property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) subtitle2 - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle subtitle2 = const TextStyle( - fontSize: 12, - fontWeight: FontWeight.w500, - color: blackSecondary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/tertiary-constant.md b/talawa-mobile-docs/apptheme/AppTheme/tertiary-constant.md deleted file mode 100644 index 020d4a1c3..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/tertiary-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# tertiary constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const tertiary - - - - - - - - -## Implementation - -```dart -static const Color tertiary = Color(0xFFA16938); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/title.md b/talawa-mobile-docs/apptheme/AppTheme/title.md deleted file mode 100644 index 21377023f..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/title.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# title property - - - - - - - -[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) title - -_read / write_ - - - - - - -## Implementation - -```dart -static TextStyle title = const TextStyle( - fontSize: 20, - fontWeight: FontWeight.w600, - color: blackPrimary, - fontFamily: 'OpenSans', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/white-constant.md b/talawa-mobile-docs/apptheme/AppTheme/white-constant.md deleted file mode 100644 index 40ddf426a..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/white-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# white constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const white - - - - - - - - -## Implementation - -```dart -static const Color white = Color(0xFFFFFFFF); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/AppTheme/yellow-constant.md b/talawa-mobile-docs/apptheme/AppTheme/yellow-constant.md deleted file mode 100644 index 19aedaf74..000000000 --- a/talawa-mobile-docs/apptheme/AppTheme/yellow-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# yellow constant - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const yellow - - - - - - - - -## Implementation - -```dart -static const Color yellow = Color(0xffF6BA18); -``` - - - - - - - diff --git a/talawa-mobile-docs/apptheme/apptheme-library.md b/talawa-mobile-docs/apptheme/apptheme-library.md deleted file mode 100644 index c5efcd9ed..000000000 --- a/talawa-mobile-docs/apptheme/apptheme-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# apptheme library - - - - - - - - - - - -## Classes - -##### [AppTheme](../apptheme/AppTheme-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/categories.json b/talawa-mobile-docs/categories.json deleted file mode 100644 index fe51488c7..000000000 --- a/talawa-mobile-docs/categories.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/talawa-mobile-docs/constants_constants/constants_constants-library.md b/talawa-mobile-docs/constants_constants/constants_constants-library.md deleted file mode 100644 index 0281be84b..000000000 --- a/talawa-mobile-docs/constants_constants/constants_constants-library.md +++ /dev/null @@ -1,49 +0,0 @@ - - - - -# constants library - - - - - - - - - - - - - - - -## Properties - -##### [languages](../constants_constants/languages.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Language](../models_language_language_model/Language-class.md)> - - - -This file contains the prototypes of all the languages available and supported currencies. -_read / write_ - - - -##### [supportedCurrencies](../constants_constants/supportedCurrencies.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> - - - - -_read / write_ - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_constants/languages.md b/talawa-mobile-docs/constants_constants/languages.md deleted file mode 100644 index eb6fa823a..000000000 --- a/talawa-mobile-docs/constants_constants/languages.md +++ /dev/null @@ -1,85 +0,0 @@ - - - -# languages top-level property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Language](../models_language_language_model/Language-class.md)> languages - -_read / write_ - - - -

This file contains the prototypes of all the languages available and supported currencies.

- - - -## Implementation - -```dart -List languages = [ - Language( - countryCode: 'US', - langCode: 'en', - langName: 'English', - langSample: 'Welcome User', - ), - Language( - countryCode: 'IN', - langCode: 'hi', - langName: 'हिंदी', - langSample: 'स्वागत उपयोगकर्ता', - ), - Language( - countryCode: 'CN', - langCode: 'zh', - langName: '中国人', - langSample: '欢迎用户', - ), - Language( - countryCode: 'FR', - langCode: 'fr', - langName: 'français', - langSample: 'Bienvenue utilisateur', - ), - Language( - countryCode: 'ES', - langCode: 'es', - langName: 'Española', - langSample: 'Bienvenida usuario', - ), - Language( - countryCode: 'JP', - langCode: 'ja', - langName: '日本', - langSample: 'ようこそユーザー', - ), - Language( - countryCode: 'GE', - langCode: 'de', - langName: 'Deutsch', - langSample: 'Willkommen Benutzer', - ), - Language( - countryCode: 'PE', - langCode: 'pt', - langName: 'português', - langSample: 'Bem-vindo, usuário', - ), -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/constants_constants/supportedCurrencies.md b/talawa-mobile-docs/constants_constants/supportedCurrencies.md deleted file mode 100644 index 74339c224..000000000 --- a/talawa-mobile-docs/constants_constants/supportedCurrencies.md +++ /dev/null @@ -1,129 +0,0 @@ - - - -# supportedCurrencies top-level property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> supportedCurrencies - -_read / write_ - - - - - - -## Implementation - -```dart -List supportedCurrencies = [ - 'AED', - 'ALL', - 'AMD', - 'ARS', - 'AUD', - 'AWG', - 'BBD', - 'BDT', - 'BMD', - 'BND', - 'BOB', - 'BSD', - 'BWP', - 'BZD', - 'CAD', - 'CHF', - 'CNY', - 'COP', - 'CRC', - 'CUP', - 'CZK', - 'DKK', - 'DOP', - 'DZD', - 'EGP', - 'ETB', - 'EUR', - 'FJD', - 'GBP', - 'GHS', - 'GIP', - 'GMD', - 'GTQ', - 'GYD', - 'HKD', - 'HNL', - 'HRK', - 'HTG', - 'HUF', - 'IDR', - 'ILS', - 'INR', - 'JMD', - 'KES', - 'KGS', - 'KHR', - 'KYD', - 'KZT', - 'LAK', - 'LBP', - 'LKR', - 'LRD', - 'LSL', - 'MAD', - 'MDL', - 'MKD', - 'MMK', - 'MNT', - 'MOP', - 'MUR', - 'MVR', - 'MWK', - 'MXN', - 'MYR', - 'NAD', - 'NGN', - 'NIO', - 'NOK', - 'NPR', - 'NZD', - 'PEN', - 'PGK', - 'PHP', - 'PKR', - 'QAR', - 'RUB', - 'SAR', - 'SCR', - 'SEK', - 'SGD', - 'SLL', - 'SOS', - 'SSP', - 'SVC', - 'SZL', - 'THB', - 'TTD', - 'TZS', - 'USD', - 'UYU', - 'UZS', - 'YER', - 'ZAR', -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/constants_custom_theme/TalawaTheme-class.md b/talawa-mobile-docs/constants_custom_theme/TalawaTheme-class.md deleted file mode 100644 index 256b87993..000000000 --- a/talawa-mobile-docs/constants_custom_theme/TalawaTheme-class.md +++ /dev/null @@ -1,114 +0,0 @@ - - - -# TalawaTheme class - - - - - - - - - -

This file contains various custom themes. -For instance, lightTheme, darkTheme, _lightTextTheme, _darkTextTheme, etc. -These are imported to other files/widgets to apply the required themes.

- - - - -## Constructors - -[TalawaTheme](../constants_custom_theme/TalawaTheme/TalawaTheme.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [darkTheme](../constants_custom_theme/TalawaTheme/darkTheme.md) → [ThemeData](https://api.flutter.dev/flutter/material/ThemeData-class.html) - - - - -_final_ - - - -##### [lightTheme](../constants_custom_theme/TalawaTheme/lightTheme.md) → [ThemeData](https://api.flutter.dev/flutter/material/ThemeData-class.html) - - - - -_final_ - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/TalawaTheme.md b/talawa-mobile-docs/constants_custom_theme/TalawaTheme/TalawaTheme.md deleted file mode 100644 index 6e0ab5ca7..000000000 --- a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/TalawaTheme.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TalawaTheme constructor - - - - - - - -TalawaTheme() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/darkTheme.md b/talawa-mobile-docs/constants_custom_theme/TalawaTheme/darkTheme.md deleted file mode 100644 index dba6e0b10..000000000 --- a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/darkTheme.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# darkTheme property - - - - - - - -[ThemeData](https://api.flutter.dev/flutter/material/ThemeData-class.html) darkTheme - -_final_ - - - - - - -## Implementation - -```dart -static final darkTheme = ThemeData( - textSelectionTheme: const TextSelectionThemeData( - cursorColor: _darkCursorColor, - ), - scaffoldBackgroundColor: _darkScaffoldColor, - primaryColor: _darkPrimaryColor, - iconTheme: const IconThemeData( - color: _darkIconColor, - ), - fontFamily: 'product-sans', - textTheme: _darkTextTheme, - inputDecorationTheme: _darkInputDecor, - colorScheme: const ColorScheme.dark( - primaryContainer: _darkPrimaryVariantColor, - primary: _darkColorSchemePrimary, - secondary: Colors.black, - secondaryContainer: _lightScaffoldColor, - ).copyWith(secondary: _darkAccentColor), -); -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/lightTheme.md b/talawa-mobile-docs/constants_custom_theme/TalawaTheme/lightTheme.md deleted file mode 100644 index e47787d49..000000000 --- a/talawa-mobile-docs/constants_custom_theme/TalawaTheme/lightTheme.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# lightTheme property - - - - - - - -[ThemeData](https://api.flutter.dev/flutter/material/ThemeData-class.html) lightTheme - -_final_ - - - - - - -## Implementation - -```dart -static final lightTheme = ThemeData( - scaffoldBackgroundColor: _lightScaffoldColor, - textSelectionTheme: const TextSelectionThemeData( - cursorColor: _lightCursorColor, - ), - primaryColor: _lightPrimaryColor, - iconTheme: const IconThemeData( - color: _lightIconColor, - ), - fontFamily: 'product-sans', - textTheme: _lightTextTheme, - inputDecorationTheme: _lightInputDecor, - colorScheme: const ColorScheme.light( - primaryContainer: _lightPrimaryVariantColor, - primary: _lightColorSchemePrimary, - secondary: Color(0xffF5F5F5), - secondaryContainer: _darkScaffoldColor, - ).copyWith(secondary: _lightAccentColor), -); -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_custom_theme/constants_custom_theme-library.md b/talawa-mobile-docs/constants_custom_theme/constants_custom_theme-library.md deleted file mode 100644 index 6c16bab5e..000000000 --- a/talawa-mobile-docs/constants_custom_theme/constants_custom_theme-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# custom_theme library - - - - - - - - - - - -## Classes - -##### [TalawaTheme](../constants_custom_theme/TalawaTheme-class.md) - - - -This file contains various custom themes. -For instance, lightTheme, darkTheme, _lightTextTheme, _darkTextTheme, etc. -These are imported to other files/widgets to apply the required themes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu-class.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu-class.md deleted file mode 100644 index b573a68b7..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu-class.md +++ /dev/null @@ -1,133 +0,0 @@ - - - -# ShortCutMenu class - - - - - - - - - -

This file contains the shortcuts by which user can manage and interact with the -application. quick_actions package is used for this purpose.

- - - - -## Constructors - -[ShortCutMenu](../constants_quick_actions/ShortCutMenu/ShortCutMenu.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [quickActionsList](../constants_quick_actions/ShortCutMenu/quickActionsList.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html)> - - - - -_final_ - - - - - - - - -## Constants - -##### [chatAction](../constants_quick_actions/ShortCutMenu/chatAction-constant.md) const [ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) - - - - - - - - -##### [eventAction](../constants_quick_actions/ShortCutMenu/eventAction-constant.md) const [ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) - - - - - - - - -##### [feedAction](../constants_quick_actions/ShortCutMenu/feedAction-constant.md) const [ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/ShortCutMenu.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/ShortCutMenu.md deleted file mode 100644 index 68d13d357..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/ShortCutMenu.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ShortCutMenu constructor - - - - - - - -ShortCutMenu() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/chatAction-constant.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/chatAction-constant.md deleted file mode 100644 index 2ae5a9506..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/chatAction-constant.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# chatAction constant - - - - - - - -[ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) const chatAction - - - - - - - - -## Implementation - -```dart -static const chatAction = ShortcutItem( - type: "chat_action", - localizedTitle: "Messages", - icon: "chat_icon", -); -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/eventAction-constant.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/eventAction-constant.md deleted file mode 100644 index a01744fc6..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/eventAction-constant.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# eventAction constant - - - - - - - -[ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) const eventAction - - - - - - - - -## Implementation - -```dart -static const eventAction = ShortcutItem( - type: "events_action", - localizedTitle: "Events", - icon: "event_icon", -); -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/feedAction-constant.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/feedAction-constant.md deleted file mode 100644 index e0417a7af..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/feedAction-constant.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# feedAction constant - - - - - - - -[ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html) const feedAction - - - - - - - - -## Implementation - -```dart -static const feedAction = ShortcutItem( - type: "feed_action", - localizedTitle: "NewsFeed", - icon: "newsfeed_icon", -); -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/quickActionsList.md b/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/quickActionsList.md deleted file mode 100644 index bc8848948..000000000 --- a/talawa-mobile-docs/constants_quick_actions/ShortCutMenu/quickActionsList.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# quickActionsList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ShortcutItem](https://pub.dev/documentation/quick_actions_platform_interface/1.0.4/types_types/ShortcutItem-class.html)> quickActionsList - -_final_ - - - - - - -## Implementation - -```dart -static final quickActionsList = [ - eventAction, - feedAction, - chatAction -]; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_quick_actions/constants_quick_actions-library.md b/talawa-mobile-docs/constants_quick_actions/constants_quick_actions-library.md deleted file mode 100644 index edab8824a..000000000 --- a/talawa-mobile-docs/constants_quick_actions/constants_quick_actions-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# quick_actions library - - - - - - - - - - - -## Classes - -##### [ShortCutMenu](../constants_quick_actions/ShortCutMenu-class.md) - - - -This file contains the shortcuts by which user can manage and interact with the -application. quick_actions package is used for this purpose. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes-class.md b/talawa-mobile-docs/constants_routing_constants/Routes-class.md deleted file mode 100644 index 50814616d..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes-class.md +++ /dev/null @@ -1,382 +0,0 @@ - - - -# Routes class - - - - - - - - - -

This file contains the routes. These can be used to make push screen call via Routes.splashScreen to access these string.

- - - - -## Constructors - -[Routes](../constants_routing_constants/Routes/Routes.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [addTask](../constants_routing_constants/Routes/addTask-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [appSettings](../constants_routing_constants/Routes/appSettings-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [calendar](../constants_routing_constants/Routes/calendar-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [chatMessageScreen](../constants_routing_constants/Routes/chatMessageScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [createEventPage](../constants_routing_constants/Routes/createEventPage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [demoPageViewRoute](../constants_routing_constants/Routes/demoPageViewRoute-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [editEventPage](../constants_routing_constants/Routes/editEventPage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [editProfilePage](../constants_routing_constants/Routes/editProfilePage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [editTask](../constants_routing_constants/Routes/editTask-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [eventInfoPage](../constants_routing_constants/Routes/eventInfoPage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [eventTasks](../constants_routing_constants/Routes/eventTasks-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [exploreEventsScreen](../constants_routing_constants/Routes/exploreEventsScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [homeScreen](../constants_routing_constants/Routes/homeScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [individualPost](../constants_routing_constants/Routes/individualPost-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [joinOrg](../constants_routing_constants/Routes/joinOrg-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [languageSelectionRoute](../constants_routing_constants/Routes/languageSelectionRoute-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [loginScreen](../constants_routing_constants/Routes/loginScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [mainScreen](../constants_routing_constants/Routes/mainScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [mapScreen](../constants_routing_constants/Routes/mapScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [pinnedPostPage](../constants_routing_constants/Routes/pinnedPostPage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [profilePage](../constants_routing_constants/Routes/profilePage-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [progressDialog](../constants_routing_constants/Routes/progressDialog-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [recoverScreen](../constants_routing_constants/Routes/recoverScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [requestAccess](../constants_routing_constants/Routes/requestAccess-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [selectContact](../constants_routing_constants/Routes/selectContact-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [selectOrgScreen](../constants_routing_constants/Routes/selectOrgScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [setUrlScreen](../constants_routing_constants/Routes/setUrlScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [signupDetailScreen](../constants_routing_constants/Routes/signupDetailScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [splashScreen](../constants_routing_constants/Routes/splashScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [updateScreen](../constants_routing_constants/Routes/updateScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [userTasks](../constants_routing_constants/Routes/userTasks-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - -##### [waitingScreen](../constants_routing_constants/Routes/waitingScreen-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -static variables. - - - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/Routes.md b/talawa-mobile-docs/constants_routing_constants/Routes/Routes.md deleted file mode 100644 index 94fcce69f..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/Routes.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# Routes constructor - - - - - - - -Routes() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/addTask-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/addTask-constant.md deleted file mode 100644 index 769130815..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/addTask-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# addTask constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const addTask - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String addTask = '/addTask'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/appSettings-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/appSettings-constant.md deleted file mode 100644 index 055c9cc61..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/appSettings-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# appSettings constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const appSettings - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String appSettings = '/appSettingsPage'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/calendar-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/calendar-constant.md deleted file mode 100644 index e68f3aef8..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/calendar-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# calendar constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const calendar - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String calendar = '/calendar'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/chatMessageScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/chatMessageScreen-constant.md deleted file mode 100644 index 143ffb1c3..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/chatMessageScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# chatMessageScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const chatMessageScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String chatMessageScreen = '/chatMessageScreen'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/createEventPage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/createEventPage-constant.md deleted file mode 100644 index cbc75f3c3..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/createEventPage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# createEventPage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const createEventPage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String createEventPage = "/createEventPage"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/demoPageViewRoute-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/demoPageViewRoute-constant.md deleted file mode 100644 index 4872c8cc5..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/demoPageViewRoute-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# demoPageViewRoute constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const demoPageViewRoute - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String demoPageViewRoute = "/demoPageViewRoute"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/editEventPage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/editEventPage-constant.md deleted file mode 100644 index 37189f536..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/editEventPage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# editEventPage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const editEventPage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String editEventPage = "/editEventPage"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/editProfilePage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/editProfilePage-constant.md deleted file mode 100644 index eeb2fae24..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/editProfilePage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# editProfilePage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const editProfilePage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String editProfilePage = "/editProfilePage"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/editTask-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/editTask-constant.md deleted file mode 100644 index 8dce26712..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/editTask-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# editTask constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const editTask - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String editTask = '/editTask'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/eventInfoPage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/eventInfoPage-constant.md deleted file mode 100644 index d40a818cc..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/eventInfoPage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventInfoPage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const eventInfoPage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String eventInfoPage = "/eventInfo"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/eventTasks-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/eventTasks-constant.md deleted file mode 100644 index 5f1ae4565..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/eventTasks-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventTasks constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const eventTasks - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String eventTasks = '/event_tasks'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/exploreEventsScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/exploreEventsScreen-constant.md deleted file mode 100644 index 49d7f4b78..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/exploreEventsScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# exploreEventsScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const exploreEventsScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String exploreEventsScreen = "/exploreEvents"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/homeScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/homeScreen-constant.md deleted file mode 100644 index 2e5038d9b..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/homeScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# homeScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const homeScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String homeScreen = "/homeScreen"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/individualPost-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/individualPost-constant.md deleted file mode 100644 index 8e90b10af..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/individualPost-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# individualPost constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const individualPost - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String individualPost = "/individualPost"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/joinOrg-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/joinOrg-constant.md deleted file mode 100644 index b15ae1443..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/joinOrg-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# joinOrg constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const joinOrg - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String joinOrg = '/joinOrg'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/languageSelectionRoute-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/languageSelectionRoute-constant.md deleted file mode 100644 index c44d80fa2..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/languageSelectionRoute-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# languageSelectionRoute constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const languageSelectionRoute - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String languageSelectionRoute = "/selectLang"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/loginScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/loginScreen-constant.md deleted file mode 100644 index 8fec21cdf..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/loginScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# loginScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const loginScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String loginScreen = "/login"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/mainScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/mainScreen-constant.md deleted file mode 100644 index ea0792a53..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/mainScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# mainScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const mainScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String mainScreen = "/mainScreen"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/mapScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/mapScreen-constant.md deleted file mode 100644 index b4e93a646..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/mapScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# mapScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const mapScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String mapScreen = '/mapScreen'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/pinnedPostPage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/pinnedPostPage-constant.md deleted file mode 100644 index c818d6e26..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/pinnedPostPage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# pinnedPostPage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const pinnedPostPage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String pinnedPostPage = "/pinnedPostPage"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/profilePage-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/profilePage-constant.md deleted file mode 100644 index c81e48b56..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/profilePage-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# profilePage constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const profilePage - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String profilePage = "/profilePage"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/progressDialog-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/progressDialog-constant.md deleted file mode 100644 index 9b8fc0437..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/progressDialog-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# progressDialog constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const progressDialog - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String progressDialog = "/progress"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/recoverScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/recoverScreen-constant.md deleted file mode 100644 index ec709fd38..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/recoverScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# recoverScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const recoverScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String recoverScreen = "/recover"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/requestAccess-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/requestAccess-constant.md deleted file mode 100644 index 1107d1e0b..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/requestAccess-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# requestAccess constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const requestAccess - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String requestAccess = '/requestAccess'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/selectContact-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/selectContact-constant.md deleted file mode 100644 index 7f8f9c69e..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/selectContact-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# selectContact constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const selectContact - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String selectContact = '/selectContact'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/selectOrgScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/selectOrgScreen-constant.md deleted file mode 100644 index 23c3b5949..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/selectOrgScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# selectOrgScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const selectOrgScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String selectOrgScreen = "/selectOrg"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/setUrlScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/setUrlScreen-constant.md deleted file mode 100644 index e3231e3ac..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/setUrlScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# setUrlScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const setUrlScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String setUrlScreen = "/setUrl"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/signupDetailScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/signupDetailScreen-constant.md deleted file mode 100644 index 1d2c87467..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/signupDetailScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# signupDetailScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const signupDetailScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String signupDetailScreen = "/signupDetails"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/splashScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/splashScreen-constant.md deleted file mode 100644 index b2fdcfbfa..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/splashScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# splashScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const splashScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String splashScreen = "/"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/updateScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/updateScreen-constant.md deleted file mode 100644 index 5264a460f..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/updateScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# updateScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const updateScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String updateScreen = "/update"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/userTasks-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/userTasks-constant.md deleted file mode 100644 index 13241dbaf..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/userTasks-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# userTasks constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const userTasks - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String userTasks = '/user_tasks'; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/Routes/waitingScreen-constant.md b/talawa-mobile-docs/constants_routing_constants/Routes/waitingScreen-constant.md deleted file mode 100644 index 14dea52eb..000000000 --- a/talawa-mobile-docs/constants_routing_constants/Routes/waitingScreen-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# waitingScreen constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const waitingScreen - - - - - -

static variables.

- - - -## Implementation - -```dart -static const String waitingScreen = "/waiting"; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_routing_constants/constants_routing_constants-library.md b/talawa-mobile-docs/constants_routing_constants/constants_routing_constants-library.md deleted file mode 100644 index f0958e272..000000000 --- a/talawa-mobile-docs/constants_routing_constants/constants_routing_constants-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# routing_constants library - - - - - - - - - - - -## Classes - -##### [Routes](../constants_routing_constants/Routes-class.md) - - - -This file contains the routes. These can be used to make push screen call via Routes.splashScreen to access these string. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/TimeOuts-class.md b/talawa-mobile-docs/constants_timeout/TimeOuts-class.md deleted file mode 100644 index b85d9801e..000000000 --- a/talawa-mobile-docs/constants_timeout/TimeOuts-class.md +++ /dev/null @@ -1,121 +0,0 @@ - - - -# TimeOuts class - - - - - - - - - -

Class to define constant timeout to bring consistency in the code.

- - - - -## Constructors - -[TimeOuts](../constants_timeout/TimeOuts/TimeOuts.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [large](../constants_timeout/TimeOuts/large-constant.md) const [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -For large timeout, used for large data fetch. - - - - -##### [mediums](../constants_timeout/TimeOuts/mediums-constant.md) const [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -For medium timeout, used for medium data fetch. - - - - -##### [small](../constants_timeout/TimeOuts/small-constant.md) const [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -For small timeout, used for small data fetch. - - - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/TimeOuts/TimeOuts.md b/talawa-mobile-docs/constants_timeout/TimeOuts/TimeOuts.md deleted file mode 100644 index 75d16c8cb..000000000 --- a/talawa-mobile-docs/constants_timeout/TimeOuts/TimeOuts.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TimeOuts constructor - - - - - - - -TimeOuts() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/TimeOuts/large-constant.md b/talawa-mobile-docs/constants_timeout/TimeOuts/large-constant.md deleted file mode 100644 index 06ea1ae78..000000000 --- a/talawa-mobile-docs/constants_timeout/TimeOuts/large-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# large constant - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) const large - - - - - -

For large timeout, used for large data fetch.

- - - -## Implementation - -```dart -static const large = 300; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/TimeOuts/mediums-constant.md b/talawa-mobile-docs/constants_timeout/TimeOuts/mediums-constant.md deleted file mode 100644 index c481d6b87..000000000 --- a/talawa-mobile-docs/constants_timeout/TimeOuts/mediums-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# mediums constant - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) const mediums - - - - - -

For medium timeout, used for medium data fetch.

- - - -## Implementation - -```dart -static const mediums = 100; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/TimeOuts/small-constant.md b/talawa-mobile-docs/constants_timeout/TimeOuts/small-constant.md deleted file mode 100644 index 3fce2b606..000000000 --- a/talawa-mobile-docs/constants_timeout/TimeOuts/small-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# small constant - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) const small - - - - - -

For small timeout, used for small data fetch.

- - - -## Implementation - -```dart -static const small = 5; -``` - - - - - - - diff --git a/talawa-mobile-docs/constants_timeout/constants_timeout-library.md b/talawa-mobile-docs/constants_timeout/constants_timeout-library.md deleted file mode 100644 index 68fa60665..000000000 --- a/talawa-mobile-docs/constants_timeout/constants_timeout-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# timeout library - - - - - - - - - - - -## Classes - -##### [TimeOuts](../constants_timeout/TimeOuts-class.md) - - - -Class to define constant timeout to bring consistency in the code. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon-class.md b/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon-class.md deleted file mode 100644 index a05ca02ba..000000000 --- a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon-class.md +++ /dev/null @@ -1,183 +0,0 @@ - - - -# LanguageIcon class - - - - - - - - - -

This class draws the language icon using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Listenable](https://api.flutter.dev/flutter/foundation/Listenable-class.html) -- [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) -- LanguageIcon - - - - - - - - -## Constructors - -[LanguageIcon](../custom_painters_language_icon/LanguageIcon/LanguageIcon.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)? - - - -Returns a function that builds semantic information for the picture drawn -by this painter. -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/rendering/CustomPainter/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be notified when it is time to repaint. -_inherited_ - - - -##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - -Called whenever a hit test is being performed on an object that is using -this custom paint delegate. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [paint](../custom_painters_language_icon/LanguageIcon/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) void - - - -Called whenever the object needs to paint. The given
Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument. -_override_ - - - -##### [removeListener](https://api.flutter.dev/flutter/rendering/CustomPainter/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that the -object notifies when it is time to repaint. -_inherited_ - - - -##### [shouldRebuildSemantics](https://api.flutter.dev/flutter/rendering/CustomPainter/shouldRebuildSemantics.html)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_inherited_ - - - -##### [shouldRepaint](../custom_painters_language_icon/LanguageIcon/shouldRepaint.md)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/rendering/CustomPainter/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/LanguageIcon.md b/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/LanguageIcon.md deleted file mode 100644 index 65d824c57..000000000 --- a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/LanguageIcon.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# LanguageIcon constructor - - - - - - - -LanguageIcon() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/paint.md b/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/paint.md deleted file mode 100644 index ef9042c71..000000000 --- a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/paint.md +++ /dev/null @@ -1,382 +0,0 @@ - - - -# paint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void paint -([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) - -_override_ - - - -

Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument.

-

Paint operations should remain inside the given area. Graphical -operations outside the bounds may be silently ignored, clipped, or not -clipped. It may sometimes be difficult to guarantee that a certain -operation is inside the bounds (e.g., drawing a rectangle whose size is -determined by user inputs). In that case, consider calling -Canvas.clipRect at the beginning of paint so everything that follows -will be guaranteed to only draw within the clipped area.

-

Implementations should be wary of correctly pairing any calls to -Canvas.save/Canvas.saveLayer and Canvas.restore, otherwise all -subsequent painting on this canvas may be affected, with potentially -hilarious but confusing results.

-

To paint text on a Canvas, use a TextPainter.

-

To paint an image on a Canvas:

-
    -
  1. -

    Obtain an ImageStream, for example by calling ImageProvider.resolve -on an AssetImage or NetworkImage object.

    -
  2. -
  3. -

    Whenever the ImageStream's underlying ImageInfo object changes -(see ImageStream.addListener), create a new instance of your custom -paint delegate, giving it the new ImageInfo object.

    -
  4. -
  5. -

    In your delegate's paint method, call the Canvas.drawImage, -Canvas.drawImageRect, or Canvas.drawImageNine methods to paint the -ImageInfo.image object, applying the ImageInfo.scale value to -obtain the correct rendering size.

    -
  6. -
- - - -## Implementation - -```dart -@override -void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.2376568, size.height * 0.4381250); - path_0.cubicTo( - size.width * 0.2321886, - size.height * 0.4003127, - size.width * 0.2254689, - size.height * 0.3343750, - size.width * 0.2254689, - size.height * 0.3343750, - ); - path_0.lineTo(size.width * 0.2246875, size.height * 0.3343750); - path_0.cubicTo( - size.width * 0.2246875, - size.height * 0.3343750, - size.width * 0.2179686, - size.height * 0.4003127, - size.width * 0.2125000, - size.height * 0.4381250, - ); - path_0.lineTo(size.width * 0.1951561, size.height * 0.5553136); - path_0.lineTo(size.width * 0.2546886, size.height * 0.5553136); - path_0.lineTo(size.width * 0.2376568, size.height * 0.4381250); - path_0.close(); - path_0.moveTo(size.width * 0.9625000, 0); - path_0.lineTo(size.width * 0.5250000, 0); - path_0.lineTo(size.width * 0.5250000, size.height); - path_0.lineTo(size.width * 0.9625000, size.height); - path_0.cubicTo( - size.width * 0.9832818, - size.height, - size.width, - size.height * 0.9665636, - size.width, - size.height * 0.9250000, - ); - path_0.lineTo(size.width, size.height * 0.07500000); - path_0.cubicTo( - size.width, - size.height * 0.03343750, - size.width * 0.9832818, - 0, - size.width * 0.9625000, - 0, - ); - path_0.close(); - path_0.moveTo(size.width * 0.9250000, size.height * 0.3750000); - path_0.cubicTo( - size.width * 0.9250000, - size.height * 0.3956250, - size.width * 0.9165636, - size.height * 0.4125000, - size.width * 0.9062500, - size.height * 0.4125000, - ); - path_0.lineTo(size.width * 0.8884364, size.height * 0.4125000); - path_0.cubicTo( - size.width * 0.8776568, - size.height * 0.4862500, - size.width * 0.8545318, - size.height * 0.5606227, - size.width * 0.8217182, - size.height * 0.6309364, - ); - path_0.cubicTo( - size.width * 0.8348432, - size.height * 0.6509364, - size.width * 0.8484364, - size.height * 0.6700000, - size.width * 0.8625000, - size.height * 0.6871864, - ); - path_0.cubicTo( - size.width * 0.8710932, - size.height * 0.6978136, - size.width * 0.8739068, - size.height * 0.7200000, - size.width * 0.8689068, - size.height * 0.7378136, - ); - path_0.lineTo(size.width * 0.8565636, size.height * 0.7812500); - path_0.cubicTo( - size.width * 0.8512500, - size.height * 0.7996864, - size.width * 0.8395318, - size.height * 0.8056227, - size.width * 0.8304682, - size.height * 0.7946864, - ); - path_0.cubicTo( - size.width * 0.8107818, - size.height * 0.7703136, - size.width * 0.7921886, - size.height * 0.7443727, - size.width * 0.7751568, - size.height * 0.7168727, - ); - path_0.cubicTo( - size.width * 0.7581250, - size.height * 0.7440636, - size.width * 0.7396886, - size.height * 0.7703136, - size.width * 0.7198432, - size.height * 0.7946864, - ); - path_0.cubicTo( - size.width * 0.7107818, - size.height * 0.8056227, - size.width * 0.6990636, - size.height * 0.7996864, - size.width * 0.6937500, - size.height * 0.7812500, - ); - path_0.lineTo(size.width * 0.6814068, size.height * 0.7378136); - path_0.cubicTo( - size.width * 0.6764068, - size.height * 0.7203136, - size.width * 0.6792182, - size.height * 0.6978136, - size.width * 0.6879682, - size.height * 0.6871864, - ); - path_0.cubicTo( - size.width * 0.7025000, - size.height * 0.6693727, - size.width * 0.7160932, - size.height * 0.6506273, - size.width * 0.7287500, - size.height * 0.6309364, - ); - path_0.cubicTo( - size.width * 0.7164068, - size.height * 0.6046864, - size.width * 0.7054682, - size.height * 0.5778136, - size.width * 0.6959386, - size.height * 0.5506273, - ); - path_0.cubicTo( - size.width * 0.6896886, - size.height * 0.5328136, - size.width * 0.6925000, - size.height * 0.5081273, - size.width * 0.7017182, - size.height * 0.4971864, - ); - path_0.lineTo(size.width * 0.7118750, size.height * 0.4850000); - path_0.lineTo(size.width * 0.7232818, size.height * 0.4715636); - path_0.cubicTo( - size.width * 0.7317182, - size.height * 0.4615636, - size.width * 0.7426568, - size.height * 0.4662500, - size.width * 0.7482818, - size.height * 0.4821864, - ); - path_0.cubicTo( - size.width * 0.7560932, - size.height * 0.5040636, - size.width * 0.7651568, - size.height * 0.5259364, - size.width * 0.7754682, - size.height * 0.5475000, - ); - path_0.cubicTo( - size.width * 0.7965614, - size.height * 0.5031273, - size.width * 0.8126568, - size.height * 0.4571864, - size.width * 0.8223432, - size.height * 0.4125000, - ); - path_0.lineTo(size.width * 0.6437500, size.height * 0.4125000); - path_0.cubicTo( - size.width * 0.6334386, - size.height * 0.4125000, - size.width * 0.6250000, - size.height * 0.3956250, - size.width * 0.6250000, - size.height * 0.3750000, - ); - path_0.lineTo(size.width * 0.6250000, size.height * 0.3250000); - path_0.cubicTo( - size.width * 0.6250000, - size.height * 0.3043750, - size.width * 0.6334386, - size.height * 0.2875000, - size.width * 0.6437500, - size.height * 0.2875000, - ); - path_0.lineTo(size.width * 0.7437500, size.height * 0.2875000); - path_0.lineTo(size.width * 0.7437500, size.height * 0.2375000); - path_0.cubicTo( - size.width * 0.7437500, - size.height * 0.2168750, - size.width * 0.7521886, - size.height * 0.2000000, - size.width * 0.7625000, - size.height * 0.2000000, - ); - path_0.lineTo(size.width * 0.7875000, size.height * 0.2000000); - path_0.cubicTo( - size.width * 0.7978136, - size.height * 0.2000000, - size.width * 0.8062500, - size.height * 0.2168750, - size.width * 0.8062500, - size.height * 0.2375000, - ); - path_0.lineTo(size.width * 0.8062500, size.height * 0.2875000); - path_0.lineTo(size.width * 0.9062500, size.height * 0.2875000); - path_0.cubicTo( - size.width * 0.9165636, - size.height * 0.2875000, - size.width * 0.9250000, - size.height * 0.3043750, - size.width * 0.9250000, - size.height * 0.3250000, - ); - path_0.lineTo(size.width * 0.9250000, size.height * 0.3750000); - path_0.close(); - path_0.moveTo(0, size.height * 0.07500000); - path_0.lineTo(0, size.height * 0.9250000); - path_0.cubicTo( - 0, - size.height * 0.9665636, - size.width * 0.01671875, - size.height, - size.width * 0.03750000, - size.height, - ); - path_0.lineTo(size.width * 0.4750000, size.height); - path_0.lineTo(size.width * 0.4750000, 0); - path_0.lineTo(size.width * 0.03750000, 0); - path_0.cubicTo( - size.width * 0.01671875, - 0, - 0, - size.height * 0.03343750, - 0, - size.height * 0.07500000, - ); - path_0.close(); - path_0.moveTo(size.width * 0.09203136, size.height * 0.7503136); - path_0.lineTo(size.width * 0.1818750, size.height * 0.2218750); - path_0.cubicTo( - size.width * 0.1845314, - size.height * 0.2065623, - size.width * 0.1915625, - size.height * 0.1965623, - size.width * 0.1996875, - size.height * 0.1965623, - ); - path_0.lineTo(size.width * 0.2504682, size.height * 0.1965623); - path_0.cubicTo( - size.width * 0.2584386, - size.height * 0.1965623, - size.width * 0.2656250, - size.height * 0.2068750, - size.width * 0.2682818, - size.height * 0.2218750, - ); - path_0.lineTo(size.width * 0.3581250, size.height * 0.7503136); - path_0.cubicTo( - size.width * 0.3621864, - size.height * 0.7746864, - size.width * 0.3532818, - size.height * 0.8000000, - size.width * 0.3403136, - size.height * 0.8000000, - ); - path_0.lineTo(size.width * 0.3045318, size.height * 0.8000000); - path_0.cubicTo( - size.width * 0.3004886, - size.height * 0.7999955, - size.width * 0.2965523, - size.height * 0.7973727, - size.width * 0.2933159, - size.height * 0.7925318, - ); - path_0.cubicTo( - size.width * 0.2900773, - size.height * 0.7876864, - size.width * 0.2877091, - size.height * 0.7808818, - size.width * 0.2865614, - size.height * 0.7731227, - ); - path_0.lineTo(size.width * 0.2718750, size.height * 0.6734364); - path_0.lineTo(size.width * 0.1778125, size.height * 0.6734364); - path_0.lineTo(size.width * 0.1635936, size.height * 0.7728136); - path_0.cubicTo( - size.width * 0.1612500, - size.height * 0.7887500, - size.width * 0.1539061, - size.height * 0.8000000, - size.width * 0.1456250, - size.height * 0.8000000, - ); - path_0.lineTo(size.width * 0.1098439, size.height * 0.8000000); - path_0.cubicTo( - size.width * 0.09703136, - size.height * 0.8000000, - size.width * 0.08796886, - size.height * 0.7746864, - size.width * 0.09203136, - size.height * 0.7503136, - ); - path_0.close(); - - final Paint paint0fill = Paint()..style = PaintingStyle.fill; - paint0fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_0, paint0fill); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/shouldRepaint.md b/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/shouldRepaint.md deleted file mode 100644 index a74a9cec4..000000000 --- a/talawa-mobile-docs/custom_painters_language_icon/LanguageIcon/shouldRepaint.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# shouldRepaint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) shouldRepaint -(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) - -_override_ - - - -

Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former).

-

If the new instance represents different information than the old -instance, then the method should return true, otherwise it should return -false.

-

If the method returns false, then the paint call might be optimized -away.

-

It's possible that the paint method will get called even if -shouldRepaint returns false (e.g. if an ancestor or descendant needed to -be repainted). It's also possible that the paint method will get called -without shouldRepaint being called at all (e.g. if the box changes -size).

-

If a custom delegate has a particularly expensive paint function such that -repaints should be avoided as much as possible, a RepaintBoundary or -RenderRepaintBoundary (or other render object with -RenderObject.isRepaintBoundary set to true) might be helpful.

-

The oldDelegate argument will never be null.

- - - -## Implementation - -```dart -@override -bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_language_icon/custom_painters_language_icon-library.md b/talawa-mobile-docs/custom_painters_language_icon/custom_painters_language_icon-library.md deleted file mode 100644 index f987bcce8..000000000 --- a/talawa-mobile-docs/custom_painters_language_icon/custom_painters_language_icon-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# language_icon library - - - - - - - - - - - -## Classes - -##### [LanguageIcon](../custom_painters_language_icon/LanguageIcon-class.md) - - - -This class draws the language icon using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo-class.md b/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo-class.md deleted file mode 100644 index baaa311d6..000000000 --- a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo-class.md +++ /dev/null @@ -1,183 +0,0 @@ - - - -# AppLogo class - - - - - - - - - -

This class draws the app logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Listenable](https://api.flutter.dev/flutter/foundation/Listenable-class.html) -- [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) -- AppLogo - - - - - - - - -## Constructors - -[AppLogo](../custom_painters_talawa_logo/AppLogo/AppLogo.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)? - - - -Returns a function that builds semantic information for the picture drawn -by this painter. -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/rendering/CustomPainter/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be notified when it is time to repaint. -_inherited_ - - - -##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - -Called whenever a hit test is being performed on an object that is using -this custom paint delegate. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [paint](../custom_painters_talawa_logo/AppLogo/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) void - - - -Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument. -_override_ - - - -##### [removeListener](https://api.flutter.dev/flutter/rendering/CustomPainter/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that the -object notifies when it is time to repaint. -_inherited_ - - - -##### [shouldRebuildSemantics](https://api.flutter.dev/flutter/rendering/CustomPainter/shouldRebuildSemantics.html)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_inherited_ - - - -##### [shouldRepaint](../custom_painters_talawa_logo/AppLogo/shouldRepaint.md)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/rendering/CustomPainter/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/AppLogo.md b/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/AppLogo.md deleted file mode 100644 index 8dad793f7..000000000 --- a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/AppLogo.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# AppLogo constructor - - - - - - - -AppLogo() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/paint.md b/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/paint.md deleted file mode 100644 index 0dc5d6056..000000000 --- a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/paint.md +++ /dev/null @@ -1,485 +0,0 @@ - - - -# paint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void paint -([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) - -_override_ - - - -

Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument.

-

Paint operations should remain inside the given area. Graphical -operations outside the bounds may be silently ignored, clipped, or not -clipped. It may sometimes be difficult to guarantee that a certain -operation is inside the bounds (e.g., drawing a rectangle whose size is -determined by user inputs). In that case, consider calling -Canvas.clipRect at the beginning of paint so everything that follows -will be guaranteed to only draw within the clipped area.

-

Implementations should be wary of correctly pairing any calls to -Canvas.save/Canvas.saveLayer and Canvas.restore, otherwise all -subsequent painting on this canvas may be affected, with potentially -hilarious but confusing results.

-

To paint text on a Canvas, use a TextPainter.

-

To paint an image on a Canvas:

-
    -
  1. -

    Obtain an ImageStream, for example by calling ImageProvider.resolve -on an AssetImage or NetworkImage object.

    -
  2. -
  3. -

    Whenever the ImageStream's underlying ImageInfo object changes -(see ImageStream.addListener), create a new instance of your custom -paint delegate, giving it the new ImageInfo object.

    -
  4. -
  5. -

    In your delegate's paint method, call the Canvas.drawImage, -Canvas.drawImageRect, or Canvas.drawImageNine methods to paint the -ImageInfo.image object, applying the ImageInfo.scale value to -obtain the correct rendering size.

    -
  6. -
- - - -## Implementation - -```dart -@override -void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.6581984, size.height * 0.6200040); - path_0.cubicTo( - size.width * 0.6951984, - size.height * 0.6792024, - size.width * 0.7321984, - size.height * 0.7386032, - size.width * 0.7695992, - size.height * 0.7978016, - ); - path_0.cubicTo( - size.width * 0.7737976, - size.height * 0.8044008, - size.width * 0.7730000, - size.height * 0.8070040, - size.width * 0.7664008, - size.height * 0.8112024, - ); - path_0.cubicTo( - size.width * 0.7314008, - size.height * 0.8330040, - size.width * 0.6964008, - size.height * 0.8552024, - size.width * 0.6617976, - size.height * 0.8776032, - ); - path_0.cubicTo( - size.width * 0.6560000, - size.height * 0.8814008, - size.width * 0.6534008, - size.height * 0.8820040, - size.width * 0.6491984, - size.height * 0.8750040, - ); - path_0.cubicTo( - size.width * 0.5995992, - size.height * 0.7930040, - size.width * 0.5495992, - size.height * 0.7112024, - size.width * 0.4997976, - size.height * 0.6292024, - ); - path_0.cubicTo( - size.width * 0.4941984, - size.height * 0.6198016, - size.width * 0.4940000, - size.height * 0.6200040, - size.width * 0.4884008, - size.height * 0.6292024, - ); - path_0.cubicTo( - size.width * 0.4380000, - size.height * 0.7114008, - size.width * 0.3873992, - size.height * 0.7938016, - size.width * 0.3371992, - size.height * 0.8762024, - ); - path_0.cubicTo( - size.width * 0.3337992, - size.height * 0.8818016, - size.width * 0.3317992, - size.height * 0.8816032, - size.width * 0.3267992, - size.height * 0.8784008, - ); - path_0.cubicTo( - size.width * 0.2913992, - size.height * 0.8558016, - size.width * 0.2559992, - size.height * 0.8334008, - size.width * 0.2203992, - size.height * 0.8112024, - ); - path_0.cubicTo( - size.width * 0.2165992, - size.height * 0.8088016, - size.width * 0.2131992, - size.height * 0.8076032, - size.width * 0.2167992, - size.height * 0.8018016, - ); - path_0.cubicTo( - size.width * 0.2547992, - size.height * 0.7420040, - size.width * 0.2923992, - size.height * 0.6818016, - size.width * 0.3301992, - size.height * 0.6218016, - ); - path_0.cubicTo( - size.width * 0.3575992, - size.height * 0.5766032, - size.width * 0.3853992, - size.height * 0.5320040, - size.width * 0.4130000, - size.height * 0.4870040, - ); - path_0.cubicTo( - size.width * 0.4191984, - size.height * 0.4768016, - size.width * 0.4255992, - size.height * 0.4666032, - size.width * 0.4317976, - size.height * 0.4564008, - ); - path_0.cubicTo( - size.width * 0.4347976, - size.height * 0.4516032, - size.width * 0.4377976, - size.height * 0.4468016, - size.width * 0.4441984, - size.height * 0.4458016, - ); - path_0.cubicTo( - size.width * 0.4541984, - size.height * 0.4452024, - size.width * 0.4640000, - size.height * 0.4472024, - size.width * 0.4740000, - size.height * 0.4474008, - ); - path_0.cubicTo( - size.width * 0.4960000, - size.height * 0.4482024, - size.width * 0.5167976, - size.height * 0.4438016, - size.width * 0.5377976, - size.height * 0.4382024, - ); - path_0.cubicTo( - size.width * 0.5435992, - size.height * 0.4374008, - size.width * 0.5470000, - size.height * 0.4408016, - size.width * 0.5497976, - size.height * 0.4454008, - ); - path_0.cubicTo( - size.width * 0.5830000, - size.height * 0.5002024, - size.width * 0.6170000, - size.height * 0.5546032, - size.width * 0.6497976, - size.height * 0.6096032, - ); - path_0.cubicTo( - size.width * 0.6517976, - size.height * 0.6136032, - size.width * 0.6544008, - size.height * 0.6172024, - size.width * 0.6581984, - size.height * 0.6200040, - ); - path_0.close(); - - final Paint paint0fill = Paint()..style = PaintingStyle.fill; - paint0fill.color = const Color(0xff31BB6B).withOpacity(1.0); - canvas.drawPath(path_0, paint0fill); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.5405992, size.height * 0.4396032); - path_1.cubicTo( - size.width * 0.5084008, - size.height * 0.4512024, - size.width * 0.4754008, - size.height * 0.4532024, - size.width * 0.4418016, - size.height * 0.4472024, - ); - path_1.cubicTo( - size.width * 0.4292024, - size.height * 0.4490000, - size.width * 0.4184008, - size.height * 0.4428016, - size.width * 0.4078016, - size.height * 0.4382024, - ); - path_1.cubicTo( - size.width * 0.3772004, - size.height * 0.4248016, - size.width * 0.3516004, - size.height * 0.4048016, - size.width * 0.3326004, - size.height * 0.3768020, - ); - path_1.cubicTo( - size.width * 0.3302004, - size.height * 0.3732020, - size.width * 0.3276004, - size.height * 0.3696020, - size.width * 0.3278004, - size.height * 0.3650020, - ); - path_1.cubicTo( - size.width * 0.3124004, - size.height * 0.3368020, - size.width * 0.3032004, - size.height * 0.3070020, - size.width * 0.3040004, - size.height * 0.2746020, - ); - path_1.cubicTo( - size.width * 0.3056004, - size.height * 0.2126020, - size.width * 0.3322004, - size.height * 0.1636020, - size.width * 0.3842004, - size.height * 0.1300020, - ); - path_1.cubicTo( - size.width * 0.4872024, - size.height * 0.06320198, - size.width * 0.6244008, - size.height * 0.1212020, - size.width * 0.6494008, - size.height * 0.2418020, - ); - path_1.cubicTo( - size.width * 0.6554008, - size.height * 0.2704020, - size.width * 0.6535992, - size.height * 0.2994020, - size.width * 0.6452024, - size.height * 0.3276020, - ); - path_1.cubicTo( - size.width * 0.6444008, - size.height * 0.3302020, - size.width * 0.6440000, - size.height * 0.3328020, - size.width * 0.6434008, - size.height * 0.3354020, - ); - path_1.cubicTo( - size.width * 0.6380000, - size.height * 0.3574020, - size.width * 0.6260000, - size.height * 0.3756020, - size.width * 0.6118016, - size.height * 0.3924020, - ); - path_1.cubicTo( - size.width * 0.5960000, - size.height * 0.4108016, - size.width * 0.5770000, - size.height * 0.4252024, - size.width * 0.5548016, - size.height * 0.4354008, - ); - path_1.cubicTo( - size.width * 0.5500000, - size.height * 0.4376032, - size.width * 0.5455992, - size.height * 0.4394008, - size.width * 0.5405992, - size.height * 0.4396032, - ); - path_1.close(); - - final Paint paint1fill = Paint()..style = PaintingStyle.fill; - paint1fill.color = const Color(0xffFEBC59).withOpacity(1.0); - canvas.drawPath(path_1, paint1fill); - - final Path path_2 = Path(); - path_2.moveTo(size.width * 0.5405992, size.height * 0.4395992); - path_2.cubicTo( - size.width * 0.5880000, - size.height * 0.4200000, - size.width * 0.6224008, - size.height * 0.3870008, - size.width * 0.6410000, - size.height * 0.3386008, - ); - path_2.cubicTo( - size.width * 0.6414008, - size.height * 0.3374008, - size.width * 0.6425992, - size.height * 0.3364008, - size.width * 0.6434008, - size.height * 0.3354008, - ); - path_2.cubicTo( - size.width * 0.6850000, - size.height * 0.4020000, - size.width * 0.7265992, - size.height * 0.4688016, - size.width * 0.7685992, - size.height * 0.5352024, - ); - path_2.cubicTo( - size.width * 0.7742024, - size.height * 0.5440000, - size.width * 0.7724008, - size.height * 0.5470000, - size.width * 0.7642024, - size.height * 0.5520000, - ); - path_2.cubicTo( - size.width * 0.7285992, - size.height * 0.5740000, - size.width * 0.6924008, - size.height * 0.5954008, - size.width * 0.6584008, - size.height * 0.6200000, - ); - path_2.cubicTo( - size.width * 0.6535992, - size.height * 0.6225992, - size.width * 0.6520000, - size.height * 0.6190000, - size.width * 0.6502024, - size.height * 0.6158016, - ); - path_2.cubicTo( - size.width * 0.6158016, - size.height * 0.5590000, - size.width * 0.5814008, - size.height * 0.5022024, - size.width * 0.5470000, - size.height * 0.4455992, - ); - path_2.cubicTo( - size.width * 0.5452024, - size.height * 0.4430000, - size.width * 0.5440000, - size.height * 0.4402024, - size.width * 0.5405992, - size.height * 0.4395992, - ); - path_2.close(); - - final Paint paint2fill = Paint()..style = PaintingStyle.fill; - paint2fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_2, paint2fill); - - final Path path_3 = Path(); - path_3.moveTo(size.width * 0.3277992, size.height * 0.3651976); - path_3.cubicTo( - size.width * 0.3541992, - size.height * 0.4085992, - size.width * 0.3929992, - size.height * 0.4351984, - size.width * 0.4417976, - size.height * 0.4471984, - ); - path_3.cubicTo( - size.width * 0.4287976, - size.height * 0.4623968, - size.width * 0.4197976, - size.height * 0.4803968, - size.width * 0.4094008, - size.height * 0.4973968, - ); - path_3.cubicTo( - size.width * 0.3847992, - size.height * 0.5373968, - size.width * 0.3591992, - size.height * 0.5765992, - size.width * 0.3361992, - size.height * 0.6173968, - ); - path_3.cubicTo( - size.width * 0.3347992, - size.height * 0.6197976, - size.width * 0.3333992, - size.height * 0.6219960, - size.width * 0.3301992, - size.height * 0.6215992, - ); - path_3.cubicTo( - size.width * 0.3235992, - size.height * 0.6143968, - size.width * 0.3149992, - size.height * 0.6097976, - size.width * 0.3069992, - size.height * 0.6045992, - ); - path_3.cubicTo( - size.width * 0.2783992, - size.height * 0.5863968, - size.width * 0.2493992, - size.height * 0.5685992, - size.width * 0.2205992, - size.height * 0.5507976, - ); - path_3.cubicTo( - size.width * 0.2163992, - size.height * 0.5481984, - size.width * 0.2131992, - size.height * 0.5465992, - size.width * 0.2169992, - size.height * 0.5403968, - ); - path_3.cubicTo( - size.width * 0.2535992, - size.height * 0.4825992, - size.width * 0.2899992, - size.height * 0.4243968, - size.width * 0.3263992, - size.height * 0.3663976, - ); - path_3.cubicTo( - size.width * 0.3265992, - size.height * 0.3659976, - size.width * 0.3271992, - size.height * 0.3655976, - size.width * 0.3277992, - size.height * 0.3651976, - ); - path_3.close(); - - final Paint paint3fill = Paint()..style = PaintingStyle.fill; - paint3fill.color = const Color(0xff737373).withOpacity(1.0); - canvas.drawPath(path_3, paint3fill); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/shouldRepaint.md b/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/shouldRepaint.md deleted file mode 100644 index bbd772e40..000000000 --- a/talawa-mobile-docs/custom_painters_talawa_logo/AppLogo/shouldRepaint.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# shouldRepaint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) shouldRepaint -(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) - -_override_ - - - -

Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former).

-

If the new instance represents different information than the old -instance, then the method should return true, otherwise it should return -false.

-

If the method returns false, then the paint call might be optimized -away.

-

It's possible that the paint method will get called even if -shouldRepaint returns false (e.g. if an ancestor or descendant needed to -be repainted). It's also possible that the paint method will get called -without shouldRepaint being called at all (e.g. if the box changes -size).

-

If a custom delegate has a particularly expensive paint function such that -repaints should be avoided as much as possible, a RepaintBoundary or -RenderRepaintBoundary (or other render object with -RenderObject.isRepaintBoundary set to true) might be helpful.

-

The oldDelegate argument will never be null.

- - - -## Implementation - -```dart -@override -bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_talawa_logo/custom_painters_talawa_logo-library.md b/talawa-mobile-docs/custom_painters_talawa_logo/custom_painters_talawa_logo-library.md deleted file mode 100644 index 5c5e7aba1..000000000 --- a/talawa-mobile-docs/custom_painters_talawa_logo/custom_painters_talawa_logo-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# talawa_logo library - - - - - - - - - - - -## Classes - -##### [AppLogo](../custom_painters_talawa_logo/AppLogo-class.md) - - - -This class draws the app logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo-class.md b/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo-class.md deleted file mode 100644 index 12b1a1e0a..000000000 --- a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo-class.md +++ /dev/null @@ -1,183 +0,0 @@ - - - -# TelegramLogo class - - - - - - - - - -

This class draws the telegram logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Listenable](https://api.flutter.dev/flutter/foundation/Listenable-class.html) -- [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) -- TelegramLogo - - - - - - - - -## Constructors - -[TelegramLogo](../custom_painters_telegram_logo/TelegramLogo/TelegramLogo.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)? - - - -Returns a function that builds semantic information for the picture drawn -by this painter. -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/rendering/CustomPainter/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be notified when it is time to repaint. -_inherited_ - - - -##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - -Called whenever a hit test is being performed on an object that is using -this custom paint delegate. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [paint](../custom_painters_telegram_logo/TelegramLogo/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) void - - - -Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument. -_override_ - - - -##### [removeListener](https://api.flutter.dev/flutter/rendering/CustomPainter/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that the -object notifies when it is time to repaint. -_inherited_ - - - -##### [shouldRebuildSemantics](https://api.flutter.dev/flutter/rendering/CustomPainter/shouldRebuildSemantics.html)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_inherited_ - - - -##### [shouldRepaint](../custom_painters_telegram_logo/TelegramLogo/shouldRepaint.md)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/rendering/CustomPainter/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/TelegramLogo.md b/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/TelegramLogo.md deleted file mode 100644 index 4d5cfd037..000000000 --- a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/TelegramLogo.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TelegramLogo constructor - - - - - - - -TelegramLogo() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/paint.md b/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/paint.md deleted file mode 100644 index fdec6895d..000000000 --- a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/paint.md +++ /dev/null @@ -1,171 +0,0 @@ - - - -# paint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void paint -([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) - -_override_ - - - -

Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument.

-

Paint operations should remain inside the given area. Graphical -operations outside the bounds may be silently ignored, clipped, or not -clipped. It may sometimes be difficult to guarantee that a certain -operation is inside the bounds (e.g., drawing a rectangle whose size is -determined by user inputs). In that case, consider calling -Canvas.clipRect at the beginning of paint so everything that follows -will be guaranteed to only draw within the clipped area.

-

Implementations should be wary of correctly pairing any calls to -Canvas.save/Canvas.saveLayer and Canvas.restore, otherwise all -subsequent painting on this canvas may be affected, with potentially -hilarious but confusing results.

-

To paint text on a Canvas, use a TextPainter.

-

To paint an image on a Canvas:

-
    -
  1. -

    Obtain an ImageStream, for example by calling ImageProvider.resolve -on an AssetImage or NetworkImage object.

    -
  2. -
  3. -

    Whenever the ImageStream's underlying ImageInfo object changes -(see ImageStream.addListener), create a new instance of your custom -paint delegate, giving it the new ImageInfo object.

    -
  4. -
  5. -

    In your delegate's paint method, call the Canvas.drawImage, -Canvas.drawImageRect, or Canvas.drawImageNine methods to paint the -ImageInfo.image object, applying the ImageInfo.scale value to -obtain the correct rendering size.

    -
  6. -
- - - -## Implementation - -```dart -@override -void paint(Canvas canvas, Size size) { - final Paint paint0Fill = Paint()..style = PaintingStyle.fill; - paint0Fill.shader = ui.Gradient.linear( - Offset(size.width * 0.6670000, size.height * 0.1670000), - Offset(size.width * 0.4170000, size.height * 0.7500000), [ - const Color(0xff37aee2).withOpacity(1), - const Color(0xff1e96c8).withOpacity(1) - ], [ - 0, - 1 - ]); - canvas.drawCircle( - Offset(size.width * 0.5000000, size.height * 0.5000000), - size.width * 0.5000000, - paint0Fill, - ); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.4083333, size.height * 0.7291667); - path_1.cubicTo( - size.width * 0.3921333, - size.height * 0.7291667, - size.width * 0.3948875, - size.height * 0.7230500, - size.width * 0.3893000, - size.height * 0.7076250, - ); - path_1.lineTo(size.width * 0.3416667, size.height * 0.5508625); - path_1.lineTo(size.width * 0.7083333, size.height * 0.3333333); - - final Paint paint1Fill = Paint()..style = PaintingStyle.fill; - paint1Fill.color = const Color(0xffc8daea).withOpacity(1.0); - canvas.drawPath(path_1, paint1Fill); - - final Path path_2 = Path(); - path_2.moveTo(size.width * 0.4083333, size.height * 0.7291667); - path_2.cubicTo( - size.width * 0.4208333, - size.height * 0.7291667, - size.width * 0.4263542, - size.height * 0.7234500, - size.width * 0.4333333, - size.height * 0.7166667, - ); - path_2.lineTo(size.width * 0.5000000, size.height * 0.6518417); - path_2.lineTo(size.width * 0.4168417, size.height * 0.6016958); - - final Paint paint2Fill = Paint()..style = PaintingStyle.fill; - paint2Fill.color = const Color(0xffa9c9dd).withOpacity(1.0); - canvas.drawPath(path_2, paint2Fill); - - final Path path_3 = Path(); - path_3.moveTo(size.width * 0.4168333, size.height * 0.6017083); - path_3.lineTo(size.width * 0.6183333, size.height * 0.7505792); - path_3.cubicTo( - size.width * 0.6413292, - size.height * 0.7632667, - size.width * 0.6579208, - size.height * 0.7566958, - size.width * 0.6636500, - size.height * 0.7292333, - ); - path_3.lineTo(size.width * 0.7456708, size.height * 0.3427208); - path_3.cubicTo( - size.width * 0.7540667, - size.height * 0.3090542, - size.width * 0.7328375, - size.height * 0.2937792, - size.width * 0.7108375, - size.height * 0.3037667, - ); - path_3.lineTo(size.width * 0.2292125, size.height * 0.4894792); - path_3.cubicTo( - size.width * 0.1963375, - size.height * 0.5026667, - size.width * 0.1965333, - size.height * 0.5210083, - size.width * 0.2232208, - size.height * 0.5291792, - ); - path_3.lineTo(size.width * 0.3468167, size.height * 0.5677583); - path_3.lineTo(size.width * 0.6329542, size.height * 0.3872375); - path_3.cubicTo( - size.width * 0.6464625, - size.height * 0.3790458, - size.width * 0.6588625, - size.height * 0.3834458, - size.width * 0.6486875, - size.height * 0.3924792, - ); - - final Paint paint3Fill = Paint()..style = PaintingStyle.fill; - paint3Fill.shader = ui.Gradient.linear( - Offset(size.width * 0.6600000, size.height * 0.4370000), - Offset(size.width * 0.8510000, size.height * 0.8020000), [ - const Color(0xffeff7fc).withOpacity(1), - const Color(0xffffffff).withOpacity(1) - ], [ - 0, - 1 - ]); - canvas.drawPath(path_3, paint3Fill); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/shouldRepaint.md b/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/shouldRepaint.md deleted file mode 100644 index 255d4828a..000000000 --- a/talawa-mobile-docs/custom_painters_telegram_logo/TelegramLogo/shouldRepaint.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# shouldRepaint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) shouldRepaint -(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) - -_override_ - - - -

Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former).

-

If the new instance represents different information than the old -instance, then the method should return true, otherwise it should return -false.

-

If the method returns false, then the paint call might be optimized -away.

-

It's possible that the paint method will get called even if -shouldRepaint returns false (e.g. if an ancestor or descendant needed to -be repainted). It's also possible that the paint method will get called -without shouldRepaint being called at all (e.g. if the box changes -size).

-

If a custom delegate has a particularly expensive paint function such that -repaints should be avoided as much as possible, a RepaintBoundary or -RenderRepaintBoundary (or other render object with -RenderObject.isRepaintBoundary set to true) might be helpful.

-

The oldDelegate argument will never be null.

- - - -## Implementation - -```dart -@override -bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_telegram_logo/custom_painters_telegram_logo-library.md b/talawa-mobile-docs/custom_painters_telegram_logo/custom_painters_telegram_logo-library.md deleted file mode 100644 index 4dad766a1..000000000 --- a/talawa-mobile-docs/custom_painters_telegram_logo/custom_painters_telegram_logo-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# telegram_logo library - - - - - - - - - - - -## Classes - -##### [TelegramLogo](../custom_painters_telegram_logo/TelegramLogo-class.md) - - - -This class draws the telegram logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo-class.md b/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo-class.md deleted file mode 100644 index 71a314a26..000000000 --- a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo-class.md +++ /dev/null @@ -1,183 +0,0 @@ - - - -# WhatsappLogo class - - - - - - - - - -

This class draws the whatsapp logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Listenable](https://api.flutter.dev/flutter/foundation/Listenable-class.html) -- [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) -- WhatsappLogo - - - - - - - - -## Constructors - -[WhatsappLogo](../custom_painters_whatsapp_logo/WhatsappLogo/WhatsappLogo.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)? - - - -Returns a function that builds semantic information for the picture drawn -by this painter. -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/rendering/CustomPainter/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be notified when it is time to repaint. -_inherited_ - - - -##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - -Called whenever a hit test is being performed on an object that is using -this custom paint delegate. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [paint](../custom_painters_whatsapp_logo/WhatsappLogo/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) void - - - -Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument. -_override_ - - - -##### [removeListener](https://api.flutter.dev/flutter/rendering/CustomPainter/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that the -object notifies when it is time to repaint. -_inherited_ - - - -##### [shouldRebuildSemantics](https://api.flutter.dev/flutter/rendering/CustomPainter/shouldRebuildSemantics.html)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_inherited_ - - - -##### [shouldRepaint](../custom_painters_whatsapp_logo/WhatsappLogo/shouldRepaint.md)(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former). -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/rendering/CustomPainter/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/WhatsappLogo.md b/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/WhatsappLogo.md deleted file mode 100644 index e75ac5d53..000000000 --- a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/WhatsappLogo.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# WhatsappLogo constructor - - - - - - - -WhatsappLogo() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/paint.md b/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/paint.md deleted file mode 100644 index ff1a5a712..000000000 --- a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/paint.md +++ /dev/null @@ -1,485 +0,0 @@ - - - -# paint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void paint -([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Size](https://api.flutter.dev/flutter/dart-ui/Size-class.html) size) - -_override_ - - - -

Called whenever the object needs to paint. The given Canvas has its -coordinate space configured such that the origin is at the top left of the -box. The area of the box is the size of the size argument.

-

Paint operations should remain inside the given area. Graphical -operations outside the bounds may be silently ignored, clipped, or not -clipped. It may sometimes be difficult to guarantee that a certain -operation is inside the bounds (e.g., drawing a rectangle whose size is -determined by user inputs). In that case, consider calling -Canvas.clipRect at the beginning of paint so everything that follows -will be guaranteed to only draw within the clipped area.

-

Implementations should be wary of correctly pairing any calls to -Canvas.save/Canvas.saveLayer and Canvas.restore, otherwise all -subsequent painting on this canvas may be affected, with potentially -hilarious but confusing results.

-

To paint text on a Canvas, use a TextPainter.

-

To paint an image on a Canvas:

-
    -
  1. -

    Obtain an ImageStream, for example by calling ImageProvider.resolve -on an AssetImage or NetworkImage object.

    -
  2. -
  3. -

    Whenever the ImageStream's underlying ImageInfo object changes -(see ImageStream.addListener), create a new instance of your custom -paint delegate, giving it the new ImageInfo object.

    -
  4. -
  5. -

    In your delegate's paint method, call the Canvas.drawImage, -Canvas.drawImageRect, or Canvas.drawImageNine methods to paint the -ImageInfo.image object, applying the ImageInfo.scale value to -obtain the correct rendering size.

    -
  6. -
- - - -## Implementation - -```dart -@override -void paint(Canvas canvas, Size size) { - final Path path_0 = Path(); - path_0.moveTo(size.width * 0.3580000, size.height * 0.1673307); - path_0.cubicTo( - size.width * 0.4170000, - size.height * 0.1406375, - size.width * 0.4836000, - size.height * 0.1314741, - size.width * 0.5480000, - size.height * 0.1400398, - ); - path_0.cubicTo( - size.width * 0.6134000, - size.height * 0.1486056, - size.width * 0.6760000, - size.height * 0.1764940, - size.width * 0.7260000, - size.height * 0.2193227, - ); - path_0.cubicTo( - size.width * 0.7740000, - size.height * 0.2595618, - size.width * 0.8106000, - size.height * 0.3129482, - size.width * 0.8308000, - size.height * 0.3719124, - ); - path_0.cubicTo( - size.width * 0.8540000, - size.height * 0.4390438, - size.width * 0.8558000, - size.height * 0.5133466, - size.width * 0.8360000, - size.height * 0.5810757, - ); - path_0.arcToPoint( - Offset(size.width * 0.7034000, size.height * 0.7677291), - radius: - Radius.elliptical(size.width * 0.3520000, size.height * 0.3505976), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_0.arcToPoint( - Offset(size.width * 0.5662000, size.height * 0.8264940), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_0.cubicTo( - size.width * 0.4822000, - size.height * 0.8424303, - size.width * 0.3930000, - size.height * 0.8268924, - size.width * 0.3202000, - size.height * 0.7826693, - ); - path_0.cubicTo( - size.width * 0.3156000, - size.height * 0.7806773, - size.width * 0.3112000, - size.height * 0.7756972, - size.width * 0.3058000, - size.height * 0.7778884, - ); - path_0.lineTo(size.width * 0.1780000, size.height * 0.8107570); - path_0.lineTo(size.width * 0.2120000, size.height * 0.6864542); - path_0.cubicTo( - size.width * 0.2140000, - size.height * 0.6820717, - size.width * 0.2100000, - size.height * 0.6784861, - size.width * 0.2080000, - size.height * 0.6745020, - ); - path_0.cubicTo( - size.width * 0.1694000, - size.height * 0.6159363, - size.width * 0.1494000, - size.height * 0.5454183, - size.width * 0.1514000, - size.height * 0.4752988, - ); - path_0.cubicTo( - size.width * 0.1534000, - size.height * 0.3318725, - size.width * 0.2454000, - size.height * 0.2183267, - size.width * 0.3574000, - size.height * 0.1665339, - ); - - final Paint paint0Fill = Paint()..style = PaintingStyle.fill; - paint0Fill.color = const Color(0xff40c351).withOpacity(1.0); - canvas.drawPath(path_0, paint0Fill); - - final Path path_1 = Path(); - path_1.moveTo(size.width * 0.3760000, size.height * 0.2908367); - path_1.cubicTo( - size.width * 0.3854000, - size.height * 0.2910359, - size.width * 0.3916000, - size.height * 0.2994024, - size.width * 0.3952000, - size.height * 0.3067729, - ); - path_1.cubicTo( - size.width * 0.4072000, - size.height * 0.3326693, - size.width * 0.4168000, - size.height * 0.3593625, - size.width * 0.4282000, - size.height * 0.3854582, - ); - path_1.cubicTo( - size.width * 0.4306000, - size.height * 0.3908367, - size.width * 0.4322000, - size.height * 0.3968127, - size.width * 0.4302000, - size.height * 0.4025896, - ); - path_1.cubicTo( - size.width * 0.4242000, - size.height * 0.4195219, - size.width * 0.4102000, - size.height * 0.4316733, - size.width * 0.3990000, - size.height * 0.4452191, - ); - path_1.cubicTo( - size.width * 0.3950000, - size.height * 0.4498008, - size.width * 0.3954000, - size.height * 0.4563745, - size.width * 0.3986000, - size.height * 0.4611554, - ); - path_1.arcToPoint( - Offset(size.width * 0.5456000, size.height * 0.5876494), - radius: - Radius.elliptical(size.width * 0.2600000, size.height * 0.2589641), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.5516000, - size.height * 0.5902390, - size.width * 0.5588000, - size.height * 0.5896414, - size.width * 0.5630000, - size.height * 0.5844622, - ); - path_1.arcToPoint( - Offset(size.width * 0.5970000, size.height * 0.5428287), - radius: - Radius.elliptical(size.width * 0.5640000, size.height * 0.5617530), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.6062000, - size.height * 0.5308765, - size.width * 0.6142000, - size.height * 0.5342629, - size.width * 0.6262000, - size.height * 0.5392430, - ); - path_1.lineTo(size.width * 0.7030000, size.height * 0.5760956); - path_1.cubicTo( - size.width * 0.7090000, - size.height * 0.5786853, - size.width * 0.7150000, - size.height * 0.5830677, - size.width * 0.7144000, - size.height * 0.5900398, - ); - path_1.cubicTo( - size.width * 0.7184000, - size.height * 0.6418327, - size.width * 0.6718000, - size.height * 0.6820717, - size.width * 0.6230000, - size.height * 0.6836653, - ); - path_1.cubicTo( - size.width * 0.4970000, - size.height * 0.6745020, - size.width * 0.4110000, - size.height * 0.6047809, - size.width * 0.3490000, - size.height * 0.5243028, - ); - path_1.cubicTo( - size.width * 0.3286000, - size.height * 0.4960159, - size.width * 0.3070000, - size.height * 0.4675299, - size.width * 0.2958000, - size.height * 0.4338645, - ); - path_1.cubicTo( - size.width * 0.2852000, - size.height * 0.4043825, - size.width * 0.2848000, - size.height * 0.3707171, - size.width * 0.2974000, - size.height * 0.3416335, - ); - path_1.cubicTo( - size.width * 0.3168000, - size.height * 0.3027888, - size.width * 0.3338000, - size.height * 0.2878486, - size.width * 0.3766000, - size.height * 0.2902390, - ); - path_1.close(); - path_1.moveTo(size.width * 0.2580000, size.height * 0.1422311); - path_1.cubicTo( - size.width * 0.3504000, - size.height * 0.07649402, - size.width * 0.4700000, - size.height * 0.05139442, - size.width * 0.5820000, - size.height * 0.07370518, - ); - path_1.arcToPoint( - Offset(size.width * 0.7774000, size.height * 0.1699203), - radius: - Radius.elliptical(size.width * 0.4180000, size.height * 0.4163347), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.9178000, size.height * 0.4368526), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.8918000, size.height * 0.6380478), - radius: - Radius.elliptical(size.width * 0.4220000, size.height * 0.4203187), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.cubicTo( - size.width * 0.8622000, - size.height * 0.7137450, - size.width * 0.8098000, - size.height * 0.7802789, - size.width * 0.7434000, - size.height * 0.8272908, - ); - path_1.arcToPoint( - Offset(size.width * 0.5254000, size.height * 0.9039841), - radius: - Radius.elliptical(size.width * 0.4180000, size.height * 0.4163347), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.2994000, size.height * 0.8541833), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.lineTo(size.width * 0.07540000, size.height * 0.9119522); - path_1.lineTo(size.width * 0.1344000, size.height * 0.6968127); - path_1.cubicTo( - size.width * 0.1356000, - size.height * 0.6942231, - size.width * 0.1338000, - size.height * 0.6920319, - size.width * 0.1324000, - size.height * 0.6900398, - ); - path_1.arcToPoint( - Offset(size.width * 0.08240000, size.height * 0.4310757), - radius: - Radius.elliptical(size.width * 0.4200000, size.height * 0.4183267), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.arcToPoint( - Offset(size.width * 0.2574000, size.height * 0.1422311), - radius: - Radius.elliptical(size.width * 0.4260000, size.height * 0.4243028), - rotation: 0, - largeArc: false, - clockwise: true, - ); - path_1.moveTo(size.width * 0.3568000, size.height * 0.1673307); - path_1.cubicTo( - size.width * 0.2898000, - size.height * 0.1972112, - size.width * 0.2328000, - size.height * 0.2486056, - size.width * 0.1964000, - size.height * 0.3121514, - ); - path_1.cubicTo( - size.width * 0.1676000, - size.height * 0.3619522, - size.width * 0.1516000, - size.height * 0.4187251, - size.width * 0.1504000, - size.height * 0.4760956, - ); - path_1.cubicTo( - size.width * 0.1484000, - size.height * 0.5462151, - size.width * 0.1684000, - size.height * 0.6165339, - size.width * 0.2070000, - size.height * 0.6752988, - ); - path_1.cubicTo( - size.width * 0.2090000, - size.height * 0.6788845, - size.width * 0.2126000, - size.height * 0.6826693, - size.width * 0.2110000, - size.height * 0.6872510, - ); - path_1.lineTo(size.width * 0.1770000, size.height * 0.8115538); - path_1.cubicTo( - size.width * 0.2196000, - size.height * 0.8007968, - size.width * 0.2622000, - size.height * 0.7892430, - size.width * 0.3050000, - size.height * 0.7784861, - ); - path_1.cubicTo( - size.width * 0.3104000, - size.height * 0.7764940, - size.width * 0.3150000, - size.height * 0.7808765, - size.width * 0.3194000, - size.height * 0.7832669, - ); - path_1.arcToPoint( - Offset(size.width * 0.5654000, size.height * 0.8272908), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.7026000, size.height * 0.7685259), - radius: - Radius.elliptical(size.width * 0.3460000, size.height * 0.3446215), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.8352000, size.height * 0.5818725), - radius: - Radius.elliptical(size.width * 0.3520000, size.height * 0.3505976), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.8300000, size.height * 0.3727092), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.7252000, size.height * 0.2201195), - radius: - Radius.elliptical(size.width * 0.3500000, size.height * 0.3486056), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.arcToPoint( - Offset(size.width * 0.5470000, size.height * 0.1408367), - radius: - Radius.elliptical(size.width * 0.3480000, size.height * 0.3466135), - rotation: 0, - largeArc: false, - clockwise: false, - ); - path_1.cubicTo( - size.width * 0.4830000, - size.height * 0.1322709, - size.width * 0.4162000, - size.height * 0.1414343, - size.width * 0.3570000, - size.height * 0.1681275, - ); - path_1.close(); - - final Paint paint1fill = Paint()..style = PaintingStyle.fill; - paint1fill.color = const Color(0xfffcfcfc).withOpacity(1.0); - canvas.drawPath(path_1, paint1fill); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/shouldRepaint.md b/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/shouldRepaint.md deleted file mode 100644 index 886f0bbbb..000000000 --- a/talawa-mobile-docs/custom_painters_whatsapp_logo/WhatsappLogo/shouldRepaint.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# shouldRepaint method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) shouldRepaint -(covariant [CustomPainter](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html) oldDelegate) - -_override_ - - - -

Called whenever a new instance of the custom painter delegate class is -provided to the RenderCustomPaint object, or any time that a new -CustomPaint object is created with a new instance of the custom painter -delegate class (which amounts to the same thing, because the latter is -implemented in terms of the former).

-

If the new instance represents different information than the old -instance, then the method should return true, otherwise it should return -false.

-

If the method returns false, then the paint call might be optimized -away.

-

It's possible that the paint method will get called even if -shouldRepaint returns false (e.g. if an ancestor or descendant needed to -be repainted). It's also possible that the paint method will get called -without shouldRepaint being called at all (e.g. if the box changes -size).

-

If a custom delegate has a particularly expensive paint function such that -repaints should be avoided as much as possible, a RepaintBoundary or -RenderRepaintBoundary (or other render object with -RenderObject.isRepaintBoundary set to true) might be helpful.

-

The oldDelegate argument will never be null.

- - - -## Implementation - -```dart -@override -bool shouldRepaint(covariant CustomPainter oldDelegate) { - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md b/talawa-mobile-docs/custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md deleted file mode 100644 index 9c4646508..000000000 --- a/talawa-mobile-docs/custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# whatsapp_logo library - - - - - - - - - - - -## Classes - -##### [WhatsappLogo](../custom_painters_whatsapp_logo/WhatsappLogo-class.md) - - - -This class draws the whatsapp logo using custom paint. -CustomPaint is a widget from the Flutter SDK, which enables -you to use a canvas to draw different shapes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md b/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md deleted file mode 100644 index 5a7cd4e32..000000000 --- a/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# direct_chat_demo_data library - - - - - - - - - - - - - - -## Constants - -##### [directChatDemoData](../demo_server_data_direct_chat_demo_data/directChatDemoData-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> - - - -This file contains demo data. - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/directChatDemoData-constant.md b/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/directChatDemoData-constant.md deleted file mode 100644 index 213ffe978..000000000 --- a/talawa-mobile-docs/demo_server_data_direct_chat_demo_data/directChatDemoData-constant.md +++ /dev/null @@ -1,200 +0,0 @@ - - - -# directChatDemoData top-level constant - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> const directChatDemoData - - - - - -

This file contains demo data.

-

It contains a list of type Map<String, Object> and sample data of chats.

- - - -## Implementation - -```dart -const directChatDemoData = [ - { - "sender": { - "name": "Sender 1", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Last message from the sender.", - "bool": "True" - }, - "unreadCount": 6, - }, - { - "sender": { - "name": "Sender 2", - "id": "sadiufghbasdqwuibnnads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Last message from the sender.", - "bool": "True" - }, - "unreadCount": 6, - }, - { - "sender": { - "name": "Sender 8", - "id": "sadiusfgafghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 7", - "id": "sasdasddiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 6", - "id": "sadiufghbassadasddqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 5", - "id": "sadiufghbasdqwsaduibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender 5", - "id": "sadiufghbasdqwdfdibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 4", - "id": "sadiufghbsdasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 3, - }, - { - "sender": { - "name": "Sender 41", - "id": "sadiufghbadgsdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 1, - }, - { - "sender": { - "name": "Sender 13", - "id": "sadiufghbadsfsdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "lastMessage": { - "sender": { - "name": "Sender Name", - "id": "sadiufghbasdqwuibnuads", - "image": "sender_profile_inmage_url" - }, - "messageID": "asdasdfasdfgasdf", - "text": "Latest message", - "bool": "True" - }, - "unreadCount": 8, - }, -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md b/talawa-mobile-docs/demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md deleted file mode 100644 index 64a23f76d..000000000 --- a/talawa-mobile-docs/demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# events_demo_data library - - - - - - - - - - - - - - -## Constants - -##### [eventsDemoData](../demo_server_data_events_demo_data/eventsDemoData-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> - - - -This file contains demo data. It contains a list of type Map<String, Object> -and sample data of events. - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_events_demo_data/eventsDemoData-constant.md b/talawa-mobile-docs/demo_server_data_events_demo_data/eventsDemoData-constant.md deleted file mode 100644 index 72455cde7..000000000 --- a/talawa-mobile-docs/demo_server_data_events_demo_data/eventsDemoData-constant.md +++ /dev/null @@ -1,229 +0,0 @@ - - - -# eventsDemoData top-level constant - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> const eventsDemoData - - - - - -

This file contains demo data. It contains a list of type Map<String, Object> -and sample data of events.

- - - -## Implementation - -```dart -const eventsDemoData = [ - { - "title": "Calculus", - "description": - "This course introduces calculus using analytic geometry functions. Topics include limits and continuity, derivatives, optimization, related rates, graphing and other applications of derivatives, definite and indefinite integrals, and numerical integration.", - "attendees": "50", - "location": "Lostilos", - "recurring": "false", - "allDay": "true", - "startDate": "1 Aug", - "endDate": "15 Aug", - "startTime": "11am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "false", - "isRegisterable": "true", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd" - }, - "registrants": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "name": 'Mathematicians', - "image": ' ', - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd" - } - }, - }, - { - "title": "UI/UX", - "description": - "UX design refers to the term “user experience design”, while UI stands for “user interface design”. Both elements are crucial to a product and work closely together.", - "attendees": "80", - "location": "Tokyo, Japan", - "recurring": "false", - "allDay": "true", - "startDate": "5 May", - "endDate": "13 May", - "startTime": "2am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "true", - "isRegisterable": "true", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd" - }, - "registrants": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "name": 'Courses', - "image": ' ', - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd" - } - }, - }, - { - "title": "System Design", - "description": - "Systems design is the process of defining the architecture, product design, modules, interfaces, and data for a system to satisfy specified requirements. Systems design could be seen as the application of systems theory to product development.", - "attendees": "29", - "location": "Shimla, India", - "recurring": "false", - "allDay": "true", - "startDate": "15 Dec", - "endDate": "18 Aug", - "startTime": "8am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "false", - "isSubscribed": "false", - "isRegisterable": "true", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd" - }, - "registrants": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "image": ' ', - "name": 'Computer Science', - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd" - } - }, - }, - { - "title": "Gaming", - // ignore: missing_whitespace_between_adjacent_strings - "description": - "Cyberpunk 2077 is a 2020 action role-playing v_ideo game developed and published by CD Projekt. The story takes place in Night City, an open world set in the Cyberpunk universe.", - - "attendees": "5k+", - "location": "Nagpur, India", - "recurring": "false", - "allDay": "true", - "startDate": "1 Aug", - "endDate": "15 Aug", - "startTime": "11am", - "endTime": "3pm", - "recurrence": "MONTHLY", - "isPublic": "true", - "isSubscribed": "true", - "isRegisterable": "true", - - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd" - }, - "registrants": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - {"firstName": "Warren", "lastName": "Buff", "_id": "asdasdasd"}, - {"firstName": "Bustin", "lastName": "Jiber", "_id": "asdasdasd"}, - ], - "admins": [ - {"firstName": "Utkarsh", "lastName": "Shendge", "_id": "asdasdasd"}, - ], - "organization": { - "_id": '1', - "image": ' ', - "name": 'Cyclone', - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "_id": "asdasdasd" - } - }, - } -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md b/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md deleted file mode 100644 index 90c5b02d0..000000000 --- a/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# pinned_post_demo_data library - - - - - - - - - - - - - - -## Constants - -##### [pinnedPostsDemoData](../demo_server_data_pinned_post_demo_data/pinnedPostsDemoData-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> - - - -This file contains demo data for pinned posts. It contains a list of type Map<String, Object> and sample data. - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/pinnedPostsDemoData-constant.md b/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/pinnedPostsDemoData-constant.md deleted file mode 100644 index e932c9d7e..000000000 --- a/talawa-mobile-docs/demo_server_data_pinned_post_demo_data/pinnedPostsDemoData-constant.md +++ /dev/null @@ -1,193 +0,0 @@ - - - -# pinnedPostsDemoData top-level constant - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> const pinnedPostsDemoData - - - - - -

This file contains demo data for pinned posts. It contains a list of type Map<String, Object> and sample data.

- - - -## Implementation - -```dart -const pinnedPostsDemoData = [ - { - "_id": "1", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"} - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - ] - }, - { - "_id": "2", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Ranchhod Das", - "lastName": "Chanchad", - "id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"} - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - ] - }, - { - "_id": "3", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"} - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - ] - }, - { - "_id": "4", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": "image url string", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shendge", - "id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"} - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"} - }, - ] - }, -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md b/talawa-mobile-docs/demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md deleted file mode 100644 index 2e26a035a..000000000 --- a/talawa-mobile-docs/demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# post_demo_data library - - - - - - - - - - - - - - -## Constants - -##### [postsDemoData](../demo_server_data_post_demo_data/postsDemoData-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> - - - -This file contains demo data for posts. It contains a list of type Map<String, Object> -and sample data of posts. - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/demo_server_data_post_demo_data/postsDemoData-constant.md b/talawa-mobile-docs/demo_server_data_post_demo_data/postsDemoData-constant.md deleted file mode 100644 index aa96891f7..000000000 --- a/talawa-mobile-docs/demo_server_data_post_demo_data/postsDemoData-constant.md +++ /dev/null @@ -1,214 +0,0 @@ - - - -# postsDemoData top-level constant - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)>> const postsDemoData - - - - - -

This file contains demo data for posts. It contains a list of type Map<String, Object> -and sample data of posts.

- - - -## Implementation - -```dart -const postsDemoData = [ - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "_id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"} - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "5", "_id": "asdasdasdas"} - }, - ] - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Ranchhod Das Chhanchad", - "lastName": "Chandla", - "_id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"} - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - ] - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Ritik", - "lastName": "Srivastav", - "_id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"} - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - ] - }, - { - "_id": "asdasdasd", - "text": - "Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Andro_id in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.", - "createdAt": "created at string", - "imageUrl": "image url string", - "creator": { - "firstName": "Utkarsh", - "lastName": "Shengde", - "_id": "asdasdasd" - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "_id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "_id": "asdasdasdas"} - ], - "comments": [ - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - { - "_id": "commentID", - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "_id": "asdasdasdas"} - }, - ] - }, -]; -``` - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/CallFor.md b/talawa-mobile-docs/enums_enums/CallFor.md deleted file mode 100644 index c508c6110..000000000 --- a/talawa-mobile-docs/enums_enums/CallFor.md +++ /dev/null @@ -1,149 +0,0 @@ - - - -# CallFor enum - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- CallFor - - - - - - -## Constructors - -[CallFor](../enums_enums/CallFor/CallFor.md) () - - _const_ - - -## Values - -##### [login](../enums_enums/CallFor.md) const [CallFor](../enums_enums/CallFor.md) - - - - - - - - -##### [signup](../enums_enums/CallFor.md) const [CallFor](../enums_enums/CallFor.md) - - - - - - - - -##### [joinPublicOrg](../enums_enums/CallFor.md) const [CallFor](../enums_enums/CallFor.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/CallFor/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[CallFor](../enums_enums/CallFor.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/CallFor/CallFor.md b/talawa-mobile-docs/enums_enums/CallFor/CallFor.md deleted file mode 100644 index 1f869b15f..000000000 --- a/talawa-mobile-docs/enums_enums/CallFor/CallFor.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CallFor constructor - - - - - - -const -CallFor() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/CallFor/values-constant.md b/talawa-mobile-docs/enums_enums/CallFor/values-constant.md deleted file mode 100644 index cff3cf6c2..000000000 --- a/talawa-mobile-docs/enums_enums/CallFor/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[CallFor](../../enums_enums/CallFor.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ChatState.md b/talawa-mobile-docs/enums_enums/ChatState.md deleted file mode 100644 index 739acc025..000000000 --- a/talawa-mobile-docs/enums_enums/ChatState.md +++ /dev/null @@ -1,150 +0,0 @@ - - - -# ChatState enum - - - - - - - -

Represents the state of the chat

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- ChatState - - - - - - -## Constructors - -[ChatState](../enums_enums/ChatState/ChatState.md) () - - _const_ - - -## Values - -##### [initial](../enums_enums/ChatState.md) const [ChatState](../enums_enums/ChatState.md) - - - - - - - - -##### [loading](../enums_enums/ChatState.md) const [ChatState](../enums_enums/ChatState.md) - - - - - - - - -##### [complete](../enums_enums/ChatState.md) const [ChatState](../enums_enums/ChatState.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/ChatState/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatState](../enums_enums/ChatState.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ChatState/ChatState.md b/talawa-mobile-docs/enums_enums/ChatState/ChatState.md deleted file mode 100644 index 1d0a6f303..000000000 --- a/talawa-mobile-docs/enums_enums/ChatState/ChatState.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ChatState constructor - - - - - - -const -ChatState() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ChatState/values-constant.md b/talawa-mobile-docs/enums_enums/ChatState/values-constant.md deleted file mode 100644 index 8d2ba60b5..000000000 --- a/talawa-mobile-docs/enums_enums/ChatState/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatState](../../enums_enums/ChatState.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/MessageType.md b/talawa-mobile-docs/enums_enums/MessageType.md deleted file mode 100644 index 5bc119ab1..000000000 --- a/talawa-mobile-docs/enums_enums/MessageType.md +++ /dev/null @@ -1,159 +0,0 @@ - - - -# MessageType enum - - - - - - - -

Represents the type of the Message

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- MessageType - - - - - - -## Constructors - -[MessageType](../enums_enums/MessageType/MessageType.md) () - - _const_ - - -## Values - -##### [error](../enums_enums/MessageType.md) const [MessageType](../enums_enums/MessageType.md) - - - - - - - - -##### [warning](../enums_enums/MessageType.md) const [MessageType](../enums_enums/MessageType.md) - - - - - - - - -##### [info](../enums_enums/MessageType.md) const [MessageType](../enums_enums/MessageType.md) - - - - - - - - -##### [random](../enums_enums/MessageType.md) const [MessageType](../enums_enums/MessageType.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/MessageType/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[MessageType](../enums_enums/MessageType.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/MessageType/MessageType.md b/talawa-mobile-docs/enums_enums/MessageType/MessageType.md deleted file mode 100644 index cfa1c55e6..000000000 --- a/talawa-mobile-docs/enums_enums/MessageType/MessageType.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# MessageType constructor - - - - - - -const -MessageType() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/MessageType/values-constant.md b/talawa-mobile-docs/enums_enums/MessageType/values-constant.md deleted file mode 100644 index d6a40b624..000000000 --- a/talawa-mobile-docs/enums_enums/MessageType/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[MessageType](../../enums_enums/MessageType.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ModalSheet.md b/talawa-mobile-docs/enums_enums/ModalSheet.md deleted file mode 100644 index ddfe171d2..000000000 --- a/talawa-mobile-docs/enums_enums/ModalSheet.md +++ /dev/null @@ -1,140 +0,0 @@ - - - -# ModalSheet enum - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- ModalSheet - - - - - - -## Constructors - -[ModalSheet](../enums_enums/ModalSheet/ModalSheet.md) () - - _const_ - - -## Values - -##### [donation](../enums_enums/ModalSheet.md) const [ModalSheet](../enums_enums/ModalSheet.md) - - - - - - - - -##### [invite](../enums_enums/ModalSheet.md) const [ModalSheet](../enums_enums/ModalSheet.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/ModalSheet/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ModalSheet](../enums_enums/ModalSheet.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ModalSheet/ModalSheet.md b/talawa-mobile-docs/enums_enums/ModalSheet/ModalSheet.md deleted file mode 100644 index 28f3e9e6e..000000000 --- a/talawa-mobile-docs/enums_enums/ModalSheet/ModalSheet.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ModalSheet constructor - - - - - - -const -ModalSheet() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ModalSheet/values-constant.md b/talawa-mobile-docs/enums_enums/ModalSheet/values-constant.md deleted file mode 100644 index b1da27eac..000000000 --- a/talawa-mobile-docs/enums_enums/ModalSheet/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ModalSheet](../../enums_enums/ModalSheet.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/TileType.md b/talawa-mobile-docs/enums_enums/TileType.md deleted file mode 100644 index 006412868..000000000 --- a/talawa-mobile-docs/enums_enums/TileType.md +++ /dev/null @@ -1,150 +0,0 @@ - - - -# TileType enum - - - - - - - -

Represents the type of the tile

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- TileType - - - - - - -## Constructors - -[TileType](../enums_enums/TileType/TileType.md) () - - _const_ - - -## Values - -##### [user](../enums_enums/TileType.md) const [TileType](../enums_enums/TileType.md) - - - - - - - - -##### [org](../enums_enums/TileType.md) const [TileType](../enums_enums/TileType.md) - - - - - - - - -##### [option](../enums_enums/TileType.md) const [TileType](../enums_enums/TileType.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/TileType/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TileType](../enums_enums/TileType.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/TileType/TileType.md b/talawa-mobile-docs/enums_enums/TileType/TileType.md deleted file mode 100644 index b9500b131..000000000 --- a/talawa-mobile-docs/enums_enums/TileType/TileType.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TileType constructor - - - - - - -const -TileType() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/TileType/values-constant.md b/talawa-mobile-docs/enums_enums/TileType/values-constant.md deleted file mode 100644 index 383d264e8..000000000 --- a/talawa-mobile-docs/enums_enums/TileType/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TileType](../../enums_enums/TileType.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ViewState.md b/talawa-mobile-docs/enums_enums/ViewState.md deleted file mode 100644 index d0cb942eb..000000000 --- a/talawa-mobile-docs/enums_enums/ViewState.md +++ /dev/null @@ -1,144 +0,0 @@ - - - -# ViewState enum - - - - - - - -

This file contains different enums. -The enum keyword is used to define an enumeration type in Dart. -The use case of enumeration is to store finite data members under the same type definition. -Represents the state of the view

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Enum](https://api.flutter.dev/flutter/dart-core/Enum-class.html) -- ViewState - - - - - - -## Constructors - -[ViewState](../enums_enums/ViewState/ViewState.md) () - - _const_ - - -## Values - -##### [idle](../enums_enums/ViewState.md) const [ViewState](../enums_enums/ViewState.md) - - - - - - - - -##### [busy](../enums_enums/ViewState.md) const [ViewState](../enums_enums/ViewState.md) - - - - - - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](https://api.flutter.dev/flutter/dart-core/Enum/index.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -A numeric identifier for the enumerated value. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [values](../enums_enums/ViewState/values-constant.md) const [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ViewState](../enums_enums/ViewState.md)> - - - -A constant List of the values in this enum, in order of their declaration. - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ViewState/ViewState.md b/talawa-mobile-docs/enums_enums/ViewState/ViewState.md deleted file mode 100644 index a491a741c..000000000 --- a/talawa-mobile-docs/enums_enums/ViewState/ViewState.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ViewState constructor - - - - - - -const -ViewState() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/ViewState/values-constant.md b/talawa-mobile-docs/enums_enums/ViewState/values-constant.md deleted file mode 100644 index 6360c8b8d..000000000 --- a/talawa-mobile-docs/enums_enums/ViewState/values-constant.md +++ /dev/null @@ -1,28 +0,0 @@ - - - -# values constant - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ViewState](../../enums_enums/ViewState.md)> const values - - - - - -

A constant List of the values in this enum, in order of their declaration.

- - - - - - - - - - diff --git a/talawa-mobile-docs/enums_enums/enums_enums-library.md b/talawa-mobile-docs/enums_enums/enums_enums-library.md deleted file mode 100644 index 3760572ad..000000000 --- a/talawa-mobile-docs/enums_enums/enums_enums-library.md +++ /dev/null @@ -1,76 +0,0 @@ - - - - -# enums library - - - - - - - - - - - - - - - - - -## Enums - -##### [CallFor](../enums_enums/CallFor.md) - - - - - - -##### [ChatState](../enums_enums/ChatState.md) - - - -Represents the state of the chat - - -##### [MessageType](../enums_enums/MessageType.md) - - - -Represents the type of the Message - - -##### [ModalSheet](../enums_enums/ModalSheet.md) - - - - - - -##### [TileType](../enums_enums/TileType.md) - - - -Represents the type of the tile - - -##### [ViewState](../enums_enums/ViewState.md) - - - -This file contains different enums. -The enum keyword is used to define an enumeration type in Dart. -The use case of enumeration is to store finite data members under the same type definition. -Represents the state of the view - - - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions-class.md b/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions-class.md deleted file mode 100644 index f8bb745e4..000000000 --- a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions-class.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# DefaultFirebaseOptions class - - - - - - - - - -

Default FirebaseOptions for use with your Firebase apps.

-

Example:

-
import 'firebase_options.dart';
-// ...
-await Firebase.initializeApp(
-  options: DefaultFirebaseOptions.currentPlatform,
-);
-
- - - - -## Constructors - -[DefaultFirebaseOptions](../firebase_options/DefaultFirebaseOptions/DefaultFirebaseOptions.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - -## Static Methods - -##### [android](../firebase_options/DefaultFirebaseOptions/android.md)([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> androidFirebaseOptions) [FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) - - - -Scaffolds androidFirebaseOptions around FirebaseOptions. - - - - -##### [currentPlatform](../firebase_options/DefaultFirebaseOptions/currentPlatform.md)([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> androidFirebaseOptions, [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> iosFirebaseOptions) [FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) - - - -Builds and returns FirebaseOptions based on the current platform. - - - - -##### [ios](../firebase_options/DefaultFirebaseOptions/ios.md)([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> iosFirebaseOptions) [FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) - - - -Scaffolds iosFirebaseOptions around FirebaseOptions. - - - - - - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/DefaultFirebaseOptions.md b/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/DefaultFirebaseOptions.md deleted file mode 100644 index b07fd7df2..000000000 --- a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/DefaultFirebaseOptions.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# DefaultFirebaseOptions constructor - - - - - - - -DefaultFirebaseOptions() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/android.md b/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/android.md deleted file mode 100644 index 8ca043804..000000000 --- a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/android.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# android method - - - - - - - - -[FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) android -([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> androidFirebaseOptions) - - - - - -

Scaffolds androidFirebaseOptions around FirebaseOptions.

-

params:

-
    -
  • androidFirebaseOptions: The options which we want to scaffold
  • -
-

returns:

-
    -
  • FirebaseOptions: Scaffolded FirebaseOptions
  • -
- - - -## Implementation - -```dart -static FirebaseOptions android(Map androidFirebaseOptions) => - FirebaseOptions( - apiKey: androidFirebaseOptions['apiKey'] as String, - appId: androidFirebaseOptions['appId'] as String, - messagingSenderId: - androidFirebaseOptions['messagingSenderId'] as String, - projectId: androidFirebaseOptions['projectId'] as String, - storageBucket: androidFirebaseOptions['storageBucket'] as String, - ); -``` - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/currentPlatform.md b/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/currentPlatform.md deleted file mode 100644 index 29bbbf15d..000000000 --- a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/currentPlatform.md +++ /dev/null @@ -1,72 +0,0 @@ - - - -# currentPlatform method - - - - - - - - -[FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) currentPlatform -([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> androidFirebaseOptions, [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> iosFirebaseOptions) - - - - - -

Builds and returns FirebaseOptions based on the current platform.

-

Switches on the current platform and calls android or iOS -methods accordingly to build the FirebaseOptions. Throws -UnsupportedError if the platform is other than these two.

-

params:

-
    -
  • androidFirebaseOptions: Firebase Options for Android
  • -
  • iosFirebaseOptions: Firebase Options for iOS
  • -
-

returns:

- - - - -## Implementation - -```dart -static FirebaseOptions currentPlatform( - Map androidFirebaseOptions, - Map iosFirebaseOptions, -) { - if (kIsWeb) { - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for web - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - } - switch (defaultTargetPlatform) { - case TargetPlatform.android: - return android(androidFirebaseOptions); - case TargetPlatform.iOS: - return ios(iosFirebaseOptions); - case TargetPlatform.macOS: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for macos - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - default: - throw UnsupportedError( - 'DefaultFirebaseOptions are not supported for this platform.', - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/ios.md b/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/ios.md deleted file mode 100644 index e6845082b..000000000 --- a/talawa-mobile-docs/firebase_options/DefaultFirebaseOptions/ios.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# ios method - - - - - - - - -[FirebaseOptions](https://pub.dev/documentation/firebase_core_platform_interface/4.8.0/firebase_core_platform_interface/FirebaseOptions-class.html) ios -([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> iosFirebaseOptions) - - - - - -

Scaffolds iosFirebaseOptions around FirebaseOptions.

-

more_info_if_required

-

params:

-
    -
  • iosFirebaseOptions: The options which we want to scaffold
  • -
-

returns:

-
    -
  • FirebaseOptions: Scaffolded FirebaseOptions
  • -
- - - -## Implementation - -```dart -static FirebaseOptions ios(Map iosFirebaseOptions) => - FirebaseOptions( - apiKey: iosFirebaseOptions['apiKey'] as String, - appId: iosFirebaseOptions['appId'] as String, - messagingSenderId: iosFirebaseOptions['messagingSenderId'] as String, - projectId: iosFirebaseOptions['projectId'] as String, - storageBucket: iosFirebaseOptions['storageBucket'] as String, - iosClientId: iosFirebaseOptions['iosClientId'] as String, - iosBundleId: iosFirebaseOptions['iosBundleId'] as String, - ); -``` - - - - - - - diff --git a/talawa-mobile-docs/firebase_options/firebase_options-library.md b/talawa-mobile-docs/firebase_options/firebase_options-library.md deleted file mode 100644 index 8d7486d18..000000000 --- a/talawa-mobile-docs/firebase_options/firebase_options-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# firebase_options library - - - - - - - - - - - -## Classes - -##### [DefaultFirebaseOptions](../firebase_options/DefaultFirebaseOptions-class.md) - - - -Default FirebaseOptions for use with your Firebase apps. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/generated_plugin_registrant/generated_plugin_registrant-library.md b/talawa-mobile-docs/generated_plugin_registrant/generated_plugin_registrant-library.md deleted file mode 100644 index 866146259..000000000 --- a/talawa-mobile-docs/generated_plugin_registrant/generated_plugin_registrant-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# generated_plugin_registrant library - - - - - - - - - - - - - - - - -## Functions - -##### [registerPlugins](../generated_plugin_registrant/registerPlugins.md)([Registrar](https://api.flutter.dev/flutter/flutter_web_plugins/Registrar-class.html) registrar) void - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/generated_plugin_registrant/registerPlugins.md b/talawa-mobile-docs/generated_plugin_registrant/registerPlugins.md deleted file mode 100644 index 0614534bc..000000000 --- a/talawa-mobile-docs/generated_plugin_registrant/registerPlugins.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# registerPlugins function - - - - - - - - - - -void registerPlugins -([Registrar](https://api.flutter.dev/flutter/flutter_web_plugins/Registrar-class.html) registrar) - - - - - - - - -## Implementation - -```dart -void registerPlugins(Registrar registrar) { - ConnectivityPlusPlugin.registerWith(registrar); - SharedPreferencesPlugin.registerWith(registrar); - UniLinksPlugin.registerWith(registrar); - VibrationWebPlugin.registerWith(registrar); - registrar.registerMessageHandler(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/index.json b/talawa-mobile-docs/index.json deleted file mode 100644 index 0ff4d0217..000000000 --- a/talawa-mobile-docs/index.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"access_request_screen","qualifiedName":"access_request_screen","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SendAccessRequest","qualifiedName":"access_request_screen.SendAccessRequest","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"requestAccess","enclosedBy":{"name":"access_request_screen","type":"library","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md"}},{"name":"SendAccessRequest","qualifiedName":"access_request_screen.SendAccessRequest.SendAccessRequest","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/SendAccessRequest.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SendAccessRequest","type":"class","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md"}},{"name":"build","qualifiedName":"access_request_screen.SendAccessRequest.build","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"SendAccessRequest","type":"class","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md"}},{"name":"org","qualifiedName":"access_request_screen.SendAccessRequest.org","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/org.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SendAccessRequest","type":"class","href":"views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md"}},{"name":"access_request_view_model","qualifiedName":"access_request_view_model","href":"view_model_access_request_view_model/view_model_access_request_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AccessScreenViewModel","qualifiedName":"access_request_view_model.AccessScreenViewModel","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"access_request_view_model","type":"library","href":"view_model_access_request_view_model/view_model_access_request_view_model-library.md"}},{"name":"AccessScreenViewModel","qualifiedName":"access_request_view_model.AccessScreenViewModel.AccessScreenViewModel","href":"view_model_access_request_view_model/AccessScreenViewModel/AccessScreenViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"initialise","qualifiedName":"access_request_view_model.AccessScreenViewModel.initialise","href":"view_model_access_request_view_model/AccessScreenViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"optionalMessageController","qualifiedName":"access_request_view_model.AccessScreenViewModel.optionalMessageController","href":"view_model_access_request_view_model/AccessScreenViewModel/optionalMessageController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"orgId","qualifiedName":"access_request_view_model.AccessScreenViewModel.orgId","href":"view_model_access_request_view_model/AccessScreenViewModel/orgId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"organizations","qualifiedName":"access_request_view_model.AccessScreenViewModel.organizations","href":"view_model_access_request_view_model/AccessScreenViewModel/organizations.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"selectedOrganization","qualifiedName":"access_request_view_model.AccessScreenViewModel.selectedOrganization","href":"view_model_access_request_view_model/AccessScreenViewModel/selectedOrganization.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"sendMembershipRequest","qualifiedName":"access_request_view_model.AccessScreenViewModel.sendMembershipRequest","href":"view_model_access_request_view_model/AccessScreenViewModel/sendMembershipRequest.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AccessScreenViewModel","type":"class","href":"view_model_access_request_view_model/AccessScreenViewModel-class.md"}},{"name":"add_members_bottom_sheet","qualifiedName":"add_members_bottom_sheet","href":"widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventBottomSheet","qualifiedName":"add_members_bottom_sheet.EventBottomSheet","href":"widgets_add_members_bottom_sheet/EventBottomSheet-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Adds members to an event.","enclosedBy":{"name":"add_members_bottom_sheet","type":"library","href":"widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md"}},{"name":"EventBottomSheet","qualifiedName":"add_members_bottom_sheet.EventBottomSheet.EventBottomSheet","href":"widgets_add_members_bottom_sheet/EventBottomSheet/EventBottomSheet.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventBottomSheet","type":"class","href":"widgets_add_members_bottom_sheet/EventBottomSheet-class.md"}},{"name":"addUserBottomSheet","qualifiedName":"add_members_bottom_sheet.EventBottomSheet.addUserBottomSheet","href":"widgets_add_members_bottom_sheet/EventBottomSheet/addUserBottomSheet.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function creates a modal material design bottom sheet.","enclosedBy":{"name":"EventBottomSheet","type":"class","href":"widgets_add_members_bottom_sheet/EventBottomSheet-class.md"}},{"name":"add_post_page","qualifiedName":"add_post_page","href":"views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AddPost","qualifiedName":"add_post_page.AddPost","href":"views_after_auth_screens_add_post_page/AddPost-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"AddPost returns a widget to add(upload) the post.","enclosedBy":{"name":"add_post_page","type":"library","href":"views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md"}},{"name":"AddPost","qualifiedName":"add_post_page.AddPost.AddPost","href":"views_after_auth_screens_add_post_page/AddPost/AddPost.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AddPost","type":"class","href":"views_after_auth_screens_add_post_page/AddPost-class.md"}},{"name":"build","qualifiedName":"add_post_page.AddPost.build","href":"views_after_auth_screens_add_post_page/AddPost/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"AddPost","type":"class","href":"views_after_auth_screens_add_post_page/AddPost-class.md"}},{"name":"drawerKey","qualifiedName":"add_post_page.AddPost.drawerKey","href":"views_after_auth_screens_add_post_page/AddPost/drawerKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"DrawerKey.","enclosedBy":{"name":"AddPost","type":"class","href":"views_after_auth_screens_add_post_page/AddPost-class.md"}},{"name":"model","qualifiedName":"add_post_page.model","href":"views_after_auth_screens_add_post_page/model.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"Add Post View Model.","enclosedBy":{"name":"add_post_page","type":"library","href":"views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md"}},{"name":"add_post_view_model","qualifiedName":"add_post_view_model","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AddPostViewModel","qualifiedName":"add_post_view_model.AddPostViewModel","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"AddPostViewModel class have different functions that are used.","enclosedBy":{"name":"add_post_view_model","type":"library","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md"}},{"name":"AddPostViewModel","qualifiedName":"add_post_view_model.AddPostViewModel.AddPostViewModel","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/AddPostViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"controller","qualifiedName":"add_post_view_model.AddPostViewModel.controller","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/controller.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Post body text controller.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"getImageFromGallery","qualifiedName":"add_post_view_model.AddPostViewModel.getImageFromGallery","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/getImageFromGallery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get the image from gallery.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"imageFile","qualifiedName":"add_post_view_model.AddPostViewModel.imageFile","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/imageFile.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The image file that is to be uploaded.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"initialise","qualifiedName":"add_post_view_model.AddPostViewModel.initialise","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is usedto do initialisation of stuff in the view model.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"orgName","qualifiedName":"add_post_view_model.AddPostViewModel.orgName","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/orgName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The organisation name.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"removeImage","qualifiedName":"add_post_view_model.AddPostViewModel.removeImage","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/removeImage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function removes the image selected.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"titleController","qualifiedName":"add_post_view_model.AddPostViewModel.titleController","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/titleController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Post title text controller.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"uploadPost","qualifiedName":"add_post_view_model.AddPostViewModel.uploadPost","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/uploadPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function uploads the post finally, and navigate the success message or error message in Snack Bar.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"userName","qualifiedName":"add_post_view_model.AddPostViewModel.userName","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/userName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The Username.","enclosedBy":{"name":"AddPostViewModel","type":"class","href":"view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md"}},{"name":"app_localization","qualifiedName":"app_localization","href":"utils_app_localization/utils_app_localization-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppLocalizations","qualifiedName":"app_localization.AppLocalizations","href":"utils_app_localization/AppLocalizations-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class provides methods to localize the application so that it can be available\nto users with different languages.","enclosedBy":{"name":"app_localization","type":"library","href":"utils_app_localization/utils_app_localization-library.md"}},{"name":"AppLocalizations","qualifiedName":"app_localization.AppLocalizations.AppLocalizations","href":"utils_app_localization/AppLocalizations/AppLocalizations.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"delegate","qualifiedName":"app_localization.AppLocalizations.delegate","href":"utils_app_localization/AppLocalizations/delegate-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"isTest","qualifiedName":"app_localization.AppLocalizations.isTest","href":"utils_app_localization/AppLocalizations/isTest.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"load","qualifiedName":"app_localization.AppLocalizations.load","href":"utils_app_localization/AppLocalizations/load.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"loadTest","qualifiedName":"app_localization.AppLocalizations.loadTest","href":"utils_app_localization/AppLocalizations/loadTest.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"locale","qualifiedName":"app_localization.AppLocalizations.locale","href":"utils_app_localization/AppLocalizations/locale.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"of","qualifiedName":"app_localization.AppLocalizations.of","href":"utils_app_localization/AppLocalizations/of.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"strictTranslate","qualifiedName":"app_localization.AppLocalizations.strictTranslate","href":"utils_app_localization/AppLocalizations/strictTranslate.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"translate","qualifiedName":"app_localization.AppLocalizations.translate","href":"utils_app_localization/AppLocalizations/translate.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizations","type":"class","href":"utils_app_localization/AppLocalizations-class.md"}},{"name":"AppLocalizationsDelegate","qualifiedName":"app_localization.AppLocalizationsDelegate","href":"utils_app_localization/AppLocalizationsDelegate-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"app_localization","type":"library","href":"utils_app_localization/utils_app_localization-library.md"}},{"name":"AppLocalizationsDelegate","qualifiedName":"app_localization.AppLocalizationsDelegate.AppLocalizationsDelegate","href":"utils_app_localization/AppLocalizationsDelegate/AppLocalizationsDelegate.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizationsDelegate","type":"class","href":"utils_app_localization/AppLocalizationsDelegate-class.md"}},{"name":"isSupported","qualifiedName":"app_localization.AppLocalizationsDelegate.isSupported","href":"utils_app_localization/AppLocalizationsDelegate/isSupported.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Whether resources for the given locale can be loaded by this delegate.","enclosedBy":{"name":"AppLocalizationsDelegate","type":"class","href":"utils_app_localization/AppLocalizationsDelegate-class.md"}},{"name":"isTest","qualifiedName":"app_localization.AppLocalizationsDelegate.isTest","href":"utils_app_localization/AppLocalizationsDelegate/isTest.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLocalizationsDelegate","type":"class","href":"utils_app_localization/AppLocalizationsDelegate-class.md"}},{"name":"load","qualifiedName":"app_localization.AppLocalizationsDelegate.load","href":"utils_app_localization/AppLocalizationsDelegate/load.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Start loading the resources for locale. The returned future completes\nwhen the resources have finished loading.","enclosedBy":{"name":"AppLocalizationsDelegate","type":"class","href":"utils_app_localization/AppLocalizationsDelegate-class.md"}},{"name":"shouldReload","qualifiedName":"app_localization.AppLocalizationsDelegate.shouldReload","href":"utils_app_localization/AppLocalizationsDelegate/shouldReload.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Returns true if the resources for this delegate should be loaded\nagain by calling the load method.","enclosedBy":{"name":"AppLocalizationsDelegate","type":"class","href":"utils_app_localization/AppLocalizationsDelegate-class.md"}},{"name":"app_settings_page","qualifiedName":"app_settings_page","href":"views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppSettingsPage","qualifiedName":"app_settings_page.AppSettingsPage","href":"views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"AppSettingsPage is a widget that has mutable state _AppSettingsPageState.","enclosedBy":{"name":"app_settings_page","type":"library","href":"views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md"}},{"name":"AppSettingsPage","qualifiedName":"app_settings_page.AppSettingsPage.AppSettingsPage","href":"views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/AppSettingsPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppSettingsPage","type":"class","href":"views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md"}},{"name":"createState","qualifiedName":"app_settings_page.AppSettingsPage.createState","href":"views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"AppSettingsPage","type":"class","href":"views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md"}},{"name":"apptheme","qualifiedName":"apptheme","href":"apptheme/apptheme-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppTheme","qualifiedName":"apptheme.AppTheme","href":"apptheme/AppTheme-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"apptheme","type":"library","href":"apptheme/apptheme-library.md"}},{"name":"AppTheme","qualifiedName":"apptheme.AppTheme.AppTheme","href":"apptheme/AppTheme/AppTheme.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"blackPrimary","qualifiedName":"apptheme.AppTheme.blackPrimary","href":"apptheme/AppTheme/blackPrimary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"blackSecondary","qualifiedName":"apptheme.AppTheme.blackSecondary","href":"apptheme/AppTheme/blackSecondary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"blackTertiary","qualifiedName":"apptheme.AppTheme.blackTertiary","href":"apptheme/AppTheme/blackTertiary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"blue","qualifiedName":"apptheme.AppTheme.blue","href":"apptheme/AppTheme/blue-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"bodyText1","qualifiedName":"apptheme.AppTheme.bodyText1","href":"apptheme/AppTheme/bodyText1.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"bodyText2","qualifiedName":"apptheme.AppTheme.bodyText2","href":"apptheme/AppTheme/bodyText2.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"bodyText3","qualifiedName":"apptheme.AppTheme.bodyText3","href":"apptheme/AppTheme/bodyText3.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"button","qualifiedName":"apptheme.AppTheme.button","href":"apptheme/AppTheme/button.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"green","qualifiedName":"apptheme.AppTheme.green","href":"apptheme/AppTheme/green-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"grey","qualifiedName":"apptheme.AppTheme.grey","href":"apptheme/AppTheme/grey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline1","qualifiedName":"apptheme.AppTheme.headline1","href":"apptheme/AppTheme/headline1.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline2","qualifiedName":"apptheme.AppTheme.headline2","href":"apptheme/AppTheme/headline2.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline3","qualifiedName":"apptheme.AppTheme.headline3","href":"apptheme/AppTheme/headline3.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline4","qualifiedName":"apptheme.AppTheme.headline4","href":"apptheme/AppTheme/headline4.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline5","qualifiedName":"apptheme.AppTheme.headline5","href":"apptheme/AppTheme/headline5.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"headline6","qualifiedName":"apptheme.AppTheme.headline6","href":"apptheme/AppTheme/headline6.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"lightGrey","qualifiedName":"apptheme.AppTheme.lightGrey","href":"apptheme/AppTheme/lightGrey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"overline","qualifiedName":"apptheme.AppTheme.overline","href":"apptheme/AppTheme/overline.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"primary","qualifiedName":"apptheme.AppTheme.primary","href":"apptheme/AppTheme/primary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"red","qualifiedName":"apptheme.AppTheme.red","href":"apptheme/AppTheme/red-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"secondary","qualifiedName":"apptheme.AppTheme.secondary","href":"apptheme/AppTheme/secondary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"shadow","qualifiedName":"apptheme.AppTheme.shadow","href":"apptheme/AppTheme/shadow-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"subtitle1","qualifiedName":"apptheme.AppTheme.subtitle1","href":"apptheme/AppTheme/subtitle1.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"subtitle2","qualifiedName":"apptheme.AppTheme.subtitle2","href":"apptheme/AppTheme/subtitle2.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"tertiary","qualifiedName":"apptheme.AppTheme.tertiary","href":"apptheme/AppTheme/tertiary-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"title","qualifiedName":"apptheme.AppTheme.title","href":"apptheme/AppTheme/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"white","qualifiedName":"apptheme.AppTheme.white","href":"apptheme/AppTheme/white-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"yellow","qualifiedName":"apptheme.AppTheme.yellow","href":"apptheme/AppTheme/yellow-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"apptheme/AppTheme-class.md"}},{"name":"base_view","qualifiedName":"base_view","href":"views_base_view/views_base_view-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"BaseView","qualifiedName":"base_view.BaseView","href":"views_base_view/BaseView-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"base_view","type":"library","href":"views_base_view/views_base_view-library.md"}},{"name":"BaseView","qualifiedName":"base_view.BaseView.BaseView","href":"views_base_view/BaseView/BaseView.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseView","type":"class","href":"views_base_view/BaseView-class.md"}},{"name":"builder","qualifiedName":"base_view.BaseView.builder","href":"views_base_view/BaseView/builder.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseView","type":"class","href":"views_base_view/BaseView-class.md"}},{"name":"createState","qualifiedName":"base_view.BaseView.createState","href":"views_base_view/BaseView/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"BaseView","type":"class","href":"views_base_view/BaseView-class.md"}},{"name":"onModelReady","qualifiedName":"base_view.BaseView.onModelReady","href":"views_base_view/BaseView/onModelReady.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseView","type":"class","href":"views_base_view/BaseView-class.md"}},{"name":"base_view_model","qualifiedName":"base_view_model","href":"view_model_base_view_model/view_model_base_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"BaseModel","qualifiedName":"base_view_model.BaseModel","href":"view_model_base_view_model/BaseModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"base_view_model","type":"library","href":"view_model_base_view_model/view_model_base_view_model-library.md"}},{"name":"BaseModel","qualifiedName":"base_view_model.BaseModel.BaseModel","href":"view_model_base_view_model/BaseModel/BaseModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseModel","type":"class","href":"view_model_base_view_model/BaseModel-class.md"}},{"name":"isBusy","qualifiedName":"base_view_model.BaseModel.isBusy","href":"view_model_base_view_model/BaseModel/isBusy.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseModel","type":"class","href":"view_model_base_view_model/BaseModel-class.md"}},{"name":"setState","qualifiedName":"base_view_model.BaseModel.setState","href":"view_model_base_view_model/BaseModel/setState.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseModel","type":"class","href":"view_model_base_view_model/BaseModel-class.md"}},{"name":"state","qualifiedName":"base_view_model.BaseModel.state","href":"view_model_base_view_model/BaseModel/state.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"BaseModel","type":"class","href":"view_model_base_view_model/BaseModel-class.md"}},{"name":"change_password","qualifiedName":"change_password","href":"views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChangePass","qualifiedName":"change_password.ChangePass","href":"views_pre_auth_screens_change_password/ChangePass-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget lets the user change his/her password.\nThere are two input fields. The first one is for entering the new password, and the\nsecond one is for re-entering the password for verification.\nThere is a raised button which finally updates the password when pressed.","enclosedBy":{"name":"change_password","type":"library","href":"views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md"}},{"name":"ChangePass","qualifiedName":"change_password.ChangePass.ChangePass","href":"views_pre_auth_screens_change_password/ChangePass/ChangePass.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChangePass","type":"class","href":"views_pre_auth_screens_change_password/ChangePass-class.md"}},{"name":"createState","qualifiedName":"change_password.ChangePass.createState","href":"views_pre_auth_screens_change_password/ChangePass/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"ChangePass","type":"class","href":"views_pre_auth_screens_change_password/ChangePass-class.md"}},{"name":"chat_input_field","qualifiedName":"chat_input_field","href":"views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatInputField","qualifiedName":"chat_input_field.ChatInputField","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ChatInputField returns a widget that has mutable state _ChatInputFieldState.","enclosedBy":{"name":"chat_input_field","type":"library","href":"views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md"}},{"name":"ChatInputField","qualifiedName":"chat_input_field.ChatInputField.ChatInputField","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/ChatInputField.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatInputField","type":"class","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md"}},{"name":"chatId","qualifiedName":"chat_input_field.ChatInputField.chatId","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/chatId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"ChatId.","enclosedBy":{"name":"ChatInputField","type":"class","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md"}},{"name":"createState","qualifiedName":"chat_input_field.ChatInputField.createState","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"ChatInputField","type":"class","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md"}},{"name":"model","qualifiedName":"chat_input_field.ChatInputField.model","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"DirectChatViewModel instance.","enclosedBy":{"name":"ChatInputField","type":"class","href":"views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md"}},{"name":"chat_list_screen","qualifiedName":"chat_list_screen","href":"views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatPage","qualifiedName":"chat_list_screen.ChatPage","href":"views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ChatPage returns a stateless widget for current user Chat Page which renders\nthe list of all the users that the current user has chat with.","enclosedBy":{"name":"chat_list_screen","type":"library","href":"views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md"}},{"name":"ChatPage","qualifiedName":"chat_list_screen.ChatPage.ChatPage","href":"views_after_auth_screens_chat_chat_list_screen/ChatPage/ChatPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatPage","type":"class","href":"views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md"}},{"name":"build","qualifiedName":"chat_list_screen.ChatPage.build","href":"views_after_auth_screens_chat_chat_list_screen/ChatPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ChatPage","type":"class","href":"views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md"}},{"name":"chat_list_tile_data_model","qualifiedName":"chat_list_tile_data_model","href":"models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatListTileDataModel","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates JSON code using the JsonSerializable package.","enclosedBy":{"name":"chat_list_tile_data_model","type":"library","href":"models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md"}},{"name":"ChatListTileDataModel","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel.ChatListTileDataModel","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatListTileDataModel","type":"class","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md"}},{"name":"ChatListTileDataModel.fromJson","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel.fromJson","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatListTileDataModel","type":"class","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md"}},{"name":"id","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel.id","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatListTileDataModel","type":"class","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md"}},{"name":"toJson","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel.toJson","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel/toJson.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatListTileDataModel","type":"class","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md"}},{"name":"users","qualifiedName":"chat_list_tile_data_model.ChatListTileDataModel.users","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel/users.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatListTileDataModel","type":"class","href":"models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md"}},{"name":"chat_message","qualifiedName":"chat_message","href":"models_chats_chat_message/models_chats_chat_message-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatMessage","qualifiedName":"chat_message.ChatMessage","href":"models_chats_chat_message/ChatMessage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates JSON code for chat message using the JsonSerializable package.","enclosedBy":{"name":"chat_message","type":"library","href":"models_chats_chat_message/models_chats_chat_message-library.md"}},{"name":"ChatMessage","qualifiedName":"chat_message.ChatMessage.ChatMessage","href":"models_chats_chat_message/ChatMessage/ChatMessage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"ChatMessage.fromJson","qualifiedName":"chat_message.ChatMessage.fromJson","href":"models_chats_chat_message/ChatMessage/ChatMessage.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"id","qualifiedName":"chat_message.ChatMessage.id","href":"models_chats_chat_message/ChatMessage/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"messageContent","qualifiedName":"chat_message.ChatMessage.messageContent","href":"models_chats_chat_message/ChatMessage/messageContent.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"receiver","qualifiedName":"chat_message.ChatMessage.receiver","href":"models_chats_chat_message/ChatMessage/receiver.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"sender","qualifiedName":"chat_message.ChatMessage.sender","href":"models_chats_chat_message/ChatMessage/sender.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"toJson","qualifiedName":"chat_message.ChatMessage.toJson","href":"models_chats_chat_message/ChatMessage/toJson.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessage","type":"class","href":"models_chats_chat_message/ChatMessage-class.md"}},{"name":"chat_message_bubble","qualifiedName":"chat_message_bubble","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Message","qualifiedName":"chat_message_bubble.Message","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Message returns a widget for chat message in the bubble form.","enclosedBy":{"name":"chat_message_bubble","type":"library","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md"}},{"name":"Message","qualifiedName":"chat_message_bubble.Message.Message","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/Message/Message.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Message","type":"class","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md"}},{"name":"build","qualifiedName":"chat_message_bubble.Message.build","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/Message/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"Message","type":"class","href":"views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md"}},{"name":"chat_message_screen","qualifiedName":"chat_message_screen","href":"views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatMessageScreen","qualifiedName":"chat_message_screen.ChatMessageScreen","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ChatMessageScreen returns a StatelessWidget for showing the chat message screen.","enclosedBy":{"name":"chat_message_screen","type":"library","href":"views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md"}},{"name":"ChatMessageScreen","qualifiedName":"chat_message_screen.ChatMessageScreen.ChatMessageScreen","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/ChatMessageScreen.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessageScreen","type":"class","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md"}},{"name":"build","qualifiedName":"chat_message_screen.ChatMessageScreen.build","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ChatMessageScreen","type":"class","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md"}},{"name":"chatId","qualifiedName":"chat_message_screen.ChatMessageScreen.chatId","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/chatId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessageScreen","type":"class","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md"}},{"name":"model","qualifiedName":"chat_message_screen.ChatMessageScreen.model","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatMessageScreen","type":"class","href":"views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md"}},{"name":"chat_queries","qualifiedName":"chat_queries","href":"utils_chat_queries/utils_chat_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatQueries","qualifiedName":"chat_queries.ChatQueries","href":"utils_chat_queries/ChatQueries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates the queries dealing with chats.","enclosedBy":{"name":"chat_queries","type":"library","href":"utils_chat_queries/utils_chat_queries-library.md"}},{"name":"ChatQueries","qualifiedName":"chat_queries.ChatQueries.ChatQueries","href":"utils_chat_queries/ChatQueries/ChatQueries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatQueries","type":"class","href":"utils_chat_queries/ChatQueries-class.md"}},{"name":"fetchDirectChatMessagesByChatId","qualifiedName":"chat_queries.ChatQueries.fetchDirectChatMessagesByChatId","href":"utils_chat_queries/ChatQueries/fetchDirectChatMessagesByChatId.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatQueries","type":"class","href":"utils_chat_queries/ChatQueries-class.md"}},{"name":"fetchDirectChatsByUserId","qualifiedName":"chat_queries.ChatQueries.fetchDirectChatsByUserId","href":"utils_chat_queries/ChatQueries/fetchDirectChatsByUserId.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatQueries","type":"class","href":"utils_chat_queries/ChatQueries-class.md"}},{"name":"messageSentToDirectChatsubscription","qualifiedName":"chat_queries.ChatQueries.messageSentToDirectChatsubscription","href":"utils_chat_queries/ChatQueries/messageSentToDirectChatsubscription.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatQueries","type":"class","href":"utils_chat_queries/ChatQueries-class.md"}},{"name":"sendMessageToDirectChat","qualifiedName":"chat_queries.ChatQueries.sendMessageToDirectChat","href":"utils_chat_queries/ChatQueries/sendMessageToDirectChat.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatQueries","type":"class","href":"utils_chat_queries/ChatQueries-class.md"}},{"name":"chat_service","qualifiedName":"chat_service","href":"services_chat_service/services_chat_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatService","qualifiedName":"chat_service.ChatService","href":"services_chat_service/ChatService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ChatService class provides different services for direct chats of the user.","enclosedBy":{"name":"chat_service","type":"library","href":"services_chat_service/services_chat_service-library.md"}},{"name":"ChatService","qualifiedName":"chat_service.ChatService.ChatService","href":"services_chat_service/ChatService/ChatService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"chatListStream","qualifiedName":"chat_service.ChatService.chatListStream","href":"services_chat_service/ChatService/chatListStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"chatMessagesStream","qualifiedName":"chat_service.ChatService.chatMessagesStream","href":"services_chat_service/ChatService/chatMessagesStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"chatStream","qualifiedName":"chat_service.ChatService.chatStream","href":"services_chat_service/ChatService/chatStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"getDirectChatMessagesByChatId","qualifiedName":"chat_service.ChatService.getDirectChatMessagesByChatId","href":"services_chat_service/ChatService/getDirectChatMessagesByChatId.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get all the chat messages of a particular chat by the user.","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"getDirectChatsByUserId","qualifiedName":"chat_service.ChatService.getDirectChatsByUserId","href":"services_chat_service/ChatService/getDirectChatsByUserId.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get all the chats by the user.","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"sendMessageToDirectChat","qualifiedName":"chat_service.ChatService.sendMessageToDirectChat","href":"services_chat_service/ChatService/sendMessageToDirectChat.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to send the message in the direct chats.","enclosedBy":{"name":"ChatService","type":"class","href":"services_chat_service/ChatService-class.md"}},{"name":"chat_user","qualifiedName":"chat_user","href":"models_chats_chat_user/models_chats_chat_user-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatUser","qualifiedName":"chat_user.ChatUser","href":"models_chats_chat_user/ChatUser-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates JSON code for chat user using the JsonSerializable package.","enclosedBy":{"name":"chat_user","type":"library","href":"models_chats_chat_user/models_chats_chat_user-library.md"}},{"name":"ChatUser","qualifiedName":"chat_user.ChatUser.ChatUser","href":"models_chats_chat_user/ChatUser/ChatUser.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"firstName","qualifiedName":"chat_user.ChatUser.firstName","href":"models_chats_chat_user/ChatUser/firstName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"ChatUser.fromJson","qualifiedName":"chat_user.ChatUser.fromJson","href":"models_chats_chat_user/ChatUser/ChatUser.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"id","qualifiedName":"chat_user.ChatUser.id","href":"models_chats_chat_user/ChatUser/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"image","qualifiedName":"chat_user.ChatUser.image","href":"models_chats_chat_user/ChatUser/image.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"toJson","qualifiedName":"chat_user.ChatUser.toJson","href":"models_chats_chat_user/ChatUser/toJson.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatUser","type":"class","href":"models_chats_chat_user/ChatUser-class.md"}},{"name":"comment_model","qualifiedName":"comment_model","href":"models_comment_comment_model/models_comment_comment_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Comment","qualifiedName":"comment_model.Comment","href":"models_comment_comment_model/Comment-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns a Comment instance.","enclosedBy":{"name":"comment_model","type":"library","href":"models_comment_comment_model/models_comment_comment_model-library.md"}},{"name":"Comment","qualifiedName":"comment_model.Comment.Comment","href":"models_comment_comment_model/Comment/Comment.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"createdAt","qualifiedName":"comment_model.Comment.createdAt","href":"models_comment_comment_model/Comment/createdAt.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"creator","qualifiedName":"comment_model.Comment.creator","href":"models_comment_comment_model/Comment/creator.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"Comment.fromJson","qualifiedName":"comment_model.Comment.fromJson","href":"models_comment_comment_model/Comment/Comment.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"likeCount","qualifiedName":"comment_model.Comment.likeCount","href":"models_comment_comment_model/Comment/likeCount.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"post","qualifiedName":"comment_model.Comment.post","href":"models_comment_comment_model/Comment/post.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"text","qualifiedName":"comment_model.Comment.text","href":"models_comment_comment_model/Comment/text.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comment","type":"class","href":"models_comment_comment_model/Comment-class.md"}},{"name":"comment_queries","qualifiedName":"comment_queries","href":"utils_comment_queries/utils_comment_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CommentQueries","qualifiedName":"comment_queries.CommentQueries","href":"utils_comment_queries/CommentQueries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates the queries dealing with comments.","enclosedBy":{"name":"comment_queries","type":"library","href":"utils_comment_queries/utils_comment_queries-library.md"}},{"name":"CommentQueries","qualifiedName":"comment_queries.CommentQueries.CommentQueries","href":"utils_comment_queries/CommentQueries/CommentQueries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentQueries","type":"class","href":"utils_comment_queries/CommentQueries-class.md"}},{"name":"createComment","qualifiedName":"comment_queries.CommentQueries.createComment","href":"utils_comment_queries/CommentQueries/createComment.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentQueries","type":"class","href":"utils_comment_queries/CommentQueries-class.md"}},{"name":"getPostsComments","qualifiedName":"comment_queries.CommentQueries.getPostsComments","href":"utils_comment_queries/CommentQueries/getPostsComments.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentQueries","type":"class","href":"utils_comment_queries/CommentQueries-class.md"}},{"name":"comment_service","qualifiedName":"comment_service","href":"services_comment_service/services_comment_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CommentService","qualifiedName":"comment_service.CommentService","href":"services_comment_service/CommentService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CommentService class have different member functions which provides service in the context of commenting.","enclosedBy":{"name":"comment_service","type":"library","href":"services_comment_service/services_comment_service-library.md"}},{"name":"CommentService","qualifiedName":"comment_service.CommentService.CommentService","href":"services_comment_service/CommentService/CommentService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentService","type":"class","href":"services_comment_service/CommentService-class.md"}},{"name":"createComments","qualifiedName":"comment_service.CommentService.createComments","href":"services_comment_service/CommentService/createComments.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to add comment on the post.","enclosedBy":{"name":"CommentService","type":"class","href":"services_comment_service/CommentService-class.md"}},{"name":"getCommentsForPost","qualifiedName":"comment_service.CommentService.getCommentsForPost","href":"services_comment_service/CommentService/getCommentsForPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to fetch all comments on the post.","enclosedBy":{"name":"CommentService","type":"class","href":"services_comment_service/CommentService-class.md"}},{"name":"comments_view_model","qualifiedName":"comments_view_model","href":"view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CommentsViewModel","qualifiedName":"comments_view_model.CommentsViewModel","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CommentsViewModel class helps to serve the data from model\nand to react to user's input for Comment Widget.","enclosedBy":{"name":"comments_view_model","type":"library","href":"view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md"}},{"name":"CommentsViewModel","qualifiedName":"comments_view_model.CommentsViewModel.CommentsViewModel","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/CommentsViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"addCommentLocally","qualifiedName":"comments_view_model.CommentsViewModel.addCommentLocally","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/addCommentLocally.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"commentList","qualifiedName":"comments_view_model.CommentsViewModel.commentList","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/commentList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"createComment","qualifiedName":"comments_view_model.CommentsViewModel.createComment","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/createComment.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function add comment on the post.\nThe function uses createComments method provided by Comment Service.","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"getComments","qualifiedName":"comments_view_model.CommentsViewModel.getComments","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/getComments.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This methods fetch all comments on the post.\nThe function uses getCommentsForPost method by Comment Service.","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"initialise","qualifiedName":"comments_view_model.CommentsViewModel.initialise","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"postId","qualifiedName":"comments_view_model.CommentsViewModel.postId","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel/postId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentsViewModel","type":"class","href":"view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md"}},{"name":"constants","qualifiedName":"constants","href":"constants_constants/constants_constants-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"languages","qualifiedName":"constants.languages","href":"constants_constants/languages.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"This file contains the prototypes of all the languages available and supported currencies.","enclosedBy":{"name":"constants","type":"library","href":"constants_constants/constants_constants-library.md"}},{"name":"supportedCurrencies","qualifiedName":"constants.supportedCurrencies","href":"constants_constants/supportedCurrencies.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"constants","type":"library","href":"constants_constants/constants_constants-library.md"}},{"name":"create_event_form","qualifiedName":"create_event_form","href":"views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CreateEventForm","qualifiedName":"create_event_form.CreateEventForm","href":"views_after_auth_screens_events_create_event_form/CreateEventForm-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CreateEventForm returns a widget of a Form for creating events in the organization.\nThis widget is used in CreateEventPage widget.","enclosedBy":{"name":"create_event_form","type":"library","href":"views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md"}},{"name":"CreateEventForm","qualifiedName":"create_event_form.CreateEventForm.CreateEventForm","href":"views_after_auth_screens_events_create_event_form/CreateEventForm/CreateEventForm.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateEventForm","type":"class","href":"views_after_auth_screens_events_create_event_form/CreateEventForm-class.md"}},{"name":"build","qualifiedName":"create_event_form.CreateEventForm.build","href":"views_after_auth_screens_events_create_event_form/CreateEventForm/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CreateEventForm","type":"class","href":"views_after_auth_screens_events_create_event_form/CreateEventForm-class.md"}},{"name":"model","qualifiedName":"create_event_form.CreateEventForm.model","href":"views_after_auth_screens_events_create_event_form/CreateEventForm/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateEventForm","type":"class","href":"views_after_auth_screens_events_create_event_form/CreateEventForm-class.md"}},{"name":"create_event_page","qualifiedName":"create_event_page","href":"views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CreateEventPage","qualifiedName":"create_event_page.CreateEventPage","href":"views_after_auth_screens_events_create_event_page/CreateEventPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CreateEventPage returns a widget that has mutable state _CreateEventPageState.","enclosedBy":{"name":"create_event_page","type":"library","href":"views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md"}},{"name":"CreateEventPage","qualifiedName":"create_event_page.CreateEventPage.CreateEventPage","href":"views_after_auth_screens_events_create_event_page/CreateEventPage/CreateEventPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateEventPage","type":"class","href":"views_after_auth_screens_events_create_event_page/CreateEventPage-class.md"}},{"name":"createState","qualifiedName":"create_event_page.CreateEventPage.createState","href":"views_after_auth_screens_events_create_event_page/CreateEventPage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"CreateEventPage","type":"class","href":"views_after_auth_screens_events_create_event_page/CreateEventPage-class.md"}},{"name":"create_event_view_model","qualifiedName":"create_event_view_model","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CreateEventViewModel","qualifiedName":"create_event_view_model.CreateEventViewModel","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CreateEventViewModel class have methods to interact with model in.","enclosedBy":{"name":"create_event_view_model","type":"library","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md"}},{"name":"CreateEventViewModel","qualifiedName":"create_event_view_model.CreateEventViewModel.CreateEventViewModel","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/CreateEventViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"buildUserList","qualifiedName":"create_event_view_model.CreateEventViewModel.buildUserList","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/buildUserList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function build the user list.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"createEvent","qualifiedName":"create_event_view_model.CreateEventViewModel.createEvent","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/createEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to create the event for the organization.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"descriptionFocus","qualifiedName":"create_event_view_model.CreateEventViewModel.descriptionFocus","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/descriptionFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"DescriptionFocus FocusNode.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventDescriptionTextController","qualifiedName":"create_event_view_model.CreateEventViewModel.eventDescriptionTextController","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventDescriptionTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event Description Text Controller.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventEndDate","qualifiedName":"create_event_view_model.CreateEventViewModel.eventEndDate","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event End Date.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventEndTime","qualifiedName":"create_event_view_model.CreateEventViewModel.eventEndTime","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event End Time.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventLocationTextController","qualifiedName":"create_event_view_model.CreateEventViewModel.eventLocationTextController","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventLocationTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event Location Text Controller.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventStartDate","qualifiedName":"create_event_view_model.CreateEventViewModel.eventStartDate","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event Start Date.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventStartTime","qualifiedName":"create_event_view_model.CreateEventViewModel.eventStartTime","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event Start Time.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"eventTitleTextController","qualifiedName":"create_event_view_model.CreateEventViewModel.eventTitleTextController","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventTitleTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Event Title Text Controller.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"formKey","qualifiedName":"create_event_view_model.CreateEventViewModel.formKey","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/formKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Global FormKey.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"getCurrentOrgUsersList","qualifiedName":"create_event_view_model.CreateEventViewModel.getCurrentOrgUsersList","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getCurrentOrgUsersList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch all the users in the current organization and return List.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"getImageFromGallery","qualifiedName":"create_event_view_model.CreateEventViewModel.getImageFromGallery","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getImageFromGallery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get the image from gallery.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"imageFile","qualifiedName":"create_event_view_model.CreateEventViewModel.imageFile","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/imageFile.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Getter to return imageFile.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"initialize","qualifiedName":"create_event_view_model.CreateEventViewModel.initialize","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Function To Initialize.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"isPublicSwitch","qualifiedName":"create_event_view_model.CreateEventViewModel.isPublicSwitch","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isPublicSwitch.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Public Event or Not.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"isRegisterableSwitch","qualifiedName":"create_event_view_model.CreateEventViewModel.isRegisterableSwitch","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isRegisterableSwitch.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"If event is registerable after creation.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"latitude","qualifiedName":"create_event_view_model.CreateEventViewModel.latitude","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/latitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Latitude store.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"locationFocus","qualifiedName":"create_event_view_model.CreateEventViewModel.locationFocus","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/locationFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"LocationFocus FocusNode.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"longitude","qualifiedName":"create_event_view_model.CreateEventViewModel.longitude","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/longitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Longitude store.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"memberCheckedMap","qualifiedName":"create_event_view_model.CreateEventViewModel.memberCheckedMap","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/memberCheckedMap.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Getter to return members map.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"orgMembersList","qualifiedName":"create_event_view_model.CreateEventViewModel.orgMembersList","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/orgMembersList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Organisation Members List.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"removeImage","qualifiedName":"create_event_view_model.CreateEventViewModel.removeImage","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeImage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function remove the selected image.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"removeUserFromList","qualifiedName":"create_event_view_model.CreateEventViewModel.removeUserFromList","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeUserFromList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to remove a user from user's list.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"selectedMembers","qualifiedName":"create_event_view_model.CreateEventViewModel.selectedMembers","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/selectedMembers.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Getter to return selected members.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"titleFocus","qualifiedName":"create_event_view_model.CreateEventViewModel.titleFocus","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/titleFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"TitleFocus FocusNode.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"validate","qualifiedName":"create_event_view_model.CreateEventViewModel.validate","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/validate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"AutoValidateMode default to disabled.","enclosedBy":{"name":"CreateEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md"}},{"name":"create_task_page","qualifiedName":"create_task_page","href":"views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CreateTaskPage","qualifiedName":"create_task_page.CreateTaskPage","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CreateTaskPage returns a widget for page to create task for the user.","enclosedBy":{"name":"create_task_page","type":"library","href":"views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md"}},{"name":"CreateTaskPage","qualifiedName":"create_task_page.CreateTaskPage.CreateTaskPage","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage/CreateTaskPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskPage","type":"class","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md"}},{"name":"build","qualifiedName":"create_task_page.CreateTaskPage.build","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CreateTaskPage","type":"class","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md"}},{"name":"eventId","qualifiedName":"create_task_page.CreateTaskPage.eventId","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage/eventId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskPage","type":"class","href":"views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md"}},{"name":"create_task_view_model","qualifiedName":"create_task_view_model","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CreateTaskViewModel","qualifiedName":"create_task_view_model.CreateTaskViewModel","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CreateTaskViewModel class helps to interact with model to serve data\nand react to user's input in Create Task view.","enclosedBy":{"name":"create_task_view_model","type":"library","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md"}},{"name":"CreateTaskViewModel","qualifiedName":"create_task_view_model.CreateTaskViewModel.CreateTaskViewModel","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/CreateTaskViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"createTask","qualifiedName":"create_task_view_model.CreateTaskViewModel.createTask","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/createTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function creates a new task for an event.\nThe function uses createTask method provided by Task Services.","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"dispose","qualifiedName":"create_task_view_model.CreateTaskViewModel.dispose","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"editTask","qualifiedName":"create_task_view_model.CreateTaskViewModel.editTask","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/editTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function updates the task.\nThe function uses editTask method provided by Task Services.","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"fillTask","qualifiedName":"create_task_view_model.CreateTaskViewModel.fillTask","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/fillTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This functions fills the task controller data.","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"taskDescriptionTextController","qualifiedName":"create_task_view_model.CreateTaskViewModel.taskDescriptionTextController","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskDescriptionTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"taskEndDate","qualifiedName":"create_task_view_model.CreateTaskViewModel.taskEndDate","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"taskEndTime","qualifiedName":"create_task_view_model.CreateTaskViewModel.taskEndTime","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"taskTitleTextController","qualifiedName":"create_task_view_model.CreateTaskViewModel.taskTitleTextController","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskTitleTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CreateTaskViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md"}},{"name":"custom_alert_dialog","qualifiedName":"custom_alert_dialog","href":"widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomAlertDialog","qualifiedName":"custom_alert_dialog.CustomAlertDialog","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This Class returns CustomAlertDialog widget. Custom Alert Dialog is a popup\nthat appeared in the screen showing Alert message along with the event buttons.\nThis extends stateless widget that means it cannot change its state during the\nruntime of a application.","enclosedBy":{"name":"custom_alert_dialog","type":"library","href":"widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md"}},{"name":"CustomAlertDialog","qualifiedName":"custom_alert_dialog.CustomAlertDialog.CustomAlertDialog","href":"widgets_custom_alert_dialog/CustomAlertDialog/CustomAlertDialog.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"build","qualifiedName":"custom_alert_dialog.CustomAlertDialog.build","href":"widgets_custom_alert_dialog/CustomAlertDialog/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"dialogSubTitle","qualifiedName":"custom_alert_dialog.CustomAlertDialog.dialogSubTitle","href":"widgets_custom_alert_dialog/CustomAlertDialog/dialogSubTitle.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"dialogTitle","qualifiedName":"custom_alert_dialog.CustomAlertDialog.dialogTitle","href":"widgets_custom_alert_dialog/CustomAlertDialog/dialogTitle.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"reverse","qualifiedName":"custom_alert_dialog.CustomAlertDialog.reverse","href":"widgets_custom_alert_dialog/CustomAlertDialog/reverse.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"secondaryButtonTap","qualifiedName":"custom_alert_dialog.CustomAlertDialog.secondaryButtonTap","href":"widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonTap.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"secondaryButtonText","qualifiedName":"custom_alert_dialog.CustomAlertDialog.secondaryButtonText","href":"widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonText.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"success","qualifiedName":"custom_alert_dialog.CustomAlertDialog.success","href":"widgets_custom_alert_dialog/CustomAlertDialog/success.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"successText","qualifiedName":"custom_alert_dialog.CustomAlertDialog.successText","href":"widgets_custom_alert_dialog/CustomAlertDialog/successText.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAlertDialog","type":"class","href":"widgets_custom_alert_dialog/CustomAlertDialog-class.md"}},{"name":"custom_avatar","qualifiedName":"custom_avatar","href":"widgets_custom_avatar/widgets_custom_avatar-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomAvatar","qualifiedName":"custom_avatar.CustomAvatar","href":"widgets_custom_avatar/CustomAvatar-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Creates a custom avatar.\nThe avatar is created using the image provided,\nor the first alphabet with a standard background color.","enclosedBy":{"name":"custom_avatar","type":"library","href":"widgets_custom_avatar/widgets_custom_avatar-library.md"}},{"name":"CustomAvatar","qualifiedName":"custom_avatar.CustomAvatar.CustomAvatar","href":"widgets_custom_avatar/CustomAvatar/CustomAvatar.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"build","qualifiedName":"custom_avatar.CustomAvatar.build","href":"widgets_custom_avatar/CustomAvatar/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"cacheManager","qualifiedName":"custom_avatar.CustomAvatar.cacheManager","href":"widgets_custom_avatar/CustomAvatar/cacheManager.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"firstAlphabet","qualifiedName":"custom_avatar.CustomAvatar.firstAlphabet","href":"widgets_custom_avatar/CustomAvatar/firstAlphabet.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"fontSize","qualifiedName":"custom_avatar.CustomAvatar.fontSize","href":"widgets_custom_avatar/CustomAvatar/fontSize.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"imageUrl","qualifiedName":"custom_avatar.CustomAvatar.imageUrl","href":"widgets_custom_avatar/CustomAvatar/imageUrl.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"isImageNull","qualifiedName":"custom_avatar.CustomAvatar.isImageNull","href":"widgets_custom_avatar/CustomAvatar/isImageNull.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomAvatar","type":"class","href":"widgets_custom_avatar/CustomAvatar-class.md"}},{"name":"custom_drawer","qualifiedName":"custom_drawer","href":"widgets_custom_drawer/widgets_custom_drawer-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomDrawer","qualifiedName":"custom_drawer.CustomDrawer","href":"widgets_custom_drawer/CustomDrawer-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Creates a custom drawer for switching organizations.","enclosedBy":{"name":"custom_drawer","type":"library","href":"widgets_custom_drawer/widgets_custom_drawer-library.md"}},{"name":"CustomDrawer","qualifiedName":"custom_drawer.CustomDrawer.CustomDrawer","href":"widgets_custom_drawer/CustomDrawer/CustomDrawer.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawer","type":"class","href":"widgets_custom_drawer/CustomDrawer-class.md"}},{"name":"build","qualifiedName":"custom_drawer.CustomDrawer.build","href":"widgets_custom_drawer/CustomDrawer/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomDrawer","type":"class","href":"widgets_custom_drawer/CustomDrawer-class.md"}},{"name":"exitButton","qualifiedName":"custom_drawer.CustomDrawer.exitButton","href":"widgets_custom_drawer/CustomDrawer/exitButton.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Button to exit the organization.","enclosedBy":{"name":"CustomDrawer","type":"class","href":"widgets_custom_drawer/CustomDrawer-class.md"}},{"name":"homeModel","qualifiedName":"custom_drawer.CustomDrawer.homeModel","href":"widgets_custom_drawer/CustomDrawer/homeModel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"home model.","enclosedBy":{"name":"CustomDrawer","type":"class","href":"widgets_custom_drawer/CustomDrawer-class.md"}},{"name":"custom_drawer_view_model","qualifiedName":"custom_drawer_view_model","href":"view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomDrawerViewModel","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CustomDrawerViewModel class helps to serve the data and\nto react to user's input for Custom Dialog Widget.","enclosedBy":{"name":"custom_drawer_view_model","type":"library","href":"view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md"}},{"name":"CustomDrawerViewModel","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.CustomDrawerViewModel","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/CustomDrawerViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"controller","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.controller","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/controller.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"dispose","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.dispose","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"initialize","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.initialize","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"isPresentinSwitchableOrg","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.isPresentinSwitchableOrg","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/isPresentinSwitchableOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function checks switchOrg is present in the switchAbleOrg.","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"notifyListeners","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.notifyListeners","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/notifyListeners.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Call all the registered listeners.","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"selectedOrg","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.selectedOrg","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/selectedOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"setSelectedOrganizationName","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.setSelectedOrganizationName","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/setSelectedOrganizationName.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function switches the current organization to new organization.","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"switchAbleOrg","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.switchAbleOrg","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchAbleOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"switchOrg","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.switchOrg","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function switch the current organization to another organization,\nif the organization(want switch to) is present.","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"targets","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.targets","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/targets.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"tutorialCoachMark","qualifiedName":"custom_drawer_view_model.CustomDrawerViewModel.tutorialCoachMark","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/tutorialCoachMark.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomDrawerViewModel","type":"class","href":"view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md"}},{"name":"custom_list_tile","qualifiedName":"custom_list_tile","href":"widgets_custom_list_tile/widgets_custom_list_tile-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomListTile","qualifiedName":"custom_list_tile.CustomListTile","href":"widgets_custom_list_tile/CustomListTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Returns a widget for rendering Customized tiles.\nA Tile shows the org info, user info, options that on tap user & org info.","enclosedBy":{"name":"custom_list_tile","type":"library","href":"widgets_custom_list_tile/widgets_custom_list_tile-library.md"}},{"name":"CustomListTile","qualifiedName":"custom_list_tile.CustomListTile.CustomListTile","href":"widgets_custom_list_tile/CustomListTile/CustomListTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"build","qualifiedName":"custom_list_tile.CustomListTile.build","href":"widgets_custom_list_tile/CustomListTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"index","qualifiedName":"custom_list_tile.CustomListTile.index","href":"widgets_custom_list_tile/CustomListTile/index.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"onTapOption","qualifiedName":"custom_list_tile.CustomListTile.onTapOption","href":"widgets_custom_list_tile/CustomListTile/onTapOption.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"onTapOrgInfo","qualifiedName":"custom_list_tile.CustomListTile.onTapOrgInfo","href":"widgets_custom_list_tile/CustomListTile/onTapOrgInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"onTapUserInfo","qualifiedName":"custom_list_tile.CustomListTile.onTapUserInfo","href":"widgets_custom_list_tile/CustomListTile/onTapUserInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"option","qualifiedName":"custom_list_tile.CustomListTile.option","href":"widgets_custom_list_tile/CustomListTile/option.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"orgInfo","qualifiedName":"custom_list_tile.CustomListTile.orgInfo","href":"widgets_custom_list_tile/CustomListTile/orgInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"showIcon","qualifiedName":"custom_list_tile.CustomListTile.showIcon","href":"widgets_custom_list_tile/CustomListTile/showIcon.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"type","qualifiedName":"custom_list_tile.CustomListTile.type","href":"widgets_custom_list_tile/CustomListTile/type.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"userInfo","qualifiedName":"custom_list_tile.CustomListTile.userInfo","href":"widgets_custom_list_tile/CustomListTile/userInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomListTile","type":"class","href":"widgets_custom_list_tile/CustomListTile-class.md"}},{"name":"custom_progress_dialog","qualifiedName":"custom_progress_dialog","href":"widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomProgressDialog","qualifiedName":"custom_progress_dialog.CustomProgressDialog","href":"widgets_custom_progress_dialog/CustomProgressDialog-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"A progress dialogue which shows an activity indicator\nspinning clockwise if there is internet connectivity.\nOtherwise, it shows no-internet image and text.","enclosedBy":{"name":"custom_progress_dialog","type":"library","href":"widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md"}},{"name":"CustomProgressDialog","qualifiedName":"custom_progress_dialog.CustomProgressDialog.CustomProgressDialog","href":"widgets_custom_progress_dialog/CustomProgressDialog/CustomProgressDialog.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomProgressDialog","type":"class","href":"widgets_custom_progress_dialog/CustomProgressDialog-class.md"}},{"name":"build","qualifiedName":"custom_progress_dialog.CustomProgressDialog.build","href":"widgets_custom_progress_dialog/CustomProgressDialog/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomProgressDialog","type":"class","href":"widgets_custom_progress_dialog/CustomProgressDialog-class.md"}},{"name":"custom_theme","qualifiedName":"custom_theme","href":"constants_custom_theme/constants_custom_theme-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TalawaTheme","qualifiedName":"custom_theme.TalawaTheme","href":"constants_custom_theme/TalawaTheme-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This file contains various custom themes.\nFor instance, lightTheme, darkTheme, _lightTextTheme, _darkTextTheme, etc.\nThese are imported to other files/widgets to apply the required themes.","enclosedBy":{"name":"custom_theme","type":"library","href":"constants_custom_theme/constants_custom_theme-library.md"}},{"name":"TalawaTheme","qualifiedName":"custom_theme.TalawaTheme.TalawaTheme","href":"constants_custom_theme/TalawaTheme/TalawaTheme.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaTheme","type":"class","href":"constants_custom_theme/TalawaTheme-class.md"}},{"name":"darkTheme","qualifiedName":"custom_theme.TalawaTheme.darkTheme","href":"constants_custom_theme/TalawaTheme/darkTheme.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaTheme","type":"class","href":"constants_custom_theme/TalawaTheme-class.md"}},{"name":"lightTheme","qualifiedName":"custom_theme.TalawaTheme.lightTheme","href":"constants_custom_theme/TalawaTheme/lightTheme.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaTheme","type":"class","href":"constants_custom_theme/TalawaTheme-class.md"}},{"name":"database_mutation_functions","qualifiedName":"database_mutation_functions","href":"services_database_mutation_functions/services_database_mutation_functions-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DataBaseMutationFunctions","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"DataBaseMutationFunctions class provides different services that are under the context of graphQL mutations and queries.","enclosedBy":{"name":"database_mutation_functions","type":"library","href":"services_database_mutation_functions/services_database_mutation_functions-library.md"}},{"name":"DataBaseMutationFunctions","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.DataBaseMutationFunctions","href":"services_database_mutation_functions/DataBaseMutationFunctions/DataBaseMutationFunctions.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"clientAuth","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.clientAuth","href":"services_database_mutation_functions/DataBaseMutationFunctions/clientAuth.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Client Auth for handling authenticated request.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"clientNonAuth","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.clientNonAuth","href":"services_database_mutation_functions/DataBaseMutationFunctions/clientNonAuth.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Client Auth for handling non-authenticated request.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"emailAccountPresent","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.emailAccountPresent","href":"services_database_mutation_functions/DataBaseMutationFunctions/emailAccountPresent.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"encounteredExceptionOrError","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.encounteredExceptionOrError","href":"services_database_mutation_functions/DataBaseMutationFunctions/encounteredExceptionOrError.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to check if any exceptions or error encountered. The return type is boolean.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"fetchOrgById","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.fetchOrgById","href":"services_database_mutation_functions/DataBaseMutationFunctions/fetchOrgById.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch the organization using the id passed.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"gqlAuthMutation","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.gqlAuthMutation","href":"services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthMutation.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to run the graph-ql mutation for authenticated user.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"gqlAuthQuery","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.gqlAuthQuery","href":"services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthQuery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to run the graph-ql query for authentication.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"gqlNonAuthMutation","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.gqlNonAuthMutation","href":"services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthMutation.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to run the graph-ql mutation to authenticate the non signed-in user.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"gqlNonAuthQuery","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.gqlNonAuthQuery","href":"services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthQuery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to run the graph-ql query for the non signed-in user.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"init","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.init","href":"services_database_mutation_functions/DataBaseMutationFunctions/init.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"initialization function.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"memberRequestExist","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.memberRequestExist","href":"services_database_mutation_functions/DataBaseMutationFunctions/memberRequestExist.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"notifFeatureNotInstalled","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.notifFeatureNotInstalled","href":"services_database_mutation_functions/DataBaseMutationFunctions/notifFeatureNotInstalled.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"organizationNotFound","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.organizationNotFound","href":"services_database_mutation_functions/DataBaseMutationFunctions/organizationNotFound.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"refreshAccessToken","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.refreshAccessToken","href":"services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessToken.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to refresh the Authenication token to access the application.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"refreshAccessTokenExpiredException","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.refreshAccessTokenExpiredException","href":"services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessTokenExpiredException.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"userNotAuthenticated","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.userNotAuthenticated","href":"services_database_mutation_functions/DataBaseMutationFunctions/userNotAuthenticated.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"userNotFound","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.userNotFound","href":"services_database_mutation_functions/DataBaseMutationFunctions/userNotFound.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"wrongCredentials","qualifiedName":"database_mutation_functions.DataBaseMutationFunctions.wrongCredentials","href":"services_database_mutation_functions/DataBaseMutationFunctions/wrongCredentials.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Graphql error for handling.","enclosedBy":{"name":"DataBaseMutationFunctions","type":"class","href":"services_database_mutation_functions/DataBaseMutationFunctions-class.md"}},{"name":"date_time_picker","qualifiedName":"date_time_picker","href":"widgets_date_time_picker/widgets_date_time_picker-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"customDatePicker","qualifiedName":"date_time_picker.customDatePicker","href":"widgets_date_time_picker/customDatePicker.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"Shows a dialog containing a Material Design date picker.","enclosedBy":{"name":"date_time_picker","type":"library","href":"widgets_date_time_picker/widgets_date_time_picker-library.md"}},{"name":"customTimePicker","qualifiedName":"date_time_picker.customTimePicker","href":"widgets_date_time_picker/customTimePicker.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"Shows a dialog containing a material design time picker.","enclosedBy":{"name":"date_time_picker","type":"library","href":"widgets_date_time_picker/widgets_date_time_picker-library.md"}},{"name":"direct_chat_demo_data","qualifiedName":"direct_chat_demo_data","href":"demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"directChatDemoData","qualifiedName":"direct_chat_demo_data.directChatDemoData","href":"demo_server_data_direct_chat_demo_data/directChatDemoData-constant.md","type":"top-level constant","overriddenDepth":0,"packageName":"talawa","desc":"This file contains demo data.","enclosedBy":{"name":"direct_chat_demo_data","type":"library","href":"demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md"}},{"name":"direct_chat_view_model","qualifiedName":"direct_chat_view_model","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DirectChatViewModel","qualifiedName":"direct_chat_view_model.DirectChatViewModel","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This ViewModel class have different functions that are used interact with model in the context of Direct Chat.","enclosedBy":{"name":"direct_chat_view_model","type":"library","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md"}},{"name":"DirectChatViewModel","qualifiedName":"direct_chat_view_model.DirectChatViewModel.DirectChatViewModel","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/DirectChatViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"chatMessagesByUser","qualifiedName":"direct_chat_view_model.DirectChatViewModel.chatMessagesByUser","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatMessagesByUser.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"chatName","qualifiedName":"direct_chat_view_model.DirectChatViewModel.chatName","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatName.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"chatState","qualifiedName":"direct_chat_view_model.DirectChatViewModel.chatState","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatState.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"chats","qualifiedName":"direct_chat_view_model.DirectChatViewModel.chats","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chats.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"dispose","qualifiedName":"direct_chat_view_model.DirectChatViewModel.dispose","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"getChatMessages","qualifiedName":"direct_chat_view_model.DirectChatViewModel.getChatMessages","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/getChatMessages.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function get all messages for a chat.","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"initialise","qualifiedName":"direct_chat_view_model.DirectChatViewModel.initialise","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"listKey","qualifiedName":"direct_chat_view_model.DirectChatViewModel.listKey","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/listKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"name","qualifiedName":"direct_chat_view_model.DirectChatViewModel.name","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/name.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"refreshChats","qualifiedName":"direct_chat_view_model.DirectChatViewModel.refreshChats","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/refreshChats.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function refresh the chats.","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"sendMessageToDirectChat","qualifiedName":"direct_chat_view_model.DirectChatViewModel.sendMessageToDirectChat","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/sendMessageToDirectChat.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function send the message to Direct Chat.","enclosedBy":{"name":"DirectChatViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md"}},{"name":"direct_chats","qualifiedName":"direct_chats","href":"views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChatTile","qualifiedName":"direct_chats.ChatTile","href":"views_after_auth_screens_chat_direct_chats/ChatTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ChatTile return a widget for a tile in the list of Direct Chats in the Chat List Screen.","enclosedBy":{"name":"direct_chats","type":"library","href":"views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md"}},{"name":"ChatTile","qualifiedName":"direct_chats.ChatTile.ChatTile","href":"views_after_auth_screens_chat_direct_chats/ChatTile/ChatTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatTile","type":"class","href":"views_after_auth_screens_chat_direct_chats/ChatTile-class.md"}},{"name":"build","qualifiedName":"direct_chats.ChatTile.build","href":"views_after_auth_screens_chat_direct_chats/ChatTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ChatTile","type":"class","href":"views_after_auth_screens_chat_direct_chats/ChatTile-class.md"}},{"name":"chat","qualifiedName":"direct_chats.ChatTile.chat","href":"views_after_auth_screens_chat_direct_chats/ChatTile/chat.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatTile","type":"class","href":"views_after_auth_screens_chat_direct_chats/ChatTile-class.md"}},{"name":"model","qualifiedName":"direct_chats.ChatTile.model","href":"views_after_auth_screens_chat_direct_chats/ChatTile/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatTile","type":"class","href":"views_after_auth_screens_chat_direct_chats/ChatTile-class.md"}},{"name":"DirectChats","qualifiedName":"direct_chats.DirectChats","href":"views_after_auth_screens_chat_direct_chats/DirectChats-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"DirectChats return a statelessWidget for rendering all the directs\nchats of the current user in the Chat List Screen","enclosedBy":{"name":"direct_chats","type":"library","href":"views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md"}},{"name":"DirectChats","qualifiedName":"direct_chats.DirectChats.DirectChats","href":"views_after_auth_screens_chat_direct_chats/DirectChats/DirectChats.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DirectChats","type":"class","href":"views_after_auth_screens_chat_direct_chats/DirectChats-class.md"}},{"name":"build","qualifiedName":"direct_chats.DirectChats.build","href":"views_after_auth_screens_chat_direct_chats/DirectChats/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"DirectChats","type":"class","href":"views_after_auth_screens_chat_direct_chats/DirectChats-class.md"}},{"name":"edit_event_page","qualifiedName":"edit_event_page","href":"views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditEventPage","qualifiedName":"edit_event_page.EditEventPage","href":"views_after_auth_screens_events_edit_event_page/EditEventPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditEventPage returns a widget that has mutable state _EditEventPageState.","enclosedBy":{"name":"edit_event_page","type":"library","href":"views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md"}},{"name":"EditEventPage","qualifiedName":"edit_event_page.EditEventPage.EditEventPage","href":"views_after_auth_screens_events_edit_event_page/EditEventPage/EditEventPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventPage","type":"class","href":"views_after_auth_screens_events_edit_event_page/EditEventPage-class.md"}},{"name":"createState","qualifiedName":"edit_event_page.EditEventPage.createState","href":"views_after_auth_screens_events_edit_event_page/EditEventPage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"EditEventPage","type":"class","href":"views_after_auth_screens_events_edit_event_page/EditEventPage-class.md"}},{"name":"event","qualifiedName":"edit_event_page.EditEventPage.event","href":"views_after_auth_screens_events_edit_event_page/EditEventPage/event.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventPage","type":"class","href":"views_after_auth_screens_events_edit_event_page/EditEventPage-class.md"}},{"name":"edit_event_view_model","qualifiedName":"edit_event_view_model","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditEventViewModel","qualifiedName":"edit_event_view_model.EditEventViewModel","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditEventViewModel class have methods to interact with model in\nthe context of editing the event in the organization.","enclosedBy":{"name":"edit_event_view_model","type":"library","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md"}},{"name":"EditEventViewModel","qualifiedName":"edit_event_view_model.EditEventViewModel.EditEventViewModel","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/EditEventViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"descriptionFocus","qualifiedName":"edit_event_view_model.EditEventViewModel.descriptionFocus","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/descriptionFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventDescriptionTextController","qualifiedName":"edit_event_view_model.EditEventViewModel.eventDescriptionTextController","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventDescriptionTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventEndDate","qualifiedName":"edit_event_view_model.EditEventViewModel.eventEndDate","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventEndTime","qualifiedName":"edit_event_view_model.EditEventViewModel.eventEndTime","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventLocationTextController","qualifiedName":"edit_event_view_model.EditEventViewModel.eventLocationTextController","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventLocationTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventStartDate","qualifiedName":"edit_event_view_model.EditEventViewModel.eventStartDate","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventStartTime","qualifiedName":"edit_event_view_model.EditEventViewModel.eventStartTime","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"eventTitleTextController","qualifiedName":"edit_event_view_model.EditEventViewModel.eventTitleTextController","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventTitleTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"formKey","qualifiedName":"edit_event_view_model.EditEventViewModel.formKey","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/formKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"initialize","qualifiedName":"edit_event_view_model.EditEventViewModel.initialize","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"isPublicSwitch","qualifiedName":"edit_event_view_model.EditEventViewModel.isPublicSwitch","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isPublicSwitch.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"isRegisterableSwitch","qualifiedName":"edit_event_view_model.EditEventViewModel.isRegisterableSwitch","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isRegisterableSwitch.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"locationFocus","qualifiedName":"edit_event_view_model.EditEventViewModel.locationFocus","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/locationFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"titleFocus","qualifiedName":"edit_event_view_model.EditEventViewModel.titleFocus","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/titleFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"updateEvent","qualifiedName":"edit_event_view_model.EditEventViewModel.updateEvent","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/updateEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update an event.\nThe function uses editEvent function provided by eventService service.","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"validate","qualifiedName":"edit_event_view_model.EditEventViewModel.validate","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/validate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md"}},{"name":"edit_events_form","qualifiedName":"edit_events_form","href":"views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditEventForm","qualifiedName":"edit_events_form.EditEventForm","href":"views_after_auth_screens_events_edit_events_form/EditEventForm-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditEventForm returns a widget of a Form for editing an event.\nThis widget is used in EditEventPage widget.","enclosedBy":{"name":"edit_events_form","type":"library","href":"views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md"}},{"name":"EditEventForm","qualifiedName":"edit_events_form.EditEventForm.EditEventForm","href":"views_after_auth_screens_events_edit_events_form/EditEventForm/EditEventForm.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventForm","type":"class","href":"views_after_auth_screens_events_edit_events_form/EditEventForm-class.md"}},{"name":"build","qualifiedName":"edit_events_form.EditEventForm.build","href":"views_after_auth_screens_events_edit_events_form/EditEventForm/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EditEventForm","type":"class","href":"views_after_auth_screens_events_edit_events_form/EditEventForm-class.md"}},{"name":"model","qualifiedName":"edit_events_form.EditEventForm.model","href":"views_after_auth_screens_events_edit_events_form/EditEventForm/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditEventForm","type":"class","href":"views_after_auth_screens_events_edit_events_form/EditEventForm-class.md"}},{"name":"edit_profile_page","qualifiedName":"edit_profile_page","href":"views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditProfilePage","qualifiedName":"edit_profile_page.EditProfilePage","href":"views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditProfilePage returns a widget that has mutable state _EditProfilePageState.","enclosedBy":{"name":"edit_profile_page","type":"library","href":"views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md"}},{"name":"EditProfilePage","qualifiedName":"edit_profile_page.EditProfilePage.EditProfilePage","href":"views_after_auth_screens_profile_edit_profile_page/EditProfilePage/EditProfilePage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePage","type":"class","href":"views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md"}},{"name":"createState","qualifiedName":"edit_profile_page.EditProfilePage.createState","href":"views_after_auth_screens_profile_edit_profile_page/EditProfilePage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"EditProfilePage","type":"class","href":"views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md"}},{"name":"edit_profile_view_model","qualifiedName":"edit_profile_view_model","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditProfilePageViewModel","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditProfilePageViewModel class helps to interact with model to serve data to edit profile views.","enclosedBy":{"name":"edit_profile_view_model","type":"library","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md"}},{"name":"EditProfilePageViewModel","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.EditProfilePageViewModel","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/EditProfilePageViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"databaseService","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.databaseService","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/databaseService.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"firstNameFocus","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.firstNameFocus","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"firstNameTextController","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.firstNameTextController","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"getImageFromGallery","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.getImageFromGallery","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/getImageFromGallery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get the image from gallery.\nThe function uses the _multiMediaPickerService services.","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"imageFile","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.imageFile","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/imageFile.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"initialize","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.initialize","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"lastNameFocus","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.lastNameFocus","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"lastNameTextController","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.lastNameTextController","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameTextController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"removeImage","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.removeImage","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/removeImage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function remove the selected image.","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"user","qualifiedName":"edit_profile_view_model.EditProfilePageViewModel.user","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/user.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md"}},{"name":"edit_task_page","qualifiedName":"edit_task_page","href":"views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EditTaskPage","qualifiedName":"edit_task_page.EditTaskPage","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EditTaskPage returns a widget for page to edit the task for the user.","enclosedBy":{"name":"edit_task_page","type":"library","href":"views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md"}},{"name":"EditTaskPage","qualifiedName":"edit_task_page.EditTaskPage.EditTaskPage","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage/EditTaskPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditTaskPage","type":"class","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md"}},{"name":"build","qualifiedName":"edit_task_page.EditTaskPage.build","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EditTaskPage","type":"class","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md"}},{"name":"task","qualifiedName":"edit_task_page.EditTaskPage.task","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage/task.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EditTaskPage","type":"class","href":"views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md"}},{"name":"enums","qualifiedName":"enums","href":"enums_enums/enums_enums-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CallFor","qualifiedName":"enums.CallFor","href":"enums_enums/CallFor.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"CallFor","qualifiedName":"enums.CallFor.CallFor","href":"enums_enums/CallFor/CallFor.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CallFor","type":"enum","href":"enums_enums/CallFor.md"}},{"name":"values","qualifiedName":"enums.CallFor.values","href":"enums_enums/CallFor/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"CallFor","type":"enum","href":"enums_enums/CallFor.md"}},{"name":"ChatState","qualifiedName":"enums.ChatState","href":"enums_enums/ChatState.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"Represents the state of the chat","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"ChatState","qualifiedName":"enums.ChatState.ChatState","href":"enums_enums/ChatState/ChatState.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChatState","type":"enum","href":"enums_enums/ChatState.md"}},{"name":"values","qualifiedName":"enums.ChatState.values","href":"enums_enums/ChatState/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"ChatState","type":"enum","href":"enums_enums/ChatState.md"}},{"name":"MessageType","qualifiedName":"enums.MessageType","href":"enums_enums/MessageType.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"Represents the type of the Message","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"MessageType","qualifiedName":"enums.MessageType.MessageType","href":"enums_enums/MessageType/MessageType.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MessageType","type":"enum","href":"enums_enums/MessageType.md"}},{"name":"values","qualifiedName":"enums.MessageType.values","href":"enums_enums/MessageType/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"MessageType","type":"enum","href":"enums_enums/MessageType.md"}},{"name":"ModalSheet","qualifiedName":"enums.ModalSheet","href":"enums_enums/ModalSheet.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"ModalSheet","qualifiedName":"enums.ModalSheet.ModalSheet","href":"enums_enums/ModalSheet/ModalSheet.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ModalSheet","type":"enum","href":"enums_enums/ModalSheet.md"}},{"name":"values","qualifiedName":"enums.ModalSheet.values","href":"enums_enums/ModalSheet/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"ModalSheet","type":"enum","href":"enums_enums/ModalSheet.md"}},{"name":"TileType","qualifiedName":"enums.TileType","href":"enums_enums/TileType.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"Represents the type of the tile","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"TileType","qualifiedName":"enums.TileType.TileType","href":"enums_enums/TileType/TileType.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TileType","type":"enum","href":"enums_enums/TileType.md"}},{"name":"values","qualifiedName":"enums.TileType.values","href":"enums_enums/TileType/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"TileType","type":"enum","href":"enums_enums/TileType.md"}},{"name":"ViewState","qualifiedName":"enums.ViewState","href":"enums_enums/ViewState.md","type":"enum","overriddenDepth":0,"packageName":"talawa","desc":"This file contains different enums.\nThe enum keyword is used to define an enumeration type in Dart.\nThe use case of enumeration is to store finite data members under the same type definition.\nRepresents the state of the view","enclosedBy":{"name":"enums","type":"library","href":"enums_enums/enums_enums-library.md"}},{"name":"ViewState","qualifiedName":"enums.ViewState.ViewState","href":"enums_enums/ViewState/ViewState.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ViewState","type":"enum","href":"enums_enums/ViewState.md"}},{"name":"values","qualifiedName":"enums.ViewState.values","href":"enums_enums/ViewState/values-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"A constant List of the values in this enum, in order of their declaration.","enclosedBy":{"name":"ViewState","type":"enum","href":"enums_enums/ViewState.md"}},{"name":"event_calendar","qualifiedName":"event_calendar","href":"views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventCalendar","qualifiedName":"event_calendar.EventCalendar","href":"views_after_auth_screens_events_event_calendar/EventCalendar-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventCalendar returns a widget that has mutable state _EventCalendarState.","enclosedBy":{"name":"event_calendar","type":"library","href":"views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md"}},{"name":"EventCalendar","qualifiedName":"event_calendar.EventCalendar.EventCalendar","href":"views_after_auth_screens_events_event_calendar/EventCalendar/EventCalendar.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCalendar","type":"class","href":"views_after_auth_screens_events_event_calendar/EventCalendar-class.md"}},{"name":"createState","qualifiedName":"event_calendar.EventCalendar.createState","href":"views_after_auth_screens_events_event_calendar/EventCalendar/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"EventCalendar","type":"class","href":"views_after_auth_screens_events_event_calendar/EventCalendar-class.md"}},{"name":"eventList","qualifiedName":"event_calendar.EventCalendar.eventList","href":"views_after_auth_screens_events_event_calendar/EventCalendar/eventList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCalendar","type":"class","href":"views_after_auth_screens_events_event_calendar/EventCalendar-class.md"}},{"name":"event_card","qualifiedName":"event_card","href":"widgets_event_card/widgets_event_card-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventCard","qualifiedName":"event_card.EventCard","href":"widgets_event_card/EventCard-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns the EventCard widget.","enclosedBy":{"name":"event_card","type":"library","href":"widgets_event_card/widgets_event_card-library.md"}},{"name":"EventCard","qualifiedName":"event_card.EventCard.EventCard","href":"widgets_event_card/EventCard/EventCard.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"build","qualifiedName":"event_card.EventCard.build","href":"widgets_event_card/EventCard/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"event","qualifiedName":"event_card.EventCard.event","href":"widgets_event_card/EventCard/event.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"eventTitleHighlightedText","qualifiedName":"event_card.EventCard.eventTitleHighlightedText","href":"widgets_event_card/EventCard/eventTitleHighlightedText.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"eventTitleNormalText","qualifiedName":"event_card.EventCard.eventTitleNormalText","href":"widgets_event_card/EventCard/eventTitleNormalText.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"isSearchItem","qualifiedName":"event_card.EventCard.isSearchItem","href":"widgets_event_card/EventCard/isSearchItem.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventCard","type":"class","href":"widgets_event_card/EventCard-class.md"}},{"name":"event_card_view_model","qualifiedName":"event_card_view_model","href":"view_model_widgets_view_models_event_card_view_model/view_model_widgets_view_models_event_card_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"event_chats","qualifiedName":"event_chats","href":"views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventChats","qualifiedName":"event_chats.EventChats","href":"views_after_auth_screens_chat_event_chats/EventChats-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventChats return a statelessWidget for rendering all the events\nchats of the current user in the Chat List Screen","enclosedBy":{"name":"event_chats","type":"library","href":"views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md"}},{"name":"EventChats","qualifiedName":"event_chats.EventChats.EventChats","href":"views_after_auth_screens_chat_event_chats/EventChats/EventChats.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventChats","type":"class","href":"views_after_auth_screens_chat_event_chats/EventChats-class.md"}},{"name":"build","qualifiedName":"event_chats.EventChats.build","href":"views_after_auth_screens_chat_event_chats/EventChats/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EventChats","type":"class","href":"views_after_auth_screens_chat_event_chats/EventChats-class.md"}},{"name":"event_date_time_tile","qualifiedName":"event_date_time_tile","href":"widgets_event_date_time_tile/widgets_event_date_time_tile-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DateTimeTile","qualifiedName":"event_date_time_tile.DateTimeTile","href":"widgets_event_date_time_tile/DateTimeTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Returns a widget tile(item) for displaying date and time.","enclosedBy":{"name":"event_date_time_tile","type":"library","href":"widgets_event_date_time_tile/widgets_event_date_time_tile-library.md"}},{"name":"DateTimeTile","qualifiedName":"event_date_time_tile.DateTimeTile.DateTimeTile","href":"widgets_event_date_time_tile/DateTimeTile/DateTimeTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"build","qualifiedName":"event_date_time_tile.DateTimeTile.build","href":"widgets_event_date_time_tile/DateTimeTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"date","qualifiedName":"event_date_time_tile.DateTimeTile.date","href":"widgets_event_date_time_tile/DateTimeTile/date.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"setDate","qualifiedName":"event_date_time_tile.DateTimeTile.setDate","href":"widgets_event_date_time_tile/DateTimeTile/setDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"setTime","qualifiedName":"event_date_time_tile.DateTimeTile.setTime","href":"widgets_event_date_time_tile/DateTimeTile/setTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"time","qualifiedName":"event_date_time_tile.DateTimeTile.time","href":"widgets_event_date_time_tile/DateTimeTile/time.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DateTimeTile","type":"class","href":"widgets_event_date_time_tile/DateTimeTile-class.md"}},{"name":"event_info_body","qualifiedName":"event_info_body","href":"views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventInfoBody","qualifiedName":"event_info_body.EventInfoBody","href":"views_after_auth_screens_events_event_info_body/EventInfoBody-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventInfoBody returns a stateless widget which describes the body of a particular event.","enclosedBy":{"name":"event_info_body","type":"library","href":"views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md"}},{"name":"EventInfoBody","qualifiedName":"event_info_body.EventInfoBody.EventInfoBody","href":"views_after_auth_screens_events_event_info_body/EventInfoBody/EventInfoBody.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoBody","type":"class","href":"views_after_auth_screens_events_event_info_body/EventInfoBody-class.md"}},{"name":"build","qualifiedName":"event_info_body.EventInfoBody.build","href":"views_after_auth_screens_events_event_info_body/EventInfoBody/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EventInfoBody","type":"class","href":"views_after_auth_screens_events_event_info_body/EventInfoBody-class.md"}},{"name":"event_info_page","qualifiedName":"event_info_page","href":"views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventInfoPage","qualifiedName":"event_info_page.EventInfoPage","href":"views_after_auth_screens_events_event_info_page/EventInfoPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventInfoPage returns a widget that has mutable state _EventInfoPageState.","enclosedBy":{"name":"event_info_page","type":"library","href":"views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md"}},{"name":"EventInfoPage","qualifiedName":"event_info_page.EventInfoPage.EventInfoPage","href":"views_after_auth_screens_events_event_info_page/EventInfoPage/EventInfoPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoPage","type":"class","href":"views_after_auth_screens_events_event_info_page/EventInfoPage-class.md"}},{"name":"args","qualifiedName":"event_info_page.EventInfoPage.args","href":"views_after_auth_screens_events_event_info_page/EventInfoPage/args.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoPage","type":"class","href":"views_after_auth_screens_events_event_info_page/EventInfoPage-class.md"}},{"name":"createState","qualifiedName":"event_info_page.EventInfoPage.createState","href":"views_after_auth_screens_events_event_info_page/EventInfoPage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"EventInfoPage","type":"class","href":"views_after_auth_screens_events_event_info_page/EventInfoPage-class.md"}},{"name":"event_info_view_model","qualifiedName":"event_info_view_model","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventInfoViewModel","qualifiedName":"event_info_view_model.EventInfoViewModel","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventInfoViewModel class helps interacting with model to serve view with the event information data.'","enclosedBy":{"name":"event_info_view_model","type":"library","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md"}},{"name":"EventInfoViewModel","qualifiedName":"event_info_view_model.EventInfoViewModel.EventInfoViewModel","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/EventInfoViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"event","qualifiedName":"event_info_view_model.EventInfoViewModel.event","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/event.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"exploreEventsInstance","qualifiedName":"event_info_view_model.EventInfoViewModel.exploreEventsInstance","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/exploreEventsInstance.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"fabTitle","qualifiedName":"event_info_view_model.EventInfoViewModel.fabTitle","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/fabTitle.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"getFabTitle","qualifiedName":"event_info_view_model.EventInfoViewModel.getFabTitle","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/getFabTitle.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function returns String type for the event registration status.","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"initialize","qualifiedName":"event_info_view_model.EventInfoViewModel.initialize","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"initialise with the event data fetched from the model.","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"registerForEvent","qualifiedName":"event_info_view_model.EventInfoViewModel.registerForEvent","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registerForEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function helps the user to register for an event.","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"registrants","qualifiedName":"event_info_view_model.EventInfoViewModel.registrants","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registrants.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventInfoViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md"}},{"name":"event_model","qualifiedName":"event_model","href":"models_events_event_model/models_events_event_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Event","qualifiedName":"event_model.Event","href":"models_events_event_model/Event-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates an event model and returns an Event instance.","enclosedBy":{"name":"event_model","type":"library","href":"models_events_event_model/models_events_event_model-library.md"}},{"name":"Event","qualifiedName":"event_model.Event.Event","href":"models_events_event_model/Event/Event.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"admins","qualifiedName":"event_model.Event.admins","href":"models_events_event_model/Event/admins.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"allDay","qualifiedName":"event_model.Event.allDay","href":"models_events_event_model/Event/allDay.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"attendees","qualifiedName":"event_model.Event.attendees","href":"models_events_event_model/Event/attendees.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"creator","qualifiedName":"event_model.Event.creator","href":"models_events_event_model/Event/creator.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"description","qualifiedName":"event_model.Event.description","href":"models_events_event_model/Event/description.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"endDate","qualifiedName":"event_model.Event.endDate","href":"models_events_event_model/Event/endDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"endTime","qualifiedName":"event_model.Event.endTime","href":"models_events_event_model/Event/endTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"Event.fromJson","qualifiedName":"event_model.Event.fromJson","href":"models_events_event_model/Event/Event.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"id","qualifiedName":"event_model.Event.id","href":"models_events_event_model/Event/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"isPublic","qualifiedName":"event_model.Event.isPublic","href":"models_events_event_model/Event/isPublic.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"isRegisterable","qualifiedName":"event_model.Event.isRegisterable","href":"models_events_event_model/Event/isRegisterable.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"isRegistered","qualifiedName":"event_model.Event.isRegistered","href":"models_events_event_model/Event/isRegistered.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"latitude","qualifiedName":"event_model.Event.latitude","href":"models_events_event_model/Event/latitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"location","qualifiedName":"event_model.Event.location","href":"models_events_event_model/Event/location.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"longitude","qualifiedName":"event_model.Event.longitude","href":"models_events_event_model/Event/longitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"organization","qualifiedName":"event_model.Event.organization","href":"models_events_event_model/Event/organization.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"recurrence","qualifiedName":"event_model.Event.recurrence","href":"models_events_event_model/Event/recurrence.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"recurring","qualifiedName":"event_model.Event.recurring","href":"models_events_event_model/Event/recurring.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"registrants","qualifiedName":"event_model.Event.registrants","href":"models_events_event_model/Event/registrants.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"startDate","qualifiedName":"event_model.Event.startDate","href":"models_events_event_model/Event/startDate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"startTime","qualifiedName":"event_model.Event.startTime","href":"models_events_event_model/Event/startTime.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"title","qualifiedName":"event_model.Event.title","href":"models_events_event_model/Event/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Event","type":"class","href":"models_events_event_model/Event-class.md"}},{"name":"event_queries","qualifiedName":"event_queries","href":"utils_event_queries/utils_event_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventQueries","qualifiedName":"event_queries.EventQueries","href":"utils_event_queries/EventQueries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates queries related to the events.","enclosedBy":{"name":"event_queries","type":"library","href":"utils_event_queries/utils_event_queries-library.md"}},{"name":"EventQueries","qualifiedName":"event_queries.EventQueries.EventQueries","href":"utils_event_queries/EventQueries/EventQueries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"addEvent","qualifiedName":"event_queries.EventQueries.addEvent","href":"utils_event_queries/EventQueries/addEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"deleteEvent","qualifiedName":"event_queries.EventQueries.deleteEvent","href":"utils_event_queries/EventQueries/deleteEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"fetchOrgEvents","qualifiedName":"event_queries.EventQueries.fetchOrgEvents","href":"utils_event_queries/EventQueries/fetchOrgEvents.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"registerForEvent","qualifiedName":"event_queries.EventQueries.registerForEvent","href":"utils_event_queries/EventQueries/registerForEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"registrantsByEvent","qualifiedName":"event_queries.EventQueries.registrantsByEvent","href":"utils_event_queries/EventQueries/registrantsByEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"updateEvent","qualifiedName":"event_queries.EventQueries.updateEvent","href":"utils_event_queries/EventQueries/updateEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventQueries","type":"class","href":"utils_event_queries/EventQueries-class.md"}},{"name":"event_search_delegate","qualifiedName":"event_search_delegate","href":"widgets_event_search_delegate/widgets_event_search_delegate-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventSearch","qualifiedName":"event_search_delegate.EventSearch","href":"widgets_event_search_delegate/EventSearch-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns a list of the events which match the search query.","enclosedBy":{"name":"event_search_delegate","type":"library","href":"widgets_event_search_delegate/widgets_event_search_delegate-library.md"}},{"name":"EventSearch","qualifiedName":"event_search_delegate.EventSearch.EventSearch","href":"widgets_event_search_delegate/EventSearch/EventSearch.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"buildActions","qualifiedName":"event_search_delegate.EventSearch.buildActions","href":"widgets_event_search_delegate/EventSearch/buildActions.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Widgets to display after the search query in the AppBar.","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"buildLeading","qualifiedName":"event_search_delegate.EventSearch.buildLeading","href":"widgets_event_search_delegate/EventSearch/buildLeading.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"A widget to display before the current query in the AppBar.","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"buildResults","qualifiedName":"event_search_delegate.EventSearch.buildResults","href":"widgets_event_search_delegate/EventSearch/buildResults.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"The results shown after the user submits a search from the search page.","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"buildSuggestions","qualifiedName":"event_search_delegate.EventSearch.buildSuggestions","href":"widgets_event_search_delegate/EventSearch/buildSuggestions.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Suggestions shown in the body of the search page while the user types a\nquery into the search field.","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"buildSuggestionsSucess","qualifiedName":"event_search_delegate.EventSearch.buildSuggestionsSucess","href":"widgets_event_search_delegate/EventSearch/buildSuggestionsSucess.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"eventList","qualifiedName":"event_search_delegate.EventSearch.eventList","href":"widgets_event_search_delegate/EventSearch/eventList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"exploreEventsViewModel","qualifiedName":"event_search_delegate.EventSearch.exploreEventsViewModel","href":"widgets_event_search_delegate/EventSearch/exploreEventsViewModel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventSearch","type":"class","href":"widgets_event_search_delegate/EventSearch-class.md"}},{"name":"event_service","qualifiedName":"event_service","href":"services_event_service/services_event_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventService","qualifiedName":"event_service.EventService","href":"services_event_service/EventService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventService class provides different services in the context of Event.","enclosedBy":{"name":"event_service","type":"library","href":"services_event_service/services_event_service-library.md"}},{"name":"EventService","qualifiedName":"event_service.EventService.EventService","href":"services_event_service/EventService/EventService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"deleteEvent","qualifiedName":"event_service.EventService.deleteEvent","href":"services_event_service/EventService/deleteEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to delete the event.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"dispose","qualifiedName":"event_service.EventService.dispose","href":"services_event_service/EventService/dispose.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to cancel the stream subscription of an organization.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"editEvent","qualifiedName":"event_service.EventService.editEvent","href":"services_event_service/EventService/editEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to edit an event.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"eventStream","qualifiedName":"event_service.EventService.eventStream","href":"services_event_service/EventService/eventStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The event stream.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"fetchRegistrantsByEvent","qualifiedName":"event_service.EventService.fetchRegistrantsByEvent","href":"services_event_service/EventService/fetchRegistrantsByEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to fetch all registrants of an event.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"getEvents","qualifiedName":"event_service.EventService.getEvents","href":"services_event_service/EventService/getEvents.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to fetch all the events of an organization.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"registerForAnEvent","qualifiedName":"event_service.EventService.registerForAnEvent","href":"services_event_service/EventService/registerForAnEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to register user for an event.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"setOrgStreamSubscription","qualifiedName":"event_service.EventService.setOrgStreamSubscription","href":"services_event_service/EventService/setOrgStreamSubscription.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to set stream subscription for an organization.","enclosedBy":{"name":"EventService","type":"class","href":"services_event_service/EventService-class.md"}},{"name":"event_tasks_page","qualifiedName":"event_tasks_page","href":"views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"EventTasksPage","qualifiedName":"event_tasks_page.EventTasksPage","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"EventTasksPage return a widget for Event Task Page that is created by event creator.","enclosedBy":{"name":"event_tasks_page","type":"library","href":"views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md"}},{"name":"EventTasksPage","qualifiedName":"event_tasks_page.EventTasksPage.EventTasksPage","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/EventTasksPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventTasksPage","type":"class","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md"}},{"name":"build","qualifiedName":"event_tasks_page.EventTasksPage.build","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"EventTasksPage","type":"class","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md"}},{"name":"eventId","qualifiedName":"event_tasks_page.EventTasksPage.eventId","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/eventId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"EventTasksPage","type":"class","href":"views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md"}},{"name":"events_demo_data","qualifiedName":"events_demo_data","href":"demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"eventsDemoData","qualifiedName":"events_demo_data.eventsDemoData","href":"demo_server_data_events_demo_data/eventsDemoData-constant.md","type":"top-level constant","overriddenDepth":0,"packageName":"talawa","desc":"This file contains demo data. It contains a list of type Map<String, Object>\nand sample data of events.","enclosedBy":{"name":"events_demo_data","type":"library","href":"demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md"}},{"name":"explore_event_dialogue","qualifiedName":"explore_event_dialogue","href":"views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ExploreEventDialog","qualifiedName":"explore_event_dialogue.ExploreEventDialog","href":"views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ExploreEventDialog returns a widget that has mutable state _ExploreEventDialogState.","enclosedBy":{"name":"explore_event_dialogue","type":"library","href":"views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md"}},{"name":"ExploreEventDialog","qualifiedName":"explore_event_dialogue.ExploreEventDialog.ExploreEventDialog","href":"views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/ExploreEventDialog.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventDialog","type":"class","href":"views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md"}},{"name":"createState","qualifiedName":"explore_event_dialogue.ExploreEventDialog.createState","href":"views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"ExploreEventDialog","type":"class","href":"views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md"}},{"name":"explore_events","qualifiedName":"explore_events","href":"views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ExploreEvents","qualifiedName":"explore_events.ExploreEvents","href":"views_after_auth_screens_events_explore_events/ExploreEvents-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Shows the list of events with options to categorize them.","enclosedBy":{"name":"explore_events","type":"library","href":"views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md"}},{"name":"ExploreEvents","qualifiedName":"explore_events.ExploreEvents.ExploreEvents","href":"views_after_auth_screens_events_explore_events/ExploreEvents/ExploreEvents.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEvents","type":"class","href":"views_after_auth_screens_events_explore_events/ExploreEvents-class.md"}},{"name":"build","qualifiedName":"explore_events.ExploreEvents.build","href":"views_after_auth_screens_events_explore_events/ExploreEvents/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ExploreEvents","type":"class","href":"views_after_auth_screens_events_explore_events/ExploreEvents-class.md"}},{"name":"dropDownList","qualifiedName":"explore_events.ExploreEvents.dropDownList","href":"views_after_auth_screens_events_explore_events/ExploreEvents/dropDownList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Shows a list of dropdown taken from model and context.","enclosedBy":{"name":"ExploreEvents","type":"class","href":"views_after_auth_screens_events_explore_events/ExploreEvents-class.md"}},{"name":"homeModel","qualifiedName":"explore_events.ExploreEvents.homeModel","href":"views_after_auth_screens_events_explore_events/ExploreEvents/homeModel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"homeModal is a type of MainScreenViewModel which provides methods to handle the data for this component.","enclosedBy":{"name":"ExploreEvents","type":"class","href":"views_after_auth_screens_events_explore_events/ExploreEvents-class.md"}},{"name":"explore_events_view_model","qualifiedName":"explore_events_view_model","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ExploreEventsViewModel","qualifiedName":"explore_events_view_model.ExploreEventsViewModel","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ExploreEventsViewModel class helps to interact with model to serve data to view for event explore section.","enclosedBy":{"name":"explore_events_view_model","type":"library","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md"}},{"name":"ExploreEventsViewModel","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.ExploreEventsViewModel","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/ExploreEventsViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"checkIfExistsAndAddNewEvent","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.checkIfExistsAndAddNewEvent","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/checkIfExistsAndAddNewEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function add a new event if the event not exist.","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"choseValueFromDropdown","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.choseValueFromDropdown","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/choseValueFromDropdown.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function takes the choosen value from dropdown and\nreturn the filter events, if empty list then return relevant message.","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"chosenValue","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.chosenValue","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/chosenValue.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"deleteEvent","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.deleteEvent","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/deleteEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function deletes the event.","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"dispose","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.dispose","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"emptyListMessage","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.emptyListMessage","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/emptyListMessage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"eventService","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.eventService","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/eventService.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"events","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.events","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/events.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"fetchNewEvents","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.fetchNewEvents","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/fetchNewEvents.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to fetch new events in the organization.\nThe function uses getEvents method from EventService.","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"initialise","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.initialise","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"refreshEvents","qualifiedName":"explore_events_view_model.ExploreEventsViewModel.refreshEvents","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/refreshEvents.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to refresh the events in the organization.\nThe function uses getEvents method from EventService.","enclosedBy":{"name":"ExploreEventsViewModel","type":"class","href":"view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md"}},{"name":"explore_tasks_view_model","qualifiedName":"explore_tasks_view_model","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ExploreTasksViewModel","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ExploreTasksViewModel class helps to interact with model to serve data\nand react to user's input in Explore Task section.","enclosedBy":{"name":"explore_tasks_view_model","type":"library","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md"}},{"name":"ExploreTasksViewModel","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel.ExploreTasksViewModel","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/ExploreTasksViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreTasksViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md"}},{"name":"deleteTask","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel.deleteTask","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/deleteTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function deletes the task for an event.\nThe function uses deleteTask method of Task Service.","enclosedBy":{"name":"ExploreTasksViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md"}},{"name":"fetchTasks","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel.fetchTasks","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasks.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch all the task for an event.\nThe function uses getTasksForEvent method of Task Service.","enclosedBy":{"name":"ExploreTasksViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md"}},{"name":"fetchTasksByUser","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel.fetchTasksByUser","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasksByUser.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch tasks created by the current user for an event.\nThe function uses getTasksByUser method of Task Service.","enclosedBy":{"name":"ExploreTasksViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md"}},{"name":"tasks","qualifiedName":"explore_tasks_view_model.ExploreTasksViewModel.tasks","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/tasks.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ExploreTasksViewModel","type":"class","href":"view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md"}},{"name":"fetch_plugin_list","qualifiedName":"fetch_plugin_list","href":"plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"FetchPluginList","qualifiedName":"fetch_plugin_list.FetchPluginList","href":"plugins_fetch_plugin_list/FetchPluginList-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class fetch plugins list.","enclosedBy":{"name":"fetch_plugin_list","type":"library","href":"plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md"}},{"name":"FetchPluginList","qualifiedName":"fetch_plugin_list.FetchPluginList.FetchPluginList","href":"plugins_fetch_plugin_list/FetchPluginList/FetchPluginList.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"Constructor of the class.","enclosedBy":{"name":"FetchPluginList","type":"class","href":"plugins_fetch_plugin_list/FetchPluginList-class.md"}},{"name":"box","qualifiedName":"fetch_plugin_list.FetchPluginList.box","href":"plugins_fetch_plugin_list/FetchPluginList/box.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"late initialize the box.","enclosedBy":{"name":"FetchPluginList","type":"class","href":"plugins_fetch_plugin_list/FetchPluginList-class.md"}},{"name":"fetchList","qualifiedName":"fetch_plugin_list.FetchPluginList.fetchList","href":"plugins_fetch_plugin_list/FetchPluginList/fetchList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Fetches plugins from server and stores them in Hive pluginBox.","enclosedBy":{"name":"FetchPluginList","type":"class","href":"plugins_fetch_plugin_list/FetchPluginList-class.md"}},{"name":"firebase_options","qualifiedName":"firebase_options","href":"firebase_options/firebase_options-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DefaultFirebaseOptions","qualifiedName":"firebase_options.DefaultFirebaseOptions","href":"firebase_options/DefaultFirebaseOptions-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Default FirebaseOptions for use with your Firebase apps.","enclosedBy":{"name":"firebase_options","type":"library","href":"firebase_options/firebase_options-library.md"}},{"name":"DefaultFirebaseOptions","qualifiedName":"firebase_options.DefaultFirebaseOptions.DefaultFirebaseOptions","href":"firebase_options/DefaultFirebaseOptions/DefaultFirebaseOptions.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DefaultFirebaseOptions","type":"class","href":"firebase_options/DefaultFirebaseOptions-class.md"}},{"name":"android","qualifiedName":"firebase_options.DefaultFirebaseOptions.android","href":"firebase_options/DefaultFirebaseOptions/android.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Scaffolds androidFirebaseOptions around FirebaseOptions.","enclosedBy":{"name":"DefaultFirebaseOptions","type":"class","href":"firebase_options/DefaultFirebaseOptions-class.md"}},{"name":"currentPlatform","qualifiedName":"firebase_options.DefaultFirebaseOptions.currentPlatform","href":"firebase_options/DefaultFirebaseOptions/currentPlatform.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Builds and returns FirebaseOptions based on the current platform.","enclosedBy":{"name":"DefaultFirebaseOptions","type":"class","href":"firebase_options/DefaultFirebaseOptions-class.md"}},{"name":"ios","qualifiedName":"firebase_options.DefaultFirebaseOptions.ios","href":"firebase_options/DefaultFirebaseOptions/ios.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Scaffolds iosFirebaseOptions around FirebaseOptions.","enclosedBy":{"name":"DefaultFirebaseOptions","type":"class","href":"firebase_options/DefaultFirebaseOptions-class.md"}},{"name":"from_palisadoes","qualifiedName":"from_palisadoes","href":"widgets_from_palisadoes/widgets_from_palisadoes-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"FromPalisadoes","qualifiedName":"from_palisadoes.FromPalisadoes","href":"widgets_from_palisadoes/FromPalisadoes-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class generates the text \"From Palisadoes\" in a custom way.","enclosedBy":{"name":"from_palisadoes","type":"library","href":"widgets_from_palisadoes/widgets_from_palisadoes-library.md"}},{"name":"FromPalisadoes","qualifiedName":"from_palisadoes.FromPalisadoes.FromPalisadoes","href":"widgets_from_palisadoes/FromPalisadoes/FromPalisadoes.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"FromPalisadoes","type":"class","href":"widgets_from_palisadoes/FromPalisadoes-class.md"}},{"name":"build","qualifiedName":"from_palisadoes.FromPalisadoes.build","href":"widgets_from_palisadoes/FromPalisadoes/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"FromPalisadoes","type":"class","href":"widgets_from_palisadoes/FromPalisadoes-class.md"}},{"name":"generated_plugin_registrant","qualifiedName":"generated_plugin_registrant","href":"generated_plugin_registrant/generated_plugin_registrant-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"registerPlugins","qualifiedName":"generated_plugin_registrant.registerPlugins","href":"generated_plugin_registrant/registerPlugins.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"generated_plugin_registrant","type":"library","href":"generated_plugin_registrant/generated_plugin_registrant-library.md"}},{"name":"graphql_config","qualifiedName":"graphql_config","href":"services_graphql_config/services_graphql_config-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"GraphqlConfig","qualifiedName":"graphql_config.GraphqlConfig","href":"services_graphql_config/GraphqlConfig-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.\nTalawa uses graphQL for the integrating with the API's.\nYou can go through talawa-api, here.\nGraphqlConfig class provides service to configure graph ql API with talawa mobile-app.","enclosedBy":{"name":"graphql_config","type":"library","href":"services_graphql_config/services_graphql_config-library.md"}},{"name":"GraphqlConfig","qualifiedName":"graphql_config.GraphqlConfig.GraphqlConfig","href":"services_graphql_config/GraphqlConfig/GraphqlConfig.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"authClient","qualifiedName":"graphql_config.GraphqlConfig.authClient","href":"services_graphql_config/GraphqlConfig/authClient.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"clientToQuery","qualifiedName":"graphql_config.GraphqlConfig.clientToQuery","href":"services_graphql_config/GraphqlConfig/clientToQuery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"displayImgRoute","qualifiedName":"graphql_config.GraphqlConfig.displayImgRoute","href":"services_graphql_config/GraphqlConfig/displayImgRoute.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"getOrgUrl","qualifiedName":"graphql_config.GraphqlConfig.getOrgUrl","href":"services_graphql_config/GraphqlConfig/getOrgUrl.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get the organization URL.","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"getToken","qualifiedName":"graphql_config.GraphqlConfig.getToken","href":"services_graphql_config/GraphqlConfig/getToken.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get user the access token.","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"httpLink","qualifiedName":"graphql_config.GraphqlConfig.httpLink","href":"services_graphql_config/GraphqlConfig/httpLink.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"imageUrlKey","qualifiedName":"graphql_config.GraphqlConfig.imageUrlKey","href":"services_graphql_config/GraphqlConfig/imageUrlKey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"orgURI","qualifiedName":"graphql_config.GraphqlConfig.orgURI","href":"services_graphql_config/GraphqlConfig/orgURI.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"test","qualifiedName":"graphql_config.GraphqlConfig.test","href":"services_graphql_config/GraphqlConfig/test.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"token","qualifiedName":"graphql_config.GraphqlConfig.token","href":"services_graphql_config/GraphqlConfig/token.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"urlKey","qualifiedName":"graphql_config.GraphqlConfig.urlKey","href":"services_graphql_config/GraphqlConfig/urlKey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"webSocketLink","qualifiedName":"graphql_config.GraphqlConfig.webSocketLink","href":"services_graphql_config/GraphqlConfig/webSocketLink.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"GraphqlConfig","type":"class","href":"services_graphql_config/GraphqlConfig-class.md"}},{"name":"MockHttpClient","qualifiedName":"graphql_config.MockHttpClient","href":"services_graphql_config/MockHttpClient-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"A mock HTTP client designed for use when testing code that uses BaseClient.","enclosedBy":{"name":"graphql_config","type":"library","href":"services_graphql_config/services_graphql_config-library.md"}},{"name":"MockHttpClient","qualifiedName":"graphql_config.MockHttpClient.MockHttpClient","href":"services_graphql_config/MockHttpClient/MockHttpClient.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MockHttpClient","type":"class","href":"services_graphql_config/MockHttpClient-class.md"}},{"name":"send","qualifiedName":"graphql_config.MockHttpClient.send","href":"services_graphql_config/MockHttpClient/send.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Sends an HTTP request and asynchronously returns the response.","enclosedBy":{"name":"MockHttpClient","type":"class","href":"services_graphql_config/MockHttpClient-class.md"}},{"name":"individual_post","qualifiedName":"individual_post","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CommentTemplate","qualifiedName":"individual_post.CommentTemplate","href":"views_after_auth_screens_feed_individual_post/CommentTemplate-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CommentTemplate returns a widget of the individual user commented on the post.","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"CommentTemplate","qualifiedName":"individual_post.CommentTemplate.CommentTemplate","href":"views_after_auth_screens_feed_individual_post/CommentTemplate/CommentTemplate.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentTemplate","type":"class","href":"views_after_auth_screens_feed_individual_post/CommentTemplate-class.md"}},{"name":"build","qualifiedName":"individual_post.CommentTemplate.build","href":"views_after_auth_screens_feed_individual_post/CommentTemplate/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CommentTemplate","type":"class","href":"views_after_auth_screens_feed_individual_post/CommentTemplate-class.md"}},{"name":"comment","qualifiedName":"individual_post.CommentTemplate.comment","href":"views_after_auth_screens_feed_individual_post/CommentTemplate/comment.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CommentTemplate","type":"class","href":"views_after_auth_screens_feed_individual_post/CommentTemplate-class.md"}},{"name":"IndividualPageLikeSection","qualifiedName":"individual_post.IndividualPageLikeSection","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"IndividualPageLikeSection returns a widget that show the list of all the users liked the post.","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"IndividualPageLikeSection","qualifiedName":"individual_post.IndividualPageLikeSection.IndividualPageLikeSection","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/IndividualPageLikeSection.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPageLikeSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md"}},{"name":"build","qualifiedName":"individual_post.IndividualPageLikeSection.build","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"IndividualPageLikeSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md"}},{"name":"usersLiked","qualifiedName":"individual_post.IndividualPageLikeSection.usersLiked","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/usersLiked.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPageLikeSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md"}},{"name":"IndividualPostCommentSection","qualifiedName":"individual_post.IndividualPostCommentSection","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"IndividualPostCommentSection returns a widget that show the list of all the users commented on the post.","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"IndividualPostCommentSection","qualifiedName":"individual_post.IndividualPostCommentSection.IndividualPostCommentSection","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/IndividualPostCommentSection.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPostCommentSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md"}},{"name":"build","qualifiedName":"individual_post.IndividualPostCommentSection.build","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"IndividualPostCommentSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md"}},{"name":"comments","qualifiedName":"individual_post.IndividualPostCommentSection.comments","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/comments.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPostCommentSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md"}},{"name":"postID","qualifiedName":"individual_post.IndividualPostCommentSection.postID","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/postID.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPostCommentSection","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md"}},{"name":"IndividualPostView","qualifiedName":"individual_post.IndividualPostView","href":"views_after_auth_screens_feed_individual_post/IndividualPostView-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"IndividualPostView returns a widget that has mutable state _IndividualPostViewState.","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"IndividualPostView","qualifiedName":"individual_post.IndividualPostView.IndividualPostView","href":"views_after_auth_screens_feed_individual_post/IndividualPostView/IndividualPostView.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPostView","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostView-class.md"}},{"name":"createState","qualifiedName":"individual_post.IndividualPostView.createState","href":"views_after_auth_screens_feed_individual_post/IndividualPostView/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"IndividualPostView","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostView-class.md"}},{"name":"post","qualifiedName":"individual_post.IndividualPostView.post","href":"views_after_auth_screens_feed_individual_post/IndividualPostView/post.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"IndividualPostView","type":"class","href":"views_after_auth_screens_feed_individual_post/IndividualPostView-class.md"}},{"name":"buildPadding","qualifiedName":"individual_post.buildPadding","href":"views_after_auth_screens_feed_individual_post/buildPadding.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"likedUserCircleAvatar","qualifiedName":"individual_post.likedUserCircleAvatar","href":"views_after_auth_screens_feed_individual_post/likedUserCircleAvatar.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"likedUserCircleAvatar returns a widget of the individual user liked the post.","enclosedBy":{"name":"individual_post","type":"library","href":"views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md"}},{"name":"invite_child","qualifiedName":"invite_child","href":"widgets_invite_child/widgets_invite_child-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"iconButton","qualifiedName":"invite_child.iconButton","href":"widgets_invite_child/iconButton.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"This function is for debugging purposes.\nIt prints \"tapped\" in the console for the developer to know that the button was tapped.","enclosedBy":{"name":"invite_child","type":"library","href":"widgets_invite_child/widgets_invite_child-library.md"}},{"name":"invite","qualifiedName":"invite_child.invite","href":"widgets_invite_child/invite.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"This widget gives us various options to invite someone to an organization.\nWe can use QR code scanner, social media platforms like twitter, whatsapp, telegram and many more.","enclosedBy":{"name":"invite_child","type":"library","href":"widgets_invite_child/widgets_invite_child-library.md"}},{"name":"join_organisation_after_auth","qualifiedName":"join_organisation_after_auth","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"JoinOrganisationAfterAuth","qualifiedName":"join_organisation_after_auth.JoinOrganisationAfterAuth","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"JoinOrganisationAfterAuth returns a widget for page to join the organization just after user authentication.","enclosedBy":{"name":"join_organisation_after_auth","type":"library","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md"}},{"name":"JoinOrganisationAfterAuth","qualifiedName":"join_organisation_after_auth.JoinOrganisationAfterAuth.JoinOrganisationAfterAuth","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/JoinOrganisationAfterAuth.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"JoinOrganisationAfterAuth","type":"class","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md"}},{"name":"build","qualifiedName":"join_organisation_after_auth.JoinOrganisationAfterAuth.build","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"JoinOrganisationAfterAuth","type":"class","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md"}},{"name":"orgId","qualifiedName":"join_organisation_after_auth.JoinOrganisationAfterAuth.orgId","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/orgId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"JoinOrganisationAfterAuth","type":"class","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md"}},{"name":"scanQR","qualifiedName":"join_organisation_after_auth.JoinOrganisationAfterAuth.scanQR","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/scanQR.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"scanQR returns a widget that is use in joining the organization via the QR code.","enclosedBy":{"name":"JoinOrganisationAfterAuth","type":"class","href":"views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md"}},{"name":"lang_switch","qualifiedName":"lang_switch","href":"widgets_lang_switch/widgets_lang_switch-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"LanguageTile","qualifiedName":"lang_switch.LanguageTile","href":"widgets_lang_switch/LanguageTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget enables language switch for \"internationalizing our app\".","enclosedBy":{"name":"lang_switch","type":"library","href":"widgets_lang_switch/widgets_lang_switch-library.md"}},{"name":"LanguageTile","qualifiedName":"lang_switch.LanguageTile.LanguageTile","href":"widgets_lang_switch/LanguageTile/LanguageTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LanguageTile","type":"class","href":"widgets_lang_switch/LanguageTile-class.md"}},{"name":"build","qualifiedName":"lang_switch.LanguageTile.build","href":"widgets_lang_switch/LanguageTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"LanguageTile","type":"class","href":"widgets_lang_switch/LanguageTile-class.md"}},{"name":"lang_view_model","qualifiedName":"lang_view_model","href":"view_model_lang_view_model/view_model_lang_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppLanguage","qualifiedName":"lang_view_model.AppLanguage","href":"view_model_lang_view_model/AppLanguage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"AppLanguage view model class interact with modal in the context of the App Language.\nThe class provides methods that set's the language, change the language in the modal.","enclosedBy":{"name":"lang_view_model","type":"library","href":"view_model_lang_view_model/view_model_lang_view_model-library.md"}},{"name":"AppLanguage","qualifiedName":"lang_view_model.AppLanguage.AppLanguage","href":"view_model_lang_view_model/AppLanguage/AppLanguage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"appLanguageQuery","qualifiedName":"lang_view_model.AppLanguage.appLanguageQuery","href":"view_model_lang_view_model/AppLanguage/appLanguageQuery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function perform graphQL query to check the app language.\nThe function uses gqlAuthQuery method provided by Database Functions Services.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"appLocal","qualifiedName":"lang_view_model.AppLanguage.appLocal","href":"view_model_lang_view_model/AppLanguage/appLocal.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"changeLanguage","qualifiedName":"lang_view_model.AppLanguage.changeLanguage","href":"view_model_lang_view_model/AppLanguage/changeLanguage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function change the app default language.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"databaseFunctions","qualifiedName":"lang_view_model.AppLanguage.databaseFunctions","href":"view_model_lang_view_model/AppLanguage/databaseFunctions.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"dbLanguageUpdate","qualifiedName":"lang_view_model.AppLanguage.dbLanguageUpdate","href":"view_model_lang_view_model/AppLanguage/dbLanguageUpdate.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function updates the Database Language by running the graphQL mutations.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"fetchLocale","qualifiedName":"lang_view_model.AppLanguage.fetchLocale","href":"view_model_lang_view_model/AppLanguage/fetchLocale.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch the language of the user's app.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"initialize","qualifiedName":"lang_view_model.AppLanguage.initialize","href":"view_model_lang_view_model/AppLanguage/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"isTest","qualifiedName":"lang_view_model.AppLanguage.isTest","href":"view_model_lang_view_model/AppLanguage/isTest.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"navigationService","qualifiedName":"lang_view_model.AppLanguage.navigationService","href":"view_model_lang_view_model/AppLanguage/navigationService.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"selectLanguagePress","qualifiedName":"lang_view_model.AppLanguage.selectLanguagePress","href":"view_model_lang_view_model/AppLanguage/selectLanguagePress.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function navigate user to /appSettingsPage route if the user is authenticated\nelse navigate to /setUrl route.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"userLanguageQuery","qualifiedName":"lang_view_model.AppLanguage.userLanguageQuery","href":"view_model_lang_view_model/AppLanguage/userLanguageQuery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function perform graphQL query to check the user's language in the database.\nThe function uses gqlAuthQuery method provided by Database Functions Services.","enclosedBy":{"name":"AppLanguage","type":"class","href":"view_model_lang_view_model/AppLanguage-class.md"}},{"name":"language_icon","qualifiedName":"language_icon","href":"custom_painters_language_icon/custom_painters_language_icon-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"LanguageIcon","qualifiedName":"language_icon.LanguageIcon","href":"custom_painters_language_icon/LanguageIcon-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class draws the language icon using custom paint.\nCustomPaint is a widget from the Flutter SDK, which enables\nyou to use a canvas to draw different shapes.","enclosedBy":{"name":"language_icon","type":"library","href":"custom_painters_language_icon/custom_painters_language_icon-library.md"}},{"name":"LanguageIcon","qualifiedName":"language_icon.LanguageIcon.LanguageIcon","href":"custom_painters_language_icon/LanguageIcon/LanguageIcon.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LanguageIcon","type":"class","href":"custom_painters_language_icon/LanguageIcon-class.md"}},{"name":"paint","qualifiedName":"language_icon.LanguageIcon.paint","href":"custom_painters_language_icon/LanguageIcon/paint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever the object needs to paint. The given Canvas has its\ncoordinate space configured such that the origin is at the top left of the\nbox. The area of the box is the size of the size argument.","enclosedBy":{"name":"LanguageIcon","type":"class","href":"custom_painters_language_icon/LanguageIcon-class.md"}},{"name":"shouldRepaint","qualifiedName":"language_icon.LanguageIcon.shouldRepaint","href":"custom_painters_language_icon/LanguageIcon/shouldRepaint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever a new instance of the custom painter delegate class is\nprovided to the RenderCustomPaint object, or any time that a new\nCustomPaint object is created with a new instance of the custom painter\ndelegate class (which amounts to the same thing, because the latter is\nimplemented in terms of the former).","enclosedBy":{"name":"LanguageIcon","type":"class","href":"custom_painters_language_icon/LanguageIcon-class.md"}},{"name":"language_model","qualifiedName":"language_model","href":"models_language_language_model/models_language_language_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Language","qualifiedName":"language_model.Language","href":"models_language_language_model/Language-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates an langauge model.","enclosedBy":{"name":"language_model","type":"library","href":"models_language_language_model/models_language_language_model-library.md"}},{"name":"Language","qualifiedName":"language_model.Language.Language","href":"models_language_language_model/Language/Language.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Language","type":"class","href":"models_language_language_model/Language-class.md"}},{"name":"countryCode","qualifiedName":"language_model.Language.countryCode","href":"models_language_language_model/Language/countryCode.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Language","type":"class","href":"models_language_language_model/Language-class.md"}},{"name":"langCode","qualifiedName":"language_model.Language.langCode","href":"models_language_language_model/Language/langCode.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Language","type":"class","href":"models_language_language_model/Language-class.md"}},{"name":"langName","qualifiedName":"language_model.Language.langName","href":"models_language_language_model/Language/langName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Language","type":"class","href":"models_language_language_model/Language-class.md"}},{"name":"langSample","qualifiedName":"language_model.Language.langSample","href":"models_language_language_model/Language/langSample.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Language","type":"class","href":"models_language_language_model/Language-class.md"}},{"name":"like_button_view_model","qualifiedName":"like_button_view_model","href":"view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"LikeButtonViewModel","qualifiedName":"like_button_view_model.LikeButtonViewModel","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"LikeButtonViewModel class helps to serve the data and\nto react to user's input for Like Button Widget.","enclosedBy":{"name":"like_button_view_model","type":"library","href":"view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md"}},{"name":"LikeButtonViewModel","qualifiedName":"like_button_view_model.LikeButtonViewModel.LikeButtonViewModel","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/LikeButtonViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"checkAndSetTheIsLiked","qualifiedName":"like_button_view_model.LikeButtonViewModel.checkAndSetTheIsLiked","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/checkAndSetTheIsLiked.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"dispose","qualifiedName":"like_button_view_model.LikeButtonViewModel.dispose","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"initialize","qualifiedName":"like_button_view_model.LikeButtonViewModel.initialize","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"isLiked","qualifiedName":"like_button_view_model.LikeButtonViewModel.isLiked","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/isLiked.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"likedBy","qualifiedName":"like_button_view_model.LikeButtonViewModel.likedBy","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likedBy.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"likesCount","qualifiedName":"like_button_view_model.LikeButtonViewModel.likesCount","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likesCount.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"setIsLiked","qualifiedName":"like_button_view_model.LikeButtonViewModel.setIsLiked","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/setIsLiked.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function set _isLike to true.","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"toggleIsLiked","qualifiedName":"like_button_view_model.LikeButtonViewModel.toggleIsLiked","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/toggleIsLiked.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function add like to the post if not liked and\nremove the like from the post if liked.","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"updatePost","qualifiedName":"like_button_view_model.LikeButtonViewModel.updatePost","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/updatePost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function updates the Post.","enclosedBy":{"name":"LikeButtonViewModel","type":"class","href":"view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md"}},{"name":"locator","qualifiedName":"locator","href":"locator/locator-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"connectivity","qualifiedName":"locator.connectivity","href":"locator/connectivity.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for Connectivity.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"databaseFunctions","qualifiedName":"locator.databaseFunctions","href":"locator/databaseFunctions.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for DataBaseMutationFunctions.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"graphqlConfig","qualifiedName":"locator.graphqlConfig","href":"locator/graphqlConfig.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for GraphqlConfig.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"imageCropper","qualifiedName":"locator.imageCropper","href":"locator/imageCropper.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for ImageCropper.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"imagePicker","qualifiedName":"locator.imagePicker","href":"locator/imagePicker.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for ImagePicker.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"locator","qualifiedName":"locator.locator","href":"locator/locator.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"Intializaing the locator.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"navigationService","qualifiedName":"locator.navigationService","href":"locator/navigationService.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for NavigationService.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"organizationService","qualifiedName":"locator.organizationService","href":"locator/organizationService.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for OrganizationService.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"queries","qualifiedName":"locator.queries","href":"locator/queries.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for Queries.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"setupLocator","qualifiedName":"locator.setupLocator","href":"locator/setupLocator.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"This function registers the widgets/objects in \"GetIt\".","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"sizeConfig","qualifiedName":"locator.sizeConfig","href":"locator/sizeConfig.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for SizeConfig.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"userConfig","qualifiedName":"locator.userConfig","href":"locator/userConfig.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"creating GetIt for UserConfig.","enclosedBy":{"name":"locator","type":"library","href":"locator/locator-library.md"}},{"name":"login","qualifiedName":"login","href":"views_pre_auth_screens_login/views_pre_auth_screens_login-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Login","qualifiedName":"login.Login","href":"views_pre_auth_screens_login/Login-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This is the login widget.\nThere are two input fiels. The first one takes in the email and\nthe second one takes in the password of the user.\nThere is also a \"Forgot Password\" text button, which directs to\nthe \"recover password\" screen when pressed.\nAt the bottom, there is a login button to initiate the login.","enclosedBy":{"name":"login","type":"library","href":"views_pre_auth_screens_login/views_pre_auth_screens_login-library.md"}},{"name":"Login","qualifiedName":"login.Login.Login","href":"views_pre_auth_screens_login/Login/Login.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Login","type":"class","href":"views_pre_auth_screens_login/Login-class.md"}},{"name":"createState","qualifiedName":"login.Login.createState","href":"views_pre_auth_screens_login/Login/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"Login","type":"class","href":"views_pre_auth_screens_login/Login-class.md"}},{"name":"login_view_model","qualifiedName":"login_view_model","href":"view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"LoginViewModel","qualifiedName":"login_view_model.LoginViewModel","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"LoginViewModel class helps to interact with model to serve data\nand react to user's input in Login View.","enclosedBy":{"name":"login_view_model","type":"library","href":"view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md"}},{"name":"LoginViewModel","qualifiedName":"login_view_model.LoginViewModel.LoginViewModel","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/LoginViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"email","qualifiedName":"login_view_model.LoginViewModel.email","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/email.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"emailFocus","qualifiedName":"login_view_model.LoginViewModel.emailFocus","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/emailFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"formKey","qualifiedName":"login_view_model.LoginViewModel.formKey","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/formKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"greeting","qualifiedName":"login_view_model.LoginViewModel.greeting","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/greeting.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"hidePassword","qualifiedName":"login_view_model.LoginViewModel.hidePassword","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/hidePassword.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"initialize","qualifiedName":"login_view_model.LoginViewModel.initialize","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"login","qualifiedName":"login_view_model.LoginViewModel.login","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/login.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to sign-in the user into application.","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"password","qualifiedName":"login_view_model.LoginViewModel.password","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/password.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"passwordFocus","qualifiedName":"login_view_model.LoginViewModel.passwordFocus","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/passwordFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"validate","qualifiedName":"login_view_model.LoginViewModel.validate","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel/validate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LoginViewModel","type":"class","href":"view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md"}},{"name":"main","qualifiedName":"main","href":"main/main-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DemoPageView","qualifiedName":"main.DemoPageView","href":"main/DemoPageView-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"PageView is a scrollable list that works page by page.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"DemoPageView","qualifiedName":"main.DemoPageView.DemoPageView","href":"main/DemoPageView/DemoPageView.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DemoPageView","type":"class","href":"main/DemoPageView-class.md"}},{"name":"build","qualifiedName":"main.DemoPageView.build","href":"main/DemoPageView/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"DemoPageView","type":"class","href":"main/DemoPageView-class.md"}},{"name":"DemoViewModel","qualifiedName":"main.DemoViewModel","href":"main/DemoViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ViewModel uses property-based data binding to establish a connection.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"DemoViewModel","qualifiedName":"main.DemoViewModel.DemoViewModel","href":"main/DemoViewModel/DemoViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DemoViewModel","type":"class","href":"main/DemoViewModel-class.md"}},{"name":"title","qualifiedName":"main.DemoViewModel.title","href":"main/DemoViewModel/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Getter function of the title.","enclosedBy":{"name":"DemoViewModel","type":"class","href":"main/DemoViewModel-class.md"}},{"name":"MyApp","qualifiedName":"main.MyApp","href":"main/MyApp-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Main widget that sets up the quick actions, internationalization, routing , notifications.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"MyApp","qualifiedName":"main.MyApp.MyApp","href":"main/MyApp/MyApp.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MyApp","type":"class","href":"main/MyApp-class.md"}},{"name":"createState","qualifiedName":"main.MyApp.createState","href":"main/MyApp/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"MyApp","type":"class","href":"main/MyApp-class.md"}},{"name":"androidFirebaseOptions","qualifiedName":"main.androidFirebaseOptions","href":"main/androidFirebaseOptions.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"HashMap of Firebase options for android.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"channel","qualifiedName":"main.channel","href":"main/channel.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"Create a AndroidNotificationChannel for heads up notifications.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"flutterLocalNotificationsPlugin","qualifiedName":"main.flutterLocalNotificationsPlugin","href":"main/flutterLocalNotificationsPlugin.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"Initialize the FlutterLocalNotificationsPlugin package.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"iosFirebaseOptions","qualifiedName":"main.iosFirebaseOptions","href":"main/iosFirebaseOptions.md","type":"top-level property","overriddenDepth":0,"packageName":"talawa","desc":"HashMap of Firebase options for android.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"main","qualifiedName":"main.main","href":"main/main.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"First function to initialize the application, invoked automatically.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"setUpFirebase","qualifiedName":"main.setUpFirebase","href":"main/setUpFirebase.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"Initializes the firebase in the app according to the userplatform (android/iOS).","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"setUpFirebaseKeys","qualifiedName":"main.setUpFirebaseKeys","href":"main/setUpFirebaseKeys.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"Initializes the firebase keys in the app according to the userplatform (android/iOS).","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"setUpFirebaseMessaging","qualifiedName":"main.setUpFirebaseMessaging","href":"main/setUpFirebaseMessaging.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"Set up firebase instance, enbables messaging,listens to icoming messages.","enclosedBy":{"name":"main","type":"library","href":"main/main-library.md"}},{"name":"main_screen","qualifiedName":"main_screen","href":"views_main_screen/views_main_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MainScreen","qualifiedName":"main_screen.MainScreen","href":"views_main_screen/MainScreen-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"main_screen","type":"library","href":"views_main_screen/views_main_screen-library.md"}},{"name":"MainScreen","qualifiedName":"main_screen.MainScreen.MainScreen","href":"views_main_screen/MainScreen/MainScreen.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreen","type":"class","href":"views_main_screen/MainScreen-class.md"}},{"name":"createState","qualifiedName":"main_screen.MainScreen.createState","href":"views_main_screen/MainScreen/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"MainScreen","type":"class","href":"views_main_screen/MainScreen-class.md"}},{"name":"mainScreenArgs","qualifiedName":"main_screen.MainScreen.mainScreenArgs","href":"views_main_screen/MainScreen/mainScreenArgs.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreen","type":"class","href":"views_main_screen/MainScreen-class.md"}},{"name":"main_screen_view_model","qualifiedName":"main_screen_view_model","href":"view_model_main_screen_view_model/view_model_main_screen_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MainScreenViewModel","qualifiedName":"main_screen_view_model.MainScreenViewModel","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views.","enclosedBy":{"name":"main_screen_view_model","type":"library","href":"view_model_main_screen_view_model/view_model_main_screen_view_model-library.md"}},{"name":"MainScreenViewModel","qualifiedName":"main_screen_view_model.MainScreenViewModel.MainScreenViewModel","href":"view_model_main_screen_view_model/MainScreenViewModel/MainScreenViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"context","qualifiedName":"main_screen_view_model.MainScreenViewModel.context","href":"view_model_main_screen_view_model/MainScreenViewModel/context.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"context consist of parent info.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"currentPageIndex","qualifiedName":"main_screen_view_model.MainScreenViewModel.currentPageIndex","href":"view_model_main_screen_view_model/MainScreenViewModel/currentPageIndex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"var for current page in index.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"fetchAndAddPlugins","qualifiedName":"main_screen_view_model.MainScreenViewModel.fetchAndAddPlugins","href":"view_model_main_screen_view_model/MainScreenViewModel/fetchAndAddPlugins.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Dynamically adds BottomNavigationBarItems in BottomNavigationBar.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"focusTarget","qualifiedName":"main_screen_view_model.MainScreenViewModel.focusTarget","href":"view_model_main_screen_view_model/MainScreenViewModel/focusTarget.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This returns a widget for a step in a tutorial.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"initialise","qualifiedName":"main_screen_view_model.MainScreenViewModel.initialise","href":"view_model_main_screen_view_model/MainScreenViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Initalizing function.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyBNChat","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyBNChat","href":"view_model_main_screen_view_model/MainScreenViewModel/keyBNChat.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyBNEvents","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyBNEvents","href":"view_model_main_screen_view_model/MainScreenViewModel/keyBNEvents.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyBNHome","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyBNHome","href":"view_model_main_screen_view_model/MainScreenViewModel/keyBNHome.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyBNPost","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyBNPost","href":"view_model_main_screen_view_model/MainScreenViewModel/keyBNPost.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyBNProfile","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyBNProfile","href":"view_model_main_screen_view_model/MainScreenViewModel/keyBNProfile.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyDrawerCurOrg","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyDrawerCurOrg","href":"view_model_main_screen_view_model/MainScreenViewModel/keyDrawerCurOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyDrawerJoinOrg","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyDrawerJoinOrg","href":"view_model_main_screen_view_model/MainScreenViewModel/keyDrawerJoinOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyDrawerLeaveCurrentOrg","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyDrawerLeaveCurrentOrg","href":"view_model_main_screen_view_model/MainScreenViewModel/keyDrawerLeaveCurrentOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keyDrawerSwitchableOrg","qualifiedName":"main_screen_view_model.MainScreenViewModel.keyDrawerSwitchableOrg","href":"view_model_main_screen_view_model/MainScreenViewModel/keyDrawerSwitchableOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySEAdd","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySEAdd","href":"view_model_main_screen_view_model/MainScreenViewModel/keySEAdd.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySECard","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySECard","href":"view_model_main_screen_view_model/MainScreenViewModel/keySECard.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySECategoryMenu","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySECategoryMenu","href":"view_model_main_screen_view_model/MainScreenViewModel/keySECategoryMenu.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySEDateFilter","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySEDateFilter","href":"view_model_main_screen_view_model/MainScreenViewModel/keySEDateFilter.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySHMenuIcon","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySHMenuIcon","href":"view_model_main_screen_view_model/MainScreenViewModel/keySHMenuIcon.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySHOrgName","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySHOrgName","href":"view_model_main_screen_view_model/MainScreenViewModel/keySHOrgName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySHPinnedPost","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySHPinnedPost","href":"view_model_main_screen_view_model/MainScreenViewModel/keySHPinnedPost.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySHPost","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySHPost","href":"view_model_main_screen_view_model/MainScreenViewModel/keySHPost.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPAppSetting","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPAppSetting","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPAppSetting.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPDonateUs","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPDonateUs","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPDonateUs.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPEditProfile","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPEditProfile","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPEditProfile.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPHelp","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPHelp","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPHelp.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPInvite","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPInvite","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPInvite.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPLogout","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPLogout","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPLogout.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"keySPPalisadoes","qualifiedName":"main_screen_view_model.MainScreenViewModel.keySPPalisadoes","href":"view_model_main_screen_view_model/MainScreenViewModel/keySPPalisadoes.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"navBarItems","qualifiedName":"main_screen_view_model.MainScreenViewModel.navBarItems","href":"view_model_main_screen_view_model/MainScreenViewModel/navBarItems.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Actual BottomNavigationBarItems that show up on the screen.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"onTabTapped","qualifiedName":"main_screen_view_model.MainScreenViewModel.onTabTapped","href":"view_model_main_screen_view_model/MainScreenViewModel/onTabTapped.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Handles click on BottomNavigationBarItem.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"pages","qualifiedName":"main_screen_view_model.MainScreenViewModel.pages","href":"view_model_main_screen_view_model/MainScreenViewModel/pages.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Contains the Widgets to be rendered for corresponding navbar items.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"pluginList","qualifiedName":"main_screen_view_model.MainScreenViewModel.pluginList","href":"view_model_main_screen_view_model/MainScreenViewModel/pluginList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"list of all the pluginList.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"pluginPrototypeData","qualifiedName":"main_screen_view_model.MainScreenViewModel.pluginPrototypeData","href":"view_model_main_screen_view_model/MainScreenViewModel/pluginPrototypeData.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Maps the feature names with their proper Icon and Page.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"scaffoldKey","qualifiedName":"main_screen_view_model.MainScreenViewModel.scaffoldKey","href":"view_model_main_screen_view_model/MainScreenViewModel/scaffoldKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"showAppTour","qualifiedName":"main_screen_view_model.MainScreenViewModel.showAppTour","href":"view_model_main_screen_view_model/MainScreenViewModel/showAppTour.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"bool to determine if we wanna show the apptour.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"showHome","qualifiedName":"main_screen_view_model.MainScreenViewModel.showHome","href":"view_model_main_screen_view_model/MainScreenViewModel/showHome.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function shows the Home screen.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"showTutorial","qualifiedName":"main_screen_view_model.MainScreenViewModel.showTutorial","href":"view_model_main_screen_view_model/MainScreenViewModel/showTutorial.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function show tutorial to user.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"targets","qualifiedName":"main_screen_view_model.MainScreenViewModel.targets","href":"view_model_main_screen_view_model/MainScreenViewModel/targets.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"array of target.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourAddPost","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourAddPost","href":"view_model_main_screen_view_model/MainScreenViewModel/tourAddPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function show the tutorial to add Post in the organization.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourChat","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourChat","href":"view_model_main_screen_view_model/MainScreenViewModel/tourChat.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function show the tour of chats.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourComplete","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourComplete","href":"view_model_main_screen_view_model/MainScreenViewModel/tourComplete.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"bool to determine if apptour is complete.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourEventTargets","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourEventTargets","href":"view_model_main_screen_view_model/MainScreenViewModel/tourEventTargets.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function show the tutorial for Events.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourHomeTargets","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourHomeTargets","href":"view_model_main_screen_view_model/MainScreenViewModel/tourHomeTargets.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"this functions starts the tour and info to be displayed is mentioned in this functions.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourProfile","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourProfile","href":"view_model_main_screen_view_model/MainScreenViewModel/tourProfile.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function show the tutorial for the profile page.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tourSkipped","qualifiedName":"main_screen_view_model.MainScreenViewModel.tourSkipped","href":"view_model_main_screen_view_model/MainScreenViewModel/tourSkipped.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"bool to determine if apptour is skipped.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"tutorialCoachMark","qualifiedName":"main_screen_view_model.MainScreenViewModel.tutorialCoachMark","href":"view_model_main_screen_view_model/MainScreenViewModel/tutorialCoachMark.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"tutorialCoachMark consist of coach used to give tutorial.","enclosedBy":{"name":"MainScreenViewModel","type":"class","href":"view_model_main_screen_view_model/MainScreenViewModel-class.md"}},{"name":"mainscreen_navigation_args","qualifiedName":"mainscreen_navigation_args","href":"models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MainScreenArgs","qualifiedName":"mainscreen_navigation_args.MainScreenArgs","href":"models_mainscreen_navigation_args/MainScreenArgs-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"mainscreen_navigation_args","type":"library","href":"models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md"}},{"name":"MainScreenArgs","qualifiedName":"mainscreen_navigation_args.MainScreenArgs.MainScreenArgs","href":"models_mainscreen_navigation_args/MainScreenArgs/MainScreenArgs.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreenArgs","type":"class","href":"models_mainscreen_navigation_args/MainScreenArgs-class.md"}},{"name":"fromSignUp","qualifiedName":"mainscreen_navigation_args.MainScreenArgs.fromSignUp","href":"models_mainscreen_navigation_args/MainScreenArgs/fromSignUp.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreenArgs","type":"class","href":"models_mainscreen_navigation_args/MainScreenArgs-class.md"}},{"name":"mainScreenIndex","qualifiedName":"mainscreen_navigation_args.MainScreenArgs.mainScreenIndex","href":"models_mainscreen_navigation_args/MainScreenArgs/mainScreenIndex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MainScreenArgs","type":"class","href":"models_mainscreen_navigation_args/MainScreenArgs-class.md"}},{"name":"map_screen","qualifiedName":"map_screen","href":"views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MapScreen","qualifiedName":"map_screen.MapScreen","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"MapScreen returns a widget that has mutable state _MapScreenState.","enclosedBy":{"name":"map_screen","type":"library","href":"views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md"}},{"name":"MapScreen","qualifiedName":"map_screen.MapScreen.MapScreen","href":"views_after_auth_screens_venue_map_screen/MapScreen/MapScreen.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MapScreen","type":"class","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md"}},{"name":"createState","qualifiedName":"map_screen.MapScreen.createState","href":"views_after_auth_screens_venue_map_screen/MapScreen/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"MapScreen","type":"class","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md"}},{"name":"latitude","qualifiedName":"map_screen.MapScreen.latitude","href":"views_after_auth_screens_venue_map_screen/MapScreen/latitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MapScreen","type":"class","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md"}},{"name":"longitude","qualifiedName":"map_screen.MapScreen.longitude","href":"views_after_auth_screens_venue_map_screen/MapScreen/longitude.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MapScreen","type":"class","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md"}},{"name":"model","qualifiedName":"map_screen.MapScreen.model","href":"views_after_auth_screens_venue_map_screen/MapScreen/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MapScreen","type":"class","href":"views_after_auth_screens_venue_map_screen/MapScreen-class.md"}},{"name":"member_name_tile","qualifiedName":"member_name_tile","href":"widgets_member_name_tile/widgets_member_name_tile-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MemberNameTile","qualifiedName":"member_name_tile.MemberNameTile","href":"widgets_member_name_tile/MemberNameTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget returns a tile containing the name of the member.\nAlong with the name, there is a circle avatar which either contains\nthe image uploaded by the user or the first character of his/her name in\nuppercase.","enclosedBy":{"name":"member_name_tile","type":"library","href":"widgets_member_name_tile/widgets_member_name_tile-library.md"}},{"name":"MemberNameTile","qualifiedName":"member_name_tile.MemberNameTile.MemberNameTile","href":"widgets_member_name_tile/MemberNameTile/MemberNameTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MemberNameTile","type":"class","href":"widgets_member_name_tile/MemberNameTile-class.md"}},{"name":"build","qualifiedName":"member_name_tile.MemberNameTile.build","href":"widgets_member_name_tile/MemberNameTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"MemberNameTile","type":"class","href":"widgets_member_name_tile/MemberNameTile-class.md"}},{"name":"onDelete","qualifiedName":"member_name_tile.MemberNameTile.onDelete","href":"widgets_member_name_tile/MemberNameTile/onDelete.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MemberNameTile","type":"class","href":"widgets_member_name_tile/MemberNameTile-class.md"}},{"name":"userImage","qualifiedName":"member_name_tile.MemberNameTile.userImage","href":"widgets_member_name_tile/MemberNameTile/userImage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MemberNameTile","type":"class","href":"widgets_member_name_tile/MemberNameTile-class.md"}},{"name":"userName","qualifiedName":"member_name_tile.MemberNameTile.userName","href":"widgets_member_name_tile/MemberNameTile/userName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MemberNameTile","type":"class","href":"widgets_member_name_tile/MemberNameTile-class.md"}},{"name":"multi_media_pick_service","qualifiedName":"multi_media_pick_service","href":"services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"MultiMediaPickerService","qualifiedName":"multi_media_pick_service.MultiMediaPickerService","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This is a third party service which provide the service to select the image from.","enclosedBy":{"name":"multi_media_pick_service","type":"library","href":"services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md"}},{"name":"MultiMediaPickerService","qualifiedName":"multi_media_pick_service.MultiMediaPickerService.MultiMediaPickerService","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService/MultiMediaPickerService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"MultiMediaPickerService","type":"class","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md"}},{"name":"cropImage","qualifiedName":"multi_media_pick_service.MultiMediaPickerService.cropImage","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService/cropImage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to crop the image selected by the user.","enclosedBy":{"name":"MultiMediaPickerService","type":"class","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md"}},{"name":"fileStream","qualifiedName":"multi_media_pick_service.MultiMediaPickerService.fileStream","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService/fileStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"This function returns the stream of files.","enclosedBy":{"name":"MultiMediaPickerService","type":"class","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md"}},{"name":"getPhotoFromGallery","qualifiedName":"multi_media_pick_service.MultiMediaPickerService.getPhotoFromGallery","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService/getPhotoFromGallery.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to pick the image from gallery or to click the image from user's camera.","enclosedBy":{"name":"MultiMediaPickerService","type":"class","href":"services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md"}},{"name":"navigation_service","qualifiedName":"navigation_service","href":"services_navigation_service/services_navigation_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"NavigationService","qualifiedName":"navigation_service.NavigationService","href":"services_navigation_service/NavigationService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"NavigationService class provides different functions as service in the context of navigation.","enclosedBy":{"name":"navigation_service","type":"library","href":"services_navigation_service/services_navigation_service-library.md"}},{"name":"NavigationService","qualifiedName":"navigation_service.NavigationService.NavigationService","href":"services_navigation_service/NavigationService/NavigationService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"fromInviteLink","qualifiedName":"navigation_service.NavigationService.fromInviteLink","href":"services_navigation_service/NavigationService/fromInviteLink.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"navigatorKey","qualifiedName":"navigation_service.NavigationService.navigatorKey","href":"services_navigation_service/NavigationService/navigatorKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"pop","qualifiedName":"navigation_service.NavigationService.pop","href":"services_navigation_service/NavigationService/pop.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function pops the current state.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"popAndPushScreen","qualifiedName":"navigation_service.NavigationService.popAndPushScreen","href":"services_navigation_service/NavigationService/popAndPushScreen.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function pop the initial route and push the new route to the navigator.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"pushDialog","qualifiedName":"navigation_service.NavigationService.pushDialog","href":"services_navigation_service/NavigationService/pushDialog.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to show the custom Dialog.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"pushReplacementScreen","qualifiedName":"navigation_service.NavigationService.pushReplacementScreen","href":"services_navigation_service/NavigationService/pushReplacementScreen.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function push the route and replace the screen.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"pushScreen","qualifiedName":"navigation_service.NavigationService.pushScreen","href":"services_navigation_service/NavigationService/pushScreen.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function push the route to the navigator.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"removeAllAndPush","qualifiedName":"navigation_service.NavigationService.removeAllAndPush","href":"services_navigation_service/NavigationService/removeAllAndPush.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function remove all the routes till the particular route and add new route.","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"showSnackBar","qualifiedName":"navigation_service.NavigationService.showSnackBar","href":"services_navigation_service/NavigationService/showSnackBar.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This is used for the quick alert of duration: 2 seconds with text message(passed).","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"showTalawaErrorDialog","qualifiedName":"navigation_service.NavigationService.showTalawaErrorDialog","href":"services_navigation_service/NavigationService/showTalawaErrorDialog.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"showTalawaErrorSnackBar","qualifiedName":"navigation_service.NavigationService.showTalawaErrorSnackBar","href":"services_navigation_service/NavigationService/showTalawaErrorSnackBar.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NavigationService","type":"class","href":"services_navigation_service/NavigationService-class.md"}},{"name":"options","qualifiedName":"options","href":"models_options_options/models_options_options-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Options","qualifiedName":"options.Options","href":"models_options_options/Options-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates a Option model.","enclosedBy":{"name":"options","type":"library","href":"models_options_options/models_options_options-library.md"}},{"name":"Options","qualifiedName":"options.Options.Options","href":"models_options_options/Options/Options.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Options","type":"class","href":"models_options_options/Options-class.md"}},{"name":"icon","qualifiedName":"options.Options.icon","href":"models_options_options/Options/icon.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Options","type":"class","href":"models_options_options/Options-class.md"}},{"name":"subtitle","qualifiedName":"options.Options.subtitle","href":"models_options_options/Options/subtitle.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Options","type":"class","href":"models_options_options/Options-class.md"}},{"name":"title","qualifiedName":"options.Options.title","href":"models_options_options/Options/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Options","type":"class","href":"models_options_options/Options-class.md"}},{"name":"trailingIconButton","qualifiedName":"options.Options.trailingIconButton","href":"models_options_options/Options/trailingIconButton.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Options","type":"class","href":"models_options_options/Options-class.md"}},{"name":"org_info","qualifiedName":"org_info","href":"models_organization_org_info/models_organization_org_info-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrgInfo","qualifiedName":"org_info.OrgInfo","href":"models_organization_org_info/OrgInfo-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates an organization-information model and returns an OrgInfo instance.","enclosedBy":{"name":"org_info","type":"library","href":"models_organization_org_info/models_organization_org_info-library.md"}},{"name":"OrgInfo","qualifiedName":"org_info.OrgInfo.OrgInfo","href":"models_organization_org_info/OrgInfo/OrgInfo.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"admins","qualifiedName":"org_info.OrgInfo.admins","href":"models_organization_org_info/OrgInfo/admins.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"creatorInfo","qualifiedName":"org_info.OrgInfo.creatorInfo","href":"models_organization_org_info/OrgInfo/creatorInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"description","qualifiedName":"org_info.OrgInfo.description","href":"models_organization_org_info/OrgInfo/description.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"OrgInfo.fromJson","qualifiedName":"org_info.OrgInfo.fromJson","href":"models_organization_org_info/OrgInfo/OrgInfo.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"fromJsonToList","qualifiedName":"org_info.OrgInfo.fromJsonToList","href":"models_organization_org_info/OrgInfo/fromJsonToList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"id","qualifiedName":"org_info.OrgInfo.id","href":"models_organization_org_info/OrgInfo/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"image","qualifiedName":"org_info.OrgInfo.image","href":"models_organization_org_info/OrgInfo/image.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"isPublic","qualifiedName":"org_info.OrgInfo.isPublic","href":"models_organization_org_info/OrgInfo/isPublic.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"members","qualifiedName":"org_info.OrgInfo.members","href":"models_organization_org_info/OrgInfo/members.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"name","qualifiedName":"org_info.OrgInfo.name","href":"models_organization_org_info/OrgInfo/name.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfo","type":"class","href":"models_organization_org_info/OrgInfo-class.md"}},{"name":"OrgInfoAdapter","qualifiedName":"org_info.OrgInfoAdapter","href":"models_organization_org_info/OrgInfoAdapter-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"org_info","type":"library","href":"models_organization_org_info/models_organization_org_info-library.md"}},{"name":"operator ==","qualifiedName":"org_info.OrgInfoAdapter.==","href":"models_organization_org_info/OrgInfoAdapter/operator_equals.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"The equality operator.","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"OrgInfoAdapter","qualifiedName":"org_info.OrgInfoAdapter.OrgInfoAdapter","href":"models_organization_org_info/OrgInfoAdapter/OrgInfoAdapter.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"hashCode","qualifiedName":"org_info.OrgInfoAdapter.hashCode","href":"models_organization_org_info/OrgInfoAdapter/hashCode.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The hash code for this object.","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"read","qualifiedName":"org_info.OrgInfoAdapter.read","href":"models_organization_org_info/OrgInfoAdapter/read.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Is called when a value has to be decoded.","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"typeId","qualifiedName":"org_info.OrgInfoAdapter.typeId","href":"models_organization_org_info/OrgInfoAdapter/typeId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Called for type registration","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"write","qualifiedName":"org_info.OrgInfoAdapter.write","href":"models_organization_org_info/OrgInfoAdapter/write.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Is called when a value has to be encoded.","enclosedBy":{"name":"OrgInfoAdapter","type":"class","href":"models_organization_org_info/OrgInfoAdapter-class.md"}},{"name":"org_service","qualifiedName":"org_service","href":"services_org_service/services_org_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrganizationService","qualifiedName":"org_service.OrganizationService","href":"services_org_service/OrganizationService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"OrganizationService class provides the in the context of organizations.","enclosedBy":{"name":"org_service","type":"library","href":"services_org_service/services_org_service-library.md"}},{"name":"OrganizationService","qualifiedName":"org_service.OrganizationService.OrganizationService","href":"services_org_service/OrganizationService/OrganizationService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationService","type":"class","href":"services_org_service/OrganizationService-class.md"}},{"name":"getOrgMembersList","qualifiedName":"org_service.OrganizationService.getOrgMembersList","href":"services_org_service/OrganizationService/getOrgMembersList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch and returns the list of organization members.","enclosedBy":{"name":"OrganizationService","type":"class","href":"services_org_service/OrganizationService-class.md"}},{"name":"organization_feed","qualifiedName":"organization_feed","href":"views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrganizationFeed","qualifiedName":"organization_feed.OrganizationFeed","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"OrganizationFeed returns a widget that shows the feed of the organization.","enclosedBy":{"name":"organization_feed","type":"library","href":"views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md"}},{"name":"OrganizationFeed","qualifiedName":"organization_feed.OrganizationFeed.OrganizationFeed","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed/OrganizationFeed.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeed","type":"class","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md"}},{"name":"build","qualifiedName":"organization_feed.OrganizationFeed.build","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"OrganizationFeed","type":"class","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md"}},{"name":"forTest","qualifiedName":"organization_feed.OrganizationFeed.forTest","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed/forTest.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeed","type":"class","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md"}},{"name":"homeModel","qualifiedName":"organization_feed.OrganizationFeed.homeModel","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed/homeModel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeed","type":"class","href":"views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md"}},{"name":"organization_feed_view_model","qualifiedName":"organization_feed_view_model","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrganizationFeedViewModel","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"OrganizationFeedViewModel class helps to interact with model to serve data to view for organization feed section.","enclosedBy":{"name":"organization_feed_view_model","type":"library","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md"}},{"name":"OrganizationFeedViewModel","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.OrganizationFeedViewModel","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/OrganizationFeedViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"addNewPost","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.addNewPost","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/addNewPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function adds new Post.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"buildNewPosts","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.buildNewPosts","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/buildNewPosts.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function initialise _posts with newPosts.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"currentOrgName","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.currentOrgName","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/currentOrgName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"dispose","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.dispose","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Discards any resources used by the object. After this is called, the\nobject is not in a usable state and should be discarded (calls to\naddListener will throw after the object is disposed).","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"fetchNewPosts","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.fetchNewPosts","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/fetchNewPosts.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetches new posts in the organization.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"initialise","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.initialise","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"initializeWithDemoData","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.initializeWithDemoData","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initializeWithDemoData.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"istest","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.istest","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/istest.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"navigateToIndividualPage","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.navigateToIndividualPage","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToIndividualPage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function navigate to individual post page.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"navigateToPinnedPostPage","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.navigateToPinnedPostPage","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToPinnedPostPage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function navigate to pinned post page.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"pinnedPosts","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.pinnedPosts","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/pinnedPosts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"posts","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.posts","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/posts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"setCurrentOrganizationName","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.setCurrentOrganizationName","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/setCurrentOrganizationName.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function sets the organization name after update.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"updatedPost","qualifiedName":"organization_feed_view_model.OrganizationFeedViewModel.updatedPost","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/updatedPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function updates the post.","enclosedBy":{"name":"OrganizationFeedViewModel","type":"class","href":"view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md"}},{"name":"organization_list","qualifiedName":"organization_list","href":"widgets_organization_list/widgets_organization_list-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrganizationList","qualifiedName":"organization_list.OrganizationList","href":"widgets_organization_list/OrganizationList-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns the OrganizationList widget.","enclosedBy":{"name":"organization_list","type":"library","href":"widgets_organization_list/widgets_organization_list-library.md"}},{"name":"OrganizationList","qualifiedName":"organization_list.OrganizationList.OrganizationList","href":"widgets_organization_list/OrganizationList/OrganizationList.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationList","type":"class","href":"widgets_organization_list/OrganizationList-class.md"}},{"name":"build","qualifiedName":"organization_list.OrganizationList.build","href":"widgets_organization_list/OrganizationList/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"OrganizationList","type":"class","href":"widgets_organization_list/OrganizationList-class.md"}},{"name":"model","qualifiedName":"organization_list.OrganizationList.model","href":"widgets_organization_list/OrganizationList/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"model is a type of SelectOrganizationViewModel which provides methods to handle the data for this component.","enclosedBy":{"name":"OrganizationList","type":"class","href":"widgets_organization_list/OrganizationList-class.md"}},{"name":"organization_search_list","qualifiedName":"organization_search_list","href":"widgets_organization_search_list/widgets_organization_search_list-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"OrganizationSearchList","qualifiedName":"organization_search_list.OrganizationSearchList","href":"widgets_organization_search_list/OrganizationSearchList-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"OrganizationSearchList class return a widget that shows all\nthe matching organizations searched on the search bar.","enclosedBy":{"name":"organization_search_list","type":"library","href":"widgets_organization_search_list/widgets_organization_search_list-library.md"}},{"name":"OrganizationSearchList","qualifiedName":"organization_search_list.OrganizationSearchList.OrganizationSearchList","href":"widgets_organization_search_list/OrganizationSearchList/OrganizationSearchList.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationSearchList","type":"class","href":"widgets_organization_search_list/OrganizationSearchList-class.md"}},{"name":"build","qualifiedName":"organization_search_list.OrganizationSearchList.build","href":"widgets_organization_search_list/OrganizationSearchList/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"OrganizationSearchList","type":"class","href":"widgets_organization_search_list/OrganizationSearchList-class.md"}},{"name":"model","qualifiedName":"organization_search_list.OrganizationSearchList.model","href":"widgets_organization_search_list/OrganizationSearchList/model.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"OrganizationSearchList","type":"class","href":"widgets_organization_search_list/OrganizationSearchList-class.md"}},{"name":"pinned_carousel_widget","qualifiedName":"pinned_carousel_widget","href":"widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomCarouselScroller","qualifiedName":"pinned_carousel_widget.CustomCarouselScroller","href":"widgets_pinned_carousel_widget/CustomCarouselScroller-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"pinned_carousel_widget","type":"library","href":"widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md"}},{"name":"CustomCarouselScroller","qualifiedName":"pinned_carousel_widget.CustomCarouselScroller.CustomCarouselScroller","href":"widgets_pinned_carousel_widget/CustomCarouselScroller/CustomCarouselScroller.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScroller","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScroller-class.md"}},{"name":"createState","qualifiedName":"pinned_carousel_widget.CustomCarouselScroller.createState","href":"widgets_pinned_carousel_widget/CustomCarouselScroller/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"CustomCarouselScroller","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScroller-class.md"}},{"name":"navigateToIndividualPostPage","qualifiedName":"pinned_carousel_widget.CustomCarouselScroller.navigateToIndividualPostPage","href":"widgets_pinned_carousel_widget/CustomCarouselScroller/navigateToIndividualPostPage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScroller","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScroller-class.md"}},{"name":"pinnedPosts","qualifiedName":"pinned_carousel_widget.CustomCarouselScroller.pinnedPosts","href":"widgets_pinned_carousel_widget/CustomCarouselScroller/pinnedPosts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScroller","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScroller-class.md"}},{"name":"CustomCarouselScrollerState","qualifiedName":"pinned_carousel_widget.CustomCarouselScrollerState","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CustomCarouselScrollerState class return a widget that is\nused to generate slider for pinned post on the top of the Home Screen.","enclosedBy":{"name":"pinned_carousel_widget","type":"library","href":"widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md"}},{"name":"CustomCarouselScrollerState","qualifiedName":"pinned_carousel_widget.CustomCarouselScrollerState.CustomCarouselScrollerState","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState/CustomCarouselScrollerState.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScrollerState","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md"}},{"name":"build","qualifiedName":"pinned_carousel_widget.CustomCarouselScrollerState.build","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomCarouselScrollerState","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md"}},{"name":"controller","qualifiedName":"pinned_carousel_widget.CustomCarouselScrollerState.controller","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState/controller.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScrollerState","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md"}},{"name":"pindex","qualifiedName":"pinned_carousel_widget.CustomCarouselScrollerState.pindex","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState/pindex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomCarouselScrollerState","type":"class","href":"widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md"}},{"name":"PinnedPostCarousel","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"PinnedPostCarousel class returns a widget for pinned posts in\nthe slider/carousel on the top of the Home Screen.\nTapping on a post will redirect you to the respective post screen.","enclosedBy":{"name":"pinned_carousel_widget","type":"library","href":"widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md"}},{"name":"PinnedPostCarousel","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel.PinnedPostCarousel","href":"widgets_pinned_carousel_widget/PinnedPostCarousel/PinnedPostCarousel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostCarousel","type":"class","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md"}},{"name":"build","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel.build","href":"widgets_pinned_carousel_widget/PinnedPostCarousel/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"PinnedPostCarousel","type":"class","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md"}},{"name":"navigateToIndividualPostPage","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel.navigateToIndividualPostPage","href":"widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToIndividualPostPage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostCarousel","type":"class","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md"}},{"name":"navigateToPinnedPostPage","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel.navigateToPinnedPostPage","href":"widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToPinnedPostPage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostCarousel","type":"class","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md"}},{"name":"pinnedPosts","qualifiedName":"pinned_carousel_widget.PinnedPostCarousel.pinnedPosts","href":"widgets_pinned_carousel_widget/PinnedPostCarousel/pinnedPosts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostCarousel","type":"class","href":"widgets_pinned_carousel_widget/PinnedPostCarousel-class.md"}},{"name":"pinned_post_demo_data","qualifiedName":"pinned_post_demo_data","href":"demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"pinnedPostsDemoData","qualifiedName":"pinned_post_demo_data.pinnedPostsDemoData","href":"demo_server_data_pinned_post_demo_data/pinnedPostsDemoData-constant.md","type":"top-level constant","overriddenDepth":0,"packageName":"talawa","desc":"This file contains demo data for pinned posts. It contains a list of type Map<String, Object> and sample data.","enclosedBy":{"name":"pinned_post_demo_data","type":"library","href":"demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md"}},{"name":"pinned_post_page","qualifiedName":"pinned_post_page","href":"views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"PinnedPostPage","qualifiedName":"pinned_post_page.PinnedPostPage","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"PinnedPostPage returns a widget that shows the list of all the pinned post.","enclosedBy":{"name":"pinned_post_page","type":"library","href":"views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md"}},{"name":"PinnedPostPage","qualifiedName":"pinned_post_page.PinnedPostPage.PinnedPostPage","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/PinnedPostPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostPage","type":"class","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md"}},{"name":"build","qualifiedName":"pinned_post_page.PinnedPostPage.build","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"PinnedPostPage","type":"class","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md"}},{"name":"pinnedPosts","qualifiedName":"pinned_post_page.PinnedPostPage.pinnedPosts","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/pinnedPosts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PinnedPostPage","type":"class","href":"views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md"}},{"name":"post_demo_data","qualifiedName":"post_demo_data","href":"demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"postsDemoData","qualifiedName":"post_demo_data.postsDemoData","href":"demo_server_data_post_demo_data/postsDemoData-constant.md","type":"top-level constant","overriddenDepth":0,"packageName":"talawa","desc":"This file contains demo data for posts. It contains a list of type Map<String, Object>\nand sample data of posts.","enclosedBy":{"name":"post_demo_data","type":"library","href":"demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md"}},{"name":"post_detailed_page","qualifiedName":"post_detailed_page","href":"widgets_post_detailed_page/widgets_post_detailed_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DescriptionTextWidget","qualifiedName":"post_detailed_page.DescriptionTextWidget","href":"widgets_post_detailed_page/DescriptionTextWidget-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class sets up the post page.\nTo implement the \"show less\" and \"show more\" functions for the text,\nwe divide the text into two parts: firstHalf and secondHalf. A flag is set to\ntrack whether to display either the firstHalf or both(the entire text).","enclosedBy":{"name":"post_detailed_page","type":"library","href":"widgets_post_detailed_page/widgets_post_detailed_page-library.md"}},{"name":"DescriptionTextWidget","qualifiedName":"post_detailed_page.DescriptionTextWidget.DescriptionTextWidget","href":"widgets_post_detailed_page/DescriptionTextWidget/DescriptionTextWidget.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DescriptionTextWidget","type":"class","href":"widgets_post_detailed_page/DescriptionTextWidget-class.md"}},{"name":"createState","qualifiedName":"post_detailed_page.DescriptionTextWidget.createState","href":"widgets_post_detailed_page/DescriptionTextWidget/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"DescriptionTextWidget","type":"class","href":"widgets_post_detailed_page/DescriptionTextWidget-class.md"}},{"name":"text","qualifiedName":"post_detailed_page.DescriptionTextWidget.text","href":"widgets_post_detailed_page/DescriptionTextWidget/text.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DescriptionTextWidget","type":"class","href":"widgets_post_detailed_page/DescriptionTextWidget-class.md"}},{"name":"post_list_widget","qualifiedName":"post_list_widget","href":"widgets_post_list_widget/widgets_post_list_widget-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"PostListWidget","qualifiedName":"post_list_widget.PostListWidget","href":"widgets_post_list_widget/PostListWidget-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class receives a List of all the Post widgets and returns a ListView.","enclosedBy":{"name":"post_list_widget","type":"library","href":"widgets_post_list_widget/widgets_post_list_widget-library.md"}},{"name":"PostListWidget","qualifiedName":"post_list_widget.PostListWidget.PostListWidget","href":"widgets_post_list_widget/PostListWidget/PostListWidget.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostListWidget","type":"class","href":"widgets_post_list_widget/PostListWidget-class.md"}},{"name":"build","qualifiedName":"post_list_widget.PostListWidget.build","href":"widgets_post_list_widget/PostListWidget/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"PostListWidget","type":"class","href":"widgets_post_list_widget/PostListWidget-class.md"}},{"name":"function","qualifiedName":"post_list_widget.PostListWidget.function","href":"widgets_post_list_widget/PostListWidget/function.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostListWidget","type":"class","href":"widgets_post_list_widget/PostListWidget-class.md"}},{"name":"posts","qualifiedName":"post_list_widget.PostListWidget.posts","href":"widgets_post_list_widget/PostListWidget/posts.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostListWidget","type":"class","href":"widgets_post_list_widget/PostListWidget-class.md"}},{"name":"post_model","qualifiedName":"post_model","href":"models_post_post_model/models_post_post_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Comments","qualifiedName":"post_model.Comments","href":"models_post_post_model/Comments-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class convert between json and object for comments.","enclosedBy":{"name":"post_model","type":"library","href":"models_post_post_model/models_post_post_model-library.md"}},{"name":"Comments","qualifiedName":"post_model.Comments.Comments","href":"models_post_post_model/Comments/Comments.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Comments","type":"class","href":"models_post_post_model/Comments-class.md"}},{"name":"Comments.fromJson","qualifiedName":"post_model.Comments.fromJson","href":"models_post_post_model/Comments/Comments.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"Convert json to dart object.","enclosedBy":{"name":"Comments","type":"class","href":"models_post_post_model/Comments-class.md"}},{"name":"sId","qualifiedName":"post_model.Comments.sId","href":"models_post_post_model/Comments/sId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"these are dart object.","enclosedBy":{"name":"Comments","type":"class","href":"models_post_post_model/Comments-class.md"}},{"name":"toJson","qualifiedName":"post_model.Comments.toJson","href":"models_post_post_model/Comments/toJson.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Convert dart object to json.","enclosedBy":{"name":"Comments","type":"class","href":"models_post_post_model/Comments-class.md"}},{"name":"LikedBy","qualifiedName":"post_model.LikedBy","href":"models_post_post_model/LikedBy-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class convert between json and object for likedby.","enclosedBy":{"name":"post_model","type":"library","href":"models_post_post_model/models_post_post_model-library.md"}},{"name":"LikedBy","qualifiedName":"post_model.LikedBy.LikedBy","href":"models_post_post_model/LikedBy/LikedBy.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"LikedBy","type":"class","href":"models_post_post_model/LikedBy-class.md"}},{"name":"LikedBy.fromJson","qualifiedName":"post_model.LikedBy.fromJson","href":"models_post_post_model/LikedBy/LikedBy.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"JSON factory constructor.","enclosedBy":{"name":"LikedBy","type":"class","href":"models_post_post_model/LikedBy-class.md"}},{"name":"sId","qualifiedName":"post_model.LikedBy.sId","href":"models_post_post_model/LikedBy/sId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"These are dart object.","enclosedBy":{"name":"LikedBy","type":"class","href":"models_post_post_model/LikedBy-class.md"}},{"name":"toJson","qualifiedName":"post_model.LikedBy.toJson","href":"models_post_post_model/LikedBy/toJson.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Convert dart object to json.","enclosedBy":{"name":"LikedBy","type":"class","href":"models_post_post_model/LikedBy-class.md"}},{"name":"Post","qualifiedName":"post_model.Post","href":"models_post_post_model/Post-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates a Post model.","enclosedBy":{"name":"post_model","type":"library","href":"models_post_post_model/models_post_post_model-library.md"}},{"name":"Post","qualifiedName":"post_model.Post.Post","href":"models_post_post_model/Post/Post.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"comments","qualifiedName":"post_model.Post.comments","href":"models_post_post_model/Post/comments.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"comments for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"createdAt","qualifiedName":"post_model.Post.createdAt","href":"models_post_post_model/Post/createdAt.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"createdAt for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"creator","qualifiedName":"post_model.Post.creator","href":"models_post_post_model/Post/creator.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"creator for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"description","qualifiedName":"post_model.Post.description","href":"models_post_post_model/Post/description.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"description for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"Post.fromJson","qualifiedName":"post_model.Post.fromJson","href":"models_post_post_model/Post/Post.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"Creating a new Post instance from a map structure.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"getPostCreatedDuration","qualifiedName":"post_model.Post.getPostCreatedDuration","href":"models_post_post_model/Post/getPostCreatedDuration.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"this is to get duration of post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"imageUrl","qualifiedName":"post_model.Post.imageUrl","href":"models_post_post_model/Post/imageUrl.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"imageUrl for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"likedBy","qualifiedName":"post_model.Post.likedBy","href":"models_post_post_model/Post/likedBy.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"likedBy for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"organization","qualifiedName":"post_model.Post.organization","href":"models_post_post_model/Post/organization.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"organization for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"sId","qualifiedName":"post_model.Post.sId","href":"models_post_post_model/Post/sId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"unique identifier for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"videoUrl","qualifiedName":"post_model.Post.videoUrl","href":"models_post_post_model/Post/videoUrl.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"videoUrl for post.","enclosedBy":{"name":"Post","type":"class","href":"models_post_post_model/Post-class.md"}},{"name":"post_queries","qualifiedName":"post_queries","href":"utils_post_queries/utils_post_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"PostQueries","qualifiedName":"post_queries.PostQueries","href":"utils_post_queries/PostQueries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates queries related to posts.","enclosedBy":{"name":"post_queries","type":"library","href":"utils_post_queries/utils_post_queries-library.md"}},{"name":"PostQueries","qualifiedName":"post_queries.PostQueries.PostQueries","href":"utils_post_queries/PostQueries/PostQueries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostQueries","type":"class","href":"utils_post_queries/PostQueries-class.md"}},{"name":"addLike","qualifiedName":"post_queries.PostQueries.addLike","href":"utils_post_queries/PostQueries/addLike.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Add Like to a post.","enclosedBy":{"name":"PostQueries","type":"class","href":"utils_post_queries/PostQueries-class.md"}},{"name":"getPostsById","qualifiedName":"post_queries.PostQueries.getPostsById","href":"utils_post_queries/PostQueries/getPostsById.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Getting Posts by Id.","enclosedBy":{"name":"PostQueries","type":"class","href":"utils_post_queries/PostQueries-class.md"}},{"name":"removeLike","qualifiedName":"post_queries.PostQueries.removeLike","href":"utils_post_queries/PostQueries/removeLike.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Remove Like from a post.","enclosedBy":{"name":"PostQueries","type":"class","href":"utils_post_queries/PostQueries-class.md"}},{"name":"uploadPost","qualifiedName":"post_queries.PostQueries.uploadPost","href":"utils_post_queries/PostQueries/uploadPost.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"Upload a post to database.","enclosedBy":{"name":"PostQueries","type":"class","href":"utils_post_queries/PostQueries-class.md"}},{"name":"post_service","qualifiedName":"post_service","href":"services_post_service/services_post_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"PostService","qualifiedName":"post_service.PostService","href":"services_post_service/PostService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"PostService class provides functions in the context of a Post.","enclosedBy":{"name":"post_service","type":"library","href":"services_post_service/services_post_service-library.md"}},{"name":"PostService","qualifiedName":"post_service.PostService.PostService","href":"services_post_service/PostService/PostService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"addCommentLocally","qualifiedName":"post_service.PostService.addCommentLocally","href":"services_post_service/PostService/addCommentLocally.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"addLike","qualifiedName":"post_service.PostService.addLike","href":"services_post_service/PostService/addLike.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to add Like to the Post.","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"getPosts","qualifiedName":"post_service.PostService.getPosts","href":"services_post_service/PostService/getPosts.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function used to get all posts of an organization.\nThe function reference the organization Id from _currentOrg.","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"postStream","qualifiedName":"post_service.PostService.postStream","href":"services_post_service/PostService/postStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"removeLike","qualifiedName":"post_service.PostService.removeLike","href":"services_post_service/PostService/removeLike.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to remove like from the Post.","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"setOrgStreamSubscription","qualifiedName":"post_service.PostService.setOrgStreamSubscription","href":"services_post_service/PostService/setOrgStreamSubscription.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"updatedPostStream","qualifiedName":"post_service.PostService.updatedPostStream","href":"services_post_service/PostService/updatedPostStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostService","type":"class","href":"services_post_service/PostService-class.md"}},{"name":"post_widget","qualifiedName":"post_widget","href":"widgets_post_widget/widgets_post_widget-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"NewsPost","qualifiedName":"post_widget.NewsPost","href":"widgets_post_widget/NewsPost-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"post_widget","type":"library","href":"widgets_post_widget/widgets_post_widget-library.md"}},{"name":"NewsPost","qualifiedName":"post_widget.NewsPost.NewsPost","href":"widgets_post_widget/NewsPost/NewsPost.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NewsPost","type":"class","href":"widgets_post_widget/NewsPost-class.md"}},{"name":"build","qualifiedName":"post_widget.NewsPost.build","href":"widgets_post_widget/NewsPost/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"NewsPost","type":"class","href":"widgets_post_widget/NewsPost-class.md"}},{"name":"function","qualifiedName":"post_widget.NewsPost.function","href":"widgets_post_widget/NewsPost/function.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NewsPost","type":"class","href":"widgets_post_widget/NewsPost-class.md"}},{"name":"post","qualifiedName":"post_widget.NewsPost.post","href":"widgets_post_widget/NewsPost/post.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"NewsPost","type":"class","href":"widgets_post_widget/NewsPost-class.md"}},{"name":"PostContainer","qualifiedName":"post_widget.PostContainer","href":"widgets_post_widget/PostContainer-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"post_widget","type":"library","href":"widgets_post_widget/widgets_post_widget-library.md"}},{"name":"PostContainer","qualifiedName":"post_widget.PostContainer.PostContainer","href":"widgets_post_widget/PostContainer/PostContainer.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainer","type":"class","href":"widgets_post_widget/PostContainer-class.md"}},{"name":"createState","qualifiedName":"post_widget.PostContainer.createState","href":"widgets_post_widget/PostContainer/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"PostContainer","type":"class","href":"widgets_post_widget/PostContainer-class.md"}},{"name":"id","qualifiedName":"post_widget.PostContainer.id","href":"widgets_post_widget/PostContainer/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainer","type":"class","href":"widgets_post_widget/PostContainer-class.md"}},{"name":"PostContainerState","qualifiedName":"post_widget.PostContainerState","href":"widgets_post_widget/PostContainerState-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"post_widget","type":"library","href":"widgets_post_widget/widgets_post_widget-library.md"}},{"name":"PostContainerState","qualifiedName":"post_widget.PostContainerState.PostContainerState","href":"widgets_post_widget/PostContainerState/PostContainerState.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"build","qualifiedName":"post_widget.PostContainerState.build","href":"widgets_post_widget/PostContainerState/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"controller","qualifiedName":"post_widget.PostContainerState.controller","href":"widgets_post_widget/PostContainerState/controller.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"dispose","qualifiedName":"post_widget.PostContainerState.dispose","href":"widgets_post_widget/PostContainerState/dispose.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called when this object is removed from the tree permanently.","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"inView","qualifiedName":"post_widget.PostContainerState.inView","href":"widgets_post_widget/PostContainerState/inView.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"initState","qualifiedName":"post_widget.PostContainerState.initState","href":"widgets_post_widget/PostContainerState/initState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called when this object is inserted into the tree.","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"pindex","qualifiedName":"post_widget.PostContainerState.pindex","href":"widgets_post_widget/PostContainerState/pindex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"startedPlaying","qualifiedName":"post_widget.PostContainerState.startedPlaying","href":"widgets_post_widget/PostContainerState/startedPlaying.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"PostContainerState","type":"class","href":"widgets_post_widget/PostContainerState-class.md"}},{"name":"profile_page","qualifiedName":"profile_page","href":"views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ProfilePage","qualifiedName":"profile_page.ProfilePage","href":"views_after_auth_screens_profile_profile_page/ProfilePage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ProfilePage returns a widget that renders a page of user's profile.","enclosedBy":{"name":"profile_page","type":"library","href":"views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md"}},{"name":"ProfilePage","qualifiedName":"profile_page.ProfilePage.ProfilePage","href":"views_after_auth_screens_profile_profile_page/ProfilePage/ProfilePage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePage","type":"class","href":"views_after_auth_screens_profile_profile_page/ProfilePage-class.md"}},{"name":"build","qualifiedName":"profile_page.ProfilePage.build","href":"views_after_auth_screens_profile_profile_page/ProfilePage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ProfilePage","type":"class","href":"views_after_auth_screens_profile_profile_page/ProfilePage-class.md"}},{"name":"donate","qualifiedName":"profile_page.ProfilePage.donate","href":"views_after_auth_screens_profile_profile_page/ProfilePage/donate.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePage","type":"class","href":"views_after_auth_screens_profile_profile_page/ProfilePage-class.md"}},{"name":"homeModel","qualifiedName":"profile_page.ProfilePage.homeModel","href":"views_after_auth_screens_profile_profile_page/ProfilePage/homeModel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePage","type":"class","href":"views_after_auth_screens_profile_profile_page/ProfilePage-class.md"}},{"name":"profile_page_view_model","qualifiedName":"profile_page_view_model","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ProfilePageViewModel","qualifiedName":"profile_page_view_model.ProfilePageViewModel","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ProfilePageViewModel class helps to interact with model to serve data\nand react to user's input in Profile Page view.","enclosedBy":{"name":"profile_page_view_model","type":"library","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md"}},{"name":"ProfilePageViewModel","qualifiedName":"profile_page_view_model.ProfilePageViewModel.ProfilePageViewModel","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/ProfilePageViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"attachListener","qualifiedName":"profile_page_view_model.ProfilePageViewModel.attachListener","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/attachListener.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"bottomSheetHeight","qualifiedName":"profile_page_view_model.ProfilePageViewModel.bottomSheetHeight","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/bottomSheetHeight.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"changeCurrency","qualifiedName":"profile_page_view_model.ProfilePageViewModel.changeCurrency","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/changeCurrency.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This method changes the currency of the user for donation purpose.","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"currentOrg","qualifiedName":"profile_page_view_model.ProfilePageViewModel.currentOrg","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"currentUser","qualifiedName":"profile_page_view_model.ProfilePageViewModel.currentUser","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentUser.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"denomination","qualifiedName":"profile_page_view_model.ProfilePageViewModel.denomination","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/denomination.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"dominationButton","qualifiedName":"profile_page_view_model.ProfilePageViewModel.dominationButton","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/dominationButton.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This widget returns button for domination.","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"donationAmount","qualifiedName":"profile_page_view_model.ProfilePageViewModel.donationAmount","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationAmount.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"donationCurrency","qualifiedName":"profile_page_view_model.ProfilePageViewModel.donationCurrency","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrency.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"donationCurrencySymbol","qualifiedName":"profile_page_view_model.ProfilePageViewModel.donationCurrencySymbol","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrencySymbol.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"donationField","qualifiedName":"profile_page_view_model.ProfilePageViewModel.donationField","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationField.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"iconButton","qualifiedName":"profile_page_view_model.ProfilePageViewModel.iconButton","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/iconButton.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This widget returns the button for social media sharing option.","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"initialize","qualifiedName":"profile_page_view_model.ProfilePageViewModel.initialize","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"invite","qualifiedName":"profile_page_view_model.ProfilePageViewModel.invite","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/invite.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function generates the organization invitation link in a Dialog Box.\nDialog box contains the QR-code of organization invite link and social media sharing options.","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"logout","qualifiedName":"profile_page_view_model.ProfilePageViewModel.logout","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/logout.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This method destroys the user's session or sign out the user from app.\nThe function asks for the confimation in Custom Alert Dialog.","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"organisation","qualifiedName":"profile_page_view_model.ProfilePageViewModel.organisation","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/organisation.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"popBottomSheet","qualifiedName":"profile_page_view_model.ProfilePageViewModel.popBottomSheet","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/popBottomSheet.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"scaffoldKey","qualifiedName":"profile_page_view_model.ProfilePageViewModel.scaffoldKey","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/scaffoldKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"showSnackBar","qualifiedName":"profile_page_view_model.ProfilePageViewModel.showSnackBar","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/showSnackBar.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"updateSheetHeight","qualifiedName":"profile_page_view_model.ProfilePageViewModel.updateSheetHeight","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/updateSheetHeight.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"url","qualifiedName":"profile_page_view_model.ProfilePageViewModel.url","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/url.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"user","qualifiedName":"profile_page_view_model.ProfilePageViewModel.user","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/user.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProfilePageViewModel","type":"class","href":"view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md"}},{"name":"progress_dialog_view_model","qualifiedName":"progress_dialog_view_model","href":"view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ProgressDialogViewModel","qualifiedName":"progress_dialog_view_model.ProgressDialogViewModel","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"ProgressDialogViewModel class helps to serve the data and\nto react to user's input for Progress Dialog Widget.","enclosedBy":{"name":"progress_dialog_view_model","type":"library","href":"view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md"}},{"name":"ProgressDialogViewModel","qualifiedName":"progress_dialog_view_model.ProgressDialogViewModel.ProgressDialogViewModel","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/ProgressDialogViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProgressDialogViewModel","type":"class","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md"}},{"name":"connectivityPresent","qualifiedName":"progress_dialog_view_model.ProgressDialogViewModel.connectivityPresent","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityPresent.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProgressDialogViewModel","type":"class","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md"}},{"name":"connectivityResult","qualifiedName":"progress_dialog_view_model.ProgressDialogViewModel.connectivityResult","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityResult.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProgressDialogViewModel","type":"class","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md"}},{"name":"initialise","qualifiedName":"progress_dialog_view_model.ProgressDialogViewModel.initialise","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ProgressDialogViewModel","type":"class","href":"view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md"}},{"name":"queries","qualifiedName":"queries","href":"utils_queries/utils_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Queries","qualifiedName":"queries.Queries","href":"utils_queries/Queries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns some queries for the application.","enclosedBy":{"name":"queries","type":"library","href":"utils_queries/utils_queries-library.md"}},{"name":"Queries","qualifiedName":"queries.Queries.Queries","href":"utils_queries/Queries/Queries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"createDonation","qualifiedName":"queries.Queries.createDonation","href":"utils_queries/Queries/createDonation.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"createDonation creates a new donation transaction by taking the userId ,orgId ,nameOfOrg ,nameOfUser as parameters","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"fetchJoinInOrg","qualifiedName":"queries.Queries.fetchJoinInOrg","href":"utils_queries/Queries/fetchJoinInOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"fetchJoinInOrgByName","qualifiedName":"queries.Queries.fetchJoinInOrgByName","href":"utils_queries/Queries/fetchJoinInOrgByName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"fetchOrgById","qualifiedName":"queries.Queries.fetchOrgById","href":"utils_queries/Queries/fetchOrgById.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"fetchOrgDetailsById","qualifiedName":"queries.Queries.fetchOrgDetailsById","href":"utils_queries/Queries/fetchOrgDetailsById.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"fetchUserInfo","qualifiedName":"queries.Queries.fetchUserInfo","href":"utils_queries/Queries/fetchUserInfo.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"getPluginsList","qualifiedName":"queries.Queries.getPluginsList","href":"utils_queries/Queries/getPluginsList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"getPluginList queries all properties of pluginList from the server","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"joinOrgById","qualifiedName":"queries.Queries.joinOrgById","href":"utils_queries/Queries/joinOrgById.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"loginUser","qualifiedName":"queries.Queries.loginUser","href":"utils_queries/Queries/loginUser.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"logout","qualifiedName":"queries.Queries.logout","href":"utils_queries/Queries/logout.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"newUserLanguage","qualifiedName":"queries.Queries.newUserLanguage","href":"utils_queries/Queries/newUserLanguage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"refreshToken","qualifiedName":"queries.Queries.refreshToken","href":"utils_queries/Queries/refreshToken.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"registerUser","qualifiedName":"queries.Queries.registerUser","href":"utils_queries/Queries/registerUser.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"saveFcmToken","qualifiedName":"queries.Queries.saveFcmToken","href":"utils_queries/Queries/saveFcmToken.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"sendMembershipRequest","qualifiedName":"queries.Queries.sendMembershipRequest","href":"utils_queries/Queries/sendMembershipRequest.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"updateLanguage","qualifiedName":"queries.Queries.updateLanguage","href":"utils_queries/Queries/updateLanguage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"userLanguage","qualifiedName":"queries.Queries.userLanguage","href":"utils_queries/Queries/userLanguage.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Queries","type":"class","href":"utils_queries/Queries-class.md"}},{"name":"quick_actions","qualifiedName":"quick_actions","href":"constants_quick_actions/constants_quick_actions-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ShortCutMenu","qualifiedName":"quick_actions.ShortCutMenu","href":"constants_quick_actions/ShortCutMenu-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This file contains the shortcuts by which user can manage and interact with the\napplication. quick_actions package is used for this purpose.","enclosedBy":{"name":"quick_actions","type":"library","href":"constants_quick_actions/constants_quick_actions-library.md"}},{"name":"ShortCutMenu","qualifiedName":"quick_actions.ShortCutMenu.ShortCutMenu","href":"constants_quick_actions/ShortCutMenu/ShortCutMenu.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ShortCutMenu","type":"class","href":"constants_quick_actions/ShortCutMenu-class.md"}},{"name":"chatAction","qualifiedName":"quick_actions.ShortCutMenu.chatAction","href":"constants_quick_actions/ShortCutMenu/chatAction-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ShortCutMenu","type":"class","href":"constants_quick_actions/ShortCutMenu-class.md"}},{"name":"eventAction","qualifiedName":"quick_actions.ShortCutMenu.eventAction","href":"constants_quick_actions/ShortCutMenu/eventAction-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ShortCutMenu","type":"class","href":"constants_quick_actions/ShortCutMenu-class.md"}},{"name":"feedAction","qualifiedName":"quick_actions.ShortCutMenu.feedAction","href":"constants_quick_actions/ShortCutMenu/feedAction-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ShortCutMenu","type":"class","href":"constants_quick_actions/ShortCutMenu-class.md"}},{"name":"quickActionsList","qualifiedName":"quick_actions.ShortCutMenu.quickActionsList","href":"constants_quick_actions/ShortCutMenu/quickActionsList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ShortCutMenu","type":"class","href":"constants_quick_actions/ShortCutMenu-class.md"}},{"name":"raised_round_edge_button","qualifiedName":"raised_round_edge_button","href":"widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"RaisedRoundedButton","qualifiedName":"raised_round_edge_button.RaisedRoundedButton","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns a widget for a raised rounded button,\nfor example: login button in login screen.","enclosedBy":{"name":"raised_round_edge_button","type":"library","href":"widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md"}},{"name":"RaisedRoundedButton","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.RaisedRoundedButton","href":"widgets_raised_round_edge_button/RaisedRoundedButton/RaisedRoundedButton.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"backgroundColor","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.backgroundColor","href":"widgets_raised_round_edge_button/RaisedRoundedButton/backgroundColor.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"buttonLabel","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.buttonLabel","href":"widgets_raised_round_edge_button/RaisedRoundedButton/buttonLabel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"createState","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.createState","href":"widgets_raised_round_edge_button/RaisedRoundedButton/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"height","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.height","href":"widgets_raised_round_edge_button/RaisedRoundedButton/height.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"onTap","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.onTap","href":"widgets_raised_round_edge_button/RaisedRoundedButton/onTap.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"showArrow","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.showArrow","href":"widgets_raised_round_edge_button/RaisedRoundedButton/showArrow.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"textColor","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.textColor","href":"widgets_raised_round_edge_button/RaisedRoundedButton/textColor.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"width","qualifiedName":"raised_round_edge_button.RaisedRoundedButton.width","href":"widgets_raised_round_edge_button/RaisedRoundedButton/width.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"RaisedRoundedButton","type":"class","href":"widgets_raised_round_edge_button/RaisedRoundedButton-class.md"}},{"name":"recover","qualifiedName":"recover","href":"views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Recover","qualifiedName":"recover.Recover","href":"views_pre_auth_screens_recover/Recover-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class recovers the users password.\nThe users needs to enter his/her email and press on the button at the bottom to recover his/her password.","enclosedBy":{"name":"recover","type":"library","href":"views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md"}},{"name":"Recover","qualifiedName":"recover.Recover.Recover","href":"views_pre_auth_screens_recover/Recover/Recover.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Recover","type":"class","href":"views_pre_auth_screens_recover/Recover-class.md"}},{"name":"createState","qualifiedName":"recover.Recover.createState","href":"views_pre_auth_screens_recover/Recover/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"Recover","type":"class","href":"views_pre_auth_screens_recover/Recover-class.md"}},{"name":"rich_text","qualifiedName":"rich_text","href":"widgets_rich_text/widgets_rich_text-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"CustomRichText","qualifiedName":"rich_text.CustomRichText","href":"widgets_rich_text/CustomRichText-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"CustomRichText class returns a widget for customized rich/bold text.\nThese rich text are being used in form for changing the password.","enclosedBy":{"name":"rich_text","type":"library","href":"widgets_rich_text/widgets_rich_text-library.md"}},{"name":"CustomRichText","qualifiedName":"rich_text.CustomRichText.CustomRichText","href":"widgets_rich_text/CustomRichText/CustomRichText.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomRichText","type":"class","href":"widgets_rich_text/CustomRichText-class.md"}},{"name":"build","qualifiedName":"rich_text.CustomRichText.build","href":"widgets_rich_text/CustomRichText/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"CustomRichText","type":"class","href":"widgets_rich_text/CustomRichText-class.md"}},{"name":"words","qualifiedName":"rich_text.CustomRichText.words","href":"widgets_rich_text/CustomRichText/words.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"CustomRichText","type":"class","href":"widgets_rich_text/CustomRichText-class.md"}},{"name":"router","qualifiedName":"router","href":"router/router-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"generateRoute","qualifiedName":"router.generateRoute","href":"router/generateRoute.md","type":"function","overriddenDepth":0,"packageName":"talawa","desc":"The MaterialApp provides us with a property called generateRoute where\nwe can pass in a Function that returns a Route and takes in RouteSettings","enclosedBy":{"name":"router","type":"library","href":"router/router-library.md"}},{"name":"routing_constants","qualifiedName":"routing_constants","href":"constants_routing_constants/constants_routing_constants-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Routes","qualifiedName":"routing_constants.Routes","href":"constants_routing_constants/Routes-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This file contains the routes. These can be used to make push screen call via Routes.splashScreen to access these string.","enclosedBy":{"name":"routing_constants","type":"library","href":"constants_routing_constants/constants_routing_constants-library.md"}},{"name":"Routes","qualifiedName":"routing_constants.Routes.Routes","href":"constants_routing_constants/Routes/Routes.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"addTask","qualifiedName":"routing_constants.Routes.addTask","href":"constants_routing_constants/Routes/addTask-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"appSettings","qualifiedName":"routing_constants.Routes.appSettings","href":"constants_routing_constants/Routes/appSettings-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"calendar","qualifiedName":"routing_constants.Routes.calendar","href":"constants_routing_constants/Routes/calendar-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"chatMessageScreen","qualifiedName":"routing_constants.Routes.chatMessageScreen","href":"constants_routing_constants/Routes/chatMessageScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"createEventPage","qualifiedName":"routing_constants.Routes.createEventPage","href":"constants_routing_constants/Routes/createEventPage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"demoPageViewRoute","qualifiedName":"routing_constants.Routes.demoPageViewRoute","href":"constants_routing_constants/Routes/demoPageViewRoute-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"editEventPage","qualifiedName":"routing_constants.Routes.editEventPage","href":"constants_routing_constants/Routes/editEventPage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"editProfilePage","qualifiedName":"routing_constants.Routes.editProfilePage","href":"constants_routing_constants/Routes/editProfilePage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"editTask","qualifiedName":"routing_constants.Routes.editTask","href":"constants_routing_constants/Routes/editTask-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"eventInfoPage","qualifiedName":"routing_constants.Routes.eventInfoPage","href":"constants_routing_constants/Routes/eventInfoPage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"eventTasks","qualifiedName":"routing_constants.Routes.eventTasks","href":"constants_routing_constants/Routes/eventTasks-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"exploreEventsScreen","qualifiedName":"routing_constants.Routes.exploreEventsScreen","href":"constants_routing_constants/Routes/exploreEventsScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"homeScreen","qualifiedName":"routing_constants.Routes.homeScreen","href":"constants_routing_constants/Routes/homeScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"individualPost","qualifiedName":"routing_constants.Routes.individualPost","href":"constants_routing_constants/Routes/individualPost-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"joinOrg","qualifiedName":"routing_constants.Routes.joinOrg","href":"constants_routing_constants/Routes/joinOrg-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"languageSelectionRoute","qualifiedName":"routing_constants.Routes.languageSelectionRoute","href":"constants_routing_constants/Routes/languageSelectionRoute-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"loginScreen","qualifiedName":"routing_constants.Routes.loginScreen","href":"constants_routing_constants/Routes/loginScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"mainScreen","qualifiedName":"routing_constants.Routes.mainScreen","href":"constants_routing_constants/Routes/mainScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"mapScreen","qualifiedName":"routing_constants.Routes.mapScreen","href":"constants_routing_constants/Routes/mapScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"pinnedPostPage","qualifiedName":"routing_constants.Routes.pinnedPostPage","href":"constants_routing_constants/Routes/pinnedPostPage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"profilePage","qualifiedName":"routing_constants.Routes.profilePage","href":"constants_routing_constants/Routes/profilePage-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"progressDialog","qualifiedName":"routing_constants.Routes.progressDialog","href":"constants_routing_constants/Routes/progressDialog-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"recoverScreen","qualifiedName":"routing_constants.Routes.recoverScreen","href":"constants_routing_constants/Routes/recoverScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"requestAccess","qualifiedName":"routing_constants.Routes.requestAccess","href":"constants_routing_constants/Routes/requestAccess-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"selectContact","qualifiedName":"routing_constants.Routes.selectContact","href":"constants_routing_constants/Routes/selectContact-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"selectOrgScreen","qualifiedName":"routing_constants.Routes.selectOrgScreen","href":"constants_routing_constants/Routes/selectOrgScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"setUrlScreen","qualifiedName":"routing_constants.Routes.setUrlScreen","href":"constants_routing_constants/Routes/setUrlScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"signupDetailScreen","qualifiedName":"routing_constants.Routes.signupDetailScreen","href":"constants_routing_constants/Routes/signupDetailScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"splashScreen","qualifiedName":"routing_constants.Routes.splashScreen","href":"constants_routing_constants/Routes/splashScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"updateScreen","qualifiedName":"routing_constants.Routes.updateScreen","href":"constants_routing_constants/Routes/updateScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"userTasks","qualifiedName":"routing_constants.Routes.userTasks","href":"constants_routing_constants/Routes/userTasks-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"waitingScreen","qualifiedName":"routing_constants.Routes.waitingScreen","href":"constants_routing_constants/Routes/waitingScreen-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"static variables.","enclosedBy":{"name":"Routes","type":"class","href":"constants_routing_constants/Routes-class.md"}},{"name":"select_contact","qualifiedName":"select_contact","href":"views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SelectContact","qualifiedName":"select_contact.SelectContact","href":"views_after_auth_screens_chat_select_contact/SelectContact-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SelectContact returns a widget that has mutable state _SelectContactState.","enclosedBy":{"name":"select_contact","type":"library","href":"views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md"}},{"name":"SelectContact","qualifiedName":"select_contact.SelectContact.SelectContact","href":"views_after_auth_screens_chat_select_contact/SelectContact/SelectContact.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectContact","type":"class","href":"views_after_auth_screens_chat_select_contact/SelectContact-class.md"}},{"name":"createState","qualifiedName":"select_contact.SelectContact.createState","href":"views_after_auth_screens_chat_select_contact/SelectContact/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SelectContact","type":"class","href":"views_after_auth_screens_chat_select_contact/SelectContact-class.md"}},{"name":"select_contact_view_model","qualifiedName":"select_contact_view_model","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SelectContactViewModel","qualifiedName":"select_contact_view_model.SelectContactViewModel","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SelectContactViewModel class have different functions to interact with model.","enclosedBy":{"name":"select_contact_view_model","type":"library","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md"}},{"name":"SelectContactViewModel","qualifiedName":"select_contact_view_model.SelectContactViewModel.SelectContactViewModel","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/SelectContactViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectContactViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md"}},{"name":"getCurrentOrgUsersList","qualifiedName":"select_contact_view_model.SelectContactViewModel.getCurrentOrgUsersList","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/getCurrentOrgUsersList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get all users list of an current organization.","enclosedBy":{"name":"SelectContactViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md"}},{"name":"initialise","qualifiedName":"select_contact_view_model.SelectContactViewModel.initialise","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectContactViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md"}},{"name":"orgMembersList","qualifiedName":"select_contact_view_model.SelectContactViewModel.orgMembersList","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/orgMembersList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectContactViewModel","type":"class","href":"view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md"}},{"name":"select_language","qualifiedName":"select_language","href":"views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SelectLanguage","qualifiedName":"select_language.SelectLanguage","href":"views_pre_auth_screens_select_language/SelectLanguage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget enables us to select a different language.\nThe default language is English. We can choose among the options to switch the language.\nThere is a text button at the right bottom of the screen which changes the language when tapped.\nThe user finally gets redirected to the previous screen.","enclosedBy":{"name":"select_language","type":"library","href":"views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md"}},{"name":"SelectLanguage","qualifiedName":"select_language.SelectLanguage.SelectLanguage","href":"views_pre_auth_screens_select_language/SelectLanguage/SelectLanguage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectLanguage","type":"class","href":"views_pre_auth_screens_select_language/SelectLanguage-class.md"}},{"name":"createState","qualifiedName":"select_language.SelectLanguage.createState","href":"views_pre_auth_screens_select_language/SelectLanguage/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SelectLanguage","type":"class","href":"views_pre_auth_screens_select_language/SelectLanguage-class.md"}},{"name":"select_organization","qualifiedName":"select_organization","href":"views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SelectOrganization","qualifiedName":"select_organization.SelectOrganization","href":"views_pre_auth_screens_select_organization/SelectOrganization-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget lets the user select new organizations.","enclosedBy":{"name":"select_organization","type":"library","href":"views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md"}},{"name":"SelectOrganization","qualifiedName":"select_organization.SelectOrganization.SelectOrganization","href":"views_pre_auth_screens_select_organization/SelectOrganization/SelectOrganization.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganization","type":"class","href":"views_pre_auth_screens_select_organization/SelectOrganization-class.md"}},{"name":"createState","qualifiedName":"select_organization.SelectOrganization.createState","href":"views_pre_auth_screens_select_organization/SelectOrganization/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SelectOrganization","type":"class","href":"views_pre_auth_screens_select_organization/SelectOrganization-class.md"}},{"name":"selectedOrgId","qualifiedName":"select_organization.SelectOrganization.selectedOrgId","href":"views_pre_auth_screens_select_organization/SelectOrganization/selectedOrgId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Contains Integer value for selected org id.","enclosedBy":{"name":"SelectOrganization","type":"class","href":"views_pre_auth_screens_select_organization/SelectOrganization-class.md"}},{"name":"select_organization_view_model","qualifiedName":"select_organization_view_model","href":"view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SelectOrganizationViewModel","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SelectOrganizationViewModel class helps to interact with model to serve data\nand react to user's input in Select Organization View.","enclosedBy":{"name":"select_organization_view_model","type":"library","href":"view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md"}},{"name":"SelectOrganizationViewModel","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.SelectOrganizationViewModel","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/SelectOrganizationViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"allOrgController","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.allOrgController","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/allOrgController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"controller","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.controller","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/controller.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"fetchMoreHelper","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.fetchMoreHelper","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/fetchMoreHelper.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function fetch more option.","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"initialise","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.initialise","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"onTapContinue","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.onTapContinue","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapContinue.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"onTapJoin","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.onTapJoin","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapJoin.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function make user to join the selected organization.\nThe function uses joinOrgById graph QL query.","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"orgId","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.orgId","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/orgId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"organizations","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.organizations","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/organizations.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"qrKey","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.qrKey","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/qrKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"result","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.result","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/result.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"searchActive","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.searchActive","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchActive.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"searchController","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.searchController","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"searchFocus","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.searchFocus","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"searching","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.searching","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searching.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"selectOrg","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.selectOrg","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function select the organization.","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"selectedOrganization","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.selectedOrganization","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectedOrganization.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"showSearchOrgList","qualifiedName":"select_organization_view_model.SelectOrganizationViewModel.showSearchOrgList","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/showSearchOrgList.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SelectOrganizationViewModel","type":"class","href":"view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md"}},{"name":"set_url","qualifiedName":"set_url","href":"views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SetUrl","qualifiedName":"set_url.SetUrl","href":"views_pre_auth_screens_set_url/SetUrl-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget lets a user sign in/up with the organization url.","enclosedBy":{"name":"set_url","type":"library","href":"views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md"}},{"name":"SetUrl","qualifiedName":"set_url.SetUrl.SetUrl","href":"views_pre_auth_screens_set_url/SetUrl/SetUrl.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SetUrl","type":"class","href":"views_pre_auth_screens_set_url/SetUrl-class.md"}},{"name":"createState","qualifiedName":"set_url.SetUrl.createState","href":"views_pre_auth_screens_set_url/SetUrl/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SetUrl","type":"class","href":"views_pre_auth_screens_set_url/SetUrl-class.md"}},{"name":"uri","qualifiedName":"set_url.SetUrl.uri","href":"views_pre_auth_screens_set_url/SetUrl/uri.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Variable.","enclosedBy":{"name":"SetUrl","type":"class","href":"views_pre_auth_screens_set_url/SetUrl-class.md"}},{"name":"set_url_view_model","qualifiedName":"set_url_view_model","href":"view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SetUrlViewModel","qualifiedName":"set_url_view_model.SetUrlViewModel","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SetUrlViewModel class helps to interact with model to serve data.","enclosedBy":{"name":"set_url_view_model","type":"library","href":"view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md"}},{"name":"SetUrlViewModel","qualifiedName":"set_url_view_model.SetUrlViewModel.SetUrlViewModel","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/SetUrlViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"checkURLandNavigate","qualifiedName":"set_url_view_model.SetUrlViewModel.checkURLandNavigate","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandNavigate.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function check the URL and navigate to the respective URL.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"checkURLandShowPopUp","qualifiedName":"set_url_view_model.SetUrlViewModel.checkURLandShowPopUp","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandShowPopUp.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function check the URL and navigate to the respective URL.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"formKey","qualifiedName":"set_url_view_model.SetUrlViewModel.formKey","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/formKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"formKey.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"greeting","qualifiedName":"set_url_view_model.SetUrlViewModel.greeting","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/greeting.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"qrController.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"imageUrlKey","qualifiedName":"set_url_view_model.SetUrlViewModel.imageUrlKey","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/imageUrlKey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"imageUrlKey.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"initialise","qualifiedName":"set_url_view_model.SetUrlViewModel.initialise","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function initialises the variables.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"orgId","qualifiedName":"set_url_view_model.SetUrlViewModel.orgId","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/orgId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"organizationID.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"qrKey","qualifiedName":"set_url_view_model.SetUrlViewModel.qrKey","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/qrKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"qrKey.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"result","qualifiedName":"set_url_view_model.SetUrlViewModel.result","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/result.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"qrText.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"scanQR","qualifiedName":"set_url_view_model.SetUrlViewModel.scanQR","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/scanQR.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function create a widget which is used to scan the QR-code.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"url","qualifiedName":"set_url_view_model.SetUrlViewModel.url","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/url.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"url.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"urlFocus","qualifiedName":"set_url_view_model.SetUrlViewModel.urlFocus","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"urlFocus.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"urlKey","qualifiedName":"set_url_view_model.SetUrlViewModel.urlKey","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlKey-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"urlKey.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"validate","qualifiedName":"set_url_view_model.SetUrlViewModel.validate","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/validate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"qrValidator.","enclosedBy":{"name":"SetUrlViewModel","type":"class","href":"view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md"}},{"name":"signup_details","qualifiedName":"signup_details","href":"views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SignUpDetails","qualifiedName":"signup_details.SignUpDetails","href":"views_pre_auth_screens_signup_details/SignUpDetails-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget takes the user details for signup. The form includes first name, last name, email, password, and password confirmation inputs.","enclosedBy":{"name":"signup_details","type":"library","href":"views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md"}},{"name":"SignUpDetails","qualifiedName":"signup_details.SignUpDetails.SignUpDetails","href":"views_pre_auth_screens_signup_details/SignUpDetails/SignUpDetails.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignUpDetails","type":"class","href":"views_pre_auth_screens_signup_details/SignUpDetails-class.md"}},{"name":"createState","qualifiedName":"signup_details.SignUpDetails.createState","href":"views_pre_auth_screens_signup_details/SignUpDetails/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SignUpDetails","type":"class","href":"views_pre_auth_screens_signup_details/SignUpDetails-class.md"}},{"name":"selectedOrg","qualifiedName":"signup_details.SignUpDetails.selectedOrg","href":"views_pre_auth_screens_signup_details/SignUpDetails/selectedOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignUpDetails","type":"class","href":"views_pre_auth_screens_signup_details/SignUpDetails-class.md"}},{"name":"signup_details_view_model","qualifiedName":"signup_details_view_model","href":"view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SignupDetailsViewModel","qualifiedName":"signup_details_view_model.SignupDetailsViewModel","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SignupDetailsViewModel class helps to interact with model to serve data\nand react to user's input for Sign Up Details section.","enclosedBy":{"name":"signup_details_view_model","type":"library","href":"view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md"}},{"name":"SignupDetailsViewModel","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.SignupDetailsViewModel","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/SignupDetailsViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"confirmFocus","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.confirmFocus","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmFocus.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"confirmPassword","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.confirmPassword","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmPassword.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"email","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.email","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/email.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"firstName","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.firstName","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/firstName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"formKey","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.formKey","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/formKey.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"greeting","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.greeting","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/greeting.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"hidePassword","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.hidePassword","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/hidePassword.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"initialise","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.initialise","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"lastName","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.lastName","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/lastName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"password","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.password","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/password.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"selectedOrganization","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.selectedOrganization","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/selectedOrganization.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"signUp","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.signUp","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/signUp.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to sign up the user into the application by passing the data to database query.\nThe function uses gqlNonAuthMutation method provided by databaseFunctions services.","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"validate","qualifiedName":"signup_details_view_model.SignupDetailsViewModel.validate","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/validate.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupDetailsViewModel","type":"class","href":"view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md"}},{"name":"signup_progress_indicator","qualifiedName":"signup_progress_indicator","href":"widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SignupProgressIndicator","qualifiedName":"signup_progress_indicator.SignupProgressIndicator","href":"widgets_signup_progress_indicator/SignupProgressIndicator-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns a widget for showing the\nprogress indicator/flow while Signing Up/ Registration.","enclosedBy":{"name":"signup_progress_indicator","type":"library","href":"widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md"}},{"name":"SignupProgressIndicator","qualifiedName":"signup_progress_indicator.SignupProgressIndicator.SignupProgressIndicator","href":"widgets_signup_progress_indicator/SignupProgressIndicator/SignupProgressIndicator.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupProgressIndicator","type":"class","href":"widgets_signup_progress_indicator/SignupProgressIndicator-class.md"}},{"name":"build","qualifiedName":"signup_progress_indicator.SignupProgressIndicator.build","href":"widgets_signup_progress_indicator/SignupProgressIndicator/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"SignupProgressIndicator","type":"class","href":"widgets_signup_progress_indicator/SignupProgressIndicator-class.md"}},{"name":"currentPageIndex","qualifiedName":"signup_progress_indicator.SignupProgressIndicator.currentPageIndex","href":"widgets_signup_progress_indicator/SignupProgressIndicator/currentPageIndex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupProgressIndicator","type":"class","href":"widgets_signup_progress_indicator/SignupProgressIndicator-class.md"}},{"name":"progressLabel","qualifiedName":"signup_progress_indicator.SignupProgressIndicator.progressLabel","href":"widgets_signup_progress_indicator/SignupProgressIndicator/progressLabel.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SignupProgressIndicator","type":"class","href":"widgets_signup_progress_indicator/SignupProgressIndicator-class.md"}},{"name":"size_config","qualifiedName":"size_config","href":"services_size_config/services_size_config-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SizeConfig","qualifiedName":"size_config.SizeConfig","href":"services_size_config/SizeConfig-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"SizeConfig class is used to initialise the height and width of the media.","enclosedBy":{"name":"size_config","type":"library","href":"services_size_config/services_size_config-library.md"}},{"name":"SizeConfig","qualifiedName":"size_config.SizeConfig.SizeConfig","href":"services_size_config/SizeConfig/SizeConfig.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"blockSizeHorizontal","qualifiedName":"size_config.SizeConfig.blockSizeHorizontal","href":"services_size_config/SizeConfig/blockSizeHorizontal.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"blockSizeVertical","qualifiedName":"size_config.SizeConfig.blockSizeVertical","href":"services_size_config/SizeConfig/blockSizeVertical.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"init","qualifiedName":"size_config.SizeConfig.init","href":"services_size_config/SizeConfig/init.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"paddingTop","qualifiedName":"size_config.SizeConfig.paddingTop","href":"services_size_config/SizeConfig/paddingTop.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"safeBlockHorizontal","qualifiedName":"size_config.SizeConfig.safeBlockHorizontal","href":"services_size_config/SizeConfig/safeBlockHorizontal.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"safeBlockVertical","qualifiedName":"size_config.SizeConfig.safeBlockVertical","href":"services_size_config/SizeConfig/safeBlockVertical.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"screenHeight","qualifiedName":"size_config.SizeConfig.screenHeight","href":"services_size_config/SizeConfig/screenHeight.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"screenWidth","qualifiedName":"size_config.SizeConfig.screenWidth","href":"services_size_config/SizeConfig/screenWidth.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"test","qualifiedName":"size_config.SizeConfig.test","href":"services_size_config/SizeConfig/test.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SizeConfig","type":"class","href":"services_size_config/SizeConfig-class.md"}},{"name":"splash_screen","qualifiedName":"splash_screen","href":"splash_screen/splash_screen-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"SplashScreen","qualifiedName":"splash_screen.SplashScreen","href":"splash_screen/SplashScreen-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This widget return the SplashScreen. Splash Screen is the first screen that\nwe see when we run our application. It is also known as Launch Screen.","enclosedBy":{"name":"splash_screen","type":"library","href":"splash_screen/splash_screen-library.md"}},{"name":"SplashScreen","qualifiedName":"splash_screen.SplashScreen.SplashScreen","href":"splash_screen/SplashScreen/SplashScreen.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SplashScreen","type":"class","href":"splash_screen/SplashScreen-class.md"}},{"name":"createState","qualifiedName":"splash_screen.SplashScreen.createState","href":"splash_screen/SplashScreen/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"SplashScreen","type":"class","href":"splash_screen/SplashScreen-class.md"}},{"name":"mainScreenIndex","qualifiedName":"splash_screen.SplashScreen.mainScreenIndex","href":"splash_screen/SplashScreen/mainScreenIndex.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"SplashScreen","type":"class","href":"splash_screen/SplashScreen-class.md"}},{"name":"talawa_error_dialog","qualifiedName":"talawa_error_dialog","href":"widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TalawaErrorDialog","qualifiedName":"talawa_error_dialog.TalawaErrorDialog","href":"widgets_talawa_error_dialog/TalawaErrorDialog-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"talawa_error_dialog","type":"library","href":"widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md"}},{"name":"TalawaErrorDialog","qualifiedName":"talawa_error_dialog.TalawaErrorDialog.TalawaErrorDialog","href":"widgets_talawa_error_dialog/TalawaErrorDialog/TalawaErrorDialog.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorDialog","type":"class","href":"widgets_talawa_error_dialog/TalawaErrorDialog-class.md"}},{"name":"build","qualifiedName":"talawa_error_dialog.TalawaErrorDialog.build","href":"widgets_talawa_error_dialog/TalawaErrorDialog/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"TalawaErrorDialog","type":"class","href":"widgets_talawa_error_dialog/TalawaErrorDialog-class.md"}},{"name":"errorMessage","qualifiedName":"talawa_error_dialog.TalawaErrorDialog.errorMessage","href":"widgets_talawa_error_dialog/TalawaErrorDialog/errorMessage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorDialog","type":"class","href":"widgets_talawa_error_dialog/TalawaErrorDialog-class.md"}},{"name":"messageType","qualifiedName":"talawa_error_dialog.TalawaErrorDialog.messageType","href":"widgets_talawa_error_dialog/TalawaErrorDialog/messageType.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorDialog","type":"class","href":"widgets_talawa_error_dialog/TalawaErrorDialog-class.md"}},{"name":"talawa_error_snackbar","qualifiedName":"talawa_error_snackbar","href":"widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TalawaErrorSnackBar","qualifiedName":"talawa_error_snackbar.TalawaErrorSnackBar","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"talawa_error_snackbar","type":"library","href":"widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md"}},{"name":"TalawaErrorSnackBar","qualifiedName":"talawa_error_snackbar.TalawaErrorSnackBar.TalawaErrorSnackBar","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar/TalawaErrorSnackBar.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorSnackBar","type":"class","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md"}},{"name":"build","qualifiedName":"talawa_error_snackbar.TalawaErrorSnackBar.build","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"TalawaErrorSnackBar","type":"class","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md"}},{"name":"errorMessage","qualifiedName":"talawa_error_snackbar.TalawaErrorSnackBar.errorMessage","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar/errorMessage.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorSnackBar","type":"class","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md"}},{"name":"messageType","qualifiedName":"talawa_error_snackbar.TalawaErrorSnackBar.messageType","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar/messageType.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaErrorSnackBar","type":"class","href":"widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md"}},{"name":"talawa_logo","qualifiedName":"talawa_logo","href":"custom_painters_talawa_logo/custom_painters_talawa_logo-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppLogo","qualifiedName":"talawa_logo.AppLogo","href":"custom_painters_talawa_logo/AppLogo-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class draws the app logo using custom paint.\nCustomPaint is a widget from the Flutter SDK, which enables\nyou to use a canvas to draw different shapes.","enclosedBy":{"name":"talawa_logo","type":"library","href":"custom_painters_talawa_logo/custom_painters_talawa_logo-library.md"}},{"name":"AppLogo","qualifiedName":"talawa_logo.AppLogo.AppLogo","href":"custom_painters_talawa_logo/AppLogo/AppLogo.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppLogo","type":"class","href":"custom_painters_talawa_logo/AppLogo-class.md"}},{"name":"paint","qualifiedName":"talawa_logo.AppLogo.paint","href":"custom_painters_talawa_logo/AppLogo/paint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever the object needs to paint. The given Canvas has its\ncoordinate space configured such that the origin is at the top left of the\nbox. The area of the box is the size of the size argument.","enclosedBy":{"name":"AppLogo","type":"class","href":"custom_painters_talawa_logo/AppLogo-class.md"}},{"name":"shouldRepaint","qualifiedName":"talawa_logo.AppLogo.shouldRepaint","href":"custom_painters_talawa_logo/AppLogo/shouldRepaint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever a new instance of the custom painter delegate class is\nprovided to the RenderCustomPaint object, or any time that a new\nCustomPaint object is created with a new instance of the custom painter\ndelegate class (which amounts to the same thing, because the latter is\nimplemented in terms of the former).","enclosedBy":{"name":"AppLogo","type":"class","href":"custom_painters_talawa_logo/AppLogo-class.md"}},{"name":"talawa_plugin_provider","qualifiedName":"talawa_plugin_provider","href":"plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TalawaPluginProvider","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"TalwaPluginProvider provides ability to implement features as plugins","enclosedBy":{"name":"talawa_plugin_provider","type":"library","href":"plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md"}},{"name":"TalawaPluginProvider","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.TalawaPluginProvider","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/TalawaPluginProvider.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"build","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.build","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"build the Plugin combining local visibility property and serverVisible property","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"checkFromPluginList","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.checkFromPluginList","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/checkFromPluginList.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"return bool decides the final visibility of the verifying from database and current OrgId","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"child","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.child","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/child.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"child contains the widget for the plugin UI.","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"pluginName","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.pluginName","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/pluginName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"name of plugin preferred with underscores(_) instead of spaces","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"visible","qualifiedName":"talawa_plugin_provider.TalawaPluginProvider.visible","href":"plugins_talawa_plugin_provider/TalawaPluginProvider/visible.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"visible is the property that decides visibility of the UI.","enclosedBy":{"name":"TalawaPluginProvider","type":"class","href":"plugins_talawa_plugin_provider/TalawaPluginProvider-class.md"}},{"name":"task_form","qualifiedName":"task_form","href":"widgets_task_form/widgets_task_form-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"DescriptionField","qualifiedName":"task_form.DescriptionField","href":"widgets_task_form/DescriptionField-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_form","type":"library","href":"widgets_task_form/widgets_task_form-library.md"}},{"name":"DescriptionField","qualifiedName":"task_form.DescriptionField.DescriptionField","href":"widgets_task_form/DescriptionField/DescriptionField.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"DescriptionField","type":"class","href":"widgets_task_form/DescriptionField-class.md"}},{"name":"build","qualifiedName":"task_form.DescriptionField.build","href":"widgets_task_form/DescriptionField/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"DescriptionField","type":"class","href":"widgets_task_form/DescriptionField-class.md"}},{"name":"TaskForm","qualifiedName":"task_form.TaskForm","href":"widgets_task_form/TaskForm-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_form","type":"library","href":"widgets_task_form/widgets_task_form-library.md"}},{"name":"TaskForm","qualifiedName":"task_form.TaskForm.TaskForm","href":"widgets_task_form/TaskForm/TaskForm.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskForm","type":"class","href":"widgets_task_form/TaskForm-class.md"}},{"name":"actionText","qualifiedName":"task_form.TaskForm.actionText","href":"widgets_task_form/TaskForm/actionText.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskForm","type":"class","href":"widgets_task_form/TaskForm-class.md"}},{"name":"createState","qualifiedName":"task_form.TaskForm.createState","href":"widgets_task_form/TaskForm/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"TaskForm","type":"class","href":"widgets_task_form/TaskForm-class.md"}},{"name":"onSave","qualifiedName":"task_form.TaskForm.onSave","href":"widgets_task_form/TaskForm/onSave.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskForm","type":"class","href":"widgets_task_form/TaskForm-class.md"}},{"name":"title","qualifiedName":"task_form.TaskForm.title","href":"widgets_task_form/TaskForm/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskForm","type":"class","href":"widgets_task_form/TaskForm-class.md"}},{"name":"TitleField","qualifiedName":"task_form.TitleField","href":"widgets_task_form/TitleField-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_form","type":"library","href":"widgets_task_form/widgets_task_form-library.md"}},{"name":"TitleField","qualifiedName":"task_form.TitleField.TitleField","href":"widgets_task_form/TitleField/TitleField.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TitleField","type":"class","href":"widgets_task_form/TitleField-class.md"}},{"name":"build","qualifiedName":"task_form.TitleField.build","href":"widgets_task_form/TitleField/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"TitleField","type":"class","href":"widgets_task_form/TitleField-class.md"}},{"name":"task_model","qualifiedName":"task_model","href":"models_task_task_model/models_task_task_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Task","qualifiedName":"task_model.Task","href":"models_task_task_model/Task-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_model","type":"library","href":"models_task_task_model/models_task_task_model-library.md"}},{"name":"Task","qualifiedName":"task_model.Task.Task","href":"models_task_task_model/Task/Task.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"createdAt","qualifiedName":"task_model.Task.createdAt","href":"models_task_task_model/Task/createdAt.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"creator","qualifiedName":"task_model.Task.creator","href":"models_task_task_model/Task/creator.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"deadline","qualifiedName":"task_model.Task.deadline","href":"models_task_task_model/Task/deadline.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"description","qualifiedName":"task_model.Task.description","href":"models_task_task_model/Task/description.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"event","qualifiedName":"task_model.Task.event","href":"models_task_task_model/Task/event.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"Task.fromJson","qualifiedName":"task_model.Task.fromJson","href":"models_task_task_model/Task/Task.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"/Creating a new Task instance from a map structure.","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"id","qualifiedName":"task_model.Task.id","href":"models_task_task_model/Task/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"title","qualifiedName":"task_model.Task.title","href":"models_task_task_model/Task/title.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Task","type":"class","href":"models_task_task_model/Task-class.md"}},{"name":"task_queries","qualifiedName":"task_queries","href":"utils_task_queries/utils_task_queries-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TaskQueries","qualifiedName":"task_queries.TaskQueries","href":"utils_task_queries/TaskQueries-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates queries for the tasks in the application.","enclosedBy":{"name":"task_queries","type":"library","href":"utils_task_queries/utils_task_queries-library.md"}},{"name":"TaskQueries","qualifiedName":"task_queries.TaskQueries.TaskQueries","href":"utils_task_queries/TaskQueries/TaskQueries.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"addTask","qualifiedName":"task_queries.TaskQueries.addTask","href":"utils_task_queries/TaskQueries/addTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"deleteTask","qualifiedName":"task_queries.TaskQueries.deleteTask","href":"utils_task_queries/TaskQueries/deleteTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"editTask","qualifiedName":"task_queries.TaskQueries.editTask","href":"utils_task_queries/TaskQueries/editTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"eventTasks","qualifiedName":"task_queries.TaskQueries.eventTasks","href":"utils_task_queries/TaskQueries/eventTasks.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"userTasks","qualifiedName":"task_queries.TaskQueries.userTasks","href":"utils_task_queries/TaskQueries/userTasks.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskQueries","type":"class","href":"utils_task_queries/TaskQueries-class.md"}},{"name":"task_schedule","qualifiedName":"task_schedule","href":"widgets_task_schedule/widgets_task_schedule-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TaskCard","qualifiedName":"task_schedule.TaskCard","href":"widgets_task_schedule/TaskCard-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_schedule","type":"library","href":"widgets_task_schedule/widgets_task_schedule-library.md"}},{"name":"TaskCard","qualifiedName":"task_schedule.TaskCard.TaskCard","href":"widgets_task_schedule/TaskCard/TaskCard.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskCard","type":"class","href":"widgets_task_schedule/TaskCard-class.md"}},{"name":"appointment","qualifiedName":"task_schedule.TaskCard.appointment","href":"widgets_task_schedule/TaskCard/appointment.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskCard","type":"class","href":"widgets_task_schedule/TaskCard-class.md"}},{"name":"build","qualifiedName":"task_schedule.TaskCard.build","href":"widgets_task_schedule/TaskCard/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"TaskCard","type":"class","href":"widgets_task_schedule/TaskCard-class.md"}},{"name":"showMoreOptions","qualifiedName":"task_schedule.TaskCard.showMoreOptions","href":"widgets_task_schedule/TaskCard/showMoreOptions.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskCard","type":"class","href":"widgets_task_schedule/TaskCard-class.md"}},{"name":"task","qualifiedName":"task_schedule.TaskCard.task","href":"widgets_task_schedule/TaskCard/task.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskCard","type":"class","href":"widgets_task_schedule/TaskCard-class.md"}},{"name":"TaskSchedule","qualifiedName":"task_schedule.TaskSchedule","href":"widgets_task_schedule/TaskSchedule-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"task_schedule","type":"library","href":"widgets_task_schedule/widgets_task_schedule-library.md"}},{"name":"TaskSchedule","qualifiedName":"task_schedule.TaskSchedule.TaskSchedule","href":"widgets_task_schedule/TaskSchedule/TaskSchedule.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskSchedule","type":"class","href":"widgets_task_schedule/TaskSchedule-class.md"}},{"name":"build","qualifiedName":"task_schedule.TaskSchedule.build","href":"widgets_task_schedule/TaskSchedule/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"TaskSchedule","type":"class","href":"widgets_task_schedule/TaskSchedule-class.md"}},{"name":"calendarTapped","qualifiedName":"task_schedule.TaskSchedule.calendarTapped","href":"widgets_task_schedule/TaskSchedule/calendarTapped.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskSchedule","type":"class","href":"widgets_task_schedule/TaskSchedule-class.md"}},{"name":"showMoreOptions","qualifiedName":"task_schedule.TaskSchedule.showMoreOptions","href":"widgets_task_schedule/TaskSchedule/showMoreOptions.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskSchedule","type":"class","href":"widgets_task_schedule/TaskSchedule-class.md"}},{"name":"tasks","qualifiedName":"task_schedule.TaskSchedule.tasks","href":"widgets_task_schedule/TaskSchedule/tasks.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskSchedule","type":"class","href":"widgets_task_schedule/TaskSchedule-class.md"}},{"name":"task_service","qualifiedName":"task_service","href":"services_task_service/services_task_service-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TaskService","qualifiedName":"task_service.TaskService","href":"services_task_service/TaskService-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"PostService class provides functions in the context of a Task.","enclosedBy":{"name":"task_service","type":"library","href":"services_task_service/services_task_service-library.md"}},{"name":"TaskService","qualifiedName":"task_service.TaskService.TaskService","href":"services_task_service/TaskService/TaskService.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"callbackNotifyListeners","qualifiedName":"task_service.TaskService.callbackNotifyListeners","href":"services_task_service/TaskService/callbackNotifyListeners.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"createTask","qualifiedName":"task_service.TaskService.createTask","href":"services_task_service/TaskService/createTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to create a new task for the event.","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"deleteTask","qualifiedName":"task_service.TaskService.deleteTask","href":"services_task_service/TaskService/deleteTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to delete a task.","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"editTask","qualifiedName":"task_service.TaskService.editTask","href":"services_task_service/TaskService/editTask.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to edit the task created by the user.","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"getTasksByUser","qualifiedName":"task_service.TaskService.getTasksByUser","href":"services_task_service/TaskService/getTasksByUser.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to fetch and return all tasks added by the current user.","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"getTasksForEvent","qualifiedName":"task_service.TaskService.getTasksForEvent","href":"services_task_service/TaskService/getTasksForEvent.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to get all the tasks for the event.","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"tasks","qualifiedName":"task_service.TaskService.tasks","href":"services_task_service/TaskService/tasks.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TaskService","type":"class","href":"services_task_service/TaskService-class.md"}},{"name":"telegram_logo","qualifiedName":"telegram_logo","href":"custom_painters_telegram_logo/custom_painters_telegram_logo-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TelegramLogo","qualifiedName":"telegram_logo.TelegramLogo","href":"custom_painters_telegram_logo/TelegramLogo-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class draws the telegram logo using custom paint.\nCustomPaint is a widget from the Flutter SDK, which enables\nyou to use a canvas to draw different shapes.","enclosedBy":{"name":"telegram_logo","type":"library","href":"custom_painters_telegram_logo/custom_painters_telegram_logo-library.md"}},{"name":"TelegramLogo","qualifiedName":"telegram_logo.TelegramLogo.TelegramLogo","href":"custom_painters_telegram_logo/TelegramLogo/TelegramLogo.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TelegramLogo","type":"class","href":"custom_painters_telegram_logo/TelegramLogo-class.md"}},{"name":"paint","qualifiedName":"telegram_logo.TelegramLogo.paint","href":"custom_painters_telegram_logo/TelegramLogo/paint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever the object needs to paint. The given Canvas has its\ncoordinate space configured such that the origin is at the top left of the\nbox. The area of the box is the size of the size argument.","enclosedBy":{"name":"TelegramLogo","type":"class","href":"custom_painters_telegram_logo/TelegramLogo-class.md"}},{"name":"shouldRepaint","qualifiedName":"telegram_logo.TelegramLogo.shouldRepaint","href":"custom_painters_telegram_logo/TelegramLogo/shouldRepaint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever a new instance of the custom painter delegate class is\nprovided to the RenderCustomPaint object, or any time that a new\nCustomPaint object is created with a new instance of the custom painter\ndelegate class (which amounts to the same thing, because the latter is\nimplemented in terms of the former).","enclosedBy":{"name":"TelegramLogo","type":"class","href":"custom_painters_telegram_logo/TelegramLogo-class.md"}},{"name":"theme_switch","qualifiedName":"theme_switch","href":"widgets_theme_switch/widgets_theme_switch-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"ChangeThemeTile","qualifiedName":"theme_switch.ChangeThemeTile","href":"widgets_theme_switch/ChangeThemeTile-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class enables theme switch.\nIt returns a ListTile which contains a Toggle button to switch between Dark and Light Themes.","enclosedBy":{"name":"theme_switch","type":"library","href":"widgets_theme_switch/widgets_theme_switch-library.md"}},{"name":"ChangeThemeTile","qualifiedName":"theme_switch.ChangeThemeTile.ChangeThemeTile","href":"widgets_theme_switch/ChangeThemeTile/ChangeThemeTile.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"ChangeThemeTile","type":"class","href":"widgets_theme_switch/ChangeThemeTile-class.md"}},{"name":"build","qualifiedName":"theme_switch.ChangeThemeTile.build","href":"widgets_theme_switch/ChangeThemeTile/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"ChangeThemeTile","type":"class","href":"widgets_theme_switch/ChangeThemeTile-class.md"}},{"name":"theme_view_model","qualifiedName":"theme_view_model","href":"view_model_theme_view_model/view_model_theme_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"AppTheme","qualifiedName":"theme_view_model.AppTheme","href":"view_model_theme_view_model/AppTheme-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"AppTheme class is a type of View Model to serve data from modal to views in the context of App Themes.","enclosedBy":{"name":"theme_view_model","type":"library","href":"view_model_theme_view_model/view_model_theme_view_model-library.md"}},{"name":"AppTheme","qualifiedName":"theme_view_model.AppTheme.AppTheme","href":"view_model_theme_view_model/AppTheme/AppTheme.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"view_model_theme_view_model/AppTheme-class.md"}},{"name":"initialize","qualifiedName":"theme_view_model.AppTheme.initialize","href":"view_model_theme_view_model/AppTheme/initialize.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"view_model_theme_view_model/AppTheme-class.md"}},{"name":"isdarkTheme","qualifiedName":"theme_view_model.AppTheme.isdarkTheme","href":"view_model_theme_view_model/AppTheme/isdarkTheme.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"view_model_theme_view_model/AppTheme-class.md"}},{"name":"key","qualifiedName":"theme_view_model.AppTheme.key","href":"view_model_theme_view_model/AppTheme/key.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"AppTheme","type":"class","href":"view_model_theme_view_model/AppTheme-class.md"}},{"name":"switchTheme","qualifiedName":"theme_view_model.AppTheme.switchTheme","href":"view_model_theme_view_model/AppTheme/switchTheme.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function switches the app theme.","enclosedBy":{"name":"AppTheme","type":"class","href":"view_model_theme_view_model/AppTheme-class.md"}},{"name":"timeout","qualifiedName":"timeout","href":"constants_timeout/constants_timeout-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"TimeOuts","qualifiedName":"timeout.TimeOuts","href":"constants_timeout/TimeOuts-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"Class to define constant timeout to bring consistency in the code.","enclosedBy":{"name":"timeout","type":"library","href":"constants_timeout/constants_timeout-library.md"}},{"name":"TimeOuts","qualifiedName":"timeout.TimeOuts.TimeOuts","href":"constants_timeout/TimeOuts/TimeOuts.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"TimeOuts","type":"class","href":"constants_timeout/TimeOuts-class.md"}},{"name":"large","qualifiedName":"timeout.TimeOuts.large","href":"constants_timeout/TimeOuts/large-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"For large timeout, used for large data fetch.","enclosedBy":{"name":"TimeOuts","type":"class","href":"constants_timeout/TimeOuts-class.md"}},{"name":"mediums","qualifiedName":"timeout.TimeOuts.mediums","href":"constants_timeout/TimeOuts/mediums-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"For medium timeout, used for medium data fetch.","enclosedBy":{"name":"TimeOuts","type":"class","href":"constants_timeout/TimeOuts-class.md"}},{"name":"small","qualifiedName":"timeout.TimeOuts.small","href":"constants_timeout/TimeOuts/small-constant.md","type":"constant","overriddenDepth":0,"packageName":"talawa","desc":"For small timeout, used for small data fetch.","enclosedBy":{"name":"TimeOuts","type":"class","href":"constants_timeout/TimeOuts-class.md"}},{"name":"user_config","qualifiedName":"user_config","href":"services_user_config/services_user_config-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"UserConfig","qualifiedName":"user_config.UserConfig","href":"services_user_config/UserConfig-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"UserConfig class provides different services in the context of the User.","enclosedBy":{"name":"user_config","type":"library","href":"services_user_config/services_user_config-library.md"}},{"name":"UserConfig","qualifiedName":"user_config.UserConfig.UserConfig","href":"services_user_config/UserConfig/UserConfig.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"currentOrg","qualifiedName":"user_config.UserConfig.currentOrg","href":"services_user_config/UserConfig/currentOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"currentOrgInfoController","qualifiedName":"user_config.UserConfig.currentOrgInfoController","href":"services_user_config/UserConfig/currentOrgInfoController.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"currentOrgInfoStream","qualifiedName":"user_config.UserConfig.currentOrgInfoStream","href":"services_user_config/UserConfig/currentOrgInfoStream.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"currentOrgName","qualifiedName":"user_config.UserConfig.currentOrgName","href":"services_user_config/UserConfig/currentOrgName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"currentUser","qualifiedName":"user_config.UserConfig.currentUser","href":"services_user_config/UserConfig/currentUser.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"initialiseStream","qualifiedName":"user_config.UserConfig.initialiseStream","href":"services_user_config/UserConfig/initialiseStream.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"saveCurrentOrgInHive","qualifiedName":"user_config.UserConfig.saveCurrentOrgInHive","href":"services_user_config/UserConfig/saveCurrentOrgInHive.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"saveUserInHive","qualifiedName":"user_config.UserConfig.saveUserInHive","href":"services_user_config/UserConfig/saveUserInHive.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateAccessToken","qualifiedName":"user_config.UserConfig.updateAccessToken","href":"services_user_config/UserConfig/updateAccessToken.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to updated the access token of the user.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateUser","qualifiedName":"user_config.UserConfig.updateUser","href":"services_user_config/UserConfig/updateUser.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update the user details.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateUserAdminOrg","qualifiedName":"user_config.UserConfig.updateUserAdminOrg","href":"services_user_config/UserConfig/updateUserAdminOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update the organization admin.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateUserCreatedOrg","qualifiedName":"user_config.UserConfig.updateUserCreatedOrg","href":"services_user_config/UserConfig/updateUserCreatedOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update the user created organization.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateUserJoinedOrg","qualifiedName":"user_config.UserConfig.updateUserJoinedOrg","href":"services_user_config/UserConfig/updateUserJoinedOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update the user joined organization.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"updateUserMemberRequestOrg","qualifiedName":"user_config.UserConfig.updateUserMemberRequestOrg","href":"services_user_config/UserConfig/updateUserMemberRequestOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to update the user request to join the organization.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"userLoggedIn","qualifiedName":"user_config.UserConfig.userLoggedIn","href":"services_user_config/UserConfig/userLoggedIn.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function is used to log in the user.","enclosedBy":{"name":"UserConfig","type":"class","href":"services_user_config/UserConfig-class.md"}},{"name":"user_info","qualifiedName":"user_info","href":"models_user_user_info/models_user_user_info-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"User","qualifiedName":"user_info.User","href":"models_user_user_info/User-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates a User model and returns a user instance.","enclosedBy":{"name":"user_info","type":"library","href":"models_user_user_info/models_user_user_info-library.md"}},{"name":"User","qualifiedName":"user_info.User.User","href":"models_user_user_info/User/User.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"adminFor","qualifiedName":"user_info.User.adminFor","href":"models_user_user_info/User/adminFor.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"authToken","qualifiedName":"user_info.User.authToken","href":"models_user_user_info/User/authToken.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"createdOrganizations","qualifiedName":"user_info.User.createdOrganizations","href":"models_user_user_info/User/createdOrganizations.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"email","qualifiedName":"user_info.User.email","href":"models_user_user_info/User/email.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"firstName","qualifiedName":"user_info.User.firstName","href":"models_user_user_info/User/firstName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"User.fromJson","qualifiedName":"user_info.User.fromJson","href":"models_user_user_info/User/User.fromJson.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"id","qualifiedName":"user_info.User.id","href":"models_user_user_info/User/id.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"image","qualifiedName":"user_info.User.image","href":"models_user_user_info/User/image.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"joinedOrganizations","qualifiedName":"user_info.User.joinedOrganizations","href":"models_user_user_info/User/joinedOrganizations.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"lastName","qualifiedName":"user_info.User.lastName","href":"models_user_user_info/User/lastName.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"membershipRequests","qualifiedName":"user_info.User.membershipRequests","href":"models_user_user_info/User/membershipRequests.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"print","qualifiedName":"user_info.User.print","href":"models_user_user_info/User/print.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"refreshToken","qualifiedName":"user_info.User.refreshToken","href":"models_user_user_info/User/refreshToken.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"update","qualifiedName":"user_info.User.update","href":"models_user_user_info/User/update.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"updateAdminFor","qualifiedName":"user_info.User.updateAdminFor","href":"models_user_user_info/User/updateAdminFor.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"updateCreatedOrg","qualifiedName":"user_info.User.updateCreatedOrg","href":"models_user_user_info/User/updateCreatedOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"updateJoinedOrg","qualifiedName":"user_info.User.updateJoinedOrg","href":"models_user_user_info/User/updateJoinedOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"updateMemberRequestOrg","qualifiedName":"user_info.User.updateMemberRequestOrg","href":"models_user_user_info/User/updateMemberRequestOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"User","type":"class","href":"models_user_user_info/User-class.md"}},{"name":"UserAdapter","qualifiedName":"user_info.UserAdapter","href":"models_user_user_info/UserAdapter-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"user_info","type":"library","href":"models_user_user_info/models_user_user_info-library.md"}},{"name":"operator ==","qualifiedName":"user_info.UserAdapter.==","href":"models_user_user_info/UserAdapter/operator_equals.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"The equality operator.","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"UserAdapter","qualifiedName":"user_info.UserAdapter.UserAdapter","href":"models_user_user_info/UserAdapter/UserAdapter.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"hashCode","qualifiedName":"user_info.UserAdapter.hashCode","href":"models_user_user_info/UserAdapter/hashCode.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"The hash code for this object.","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"read","qualifiedName":"user_info.UserAdapter.read","href":"models_user_user_info/UserAdapter/read.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Is called when a value has to be decoded.","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"typeId","qualifiedName":"user_info.UserAdapter.typeId","href":"models_user_user_info/UserAdapter/typeId.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"Called for type registration","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"write","qualifiedName":"user_info.UserAdapter.write","href":"models_user_user_info/UserAdapter/write.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Is called when a value has to be encoded.","enclosedBy":{"name":"UserAdapter","type":"class","href":"models_user_user_info/UserAdapter-class.md"}},{"name":"user_tasks_page","qualifiedName":"user_tasks_page","href":"views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"UserTasksPage","qualifiedName":"user_tasks_page.UserTasksPage","href":"views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"UserTasksPage returns a widget for page of User Tasks.","enclosedBy":{"name":"user_tasks_page","type":"library","href":"views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md"}},{"name":"UserTasksPage","qualifiedName":"user_tasks_page.UserTasksPage.UserTasksPage","href":"views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/UserTasksPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"UserTasksPage","type":"class","href":"views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md"}},{"name":"build","qualifiedName":"user_tasks_page.UserTasksPage.build","href":"views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"UserTasksPage","type":"class","href":"views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md"}},{"name":"validators","qualifiedName":"validators","href":"utils_validators/utils_validators-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"Validator","qualifiedName":"validators.Validator","href":"utils_validators/Validator-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creats various validator methods for the application.\nThey are used to validate information given by the users.","enclosedBy":{"name":"validators","type":"library","href":"utils_validators/utils_validators-library.md"}},{"name":"Validator","qualifiedName":"validators.Validator.Validator","href":"utils_validators/Validator/Validator.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateEmail","qualifiedName":"validators.Validator.validateEmail","href":"utils_validators/Validator/validateEmail.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateEventForm","qualifiedName":"validators.Validator.validateEventForm","href":"utils_validators/Validator/validateEventForm.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateFirstName","qualifiedName":"validators.Validator.validateFirstName","href":"utils_validators/Validator/validateFirstName.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateLastName","qualifiedName":"validators.Validator.validateLastName","href":"utils_validators/Validator/validateLastName.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validatePassword","qualifiedName":"validators.Validator.validatePassword","href":"utils_validators/Validator/validatePassword.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validatePasswordConfirm","qualifiedName":"validators.Validator.validatePasswordConfirm","href":"utils_validators/Validator/validatePasswordConfirm.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateURL","qualifiedName":"validators.Validator.validateURL","href":"utils_validators/Validator/validateURL.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"validateUrlExistence","qualifiedName":"validators.Validator.validateUrlExistence","href":"utils_validators/Validator/validateUrlExistence.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"Validator","type":"class","href":"utils_validators/Validator-class.md"}},{"name":"video_widget","qualifiedName":"video_widget","href":"widgets_video_widget/widgets_video_widget-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"VideoWidget","qualifiedName":"video_widget.VideoWidget","href":"widgets_video_widget/VideoWidget-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class creates a video widget.","enclosedBy":{"name":"video_widget","type":"library","href":"widgets_video_widget/widgets_video_widget-library.md"}},{"name":"VideoWidget","qualifiedName":"video_widget.VideoWidget.VideoWidget","href":"widgets_video_widget/VideoWidget/VideoWidget.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"VideoWidget","type":"class","href":"widgets_video_widget/VideoWidget-class.md"}},{"name":"createState","qualifiedName":"video_widget.VideoWidget.createState","href":"widgets_video_widget/VideoWidget/createState.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Creates the mutable state for this widget at a given location in the tree.","enclosedBy":{"name":"VideoWidget","type":"class","href":"widgets_video_widget/VideoWidget-class.md"}},{"name":"play","qualifiedName":"video_widget.VideoWidget.play","href":"widgets_video_widget/VideoWidget/play.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"VideoWidget","type":"class","href":"widgets_video_widget/VideoWidget-class.md"}},{"name":"url","qualifiedName":"video_widget.VideoWidget.url","href":"widgets_video_widget/VideoWidget/url.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"VideoWidget","type":"class","href":"widgets_video_widget/VideoWidget-class.md"}},{"name":"waiting_to_join_private_org","qualifiedName":"waiting_to_join_private_org","href":"views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"WaitingPage","qualifiedName":"waiting_to_join_private_org.WaitingPage","href":"views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class returns a widget which shows the request sent by the user to join a private organization.","enclosedBy":{"name":"waiting_to_join_private_org","type":"library","href":"views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md"}},{"name":"WaitingPage","qualifiedName":"waiting_to_join_private_org.WaitingPage.WaitingPage","href":"views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/WaitingPage.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingPage","type":"class","href":"views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md"}},{"name":"build","qualifiedName":"waiting_to_join_private_org.WaitingPage.build","href":"views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/build.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Describes the part of the user interface represented by this widget.","enclosedBy":{"name":"WaitingPage","type":"class","href":"views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md"}},{"name":"waiting_view_model","qualifiedName":"waiting_view_model","href":"view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"WaitingViewModel","qualifiedName":"waiting_view_model.WaitingViewModel","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"WaitingViewModel class helps to interact with model to serve data\nand react to user's input for Waiting section.","enclosedBy":{"name":"waiting_view_model","type":"library","href":"view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md"}},{"name":"WaitingViewModel","qualifiedName":"waiting_view_model.WaitingViewModel.WaitingViewModel","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/WaitingViewModel.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"currentUser","qualifiedName":"waiting_view_model.WaitingViewModel.currentUser","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/currentUser.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"greeting","qualifiedName":"waiting_view_model.WaitingViewModel.greeting","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/greeting.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"initialise","qualifiedName":"waiting_view_model.WaitingViewModel.initialise","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/initialise.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"joinOrg","qualifiedName":"waiting_view_model.WaitingViewModel.joinOrg","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/joinOrg.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"logout","qualifiedName":"waiting_view_model.WaitingViewModel.logout","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/logout.md","type":"method","overriddenDepth":0,"packageName":"talawa","desc":"This function ends the session for the user or logout the user from the application.","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"pendingRequestOrg","qualifiedName":"waiting_view_model.WaitingViewModel.pendingRequestOrg","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/pendingRequestOrg.md","type":"property","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WaitingViewModel","type":"class","href":"view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md"}},{"name":"whatsapp_logo","qualifiedName":"whatsapp_logo","href":"custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md","type":"library","overriddenDepth":0,"packageName":"talawa","desc":""},{"name":"WhatsappLogo","qualifiedName":"whatsapp_logo.WhatsappLogo","href":"custom_painters_whatsapp_logo/WhatsappLogo-class.md","type":"class","overriddenDepth":0,"packageName":"talawa","desc":"This class draws the whatsapp logo using custom paint.\nCustomPaint is a widget from the Flutter SDK, which enables\nyou to use a canvas to draw different shapes.","enclosedBy":{"name":"whatsapp_logo","type":"library","href":"custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md"}},{"name":"WhatsappLogo","qualifiedName":"whatsapp_logo.WhatsappLogo.WhatsappLogo","href":"custom_painters_whatsapp_logo/WhatsappLogo/WhatsappLogo.md","type":"constructor","overriddenDepth":0,"packageName":"talawa","desc":"","enclosedBy":{"name":"WhatsappLogo","type":"class","href":"custom_painters_whatsapp_logo/WhatsappLogo-class.md"}},{"name":"paint","qualifiedName":"whatsapp_logo.WhatsappLogo.paint","href":"custom_painters_whatsapp_logo/WhatsappLogo/paint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever the object needs to paint. The given Canvas has its\ncoordinate space configured such that the origin is at the top left of the\nbox. The area of the box is the size of the size argument.","enclosedBy":{"name":"WhatsappLogo","type":"class","href":"custom_painters_whatsapp_logo/WhatsappLogo-class.md"}},{"name":"shouldRepaint","qualifiedName":"whatsapp_logo.WhatsappLogo.shouldRepaint","href":"custom_painters_whatsapp_logo/WhatsappLogo/shouldRepaint.md","type":"method","overriddenDepth":1,"packageName":"talawa","desc":"Called whenever a new instance of the custom painter delegate class is\nprovided to the RenderCustomPaint object, or any time that a new\nCustomPaint object is created with a new instance of the custom painter\ndelegate class (which amounts to the same thing, because the latter is\nimplemented in terms of the former).","enclosedBy":{"name":"WhatsappLogo","type":"class","href":"custom_painters_whatsapp_logo/WhatsappLogo-class.md"}}] diff --git a/talawa-mobile-docs/index.md b/talawa-mobile-docs/index.md deleted file mode 100644 index a21691b89..000000000 --- a/talawa-mobile-docs/index.md +++ /dev/null @@ -1,654 +0,0 @@ - - - -# talawa - Dart API docs - - -

Talawa

-

💬 Join the community on Slack

-

talawa-logo-lite-200x200

-

License: GPL v3 -GitHub stars -GitHub forks -codecov

-

Talawa is a comprehensive platform that aims to revolutionize the way organizations manage and interact with their data and content. Talawa empowers administrators to access and manage content with ease through the Talawa Admin interface, ensuring that information remains up-to-date and accessible to the platform's members.

-

With the Talawa API facilitating smooth communication between all parts of the platform, Talawa offers a cohesive and exceptional user experience for both administrators and members, making it a powerful tool for data management and content delivery seamlessly. Talawa is a modular open source project to manage group activities of both non-profit organizations and businesses.

-

Core features include:

-
    -
  1. Membership management
  2. -
  3. Groups management
  4. -
  5. Event registrations
  6. -
  7. Recurring meetings
  8. -
  9. Facilities registrations
  10. -
-

talawa is based on the original quito code created by the Palisadoes Foundation as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit The Palisadoes Foundation's website for more details on its origin and activities.

-

Talawa Components

-

talawa has these major software components:

-
    -
  1. talawa: A mobile application with social media features
  2. -
  3. talawa-api: An API providing access to user data and features
  4. -
  5. talawa-admin: A web based administrative portal
  6. -
  7. talawa-docs: The online documentation website
  8. -
-

Documentation

-

Get familiar with talawa:

-
    -
  1. Read our Talawa Mobile App installation guide to get setup quickly.
  2. -
  3. The complete talawa documentation set can be found here.
  4. -
  5. Want to contribute? Look at CONTRIBUTING.md to get started.
  6. -
  7. Visit the Talawa GitHub to see the code.
  8. -
- - -## Libraries - -##### [access_request_screen](views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md) - - - -##### [access_request_view_model](view_model_access_request_view_model/view_model_access_request_view_model-library.md) - - - -##### [add_members_bottom_sheet](widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md) - - - -##### [add_post_page](views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md) - - - -##### [add_post_view_model](view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md) - - - -##### [app_localization](utils_app_localization/utils_app_localization-library.md) - - - -##### [app_settings_page](views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md) - - - -##### [apptheme](apptheme/apptheme-library.md) - - - -##### [base_view](views_base_view/views_base_view-library.md) - - - -##### [base_view_model](view_model_base_view_model/view_model_base_view_model-library.md) - - - -##### [change_password](views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md) - - - -##### [chat_input_field](views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md) - - - -##### [chat_list_screen](views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md) - - - -##### [chat_list_tile_data_model](models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md) - - - -##### [chat_message](models_chats_chat_message/models_chats_chat_message-library.md) - - - -##### [chat_message_bubble](views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md) - - - -##### [chat_message_screen](views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md) - - - -##### [chat_queries](utils_chat_queries/utils_chat_queries-library.md) - - - -##### [chat_service](services_chat_service/services_chat_service-library.md) - - - -##### [chat_user](models_chats_chat_user/models_chats_chat_user-library.md) - - - -##### [comment_model](models_comment_comment_model/models_comment_comment_model-library.md) - - - -##### [comment_queries](utils_comment_queries/utils_comment_queries-library.md) - - - -##### [comment_service](services_comment_service/services_comment_service-library.md) - - - -##### [comments_view_model](view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md) - - - -##### [constants](constants_constants/constants_constants-library.md) - - - -##### [create_event_form](views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md) - - - -##### [create_event_page](views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md) - - - -##### [create_event_view_model](view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md) - - - -##### [create_task_page](views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md) - - - -##### [create_task_view_model](view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md) - - - -##### [custom_alert_dialog](widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md) - - - -##### [custom_avatar](widgets_custom_avatar/widgets_custom_avatar-library.md) - - - -##### [custom_drawer](widgets_custom_drawer/widgets_custom_drawer-library.md) - - - -##### [custom_drawer_view_model](view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md) - - - -##### [custom_list_tile](widgets_custom_list_tile/widgets_custom_list_tile-library.md) - - - -##### [custom_progress_dialog](widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md) - - - -##### [custom_theme](constants_custom_theme/constants_custom_theme-library.md) - - - -##### [database_mutation_functions](services_database_mutation_functions/services_database_mutation_functions-library.md) - - - -##### [date_time_picker](widgets_date_time_picker/widgets_date_time_picker-library.md) - - - -##### [direct_chat_demo_data](demo_server_data_direct_chat_demo_data/demo_server_data_direct_chat_demo_data-library.md) - - - -##### [direct_chat_view_model](view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md) - - - -##### [direct_chats](views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md) - - - -##### [edit_event_page](views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md) - - - -##### [edit_event_view_model](view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md) - - - -##### [edit_events_form](views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md) - - - -##### [edit_profile_page](views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md) - - - -##### [edit_profile_view_model](view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md) - - - -##### [edit_task_page](views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md) - - - -##### [enums](enums_enums/enums_enums-library.md) - - - -##### [event_calendar](views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md) - - - -##### [event_card](widgets_event_card/widgets_event_card-library.md) - - - -##### [event_card_view_model](view_model_widgets_view_models_event_card_view_model/view_model_widgets_view_models_event_card_view_model-library.md) - - - -##### [event_chats](views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md) - - - -##### [event_date_time_tile](widgets_event_date_time_tile/widgets_event_date_time_tile-library.md) - - - -##### [event_info_body](views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md) - - - -##### [event_info_page](views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md) - - - -##### [event_info_view_model](view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md) - - - -##### [event_model](models_events_event_model/models_events_event_model-library.md) - - - -##### [event_queries](utils_event_queries/utils_event_queries-library.md) - - - -##### [event_search_delegate](widgets_event_search_delegate/widgets_event_search_delegate-library.md) - - - -##### [event_service](services_event_service/services_event_service-library.md) - - - -##### [event_tasks_page](views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md) - - - -##### [events_demo_data](demo_server_data_events_demo_data/demo_server_data_events_demo_data-library.md) - - - -##### [explore_event_dialogue](views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md) - - - -##### [explore_events](views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md) - - - -##### [explore_events_view_model](view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md) - - - -##### [explore_tasks_view_model](view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md) - - - -##### [fetch_plugin_list](plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md) - - - -##### [firebase_options](firebase_options/firebase_options-library.md) - - - -##### [from_palisadoes](widgets_from_palisadoes/widgets_from_palisadoes-library.md) - - - -##### [generated_plugin_registrant](generated_plugin_registrant/generated_plugin_registrant-library.md) - - - -##### [graphql_config](services_graphql_config/services_graphql_config-library.md) - - - -##### [individual_post](views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md) - - - -##### [invite_child](widgets_invite_child/widgets_invite_child-library.md) - - - -##### [join_organisation_after_auth](views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md) - - - -##### [lang_switch](widgets_lang_switch/widgets_lang_switch-library.md) - - - -##### [lang_view_model](view_model_lang_view_model/view_model_lang_view_model-library.md) - - - -##### [language_icon](custom_painters_language_icon/custom_painters_language_icon-library.md) - - - -##### [language_model](models_language_language_model/models_language_language_model-library.md) - - - -##### [like_button_view_model](view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md) - - - -##### [locator](locator/locator-library.md) - - - -##### [login](views_pre_auth_screens_login/views_pre_auth_screens_login-library.md) - - - -##### [login_view_model](view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md) - - - -##### [main](main/main-library.md) - - - -##### [main_screen](views_main_screen/views_main_screen-library.md) - - - -##### [main_screen_view_model](view_model_main_screen_view_model/view_model_main_screen_view_model-library.md) - - - -##### [mainscreen_navigation_args](models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md) - - - -##### [map_screen](views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md) - - - -##### [member_name_tile](widgets_member_name_tile/widgets_member_name_tile-library.md) - - - -##### [multi_media_pick_service](services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md) - - - -##### [navigation_service](services_navigation_service/services_navigation_service-library.md) - - - -##### [options](models_options_options/models_options_options-library.md) - - - -##### [org_info](models_organization_org_info/models_organization_org_info-library.md) - - - -##### [org_service](services_org_service/services_org_service-library.md) - - - -##### [organization_feed](views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md) - - - -##### [organization_feed_view_model](view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md) - - - -##### [organization_list](widgets_organization_list/widgets_organization_list-library.md) - - - -##### [organization_search_list](widgets_organization_search_list/widgets_organization_search_list-library.md) - - - -##### [pinned_carousel_widget](widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md) - - - -##### [pinned_post_demo_data](demo_server_data_pinned_post_demo_data/demo_server_data_pinned_post_demo_data-library.md) - - - -##### [pinned_post_page](views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md) - - - -##### [post_demo_data](demo_server_data_post_demo_data/demo_server_data_post_demo_data-library.md) - - - -##### [post_detailed_page](widgets_post_detailed_page/widgets_post_detailed_page-library.md) - - - -##### [post_list_widget](widgets_post_list_widget/widgets_post_list_widget-library.md) - - - -##### [post_model](models_post_post_model/models_post_post_model-library.md) - - - -##### [post_queries](utils_post_queries/utils_post_queries-library.md) - - - -##### [post_service](services_post_service/services_post_service-library.md) - - - -##### [post_widget](widgets_post_widget/widgets_post_widget-library.md) - - - -##### [profile_page](views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md) - - - -##### [profile_page_view_model](view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md) - - - -##### [progress_dialog_view_model](view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md) - - - -##### [queries](utils_queries/utils_queries-library.md) - - - -##### [quick_actions](constants_quick_actions/constants_quick_actions-library.md) - - - -##### [raised_round_edge_button](widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md) - - - -##### [recover](views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md) - - - -##### [rich_text](widgets_rich_text/widgets_rich_text-library.md) - - - -##### [router](router/router-library.md) - - - -##### [routing_constants](constants_routing_constants/constants_routing_constants-library.md) - - - -##### [select_contact](views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md) - - - -##### [select_contact_view_model](view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md) - - - -##### [select_language](views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md) - - - -##### [select_organization](views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md) - - - -##### [select_organization_view_model](view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md) - - - -##### [set_url](views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md) - - - -##### [set_url_view_model](view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md) - - - -##### [signup_details](views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md) - - - -##### [signup_details_view_model](view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md) - - - -##### [signup_progress_indicator](widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md) - - - -##### [size_config](services_size_config/services_size_config-library.md) - - - -##### [splash_screen](splash_screen/splash_screen-library.md) - - - -##### [talawa_error_dialog](widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md) - - - -##### [talawa_error_snackbar](widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md) - - - -##### [talawa_logo](custom_painters_talawa_logo/custom_painters_talawa_logo-library.md) - - - -##### [talawa_plugin_provider](plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md) - - - -##### [task_form](widgets_task_form/widgets_task_form-library.md) - - - -##### [task_model](models_task_task_model/models_task_task_model-library.md) - - - -##### [task_queries](utils_task_queries/utils_task_queries-library.md) - - - -##### [task_schedule](widgets_task_schedule/widgets_task_schedule-library.md) - - - -##### [task_service](services_task_service/services_task_service-library.md) - - - -##### [telegram_logo](custom_painters_telegram_logo/custom_painters_telegram_logo-library.md) - - - -##### [theme_switch](widgets_theme_switch/widgets_theme_switch-library.md) - - - -##### [theme_view_model](view_model_theme_view_model/view_model_theme_view_model-library.md) - - - -##### [timeout](constants_timeout/constants_timeout-library.md) - - - -##### [user_config](services_user_config/services_user_config-library.md) - - - -##### [user_info](models_user_user_info/models_user_user_info-library.md) - - - -##### [user_tasks_page](views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md) - - - -##### [validators](utils_validators/utils_validators-library.md) - - - -##### [video_widget](widgets_video_widget/widgets_video_widget-library.md) - - - -##### [waiting_to_join_private_org](views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md) - - - -##### [waiting_view_model](view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md) - - - -##### [whatsapp_logo](custom_painters_whatsapp_logo/custom_painters_whatsapp_logo-library.md) - - - - - - - - - diff --git a/talawa-mobile-docs/locator/connectivity.md b/talawa-mobile-docs/locator/connectivity.md deleted file mode 100644 index 07e3320df..000000000 --- a/talawa-mobile-docs/locator/connectivity.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# connectivity top-level property - - - - - - - - - -[Connectivity](https://pub.dev/documentation/connectivity_plus/4.0.2/connectivity_plus/Connectivity-class.html) connectivity - -_final_ - - - -

creating GetIt for Connectivity.

- - - -## Implementation - -```dart -final connectivity = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/databaseFunctions.md b/talawa-mobile-docs/locator/databaseFunctions.md deleted file mode 100644 index 0c16f0a36..000000000 --- a/talawa-mobile-docs/locator/databaseFunctions.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# databaseFunctions top-level property - - - - - - - - - -[DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions-class.md) databaseFunctions - -_final_ - - - -

creating GetIt for DataBaseMutationFunctions.

- - - -## Implementation - -```dart -final databaseFunctions = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/graphqlConfig.md b/talawa-mobile-docs/locator/graphqlConfig.md deleted file mode 100644 index 68ae14fd6..000000000 --- a/talawa-mobile-docs/locator/graphqlConfig.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# graphqlConfig top-level property - - - - - - - - - -[GraphqlConfig](../services_graphql_config/GraphqlConfig-class.md) graphqlConfig - -_final_ - - - -

creating GetIt for GraphqlConfig.

- - - -## Implementation - -```dart -final graphqlConfig = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/imageCropper.md b/talawa-mobile-docs/locator/imageCropper.md deleted file mode 100644 index 19e98b7bf..000000000 --- a/talawa-mobile-docs/locator/imageCropper.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# imageCropper top-level property - - - - - - - - - -[ImageCropper](https://pub.dev/documentation/image_cropper/4.0.1/image_cropper/ImageCropper-class.html) imageCropper - -_final_ - - - -

creating GetIt for ImageCropper.

- - - -## Implementation - -```dart -final imageCropper = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/imagePicker.md b/talawa-mobile-docs/locator/imagePicker.md deleted file mode 100644 index a2c8b70a0..000000000 --- a/talawa-mobile-docs/locator/imagePicker.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# imagePicker top-level property - - - - - - - - - -[ImagePicker](https://pub.dev/documentation/image_picker/1.0.2/image_picker/ImagePicker-class.html) imagePicker - -_final_ - - - -

creating GetIt for ImagePicker.

- - - -## Implementation - -```dart -final imagePicker = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/locator-library.md b/talawa-mobile-docs/locator/locator-library.md deleted file mode 100644 index 0df1b4e88..000000000 --- a/talawa-mobile-docs/locator/locator-library.md +++ /dev/null @@ -1,141 +0,0 @@ - - - - -# locator library - - - - - - - - - - - - - - - -## Properties - -##### [connectivity](../locator/connectivity.md) → [Connectivity](https://pub.dev/documentation/connectivity_plus/4.0.2/connectivity_plus/Connectivity-class.html) - - - -creating GetIt for Connectivity. -_final_ - - - -##### [databaseFunctions](../locator/databaseFunctions.md) → [DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions-class.md) - - - -creating GetIt for DataBaseMutationFunctions. -_final_ - - - -##### [graphqlConfig](../locator/graphqlConfig.md) → [GraphqlConfig](../services_graphql_config/GraphqlConfig-class.md) - - - -creating GetIt for GraphqlConfig. -_final_ - - - -##### [imageCropper](../locator/imageCropper.md) → [ImageCropper](https://pub.dev/documentation/image_cropper/4.0.1/image_cropper/ImageCropper-class.html) - - - -creating GetIt for ImageCropper. -_final_ - - - -##### [imagePicker](../locator/imagePicker.md) → [ImagePicker](https://pub.dev/documentation/image_picker/1.0.2/image_picker/ImagePicker-class.html) - - - -creating GetIt for ImagePicker. -_final_ - - - -##### [locator](../locator/locator.md) ↔ [GetIt](https://pub.dev/documentation/get_it/7.6.0/get_it/GetIt-class.html) - - - -Intializaing the locator. -_read / write_ - - - -##### [navigationService](../locator/navigationService.md) → [NavigationService](../services_navigation_service/NavigationService-class.md) - - - -creating GetIt for NavigationService. -_final_ - - - -##### [organizationService](../locator/organizationService.md) → [OrganizationService](../services_org_service/OrganizationService-class.md) - - - -creating GetIt for OrganizationService. -_final_ - - - -##### [queries](../locator/queries.md) → [Queries](../utils_queries/Queries-class.md) - - - -creating GetIt for Queries. -_final_ - - - -##### [sizeConfig](../locator/sizeConfig.md) → [SizeConfig](../services_size_config/SizeConfig-class.md) - - - -creating GetIt for SizeConfig. -_final_ - - - -##### [userConfig](../locator/userConfig.md) → [UserConfig](../services_user_config/UserConfig-class.md) - - - -creating GetIt for UserConfig. -_final_ - - - - -## Functions - -##### [setupLocator](../locator/setupLocator.md)() void - - - -This function registers the widgets/objects in "GetIt". - - - - - - - - - - - - diff --git a/talawa-mobile-docs/locator/locator.md b/talawa-mobile-docs/locator/locator.md deleted file mode 100644 index 80b1db462..000000000 --- a/talawa-mobile-docs/locator/locator.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# locator top-level property - - - - - - - - - -[GetIt](https://pub.dev/documentation/get_it/7.6.0/get_it/GetIt-class.html) locator - -_read / write_ - - - -

Intializaing the locator.

- - - -## Implementation - -```dart -GetIt locator = GetIt.instance; -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/navigationService.md b/talawa-mobile-docs/locator/navigationService.md deleted file mode 100644 index 2df4db664..000000000 --- a/talawa-mobile-docs/locator/navigationService.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# navigationService top-level property - - - - - - - - - -[NavigationService](../services_navigation_service/NavigationService-class.md) navigationService - -_final_ - - - -

creating GetIt for NavigationService.

- - - -## Implementation - -```dart -final navigationService = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/organizationService.md b/talawa-mobile-docs/locator/organizationService.md deleted file mode 100644 index 2ed728c6b..000000000 --- a/talawa-mobile-docs/locator/organizationService.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# organizationService top-level property - - - - - - - - - -[OrganizationService](../services_org_service/OrganizationService-class.md) organizationService - -_final_ - - - -

creating GetIt for OrganizationService.

- - - -## Implementation - -```dart -final organizationService = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/queries.md b/talawa-mobile-docs/locator/queries.md deleted file mode 100644 index 5c95eaf58..000000000 --- a/talawa-mobile-docs/locator/queries.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# queries top-level property - - - - - - - - - -[Queries](../utils_queries/Queries-class.md) queries - -_final_ - - - -

creating GetIt for Queries.

- - - -## Implementation - -```dart -final queries = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/setupLocator.md b/talawa-mobile-docs/locator/setupLocator.md deleted file mode 100644 index 9fc6a16ec..000000000 --- a/talawa-mobile-docs/locator/setupLocator.md +++ /dev/null @@ -1,104 +0,0 @@ - - - -# setupLocator function - - - - - - - - - - -void setupLocator -() - - - - - -

This function registers the widgets/objects in "GetIt".

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void setupLocator() { - //services - locator.registerSingleton(NavigationService()); - - //sizeConfig - locator.registerSingleton(SizeConfig()); - - locator.registerSingleton(Validator()); - - //userConfig - locator.registerSingleton(UserConfig()); - - //Services - locator.registerLazySingleton(() => PostService()); - locator.registerLazySingleton(() => EventService()); - locator.registerLazySingleton(() => TaskService()); - locator.registerLazySingleton(() => CommentService()); - locator.registerLazySingleton(() => OrganizationService()); - locator.registerLazySingleton(() => MultiMediaPickerService()); - locator.registerLazySingleton(() => Connectivity()); - locator.registerLazySingleton(() => ChatService()); - locator.registerLazySingleton(() => ImageCropper()); - locator.registerLazySingleton(() => ImagePicker()); - - //graphql - locator.registerSingleton(GraphqlConfig()); - - //databaseMutationFunction - locator.registerSingleton(DataBaseMutationFunctions()); - - //queries - locator.registerSingleton(Queries()); - - //Page viewModels - locator.registerFactory(() => DemoViewModel()); - // locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => SetUrlViewModel()); - locator.registerFactory(() => LoginViewModel()); - - locator.registerFactory(() => SelectOrganizationViewModel()); - locator.registerFactory(() => SignupDetailsViewModel()); - locator.registerFactory(() => WaitingViewModel()); - locator.registerFactory(() => ExploreEventsViewModel()); - locator.registerFactory(() => ExploreTasksViewModel()); - locator.registerFactory(() => CreateTaskViewModel()); - locator.registerFactory(() => MainScreenViewModel()); - locator.registerFactory(() => ProfilePageViewModel()); - locator.registerFactory(() => EditProfilePageViewModel()); - locator.registerFactory(() => CreateEventViewModel()); - locator.registerFactory(() => EditEventViewModel()); - locator.registerFactory(() => AddPostViewModel()); - locator.registerFactory(() => EventInfoViewModel()); - - //Widgets viewModels - locator.registerFactory(() => ProgressDialogViewModel()); - locator.registerFactory(() => CustomDrawerViewModel()); - locator.registerFactory(() => LikeButtonViewModel()); - locator.registerFactory(() => AppLanguage()); - locator.registerFactory(() => CommentsViewModel()); - locator.registerFactory(() => AppTheme()); - locator.registerFactory(() => DirectChatViewModel()); - locator.registerFactory(() => AccessScreenViewModel()); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/locator/sizeConfig.md b/talawa-mobile-docs/locator/sizeConfig.md deleted file mode 100644 index 413c9f786..000000000 --- a/talawa-mobile-docs/locator/sizeConfig.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# sizeConfig top-level property - - - - - - - - - -[SizeConfig](../services_size_config/SizeConfig-class.md) sizeConfig - -_final_ - - - -

creating GetIt for SizeConfig.

- - - -## Implementation - -```dart -final sizeConfig = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/locator/userConfig.md b/talawa-mobile-docs/locator/userConfig.md deleted file mode 100644 index cb96aca54..000000000 --- a/talawa-mobile-docs/locator/userConfig.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# userConfig top-level property - - - - - - - - - -[UserConfig](../services_user_config/UserConfig-class.md) userConfig - -_final_ - - - -

creating GetIt for UserConfig.

- - - -## Implementation - -```dart -final userConfig = locator(); -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/DemoPageView-class.md b/talawa-mobile-docs/main/DemoPageView-class.md deleted file mode 100644 index 08b2e0d15..000000000 --- a/talawa-mobile-docs/main/DemoPageView-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# DemoPageView class - - - - - - - - - -

PageView is a scrollable list that works page by page.

-

DemoPageView is demo PageView of Talawa Mobile App.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- DemoPageView - - - - - - - - -## Constructors - -[DemoPageView](../main/DemoPageView/DemoPageView.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../main/DemoPageView/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/DemoPageView/DemoPageView.md b/talawa-mobile-docs/main/DemoPageView/DemoPageView.md deleted file mode 100644 index dbddcb13a..000000000 --- a/talawa-mobile-docs/main/DemoPageView/DemoPageView.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# DemoPageView constructor - - - - - - -const -DemoPageView({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const DemoPageView({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/main/DemoPageView/build.md b/talawa-mobile-docs/main/DemoPageView/build.md deleted file mode 100644 index 9fd20f775..000000000 --- a/talawa-mobile-docs/main/DemoPageView/build.md +++ /dev/null @@ -1,82 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - FetchPluginList(); - return BaseView( - builder: (context, model, child) => Scaffold( - appBar: AppBar( - title: - Text(AppLocalizations.of(context)!.strictTranslate('Demo Page')), - ), - body: Container( - child: Text(model.title), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/main/DemoViewModel-class.md b/talawa-mobile-docs/main/DemoViewModel-class.md deleted file mode 100644 index 3c395e0ad..000000000 --- a/talawa-mobile-docs/main/DemoViewModel-class.md +++ /dev/null @@ -1,191 +0,0 @@ - - - -# DemoViewModel class - - - - - - - - - -

ViewModel uses property-based data binding to establish a connection.

-

between the ViewModel and the View, and drives the View changes -through the ViewModel. DemoViewModel is the ViewModel for DemoPageView.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- DemoViewModel - - - - - - - - -## Constructors - -[DemoViewModel](../main/DemoViewModel/DemoViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [title](../main/DemoViewModel/title.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Getter function of the title. -_read-only_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/DemoViewModel/DemoViewModel.md b/talawa-mobile-docs/main/DemoViewModel/DemoViewModel.md deleted file mode 100644 index 1295f2c65..000000000 --- a/talawa-mobile-docs/main/DemoViewModel/DemoViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# DemoViewModel constructor - - - - - - - -DemoViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/DemoViewModel/title.md b/talawa-mobile-docs/main/DemoViewModel/title.md deleted file mode 100644 index 0e5577801..000000000 --- a/talawa-mobile-docs/main/DemoViewModel/title.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# title property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) title - - - - - -

Getter function of the title.

-

params: -None -returns:

-
    -
  • String: title of the model
  • -
- - - -## Implementation - -```dart -String get title => _title; -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/MyApp-class.md b/talawa-mobile-docs/main/MyApp-class.md deleted file mode 100644 index c76b3c6a3..000000000 --- a/talawa-mobile-docs/main/MyApp-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# MyApp class - - - - - - - - - -

Main widget that sets up the quick actions, internationalization, routing , notifications.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- MyApp - - - - - - - - -## Constructors - -[MyApp](../main/MyApp/MyApp.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../main/MyApp/createState.md)() _MyAppState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/MyApp/MyApp.md b/talawa-mobile-docs/main/MyApp/MyApp.md deleted file mode 100644 index d0bf0fead..000000000 --- a/talawa-mobile-docs/main/MyApp/MyApp.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# MyApp constructor - - - - - - - -MyApp() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/MyApp/createState.md b/talawa-mobile-docs/main/MyApp/createState.md deleted file mode 100644 index b001fadad..000000000 --- a/talawa-mobile-docs/main/MyApp/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_MyAppState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_MyAppState createState() => _MyAppState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/main/androidFirebaseOptions.md b/talawa-mobile-docs/main/androidFirebaseOptions.md deleted file mode 100644 index 268b1a3b4..000000000 --- a/talawa-mobile-docs/main/androidFirebaseOptions.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# androidFirebaseOptions top-level property - - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> androidFirebaseOptions - -_read / write_ - - - -

HashMap of Firebase options for android.

- - - -## Implementation - -```dart -late Map androidFirebaseOptions; -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/channel.md b/talawa-mobile-docs/main/channel.md deleted file mode 100644 index 5f4cada3f..000000000 --- a/talawa-mobile-docs/main/channel.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# channel top-level property - - - - - - - - - -[AndroidNotificationChannel](https://pub.dev/documentation/flutter_local_notifications/15.1.0+1/flutter_local_notifications/AndroidNotificationChannel-class.html) channel - -_read / write_ - - - -

Create a AndroidNotificationChannel for heads up notifications.

- - - -## Implementation - -```dart -late AndroidNotificationChannel channel; -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/flutterLocalNotificationsPlugin.md b/talawa-mobile-docs/main/flutterLocalNotificationsPlugin.md deleted file mode 100644 index fb311aba4..000000000 --- a/talawa-mobile-docs/main/flutterLocalNotificationsPlugin.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# flutterLocalNotificationsPlugin top-level property - - - - - - - - - -[FlutterLocalNotificationsPlugin](https://pub.dev/documentation/flutter_local_notifications/15.1.0+1/flutter_local_notifications/FlutterLocalNotificationsPlugin-class.html) flutterLocalNotificationsPlugin - -_read / write_ - - - -

Initialize the FlutterLocalNotificationsPlugin package.

- - - -## Implementation - -```dart -late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin; -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/iosFirebaseOptions.md b/talawa-mobile-docs/main/iosFirebaseOptions.md deleted file mode 100644 index a92e5f8da..000000000 --- a/talawa-mobile-docs/main/iosFirebaseOptions.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# iosFirebaseOptions top-level property - - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> iosFirebaseOptions - -_read / write_ - - - -

HashMap of Firebase options for android.

- - - -## Implementation - -```dart -late Map iosFirebaseOptions; -``` - - - - - - - - diff --git a/talawa-mobile-docs/main/main-library.md b/talawa-mobile-docs/main/main-library.md deleted file mode 100644 index 1041a7965..000000000 --- a/talawa-mobile-docs/main/main-library.md +++ /dev/null @@ -1,128 +0,0 @@ - - - - -# main library - - - - - - - - - - - -## Classes - -##### [DemoPageView](../main/DemoPageView-class.md) - - - -PageView is a scrollable list that works page by page. - - -##### [DemoViewModel](../main/DemoViewModel-class.md) - - - -ViewModel uses property-based data binding to establish a connection. - - -##### [MyApp](../main/MyApp-class.md) - - - -Main widget that sets up the quick actions, internationalization, routing , notifications. - - - - - - -## Properties - -##### [androidFirebaseOptions](../main/androidFirebaseOptions.md) ↔ [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - -HashMap of Firebase options for android. -_read / write_ - - - -##### [channel](../main/channel.md) ↔ [AndroidNotificationChannel](https://pub.dev/documentation/flutter_local_notifications/15.1.0+1/flutter_local_notifications/AndroidNotificationChannel-class.html) - - - -Create a AndroidNotificationChannel for heads up notifications. -_read / write_ - - - -##### [flutterLocalNotificationsPlugin](../main/flutterLocalNotificationsPlugin.md) ↔ [FlutterLocalNotificationsPlugin](https://pub.dev/documentation/flutter_local_notifications/15.1.0+1/flutter_local_notifications/FlutterLocalNotificationsPlugin-class.html) - - - -Initialize the FlutterLocalNotificationsPlugin package. -_read / write_ - - - -##### [iosFirebaseOptions](../main/iosFirebaseOptions.md) ↔ [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - -HashMap of Firebase options for android. -_read / write_ - - - - -## Functions - -##### [main](../main/main.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -First function to initialize the application, invoked automatically. - - - - -##### [setUpFirebase](../main/setUpFirebase.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Initializes the firebase in the app according to the userplatform (android/iOS). - - - - -##### [setUpFirebaseKeys](../main/setUpFirebaseKeys.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Initializes the firebase keys in the app according to the userplatform (android/iOS). - - - - -##### [setUpFirebaseMessaging](../main/setUpFirebaseMessaging.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Set up firebase instance, enbables messaging,listens to icoming messages. - - - - - - - - - - - - diff --git a/talawa-mobile-docs/main/main.md b/talawa-mobile-docs/main/main.md deleted file mode 100644 index 457242910..000000000 --- a/talawa-mobile-docs/main/main.md +++ /dev/null @@ -1,95 +0,0 @@ - - - -# main function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> main -() - - - - - -

First function to initialize the application, invoked automatically.

-

params: - None

-

returns:

-
    -
  • Future<void>: resolves if the application was successfully initialized.
  • -
- - - -## Implementation - -```dart -Future main() async { - // Returns an instance of the binding that implements WidgetsBinding. - WidgetsFlutterBinding.ensureInitialized(); - - if (!kIsWeb) { - channel = const AndroidNotificationChannel( - 'high_importance_channel', // id - 'High Importance Notifications', // title - description: - 'This channel is used for important notifications.', // description - importance: Importance.high, - ); - - flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - - // Create an Android Notification Channel. - // We use this channel in the `AndroidManifest.xml` file to override the - // default FCM channel to enable heads up notifications. - await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>() - ?.createNotificationChannel(channel); - } - - final Directory dir = await path.getApplicationDocumentsDirectory(); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - - await Hive.openBox('pluginBox'); - await Hive.openBox('url'); - - final urlBox = await Hive.openBox('url'); - - try { - if (urlBox.get('url') != null) { - await setUpFirebaseKeys(); - - await setUpFirebase(); - await setUpFirebaseMessaging(); - } - } catch (e) { - print("Firebase not working"); - } - - setupLocator(); - // The runApp() function takes the given Widget and makes it the root of the widget tree. - runApp(MyApp()); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/main/setUpFirebase.md b/talawa-mobile-docs/main/setUpFirebase.md deleted file mode 100644 index 91557e294..000000000 --- a/talawa-mobile-docs/main/setUpFirebase.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# setUpFirebase function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setUpFirebase -() - - - - - -

Initializes the firebase in the app according to the userplatform (android/iOS).

-

params: - None

-

returns:

-
    -
  • Future<void>: promise that will be fulfilled Firebase is setted up in app.
  • -
- - - -## Implementation - -```dart -Future setUpFirebase() async { - await Firebase.initializeApp( - options: DefaultFirebaseOptions.currentPlatform( - androidFirebaseOptions, - iosFirebaseOptions, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/main/setUpFirebaseKeys.md b/talawa-mobile-docs/main/setUpFirebaseKeys.md deleted file mode 100644 index ca716d0d6..000000000 --- a/talawa-mobile-docs/main/setUpFirebaseKeys.md +++ /dev/null @@ -1,62 +0,0 @@ - - - -# setUpFirebaseKeys function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setUpFirebaseKeys -() - - - - - -

Initializes the firebase keys in the app according to the userplatform (android/iOS).

-

params: - None

-

returns:

-
    -
  • Future<void>: promise that will be fulfilled Firebase keys are setted up.
  • -
- - - -## Implementation - -```dart -Future setUpFirebaseKeys() async { - final androidFirebaseOptionsBox = - await Hive.openBox('androidFirebaseOptions'); - final androidFirebaseOptionsMap = androidFirebaseOptionsBox - .get('androidFirebaseOptions') as Map?; - - final iosFirebaseOptionsBox = await Hive.openBox('iosFirebaseOptions'); - final iosFirebaseOptionsMap = - iosFirebaseOptionsBox.get('iosFirebaseOptions') as Map?; - if (androidFirebaseOptionsMap != null) { - androidFirebaseOptions = androidFirebaseOptionsMap.map((key, value) { - return MapEntry(key.toString(), value); - }); - } - if (iosFirebaseOptionsMap != null) { - iosFirebaseOptions = iosFirebaseOptionsMap.map((key, value) { - return MapEntry(key.toString(), value); - }); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/main/setUpFirebaseMessaging.md b/talawa-mobile-docs/main/setUpFirebaseMessaging.md deleted file mode 100644 index d28c01b84..000000000 --- a/talawa-mobile-docs/main/setUpFirebaseMessaging.md +++ /dev/null @@ -1,79 +0,0 @@ - - - -# setUpFirebaseMessaging function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setUpFirebaseMessaging -() - - - - - -

Set up firebase instance, enbables messaging,listens to icoming messages.

-

params: - None

-

returns:

-
    -
  • Future<void>: promise that will be fulfilled Firebase is setted up.
  • -
- - - -## Implementation - -```dart -Future setUpFirebaseMessaging() async { - /// Set the background messaging handler early on, as a named top-level function - FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); - - // Update the iOS foreground notification presentation options to allow heads up notifications. - await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( - alert: true, - badge: true, - sound: true, - ); - - FirebaseMessaging.instance - .getInitialMessage() - .then((RemoteMessage? message) {}); - - FirebaseMessaging.onMessage.listen((RemoteMessage message) { - final RemoteNotification? notification = message.notification; - final AndroidNotification? android = message.notification?.android; - if (notification != null && android != null && !kIsWeb) { - flutterLocalNotificationsPlugin.show( - notification.hashCode, - notification.title, - notification.body, - NotificationDetails( - android: AndroidNotificationDetails( - channel.id, - channel.name, - channelDescription: channel.description, - icon: 'launch_background', - ), - ), - ); - } - }); - - FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {}); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md deleted file mode 100644 index 7a107b767..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md +++ /dev/null @@ -1,133 +0,0 @@ - - - -# ChatListTileDataModel class - - - - - - - - - -

This class creates JSON code using the JsonSerializable package.

- - - - - - - - - -**Annotations** - -- @[JsonSerializable](https://pub.dev/documentation/json_annotation/4.8.1/json_annotation/JsonSerializable-class.html)() - - -## Constructors - -[ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.md) ([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatUser](../models_chats_chat_user/ChatUser-class.md)>? users, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id) - - - -[ChatListTileDataModel.fromJson](../models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - _factory_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_chats_chat_list_tile_data_model/ChatListTileDataModel/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [users](../models_chats_chat_list_tile_data_model/ChatListTileDataModel/users.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatUser](../models_chats_chat_user/ChatUser-class.md)>? - - - - -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toJson](../models_chats_chat_list_tile_data_model/ChatListTileDataModel/toJson.md)() [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.fromJson.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.fromJson.md deleted file mode 100644 index c969f9259..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.fromJson.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# ChatListTileDataModel.fromJson constructor - - - - - - - -ChatListTileDataModel.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - - - - -## Implementation - -```dart -factory ChatListTileDataModel.fromJson(Map json) => - _$ChatListTileDataModelFromJson(json); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.md deleted file mode 100644 index ee3832b37..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/ChatListTileDataModel.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ChatListTileDataModel constructor - - - - - - - -ChatListTileDataModel([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatUser](../../models_chats_chat_user/ChatUser-class.md)>? users, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id) - - - - - -## Implementation - -```dart -ChatListTileDataModel(this.users, this.id); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/id.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/id.md deleted file mode 100644 index 833ed271b..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/toJson.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/toJson.md deleted file mode 100644 index 8b766cc4e..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/toJson.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# toJson method - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> toJson -() - - - - - - - - -## Implementation - -```dart -Map toJson() => _$ChatListTileDataModelToJson(this); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/users.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/users.md deleted file mode 100644 index 58ed251cb..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/ChatListTileDataModel/users.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# users property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatUser](../../models_chats_chat_user/ChatUser-class.md)>? users - -_read / write_ - - - - - - -## Implementation - -```dart -List? users; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md b/talawa-mobile-docs/models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md deleted file mode 100644 index 796cc4e88..000000000 --- a/talawa-mobile-docs/models_chats_chat_list_tile_data_model/models_chats_chat_list_tile_data_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_list_tile_data_model library - - - - - - - - - - - -## Classes - -##### [ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md) - - - -This class creates JSON code using the JsonSerializable package. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage-class.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage-class.md deleted file mode 100644 index 4c38ab423..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage-class.md +++ /dev/null @@ -1,151 +0,0 @@ - - - -# ChatMessage class - - - - - - - - - -

This class creates JSON code for chat message using the JsonSerializable package.

- - - - - - - - - -**Annotations** - -- @[JsonSerializable](https://pub.dev/documentation/json_annotation/4.8.1/json_annotation/JsonSerializable-class.html)(explicitToJson: true) - - -## Constructors - -[ChatMessage](../models_chats_chat_message/ChatMessage/ChatMessage.md) ([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [ChatUser](../models_chats_chat_user/ChatUser-class.md)? sender, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? messageContent, [ChatUser](../models_chats_chat_user/ChatUser-class.md)? receiver) - - - -[ChatMessage.fromJson](../models_chats_chat_message/ChatMessage/ChatMessage.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - _factory_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_chats_chat_message/ChatMessage/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [messageContent](../models_chats_chat_message/ChatMessage/messageContent.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [receiver](../models_chats_chat_message/ChatMessage/receiver.md) ↔ [ChatUser](../models_chats_chat_user/ChatUser-class.md)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [sender](../models_chats_chat_message/ChatMessage/sender.md) ↔ [ChatUser](../models_chats_chat_user/ChatUser-class.md)? - - - - -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toJson](../models_chats_chat_message/ChatMessage/toJson.md)() [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.fromJson.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.fromJson.md deleted file mode 100644 index 514060af9..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.fromJson.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# ChatMessage.fromJson constructor - - - - - - - -ChatMessage.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - - - - -## Implementation - -```dart -factory ChatMessage.fromJson(Map json) => - _$ChatMessageFromJson(json); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.md deleted file mode 100644 index 78e85c05d..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/ChatMessage.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# ChatMessage constructor - - - - - - - -ChatMessage([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [ChatUser](../../models_chats_chat_user/ChatUser-class.md)? sender, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? messageContent, [ChatUser](../../models_chats_chat_user/ChatUser-class.md)? receiver) - - - - - -## Implementation - -```dart -ChatMessage( - this.id, - this.sender, - this.messageContent, - this.receiver, -); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/id.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/id.md deleted file mode 100644 index 833ed271b..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/messageContent.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/messageContent.md deleted file mode 100644 index 372a20d7a..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/messageContent.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# messageContent property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? messageContent - -_read / write_ - - - - - - -## Implementation - -```dart -String? messageContent; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/receiver.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/receiver.md deleted file mode 100644 index 7887b8cf4..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/receiver.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# receiver property - - - - - - - -[ChatUser](../../models_chats_chat_user/ChatUser-class.md)? receiver - -_read / write_ - - - - - - -## Implementation - -```dart -ChatUser? receiver; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/sender.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/sender.md deleted file mode 100644 index 4b8806efb..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/sender.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# sender property - - - - - - - -[ChatUser](../../models_chats_chat_user/ChatUser-class.md)? sender - -_read / write_ - - - - - - -## Implementation - -```dart -ChatUser? sender; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/toJson.md b/talawa-mobile-docs/models_chats_chat_message/ChatMessage/toJson.md deleted file mode 100644 index 0f7c47e94..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/ChatMessage/toJson.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# toJson method - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> toJson -() - - - - - - - - -## Implementation - -```dart -Map toJson() => _$ChatMessageToJson(this); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_message/models_chats_chat_message-library.md b/talawa-mobile-docs/models_chats_chat_message/models_chats_chat_message-library.md deleted file mode 100644 index b21336f76..000000000 --- a/talawa-mobile-docs/models_chats_chat_message/models_chats_chat_message-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_message library - - - - - - - - - - - -## Classes - -##### [ChatMessage](../models_chats_chat_message/ChatMessage-class.md) - - - -This class creates JSON code for chat message using the JsonSerializable package. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser-class.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser-class.md deleted file mode 100644 index 18020e727..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser-class.md +++ /dev/null @@ -1,142 +0,0 @@ - - - -# ChatUser class - - - - - - - - - -

This class creates JSON code for chat user using the JsonSerializable package.

- - - - - - - - - -**Annotations** - -- @[JsonSerializable](https://pub.dev/documentation/json_annotation/4.8.1/json_annotation/JsonSerializable-class.html)() - - -## Constructors - -[ChatUser](../models_chats_chat_user/ChatUser/ChatUser.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image}) - - - -[ChatUser.fromJson](../models_chats_chat_user/ChatUser/ChatUser.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - _factory_ - - -## Properties - -##### [firstName](../models_chats_chat_user/ChatUser/firstName.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_chats_chat_user/ChatUser/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [image](../models_chats_chat_user/ChatUser/image.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toJson](../models_chats_chat_user/ChatUser/toJson.md)() [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.fromJson.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.fromJson.md deleted file mode 100644 index 4283c825f..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.fromJson.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# ChatUser.fromJson constructor - - - - - - - -ChatUser.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - - - - -## Implementation - -```dart -factory ChatUser.fromJson(Map json) => - _$ChatUserFromJson(json); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.md deleted file mode 100644 index 5b6db09b4..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/ChatUser.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ChatUser constructor - - - - - - - -ChatUser({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image}) - - - - - -## Implementation - -```dart -ChatUser({this.firstName, this.id, this.image}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/firstName.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/firstName.md deleted file mode 100644 index 0fbc84727..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/firstName.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# firstName property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName - -_read / write_ - - - - - - -## Implementation - -```dart -String? firstName; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/id.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/id.md deleted file mode 100644 index 833ed271b..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/image.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/image.md deleted file mode 100644 index db1007542..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/image.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# image property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image - -_read / write_ - - - - - - -## Implementation - -```dart -String? image; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/ChatUser/toJson.md b/talawa-mobile-docs/models_chats_chat_user/ChatUser/toJson.md deleted file mode 100644 index 8c0124f88..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/ChatUser/toJson.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# toJson method - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> toJson -() - - - - - - - - -## Implementation - -```dart -Map toJson() => _$ChatUserToJson(this); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_chats_chat_user/models_chats_chat_user-library.md b/talawa-mobile-docs/models_chats_chat_user/models_chats_chat_user-library.md deleted file mode 100644 index 793e8e89e..000000000 --- a/talawa-mobile-docs/models_chats_chat_user/models_chats_chat_user-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_user library - - - - - - - - - - - -## Classes - -##### [ChatUser](../models_chats_chat_user/ChatUser-class.md) - - - -This class creates JSON code for chat user using the JsonSerializable package. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment-class.md b/talawa-mobile-docs/models_comment_comment_model/Comment-class.md deleted file mode 100644 index e00460d30..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment-class.md +++ /dev/null @@ -1,141 +0,0 @@ - - - -# Comment class - - - - - - - - - -

This class returns a Comment instance.

- - - - -## Constructors - -[Comment](../models_comment_comment_model/Comment/Comment.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? text, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? createdAt, [User](../models_user_user_info/User-class.md)? creator, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? post, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? likeCount}) - - - -[Comment.fromJson](../models_comment_comment_model/Comment/Comment.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - _factory_ - - -## Properties - -##### [createdAt](../models_comment_comment_model/Comment/createdAt.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [creator](../models_comment_comment_model/Comment/creator.md) ↔ [User](../models_user_user_info/User-class.md)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [likeCount](../models_comment_comment_model/Comment/likeCount.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [post](../models_comment_comment_model/Comment/post.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [text](../models_comment_comment_model/Comment/text.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.fromJson.md b/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.fromJson.md deleted file mode 100644 index 15a902170..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.fromJson.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# Comment.fromJson constructor - - - - - - - -Comment.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - - - - -## Implementation - -```dart -factory Comment.fromJson(Map json) { - return Comment( - text: json['text'] as String?, - createdAt: json['createdAt'] as String?, - creator: json['creator'] == null - ? null - //Creating a new User instance from a map structure. - : User.fromJson( - json['creator'] as Map, - fromOrg: true, - ), - post: json['post'] as String?, - likeCount: json['likeCount'] as String?, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.md b/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.md deleted file mode 100644 index 120962bcc..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/Comment.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# Comment constructor - - - - - - - -Comment({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? text, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? createdAt, [User](../../models_user_user_info/User-class.md)? creator, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? post, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? likeCount}) - - - - - -## Implementation - -```dart -Comment({this.text, this.createdAt, this.creator, this.post, this.likeCount}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/createdAt.md b/talawa-mobile-docs/models_comment_comment_model/Comment/createdAt.md deleted file mode 100644 index 6f4a3a12e..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/createdAt.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# createdAt property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? createdAt - -_read / write_ - - - - - - -## Implementation - -```dart -String? createdAt; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/creator.md b/talawa-mobile-docs/models_comment_comment_model/Comment/creator.md deleted file mode 100644 index 8dcdc334b..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/creator.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# creator property - - - - - - - -[User](../../models_user_user_info/User-class.md)? creator - -_read / write_ - - - - - - -## Implementation - -```dart -User? creator; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/likeCount.md b/talawa-mobile-docs/models_comment_comment_model/Comment/likeCount.md deleted file mode 100644 index d4ba33db5..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/likeCount.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# likeCount property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? likeCount - -_read / write_ - - - - - - -## Implementation - -```dart -String? likeCount; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/post.md b/talawa-mobile-docs/models_comment_comment_model/Comment/post.md deleted file mode 100644 index 60ba62c80..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/post.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# post property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? post - -_read / write_ - - - - - - -## Implementation - -```dart -String? post; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/Comment/text.md b/talawa-mobile-docs/models_comment_comment_model/Comment/text.md deleted file mode 100644 index 3e3c81333..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/Comment/text.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# text property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? text - -_read / write_ - - - - - - -## Implementation - -```dart -String? text; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_comment_comment_model/models_comment_comment_model-library.md b/talawa-mobile-docs/models_comment_comment_model/models_comment_comment_model-library.md deleted file mode 100644 index 85d3df1ba..000000000 --- a/talawa-mobile-docs/models_comment_comment_model/models_comment_comment_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# comment_model library - - - - - - - - - - - -## Classes - -##### [Comment](../models_comment_comment_model/Comment-class.md) - - - -This class returns a Comment instance. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event-class.md b/talawa-mobile-docs/models_events_event_model/Event-class.md deleted file mode 100644 index 0ab22c2ff..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event-class.md +++ /dev/null @@ -1,285 +0,0 @@ - - - -# Event class - - - - - - - - - -

This class creates an event model and returns an Event instance.

- - - - -## Constructors - -[Event](../models_events_event_model/Event/Event.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? title, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? attendees, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? location, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? latitude, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? longitude, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? recurring, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? allDay, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startDate, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endDate, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startTime, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endTime, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? recurrence, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegistered, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegisterable, [User](../models_user_user_info/User-class.md)? creator, [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? organization, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? admins, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? registrants}) - - - -[Event.fromJson](../models_events_event_model/Event/Event.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - _factory_ - - -## Properties - -##### [admins](../models_events_event_model/Event/admins.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? - - - - -_read / write_ - - - -##### [allDay](../models_events_event_model/Event/allDay.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [attendees](../models_events_event_model/Event/attendees.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [creator](../models_events_event_model/Event/creator.md) ↔ [User](../models_user_user_info/User-class.md)? - - - - -_read / write_ - - - -##### [description](../models_events_event_model/Event/description.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [endDate](../models_events_event_model/Event/endDate.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [endTime](../models_events_event_model/Event/endTime.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_events_event_model/Event/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [isPublic](../models_events_event_model/Event/isPublic.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [isRegisterable](../models_events_event_model/Event/isRegisterable.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [isRegistered](../models_events_event_model/Event/isRegistered.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [latitude](../models_events_event_model/Event/latitude.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [location](../models_events_event_model/Event/location.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [longitude](../models_events_event_model/Event/longitude.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [organization](../models_events_event_model/Event/organization.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? - - - - -_read / write_ - - - -##### [recurrence](../models_events_event_model/Event/recurrence.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [recurring](../models_events_event_model/Event/recurring.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [registrants](../models_events_event_model/Event/registrants.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [startDate](../models_events_event_model/Event/startDate.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [startTime](../models_events_event_model/Event/startTime.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [title](../models_events_event_model/Event/title.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/Event.fromJson.md b/talawa-mobile-docs/models_events_event_model/Event/Event.fromJson.md deleted file mode 100644 index 9a7ea61a0..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/Event.fromJson.md +++ /dev/null @@ -1,72 +0,0 @@ - - - -# Event.fromJson constructor - - - - - - - -Event.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - - - - -## Implementation - -```dart -factory Event.fromJson( - Map json, -) { - return Event( - id: json['_id'] as String, - title: json['title'] as String?, - description: json['description'] as String?, - attendees: json['attendees'] as String?, - location: json['location'] as String?, - longitude: json['longitude'] as double?, - latitude: json['latitude'] as double?, - recurring: json['recurring'] as bool?, - allDay: json['allDay'] as bool?, - startDate: json['startDate'] as String?, - endDate: json['endDate'] as String?, - startTime: json['startTime'] as String?, - endTime: json['endTime'] as String?, - recurrence: json['recurrence'] as String?, - isPublic: json['isPublic'] as bool?, - isRegistered: json['isRegistered'] as bool?, - isRegisterable: json['isRegisterable'] as bool?, - creator: json['creator'] == null - ? null - //Creating a new User instance from a map structure. - : User.fromJson( - json['creator'] as Map, - fromOrg: true, - ), - organization: json['organization'] == null - ? null - //Creating a new OrgInfo instance from a map structure. - : OrgInfo.fromJson(json['organization'] as Map), - admins: json['admins'] == null - ? null - : (json['admins'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList(), - registrants: (json['registrants'] as List?) - ?.map((e) => User.fromJson(e as Map, fromOrg: false)) - .toList(), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/Event.md b/talawa-mobile-docs/models_events_event_model/Event/Event.md deleted file mode 100644 index 399d73b89..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/Event.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# Event constructor - - - - - - - -Event({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? title, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? attendees, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? location, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? latitude, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? longitude, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? recurring, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? allDay, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startDate, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endDate, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startTime, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endTime, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? recurrence, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegistered, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegisterable, [User](../../models_user_user_info/User-class.md)? creator, [OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? organization, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? admins, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? registrants}) - - - - - -## Implementation - -```dart -Event({ - this.id, - this.title, - this.description, - this.attendees, - this.location, - this.latitude, - this.longitude, - this.recurring, - this.allDay, - this.startDate, - this.endDate, - this.startTime, - this.endTime, - this.recurrence, - this.isPublic, - this.isRegistered, - this.isRegisterable, - this.creator, - this.organization, - this.admins, - this.registrants, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/admins.md b/talawa-mobile-docs/models_events_event_model/Event/admins.md deleted file mode 100644 index d97a3be09..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/admins.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# admins property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? admins - -_read / write_ - - - - - - -## Implementation - -```dart -List? admins; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/allDay.md b/talawa-mobile-docs/models_events_event_model/Event/allDay.md deleted file mode 100644 index 630774560..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/allDay.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# allDay property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? allDay - -_read / write_ - - - - - - -## Implementation - -```dart -bool? allDay; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/attendees.md b/talawa-mobile-docs/models_events_event_model/Event/attendees.md deleted file mode 100644 index 203b6c667..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/attendees.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# attendees property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? attendees - -_read / write_ - - - - - - -## Implementation - -```dart -String? attendees; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/creator.md b/talawa-mobile-docs/models_events_event_model/Event/creator.md deleted file mode 100644 index 8dcdc334b..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/creator.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# creator property - - - - - - - -[User](../../models_user_user_info/User-class.md)? creator - -_read / write_ - - - - - - -## Implementation - -```dart -User? creator; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/description.md b/talawa-mobile-docs/models_events_event_model/Event/description.md deleted file mode 100644 index 274483eb8..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/description.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# description property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description - -_read / write_ - - - - - - -## Implementation - -```dart -String? description; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/endDate.md b/talawa-mobile-docs/models_events_event_model/Event/endDate.md deleted file mode 100644 index 71cdad30e..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/endDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# endDate property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endDate - -_read / write_ - - - - - - -## Implementation - -```dart -String? endDate; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/endTime.md b/talawa-mobile-docs/models_events_event_model/Event/endTime.md deleted file mode 100644 index b494d8a61..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/endTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# endTime property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? endTime - -_read / write_ - - - - - - -## Implementation - -```dart -String? endTime; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/id.md b/talawa-mobile-docs/models_events_event_model/Event/id.md deleted file mode 100644 index 833ed271b..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/isPublic.md b/talawa-mobile-docs/models_events_event_model/Event/isPublic.md deleted file mode 100644 index 115e149ff..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/isPublic.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isPublic property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic - -_read / write_ - - - - - - -## Implementation - -```dart -bool? isPublic; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/isRegisterable.md b/talawa-mobile-docs/models_events_event_model/Event/isRegisterable.md deleted file mode 100644 index 80a87ac5d..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/isRegisterable.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isRegisterable property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegisterable - -_read / write_ - - - - - - -## Implementation - -```dart -bool? isRegisterable; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/isRegistered.md b/talawa-mobile-docs/models_events_event_model/Event/isRegistered.md deleted file mode 100644 index 0b7abce17..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/isRegistered.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isRegistered property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isRegistered - -_read / write_ - - - - - - -## Implementation - -```dart -bool? isRegistered; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/latitude.md b/talawa-mobile-docs/models_events_event_model/Event/latitude.md deleted file mode 100644 index 0f6aa819f..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/latitude.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# latitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? latitude - -_read / write_ - - - - - - -## Implementation - -```dart -double? latitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/location.md b/talawa-mobile-docs/models_events_event_model/Event/location.md deleted file mode 100644 index d2fde2690..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/location.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# location property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? location - -_read / write_ - - - - - - -## Implementation - -```dart -String? location; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/longitude.md b/talawa-mobile-docs/models_events_event_model/Event/longitude.md deleted file mode 100644 index 0b3b00660..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/longitude.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# longitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? longitude - -_read / write_ - - - - - - -## Implementation - -```dart -double? longitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/organization.md b/talawa-mobile-docs/models_events_event_model/Event/organization.md deleted file mode 100644 index 8138745ec..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/organization.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# organization property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? organization - -_read / write_ - - - - - - -## Implementation - -```dart -OrgInfo? organization; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/recurrence.md b/talawa-mobile-docs/models_events_event_model/Event/recurrence.md deleted file mode 100644 index 95763e6de..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/recurrence.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# recurrence property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? recurrence - -_read / write_ - - - - - - -## Implementation - -```dart -String? recurrence; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/recurring.md b/talawa-mobile-docs/models_events_event_model/Event/recurring.md deleted file mode 100644 index b9223bf40..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/recurring.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# recurring property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? recurring - -_read / write_ - - - - - - -## Implementation - -```dart -bool? recurring; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/registrants.md b/talawa-mobile-docs/models_events_event_model/Event/registrants.md deleted file mode 100644 index 77c0d2342..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/registrants.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# registrants property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? registrants - -_read / write_ - - - - - - -## Implementation - -```dart -List? registrants; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/startDate.md b/talawa-mobile-docs/models_events_event_model/Event/startDate.md deleted file mode 100644 index a3a268368..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/startDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# startDate property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startDate - -_read / write_ - - - - - - -## Implementation - -```dart -String? startDate; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/startTime.md b/talawa-mobile-docs/models_events_event_model/Event/startTime.md deleted file mode 100644 index 45d78625a..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/startTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# startTime property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? startTime - -_read / write_ - - - - - - -## Implementation - -```dart -String? startTime; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/Event/title.md b/talawa-mobile-docs/models_events_event_model/Event/title.md deleted file mode 100644 index 79dd02590..000000000 --- a/talawa-mobile-docs/models_events_event_model/Event/title.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# title property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? title - -_read / write_ - - - - - - -## Implementation - -```dart -String? title; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_events_event_model/models_events_event_model-library.md b/talawa-mobile-docs/models_events_event_model/models_events_event_model-library.md deleted file mode 100644 index 2ccf09efa..000000000 --- a/talawa-mobile-docs/models_events_event_model/models_events_event_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_model library - - - - - - - - - - - -## Classes - -##### [Event](../models_events_event_model/Event-class.md) - - - -This class creates an event model and returns an Event instance. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language-class.md b/talawa-mobile-docs/models_language_language_model/Language-class.md deleted file mode 100644 index b17705b6b..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language-class.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# Language class - - - - - - - - - -

This class creates an langauge model.

- - - - -## Constructors - -[Language](../models_language_language_model/Language/Language.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) countryCode, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langCode, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langName, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langSample}) - - - - -## Properties - -##### [countryCode](../models_language_language_model/Language/countryCode.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [langCode](../models_language_language_model/Language/langCode.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [langName](../models_language_language_model/Language/langName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [langSample](../models_language_language_model/Language/langSample.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language/Language.md b/talawa-mobile-docs/models_language_language_model/Language/Language.md deleted file mode 100644 index 04c52d10b..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language/Language.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# Language constructor - - - - - - - -Language({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) countryCode, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langCode, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langName, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) langSample}) - - - - - -## Implementation - -```dart -Language({ - required this.countryCode, - required this.langCode, - required this.langName, - required this.langSample, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language/countryCode.md b/talawa-mobile-docs/models_language_language_model/Language/countryCode.md deleted file mode 100644 index c832d751b..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language/countryCode.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# countryCode property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) countryCode - -_final_ - - - - - - -## Implementation - -```dart -final String countryCode; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language/langCode.md b/talawa-mobile-docs/models_language_language_model/Language/langCode.md deleted file mode 100644 index e6ca157cf..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language/langCode.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# langCode property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) langCode - -_final_ - - - - - - -## Implementation - -```dart -final String langCode; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language/langName.md b/talawa-mobile-docs/models_language_language_model/Language/langName.md deleted file mode 100644 index 95636992c..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language/langName.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# langName property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) langName - -_final_ - - - - - - -## Implementation - -```dart -final String langName; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/Language/langSample.md b/talawa-mobile-docs/models_language_language_model/Language/langSample.md deleted file mode 100644 index 0dbe17a12..000000000 --- a/talawa-mobile-docs/models_language_language_model/Language/langSample.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# langSample property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) langSample - -_final_ - - - - - - -## Implementation - -```dart -final String langSample; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_language_language_model/models_language_language_model-library.md b/talawa-mobile-docs/models_language_language_model/models_language_language_model-library.md deleted file mode 100644 index 72573e5ab..000000000 --- a/talawa-mobile-docs/models_language_language_model/models_language_language_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# language_model library - - - - - - - - - - - -## Classes - -##### [Language](../models_language_language_model/Language-class.md) - - - -This class creates an langauge model. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs-class.md b/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs-class.md deleted file mode 100644 index f6a0d3d74..000000000 --- a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs-class.md +++ /dev/null @@ -1,109 +0,0 @@ - - - -# MainScreenArgs class - - - - - - - - - - - - - -## Constructors - -[MainScreenArgs](../models_mainscreen_navigation_args/MainScreenArgs/MainScreenArgs.md) ({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromSignUp = false, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex}) - - - - -## Properties - -##### [fromSignUp](../models_mainscreen_navigation_args/MainScreenArgs/fromSignUp.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [mainScreenIndex](../models_mainscreen_navigation_args/MainScreenArgs/mainScreenIndex.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/MainScreenArgs.md b/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/MainScreenArgs.md deleted file mode 100644 index 7e83ed6f2..000000000 --- a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/MainScreenArgs.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# MainScreenArgs constructor - - - - - - - -MainScreenArgs({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromSignUp = false, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex}) - - - - - -## Implementation - -```dart -MainScreenArgs({this.fromSignUp = false, required this.mainScreenIndex}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/fromSignUp.md b/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/fromSignUp.md deleted file mode 100644 index 65dbae94c..000000000 --- a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/fromSignUp.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# fromSignUp property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromSignUp - -_final_ - - - - - - -## Implementation - -```dart -final bool fromSignUp; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/mainScreenIndex.md b/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/mainScreenIndex.md deleted file mode 100644 index 570058a34..000000000 --- a/talawa-mobile-docs/models_mainscreen_navigation_args/MainScreenArgs/mainScreenIndex.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# mainScreenIndex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex - -_final_ - - - - - - -## Implementation - -```dart -final int mainScreenIndex; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md b/talawa-mobile-docs/models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md deleted file mode 100644 index d14163037..000000000 --- a/talawa-mobile-docs/models_mainscreen_navigation_args/models_mainscreen_navigation_args-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# mainscreen_navigation_args library - - - - - - - - - - - -## Classes - -##### [MainScreenArgs](../models_mainscreen_navigation_args/MainScreenArgs-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options-class.md b/talawa-mobile-docs/models_options_options/Options-class.md deleted file mode 100644 index f5c9eabca..000000000 --- a/talawa-mobile-docs/models_options_options/Options-class.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# Options class - - - - - - - - - -

This class creates a Option model.

- - - - -## Constructors - -[Options](../models_options_options/Options/Options.md) ({required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) subtitle, [IconButton](https://api.flutter.dev/flutter/material/IconButton-class.html)? trailingIconButton}) - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [icon](../models_options_options/Options/icon.md) ↔ [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [subtitle](../models_options_options/Options/subtitle.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [title](../models_options_options/Options/title.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [trailingIconButton](../models_options_options/Options/trailingIconButton.md) ↔ [IconButton](https://api.flutter.dev/flutter/material/IconButton-class.html)? - - - - -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options/Options.md b/talawa-mobile-docs/models_options_options/Options/Options.md deleted file mode 100644 index ec36ee551..000000000 --- a/talawa-mobile-docs/models_options_options/Options/Options.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# Options constructor - - - - - - - -Options({required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) subtitle, [IconButton](https://api.flutter.dev/flutter/material/IconButton-class.html)? trailingIconButton}) - - - - - -## Implementation - -```dart -Options({ - required this.icon, - required this.title, - required this.subtitle, - this.trailingIconButton, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options/icon.md b/talawa-mobile-docs/models_options_options/Options/icon.md deleted file mode 100644 index 4e9035472..000000000 --- a/talawa-mobile-docs/models_options_options/Options/icon.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# icon property - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon - -_read / write_ - - - - - - -## Implementation - -```dart -Widget icon; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options/subtitle.md b/talawa-mobile-docs/models_options_options/Options/subtitle.md deleted file mode 100644 index 49c653f7e..000000000 --- a/talawa-mobile-docs/models_options_options/Options/subtitle.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# subtitle property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) subtitle - -_read / write_ - - - - - - -## Implementation - -```dart -String subtitle; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options/title.md b/talawa-mobile-docs/models_options_options/Options/title.md deleted file mode 100644 index 7f3fec8c9..000000000 --- a/talawa-mobile-docs/models_options_options/Options/title.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# title property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) title - -_read / write_ - - - - - - -## Implementation - -```dart -String title; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/Options/trailingIconButton.md b/talawa-mobile-docs/models_options_options/Options/trailingIconButton.md deleted file mode 100644 index d9b9f553f..000000000 --- a/talawa-mobile-docs/models_options_options/Options/trailingIconButton.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# trailingIconButton property - - - - - - - -[IconButton](https://api.flutter.dev/flutter/material/IconButton-class.html)? trailingIconButton - -_read / write_ - - - - - - -## Implementation - -```dart -IconButton? trailingIconButton; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_options_options/models_options_options-library.md b/talawa-mobile-docs/models_options_options/models_options_options-library.md deleted file mode 100644 index 259ad5747..000000000 --- a/talawa-mobile-docs/models_options_options/models_options_options-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# options library - - - - - - - - - - - -## Classes - -##### [Options](../models_options_options/Options-class.md) - - - -This class creates a Option model. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo-class.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo-class.md deleted file mode 100644 index 2be8742b9..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo-class.md +++ /dev/null @@ -1,187 +0,0 @@ - - - -# OrgInfo class - - - - - - - - - -

This class creates an organization-information model and returns an OrgInfo instance.

- - - - - - - - - -**Annotations** - -- @[HiveType](https://pub.dev/documentation/hive/2.2.3/hive/HiveType-class.html)(typeId: 2) - - -## Constructors - -[OrgInfo](../models_organization_org_info/OrgInfo/OrgInfo.md) ({[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? admins, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? members, [User](../models_user_user_info/User-class.md)? creatorInfo, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name}) - - - -[OrgInfo.fromJson](../models_organization_org_info/OrgInfo/OrgInfo.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json1, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) memberRequest = false}) - - _factory_ - - -## Properties - -##### [admins](../models_organization_org_info/OrgInfo/admins.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? - - - - -_read / write_ - - - -##### [creatorInfo](../models_organization_org_info/OrgInfo/creatorInfo.md) ↔ [User](../models_user_user_info/User-class.md)? - - - - -_read / write_ - - - -##### [description](../models_organization_org_info/OrgInfo/description.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_organization_org_info/OrgInfo/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [image](../models_organization_org_info/OrgInfo/image.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [isPublic](../models_organization_org_info/OrgInfo/isPublic.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - - -_read / write_ - - - -##### [members](../models_organization_org_info/OrgInfo/members.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>? - - - - -_read / write_ - - - -##### [name](../models_organization_org_info/OrgInfo/name.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [fromJsonToList](../models_organization_org_info/OrgInfo/fromJsonToList.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html) json) [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.fromJson.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.fromJson.md deleted file mode 100644 index 45cbc5eae..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.fromJson.md +++ /dev/null @@ -1,67 +0,0 @@ - - - -# OrgInfo.fromJson constructor - - - - - - - -OrgInfo.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json1, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) memberRequest = false}) - - - - - -## Implementation - -```dart -factory OrgInfo.fromJson( - Map json1, { - bool memberRequest = false, -}) { - Map json; - if (memberRequest) { - json = json1['organization'] as Map; - } else { - json = json1; - } - return OrgInfo( - id: json['_id'] != null ? json['_id'] as String : null, - image: json['image'] != null ? json['image'] as String? : null, - name: json['name'] != null ? json['name'] as String? : null, - description: - json['description'] != null ? json['description'] as String? : null, - isPublic: json['isPublic'] != null ? json['isPublic'] as bool? : null, - creatorInfo: json['creator'] != null - ? User.fromJson( - json['creator'] as Map, - fromOrg: true, - ) - : null, - members: json['members'] != null - ? (json['members'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList() - : null, - admins: json['admins'] != null - ? (json['admins'] as List?) - ?.map( - (e) => User.fromJson(e as Map, fromOrg: true), - ) - .toList() - : null, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.md deleted file mode 100644 index ec3cdccb2..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/OrgInfo.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# OrgInfo constructor - - - - - - - -OrgInfo({[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? admins, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? members, [User](../../models_user_user_info/User-class.md)? creatorInfo, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name}) - - - - - -## Implementation - -```dart -OrgInfo({ - this.admins, - this.members, - this.creatorInfo, - this.description, - this.id, - this.image, - this.isPublic, - this.name, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/admins.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/admins.md deleted file mode 100644 index ed855ec72..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/admins.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# admins property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(3) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? admins - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(3) -List? admins; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/creatorInfo.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/creatorInfo.md deleted file mode 100644 index 96f589033..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/creatorInfo.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# creatorInfo property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(7) -[User](../../models_user_user_info/User-class.md)? creatorInfo - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(7) -User? creatorInfo; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/description.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/description.md deleted file mode 100644 index 0dd524bef..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/description.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# description property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(5) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(5) -String? description; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/fromJsonToList.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/fromJsonToList.md deleted file mode 100644 index f675364e6..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/fromJsonToList.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# fromJsonToList method - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> fromJsonToList -([List](https://api.flutter.dev/flutter/dart-core/List-class.html) json) - - - - - - - - -## Implementation - -```dart -List fromJsonToList(List json) { - final List orgList = []; - json.forEach((element) { - final OrgInfo org = OrgInfo.fromJson(element as Map); - orgList.add(org); - }); - return orgList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/id.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/id.md deleted file mode 100644 index 41593eb6c..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/id.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# id property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(1) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(1) -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/image.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/image.md deleted file mode 100644 index 307a6d894..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/image.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# image property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(0) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(0) -String? image; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/isPublic.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/isPublic.md deleted file mode 100644 index 2ab544f2a..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/isPublic.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# isPublic property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(6) -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? isPublic - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(6) -bool? isPublic; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/members.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/members.md deleted file mode 100644 index 0613169d6..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/members.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# members property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(4) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>? members - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(4) -List? members; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfo/name.md b/talawa-mobile-docs/models_organization_org_info/OrgInfo/name.md deleted file mode 100644 index e69ccaed4..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfo/name.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# name property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(2) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(2) -String? name; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter-class.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter-class.md deleted file mode 100644 index 159351022..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter-class.md +++ /dev/null @@ -1,130 +0,0 @@ - - - -# OrgInfoAdapter class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [TypeAdapter](https://pub.dev/documentation/hive/2.2.3/hive/TypeAdapter-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> -- OrgInfoAdapter - - - - - - - - -## Constructors - -[OrgInfoAdapter](../models_organization_org_info/OrgInfoAdapter/OrgInfoAdapter.md) () - - - - -## Properties - -##### [hashCode](../models_organization_org_info/OrgInfoAdapter/hashCode.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyoverride_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [typeId](../models_organization_org_info/OrgInfoAdapter/typeId.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -Called for type registration -_final_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [read](../models_organization_org_info/OrgInfoAdapter/read.md)([BinaryReader](https://pub.dev/documentation/hive/2.2.3/hive/BinaryReader-class.html) reader) [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - -Is called when a value has to be decoded. -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [write](../models_organization_org_info/OrgInfoAdapter/write.md)([BinaryWriter](https://pub.dev/documentation/hive/2.2.3/hive/BinaryWriter-class.html) writer, [OrgInfo](../models_organization_org_info/OrgInfo-class.md) obj) void - - - -Is called when a value has to be encoded. -_override_ - - - - - -## Operators - -##### [operator ==](../models_organization_org_info/OrgInfoAdapter/operator_equals.md)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_override_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/OrgInfoAdapter.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/OrgInfoAdapter.md deleted file mode 100644 index 82ac945fd..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/OrgInfoAdapter.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# OrgInfoAdapter constructor - - - - - - - -OrgInfoAdapter() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/hashCode.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/hashCode.md deleted file mode 100644 index 3f59c03a5..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/hashCode.md +++ /dev/null @@ -1,65 +0,0 @@ - - - -# hashCode property - - - - - - - - - -**Annotations** - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) hashCode - -_override_ - - - -

The hash code for this object.

-

A hash code is a single integer which represents the state of the object -that affects operator == comparisons.

-

All objects have hash codes. -The default hash code implemented by Object -represents only the identity of the object, -the same way as the default operator == implementation only considers objects -equal if they are identical (see identityHashCode).

-

If operator == is overridden to use the object state instead, -the hash code must also be changed to represent that state, -otherwise the object cannot be used in hash based data structures -like the default Set and Map implementations.

-

Hash codes must be the same for objects that are equal to each other -according to operator ==. -The hash code of an object should only change if the object changes -in a way that affects equality. -There are no further requirements for the hash codes. -They need not be consistent between executions of the same program -and there are no distribution guarantees.

-

Objects that are not equal are allowed to have the same hash code. -It is even technically allowed that all instances have the same hash code, -but if clashes happen too often, -it may reduce the efficiency of hash-based data structures -like HashSet or HashMap.

-

If a subclass overrides hashCode, it should override the -operator == operator as well to maintain consistency.

- - - -## Implementation - -```dart -@override -int get hashCode => typeId.hashCode; -``` - - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/operator_equals.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/operator_equals.md deleted file mode 100644 index 5a89901e1..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/operator_equals.md +++ /dev/null @@ -1,67 +0,0 @@ - - - -# operator == method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) operator == -([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) - -_override_ - - - -

The equality operator.

-

The default behavior for all Objects is to return true if and -only if this object and other are the same object.

-

Override this method to specify a different equality relation on -a class. The overriding method must still be an equivalence relation. -That is, it must be:

-
    -
  • -

    Total: It must return a boolean for all arguments. It should never throw.

    -
  • -
  • -

    Reflexive: For all objects o, o == o must be true.

    -
  • -
  • -

    Symmetric: For all objects o1 and o2, o1 == o2 and o2 == o1 must -either both be true, or both be false.

    -
  • -
  • -

    Transitive: For all objects o1, o2, and o3, if o1 == o2 and -o2 == o3 are true, then o1 == o3 must be true.

    -
  • -
-

The method should also be consistent over time, -so whether two objects are equal should only change -if at least one of the objects was modified.

-

If a subclass overrides the equality operator, it should override -the hashCode method as well to maintain consistency.

- - - -## Implementation - -```dart -@override -bool operator ==(Object other) => - identical(this, other) || - other is OrgInfoAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/read.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/read.md deleted file mode 100644 index 730b1101e..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/read.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# read method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) read -([BinaryReader](https://pub.dev/documentation/hive/2.2.3/hive/BinaryReader-class.html) reader) - -_override_ - - - -

Is called when a value has to be decoded.

- - - -## Implementation - -```dart -@override -OrgInfo read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return OrgInfo( - admins: (fields[3] as List?)?.cast(), - members: (fields[4] as List?)?.cast(), - creatorInfo: fields[7] as User?, - description: fields[5] as String?, - id: fields[1] as String?, - image: fields[0] as String?, - isPublic: fields[6] as bool?, - name: fields[2] as String?, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/typeId.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/typeId.md deleted file mode 100644 index 185e25a2c..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/typeId.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# typeId property - - - - - - - -**Annotations** - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) typeId - -_final_ - - - -

Called for type registration

- - - -## Implementation - -```dart -@override -final int typeId = 2; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/write.md b/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/write.md deleted file mode 100644 index 65e6d9ac0..000000000 --- a/talawa-mobile-docs/models_organization_org_info/OrgInfoAdapter/write.md +++ /dev/null @@ -1,56 +0,0 @@ - - - -# write method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void write -([BinaryWriter](https://pub.dev/documentation/hive/2.2.3/hive/BinaryWriter-class.html) writer, [OrgInfo](../../models_organization_org_info/OrgInfo-class.md) obj) - -_override_ - - - -

Is called when a value has to be encoded.

- - - -## Implementation - -```dart -@override -void write(BinaryWriter writer, OrgInfo obj) { - writer - ..writeByte(8) - ..writeByte(0) - ..write(obj.image) - ..writeByte(1) - ..write(obj.id) - ..writeByte(2) - ..write(obj.name) - ..writeByte(3) - ..write(obj.admins) - ..writeByte(4) - ..write(obj.members) - ..writeByte(5) - ..write(obj.description) - ..writeByte(6) - ..write(obj.isPublic) - ..writeByte(7) - ..write(obj.creatorInfo); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_organization_org_info/models_organization_org_info-library.md b/talawa-mobile-docs/models_organization_org_info/models_organization_org_info-library.md deleted file mode 100644 index 1372e1194..000000000 --- a/talawa-mobile-docs/models_organization_org_info/models_organization_org_info-library.md +++ /dev/null @@ -1,45 +0,0 @@ - - - - -# org_info library - - - - - - - - - - - -## Classes - -##### [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - -This class creates an organization-information model and returns an OrgInfo instance. - - -##### [OrgInfoAdapter](../models_organization_org_info/OrgInfoAdapter-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Comments-class.md b/talawa-mobile-docs/models_post_post_model/Comments-class.md deleted file mode 100644 index d23910940..000000000 --- a/talawa-mobile-docs/models_post_post_model/Comments-class.md +++ /dev/null @@ -1,114 +0,0 @@ - - - -# Comments class - - - - - - - - - -

This class convert between json and object for comments.

- - - - -## Constructors - -[Comments](../models_post_post_model/Comments/Comments.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId}) - - - -[Comments.fromJson](../models_post_post_model/Comments/Comments.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - -Convert json to dart object. - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [sId](../models_post_post_model/Comments/sId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -these are dart object. -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toJson](../models_post_post_model/Comments/toJson.md)() [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - -Convert dart object to json. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Comments/Comments.fromJson.md b/talawa-mobile-docs/models_post_post_model/Comments/Comments.fromJson.md deleted file mode 100644 index 7edc28297..000000000 --- a/talawa-mobile-docs/models_post_post_model/Comments/Comments.fromJson.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# Comments.fromJson constructor - - - - - - - -Comments.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - -

Convert json to dart object.

-

params: -None -returns:

-
    -
  • Map<String, dynamic>: Dart object is returned.
  • -
- - - -## Implementation - -```dart -Comments.fromJson(Map json) { - sId = json['_id'] as String?; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Comments/Comments.md b/talawa-mobile-docs/models_post_post_model/Comments/Comments.md deleted file mode 100644 index ea2aab3be..000000000 --- a/talawa-mobile-docs/models_post_post_model/Comments/Comments.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# Comments constructor - - - - - - - -Comments({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId}) - - - - - -## Implementation - -```dart -Comments({this.sId}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Comments/sId.md b/talawa-mobile-docs/models_post_post_model/Comments/sId.md deleted file mode 100644 index 398d78335..000000000 --- a/talawa-mobile-docs/models_post_post_model/Comments/sId.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# sId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId - -_read / write_ - - - -

these are dart object.

-

params:

-
    -
  • sId : unique identifier for post
  • -
- - - -## Implementation - -```dart -String? sId; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Comments/toJson.md b/talawa-mobile-docs/models_post_post_model/Comments/toJson.md deleted file mode 100644 index 41171d83c..000000000 --- a/talawa-mobile-docs/models_post_post_model/Comments/toJson.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# toJson method - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> toJson -() - - - - - -

Convert dart object to json.

-

params: - None

-

returns:

-
    -
  • Map<String, dynamic>: json is returned.
  • -
- - - -## Implementation - -```dart -Map toJson() { - final Map data = {}; - data['_id'] = this.sId; - return data; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/LikedBy-class.md b/talawa-mobile-docs/models_post_post_model/LikedBy-class.md deleted file mode 100644 index 414225f56..000000000 --- a/talawa-mobile-docs/models_post_post_model/LikedBy-class.md +++ /dev/null @@ -1,114 +0,0 @@ - - - -# LikedBy class - - - - - - - - - -

This class convert between json and object for likedby.

- - - - -## Constructors - -[LikedBy](../models_post_post_model/LikedBy/LikedBy.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId}) - - - -[LikedBy.fromJson](../models_post_post_model/LikedBy/LikedBy.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - -JSON factory constructor. - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [sId](../models_post_post_model/LikedBy/sId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -These are dart object. -_read / write_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toJson](../models_post_post_model/LikedBy/toJson.md)() [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - -Convert dart object to json. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.fromJson.md b/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.fromJson.md deleted file mode 100644 index 16f42a9a4..000000000 --- a/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.fromJson.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# LikedBy.fromJson constructor - - - - - - - -LikedBy.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - -

JSON factory constructor.

- - - -## Implementation - -```dart -LikedBy.fromJson(Map json) { - sId = json['_id'] as String?; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.md b/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.md deleted file mode 100644 index 81c5321ef..000000000 --- a/talawa-mobile-docs/models_post_post_model/LikedBy/LikedBy.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# LikedBy constructor - - - - - - - -LikedBy({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId}) - - - - - -## Implementation - -```dart -LikedBy({this.sId}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/LikedBy/sId.md b/talawa-mobile-docs/models_post_post_model/LikedBy/sId.md deleted file mode 100644 index ecdee0591..000000000 --- a/talawa-mobile-docs/models_post_post_model/LikedBy/sId.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# sId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? sId - -_read / write_ - - - -

These are dart object.

-

params:

-
    -
  • sId : unique identifier for post
  • -
- - - -## Implementation - -```dart -String? sId; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/LikedBy/toJson.md b/talawa-mobile-docs/models_post_post_model/LikedBy/toJson.md deleted file mode 100644 index 41171d83c..000000000 --- a/talawa-mobile-docs/models_post_post_model/LikedBy/toJson.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# toJson method - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> toJson -() - - - - - -

Convert dart object to json.

-

params: - None

-

returns:

-
    -
  • Map<String, dynamic>: json is returned.
  • -
- - - -## Implementation - -```dart -Map toJson() { - final Map data = {}; - data['_id'] = this.sId; - return data; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post-class.md b/talawa-mobile-docs/models_post_post_model/Post-class.md deleted file mode 100644 index aed8de17d..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post-class.md +++ /dev/null @@ -1,186 +0,0 @@ - - - -# Post class - - - - - - - - - -

This class creates a Post model.

- - - - -## Constructors - -[Post](../models_post_post_model/Post/Post.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) sId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? createdAt, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? videoUrl, required [User](../models_user_user_info/User-class.md)? creator, [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? organization, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)>? likedBy, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../models_post_post_model/Comments-class.md)>? comments}) - - - -[Post.fromJson](../models_post_post_model/Post/Post.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - -Creating a new Post instance from a map structure. - - -## Properties - -##### [comments](../models_post_post_model/Post/comments.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../models_post_post_model/Comments-class.md)>? - - - -comments for post. -_read / write_ - - - -##### [createdAt](../models_post_post_model/Post/createdAt.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? - - - -createdAt for post. -_read / write_ - - - -##### [creator](../models_post_post_model/Post/creator.md) ↔ [User](../models_user_user_info/User-class.md)? - - - -creator for post. -_read / write_ - - - -##### [description](../models_post_post_model/Post/description.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -description for post. -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [imageUrl](../models_post_post_model/Post/imageUrl.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -imageUrl for post. -_read / write_ - - - -##### [likedBy](../models_post_post_model/Post/likedBy.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)>? - - - -likedBy for post. -_read / write_ - - - -##### [organization](../models_post_post_model/Post/organization.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? - - - -organization for post. -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [sId](../models_post_post_model/Post/sId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -unique identifier for post. -_read / write_ - - - -##### [videoUrl](../models_post_post_model/Post/videoUrl.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -videoUrl for post. -_read / write_ - - - - - -## Methods - -##### [getPostCreatedDuration](../models_post_post_model/Post/getPostCreatedDuration.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -this is to get duration of post. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/Post.fromJson.md b/talawa-mobile-docs/models_post_post_model/Post/Post.fromJson.md deleted file mode 100644 index 7dba822b4..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/Post.fromJson.md +++ /dev/null @@ -1,65 +0,0 @@ - - - -# Post.fromJson constructor - - - - - - - -Post.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - -

Creating a new Post instance from a map structure.

-

params: -None -returns:

-
    -
  • PostObject: Dart Object for posts
  • -
- - - -## Implementation - -```dart -/// -/// params: -/// None -/// returns: -/// * `PostObject`: Dart Object for posts -Post.fromJson(Map json) { - sId = json['_id'] as String; - description = json['text'] as String?; - createdAt = DateTime.parse(json['createdAt'] as String); - imageUrl = json['imageUrl'] as String?; - videoUrl = json['videoUrl'] as String?; - creator = json['creator'] != null - ? User.fromJson(json['creator'] as Map, fromOrg: true) - : null; - organization = json['organization'] != null - ? OrgInfo.fromJson(json['organization'] as Map) - : null; - if (json['likedBy'] != null) { - likedBy = []; - json['likedBy'].forEach((v) { - likedBy?.add(LikedBy.fromJson(v as Map)); - }); - } - if (json['comments'] != null) { - comments = []; - json['comments'].forEach((v) { - comments?.add(Comments.fromJson(v as Map)); - }); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/Post.md b/talawa-mobile-docs/models_post_post_model/Post/Post.md deleted file mode 100644 index 829c0b018..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/Post.md +++ /dev/null @@ -1,39 +0,0 @@ - - - -# Post constructor - - - - - - - -Post({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) sId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? createdAt, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? videoUrl, required [User](../../models_user_user_info/User-class.md)? creator, [OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? organization, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)>? likedBy, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../../models_post_post_model/Comments-class.md)>? comments}) - - - - - -## Implementation - -```dart -Post({ - required this.sId, - this.description, - this.createdAt, - this.imageUrl, - this.videoUrl, - required this.creator, - this.organization, - this.likedBy, - this.comments, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/comments.md b/talawa-mobile-docs/models_post_post_model/Post/comments.md deleted file mode 100644 index ecf348966..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/comments.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# comments property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../../models_post_post_model/Comments-class.md)>? comments - -_read / write_ - - - -

comments for post.

- - - -## Implementation - -```dart -List? comments; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/createdAt.md b/talawa-mobile-docs/models_post_post_model/Post/createdAt.md deleted file mode 100644 index 6238dfa3c..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/createdAt.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# createdAt property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)? createdAt - -_read / write_ - - - -

createdAt for post.

- - - -## Implementation - -```dart -DateTime? createdAt; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/creator.md b/talawa-mobile-docs/models_post_post_model/Post/creator.md deleted file mode 100644 index a7a0a80a4..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/creator.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# creator property - - - - - - - -[User](../../models_user_user_info/User-class.md)? creator - -_read / write_ - - - -

creator for post.

- - - -## Implementation - -```dart -User? creator; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/description.md b/talawa-mobile-docs/models_post_post_model/Post/description.md deleted file mode 100644 index a34d1f7ab..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/description.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# description property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description - -_read / write_ - - - -

description for post.

- - - -## Implementation - -```dart -String? description; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/getPostCreatedDuration.md b/talawa-mobile-docs/models_post_post_model/Post/getPostCreatedDuration.md deleted file mode 100644 index 561e42567..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/getPostCreatedDuration.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# getPostCreatedDuration method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) getPostCreatedDuration -() - - - - - -

this is to get duration of post.

-

params: - None

-

returns:

-
    -
  • String: date is returned in ago form.
  • -
- - - -## Implementation - -```dart -String getPostCreatedDuration() { - if (DateTime.now().difference(this.createdAt!).inSeconds < 60) { - return '${DateTime.now().difference(this.createdAt!).inSeconds} Seconds Ago'; - } else if (DateTime.now().difference(this.createdAt!).inMinutes < 60) { - return '${DateTime.now().difference(this.createdAt!).inMinutes} Minutes Ago'; - } else if (DateTime.now().difference(this.createdAt!).inHours < 24) { - return '${DateTime.now().difference(this.createdAt!).inHours} Hours Ago'; - } else if (DateTime.now().difference(this.createdAt!).inDays < 30) { - return '${DateTime.now().difference(this.createdAt!).inDays} Days Ago'; - } else if (DateTime.now().difference(this.createdAt!).inDays < 365) { - return '${DateTime.now().difference(this.createdAt!).inDays ~/ 30} Months Ago'; - } else { - return '${DateTime.now().difference(this.createdAt!).inDays ~/ 365} Years Ago'; - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/imageUrl.md b/talawa-mobile-docs/models_post_post_model/Post/imageUrl.md deleted file mode 100644 index ccbaf0864..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/imageUrl.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# imageUrl property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl - -_read / write_ - - - -

imageUrl for post.

- - - -## Implementation - -```dart -String? imageUrl; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/likedBy.md b/talawa-mobile-docs/models_post_post_model/Post/likedBy.md deleted file mode 100644 index 3568e7dd8..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/likedBy.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# likedBy property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)>? likedBy - -_read / write_ - - - -

likedBy for post.

- - - -## Implementation - -```dart -List? likedBy; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/organization.md b/talawa-mobile-docs/models_post_post_model/Post/organization.md deleted file mode 100644 index 87e5b3d75..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/organization.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# organization property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? organization - -_read / write_ - - - -

organization for post.

- - - -## Implementation - -```dart -OrgInfo? organization; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/sId.md b/talawa-mobile-docs/models_post_post_model/Post/sId.md deleted file mode 100644 index 1a82d26e6..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/sId.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# sId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) sId - -_read / write_ - - - -

unique identifier for post.

- - - -## Implementation - -```dart -late String sId; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/Post/videoUrl.md b/talawa-mobile-docs/models_post_post_model/Post/videoUrl.md deleted file mode 100644 index 12fb954e3..000000000 --- a/talawa-mobile-docs/models_post_post_model/Post/videoUrl.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# videoUrl property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? videoUrl - -_read / write_ - - - -

videoUrl for post.

- - - -## Implementation - -```dart -String? videoUrl; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_post_post_model/models_post_post_model-library.md b/talawa-mobile-docs/models_post_post_model/models_post_post_model-library.md deleted file mode 100644 index 6aa60a57a..000000000 --- a/talawa-mobile-docs/models_post_post_model/models_post_post_model-library.md +++ /dev/null @@ -1,52 +0,0 @@ - - - - -# post_model library - - - - - - - - - - - -## Classes - -##### [Comments](../models_post_post_model/Comments-class.md) - - - -This class convert between json and object for comments. - - -##### [LikedBy](../models_post_post_model/LikedBy-class.md) - - - -This class convert between json and object for likedby. - - -##### [Post](../models_post_post_model/Post-class.md) - - - -This class creates a Post model. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task-class.md b/talawa-mobile-docs/models_task_task_model/Task-class.md deleted file mode 100644 index 622477968..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task-class.md +++ /dev/null @@ -1,158 +0,0 @@ - - - -# Task class - - - - - - - - - - - - - -## Constructors - -[Task](../models_task_task_model/Task/Task.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [User](../models_user_user_info/User-class.md) creator, required [Event](../models_events_event_model/Event-class.md) event, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) createdAt, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deadline}) - - _const_ - -[Task.fromJson](../models_task_task_model/Task/Task.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - -/Creating a new Task instance from a map structure. _factory_ - - -## Properties - -##### [createdAt](../models_task_task_model/Task/createdAt.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [creator](../models_task_task_model/Task/creator.md) → [User](../models_user_user_info/User-class.md) - - - - -_final_ - - - -##### [deadline](../models_task_task_model/Task/deadline.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [description](../models_task_task_model/Task/description.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [event](../models_task_task_model/Task/event.md) → [Event](../models_events_event_model/Event-class.md) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_task_task_model/Task/id.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [title](../models_task_task_model/Task/title.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/Task.fromJson.md b/talawa-mobile-docs/models_task_task_model/Task/Task.fromJson.md deleted file mode 100644 index f1c2c1fb0..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/Task.fromJson.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# Task.fromJson constructor - - - - - - - -Task.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json) - - -

/Creating a new Task instance from a map structure.

- - - -## Implementation - -```dart -factory Task.fromJson( - Map json, -) { - return Task( - id: json['_id'] as String, - title: json['title'] as String, - creator: User.fromJson( - json['creator'] as Map, - fromOrg: true, - ), - event: Event.fromJson( - json['event'] as Map, - ), - createdAt: json['createdAt'] as String, - description: json['description'] as String?, - deadline: json['deadline'] as String?, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/Task.md b/talawa-mobile-docs/models_task_task_model/Task/Task.md deleted file mode 100644 index ee67ef19e..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/Task.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# Task constructor - - - - - - -const -Task({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [User](../../models_user_user_info/User-class.md) creator, required [Event](../../models_events_event_model/Event-class.md) event, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) createdAt, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deadline}) - - - - - -## Implementation - -```dart -const Task({ - required this.id, - required this.title, - required this.creator, - required this.event, - required this.createdAt, - this.description, - this.deadline, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/createdAt.md b/talawa-mobile-docs/models_task_task_model/Task/createdAt.md deleted file mode 100644 index 84314f52c..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/createdAt.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# createdAt property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) createdAt - -_final_ - - - - - - -## Implementation - -```dart -final String createdAt; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/creator.md b/talawa-mobile-docs/models_task_task_model/Task/creator.md deleted file mode 100644 index b5c8e0836..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/creator.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# creator property - - - - - - - -[User](../../models_user_user_info/User-class.md) creator - -_final_ - - - - - - -## Implementation - -```dart -final User creator; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/deadline.md b/talawa-mobile-docs/models_task_task_model/Task/deadline.md deleted file mode 100644 index 21dd7e7e7..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/deadline.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# deadline property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deadline - -_final_ - - - - - - -## Implementation - -```dart -final String? deadline; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/description.md b/talawa-mobile-docs/models_task_task_model/Task/description.md deleted file mode 100644 index ae3e97fef..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/description.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# description property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? description - -_final_ - - - - - - -## Implementation - -```dart -final String? description; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/event.md b/talawa-mobile-docs/models_task_task_model/Task/event.md deleted file mode 100644 index 9714bc41a..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/event.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# event property - - - - - - - -[Event](../../models_events_event_model/Event-class.md) event - -_final_ - - - - - - -## Implementation - -```dart -final Event event; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/id.md b/talawa-mobile-docs/models_task_task_model/Task/id.md deleted file mode 100644 index 672a052c2..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) id - -_final_ - - - - - - -## Implementation - -```dart -final String id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/Task/title.md b/talawa-mobile-docs/models_task_task_model/Task/title.md deleted file mode 100644 index 7c14a3864..000000000 --- a/talawa-mobile-docs/models_task_task_model/Task/title.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# title property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) title - -_final_ - - - - - - -## Implementation - -```dart -final String title; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_task_task_model/models_task_task_model-library.md b/talawa-mobile-docs/models_task_task_model/models_task_task_model-library.md deleted file mode 100644 index 3aed89965..000000000 --- a/talawa-mobile-docs/models_task_task_model/models_task_task_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# task_model library - - - - - - - - - - - -## Classes - -##### [Task](../models_task_task_model/Task-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User-class.md b/talawa-mobile-docs/models_user_user_info/User-class.md deleted file mode 100644 index 2f8832131..000000000 --- a/talawa-mobile-docs/models_user_user_info/User-class.md +++ /dev/null @@ -1,311 +0,0 @@ - - - -# User class - - - - - - - - - -

This class creates a User model and returns a user instance.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [HiveObject](https://pub.dev/documentation/hive/2.2.3/hive/HiveObject-class.html) -- User - - - - - - -**Annotations** - -- @[HiveType](https://pub.dev/documentation/hive/2.2.3/hive/HiveType-class.html)(typeId: 1) - - -## Constructors - -[User](../models_user_user_info/User/User.md) ({[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? adminFor, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? createdOrganizations, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? joinedOrganizations, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? lastName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? authToken, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? refreshToken, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? membershipRequests}) - - - -[User.fromJson](../models_user_user_info/User/User.fromJson.md) ([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json1, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromOrg = false}) - - _factory_ - - -## Properties - -##### [adminFor](../models_user_user_info/User/adminFor.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? - - - - -_read / write_ - - - -##### [authToken](../models_user_user_info/User/authToken.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [box](https://pub.dev/documentation/hive/2.2.3/hive/HiveObjectMixin/box.html) → [BoxBase](https://pub.dev/documentation/hive/2.2.3/hive/BoxBase-class.html)? - - - -Get the box in which this object is stored. Returns null if object has -not been added to a box yet. -_read-onlyinherited_ - - - -##### [createdOrganizations](../models_user_user_info/User/createdOrganizations.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? - - - - -_read / write_ - - - -##### [email](../models_user_user_info/User/email.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [firstName](../models_user_user_info/User/firstName.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../models_user_user_info/User/id.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [image](../models_user_user_info/User/image.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [isInBox](https://pub.dev/documentation/hive/2.2.3/hive/HiveObjectMixin/isInBox.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Returns whether this object is currently stored in a box. -_read-onlyinherited_ - - - -##### [joinedOrganizations](../models_user_user_info/User/joinedOrganizations.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? - - - - -_read / write_ - - - -##### [key](https://pub.dev/documentation/hive/2.2.3/hive/HiveObjectMixin/key.html) → dynamic - - - -Get the key associated with this object. Returns null if object has -not been added to a box yet. -_read-onlyinherited_ - - - -##### [lastName](../models_user_user_info/User/lastName.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [membershipRequests](../models_user_user_info/User/membershipRequests.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)>? - - - - -_read / write_ - - - -##### [refreshToken](../models_user_user_info/User/refreshToken.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [delete](https://pub.dev/documentation/hive/2.2.3/hive/HiveObjectMixin/delete.html)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Deletes this object from the box it is stored in. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [print](../models_user_user_info/User/print.md)() void - - - - - - - - -##### [save](https://pub.dev/documentation/hive/2.2.3/hive/HiveObjectMixin/save.html)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Persists this object. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [update](../models_user_user_info/User/update.md)([User](../models_user_user_info/User-class.md) details) void - - - - - - - - -##### [updateAdminFor](../models_user_user_info/User/updateAdminFor.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgList) void - - - - - - - - -##### [updateCreatedOrg](../models_user_user_info/User/updateCreatedOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgList) void - - - - - - - - -##### [updateJoinedOrg](../models_user_user_info/User/updateJoinedOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgList) void - - - - - - - - -##### [updateMemberRequestOrg](../models_user_user_info/User/updateMemberRequestOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgList) void - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/User.fromJson.md b/talawa-mobile-docs/models_user_user_info/User/User.fromJson.md deleted file mode 100644 index c568f69e4..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/User.fromJson.md +++ /dev/null @@ -1,71 +0,0 @@ - - - -# User.fromJson constructor - - - - - - - -User.fromJson([Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> json1, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromOrg = false}) - - - - - -## Implementation - -```dart -factory User.fromJson(Map json1, {bool fromOrg = false}) { - Map json; - if (fromOrg) { - json = json1; - } else { - json = json1['user'] as Map; - } - return User( - authToken: fromOrg ? ' ' : json1['accessToken'] as String?, - refreshToken: fromOrg ? ' ' : json1['refreshToken'] as String?, - id: json['_id'] as String?, - firstName: - json['firstName'] != null ? json['firstName'] as String? : null, - lastName: json['lastName'] != null ? json['lastName'] as String? : null, - email: json['email'] != null ? json['email'] as String? : null, - image: json['image'] != null ? json['image'] as String? : null, - adminFor: json['adminFor'] != null - ? (json['adminFor'] as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - createdOrganizations: json['createdOrganizations'] != null - ? (json['createdOrganizations'] as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - joinedOrganizations: json['joinedOrganizations'] != null - ? (json['joinedOrganizations'] as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList() - : null, - membershipRequests: json['membershipRequests'] != null - ? (json['membershipRequests'] as List?) - ?.map( - (e) => OrgInfo.fromJson( - e as Map, - memberRequest: true, - ), - ) - .toList() - : null, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/User.md b/talawa-mobile-docs/models_user_user_info/User/User.md deleted file mode 100644 index 2e34c1ed0..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/User.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# User constructor - - - - - - - -User({[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? adminFor, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? createdOrganizations, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? joinedOrganizations, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? lastName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? authToken, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? refreshToken, [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? membershipRequests}) - - - - - -## Implementation - -```dart -User({ - this.adminFor, - this.createdOrganizations, - this.email, - this.firstName, - this.id, - this.image, - this.joinedOrganizations, - this.lastName, - this.authToken, - this.refreshToken, - this.membershipRequests, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/adminFor.md b/talawa-mobile-docs/models_user_user_info/User/adminFor.md deleted file mode 100644 index f32ef5aca..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/adminFor.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# adminFor property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(9) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? adminFor - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(9) -List? adminFor = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/authToken.md b/talawa-mobile-docs/models_user_user_info/User/authToken.md deleted file mode 100644 index f378cbba3..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/authToken.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# authToken property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(0) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? authToken - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(0) -String? authToken; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/createdOrganizations.md b/talawa-mobile-docs/models_user_user_info/User/createdOrganizations.md deleted file mode 100644 index 791251b39..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/createdOrganizations.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# createdOrganizations property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(8) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? createdOrganizations - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(8) -List? createdOrganizations = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/email.md b/talawa-mobile-docs/models_user_user_info/User/email.md deleted file mode 100644 index 34b599f1b..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/email.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# email property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(5) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? email - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(5) -String? email; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/firstName.md b/talawa-mobile-docs/models_user_user_info/User/firstName.md deleted file mode 100644 index b782ee7af..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/firstName.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# firstName property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(3) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstName - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(3) -String? firstName; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/id.md b/talawa-mobile-docs/models_user_user_info/User/id.md deleted file mode 100644 index 1f2e418e5..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/id.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# id property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(2) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? id - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(2) -String? id; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/image.md b/talawa-mobile-docs/models_user_user_info/User/image.md deleted file mode 100644 index ff44e85e0..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/image.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# image property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(6) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? image - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(6) -String? image; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/joinedOrganizations.md b/talawa-mobile-docs/models_user_user_info/User/joinedOrganizations.md deleted file mode 100644 index 364ee575b..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/joinedOrganizations.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# joinedOrganizations property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(7) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? joinedOrganizations - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(7) -List? joinedOrganizations = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/lastName.md b/talawa-mobile-docs/models_user_user_info/User/lastName.md deleted file mode 100644 index b02f4c180..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/lastName.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# lastName property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(4) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? lastName - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(4) -String? lastName; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/membershipRequests.md b/talawa-mobile-docs/models_user_user_info/User/membershipRequests.md deleted file mode 100644 index 483f6a9df..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/membershipRequests.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# membershipRequests property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(10) -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)>? membershipRequests - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(10) -List? membershipRequests = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/print.md b/talawa-mobile-docs/models_user_user_info/User/print.md deleted file mode 100644 index 9887d704a..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/print.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# print method - - - - - - - - -void print -() - - - - - - - - -## Implementation - -```dart -void print() { - debugPrint('authToken: ${this.authToken}'); - debugPrint('refreshToken: ${this.refreshToken}'); - debugPrint('_id: ${this.id}'); - debugPrint('firstName: ${this.firstName}'); - debugPrint('lastName: ${this.lastName}'); - debugPrint('image: ${this.image}'); - debugPrint('email: ${this.email}'); - debugPrint('joinedOrganizations: ${this.joinedOrganizations}'); - debugPrint('adminFor: ${this.adminFor}'); - debugPrint('createdOrganizations: ${this.createdOrganizations}'); - debugPrint('membershipRequests: ${this.membershipRequests}'); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/refreshToken.md b/talawa-mobile-docs/models_user_user_info/User/refreshToken.md deleted file mode 100644 index 87c25db04..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/refreshToken.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# refreshToken property - - - - - - - -**Annotations** - -- @[HiveField](https://pub.dev/documentation/hive/2.2.3/hive/HiveField-class.html)(1) -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? refreshToken - -_read / write_ - - - - - - -## Implementation - -```dart -@HiveField(1) -String? refreshToken; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/update.md b/talawa-mobile-docs/models_user_user_info/User/update.md deleted file mode 100644 index a11d0f023..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/update.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# update method - - - - - - - - -void update -([User](../../models_user_user_info/User-class.md) details) - - - - - - - - -## Implementation - -```dart -void update(User details) { - this.firstName = details.firstName; - this.lastName = details.lastName; - this.email = details.email; - this.image = details.image; - this.authToken = details.authToken; - this.refreshToken = details.refreshToken; - this.joinedOrganizations = details.joinedOrganizations; - this.createdOrganizations = details.createdOrganizations; - this.membershipRequests = details.membershipRequests; - this.adminFor = details.adminFor; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/updateAdminFor.md b/talawa-mobile-docs/models_user_user_info/User/updateAdminFor.md deleted file mode 100644 index 0d104cd52..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/updateAdminFor.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# updateAdminFor method - - - - - - - - -void updateAdminFor -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgList) - - - - - - - - -## Implementation - -```dart -void updateAdminFor(List orgList) { - this.adminFor = orgList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/updateCreatedOrg.md b/talawa-mobile-docs/models_user_user_info/User/updateCreatedOrg.md deleted file mode 100644 index 384f2a363..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/updateCreatedOrg.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# updateCreatedOrg method - - - - - - - - -void updateCreatedOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgList) - - - - - - - - -## Implementation - -```dart -void updateCreatedOrg(List orgList) { - this.createdOrganizations = orgList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/updateJoinedOrg.md b/talawa-mobile-docs/models_user_user_info/User/updateJoinedOrg.md deleted file mode 100644 index ce7eb1d64..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/updateJoinedOrg.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# updateJoinedOrg method - - - - - - - - -void updateJoinedOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgList) - - - - - - - - -## Implementation - -```dart -void updateJoinedOrg(List orgList) { - this.joinedOrganizations = orgList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/User/updateMemberRequestOrg.md b/talawa-mobile-docs/models_user_user_info/User/updateMemberRequestOrg.md deleted file mode 100644 index a64ede2dc..000000000 --- a/talawa-mobile-docs/models_user_user_info/User/updateMemberRequestOrg.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# updateMemberRequestOrg method - - - - - - - - -void updateMemberRequestOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgList) - - - - - - - - -## Implementation - -```dart -void updateMemberRequestOrg(List orgList) { - this.membershipRequests = [...membershipRequests!, ...orgList]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter-class.md b/talawa-mobile-docs/models_user_user_info/UserAdapter-class.md deleted file mode 100644 index 128bc0ea4..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter-class.md +++ /dev/null @@ -1,130 +0,0 @@ - - - -# UserAdapter class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [TypeAdapter](https://pub.dev/documentation/hive/2.2.3/hive/TypeAdapter-class.html)<[User](../models_user_user_info/User-class.md)> -- UserAdapter - - - - - - - - -## Constructors - -[UserAdapter](../models_user_user_info/UserAdapter/UserAdapter.md) () - - - - -## Properties - -##### [hashCode](../models_user_user_info/UserAdapter/hashCode.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyoverride_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [typeId](../models_user_user_info/UserAdapter/typeId.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -Called for type registration -_final_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [read](../models_user_user_info/UserAdapter/read.md)([BinaryReader](https://pub.dev/documentation/hive/2.2.3/hive/BinaryReader-class.html) reader) [User](../models_user_user_info/User-class.md) - - - -Is called when a value has to be decoded. -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [write](../models_user_user_info/UserAdapter/write.md)([BinaryWriter](https://pub.dev/documentation/hive/2.2.3/hive/BinaryWriter-class.html) writer, [User](../models_user_user_info/User-class.md) obj) void - - - -Is called when a value has to be encoded. -_override_ - - - - - -## Operators - -##### [operator ==](../models_user_user_info/UserAdapter/operator_equals.md)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_override_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/UserAdapter.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/UserAdapter.md deleted file mode 100644 index cd7b0178d..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/UserAdapter.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# UserAdapter constructor - - - - - - - -UserAdapter() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/hashCode.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/hashCode.md deleted file mode 100644 index 8cc047694..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/hashCode.md +++ /dev/null @@ -1,65 +0,0 @@ - - - -# hashCode property - - - - - - - - - -**Annotations** - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) hashCode - -_override_ - - - -

The hash code for this object.

-

A hash code is a single integer which represents the state of the object -that affects operator == comparisons.

-

All objects have hash codes. -The default hash code implemented by Object -represents only the identity of the object, -the same way as the default operator == implementation only considers objects -equal if they are identical (see identityHashCode).

-

If operator == is overridden to use the object state instead, -the hash code must also be changed to represent that state, -otherwise the object cannot be used in hash based data structures -like the default Set and Map implementations.

-

Hash codes must be the same for objects that are equal to each other -according to operator ==. -The hash code of an object should only change if the object changes -in a way that affects equality. -There are no further requirements for the hash codes. -They need not be consistent between executions of the same program -and there are no distribution guarantees.

-

Objects that are not equal are allowed to have the same hash code. -It is even technically allowed that all instances have the same hash code, -but if clashes happen too often, -it may reduce the efficiency of hash-based data structures -like HashSet or HashMap.

-

If a subclass overrides hashCode, it should override the -operator == operator as well to maintain consistency.

- - - -## Implementation - -```dart -@override -int get hashCode => typeId.hashCode; -``` - - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/operator_equals.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/operator_equals.md deleted file mode 100644 index 2138164e9..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/operator_equals.md +++ /dev/null @@ -1,67 +0,0 @@ - - - -# operator == method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) operator == -([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) - -_override_ - - - -

The equality operator.

-

The default behavior for all Objects is to return true if and -only if this object and other are the same object.

-

Override this method to specify a different equality relation on -a class. The overriding method must still be an equivalence relation. -That is, it must be:

-
    -
  • -

    Total: It must return a boolean for all arguments. It should never throw.

    -
  • -
  • -

    Reflexive: For all objects o, o == o must be true.

    -
  • -
  • -

    Symmetric: For all objects o1 and o2, o1 == o2 and o2 == o1 must -either both be true, or both be false.

    -
  • -
  • -

    Transitive: For all objects o1, o2, and o3, if o1 == o2 and -o2 == o3 are true, then o1 == o3 must be true.

    -
  • -
-

The method should also be consistent over time, -so whether two objects are equal should only change -if at least one of the objects was modified.

-

If a subclass overrides the equality operator, it should override -the hashCode method as well to maintain consistency.

- - - -## Implementation - -```dart -@override -bool operator ==(Object other) => - identical(this, other) || - other is UserAdapter && - runtimeType == other.runtimeType && - typeId == other.typeId; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/read.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/read.md deleted file mode 100644 index 8431b02dd..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/read.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# read method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[User](../../models_user_user_info/User-class.md) read -([BinaryReader](https://pub.dev/documentation/hive/2.2.3/hive/BinaryReader-class.html) reader) - -_override_ - - - -

Is called when a value has to be decoded.

- - - -## Implementation - -```dart -@override -User read(BinaryReader reader) { - final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; - return User( - adminFor: (fields[9] as List?)?.cast(), - createdOrganizations: (fields[8] as List?)?.cast(), - email: fields[5] as String?, - firstName: fields[3] as String?, - id: fields[2] as String?, - image: fields[6] as String?, - joinedOrganizations: (fields[7] as List?)?.cast(), - lastName: fields[4] as String?, - authToken: fields[0] as String?, - refreshToken: fields[1] as String?, - membershipRequests: (fields[10] as List?)?.cast(), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/typeId.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/typeId.md deleted file mode 100644 index 2fc04cff0..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/typeId.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# typeId property - - - - - - - -**Annotations** - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) typeId - -_final_ - - - -

Called for type registration

- - - -## Implementation - -```dart -@override -final int typeId = 1; -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/UserAdapter/write.md b/talawa-mobile-docs/models_user_user_info/UserAdapter/write.md deleted file mode 100644 index 5d2fbb7a7..000000000 --- a/talawa-mobile-docs/models_user_user_info/UserAdapter/write.md +++ /dev/null @@ -1,62 +0,0 @@ - - - -# write method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void write -([BinaryWriter](https://pub.dev/documentation/hive/2.2.3/hive/BinaryWriter-class.html) writer, [User](../../models_user_user_info/User-class.md) obj) - -_override_ - - - -

Is called when a value has to be encoded.

- - - -## Implementation - -```dart -@override -void write(BinaryWriter writer, User obj) { - writer - ..writeByte(11) - ..writeByte(0) - ..write(obj.authToken) - ..writeByte(1) - ..write(obj.refreshToken) - ..writeByte(2) - ..write(obj.id) - ..writeByte(3) - ..write(obj.firstName) - ..writeByte(4) - ..write(obj.lastName) - ..writeByte(5) - ..write(obj.email) - ..writeByte(6) - ..write(obj.image) - ..writeByte(7) - ..write(obj.joinedOrganizations) - ..writeByte(8) - ..write(obj.createdOrganizations) - ..writeByte(9) - ..write(obj.adminFor) - ..writeByte(10) - ..write(obj.membershipRequests); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/models_user_user_info/models_user_user_info-library.md b/talawa-mobile-docs/models_user_user_info/models_user_user_info-library.md deleted file mode 100644 index 2f7570090..000000000 --- a/talawa-mobile-docs/models_user_user_info/models_user_user_info-library.md +++ /dev/null @@ -1,45 +0,0 @@ - - - - -# user_info library - - - - - - - - - - - -## Classes - -##### [User](../models_user_user_info/User-class.md) - - - -This class creates a User model and returns a user instance. - - -##### [UserAdapter](../models_user_user_info/UserAdapter-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList-class.md b/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList-class.md deleted file mode 100644 index 84893bd0b..000000000 --- a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList-class.md +++ /dev/null @@ -1,110 +0,0 @@ - - - -# FetchPluginList class - - - - - - - - - -

This class fetch plugins list.

- - - - -## Constructors - -[FetchPluginList](../plugins_fetch_plugin_list/FetchPluginList/FetchPluginList.md) () - -Constructor of the class. - - -## Properties - -##### [box](../plugins_fetch_plugin_list/FetchPluginList/box.md) ↔ [Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html) - - - -late initialize the box. -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [fetchList](../plugins_fetch_plugin_list/FetchPluginList/fetchList.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -Fetches plugins from server and stores them in Hive pluginBox. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/FetchPluginList.md b/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/FetchPluginList.md deleted file mode 100644 index 55304e7c1..000000000 --- a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/FetchPluginList.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# FetchPluginList constructor - - - - - - - -FetchPluginList() - - -

Constructor of the class.

- - - -## Implementation - -```dart -FetchPluginList() { - fetchList(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/box.md b/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/box.md deleted file mode 100644 index a40276966..000000000 --- a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/box.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# box property - - - - - - - -[Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html) box - -_read / write_ - - - -

late initialize the box.

- - - -## Implementation - -```dart -late Box box; -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/fetchList.md b/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/fetchList.md deleted file mode 100644 index 4a819919a..000000000 --- a/talawa-mobile-docs/plugins_fetch_plugin_list/FetchPluginList/fetchList.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# fetchList method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> fetchList -() - - - - - -

Fetches plugins from server and stores them in Hive pluginBox.

-

params: - None

-

returns:

-
    -
  • Future<void>: it returns Future of void
  • -
- - - -## Implementation - -```dart -Future fetchList() async { - late final GraphQLClient client = graphqlConfig.clientToQuery(); - final QueryResult result = await client.query( - QueryOptions( - document: gql(queries.getPluginsList()), - ), - ); - box = Hive.box('pluginBox'); - box.put('plugins', result.data!["getPlugins"]); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md b/talawa-mobile-docs/plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md deleted file mode 100644 index a2d80f3b5..000000000 --- a/talawa-mobile-docs/plugins_fetch_plugin_list/plugins_fetch_plugin_list-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# fetch_plugin_list library - - - - - - - - - - - -## Classes - -##### [FetchPluginList](../plugins_fetch_plugin_list/FetchPluginList-class.md) - - - -This class fetch plugins list. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider-class.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider-class.md deleted file mode 100644 index 85a8d898a..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider-class.md +++ /dev/null @@ -1,225 +0,0 @@ - - - -# TalawaPluginProvider class - - - - - - - - - -

TalwaPluginProvider provides ability to implement features as plugins

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TalawaPluginProvider - - - - - - - - -## Constructors - -[TalawaPluginProvider](../plugins_talawa_plugin_provider/TalawaPluginProvider/TalawaPluginProvider.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, @[required](https://pub.dev/documentation/meta/1.8.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)? child, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) visible, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) pluginName}) - - _const_ - - -## Properties - -##### [child](../plugins_talawa_plugin_provider/TalawaPluginProvider/child.md) → [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)? - - - -child contains the widget for the plugin UI. -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [pluginName](../plugins_talawa_plugin_provider/TalawaPluginProvider/pluginName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -name of plugin preferred with underscores(_) instead of spaces -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [visible](../plugins_talawa_plugin_provider/TalawaPluginProvider/visible.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -visible is the property that decides visibility of the UI. -_final_ - - - - - -## Methods - -##### [build](../plugins_talawa_plugin_provider/TalawaPluginProvider/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -build the Plugin combining local visibility property and serverVisible property -_override_ - - - -##### [checkFromPluginList](../plugins_talawa_plugin_provider/TalawaPluginProvider/checkFromPluginList.md)() [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -return bool decides the final visibility of the verifying from database and current OrgId - - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/TalawaPluginProvider.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/TalawaPluginProvider.md deleted file mode 100644 index fc8bbf280..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/TalawaPluginProvider.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# TalawaPluginProvider constructor - - - - - - -const -TalawaPluginProvider({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, @[required](https://pub.dev/documentation/meta/1.8.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)? child, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) visible, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) pluginName}) - - - - - -## Implementation - -```dart -const TalawaPluginProvider({ - Key? key, - @required this.child, - required this.visible, - required this.pluginName, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/build.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/build.md deleted file mode 100644 index 1c71ed24b..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/build.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

build the Plugin combining local visibility property and serverVisible property

- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - var serverVisible = false; - serverVisible = checkFromPluginList(); - return serverVisible || visible ? child! : Container(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/checkFromPluginList.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/checkFromPluginList.md deleted file mode 100644 index b432bce74..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/checkFromPluginList.md +++ /dev/null @@ -1,60 +0,0 @@ - - - -# checkFromPluginList method - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) checkFromPluginList -() - - - - - -

return bool decides the final visibility of the verifying from database and current OrgId

- - - -## Implementation - -```dart -bool checkFromPluginList() { - final UserConfig userConfig = locator(); - final Box box; - bool res = false; - box = Hive.box('pluginBox'); - var pluginList = box.get('plugins'); - pluginList ??= []; // if null then make it [] - - ///mapping over the list from the server - pluginList - .map( - (plugin) => { - if (plugin["pluginName"] == pluginName) - { - if (plugin["pluginInstallStatus"] as bool) - { - res = plugin["pluginInstallStatus"] as bool || - plugin["installedOrgs"] - .contains(userConfig.currentOrg.id) as bool - } - } - }, - ) - .toList(); - return res; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/child.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/child.md deleted file mode 100644 index 35ec65b91..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/child.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# child property - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)? child - -_final_ - - - -

child contains the widget for the plugin UI.

- - - -## Implementation - -```dart -final Widget? child; -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/pluginName.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/pluginName.md deleted file mode 100644 index 9825d8933..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/pluginName.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# pluginName property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) pluginName - -_final_ - - - -

name of plugin preferred with underscores(_) instead of spaces

- - - -## Implementation - -```dart -final String pluginName; -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/visible.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/visible.md deleted file mode 100644 index bacba07b8..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/TalawaPluginProvider/visible.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# visible property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) visible - -_final_ - - - -

visible is the property that decides visibility of the UI.

- - - -## Implementation - -```dart -final bool visible; -``` - - - - - - - diff --git a/talawa-mobile-docs/plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md b/talawa-mobile-docs/plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md deleted file mode 100644 index e6d50cae7..000000000 --- a/talawa-mobile-docs/plugins_talawa_plugin_provider/plugins_talawa_plugin_provider-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# talawa_plugin_provider library - - - - - - - - - - - -## Classes - -##### [TalawaPluginProvider](../plugins_talawa_plugin_provider/TalawaPluginProvider-class.md) - - - -TalwaPluginProvider provides ability to implement features as plugins - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/router/generateRoute.md b/talawa-mobile-docs/router/generateRoute.md deleted file mode 100644 index cdb9d89fb..000000000 --- a/talawa-mobile-docs/router/generateRoute.md +++ /dev/null @@ -1,294 +0,0 @@ - - - -# generateRoute function - - - - - - - - - - -[Route](https://api.flutter.dev/flutter/widgets/Route-class.html) generateRoute -([RouteSettings](https://api.flutter.dev/flutter/widgets/RouteSettings-class.html) settings) - - - - - -

The MaterialApp provides us with a property called generateRoute where -we can pass in a Function that returns a Route and takes in RouteSettings

-

Thus for this purpose, we create a function named generateRoute

- - - -## Implementation - -```dart -Route generateRoute(RouteSettings settings) { - // The settings contains the route information of the requested route. - // It provides two key things to us: the name, and the arguments. - // We use the name to determine which view to return. - switch (settings.name) { - // Returns the SplashScreen - case Routes.splashScreen: - final int mainScreenIndex = settings.arguments! as int; - return MaterialPageRoute( - builder: (context) => SplashScreen( - key: const Key('SplashScreen'), - mainScreenIndex: mainScreenIndex, - ), - ); - - // Returns the SelectLanguage Widget - case Routes.languageSelectionRoute: - return MaterialPageRoute( - builder: (context) => const SelectLanguage(key: Key('SelectLanguage')), - ); - - // Returns the SetUrl Widget - case Routes.setUrlScreen: - final String uri = settings.arguments!.toString(); - return MaterialPageRoute( - builder: (context) => SetUrl( - key: const Key('SetUrl'), - uri: uri, - ), - ); - - // Returns the Login Widget - case Routes.loginScreen: - return MaterialPageRoute( - builder: (context) => const Login(key: Key('Login')), - ); - - // Returns the SelectOrganization Widget - case Routes.selectOrgScreen: - final String id = settings.arguments!.toString(); - return CupertinoPageRoute( - builder: (context) => SelectOrganization( - key: const Key('Signup'), - selectedOrgId: id, - ), - ); - - // Returns the SignUpDetails Widget - case Routes.signupDetailScreen: - final OrgInfo org = settings.arguments! as OrgInfo; - return CupertinoPageRoute( - builder: (context) => SignUpDetails( - key: const Key('Signup'), - selectedOrg: org, - ), - ); - - // Returns the WaitingPge Widget - case Routes.waitingScreen: - return CupertinoPageRoute( - builder: (context) => const WaitingPage(key: Key('Waiting')), - ); - - // Returns the Recover Widget - case Routes.recoverScreen: - return MaterialPageRoute( - builder: (context) => const Recover(key: Key('Recover')), - ); - - // Returns the ChangePass Widget - case Routes.updateScreen: - return MaterialPageRoute( - builder: (context) => const ChangePass(key: Key('Update')), - ); - - // Returns the OrganizationFeed Widget - case Routes.homeScreen: - return MaterialPageRoute( - builder: (context) => const OrganizationFeed(key: Key('HomeScreen')), - ); - - // Returns the MainScreen Widget - case Routes.mainScreen: - final MainScreenArgs mainScreenArgs = - settings.arguments! as MainScreenArgs; - // final bool fromSignUp = settings.arguments! as bool; - return MaterialPageRoute( - builder: (context) => MainScreen( - key: const Key('MainScreen'), - mainScreenArgs: mainScreenArgs, - ), - ); - - // Returns the IndividualPostView Widget - case Routes.individualPost: - final Post post = settings.arguments! as Post; - return MaterialPageRoute( - builder: (context) => IndividualPostView( - key: const Key('IndividualPost'), - post: post, - ), - ); - - // Returns the PinnedPostPgae Widget - case Routes.pinnedPostPage: - final List pinnedPosts = settings.arguments! as List; - return MaterialPageRoute( - builder: (context) => PinnedPostPage(pinnedPosts: pinnedPosts), - ); - - // Returns the ExploreEvents Widget - case Routes.exploreEventsScreen: - return MaterialPageRoute( - builder: (context) => const ExploreEvents(key: Key('ExploreEvents')), - ); - - // Returns the EventInfoPage Widget - case Routes.eventInfoPage: - final Map args = - settings.arguments! as Map; - return MaterialPageRoute( - builder: (context) => EventInfoPage( - key: const Key('EventInfo'), - args: args, - ), - ); - - // Returns the CreateEventPage Widget - case Routes.createEventPage: - return MaterialPageRoute( - builder: (context) => const CreateEventPage(key: Key('CreateEvent')), - ); - - // Returns the ProfilePage Widget - case Routes.profilePage: - return MaterialPageRoute( - builder: (context) => const ProfilePage(key: Key('Profile')), - ); - - // Returns the EditProfilePage Widget - case Routes.editProfilePage: - return MaterialPageRoute( - builder: (context) => const EditProfilePage(key: Key('EditProfile')), - ); - - // Returns the JoinOrganizationAfterAuth Widget - case Routes.joinOrg: - final String id = settings.arguments!.toString(); - return MaterialPageRoute( - builder: (context) => JoinOrganisationAfterAuth( - key: const Key('JoinOrganisationAfterAuth'), - orgId: id, - ), - ); - - case Routes.requestAccess: - final OrgInfo org = settings.arguments! as OrgInfo; - return CupertinoPageRoute( - builder: (context) => SendAccessRequest( - key: const Key('Signup'), - org: org, - ), - ); - // Returns the EditEventPage Widget - case Routes.editEventPage: - final Event event = settings.arguments! as Event; - return MaterialPageRoute( - builder: (context) => EditEventPage( - key: const Key('EditEvent'), - event: event, - ), - ); - - // Returns the AppSettingsPage Widget - case Routes.appSettings: - return MaterialPageRoute( - builder: (context) => const AppSettingsPage(key: Key('AppSettings')), - ); - - // Returns the ChatMessageScreen Widget - case Routes.chatMessageScreen: - final List arguments = settings.arguments! as List; - final String chatId = arguments[0] as String; - final DirectChatViewModel model = arguments[1] as DirectChatViewModel; - return MaterialPageRoute( - builder: (context) => ChatMessageScreen( - key: const Key('ChatMessageScreen'), - chatId: chatId, - model: model, - ), - ); - - // Returns the MapScreen Widget - case Routes.mapScreen: - final arguments = settings.arguments! as Map; - final model = arguments['model'] as CreateEventViewModel?; - final latitude = arguments['latitude'] as double; - final longitude = arguments['longitude'] as double; - return MaterialPageRoute( - builder: (context) => MapScreen( - model, - latitude, - longitude, - key: const Key('MapScreen'), - ), - ); - case Routes.calendar: - return MaterialPageRoute( - builder: (context) => EventCalendar( - settings.arguments! as List, - key: const Key('Calendar'), - ), - ); - case Routes.eventTasks: - final eventId = settings.arguments! as String; - return MaterialPageRoute( - builder: (context) => EventTasksPage( - eventId: eventId, - key: const Key('EventTasks'), - ), - ); - case Routes.userTasks: - return MaterialPageRoute( - builder: (context) => const UserTasksPage( - key: Key('UserTasks'), - ), - ); - case Routes.addTask: - final eventId = settings.arguments! as String; - return MaterialPageRoute( - builder: (context) => CreateTaskPage( - key: const Key('AddTask'), - eventId: eventId, - ), - ); - case Routes.editTask: - final task = settings.arguments! as Task; - return MaterialPageRoute( - builder: (context) => EditTaskPage( - key: const Key('EditTask'), - task: task, - ), - ); - // Returns the DemoPageView Widget by default - case Routes.selectContact: - return MaterialPageRoute( - builder: (context) => const SelectContact(key: Key('selectContact')), - ); - default: - return MaterialPageRoute( - builder: (context) => const DemoPageView( - key: Key("DemoPage"), - ), - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/router/router-library.md b/talawa-mobile-docs/router/router-library.md deleted file mode 100644 index c8ba8c929..000000000 --- a/talawa-mobile-docs/router/router-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# router library - - - - - - - - - - - - - - - - -## Functions - -##### [generateRoute](../router/generateRoute.md)([RouteSettings](https://api.flutter.dev/flutter/widgets/RouteSettings-class.html) settings) [Route](https://api.flutter.dev/flutter/widgets/Route-class.html) - - - -The MaterialApp provides us with a property called generateRoute where -we can pass in a Function that returns a Route and takes in RouteSettings - - - - - - - - - - - - diff --git a/talawa-mobile-docs/search.md b/talawa-mobile-docs/search.md deleted file mode 100644 index 0fedbdcfd..000000000 --- a/talawa-mobile-docs/search.md +++ /dev/null @@ -1,6 +0,0 @@ -# 404 - -Oops, something's gone wrong :-( - -You've tried to visit a page that doesn't exist. Luckily this site has other -[pages](index.md). diff --git a/talawa-mobile-docs/services_chat_service/ChatService-class.md b/talawa-mobile-docs/services_chat_service/ChatService-class.md deleted file mode 100644 index 113930640..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService-class.md +++ /dev/null @@ -1,152 +0,0 @@ - - - -# ChatService class - - - - - - - - - -

ChatService class provides different services for direct chats of the user.

-

Services include:

-
    -
  • sendMessageToDirectChat - used to send messages.
  • -
  • getDirectChatsByUserId - used to get all chats by the user.
  • -
  • getDirectChatMessagesByChatId - used to get all chats of a user with another user.
  • -
- - - - -## Constructors - -[ChatService](../services_chat_service/ChatService/ChatService.md) () - - - - -## Properties - -##### [chatListStream](../services_chat_service/ChatService/chatListStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md)> - - - - -_read-only_ - - - -##### [chatMessagesStream](../services_chat_service/ChatService/chatMessagesStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[ChatMessage](../models_chats_chat_message/ChatMessage-class.md)> - - - - -_read-only_ - - - -##### [chatStream](../services_chat_service/ChatService/chatStream.md) ↔ [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[QueryResult](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/QueryResult-class.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?>> - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [getDirectChatMessagesByChatId](../services_chat_service/ChatService/getDirectChatMessagesByChatId.md)(dynamic chatId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get all the chat messages of a particular chat by the user. - - - - -##### [getDirectChatsByUserId](../services_chat_service/ChatService/getDirectChatsByUserId.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get all the chats by the user. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [sendMessageToDirectChat](../services_chat_service/ChatService/sendMessageToDirectChat.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) messageContent) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to send the message in the direct chats. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/ChatService.md b/talawa-mobile-docs/services_chat_service/ChatService/ChatService.md deleted file mode 100644 index 3dfdea61a..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/ChatService.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# ChatService constructor - - - - - - - -ChatService() - - - - - -## Implementation - -```dart -ChatService() { - _dbFunctions = locator(); - _chatListStream = _chatController.stream.asBroadcastStream(); - _chatMessagesStream = _chatMessageController.stream.asBroadcastStream(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/chatListStream.md b/talawa-mobile-docs/services_chat_service/ChatService/chatListStream.md deleted file mode 100644 index 2f7d5759e..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/chatListStream.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# chatListStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[ChatListTileDataModel](../../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md)> chatListStream - - - - - - - - -## Implementation - -```dart -Stream get chatListStream => _chatListStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/chatMessagesStream.md b/talawa-mobile-docs/services_chat_service/ChatService/chatMessagesStream.md deleted file mode 100644 index 740897507..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/chatMessagesStream.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# chatMessagesStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[ChatMessage](../../models_chats_chat_message/ChatMessage-class.md)> chatMessagesStream - - - - - - - - -## Implementation - -```dart -Stream get chatMessagesStream => _chatMessagesStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/chatStream.md b/talawa-mobile-docs/services_chat_service/ChatService/chatStream.md deleted file mode 100644 index be41fbc55..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/chatStream.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# chatStream property - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[QueryResult](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/QueryResult-class.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?>> chatStream - -_read / write_ - - - - - - -## Implementation - -```dart -late Stream chatStream; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatMessagesByChatId.md b/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatMessagesByChatId.md deleted file mode 100644 index bf6686a9c..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatMessagesByChatId.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# getDirectChatMessagesByChatId method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getDirectChatMessagesByChatId -(dynamic chatId) - - - - - -

This function is used to get all the chat messages of a particular chat by the user.

-

parameters required:

-
    -
  • chatId - id of the direct chat.
  • -
- - - -## Implementation - -```dart -Future getDirectChatMessagesByChatId(chatId) async { - // trigger graphQL query to get all the chat messages of a particular chat using [chatId]. - final String query = - ChatQueries().fetchDirectChatMessagesByChatId(chatId as String); - - final result = await _dbFunctions.gqlAuthQuery(query); - - final messages = result.data['directChatsMessagesByChatID'] as List; - - messages.forEach((message) { - final chatMessage = ChatMessage.fromJson(message as Map); - _chatMessageController.add(chatMessage); - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatsByUserId.md b/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatsByUserId.md deleted file mode 100644 index 0ae91a2ae..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/getDirectChatsByUserId.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# getDirectChatsByUserId method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getDirectChatsByUserId -() - - - - - -

This function is used to get all the chats by the user.

-

parameters required:

-
    -
  • usedId - current user id, to get all the direct chats associated with this id.
  • -
- - - -## Implementation - -```dart -Future getDirectChatsByUserId() async { - final userId = _userConfig.currentUser.id; - - // trigger graphQL query to get all the chats of the user using [userId]. - final String query = ChatQueries().fetchDirectChatsByUserId(userId!); - - final result = await _dbFunctions.gqlAuthQuery(query); - - final directMessageList = result.data['directChatsByUserID'] as List; - - // loop through the result [directMessageList] and append the element to the directChat. - directMessageList.forEach((chat) { - final directChat = - ChatListTileDataModel.fromJson(chat as Map); - - directChat.users!.forEach((element) { - if (element.id != userId) _chatController.add(directChat); - }); - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/ChatService/sendMessageToDirectChat.md b/talawa-mobile-docs/services_chat_service/ChatService/sendMessageToDirectChat.md deleted file mode 100644 index 903348164..000000000 --- a/talawa-mobile-docs/services_chat_service/ChatService/sendMessageToDirectChat.md +++ /dev/null @@ -1,57 +0,0 @@ - - - -# sendMessageToDirectChat method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> sendMessageToDirectChat -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) messageContent) - - - - - -

This function is used to send the message in the direct chats.

-

parameters required:

-
    -
  • chatId - id of the direct chat where message need to be send.
  • -
  • messageContent - the text that need to be send.
  • -
- - - -## Implementation - -```dart -Future sendMessageToDirectChat( - String chatId, - String messageContent, -) async { - // trigger graphQL mutation to push the message in the Database. - final result = await _dbFunctions.gqlAuthMutation( - ChatQueries().sendMessageToDirectChat(), - variables: {"chatId": chatId, "messageContent": messageContent}, - ); - - final message = ChatMessage.fromJson( - result.data['sendMessageToDirectChat'] as Map, - ); - - _chatMessageController.add(message); - - debugPrint(result.data.toString()); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_chat_service/services_chat_service-library.md b/talawa-mobile-docs/services_chat_service/services_chat_service-library.md deleted file mode 100644 index a59fdbcae..000000000 --- a/talawa-mobile-docs/services_chat_service/services_chat_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_service library - - - - - - - - - - - -## Classes - -##### [ChatService](../services_chat_service/ChatService-class.md) - - - -ChatService class provides different services for direct chats of the user. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_comment_service/CommentService-class.md b/talawa-mobile-docs/services_comment_service/CommentService-class.md deleted file mode 100644 index b3599d7f7..000000000 --- a/talawa-mobile-docs/services_comment_service/CommentService-class.md +++ /dev/null @@ -1,115 +0,0 @@ - - - -# CommentService class - - - - - - - - - -

CommentService class have different member functions which provides service in the context of commenting.

-

Services include:

-
    -
  • createComments - used to add comment on the post.
  • -
  • getCommentsForPost - used to get all comments on the post.
  • -
- - - - -## Constructors - -[CommentService](../services_comment_service/CommentService/CommentService.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createComments](../services_comment_service/CommentService/createComments.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to add comment on the post. - - - - -##### [getCommentsForPost](../services_comment_service/CommentService/getCommentsForPost.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to fetch all comments on the post. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_comment_service/CommentService/CommentService.md b/talawa-mobile-docs/services_comment_service/CommentService/CommentService.md deleted file mode 100644 index c59a7cc7e..000000000 --- a/talawa-mobile-docs/services_comment_service/CommentService/CommentService.md +++ /dev/null @@ -1,31 +0,0 @@ - - - -# CommentService constructor - - - - - - - -CommentService() - - - - - -## Implementation - -```dart -CommentService() { - _dbFunctions = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_comment_service/CommentService/createComments.md b/talawa-mobile-docs/services_comment_service/CommentService/createComments.md deleted file mode 100644 index 741c7348c..000000000 --- a/talawa-mobile-docs/services_comment_service/CommentService/createComments.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# createComments method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> createComments -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text) - - - - - -

This function is used to add comment on the post.

-

parameters:

-
    -
  • postId - Post id where comment need to be added.
  • -
  • text - content of the comment.
  • -
- - - -## Implementation - -```dart -Future createComments(String postId, String text) async { - print("comment service called"); - final String createCommentQuery = CommentQueries().createComment(); - final result = await _dbFunctions.gqlAuthMutation( - createCommentQuery, - variables: { - 'postId': postId, //Add your variables here - 'text': text - }, - ); - print("comment added"); - print(result); - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_comment_service/CommentService/getCommentsForPost.md b/talawa-mobile-docs/services_comment_service/CommentService/getCommentsForPost.md deleted file mode 100644 index 956c67208..000000000 --- a/talawa-mobile-docs/services_comment_service/CommentService/getCommentsForPost.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# getCommentsForPost method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) getCommentsForPost -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId) - - - - - -

This function is used to fetch all comments on the post.

-

parameters:

-
    -
  • postId - Post id for which comments need to be fetched.
  • -
- - - -## Implementation - -```dart -Future getCommentsForPost(String postId) async { - final String getCommmentQuery = CommentQueries().getPostsComments(postId); - final result = await _dbFunctions.gqlAuthMutation(getCommmentQuery); - if (result.data != null) { - return result.data["commentsByPost"] as List; - } - return []; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_comment_service/services_comment_service-library.md b/talawa-mobile-docs/services_comment_service/services_comment_service-library.md deleted file mode 100644 index 392683045..000000000 --- a/talawa-mobile-docs/services_comment_service/services_comment_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# comment_service library - - - - - - - - - - - -## Classes - -##### [CommentService](../services_comment_service/CommentService-class.md) - - - -CommentService class have different member functions which provides service in the context of commenting. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions-class.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions-class.md deleted file mode 100644 index 90c047dce..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions-class.md +++ /dev/null @@ -1,264 +0,0 @@ - - - -# DataBaseMutationFunctions class - - - - - - - - - -

DataBaseMutationFunctions class provides different services that are under the context of graphQL mutations and queries.

-

Services include:

-
    -
  • encounteredExceptionOrError
  • -
  • gqlAuthQuery
  • -
  • gqlAuthMutation
  • -
  • gqlNonAuthMutation
  • -
  • gqlNonAuthQuery
  • -
  • refreshAccessToken
  • -
  • fetchOrgById
  • -
- - - - -## Constructors - -[DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions/DataBaseMutationFunctions.md) () - - - - -## Properties - -##### [clientAuth](../services_database_mutation_functions/DataBaseMutationFunctions/clientAuth.md) ↔ [GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) - - - -Client Auth for handling authenticated request. -_read / write_ - - - -##### [clientNonAuth](../services_database_mutation_functions/DataBaseMutationFunctions/clientNonAuth.md) ↔ [GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) - - - -Client Auth for handling non-authenticated request. -_read / write_ - - - -##### [emailAccountPresent](../services_database_mutation_functions/DataBaseMutationFunctions/emailAccountPresent.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [memberRequestExist](../services_database_mutation_functions/DataBaseMutationFunctions/memberRequestExist.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [notifFeatureNotInstalled](../services_database_mutation_functions/DataBaseMutationFunctions/notifFeatureNotInstalled.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [organizationNotFound](../services_database_mutation_functions/DataBaseMutationFunctions/organizationNotFound.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [refreshAccessTokenExpiredException](../services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessTokenExpiredException.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [userNotAuthenticated](../services_database_mutation_functions/DataBaseMutationFunctions/userNotAuthenticated.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [userNotFound](../services_database_mutation_functions/DataBaseMutationFunctions/userNotFound.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - -##### [wrongCredentials](../services_database_mutation_functions/DataBaseMutationFunctions/wrongCredentials.md) ↔ [GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) - - - -Graphql error for handling. -_read / write_ - - - - - -## Methods - -##### [encounteredExceptionOrError](../services_database_mutation_functions/DataBaseMutationFunctions/encounteredExceptionOrError.md)([OperationException](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/OperationException-class.html) exception, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showSnackBar = true}) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? - - - -This function is used to check if any exceptions or error encountered. The return type is boolean. - - - - -##### [fetchOrgById](../services_database_mutation_functions/DataBaseMutationFunctions/fetchOrgById.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) id) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function fetch the organization using the id passed. - - - - -##### [gqlAuthMutation](../services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthMutation.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) mutation, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to run the graph-ql mutation for authenticated user. - - - - -##### [gqlAuthQuery](../services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthQuery.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) query, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to run the graph-ql query for authentication. - - - - -##### [gqlNonAuthMutation](../services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthMutation.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) mutation, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reCall = true}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to run the graph-ql mutation to authenticate the non signed-in user. - - - - -##### [gqlNonAuthQuery](../services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthQuery.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) query, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[QueryResult](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/QueryResult-class.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?>?> - - - -This function is used to run the graph-ql query for the non signed-in user. - - - - -##### [init](../services_database_mutation_functions/DataBaseMutationFunctions/init.md)() void - - - -initialization function. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [refreshAccessToken](../services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessToken.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function is used to refresh the Authenication token to access the application. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/DataBaseMutationFunctions.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/DataBaseMutationFunctions.md deleted file mode 100644 index cd5b61c64..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/DataBaseMutationFunctions.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# DataBaseMutationFunctions constructor - - - - - - - -DataBaseMutationFunctions() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientAuth.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientAuth.md deleted file mode 100644 index 4c673497f..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientAuth.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# clientAuth property - - - - - - - -[GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) clientAuth - -_read / write_ - - - -

Client Auth for handling authenticated request.

- - - -## Implementation - -```dart -late GraphQLClient clientAuth; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientNonAuth.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientNonAuth.md deleted file mode 100644 index 4b73d5782..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/clientNonAuth.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# clientNonAuth property - - - - - - - -[GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) clientNonAuth - -_read / write_ - - - -

Client Auth for handling non-authenticated request.

- - - -## Implementation - -```dart -late GraphQLClient clientNonAuth; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/emailAccountPresent.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/emailAccountPresent.md deleted file mode 100644 index 62e143ed2..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/emailAccountPresent.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# emailAccountPresent property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) emailAccountPresent - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError emailAccountPresent = - const GraphQLError(message: 'Email address already exists'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/encounteredExceptionOrError.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/encounteredExceptionOrError.md deleted file mode 100644 index f08740a42..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/encounteredExceptionOrError.md +++ /dev/null @@ -1,175 +0,0 @@ - - - -# encounteredExceptionOrError method - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)? encounteredExceptionOrError -([OperationException](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/OperationException-class.html) exception, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showSnackBar = true}) - - - - - -

This function is used to check if any exceptions or error encountered. The return type is boolean.

-

params:

-
    -
  • exception: OperationException which occur when calling for graphql post request
  • -
  • showSnackBar: Tell if the the place where this function is called wants a SnackBar on error
  • -
-

returns:

-
    -
  • bool?: returns a bool whether or not their is error, can be null
  • -
- - - -## Implementation - -```dart -bool? encounteredExceptionOrError( - OperationException exception, { - bool showSnackBar = true, -}) { - // if server link is wrong. - if (exception.linkException != null) { - // debugPrint(exception.linkException.toString()); - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorSnackBar( - "Server not running/wrong url", - MessageType.info, - ), - ); - } - return false; - } - - /// looping through graphQL errors. - debugPrint(exception.graphqlErrors.toString()); - for (int i = 0; i < exception.graphqlErrors.length; i++) { - // if the error message is "Access Token has expired. Please refresh session.: Undefined location" - if (exception.graphqlErrors[i].message == - refreshAccessTokenExpiredException.message) { - print('token refreshed'); - refreshAccessToken(userConfig.currentUser.refreshToken!).then( - (value) => graphqlConfig - .getToken() - .then((value) => databaseFunctions.init()), - ); - print('client refreshed'); - return true; - } - - /// if the error message is "User is not authenticated" - if (exception.graphqlErrors[i].message == userNotAuthenticated.message) { - print('client refreshed'); - refreshAccessToken(userConfig.currentUser.refreshToken!).then( - (value) => graphqlConfig - .getToken() - .then((value) => databaseFunctions.init()), - ); - return true; - } - - /// if the error message is "User not found" - if (exception.graphqlErrors[i].message == userNotFound.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "No account registered with this email", - MessageType.error, - ), - ); - } - return false; - } - - /// if the error message is "Membership Request already exists" - if (exception.graphqlErrors[i].message == memberRequestExist.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Membership request already exist", - MessageType.error, - ), - ); - } - return false; - } - - /// if the error message is "Invalid credentials" - if (exception.graphqlErrors[i].message == wrongCredentials.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Enter a valid password", - MessageType.error, - ), - ); - } - return false; - } - - /// if the error message is "Organization not found" - if (exception.graphqlErrors[i].message == organizationNotFound.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Organization Not Found", - MessageType.error, - ), - ); - } - return false; - } - - /// if the error message is "Email address already exists" - if (exception.graphqlErrors[i].message == emailAccountPresent.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Account with this email already registered", - MessageType.error, - ), - ); - } - return false; - } - if (exception.graphqlErrors[i].message == - notifFeatureNotInstalled.message) { - if (showSnackBar) { - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Notification Feature is not installed", - MessageType.error, - ), - ); - } - return false; - } - } - // if the error is unknown - - WidgetsBinding.instance.addPostFrameCallback( - (_) => navigationService.showTalawaErrorDialog( - "Something went wrong!", - MessageType.error, - ), - ); - return false; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/fetchOrgById.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/fetchOrgById.md deleted file mode 100644 index 8fb60f819..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/fetchOrgById.md +++ /dev/null @@ -1,60 +0,0 @@ - - - -# fetchOrgById method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) fetchOrgById -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) id) - - - - - -

This function fetch the organization using the id passed.

-

params:

-
    -
  • id: id that identifies a particular org
  • -
-

returns:

-
    -
  • Future<dynamic>: it returns Future of dynamic
  • -
- - - -## Implementation - -```dart -Future fetchOrgById(String id) async { - final QueryResult result = await clientNonAuth - .mutate(MutationOptions(document: gql(_query.fetchOrgById(id)))); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - fetchOrgById(id); - } - } else if (result.data != null && result.isConcrete) { - return OrgInfo.fromJson( - // ignore: collection_methods_unrelated_type - (result.data!['organizations'] as Map)[0] - as Map, - ); - } - return false; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthMutation.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthMutation.md deleted file mode 100644 index ea11a8fe9..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthMutation.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# gqlAuthMutation method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) gqlAuthMutation -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) mutation, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) - - - - - -

This function is used to run the graph-ql mutation for authenticated user.

-

params:

-
    -
  • mutation: mutation is used to change/add/delete data in graphql, for more info read graphql docs
  • -
  • variables: variables to be passed with mutation
  • -
-

returns:

-
    -
  • Future<dynamic>: it returns Future of dynamic
  • -
- - - -## Implementation - -```dart -Future gqlAuthMutation( - String mutation, { - Map? variables, -}) async { - final QueryResult result = await clientAuth.mutate( - MutationOptions( - document: gql(mutation), - variables: variables ?? {}, - ), - ); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - gqlAuthMutation(mutation, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthQuery.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthQuery.md deleted file mode 100644 index a90ff7cf5..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlAuthQuery.md +++ /dev/null @@ -1,63 +0,0 @@ - - - -# gqlAuthQuery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) gqlAuthQuery -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) query, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) - - - - - -

This function is used to run the graph-ql query for authentication.

-

params:

-
    -
  • query: query is used to fetch data in graphql, for more info read graphql docs
  • -
  • variables: variables to be passed with query
  • -
-

returns:

-
    -
  • Future<dynamic>: it returns Future of dynamic
  • -
- - - -## Implementation - -```dart -Future gqlAuthQuery( - String query, { - Map? variables, -}) async { - final QueryOptions options = QueryOptions( - document: gql(query), - variables: variables ?? {}, - ); - final QueryResult result = await clientAuth.query(options); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - gqlAuthQuery(query, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthMutation.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthMutation.md deleted file mode 100644 index 8791e72a2..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthMutation.md +++ /dev/null @@ -1,66 +0,0 @@ - - - -# gqlNonAuthMutation method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) gqlNonAuthMutation -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) mutation, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reCall = true}) - - - - - -

This function is used to run the graph-ql mutation to authenticate the non signed-in user.

-

params:

-
    -
  • mutation: mutation is used to change/add/delete data in graphql, for more info read graphql docs
  • -
  • variables: variables to be passed with mutation
  • -
  • reCall: when not first fetch call
  • -
-

returns:

-
    -
  • Future<dynamic>: it returns Future of dynamic
  • -
- - - -## Implementation - -```dart -Future gqlNonAuthMutation( - String mutation, { - Map? variables, - bool reCall = true, -}) async { - final QueryResult result = await clientNonAuth.mutate( - MutationOptions( - document: gql(mutation), - variables: variables ?? {}, - ), - ); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception! && reCall) { - gqlNonAuthMutation(mutation, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthQuery.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthQuery.md deleted file mode 100644 index 6f2ac2bdf..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/gqlNonAuthQuery.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# gqlNonAuthQuery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[QueryResult](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/QueryResult-class.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?>?> gqlNonAuthQuery -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) query, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>? variables}) - - - - - -

This function is used to run the graph-ql query for the non signed-in user.

-

params:

-
    -
  • query: query is used to fetch data in graphql, for more info read graphql docs
  • -
  • variables: variables to be passed with query
  • -
-

returns:

-
    -
  • Future<QueryResult<Object?>?>: it returns Future of QueryResult, contains all data
  • -
- - - -## Implementation - -```dart -Future?> gqlNonAuthQuery( - String query, { - Map? variables, -}) async { - final queryOptions = QueryOptions( - document: gql(query), - variables: variables ?? {}, - ); - final result = await clientNonAuth.query(queryOptions); - QueryResult? finalRes; - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - finalRes = await gqlNonAuthQuery(query, variables: variables); - } - } else if (result.data != null && result.isConcrete) { - return result; - } - return finalRes; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/init.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/init.md deleted file mode 100644 index c31b1aeb8..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/init.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# init method - - - - - - - - -void init -() - - - - - -

initialization function.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void init() { - clientNonAuth = graphqlConfig.clientToQuery(); - clientAuth = graphqlConfig.authClient(); - _query = Queries(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/memberRequestExist.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/memberRequestExist.md deleted file mode 100644 index ec1aaa4f9..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/memberRequestExist.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# memberRequestExist property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) memberRequestExist - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError memberRequestExist = - const GraphQLError(message: 'Membership Request already exists'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/notifFeatureNotInstalled.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/notifFeatureNotInstalled.md deleted file mode 100644 index 3047b0b22..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/notifFeatureNotInstalled.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# notifFeatureNotInstalled property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) notifFeatureNotInstalled - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError notifFeatureNotInstalled = const GraphQLError( - message: - 'Failed to determine project ID: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/organizationNotFound.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/organizationNotFound.md deleted file mode 100644 index 14aac023b..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/organizationNotFound.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# organizationNotFound property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) organizationNotFound - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError organizationNotFound = - const GraphQLError(message: 'Organization not found'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessToken.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessToken.md deleted file mode 100644 index b89af5e64..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessToken.md +++ /dev/null @@ -1,73 +0,0 @@ - - - -# refreshAccessToken method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> refreshAccessToken -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken) - - - - - -

This function is used to refresh the Authenication token to access the application.

-

params:

-
    -
  • refreshToken: Needed for authentication
  • -
-

returns:

-
    -
  • Future<bool>: it returns Future of dynamic
  • -
- - - -## Implementation - -```dart -Future refreshAccessToken(String refreshToken) async { - // run the graphQL mutation - final QueryResult result = await clientNonAuth.mutate( - MutationOptions( - document: gql( - _query.refreshToken(refreshToken), - ), - ), - ); - // if there is an error or exception in [result] - if (result.hasException) { - final exception = encounteredExceptionOrError(result.exception!); - if (exception!) { - refreshAccessToken(refreshToken); - } else { - navigationService.pop(); - } - } else if (result.data != null && result.isConcrete) { - userConfig.updateAccessToken( - refreshToken: (result.data!['refreshToken'] - as Map)['refreshToken'] - .toString(), - accessToken: (result.data!['refreshToken'] - as Map)['accessToken'] - .toString(), - ); - databaseFunctions.init(); - return true; - } - return false; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessTokenExpiredException.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessTokenExpiredException.md deleted file mode 100644 index 6a2180548..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/refreshAccessTokenExpiredException.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# refreshAccessTokenExpiredException property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) refreshAccessTokenExpiredException - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError refreshAccessTokenExpiredException = const GraphQLError( - message: - 'Access Token has expired. Please refresh session.: Undefined location', -); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotAuthenticated.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotAuthenticated.md deleted file mode 100644 index a812e0ddc..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotAuthenticated.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# userNotAuthenticated property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) userNotAuthenticated - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError userNotAuthenticated = - const GraphQLError(message: 'User is not authenticated'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotFound.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotFound.md deleted file mode 100644 index 032289659..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/userNotFound.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# userNotFound property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) userNotFound - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError userNotFound = const GraphQLError(message: 'User not found'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/wrongCredentials.md b/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/wrongCredentials.md deleted file mode 100644 index a0a4a26d5..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/DataBaseMutationFunctions/wrongCredentials.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# wrongCredentials property - - - - - - - -[GraphQLError](https://pub.dev/documentation/gql_exec/1.0.1-alpha+1690479830973/execution/GraphQLError-class.html) wrongCredentials - -_read / write_ - - - -

Graphql error for handling.

- - - -## Implementation - -```dart -GraphQLError wrongCredentials = - const GraphQLError(message: 'Invalid credentials'); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_database_mutation_functions/services_database_mutation_functions-library.md b/talawa-mobile-docs/services_database_mutation_functions/services_database_mutation_functions-library.md deleted file mode 100644 index 31230d7d5..000000000 --- a/talawa-mobile-docs/services_database_mutation_functions/services_database_mutation_functions-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# database_mutation_functions library - - - - - - - - - - - -## Classes - -##### [DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions-class.md) - - - -DataBaseMutationFunctions class provides different services that are under the context of graphQL mutations and queries. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService-class.md b/talawa-mobile-docs/services_event_service/EventService-class.md deleted file mode 100644 index 7a9e701c0..000000000 --- a/talawa-mobile-docs/services_event_service/EventService-class.md +++ /dev/null @@ -1,174 +0,0 @@ - - - -# EventService class - - - - - - - - - -

EventService class provides different services in the context of Event.

-

Services include:

-
    -
  • setOrgStreamSubscription : to set organization stream subscription for user.
  • -
  • getEvents : to get all events of the organization.
  • -
  • fetchRegistrantsByEvent : to fetch all registrants of an event.
  • -
  • registerForAnEvent : to register for an event.
  • -
  • deleteEvent : to delete an event.
  • -
  • editEvent : to edit the event.
  • -
  • dispose : to cancel the stream subscription of an organization.
  • -
- - - - -## Constructors - -[EventService](../services_event_service/EventService/EventService.md) () - - - - -## Properties - -##### [eventStream](../services_event_service/EventService/eventStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[Event](../models_events_event_model/Event-class.md)> - - - -The event stream. -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [deleteEvent](../services_event_service/EventService/deleteEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to delete the event. - - - - -##### [dispose](../services_event_service/EventService/dispose.md)() void - - - -This function is used to cancel the stream subscription of an organization. - - - - -##### [editEvent](../services_event_service/EventService/editEvent.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId, required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> variables}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to edit an event. - - - - -##### [fetchRegistrantsByEvent](../services_event_service/EventService/fetchRegistrantsByEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to fetch all registrants of an event. - - - - -##### [getEvents](../services_event_service/EventService/getEvents.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to fetch all the events of an organization. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [registerForAnEvent](../services_event_service/EventService/registerForAnEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to register user for an event. - - - - -##### [setOrgStreamSubscription](../services_event_service/EventService/setOrgStreamSubscription.md)() void - - - -This function is used to set stream subscription for an organization. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/EventService.md b/talawa-mobile-docs/services_event_service/EventService/EventService.md deleted file mode 100644 index 8d9d30976..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/EventService.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# EventService constructor - - - - - - - -EventService() - - - - - -## Implementation - -```dart -EventService() { - _eventStream = _eventStreamController.stream.asBroadcastStream(); - _currentOrg = _userConfig.currentOrg; - _userConfig.initialiseStream(); - setOrgStreamSubscription(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/deleteEvent.md b/talawa-mobile-docs/services_event_service/EventService/deleteEvent.md deleted file mode 100644 index 3c3c53776..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/deleteEvent.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# deleteEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) deleteEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function is used to delete the event.

-

params:

-
    -
  • eventId: id of an event
  • -
-

returns:

-
    -
  • Future<dynamic>: Information about the event deletion
  • -
- - - -## Implementation - -```dart -Future deleteEvent(String eventId) async { - navigationService.pushDialog( - const CustomProgressDialog(key: Key('DeleteEventProgress')), - ); - final tokenResult = await _dbFunctions - .refreshAccessToken(userConfig.currentUser.refreshToken!); - debugPrint(tokenResult.toString()); - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().deleteEvent(eventId), - ); - navigationService.pop(); - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/dispose.md b/talawa-mobile-docs/services_event_service/EventService/dispose.md deleted file mode 100644 index 5eb528fee..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/dispose.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# dispose method - - - - - - - - -void dispose -() - - - - - -

This function is used to cancel the stream subscription of an organization.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void dispose() { - _currentOrganizationStreamSubscription.cancel(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/editEvent.md b/talawa-mobile-docs/services_event_service/EventService/editEvent.md deleted file mode 100644 index 51f6f640e..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/editEvent.md +++ /dev/null @@ -1,68 +0,0 @@ - - - -# editEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> editEvent -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId, required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> variables}) - - - - - -

This function is used to edit an event.

-

params:

-
    -
  • eventId: id of an event
  • -
  • variables: this will be map type and contain all the event details need to be update.
  • -
-

returns:

-
    -
  • Future<void>: void return
  • -
- - - -## Implementation - -```dart -Future editEvent({ - required String eventId, - required Map variables, -}) async { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('EditEventProgress'), - ), - ); - final tokenResult = await _dbFunctions - .refreshAccessToken(userConfig.currentUser.refreshToken!); - debugPrint(tokenResult.toString()); - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().updateEvent(eventId: eventId), - variables: variables, - ); - navigationService.pop(); - if (result != null) { - navigationService.removeAllAndPush( - Routes.exploreEventsScreen, - Routes.mainScreen, - arguments: MainScreenArgs(mainScreenIndex: 0, fromSignUp: false), - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/eventStream.md b/talawa-mobile-docs/services_event_service/EventService/eventStream.md deleted file mode 100644 index e243c8385..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/eventStream.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# eventStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[Event](../../models_events_event_model/Event-class.md)> eventStream - - - - - -

The event stream.

-

params: -None -returns:

-
    -
  • Stream<Event>: returns the event stream
  • -
- - - -## Implementation - -```dart -Stream get eventStream => _eventStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/fetchRegistrantsByEvent.md b/talawa-mobile-docs/services_event_service/EventService/fetchRegistrantsByEvent.md deleted file mode 100644 index 512594624..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/fetchRegistrantsByEvent.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# fetchRegistrantsByEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) fetchRegistrantsByEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function is used to fetch all registrants of an event.

-

params:

-
    -
  • eventId: id of an event.
  • -
-

returns:

-
    -
  • Future<dynamic>: Information about event registrants.
  • -
- - - -## Implementation - -```dart -Future fetchRegistrantsByEvent(String eventId) async { - await _dbFunctions.refreshAccessToken(userConfig.currentUser.refreshToken!); - final result = await _dbFunctions.gqlAuthQuery( - EventQueries().registrantsByEvent(eventId), - ); - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/getEvents.md b/talawa-mobile-docs/services_event_service/EventService/getEvents.md deleted file mode 100644 index 031bd6276..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/getEvents.md +++ /dev/null @@ -1,62 +0,0 @@ - - - -# getEvents method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getEvents -() - - - - - -

This function is used to fetch all the events of an organization.

-

params: - None

-

returns:

-
    -
  • Future<void>: void
  • -
- - - -## Implementation - -```dart -Future getEvents() async { - // refresh user's access token - await _dbFunctions.refreshAccessToken(userConfig.currentUser.refreshToken!); - _dbFunctions.init(); - - // get current organization id - final String currentOrgID = _currentOrg.id!; - // mutation to fetch the events - final String mutation = EventQueries().fetchOrgEvents(currentOrgID); - final result = await _dbFunctions.gqlAuthMutation(mutation); - - if (result == null) return; - final List eventsJson = result.data!["eventsByOrganization"] as List; - eventsJson.forEach((eventJsonData) { - final Event event = Event.fromJson(eventJsonData as Map); - event.isRegistered = event.registrants?.any( - (registrant) => registrant.id == _userConfig.currentUser.id, - ) ?? - false; - _eventStreamController.add(event); - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/registerForAnEvent.md b/talawa-mobile-docs/services_event_service/EventService/registerForAnEvent.md deleted file mode 100644 index d0714cd54..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/registerForAnEvent.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# registerForAnEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) registerForAnEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function is used to register user for an event.

-

params:

-
    -
  • eventId: id of an event.
  • -
-

returns:

-
    -
  • Future<dynamic>: Information about the event registration.
  • -
- - - -## Implementation - -```dart -Future registerForAnEvent(String eventId) async { - final tokenResult = await _dbFunctions - .refreshAccessToken(userConfig.currentUser.refreshToken!); - debugPrint(tokenResult.toString()); - final Map variables = {'eventId': eventId}; - final result = await _dbFunctions.gqlAuthMutation( - EventQueries().registerForEvent(), - variables: variables, - ); - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/EventService/setOrgStreamSubscription.md b/talawa-mobile-docs/services_event_service/EventService/setOrgStreamSubscription.md deleted file mode 100644 index 3aae01406..000000000 --- a/talawa-mobile-docs/services_event_service/EventService/setOrgStreamSubscription.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# setOrgStreamSubscription method - - - - - - - - -void setOrgStreamSubscription -() - - - - - -

This function is used to set stream subscription for an organization.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void setOrgStreamSubscription() { - _currentOrganizationStreamSubscription = - _userConfig.currentOrgInfoStream.listen((updatedOrganization) { - _currentOrg = updatedOrganization; - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_event_service/services_event_service-library.md b/talawa-mobile-docs/services_event_service/services_event_service-library.md deleted file mode 100644 index 61682396c..000000000 --- a/talawa-mobile-docs/services_event_service/services_event_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_service library - - - - - - - - - - - -## Classes - -##### [EventService](../services_event_service/EventService-class.md) - - - -EventService class provides different services in the context of Event. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig-class.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig-class.md deleted file mode 100644 index 9d5a105a2..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# GraphqlConfig class - - - - - - - - - -

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. -Talawa uses graphQL for the integrating with the API's. -You can go through talawa-api, here. -GraphqlConfig class provides service to configure graph ql API with talawa mobile-app.

- - - - -## Constructors - -[GraphqlConfig](../services_graphql_config/GraphqlConfig/GraphqlConfig.md) () - - - - -## Properties - -##### [displayImgRoute](../services_graphql_config/GraphqlConfig/displayImgRoute.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [httpLink](../services_graphql_config/GraphqlConfig/httpLink.md) ↔ [HttpLink](https://pub.dev/documentation/gql_http_link/1.0.1/gql_http_link/HttpLink-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [webSocketLink](../services_graphql_config/GraphqlConfig/webSocketLink.md) ↔ [WebSocketLink](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/WebSocketLink-class.html) - - - - -_read / write_ - - - - - -## Methods - -##### [authClient](../services_graphql_config/GraphqlConfig/authClient.md)() [GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) - - - - - - - - -##### [clientToQuery](../services_graphql_config/GraphqlConfig/clientToQuery.md)() [GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) - - - - - - - - -##### [getOrgUrl](../services_graphql_config/GraphqlConfig/getOrgUrl.md)() void - - - -This function is used to get the organization URL. - - - - -##### [getToken](../services_graphql_config/GraphqlConfig/getToken.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to get user the access token. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [test](../services_graphql_config/GraphqlConfig/test.md)() void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [orgURI](../services_graphql_config/GraphqlConfig/orgURI.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [token](../services_graphql_config/GraphqlConfig/token.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - - - - - - -## Constants - -##### [imageUrlKey](../services_graphql_config/GraphqlConfig/imageUrlKey-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [urlKey](../services_graphql_config/GraphqlConfig/urlKey-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/GraphqlConfig.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/GraphqlConfig.md deleted file mode 100644 index 035b0463c..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/GraphqlConfig.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# GraphqlConfig constructor - - - - - - - -GraphqlConfig() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/authClient.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/authClient.md deleted file mode 100644 index aaacdd320..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/authClient.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# authClient method - - - - - - - - -[GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) authClient -() - - - - - - - - -## Implementation - -```dart -GraphQLClient authClient() { - final AuthLink authLink = AuthLink(getToken: () async => 'Bearer $token'); - final Link finalAuthLink = authLink.concat(httpLink); - return GraphQLClient( - cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - link: finalAuthLink, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/clientToQuery.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/clientToQuery.md deleted file mode 100644 index 25b35a9ac..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/clientToQuery.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# clientToQuery method - - - - - - - - -[GraphQLClient](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/GraphQLClient-class.html) clientToQuery -() - - - - - - - - -## Implementation - -```dart -GraphQLClient clientToQuery() { - //TODO: Implement websocket link from OrgUrl - // final link = Link.split( - // (request) => request.isSubscription, webSocketLink, httpLink); - return GraphQLClient( - cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - link: httpLink, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/displayImgRoute.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/displayImgRoute.md deleted file mode 100644 index 0f5ca8520..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/displayImgRoute.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# displayImgRoute property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? displayImgRoute - -_read / write_ - - - - - - -## Implementation - -```dart -String? displayImgRoute; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getOrgUrl.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getOrgUrl.md deleted file mode 100644 index fceac943c..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getOrgUrl.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# getOrgUrl method - - - - - - - - -void getOrgUrl -() - - - - - -

This function is used to get the organization URL.

- - - -## Implementation - -```dart -void getOrgUrl() { - final box = Hive.box('url'); - final String? url = box.get(urlKey) as String?; - final String? imgUrl = box.get(imageUrlKey) as String?; - orgURI = url ?? ' '; - displayImgRoute = imgUrl ?? ' '; - httpLink = HttpLink(orgURI!); - clientToQuery(); - authClient(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getToken.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getToken.md deleted file mode 100644 index e2d6dda0d..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/getToken.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# getToken method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) getToken -() - - - - - -

This function is used to get user the access token.

- - - -## Implementation - -```dart -Future getToken() async { - final authToken = userConfig.currentUser.authToken; - token = authToken; - getOrgUrl(); - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/httpLink.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/httpLink.md deleted file mode 100644 index 763c79612..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/httpLink.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# httpLink property - - - - - - - -[HttpLink](https://pub.dev/documentation/gql_http_link/1.0.1/gql_http_link/HttpLink-class.html) httpLink - -_read / write_ - - - - - - -## Implementation - -```dart -late HttpLink httpLink; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/imageUrlKey-constant.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/imageUrlKey-constant.md deleted file mode 100644 index e12d339b1..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/imageUrlKey-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# imageUrlKey constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const imageUrlKey - - - - - - - - -## Implementation - -```dart -static const imageUrlKey = "imageUrl"; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/orgURI.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/orgURI.md deleted file mode 100644 index 4c6dd0299..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/orgURI.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgURI property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? orgURI - -_read / write_ - - - - - - -## Implementation - -```dart -static String? orgURI = ' '; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/test.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/test.md deleted file mode 100644 index 8b19dcfa4..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/test.md +++ /dev/null @@ -1,39 +0,0 @@ - - - -# test method - - - - - - - - -void test -() - - - - - - - - -## Implementation - -```dart -void test() { - httpLink = HttpLink( - 'https://talawa-graphql-api.herokuapp.com/graphql', - httpClient: MockHttpClient(), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/token.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/token.md deleted file mode 100644 index 16321bc25..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/token.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# token property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? token - -_read / write_ - - - - - - -## Implementation - -```dart -static String? token; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/urlKey-constant.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/urlKey-constant.md deleted file mode 100644 index d90752c59..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/urlKey-constant.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# urlKey constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const urlKey - - - - - - - - -## Implementation - -```dart -static const urlKey = "url"; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/webSocketLink.md b/talawa-mobile-docs/services_graphql_config/GraphqlConfig/webSocketLink.md deleted file mode 100644 index 1284f5e82..000000000 --- a/talawa-mobile-docs/services_graphql_config/GraphqlConfig/webSocketLink.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# webSocketLink property - - - - - - - -[WebSocketLink](https://pub.dev/documentation/graphql/5.2.0-beta.4/graphql/WebSocketLink-class.html) webSocketLink - -_read / write_ - - - - - - -## Implementation - -```dart -late WebSocketLink webSocketLink; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/MockHttpClient-class.md b/talawa-mobile-docs/services_graphql_config/MockHttpClient-class.md deleted file mode 100644 index 44dbf5957..000000000 --- a/talawa-mobile-docs/services_graphql_config/MockHttpClient-class.md +++ /dev/null @@ -1,203 +0,0 @@ - - - -# MockHttpClient class - - - - - - - - - -

A mock HTTP client designed for use when testing code that uses BaseClient.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [Mock](https://pub.dev/documentation/mockito/5.4.0/mockito/Mock-class.html) -- MockHttpClient - -**Implemented types** - -- [Client](https://pub.dev/documentation/http/0.13.6/http/Client-class.html) - - - - - - - -## Constructors - -[MockHttpClient](../services_graphql_config/MockHttpClient/MockHttpClient.md) () - - - - -## Properties - -##### [hashCode](https://pub.dev/documentation/mockito/5.4.0/mockito/Mock/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [close](https://pub.dev/documentation/http/0.13.6/http/Client/close.html)() void - - - -Closes the client and cleans up any resources associated with it. -_inherited_ - - - -##### [delete](https://pub.dev/documentation/http/0.13.6/http/Client/delete.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers, [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? body, [Encoding](https://api.flutter.dev/flutter/dart-convert/Encoding-class.html)? encoding}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP DELETE request with the given headers to the given URL. -_inherited_ - - - -##### [get](https://pub.dev/documentation/http/0.13.6/http/Client/get.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP GET request with the given headers to the given URL. -_inherited_ - - - -##### [head](https://pub.dev/documentation/http/0.13.6/http/Client/head.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP HEAD request with the given headers to the given URL. -_inherited_ - - - -##### [noSuchMethod](https://pub.dev/documentation/mockito/5.4.0/mockito/Mock/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation, {[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? returnValue, [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? returnValueForMissingStub = deferToDefaultResponse}) dynamic - - - -Handles method stubbing, method call verification, and real method calls. -_inherited_ - - - -##### [patch](https://pub.dev/documentation/http/0.13.6/http/Client/patch.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers, [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? body, [Encoding](https://api.flutter.dev/flutter/dart-convert/Encoding-class.html)? encoding}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP PATCH request with the given headers and body to the given -URL. -_inherited_ - - - -##### [post](https://pub.dev/documentation/http/0.13.6/http/Client/post.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers, [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? body, [Encoding](https://api.flutter.dev/flutter/dart-convert/Encoding-class.html)? encoding}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP POST request with the given headers and body to the given -URL. -_inherited_ - - - -##### [put](https://pub.dev/documentation/http/0.13.6/http/Client/put.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers, [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)? body, [Encoding](https://api.flutter.dev/flutter/dart-convert/Encoding-class.html)? encoding}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Response](https://pub.dev/documentation/http/0.13.6/http/Response-class.html)> - - - -Sends an HTTP PUT request with the given headers and body to the given -URL. -_inherited_ - - - -##### [read](https://pub.dev/documentation/http/0.13.6/http/Client/read.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> - - - -Sends an HTTP GET request with the given headers to the given URL and -returns a Future that completes to the body of the response as a String. -_inherited_ - - - -##### [readBytes](https://pub.dev/documentation/http/0.13.6/http/Client/readBytes.html)([Uri](https://api.flutter.dev/flutter/dart-core/Uri-class.html) url, {[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [String](https://api.flutter.dev/flutter/dart-core/String-class.html)>? headers}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Uint8List](https://api.flutter.dev/flutter/dart-typed_data/Uint8List-class.html)> - - - -Sends an HTTP GET request with the given headers to the given URL and -returns a Future that completes to the body of the response as a list of -bytes. -_inherited_ - - - -##### [send](../services_graphql_config/MockHttpClient/send.md)([BaseRequest](https://pub.dev/documentation/http/0.13.6/http/BaseRequest-class.html)? request) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[StreamedResponse](https://pub.dev/documentation/http/0.13.6/http/StreamedResponse-class.html)> - - - -Sends an HTTP request and asynchronously returns the response. -_override_ - - - -##### [toString](https://pub.dev/documentation/mockito/5.4.0/mockito/Mock/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://pub.dev/documentation/mockito/5.4.0/mockito/Mock/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/MockHttpClient/MockHttpClient.md b/talawa-mobile-docs/services_graphql_config/MockHttpClient/MockHttpClient.md deleted file mode 100644 index e5de34c93..000000000 --- a/talawa-mobile-docs/services_graphql_config/MockHttpClient/MockHttpClient.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# MockHttpClient constructor - - - - - - - -MockHttpClient() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/MockHttpClient/send.md b/talawa-mobile-docs/services_graphql_config/MockHttpClient/send.md deleted file mode 100644 index d2358b904..000000000 --- a/talawa-mobile-docs/services_graphql_config/MockHttpClient/send.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# send method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[StreamedResponse](https://pub.dev/documentation/http/0.13.6/http/StreamedResponse-class.html)> send -([BaseRequest](https://pub.dev/documentation/http/0.13.6/http/BaseRequest-class.html)? request) - -_override_ - - - -

Sends an HTTP request and asynchronously returns the response.

- - - -## Implementation - -```dart -@override -Future send(http.BaseRequest? request) => - // ignore: invalid_use_of_visible_for_testing_member - super.noSuchMethod( - Invocation.method(#send, [request]), - returnValue: Future.value( - http.StreamedResponse( - Stream.fromIterable(const [[]]), - 500, - ), - ), - ) as Future; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_graphql_config/services_graphql_config-library.md b/talawa-mobile-docs/services_graphql_config/services_graphql_config-library.md deleted file mode 100644 index ddc74cda1..000000000 --- a/talawa-mobile-docs/services_graphql_config/services_graphql_config-library.md +++ /dev/null @@ -1,48 +0,0 @@ - - - - -# graphql_config library - - - - - - - - - - - -## Classes - -##### [GraphqlConfig](../services_graphql_config/GraphqlConfig-class.md) - - - -GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. -Talawa uses graphQL for the integrating with the API's. -You can go through talawa-api, here. -GraphqlConfig class provides service to configure graph ql API with talawa mobile-app. - - -##### [MockHttpClient](../services_graphql_config/MockHttpClient-class.md) - - - -A mock HTTP client designed for use when testing code that uses BaseClient. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService-class.md b/talawa-mobile-docs/services_navigation_service/NavigationService-class.md deleted file mode 100644 index 5485dfc4e..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService-class.md +++ /dev/null @@ -1,203 +0,0 @@ - - - -# NavigationService class - - - - - - - - - -

NavigationService class provides different functions as service in the context of navigation.

-

Services include:

-
    -
  • pushScreen
  • -
  • popAndPushScreen
  • -
  • pushReplacementScreen
  • -
  • removeAllAndPush
  • -
  • showSnackBar
  • -
  • pushDialog
  • -
  • showTalawaErrorWidget
  • -
  • showTalawaErrorDialog
  • -
  • pop
  • -
- - - - -## Constructors - -[NavigationService](../services_navigation_service/NavigationService/NavigationService.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [navigatorKey](../services_navigation_service/NavigationService/navigatorKey.md) ↔ [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[NavigatorState](https://api.flutter.dev/flutter/widgets/NavigatorState-class.html)> - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [fromInviteLink](../services_navigation_service/NavigationService/fromInviteLink.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> routeNames, [List](https://api.flutter.dev/flutter/dart-core/List-class.html) arguments) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [pop](../services_navigation_service/NavigationService/pop.md)() void - - - -This function pops the current state. - - - - -##### [popAndPushScreen](../services_navigation_service/NavigationService/popAndPushScreen.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function pop the initial route and push the new route to the navigator. - - - - -##### [pushDialog](../services_navigation_service/NavigationService/pushDialog.md)([Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) dialog) void - - - -This function is used to show the custom Dialog. - - - - -##### [pushReplacementScreen](../services_navigation_service/NavigationService/pushReplacementScreen.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function push the route and replace the screen. - - - - -##### [pushScreen](../services_navigation_service/NavigationService/pushScreen.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function push the route to the navigator. - - - - -##### [removeAllAndPush](../services_navigation_service/NavigationService/removeAllAndPush.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) tillRoute, {dynamic arguments}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function remove all the routes till the particular route and add new route. - - - - -##### [showSnackBar](../services_navigation_service/NavigationService/showSnackBar.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) message, {[Duration](https://api.flutter.dev/flutter/dart-core/Duration-class.html) duration = const Duration(seconds: 2)}) void - - - -This is used for the quick alert of duration: 2 seconds with text message(passed). - - - - -##### [showTalawaErrorDialog](../services_navigation_service/NavigationService/showTalawaErrorDialog.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, [MessageType](../enums_enums/MessageType.md) messageType) void - - - - - - - - -##### [showTalawaErrorSnackBar](../services_navigation_service/NavigationService/showTalawaErrorSnackBar.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, [MessageType](../enums_enums/MessageType.md) messageType, {[Duration](https://api.flutter.dev/flutter/dart-core/Duration-class.html) duration = const Duration(seconds: 2)}) void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/NavigationService.md b/talawa-mobile-docs/services_navigation_service/NavigationService/NavigationService.md deleted file mode 100644 index e32f96455..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/NavigationService.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# NavigationService constructor - - - - - - - -NavigationService() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/fromInviteLink.md b/talawa-mobile-docs/services_navigation_service/NavigationService/fromInviteLink.md deleted file mode 100644 index e65d09b54..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/fromInviteLink.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# fromInviteLink method - - - - - - - - -void fromInviteLink -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> routeNames, [List](https://api.flutter.dev/flutter/dart-core/List-class.html) arguments) - - - - - - - - -## Implementation - -```dart -void fromInviteLink(List routeNames, List arguments) { - int i = 0; - removeAllAndPush('/${routeNames[i]}', '/', arguments: arguments[i]); - for (i = 1; i < routeNames.length; i++) { - pushScreen('/${routeNames[i]}', arguments: arguments[i]); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/navigatorKey.md b/talawa-mobile-docs/services_navigation_service/NavigationService/navigatorKey.md deleted file mode 100644 index ba78b322e..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/navigatorKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# navigatorKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[NavigatorState](https://api.flutter.dev/flutter/widgets/NavigatorState-class.html)> navigatorKey - -_read / write_ - - - - - - -## Implementation - -```dart -GlobalKey navigatorKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/pop.md b/talawa-mobile-docs/services_navigation_service/NavigationService/pop.md deleted file mode 100644 index fcf90d6f1..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/pop.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# pop method - - - - - - - - -void pop -() - - - - - -

This function pops the current state.

- - - -## Implementation - -```dart -void pop() { - return navigatorKey.currentState!.pop(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/popAndPushScreen.md b/talawa-mobile-docs/services_navigation_service/NavigationService/popAndPushScreen.md deleted file mode 100644 index 2dd7b0e99..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/popAndPushScreen.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# popAndPushScreen method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) popAndPushScreen -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) - - - - - -

This function pop the initial route and push the new route to the navigator.

-

params:

-
    -
  • routeName
  • -
  • arguments : necessary data for the route
  • -
- - - -## Implementation - -```dart -Future popAndPushScreen(String routeName, {dynamic arguments}) { - navigatorKey.currentState!.pop(); - return pushScreen(routeName, arguments: arguments); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/pushDialog.md b/talawa-mobile-docs/services_navigation_service/NavigationService/pushDialog.md deleted file mode 100644 index 1c6f2e7e0..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/pushDialog.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# pushDialog method - - - - - - - - -void pushDialog -([Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) dialog) - - - - - -

This function is used to show the custom Dialog.

- - - -## Implementation - -```dart -void pushDialog(Widget dialog) { - showDialog( - context: navigatorKey.currentContext!, - barrierColor: Colors.transparent, - barrierDismissible: false, - builder: (BuildContext context) { - return dialog; - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/pushReplacementScreen.md b/talawa-mobile-docs/services_navigation_service/NavigationService/pushReplacementScreen.md deleted file mode 100644 index d424e9278..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/pushReplacementScreen.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# pushReplacementScreen method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) pushReplacementScreen -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) - - - - - -

This function push the route and replace the screen.

-

params:

-
    -
  • routeName
  • -
  • arguments : necessary data for the route
  • -
- - - -## Implementation - -```dart -Future pushReplacementScreen(String routeName, {dynamic arguments}) { - return navigatorKey.currentState! - .pushReplacementNamed(routeName, arguments: arguments); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/pushScreen.md b/talawa-mobile-docs/services_navigation_service/NavigationService/pushScreen.md deleted file mode 100644 index cee221613..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/pushScreen.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# pushScreen method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) pushScreen -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, {dynamic arguments}) - - - - - -

This function push the route to the navigator.

-

params:

-
    -
  • routeName
  • -
  • arguments : necessary data for the route
  • -
- - - -## Implementation - -```dart -Future pushScreen(String routeName, {dynamic arguments}) { - return navigatorKey.currentState! - .pushNamed(routeName, arguments: arguments); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/removeAllAndPush.md b/talawa-mobile-docs/services_navigation_service/NavigationService/removeAllAndPush.md deleted file mode 100644 index 675e9d430..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/removeAllAndPush.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# removeAllAndPush method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) removeAllAndPush -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) routeName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) tillRoute, {dynamic arguments}) - - - - - -

This function remove all the routes till the particular route and add new route.

-

params:

-
    -
  • routeName : route that need to add
  • -
  • tillRoute : remove all route until this route.
  • -
  • arguments : necessary data for the route
  • -
- - - -## Implementation - -```dart -Future removeAllAndPush( - String routeName, - String tillRoute, { - dynamic arguments, -}) { - return navigatorKey.currentState!.pushNamedAndRemoveUntil( - routeName, - ModalRoute.withName(tillRoute), - arguments: arguments, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/showSnackBar.md b/talawa-mobile-docs/services_navigation_service/NavigationService/showSnackBar.md deleted file mode 100644 index 26dee20c0..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/showSnackBar.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# showSnackBar method - - - - - - - - -void showSnackBar -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) message, {[Duration](https://api.flutter.dev/flutter/dart-core/Duration-class.html) duration = const Duration(seconds: 2)}) - - - - - -

This is used for the quick alert of duration: 2 seconds with text message(passed).

- - - -## Implementation - -```dart -void showSnackBar( - String message, { - Duration duration = const Duration(seconds: 2), -}) { - ScaffoldMessenger.of(navigatorKey.currentContext!).showSnackBar( - SnackBar( - behavior: SnackBarBehavior.floating, - duration: duration, - content: Text(message), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorDialog.md b/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorDialog.md deleted file mode 100644 index 553dac12b..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorDialog.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# showTalawaErrorDialog method - - - - - - - - -void showTalawaErrorDialog -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, [MessageType](../../enums_enums/MessageType.md) messageType) - - - - - - - - -## Implementation - -```dart -void showTalawaErrorDialog(String errorMessage, MessageType messageType) { - showDialog( - context: navigatorKey.currentContext!, - barrierColor: Colors.transparent, - barrierDismissible: false, - builder: (BuildContext context) { - return TalawaErrorDialog( - errorMessage, - messageType: messageType, - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorSnackBar.md b/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorSnackBar.md deleted file mode 100644 index 565c77500..000000000 --- a/talawa-mobile-docs/services_navigation_service/NavigationService/showTalawaErrorSnackBar.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# showTalawaErrorSnackBar method - - - - - - - - -void showTalawaErrorSnackBar -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, [MessageType](../../enums_enums/MessageType.md) messageType, {[Duration](https://api.flutter.dev/flutter/dart-core/Duration-class.html) duration = const Duration(seconds: 2)}) - - - - - - - - -## Implementation - -```dart -void showTalawaErrorSnackBar( - String errorMessage, - MessageType messageType, { - Duration duration = const Duration(seconds: 2), -}) { - ScaffoldMessenger.of(navigatorKey.currentContext!).showSnackBar( - SnackBar( - padding: EdgeInsets.zero, - content: TalawaErrorSnackBar( - messageType: messageType, - errorMessage: errorMessage, - ), - backgroundColor: const Color.fromRGBO(65, 65, 66, 1), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_navigation_service/services_navigation_service-library.md b/talawa-mobile-docs/services_navigation_service/services_navigation_service-library.md deleted file mode 100644 index 5ce8587f9..000000000 --- a/talawa-mobile-docs/services_navigation_service/services_navigation_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# navigation_service library - - - - - - - - - - - -## Classes - -##### [NavigationService](../services_navigation_service/NavigationService-class.md) - - - -NavigationService class provides different functions as service in the context of navigation. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_org_service/OrganizationService-class.md b/talawa-mobile-docs/services_org_service/OrganizationService-class.md deleted file mode 100644 index dec422519..000000000 --- a/talawa-mobile-docs/services_org_service/OrganizationService-class.md +++ /dev/null @@ -1,105 +0,0 @@ - - - -# OrganizationService class - - - - - - - - - -

OrganizationService class provides the in the context of organizations.

-

Services include:

-
    -
  • getOrgMembersList : to get all organizations members
  • -
- - - - -## Constructors - -[OrganizationService](../services_org_service/OrganizationService/OrganizationService.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [getOrgMembersList](../services_org_service/OrganizationService/getOrgMembersList.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>> - - - -This function fetch and returns the list of organization members. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_org_service/OrganizationService/OrganizationService.md b/talawa-mobile-docs/services_org_service/OrganizationService/OrganizationService.md deleted file mode 100644 index 6827db76d..000000000 --- a/talawa-mobile-docs/services_org_service/OrganizationService/OrganizationService.md +++ /dev/null @@ -1,31 +0,0 @@ - - - -# OrganizationService constructor - - - - - - - -OrganizationService() - - - - - -## Implementation - -```dart -OrganizationService() { - _dbFunctions = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_org_service/OrganizationService/getOrgMembersList.md b/talawa-mobile-docs/services_org_service/OrganizationService/getOrgMembersList.md deleted file mode 100644 index b44d1f1de..000000000 --- a/talawa-mobile-docs/services_org_service/OrganizationService/getOrgMembersList.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# getOrgMembersList method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>> getOrgMembersList -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - -

This function fetch and returns the list of organization members.

-

params:

-
    -
  • orgId : id of the organization for which members list need be fetched.
  • -
- - - -## Implementation - -```dart -Future> getOrgMembersList(String orgId) async { - final String query = Queries().fetchOrgDetailsById(orgId); - // fetching from database using graphQL mutations. - final result = await _dbFunctions.gqlAuthMutation(query); - final List orgMembersResult = - result.data['organizations'][0]['members'] as List; - final List orgMembersList = []; - orgMembersResult.forEach((jsonElement) { - final User member = - User.fromJson(jsonElement as Map, fromOrg: true); - orgMembersList.add(member); - }); - - // return list - return orgMembersList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_org_service/services_org_service-library.md b/talawa-mobile-docs/services_org_service/services_org_service-library.md deleted file mode 100644 index 13bfece06..000000000 --- a/talawa-mobile-docs/services_org_service/services_org_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# org_service library - - - - - - - - - - - -## Classes - -##### [OrganizationService](../services_org_service/OrganizationService-class.md) - - - -OrganizationService class provides the in the context of organizations. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService-class.md b/talawa-mobile-docs/services_post_service/PostService-class.md deleted file mode 100644 index 41a1ca683..000000000 --- a/talawa-mobile-docs/services_post_service/PostService-class.md +++ /dev/null @@ -1,162 +0,0 @@ - - - -# PostService class - - - - - - - - - -

PostService class provides functions in the context of a Post.

-

Services include:

-
    -
  • getPosts : to get all posts of the organization.
  • -
  • addLike : to add like to the post.
  • -
  • removeLike : to remove the like from the post.
  • -
- - - - -## Constructors - -[PostService](../services_post_service/PostService/PostService.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [postStream](../services_post_service/PostService/postStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)>> - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [updatedPostStream](../services_post_service/PostService/updatedPostStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_read-only_ - - - - - -## Methods - -##### [addCommentLocally](../services_post_service/PostService/addCommentLocally.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) void - - - - - - - - -##### [addLike](../services_post_service/PostService/addLike.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to add Like to the Post. - - - - -##### [getPosts](../services_post_service/PostService/getPosts.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function used to get all posts of an organization. -The function reference the organization Id from _currentOrg. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [removeLike](../services_post_service/PostService/removeLike.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to remove like from the Post. - - - - -##### [setOrgStreamSubscription](../services_post_service/PostService/setOrgStreamSubscription.md)() void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/PostService.md b/talawa-mobile-docs/services_post_service/PostService/PostService.md deleted file mode 100644 index 0ee01b0b6..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/PostService.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# PostService constructor - - - - - - - -PostService() - - - - - -## Implementation - -```dart -PostService() { - _postStream = _postStreamController.stream.asBroadcastStream(); - _updatedPostStream = - _updatedPostStreamController.stream.asBroadcastStream(); - _currentOrg = _userConfig.currentOrg; - setOrgStreamSubscription(); - getPosts(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/addCommentLocally.md b/talawa-mobile-docs/services_post_service/PostService/addCommentLocally.md deleted file mode 100644 index f2123c5d5..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/addCommentLocally.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# addCommentLocally method - - - - - - - - -void addCommentLocally -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) - - - - - - - - -## Implementation - -```dart -void addCommentLocally(String postID) { - for (int i = 0; i < _posts.length; i++) { - if (_posts[i].sId == postID) { - _posts[i].comments!.add(Comments(sId: postID)); - _updatedPostStreamController.add(_posts[i]); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/addLike.md b/talawa-mobile-docs/services_post_service/PostService/addLike.md deleted file mode 100644 index 6e68fdc7f..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/addLike.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# addLike method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> addLike -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) - - - - - -

This function is used to add Like to the Post.

-

params:

-
    -
  • postId : id of the post where like need to be added.
  • -
- - - -## Implementation - -```dart -Future addLike(String postID) async { - _localAddLike(postID); - final String mutation = PostQueries().addLike(); - // run the graphQl mutation. - final result = await _dbFunctions - .gqlAuthMutation(mutation, variables: {"postID": postID}); - print(result); - // return result - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/getPosts.md b/talawa-mobile-docs/services_post_service/PostService/getPosts.md deleted file mode 100644 index 84b9cdacb..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/getPosts.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# getPosts method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getPosts -() - - - - - -

This function used to get all posts of an organization. -The function reference the organization Id from _currentOrg.

- - - -## Implementation - -```dart -Future getPosts() async { - // variables - final String currentOrgID = _currentOrg.id!; - final String query = PostQueries().getPostsById(currentOrgID); - final result = await _dbFunctions.gqlAuthQuery(query); - - //Checking if the dbFunctions return the postJSON, if not return. - if (result.data!['postsByOrganization'] == null) return; - - final List postsJson = result.data!['postsByOrganization'] as List; - - postsJson.forEach((postJson) { - final Post post = Post.fromJson(postJson as Map); - if (!_renderedPostID.contains(post.sId)) { - _posts.insert(0, post); - _renderedPostID.add(post.sId); - } - }); - _postStreamController.add(_posts); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/postStream.md b/talawa-mobile-docs/services_post_service/PostService/postStream.md deleted file mode 100644 index 80065aede..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/postStream.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# postStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)>> postStream - - - - - - - - -## Implementation - -```dart -Stream> get postStream => _postStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/removeLike.md b/talawa-mobile-docs/services_post_service/PostService/removeLike.md deleted file mode 100644 index fed21d019..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/removeLike.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# removeLike method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> removeLike -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) - - - - - -

This function is used to remove like from the Post.

-

params:

-
    -
  • postId : id of the post where like need to be removed.
  • -
- - - -## Implementation - -```dart -Future removeLike(String postID) async { - _removeLocal(postID); - final String mutation = PostQueries().removeLike(); - final result = await _dbFunctions - .gqlAuthMutation(mutation, variables: {"postID": postID}); - print(result); - return result; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/setOrgStreamSubscription.md b/talawa-mobile-docs/services_post_service/PostService/setOrgStreamSubscription.md deleted file mode 100644 index f4ee899b4..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/setOrgStreamSubscription.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# setOrgStreamSubscription method - - - - - - - - -void setOrgStreamSubscription -() - - - - - - - - -## Implementation - -```dart -void setOrgStreamSubscription() { - _userConfig.currentOrgInfoStream.listen((updatedOrganization) { - if (updatedOrganization != _currentOrg) { - print("org changes from post service"); - _renderedPostID.clear(); - _currentOrg = updatedOrganization; - getPosts(); - } - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/PostService/updatedPostStream.md b/talawa-mobile-docs/services_post_service/PostService/updatedPostStream.md deleted file mode 100644 index 3048a2fe6..000000000 --- a/talawa-mobile-docs/services_post_service/PostService/updatedPostStream.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# updatedPostStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[Post](../../models_post_post_model/Post-class.md)> updatedPostStream - - - - - - - - -## Implementation - -```dart -Stream get updatedPostStream => _updatedPostStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_post_service/services_post_service-library.md b/talawa-mobile-docs/services_post_service/services_post_service-library.md deleted file mode 100644 index 4a739d0e2..000000000 --- a/talawa-mobile-docs/services_post_service/services_post_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# post_service library - - - - - - - - - - - -## Classes - -##### [PostService](../services_post_service/PostService-class.md) - - - -PostService class provides functions in the context of a Post. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig-class.md b/talawa-mobile-docs/services_size_config/SizeConfig-class.md deleted file mode 100644 index d0897bbeb..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig-class.md +++ /dev/null @@ -1,175 +0,0 @@ - - - -# SizeConfig class - - - - - - - - - -

SizeConfig class is used to initialise the height and width of the media.

- - - - -## Constructors - -[SizeConfig](../services_size_config/SizeConfig/SizeConfig.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [init](../services_size_config/SizeConfig/init.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [test](../services_size_config/SizeConfig/test.md)() void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [blockSizeHorizontal](../services_size_config/SizeConfig/blockSizeHorizontal.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [blockSizeVertical](../services_size_config/SizeConfig/blockSizeVertical.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [paddingTop](../services_size_config/SizeConfig/paddingTop.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [safeBlockHorizontal](../services_size_config/SizeConfig/safeBlockHorizontal.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [safeBlockVertical](../services_size_config/SizeConfig/safeBlockVertical.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [screenHeight](../services_size_config/SizeConfig/screenHeight.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - -##### [screenWidth](../services_size_config/SizeConfig/screenWidth.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_read / write_ - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/SizeConfig.md b/talawa-mobile-docs/services_size_config/SizeConfig/SizeConfig.md deleted file mode 100644 index 7a2926039..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/SizeConfig.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# SizeConfig constructor - - - - - - - -SizeConfig() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeHorizontal.md b/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeHorizontal.md deleted file mode 100644 index c497d83ad..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeHorizontal.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blockSizeHorizontal property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? blockSizeHorizontal - -_read / write_ - - - - - - -## Implementation - -```dart -static double? blockSizeHorizontal; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeVertical.md b/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeVertical.md deleted file mode 100644 index 1d691b2cf..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/blockSizeVertical.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# blockSizeVertical property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? blockSizeVertical - -_read / write_ - - - - - - -## Implementation - -```dart -static double? blockSizeVertical; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/init.md b/talawa-mobile-docs/services_size_config/SizeConfig/init.md deleted file mode 100644 index 793880339..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/init.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# init method - - - - - - - - -void init -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - - - - -## Implementation - -```dart -void init(BuildContext context) { - _mediaQueryData = MediaQuery.of(context); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - blockSizeHorizontal = screenWidth! / 100; - blockSizeVertical = screenHeight! / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight! - _safeAreaVertical) / 100; - debugPrint("safeBlockHorizontal: $safeBlockHorizontal"); - debugPrint("safeBlockVertical: $safeBlockVertical"); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/paddingTop.md b/talawa-mobile-docs/services_size_config/SizeConfig/paddingTop.md deleted file mode 100644 index 28987e0b3..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/paddingTop.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# paddingTop property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? paddingTop - -_read / write_ - - - - - - -## Implementation - -```dart -static double? paddingTop; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockHorizontal.md b/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockHorizontal.md deleted file mode 100644 index 296f95581..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockHorizontal.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# safeBlockHorizontal property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? safeBlockHorizontal - -_read / write_ - - - - - - -## Implementation - -```dart -static double? safeBlockHorizontal; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockVertical.md b/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockVertical.md deleted file mode 100644 index aa09b2ba7..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/safeBlockVertical.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# safeBlockVertical property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? safeBlockVertical - -_read / write_ - - - - - - -## Implementation - -```dart -static double? safeBlockVertical; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/screenHeight.md b/talawa-mobile-docs/services_size_config/SizeConfig/screenHeight.md deleted file mode 100644 index 4aab01da1..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/screenHeight.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# screenHeight property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? screenHeight - -_read / write_ - - - - - - -## Implementation - -```dart -static double? screenHeight; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/screenWidth.md b/talawa-mobile-docs/services_size_config/SizeConfig/screenWidth.md deleted file mode 100644 index 5f14d7c95..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/screenWidth.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# screenWidth property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? screenWidth - -_read / write_ - - - - - - -## Implementation - -```dart -static double? screenWidth; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/SizeConfig/test.md b/talawa-mobile-docs/services_size_config/SizeConfig/test.md deleted file mode 100644 index 1f2a3819e..000000000 --- a/talawa-mobile-docs/services_size_config/SizeConfig/test.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# test method - - - - - - - - -void test -() - - - - - - - - -## Implementation - -```dart -void test() { - _mediaQueryData = - const MediaQueryData(size: Size(360, 684), padding: EdgeInsets.zero); - screenWidth = _mediaQueryData.size.width; - screenHeight = _mediaQueryData.size.height; - blockSizeHorizontal = screenWidth! / 100; - blockSizeVertical = screenHeight! / 100; - - _safeAreaHorizontal = - _mediaQueryData.padding.left + _mediaQueryData.padding.right; - _safeAreaVertical = - _mediaQueryData.padding.top + _mediaQueryData.padding.bottom; - safeBlockHorizontal = (screenWidth! - _safeAreaHorizontal) / 100; - safeBlockVertical = (screenHeight! - _safeAreaVertical) / 100; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_size_config/services_size_config-library.md b/talawa-mobile-docs/services_size_config/services_size_config-library.md deleted file mode 100644 index 040d2d32b..000000000 --- a/talawa-mobile-docs/services_size_config/services_size_config-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# size_config library - - - - - - - - - - - -## Classes - -##### [SizeConfig](../services_size_config/SizeConfig-class.md) - - - -SizeConfig class is used to initialise the height and width of the media. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService-class.md b/talawa-mobile-docs/services_task_service/TaskService-class.md deleted file mode 100644 index 12a51accd..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService-class.md +++ /dev/null @@ -1,163 +0,0 @@ - - - -# TaskService class - - - - - - - - - -

PostService class provides functions in the context of a Task.

-

Services include:

-
    -
  • getTasksForEvent : to get the task for the event.
  • -
  • getTasksByUser : to get the task added by the user.
  • -
  • editTask : to edit the task added by the user.
  • -
  • createTask : to create the task for the event.
  • -
  • deleteTask : to delete the task added by the user.
  • -
- - - - -## Constructors - -[TaskService](../services_task_service/TaskService/TaskService.md) () - - - - -## Properties - -##### [callbackNotifyListeners](../services_task_service/TaskService/callbackNotifyListeners.md) ↔ [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [tasks](../services_task_service/TaskService/tasks.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../models_task_task_model/Task-class.md)> - - - - -_read-only_ - - - - - -## Methods - -##### [createTask](../services_task_service/TaskService/createTask.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function is used to create a new task for the event. - - - - -##### [deleteTask](../services_task_service/TaskService/deleteTask.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) creatorId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to delete a task. - - - - -##### [editTask](../services_task_service/TaskService/editTask.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function is used to edit the task created by the user. - - - - -##### [getTasksByUser](../services_task_service/TaskService/getTasksByUser.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to fetch and return all tasks added by the current user. - - - - -##### [getTasksForEvent](../services_task_service/TaskService/getTasksForEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get all the tasks for the event. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/TaskService.md b/talawa-mobile-docs/services_task_service/TaskService/TaskService.md deleted file mode 100644 index 14f9eba9f..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/TaskService.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TaskService constructor - - - - - - - -TaskService() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/callbackNotifyListeners.md b/talawa-mobile-docs/services_task_service/TaskService/callbackNotifyListeners.md deleted file mode 100644 index 13f1edc6f..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/callbackNotifyListeners.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# callbackNotifyListeners property - - - - - - - -[VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) callbackNotifyListeners - -_read / write_ - - - - - - -## Implementation - -```dart -late VoidCallback callbackNotifyListeners; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/createTask.md b/talawa-mobile-docs/services_task_service/TaskService/createTask.md deleted file mode 100644 index 3e08ed9d6..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/createTask.md +++ /dev/null @@ -1,66 +0,0 @@ - - - -# createTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> createTask -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) - - - - - -

This function is used to create a new task for the event.

-

params:

-
    -
  • title : task title.
  • -
  • description : task description.
  • -
  • deadline : task deadline.
  • -
  • eventId : Event for which task need to be create.
  • -
- - - -## Implementation - -```dart -Future createTask({ - required String title, - required String description, - required String deadline, - required String eventId, -}) async { - _databaseMutationFunctions - .refreshAccessToken(_userConfig.currentUser.refreshToken!); - final res = await _databaseMutationFunctions.gqlAuthMutation( - TaskQueries.addTask( - title: title, - description: description, - deadline: deadline, - eventId: eventId, - ), - ); - - if (res != null) { - final task = res.data!['createTask'] as Map; - _tasks.add(Task.fromJson(task)); - callbackNotifyListeners(); - return true; - } - return false; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/deleteTask.md b/talawa-mobile-docs/services_task_service/TaskService/deleteTask.md deleted file mode 100644 index 2487482bc..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/deleteTask.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# deleteTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> deleteTask -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) creatorId) - - - - - -

This function is used to delete a task.

-

params:

-
    -
  • taskId : id of a task need to be deleted.
  • -
  • creatorId : id of the task creator.
  • -
- - - -## Implementation - -```dart -Future deleteTask(String taskId, String creatorId) async { - if (creatorId == _userConfig.currentUser.id) { - await _databaseMutationFunctions - .refreshAccessToken(_userConfig.currentUser.refreshToken!); - final res = await _databaseMutationFunctions - .gqlAuthMutation(TaskQueries.deleteTask(taskId)); - if (res != null) _tasks.removeWhere((task) => task.id == taskId); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/editTask.md b/talawa-mobile-docs/services_task_service/TaskService/editTask.md deleted file mode 100644 index e0ff4bf2c..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/editTask.md +++ /dev/null @@ -1,72 +0,0 @@ - - - -# editTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> editTask -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId}) - - - - - -

This function is used to edit the task created by the user.

-

params:

-
    -
  • title : task title.
  • -
  • description : task description.
  • -
  • deadline : task deadline.
  • -
  • taskId : task Id.
  • -
- - - -## Implementation - -```dart -Future editTask({ - required String title, - required String description, - required String deadline, - required String taskId, -}) async { - _databaseMutationFunctions - .refreshAccessToken(_userConfig.currentUser.refreshToken!); - final res = await _databaseMutationFunctions.gqlAuthMutation( - TaskQueries.editTask( - title: title, - description: description, - deadline: deadline, - taskId: taskId, - ), - ); - - // if res is not null. - if (res != null) { - final updatedtaskJson = res.data!['updateTask'] as Map; - final index = _tasks.indexWhere((task) => task.id == taskId); - if (index == -1) return false; - final updatedtask = Task.fromJson(updatedtaskJson); - updatedtask.event.title = _tasks[index].event.title; - _tasks[index] = updatedtask; - callbackNotifyListeners(); - // if successfully updated then return true. - return true; - } - return false; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/getTasksByUser.md b/talawa-mobile-docs/services_task_service/TaskService/getTasksByUser.md deleted file mode 100644 index ce9e59af3..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/getTasksByUser.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# getTasksByUser method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getTasksByUser -() - - - - - -

This function is used to fetch and return all tasks added by the current user.

- - - -## Implementation - -```dart -Future getTasksByUser() async { - await _databaseMutationFunctions - .refreshAccessToken(_userConfig.currentUser.refreshToken!); - final res = await _databaseMutationFunctions - .gqlNonAuthQuery(TaskQueries.userTasks(_userConfig.currentUser.id!)); - - if (res != null) { - _tasks.clear(); - final tasksList = res.data!['tasksByUser'] as List; - tasksList.forEach((task) { - _tasks.add(Task.fromJson(task as Map)); - }); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/getTasksForEvent.md b/talawa-mobile-docs/services_task_service/TaskService/getTasksForEvent.md deleted file mode 100644 index 21536bf75..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/getTasksForEvent.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# getTasksForEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getTasksForEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function is used to get all the tasks for the event.

-

params:

-
    -
  • eventId : id of an event for which tasks need to fetched,
  • -
- - - -## Implementation - -```dart -Future getTasksForEvent(String eventId) async { - await _databaseMutationFunctions - .refreshAccessToken(_userConfig.currentUser.refreshToken!); - final res = await _databaseMutationFunctions - .gqlNonAuthQuery(TaskQueries.eventTasks(eventId)); - - if (res != null) { - _tasks.clear(); - final tasksList = res.data!['tasksByEvent'] as List; - tasksList.forEach((task) { - _tasks.add(Task.fromJson(task as Map)); - }); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/TaskService/tasks.md b/talawa-mobile-docs/services_task_service/TaskService/tasks.md deleted file mode 100644 index aad6505b3..000000000 --- a/talawa-mobile-docs/services_task_service/TaskService/tasks.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# tasks property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../../models_task_task_model/Task-class.md)> tasks - - - - - - - - -## Implementation - -```dart -List get tasks => _tasks; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_task_service/services_task_service-library.md b/talawa-mobile-docs/services_task_service/services_task_service-library.md deleted file mode 100644 index 74a1bb179..000000000 --- a/talawa-mobile-docs/services_task_service/services_task_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# task_service library - - - - - - - - - - - -## Classes - -##### [TaskService](../services_task_service/TaskService-class.md) - - - -PostService class provides functions in the context of a Task. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md deleted file mode 100644 index 318a00e23..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md +++ /dev/null @@ -1,125 +0,0 @@ - - - -# MultiMediaPickerService class - - - - - - - - - -

This is a third party service which provide the service to select the image from.

-

gallery and then image can be cropped as well.

-

Services include:

-
    -
  • getPhotoFromGallery - Used to select photo from gallery.
  • -
  • cropImage - Used to crop the selected image.
  • -
- - - - -## Constructors - -[MultiMediaPickerService](../services_third_party_service_multi_media_pick_service/MultiMediaPickerService/MultiMediaPickerService.md) () - - - - -## Properties - -##### [fileStream](../services_third_party_service_multi_media_pick_service/MultiMediaPickerService/fileStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html) - - - -This function returns the stream of files. -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [cropImage](../services_third_party_service_multi_media_pick_service/MultiMediaPickerService/cropImage.md)({required [File](https://api.flutter.dev/flutter/dart-io/File-class.html) imageFile}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[File](https://api.flutter.dev/flutter/dart-io/File-class.html)?> - - - -This function is used to crop the image selected by the user. - - - - -##### [getPhotoFromGallery](../services_third_party_service_multi_media_pick_service/MultiMediaPickerService/getPhotoFromGallery.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[File](https://api.flutter.dev/flutter/dart-io/File-class.html)?> - - - -This function is used to pick the image from gallery or to click the image from user's camera. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/MultiMediaPickerService.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/MultiMediaPickerService.md deleted file mode 100644 index 28c50264b..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/MultiMediaPickerService.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# MultiMediaPickerService constructor - - - - - - - -MultiMediaPickerService() - - - - - -## Implementation - -```dart -MultiMediaPickerService() { - _picker = locator(); - _fileStream = _fileStreamController.stream.asBroadcastStream(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/cropImage.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/cropImage.md deleted file mode 100644 index fdff8f3c1..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/cropImage.md +++ /dev/null @@ -1,77 +0,0 @@ - - - -# cropImage method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[File](https://api.flutter.dev/flutter/dart-io/File-class.html)?> cropImage -({required [File](https://api.flutter.dev/flutter/dart-io/File-class.html) imageFile}) - - - - - -

This function is used to crop the image selected by the user.

-

The function accepts a File type image and returns File type of cropped image.

-

params:

-
    -
  • imageFile: the image file to be cropped.
  • -
-

returns:

-
    -
  • Future<File?>: the image after been cropped.
  • -
- - - -## Implementation - -```dart -Future cropImage({required File imageFile}) async { - // try, to crop the image and returns a File with cropped image path. - try { - final CroppedFile? croppedImage = await locator().cropImage( - sourcePath: imageFile.path, - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: [ - AndroidUiSettings( - toolbarTitle: 'Crop Image', - toolbarColor: const Color(0xff18191A), - toolbarWidgetColor: Colors.white, - backgroundColor: Colors.black, - cropGridColor: Colors.white, - initAspectRatio: CropAspectRatioPreset.original, - lockAspectRatio: false, - ), - IOSUiSettings( - minimumAspectRatio: 1.0, - ) - ], - ); - if (croppedImage != null) { - return File(croppedImage.path); - } - } catch (e) { - print( - "MultiMediaPickerService : Exception occurred while cropping Image", - ); - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/fileStream.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/fileStream.md deleted file mode 100644 index 71d2ea7a2..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/fileStream.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# fileStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html) fileStream - - - - - -

This function returns the stream of files.

-

params: -None.

-

returns:

-
    -
  • Stream<dynamic>: Stream of files.
  • -
- - - -## Implementation - -```dart -Stream get fileStream => _fileStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/getPhotoFromGallery.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/getPhotoFromGallery.md deleted file mode 100644 index d97759f54..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/MultiMediaPickerService/getPhotoFromGallery.md +++ /dev/null @@ -1,78 +0,0 @@ - - - -# getPhotoFromGallery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[File](https://api.flutter.dev/flutter/dart-io/File-class.html)?> getPhotoFromGallery -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) - - - - - -

This function is used to pick the image from gallery or to click the image from user's camera.

-

The function first ask for the permission to access the camera, if denied then returns a message in.

-

custom Dialog Box. This function returns a File type for which camera variable is false by default.

-

params:

-
    -
  • camera: if true then open camera for image, else open gallery to select image.
  • -
-

returns:

-
    -
  • Future<File?>: the image the user choosed.
  • -
- - - -## Implementation - -```dart -Future getPhotoFromGallery({bool camera = false}) async { - // asking for user's camera access permission. - try { - // checking for the image source, it could be camera or gallery. - final image = await _picker.pickImage( - source: camera ? ImageSource.camera : ImageSource.gallery, - ); - // if image is selected or not null, call the cropImage function that provide service to crop the selected image. - if (image != null) { - return await cropImage(imageFile: File(image.path)); - } - } catch (e) { - // if the permission denied or error occurs. - if (e is PlatformException && e.code == 'camera_access_denied') { - // push the dialog alert with the message. - locator().pushDialog( - CustomAlertDialog( - success: () { - locator().pop(); - openAppSettings(); - }, - dialogTitle: 'Permission Denied', - successText: 'SETTINGS', - dialogSubTitle: - "Camera permission is required, to use this feature, give permission from app settings", - ), - ); - } - print( - "MultiMediaPickerService : Exception occurred while choosing photo from the gallery $e", - ); - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md b/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md deleted file mode 100644 index 5eecc0aa8..000000000 --- a/talawa-mobile-docs/services_third_party_service_multi_media_pick_service/services_third_party_service_multi_media_pick_service-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# multi_media_pick_service library - - - - - - - - - - - -## Classes - -##### [MultiMediaPickerService](../services_third_party_service_multi_media_pick_service/MultiMediaPickerService-class.md) - - - -This is a third party service which provide the service to select the image from. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig-class.md b/talawa-mobile-docs/services_user_config/UserConfig-class.md deleted file mode 100644 index 01c67b0d4..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig-class.md +++ /dev/null @@ -1,237 +0,0 @@ - - - -# UserConfig class - - - - - - - - - -

UserConfig class provides different services in the context of the User.

-

Services include:

-
    -
  • userLoggedIn : helps to make user logged in to the application.
  • -
  • updateUserJoinedOrg : helps to update the user joined organization.
  • -
  • updateUserCreatedOrg : helps to update the user created organization.
  • -
  • updateUserMemberRequestOrg : helps to update the User membership request for the organization.
  • -
  • updateUserAdminOrg : helps to update the Admin of the Organization.
  • -
  • updateAccessToken : helps to update the access token of an user.
  • -
  • updateUser : helps to update the user.
  • -
- - - - -## Constructors - -[UserConfig](../services_user_config/UserConfig/UserConfig.md) () - - - - -## Properties - -##### [currentOrg](../services_user_config/UserConfig/currentOrg.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_read / write_ - - - -##### [currentOrgInfoController](../services_user_config/UserConfig/currentOrgInfoController.md) → [StreamController](https://api.flutter.dev/flutter/dart-async/StreamController-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read-only_ - - - -##### [currentOrgInfoStream](../services_user_config/UserConfig/currentOrgInfoStream.md) → [Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read-only_ - - - -##### [currentOrgName](../services_user_config/UserConfig/currentOrgName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [currentUser](../services_user_config/UserConfig/currentUser.md) ↔ [User](../models_user_user_info/User-class.md) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [initialiseStream](../services_user_config/UserConfig/initialiseStream.md)() void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [saveCurrentOrgInHive](../services_user_config/UserConfig/saveCurrentOrgInHive.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) saveOrgAsCurrent) void - - - - - - - - -##### [saveUserInHive](../services_user_config/UserConfig/saveUserInHive.md)() void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updateAccessToken](../services_user_config/UserConfig/updateAccessToken.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) accessToken, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to updated the access token of the user. - - - - -##### [updateUser](../services_user_config/UserConfig/updateUser.md)([User](../models_user_user_info/User-class.md) updatedUserDetails) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function is used to update the user details. - - - - -##### [updateUserAdminOrg](../services_user_config/UserConfig/updateUserAdminOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgDetails) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to update the organization admin. - - - - -##### [updateUserCreatedOrg](../services_user_config/UserConfig/updateUserCreatedOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgDetails) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to update the user created organization. - - - - -##### [updateUserJoinedOrg](../services_user_config/UserConfig/updateUserJoinedOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgDetails) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to update the user joined organization. - - - - -##### [updateUserMemberRequestOrg](../services_user_config/UserConfig/updateUserMemberRequestOrg.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> orgDetails) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function is used to update the user request to join the organization. - - - - -##### [userLoggedIn](../services_user_config/UserConfig/userLoggedIn.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function is used to log in the user. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/UserConfig.md b/talawa-mobile-docs/services_user_config/UserConfig/UserConfig.md deleted file mode 100644 index 9472b066e..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/UserConfig.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# UserConfig constructor - - - - - - - -UserConfig() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/currentOrg.md b/talawa-mobile-docs/services_user_config/UserConfig/currentOrg.md deleted file mode 100644 index a83a2ef49..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/currentOrg.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# currentOrg property - - - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) currentOrg - - - - - - - - -## Implementation - -```dart -OrgInfo get currentOrg => _currentOrg!; -``` - - - - - -currentOrg= -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) org) - - - - - - - -## Implementation - -```dart -set currentOrg(OrgInfo org) => _currentOrg = org; -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoController.md b/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoController.md deleted file mode 100644 index 6fccf53f6..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoController.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# currentOrgInfoController property - - - - - - - - - -[StreamController](https://api.flutter.dev/flutter/dart-async/StreamController-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> currentOrgInfoController - - - - - - - - -## Implementation - -```dart -StreamController get currentOrgInfoController => - _currentOrgInfoController; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoStream.md b/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoStream.md deleted file mode 100644 index 4a2a60ece..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgInfoStream.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# currentOrgInfoStream property - - - - - - - - - -[Stream](https://api.flutter.dev/flutter/dart-async/Stream-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> currentOrgInfoStream - - - - - - - - -## Implementation - -```dart -Stream get currentOrgInfoStream => _currentOrgInfoStream; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgName.md b/talawa-mobile-docs/services_user_config/UserConfig/currentOrgName.md deleted file mode 100644 index 64d6a00c5..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/currentOrgName.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# currentOrgName property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) currentOrgName - - - - - - - - -## Implementation - -```dart -String get currentOrgName => _currentOrg!.name!; -``` - - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/currentUser.md b/talawa-mobile-docs/services_user_config/UserConfig/currentUser.md deleted file mode 100644 index 77f70037a..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/currentUser.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# currentUser property - - - - - - - - - -[User](../../models_user_user_info/User-class.md) currentUser - - - - - - - - -## Implementation - -```dart -User get currentUser => _currentUser!; -``` - - - - - -currentUser= -([User](../../models_user_user_info/User-class.md) user) - - - - - - - -## Implementation - -```dart -set currentUser(User user) { - _currentUser = user; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/initialiseStream.md b/talawa-mobile-docs/services_user_config/UserConfig/initialiseStream.md deleted file mode 100644 index 0fda93269..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/initialiseStream.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# initialiseStream method - - - - - - - - -void initialiseStream -() - - - - - - - - -## Implementation - -```dart -void initialiseStream() { - _currentOrgInfoStream = - _currentOrgInfoController.stream.asBroadcastStream(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/saveCurrentOrgInHive.md b/talawa-mobile-docs/services_user_config/UserConfig/saveCurrentOrgInHive.md deleted file mode 100644 index 6eb038ac8..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/saveCurrentOrgInHive.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# saveCurrentOrgInHive method - - - - - - - - -void saveCurrentOrgInHive -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) saveOrgAsCurrent) - - - - - - - - -## Implementation - -```dart -void saveCurrentOrgInHive(OrgInfo saveOrgAsCurrent) { - _currentOrg = saveOrgAsCurrent; - _currentOrgInfoController.add(_currentOrg!); - final box = Hive.box('currentOrg'); - if (box.get('org') == null) { - box.put('org', _currentOrg!); - } else { - box.put('org', _currentOrg!); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/saveUserInHive.md b/talawa-mobile-docs/services_user_config/UserConfig/saveUserInHive.md deleted file mode 100644 index 53dcd9a8a..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/saveUserInHive.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# saveUserInHive method - - - - - - - - -void saveUserInHive -() - - - - - - - - -## Implementation - -```dart -void saveUserInHive() { - final box = Hive.box('currentUser'); - if (box.get('user') == null) { - box.put('user', _currentUser!); - } else { - box.put('user', _currentUser!); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateAccessToken.md b/talawa-mobile-docs/services_user_config/UserConfig/updateAccessToken.md deleted file mode 100644 index 7d38a3491..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateAccessToken.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# updateAccessToken method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) updateAccessToken -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) accessToken, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken}) - - - - - -

This function is used to updated the access token of the user.

-

params:

-
    -
  • accessToken
  • -
  • refreshToken
  • -
- - - -## Implementation - -```dart -Future updateAccessToken({ - required String accessToken, - required String refreshToken, -}) async { - _currentUser!.refreshToken = refreshToken; - _currentUser!.authToken = accessToken; - saveUserInHive(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateUser.md b/talawa-mobile-docs/services_user_config/UserConfig/updateUser.md deleted file mode 100644 index d10b9600b..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateUser.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# updateUser method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> updateUser -([User](../../models_user_user_info/User-class.md) updatedUserDetails) - - - - - -

This function is used to update the user details.

-

params:

-
    -
  • updatedUserDetails : User type variable containing all the details of an user need to be updated.
  • -
- - - -## Implementation - -```dart -Future updateUser(User updatedUserDetails) async { - try { - _currentUser = updatedUserDetails; - saveUserInHive(); - graphqlConfig.getToken(); - databaseFunctions.init(); - return true; - } on Exception catch (e) { - debugPrint(e.toString()); - return false; - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateUserAdminOrg.md b/talawa-mobile-docs/services_user_config/UserConfig/updateUserAdminOrg.md deleted file mode 100644 index 399b73f5e..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateUserAdminOrg.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# updateUserAdminOrg method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) updateUserAdminOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgDetails) - - - - - -

This function is used to update the organization admin.

-

params:

-
    -
  • orgDetails : details of the organization.
  • -
- - - -## Implementation - -```dart -Future updateUserAdminOrg(List orgDetails) async { - _currentUser!.updateAdminFor(orgDetails); - saveUserInHive(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateUserCreatedOrg.md b/talawa-mobile-docs/services_user_config/UserConfig/updateUserCreatedOrg.md deleted file mode 100644 index 36ff305c0..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateUserCreatedOrg.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# updateUserCreatedOrg method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) updateUserCreatedOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgDetails) - - - - - -

This function is used to update the user created organization.

-

params:

-
    -
  • orgDetails : details of the organization that user created.
  • -
- - - -## Implementation - -```dart -Future updateUserCreatedOrg(List orgDetails) async { - _currentUser!.updateCreatedOrg(orgDetails); - saveUserInHive(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateUserJoinedOrg.md b/talawa-mobile-docs/services_user_config/UserConfig/updateUserJoinedOrg.md deleted file mode 100644 index 2b99aa06a..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateUserJoinedOrg.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# updateUserJoinedOrg method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) updateUserJoinedOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgDetails) - - - - - -

This function is used to update the user joined organization.

-

params:

-
    -
  • orgDetails : details of the organization that user joined.
  • -
- - - -## Implementation - -```dart -Future updateUserJoinedOrg(List orgDetails) async { - _currentUser!.updateJoinedOrg(orgDetails); - saveUserInHive(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/updateUserMemberRequestOrg.md b/talawa-mobile-docs/services_user_config/UserConfig/updateUserMemberRequestOrg.md deleted file mode 100644 index 8cef35b6a..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/updateUserMemberRequestOrg.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# updateUserMemberRequestOrg method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) updateUserMemberRequestOrg -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> orgDetails) - - - - - -

This function is used to update the user request to join the organization.

-

params:

-
    -
  • orgDetails : details of the organization that user requested to join.
  • -
- - - -## Implementation - -```dart -Future updateUserMemberRequestOrg(List orgDetails) async { - _currentUser!.updateMemberRequestOrg(orgDetails); - saveUserInHive(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/UserConfig/userLoggedIn.md b/talawa-mobile-docs/services_user_config/UserConfig/userLoggedIn.md deleted file mode 100644 index 7ff776029..000000000 --- a/talawa-mobile-docs/services_user_config/UserConfig/userLoggedIn.md +++ /dev/null @@ -1,78 +0,0 @@ - - - -# userLoggedIn method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> userLoggedIn -() - - - - - -

This function is used to log in the user.

- - - -## Implementation - -```dart -Future userLoggedIn() async { - initialiseStream(); - final boxUser = Hive.box('currentUser'); - final boxOrg = Hive.box('currentOrg'); - _currentOrg = - boxOrg.get('org') ?? OrgInfo(name: 'Organization Name', id: 'null'); - _currentOrgInfoController.add(_currentOrg!); - - _currentUser = boxUser.get('user'); - // if there is not currentUser then returns false. - if (_currentUser == null) { - _currentUser = User(id: 'null', authToken: 'null'); - return false; - } - // generate access token - graphqlConfig.getToken().then((value) async { - databaseFunctions.init(); - try { - final QueryResult result = await databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: {'id': currentUser.id}, - ) as QueryResult; - final User userInfo = User.fromJson( - result.data!['users'][0] as Map, - fromOrg: true, - ); - userInfo.authToken = userConfig.currentUser.authToken; - userInfo.refreshToken = userConfig.currentUser.refreshToken; - userConfig.updateUser(userInfo); - _currentOrg ??= _currentUser!.joinedOrganizations![0]; - _currentOrgInfoController.add(_currentOrg!); - - saveUserInHive(); - return true; - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - "Couldn't update User details", - MessageType.error, - ); - } - }); - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/services_user_config/services_user_config-library.md b/talawa-mobile-docs/services_user_config/services_user_config-library.md deleted file mode 100644 index 3fb10c55d..000000000 --- a/talawa-mobile-docs/services_user_config/services_user_config-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# user_config library - - - - - - - - - - - -## Classes - -##### [UserConfig](../services_user_config/UserConfig-class.md) - - - -UserConfig class provides different services in the context of the User. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/splash_screen/SplashScreen-class.md b/talawa-mobile-docs/splash_screen/SplashScreen-class.md deleted file mode 100644 index ec5863795..000000000 --- a/talawa-mobile-docs/splash_screen/SplashScreen-class.md +++ /dev/null @@ -1,199 +0,0 @@ - - - -# SplashScreen class - - - - - - - - - -

This widget return the SplashScreen. Splash Screen is the first screen that -we see when we run our application. It is also known as Launch Screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SplashScreen - - - - - - - - -## Constructors - -[SplashScreen](../splash_screen/SplashScreen/SplashScreen.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex = 0}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [mainScreenIndex](../splash_screen/SplashScreen/mainScreenIndex.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../splash_screen/SplashScreen/createState.md)() _SplashScreenState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/splash_screen/SplashScreen/SplashScreen.md b/talawa-mobile-docs/splash_screen/SplashScreen/SplashScreen.md deleted file mode 100644 index f1eb432e8..000000000 --- a/talawa-mobile-docs/splash_screen/SplashScreen/SplashScreen.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# SplashScreen constructor - - - - - - -const -SplashScreen({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex = 0}) - - - - - -## Implementation - -```dart -const SplashScreen({required Key key, this.mainScreenIndex = 0}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/splash_screen/SplashScreen/createState.md b/talawa-mobile-docs/splash_screen/SplashScreen/createState.md deleted file mode 100644 index 23428f6f6..000000000 --- a/talawa-mobile-docs/splash_screen/SplashScreen/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SplashScreenState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SplashScreenState createState() => _SplashScreenState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/splash_screen/SplashScreen/mainScreenIndex.md b/talawa-mobile-docs/splash_screen/SplashScreen/mainScreenIndex.md deleted file mode 100644 index 570058a34..000000000 --- a/talawa-mobile-docs/splash_screen/SplashScreen/mainScreenIndex.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# mainScreenIndex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex - -_final_ - - - - - - -## Implementation - -```dart -final int mainScreenIndex; -``` - - - - - - - diff --git a/talawa-mobile-docs/splash_screen/splash_screen-library.md b/talawa-mobile-docs/splash_screen/splash_screen-library.md deleted file mode 100644 index ea4583ae6..000000000 --- a/talawa-mobile-docs/splash_screen/splash_screen-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# splash_screen library - - - - - - - - - - - -## Classes - -##### [SplashScreen](../splash_screen/SplashScreen-class.md) - - - -This widget return the SplashScreen. Splash Screen is the first screen that -we see when we run our application. It is also known as Launch Screen. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations-class.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations-class.md deleted file mode 100644 index d54ee7ff2..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations-class.md +++ /dev/null @@ -1,169 +0,0 @@ - - - -# AppLocalizations class - - - - - - - - - -

This class provides methods to localize the application so that it can be available -to users with different languages.

- - - - -## Constructors - -[AppLocalizations](../utils_app_localization/AppLocalizations/AppLocalizations.md) ([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [isTest](../utils_app_localization/AppLocalizations/isTest.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [locale](../utils_app_localization/AppLocalizations/locale.md) → [Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [load](../utils_app_localization/AppLocalizations/load.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - - - - - - -##### [loadTest](../utils_app_localization/AppLocalizations/loadTest.md)([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[AppLocalizations](../utils_app_localization/AppLocalizations-class.md)> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [strictTranslate](../utils_app_localization/AppLocalizations/strictTranslate.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) key) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [translate](../utils_app_localization/AppLocalizations/translate.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? key) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - -## Static Methods - -##### [of](../utils_app_localization/AppLocalizations/of.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [AppLocalizations](../utils_app_localization/AppLocalizations-class.md)? - - - - - - - - - - - -## Constants - -##### [delegate](../utils_app_localization/AppLocalizations/delegate-constant.md) const [LocalizationsDelegate](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html)<[AppLocalizations](../utils_app_localization/AppLocalizations-class.md)> - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/AppLocalizations.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/AppLocalizations.md deleted file mode 100644 index bb06e087a..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/AppLocalizations.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# AppLocalizations constructor - - - - - - - -AppLocalizations([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - - -## Implementation - -```dart -AppLocalizations( - this.locale, { - this.isTest = false, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/delegate-constant.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/delegate-constant.md deleted file mode 100644 index 3725a88e1..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/delegate-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# delegate constant - - - - - - - -[LocalizationsDelegate](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html)<[AppLocalizations](../../utils_app_localization/AppLocalizations-class.md)> const delegate - - - - - - - - -## Implementation - -```dart -static const LocalizationsDelegate delegate = - AppLocalizationsDelegate(); -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/isTest.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/isTest.md deleted file mode 100644 index 9f3b4dc75..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/isTest.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isTest property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest - -_read / write_ - - - - - - -## Implementation - -```dart -bool isTest; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/load.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/load.md deleted file mode 100644 index 9cfd30ec1..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/load.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# load method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> load -() - - - - - - - - -## Implementation - -```dart -Future load() async { - // Load the language JSON file from the "lang" folder - final String jsonString = - await rootBundle.loadString('lang/${locale.languageCode}.json'); - final Map jsonMap = - json.decode(jsonString) as Map; - - _localizedStrings = jsonMap.map((key, value) { - return MapEntry(key, value.toString()); - }); - - return true; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/loadTest.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/loadTest.md deleted file mode 100644 index 4f4197b06..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/loadTest.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# loadTest method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[AppLocalizations](../../utils_app_localization/AppLocalizations-class.md)> loadTest -([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) - - - - - - - - -## Implementation - -```dart -Future loadTest(Locale locale) async { - return AppLocalizations(locale); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/locale.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/locale.md deleted file mode 100644 index ba00de796..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/locale.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# locale property - - - - - - - -[Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale - -_final_ - - - - - - -## Implementation - -```dart -final Locale locale; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/of.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/of.md deleted file mode 100644 index 492424bf7..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/of.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# of method - - - - - - - - -[AppLocalizations](../../utils_app_localization/AppLocalizations-class.md)? of -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - - - - -## Implementation - -```dart -static AppLocalizations? of(BuildContext context) { - return Localizations.of(context, AppLocalizations); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/strictTranslate.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/strictTranslate.md deleted file mode 100644 index e05a4107d..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/strictTranslate.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# strictTranslate method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) strictTranslate -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) key) - - - - - - - - -## Implementation - -```dart -String strictTranslate(String key) { - if (isTest) return key; - - // ignore: unnecessary_null_comparison - if (key == null) { - return '...'; - } - - final String translate = _localizedStrings[key] ?? key; - return translate; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizations/translate.md b/talawa-mobile-docs/utils_app_localization/AppLocalizations/translate.md deleted file mode 100644 index 0b7412122..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizations/translate.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# translate method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? translate -([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? key) - - - - - - - - -## Implementation - -```dart -String? translate(String? key) { - if (isTest) return key; - - // ignore: unnecessary_null_comparison - if (key == null) { - return '...'; - } - return _localizedStrings[key]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate-class.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate-class.md deleted file mode 100644 index 0c6f3c2d0..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate-class.md +++ /dev/null @@ -1,150 +0,0 @@ - - - -# AppLocalizationsDelegate class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [LocalizationsDelegate](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html)<[AppLocalizations](../utils_app_localization/AppLocalizations-class.md)> -- AppLocalizationsDelegate - - - - - - - - -## Constructors - -[AppLocalizationsDelegate](../utils_app_localization/AppLocalizationsDelegate/AppLocalizationsDelegate.md) ({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [isTest](../utils_app_localization/AppLocalizationsDelegate/isTest.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [type](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate/type.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -The type of the object returned by the load method, T by default. -_read-onlyinherited_ - - - - - -## Methods - -##### [isSupported](../utils_app_localization/AppLocalizationsDelegate/isSupported.md)([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether resources for the given locale can be loaded by this delegate. -_override_ - - - -##### [load](../utils_app_localization/AppLocalizationsDelegate/load.md)([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[AppLocalizations](../utils_app_localization/AppLocalizations-class.md)> - - - -Start loading the resources for locale. The returned future completes -when the resources have finished loading. -_override_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [shouldReload](../utils_app_localization/AppLocalizationsDelegate/shouldReload.md)(covariant [AppLocalizationsDelegate](../utils_app_localization/AppLocalizationsDelegate-class.md) old) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Returns true if the resources for this delegate should be loaded -again by calling the load method. -_override_ - - - -##### [toString](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/AppLocalizationsDelegate.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/AppLocalizationsDelegate.md deleted file mode 100644 index 3f42f908e..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/AppLocalizationsDelegate.md +++ /dev/null @@ -1,31 +0,0 @@ - - - -# AppLocalizationsDelegate constructor - - - - - - -const -AppLocalizationsDelegate({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - - -## Implementation - -```dart -const AppLocalizationsDelegate({ - this.isTest = false, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isSupported.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isSupported.md deleted file mode 100644 index e2529fec1..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isSupported.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# isSupported method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isSupported -([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) - -_override_ - - - -

Whether resources for the given locale can be loaded by this delegate.

-

Return true if the instance of T loaded by this delegate's load -method supports the given locale's language.

- - - -## Implementation - -```dart -@override -bool isSupported(Locale locale) { - // Include all of your supported language codes here - return ['en', 'es', 'fr', 'hi', 'zh', 'de', 'ja', 'pt'] - .contains(locale.languageCode); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isTest.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isTest.md deleted file mode 100644 index e6e920cda..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/isTest.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isTest property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest - -_final_ - - - - - - -## Implementation - -```dart -final bool isTest; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/load.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/load.md deleted file mode 100644 index 0e0684946..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/load.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# load method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[AppLocalizations](../../utils_app_localization/AppLocalizations-class.md)> load -([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) locale) - -_override_ - - - -

Start loading the resources for locale. The returned future completes -when the resources have finished loading.

-

It's assumed that this method will return an object that contains a -collection of related string resources (typically defined with one method -per resource). The object will be retrieved with Localizations.of.

- - - -## Implementation - -```dart -@override -Future load(Locale locale) async { - // AppLocalizations class is where the JSON loading actually runs - final AppLocalizations localizations = - AppLocalizations(locale, isTest: isTest); - if (isTest) { - await localizations.loadTest(locale); - } else { - await localizations.load(); - } - - return localizations; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/shouldReload.md b/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/shouldReload.md deleted file mode 100644 index 232890b37..000000000 --- a/talawa-mobile-docs/utils_app_localization/AppLocalizationsDelegate/shouldReload.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# shouldReload method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) shouldReload -(covariant [AppLocalizationsDelegate](../../utils_app_localization/AppLocalizationsDelegate-class.md) old) - -_override_ - - - -

Returns true if the resources for this delegate should be loaded -again by calling the load method.

-

This method is called whenever its Localizations widget is -rebuilt. If it returns true then dependent widgets will be rebuilt -after load has completed.

- - - -## Implementation - -```dart -@override -bool shouldReload(AppLocalizationsDelegate old) => false; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_app_localization/utils_app_localization-library.md b/talawa-mobile-docs/utils_app_localization/utils_app_localization-library.md deleted file mode 100644 index 7bfdb2bfc..000000000 --- a/talawa-mobile-docs/utils_app_localization/utils_app_localization-library.md +++ /dev/null @@ -1,46 +0,0 @@ - - - - -# app_localization library - - - - - - - - - - - -## Classes - -##### [AppLocalizations](../utils_app_localization/AppLocalizations-class.md) - - - -This class provides methods to localize the application so that it can be available -to users with different languages. - - -##### [AppLocalizationsDelegate](../utils_app_localization/AppLocalizationsDelegate-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries-class.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries-class.md deleted file mode 100644 index 3c20eb991..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries-class.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# ChatQueries class - - - - - - - - - -

This class creates the queries dealing with chats.

- - - - -## Constructors - -[ChatQueries](../utils_chat_queries/ChatQueries/ChatQueries.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [messageSentToDirectChatsubscription](../utils_chat_queries/ChatQueries/messageSentToDirectChatsubscription.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [fetchDirectChatMessagesByChatId](../utils_chat_queries/ChatQueries/fetchDirectChatMessagesByChatId.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [fetchDirectChatsByUserId](../utils_chat_queries/ChatQueries/fetchDirectChatsByUserId.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [sendMessageToDirectChat](../utils_chat_queries/ChatQueries/sendMessageToDirectChat.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries/ChatQueries.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries/ChatQueries.md deleted file mode 100644 index 55e0facb0..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries/ChatQueries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ChatQueries constructor - - - - - - - -ChatQueries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatMessagesByChatId.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatMessagesByChatId.md deleted file mode 100644 index c18224b70..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatMessagesByChatId.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# fetchDirectChatMessagesByChatId method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchDirectChatMessagesByChatId -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId) - - - - - - - - -## Implementation - -```dart -String fetchDirectChatMessagesByChatId(String chatId) { - return ''' - query { - directChatsMessagesByChatID(id: "$chatId") { - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatsByUserId.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatsByUserId.md deleted file mode 100644 index 37412a513..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries/fetchDirectChatsByUserId.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# fetchDirectChatsByUserId method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchDirectChatsByUserId -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) - - - - - - - - -## Implementation - -```dart -String fetchDirectChatsByUserId(String userId) { - return ''' - query { - directChatsByUserID(id: "$userId") { - _id - users{ - _id - firstName - email - } - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries/messageSentToDirectChatsubscription.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries/messageSentToDirectChatsubscription.md deleted file mode 100644 index 9a57c45da..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries/messageSentToDirectChatsubscription.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# messageSentToDirectChatsubscription property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) messageSentToDirectChatsubscription - - - - - - - - -## Implementation - -```dart -String get messageSentToDirectChatsubscription => ''' - subscription{ - messageSentToDirectChat{ - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } -'''; -``` - - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/ChatQueries/sendMessageToDirectChat.md b/talawa-mobile-docs/utils_chat_queries/ChatQueries/sendMessageToDirectChat.md deleted file mode 100644 index 55f028004..000000000 --- a/talawa-mobile-docs/utils_chat_queries/ChatQueries/sendMessageToDirectChat.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# sendMessageToDirectChat method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) sendMessageToDirectChat -() - - - - - - - - -## Implementation - -```dart -String sendMessageToDirectChat() { - return ''' - mutation sendMessageToDirectChat( - \$chatId: ID! - \$messageContent: String! - ){ - sendMessageToDirectChat( - chatId: \$chatId - messageContent: \$messageContent - ) { - messageContent - sender{ - firstName - } - receiver{ - firstName - } - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_chat_queries/utils_chat_queries-library.md b/talawa-mobile-docs/utils_chat_queries/utils_chat_queries-library.md deleted file mode 100644 index 6d67046a3..000000000 --- a/talawa-mobile-docs/utils_chat_queries/utils_chat_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_queries library - - - - - - - - - - - -## Classes - -##### [ChatQueries](../utils_chat_queries/ChatQueries-class.md) - - - -This class creates the queries dealing with chats. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_comment_queries/CommentQueries-class.md b/talawa-mobile-docs/utils_comment_queries/CommentQueries-class.md deleted file mode 100644 index f32182947..000000000 --- a/talawa-mobile-docs/utils_comment_queries/CommentQueries-class.md +++ /dev/null @@ -1,110 +0,0 @@ - - - -# CommentQueries class - - - - - - - - - -

This class creates the queries dealing with comments.

- - - - -## Constructors - -[CommentQueries](../utils_comment_queries/CommentQueries/CommentQueries.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createComment](../utils_comment_queries/CommentQueries/createComment.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [getPostsComments](../utils_comment_queries/CommentQueries/getPostsComments.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_comment_queries/CommentQueries/CommentQueries.md b/talawa-mobile-docs/utils_comment_queries/CommentQueries/CommentQueries.md deleted file mode 100644 index ce3490c52..000000000 --- a/talawa-mobile-docs/utils_comment_queries/CommentQueries/CommentQueries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CommentQueries constructor - - - - - - - -CommentQueries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_comment_queries/CommentQueries/createComment.md b/talawa-mobile-docs/utils_comment_queries/CommentQueries/createComment.md deleted file mode 100644 index 3557c7507..000000000 --- a/talawa-mobile-docs/utils_comment_queries/CommentQueries/createComment.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# createComment method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) createComment -() - - - - - - - - -## Implementation - -```dart -String createComment() { - return """ - mutation createComment(\$postId: ID!, \$text: String!) { - createComment(postId: \$postId, - data:{ - text: \$text, - } - ){ - _id - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_comment_queries/CommentQueries/getPostsComments.md b/talawa-mobile-docs/utils_comment_queries/CommentQueries/getPostsComments.md deleted file mode 100644 index b497be68e..000000000 --- a/talawa-mobile-docs/utils_comment_queries/CommentQueries/getPostsComments.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# getPostsComments method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) getPostsComments -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId) - - - - - - - - -## Implementation - -```dart -String getPostsComments(String postId) { - return """ - query{ - commentsByPost(id: "$postId"){ - _id - text - createdAt - creator{ - firstName - lastName - } - } - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_comment_queries/utils_comment_queries-library.md b/talawa-mobile-docs/utils_comment_queries/utils_comment_queries-library.md deleted file mode 100644 index 9e0b120ae..000000000 --- a/talawa-mobile-docs/utils_comment_queries/utils_comment_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# comment_queries library - - - - - - - - - - - -## Classes - -##### [CommentQueries](../utils_comment_queries/CommentQueries-class.md) - - - -This class creates the queries dealing with comments. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries-class.md b/talawa-mobile-docs/utils_event_queries/EventQueries-class.md deleted file mode 100644 index 102d42421..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries-class.md +++ /dev/null @@ -1,146 +0,0 @@ - - - -# EventQueries class - - - - - - - - - -

This class creates queries related to the events.

- - - - -## Constructors - -[EventQueries](../utils_event_queries/EventQueries/EventQueries.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [addEvent](../utils_event_queries/EventQueries/addEvent.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [deleteEvent](../utils_event_queries/EventQueries/deleteEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) id) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [fetchOrgEvents](../utils_event_queries/EventQueries/fetchOrgEvents.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [registerForEvent](../utils_event_queries/EventQueries/registerForEvent.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [registrantsByEvent](../utils_event_queries/EventQueries/registrantsByEvent.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updateEvent](../utils_event_queries/EventQueries/updateEvent.md)({dynamic eventId}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/EventQueries.md b/talawa-mobile-docs/utils_event_queries/EventQueries/EventQueries.md deleted file mode 100644 index 817931179..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/EventQueries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# EventQueries constructor - - - - - - - -EventQueries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/addEvent.md b/talawa-mobile-docs/utils_event_queries/EventQueries/addEvent.md deleted file mode 100644 index d82a4ff80..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/addEvent.md +++ /dev/null @@ -1,71 +0,0 @@ - - - -# addEvent method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) addEvent -() - - - - - - - - -## Implementation - -```dart -String addEvent() { - return """ - mutation createEvent( \$organizationId: ID!, - \$title:String!, - \$description: String!, - \$startTime: Time, - \$endTime: Time, - \$allDay: Boolean!, - \$recurring: Boolean!, - \$isPublic: Boolean!, - \$isRegisterable: Boolean!, - \$location: String, - \$startDate : Date!, - \$endDate : Date!, - ) { - createEvent( - data:{ - organizationId: \$organizationId, - title: \$title, - description: \$description, - isPublic: \$isPublic, - isRegisterable: \$isRegisterable, - recurring: \$recurring, - allDay: \$allDay, - startTime: \$startTime, - endTime: \$endTime, - startDate: \$startDate, - endDate: \$endDate, - location: \$location, - } - ){ - _id - title - description - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/deleteEvent.md b/talawa-mobile-docs/utils_event_queries/EventQueries/deleteEvent.md deleted file mode 100644 index fd57a07e3..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/deleteEvent.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# deleteEvent method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deleteEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) id) - - - - - - - - -## Implementation - -```dart -String deleteEvent(String id) { - return """ - mutation { - removeEvent( - id: "$id", - ){ - _id - } - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/fetchOrgEvents.md b/talawa-mobile-docs/utils_event_queries/EventQueries/fetchOrgEvents.md deleted file mode 100644 index 9c6a6308f..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/fetchOrgEvents.md +++ /dev/null @@ -1,72 +0,0 @@ - - - -# fetchOrgEvents method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchOrgEvents -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - - - - -## Implementation - -```dart -String fetchOrgEvents(String orgId) { - return """ - query { - eventsByOrganization(id: "$orgId"){ - _id - organization { - _id - image - } - title - description - isPublic - isRegisterable - recurring - recurrance - startDate - endDate - allDay - startTime - endTime - location - creator{ - _id - firstName - lastName - } - admins { - firstName - lastName - } - registrants { - user { - _id - } - } - } - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/registerForEvent.md b/talawa-mobile-docs/utils_event_queries/EventQueries/registerForEvent.md deleted file mode 100644 index c99105710..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/registerForEvent.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# registerForEvent method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) registerForEvent -() - - - - - - - - -## Implementation - -```dart -String registerForEvent() { - return """ - mutation registerForEvent(\$eventId: ID!) { - registerForEvent(id: \$eventId) - { - _id - title - description - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/registrantsByEvent.md b/talawa-mobile-docs/utils_event_queries/EventQueries/registrantsByEvent.md deleted file mode 100644 index 36f685036..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/registrantsByEvent.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# registrantsByEvent method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) registrantsByEvent -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - - - - -## Implementation - -```dart -String registrantsByEvent(String eventId) { - return ''' - query { - registrantsByEvent(id: "$eventId") { - _id - firstName - lastName - image - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/EventQueries/updateEvent.md b/talawa-mobile-docs/utils_event_queries/EventQueries/updateEvent.md deleted file mode 100644 index 3d5cf74f9..000000000 --- a/talawa-mobile-docs/utils_event_queries/EventQueries/updateEvent.md +++ /dev/null @@ -1,67 +0,0 @@ - - - -# updateEvent method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) updateEvent -({dynamic eventId}) - - - - - - - - -## Implementation - -```dart -String updateEvent({ - eventId, -}) { - return """mutation updateEvent( - \$title:String!, - \$description: String!, - \$startTime: Time, - \$endTime: Time, - \$allDay: Boolean!, - \$recurring: Boolean!, - \$isPublic: Boolean!, - \$isRegisterable: Boolean!, - \$location: String, - ) { - updateEvent( - id: "$eventId" - data:{ - title: \$title, - description: \$description, - isPublic: \$isPublic, - isRegisterable: \$isRegisterable, - recurring: \$recurring, - allDay: \$allDay, - startTime: \$startTime - endTime: \$endTime - location: \$location - } - ){ - _id - title - description - } - }"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_event_queries/utils_event_queries-library.md b/talawa-mobile-docs/utils_event_queries/utils_event_queries-library.md deleted file mode 100644 index c69f1c400..000000000 --- a/talawa-mobile-docs/utils_event_queries/utils_event_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_queries library - - - - - - - - - - - -## Classes - -##### [EventQueries](../utils_event_queries/EventQueries-class.md) - - - -This class creates queries related to the events. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries-class.md b/talawa-mobile-docs/utils_post_queries/PostQueries-class.md deleted file mode 100644 index c42cbf66c..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries-class.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# PostQueries class - - - - - - - - - -

This class creates queries related to posts.

- - - - -## Constructors - -[PostQueries](../utils_post_queries/PostQueries/PostQueries.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [addLike](../utils_post_queries/PostQueries/addLike.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Add Like to a post. - - - - -##### [getPostsById](../utils_post_queries/PostQueries/getPostsById.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Getting Posts by Id. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [removeLike](../utils_post_queries/PostQueries/removeLike.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Remove Like from a post. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [uploadPost](../utils_post_queries/PostQueries/uploadPost.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Upload a post to database. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries/PostQueries.md b/talawa-mobile-docs/utils_post_queries/PostQueries/PostQueries.md deleted file mode 100644 index 6e2213d08..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries/PostQueries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# PostQueries constructor - - - - - - - -PostQueries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries/addLike.md b/talawa-mobile-docs/utils_post_queries/PostQueries/addLike.md deleted file mode 100644 index 75f191c97..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries/addLike.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# addLike method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) addLike -() - - - - - -

Add Like to a post.

-

params: - None

-

returns:

-
    -
  • String: The query related to addingLike
  • -
- - - -## Implementation - -```dart -String addLike() { - return """ - mutation likePost(\$postID: ID!) { - likePost( id: \$postID,) - { - _id - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries/getPostsById.md b/talawa-mobile-docs/utils_post_queries/PostQueries/getPostsById.md deleted file mode 100644 index ed6fb741c..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries/getPostsById.md +++ /dev/null @@ -1,74 +0,0 @@ - - - -# getPostsById method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) getPostsById -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - -

Getting Posts by Id.

-

params:

-
    -
  • orgId: The organisation id
  • -
-

returns:

-
    -
  • String: The query related to gettingPostsbyId
  • -
- - - -## Implementation - -```dart -String getPostsById(String orgId) { - return """ - query { - postsByOrganization(id: "$orgId",orderBy: createdAt_DESC ) - { - _id - text - createdAt - imageUrl - videoUrl - title - commentCount - likeCount - creator{ - _id - firstName - lastName - image - } - organization{ - _id - } - likedBy{ - _id - } - comments{ - _id - } - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries/removeLike.md b/talawa-mobile-docs/utils_post_queries/PostQueries/removeLike.md deleted file mode 100644 index e43f174fc..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries/removeLike.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# removeLike method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) removeLike -() - - - - - -

Remove Like from a post.

-

params: - None

-

returns:

-
    -
  • String: The query related to removingLike
  • -
- - - -## Implementation - -```dart -String removeLike() { - return """ - mutation unlikePost(\$postID: ID!) { - unlikePost( id: \$postID,) - { - _id - likedBy{ - _id - } - } - } -"""; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/PostQueries/uploadPost.md b/talawa-mobile-docs/utils_post_queries/PostQueries/uploadPost.md deleted file mode 100644 index 59d03b867..000000000 --- a/talawa-mobile-docs/utils_post_queries/PostQueries/uploadPost.md +++ /dev/null @@ -1,63 +0,0 @@ - - - -# uploadPost method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) uploadPost -() - - - - - -

Upload a post to database.

-

params: - None

-

returns:

-
    -
  • String: The query related to uploadingPost.
  • -
- - - -## Implementation - -```dart -String uploadPost() { - return ''' - mutation CreatePost( - \$text: String! - \$title: String! - \$imageUrl: URL - \$videoUrl: URL - \$organizationId: ID! -) { - createPost( - data: { - text: \$text - title: \$title - imageUrl: \$imageUrl - videoUrl: \$videoUrl - organizationId: \$organizationId - } - ) { - _id - } -} - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_post_queries/utils_post_queries-library.md b/talawa-mobile-docs/utils_post_queries/utils_post_queries-library.md deleted file mode 100644 index b2562cc70..000000000 --- a/talawa-mobile-docs/utils_post_queries/utils_post_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# post_queries library - - - - - - - - - - - -## Classes - -##### [PostQueries](../utils_post_queries/PostQueries-class.md) - - - -This class creates queries related to posts. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries-class.md b/talawa-mobile-docs/utils_queries/Queries-class.md deleted file mode 100644 index 7b1fc116f..000000000 --- a/talawa-mobile-docs/utils_queries/Queries-class.md +++ /dev/null @@ -1,245 +0,0 @@ - - - -# Queries class - - - - - - - - - -

This class returns some queries for the application.

- - - - -## Constructors - -[Queries](../utils_queries/Queries/Queries.md) () - - - - -## Properties - -##### [fetchJoinInOrg](../utils_queries/Queries/fetchJoinInOrg.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [fetchJoinInOrgByName](../utils_queries/Queries/fetchJoinInOrgByName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [fetchUserInfo](../utils_queries/Queries/fetchUserInfo.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createDonation](../utils_queries/Queries/createDonation.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) nameOfOrg, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) nameOfUser, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) payPalId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) amount) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -createDonation creates a new donation transaction by taking the userId ,orgId ,nameOfOrg ,nameOfUser as parameters - - - - -##### [fetchOrgById](../utils_queries/Queries/fetchOrgById.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [fetchOrgDetailsById](../utils_queries/Queries/fetchOrgDetailsById.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [getPluginsList](../utils_queries/Queries/getPluginsList.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -getPluginList queries all properties of pluginList from the server - - - - -##### [joinOrgById](../utils_queries/Queries/joinOrgById.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [loginUser](../utils_queries/Queries/loginUser.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [logout](../utils_queries/Queries/logout.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [newUserLanguage](../utils_queries/Queries/newUserLanguage.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [refreshToken](../utils_queries/Queries/refreshToken.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [registerUser](../utils_queries/Queries/registerUser.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) lastName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [saveFcmToken](../utils_queries/Queries/saveFcmToken.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? token) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [sendMembershipRequest](../utils_queries/Queries/sendMembershipRequest.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updateLanguage](../utils_queries/Queries/updateLanguage.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) languageCode) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [userLanguage](../utils_queries/Queries/userLanguage.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/Queries.md b/talawa-mobile-docs/utils_queries/Queries/Queries.md deleted file mode 100644 index b25607632..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/Queries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# Queries constructor - - - - - - - -Queries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/createDonation.md b/talawa-mobile-docs/utils_queries/Queries/createDonation.md deleted file mode 100644 index 3aed8b44e..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/createDonation.md +++ /dev/null @@ -1,61 +0,0 @@ - - - -# createDonation method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) createDonation -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) nameOfOrg, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) nameOfUser, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) payPalId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) amount) - - - - - -

createDonation creates a new donation transaction by taking the userId ,orgId ,nameOfOrg ,nameOfUser as parameters

- - - -## Implementation - -```dart -String createDonation( - String userId, - String orgId, - String nameOfOrg, - String nameOfUser, - String payPalId, - double amount, -) { - return ''' - mutation createDonationMutation { createDonation( - userId :"$userId" - orgId :"$orgId", - nameOfOrg:"$nameOfOrg", - nameOfUser:"$nameOfUser", - payPalId:"$payPalId" - amount :$amount - ){ - _id - payPalId - userId - orgId - payPalId - nameOfUser - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrg.md b/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrg.md deleted file mode 100644 index 33bb1607a..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrg.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# fetchJoinInOrg property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchJoinInOrg - - - - - - - - -## Implementation - -```dart -String get fetchJoinInOrg { - return """ - query organizationsConnection(\$first: Int, \$skip: Int){ - organizationsConnection( - first: \$first, - skip: \$skip, - orderBy: name_ASC - ){ - image - _id - name - image - isPublic - creator{ - firstName - lastName - } - } - } -"""; -} -``` - - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrgByName.md b/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrgByName.md deleted file mode 100644 index 02bcbb617..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/fetchJoinInOrgByName.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# fetchJoinInOrgByName property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchJoinInOrgByName - - - - - - - - -## Implementation - -```dart -String get fetchJoinInOrgByName { - return """ - query organizationsConnection( - \$first: Int, - \$skip: Int, - \$nameStartsWith: String - ){ - organizationsConnection( - where:{ - name_starts_with: \$nameStartsWith, - visibleInSearch: true, - isPublic: true, - } - first: \$first, - skip: \$skip, - orderBy: name_ASC - ){ - image - _id - name - image - isPublic - creator{ - firstName - lastName - } - } - } -"""; -} -``` - - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/fetchOrgById.md b/talawa-mobile-docs/utils_queries/Queries/fetchOrgById.md deleted file mode 100644 index ea2c109b2..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/fetchOrgById.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# fetchOrgById method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchOrgById -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - - - - -## Implementation - -```dart -String fetchOrgById(String orgId) { - return ''' - query{ - organizations(id: "$orgId"){ - image - _id - name - image - isPublic - creator{ - firstName - lastName - } - } - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/fetchOrgDetailsById.md b/talawa-mobile-docs/utils_queries/Queries/fetchOrgDetailsById.md deleted file mode 100644 index f311d621c..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/fetchOrgDetailsById.md +++ /dev/null @@ -1,60 +0,0 @@ - - - -# fetchOrgDetailsById method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchOrgDetailsById -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - - - - -## Implementation - -```dart -String fetchOrgDetailsById(String orgId) { - return ''' - query{ - organizations(id: "$orgId"){ - image - _id - name - admins{ - _id - } - description - isPublic - creator{ - _id - firstName - lastName - } - members{ - _id - firstName - lastName - image - } - } - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/fetchUserInfo.md b/talawa-mobile-docs/utils_queries/Queries/fetchUserInfo.md deleted file mode 100644 index c038293e5..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/fetchUserInfo.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# fetchUserInfo property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fetchUserInfo - -_read / write_ - - - - - - -## Implementation - -```dart -String fetchUserInfo = ''' - query Users(\$id: ID!){ - users(where: { id: \$id }) { - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - - } - createdOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - isPublic - creator{ - _id - firstName - lastName - image - } - } - } - adminFor{ - _id - } - } - } - '''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/getPluginsList.md b/talawa-mobile-docs/utils_queries/Queries/getPluginsList.md deleted file mode 100644 index 66e39ef68..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/getPluginsList.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# getPluginsList method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) getPluginsList -() - - - - - -

getPluginList queries all properties of pluginList from the server

- - - -## Implementation - -```dart -String getPluginsList() { - return ''' -query { -getPlugins { - _id - pluginName - pluginCreatedBy - pluginDesc - pluginInstallStatus - installedOrgs -} -} -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/joinOrgById.md b/talawa-mobile-docs/utils_queries/Queries/joinOrgById.md deleted file mode 100644 index 6b3a9c800..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/joinOrgById.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# joinOrgById method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joinOrgById -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - - - - -## Implementation - -```dart -String joinOrgById(String orgId) { - return ''' - mutation { - joinPublicOrganization(organizationId: "$orgId") { - joinedOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - - } - } - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/loginUser.md b/talawa-mobile-docs/utils_queries/Queries/loginUser.md deleted file mode 100644 index 31a470855..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/loginUser.md +++ /dev/null @@ -1,110 +0,0 @@ - - - -# loginUser method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) loginUser -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) - - - - - - - - -## Implementation - -```dart -String loginUser(String email, String password) { - return """ - mutation { - login(data: {email: "$email", password: "$password"}){ - accessToken - user{ - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - createdOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - } - adminFor{ - _id - } - } - refreshToken - androidFirebaseOptions { - apiKey - appId - messagingSenderId - projectId - storageBucket - } - iosFirebaseOptions { - apiKey - appId - messagingSenderId - projectId - storageBucket - iosClientId - iosBundleId - } - } - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/logout.md b/talawa-mobile-docs/utils_queries/Queries/logout.md deleted file mode 100644 index 673bb3885..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/logout.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# logout method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) logout -() - - - - - - - - -## Implementation - -```dart -String logout() { - return """ - mutation { - logout - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/newUserLanguage.md b/talawa-mobile-docs/utils_queries/Queries/newUserLanguage.md deleted file mode 100644 index a22689f7d..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/newUserLanguage.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# newUserLanguage method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) newUserLanguage -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) - - - - - - - - -## Implementation - -```dart -String newUserLanguage(String userId) { - return ''' - query{ - userLanguage(userId:"$userId") - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/refreshToken.md b/talawa-mobile-docs/utils_queries/Queries/refreshToken.md deleted file mode 100644 index c384ab091..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/refreshToken.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# refreshToken method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) refreshToken) - - - - - - - - -## Implementation - -```dart -String refreshToken(String refreshToken) { - return ''' - mutation{ - refreshToken(refreshToken: "$refreshToken"){ - accessToken - refreshToken - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/registerUser.md b/talawa-mobile-docs/utils_queries/Queries/registerUser.md deleted file mode 100644 index 19b4402c6..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/registerUser.md +++ /dev/null @@ -1,100 +0,0 @@ - - - -# registerUser method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) registerUser -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) firstName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) lastName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) email, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) - - - - - - - - -## Implementation - -```dart -String registerUser( - String firstName, - String lastName, - String email, - String password, -) { - return """ - mutation{ - signUp(data: {firstName: "$firstName", lastName: "$lastName", email: "$email", password: "$password"}) - { - accessToken - user{ - _id - firstName - lastName - email - image - joinedOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - createdOrganizations{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - membershipRequests{ - organization{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - } - adminFor{ - _id - } - } - refreshToken - } - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/saveFcmToken.md b/talawa-mobile-docs/utils_queries/Queries/saveFcmToken.md deleted file mode 100644 index 0b8bab769..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/saveFcmToken.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# saveFcmToken method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) saveFcmToken -([String](https://api.flutter.dev/flutter/dart-core/String-class.html)? token) - - - - - - - - -## Implementation - -```dart -String saveFcmToken(String? token) { - return """ - mutation { - saveFcmToken(token: "$token") - } - """; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/sendMembershipRequest.md b/talawa-mobile-docs/utils_queries/Queries/sendMembershipRequest.md deleted file mode 100644 index 033475b2b..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/sendMembershipRequest.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# sendMembershipRequest method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) sendMembershipRequest -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId) - - - - - - - - -## Implementation - -```dart -String sendMembershipRequest(String orgId) { - return ''' - mutation { - sendMembershipRequest(organizationId: "$orgId"){ - organization{ - _id - name - image - description - isPublic - creator{ - _id - firstName - lastName - image - } - } - } - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/updateLanguage.md b/talawa-mobile-docs/utils_queries/Queries/updateLanguage.md deleted file mode 100644 index 4f786b799..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/updateLanguage.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# updateLanguage method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) updateLanguage -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) languageCode) - - - - - - - - -## Implementation - -```dart -String updateLanguage(String languageCode) { - return ''' - mutation { - updateLanguage(languageCode: "$languageCode"){ - _id - firstName - appLanguageCode - } - } - '''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/Queries/userLanguage.md b/talawa-mobile-docs/utils_queries/Queries/userLanguage.md deleted file mode 100644 index 7e07be5a6..000000000 --- a/talawa-mobile-docs/utils_queries/Queries/userLanguage.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# userLanguage method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) userLanguage -() - - - - - - - - -## Implementation - -```dart -String userLanguage() { - return ''' - query{ - myLanguage - } -'''; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_queries/utils_queries-library.md b/talawa-mobile-docs/utils_queries/utils_queries-library.md deleted file mode 100644 index 79e7d49e6..000000000 --- a/talawa-mobile-docs/utils_queries/utils_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# queries library - - - - - - - - - - - -## Classes - -##### [Queries](../utils_queries/Queries-class.md) - - - -This class returns some queries for the application. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries-class.md b/talawa-mobile-docs/utils_task_queries/TaskQueries-class.md deleted file mode 100644 index 9c6198bcd..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries-class.md +++ /dev/null @@ -1,139 +0,0 @@ - - - -# TaskQueries class - - - - - - - - - -

This class creates queries for the tasks in the application.

- - - - -## Constructors - -[TaskQueries](../utils_task_queries/TaskQueries/TaskQueries.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - -## Static Methods - -##### [addTask](../utils_task_queries/TaskQueries/addTask.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [deleteTask](../utils_task_queries/TaskQueries/deleteTask.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [editTask](../utils_task_queries/TaskQueries/editTask.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [eventTasks](../utils_task_queries/TaskQueries/eventTasks.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - -##### [userTasks](../utils_task_queries/TaskQueries/userTasks.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/TaskQueries.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/TaskQueries.md deleted file mode 100644 index aa01fdd0c..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/TaskQueries.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# TaskQueries constructor - - - - - - - -TaskQueries() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/addTask.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/addTask.md deleted file mode 100644 index 9152376d4..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/addTask.md +++ /dev/null @@ -1,61 +0,0 @@ - - - -# addTask method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) addTask -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) - - - - - - - - -## Implementation - -```dart -static String addTask({ - required String title, - required String description, - required String deadline, - required String eventId, -}) => - ''' - mutation { - createTask( - data: { title: "$title", description: "$description", deadline: "$deadline" } - eventId: "$eventId" - ) { - _id - title - description - createdAt - deadline - creator { - _id - firstName - } - event { - _id - title - } - } - } - '''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/deleteTask.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/deleteTask.md deleted file mode 100644 index 6c2ee6db3..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/deleteTask.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# deleteTask method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deleteTask -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId) - - - - - - - - -## Implementation - -```dart -static String deleteTask(String taskId) => ''' - mutation { - removeTask(id: "$taskId") { - _id - } - } -'''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/editTask.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/editTask.md deleted file mode 100644 index f176f847f..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/editTask.md +++ /dev/null @@ -1,59 +0,0 @@ - - - -# editTask method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) editTask -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deadline, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId}) - - - - - - - - -## Implementation - -```dart -static String editTask({ - required String title, - required String description, - required String deadline, - required String taskId, -}) => - ''' - mutation { - updateTask( - data: { title: "$title", description: "$description", deadline: "$deadline" } - id: "$taskId" - ) { - _id - title - description - createdAt - deadline - creator { - _id - } - event { - _id - } - } - } - '''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/eventTasks.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/eventTasks.md deleted file mode 100644 index 4b5260c94..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/eventTasks.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# eventTasks method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventTasks -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - - - - -## Implementation - -```dart -static String eventTasks(String eventId) => ''' - query { - tasksByEvent(id: "$eventId") { - _id - title - description - createdAt - deadline - creator { - _id - firstName - } - event { - _id - title - } - } - } -'''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/TaskQueries/userTasks.md b/talawa-mobile-docs/utils_task_queries/TaskQueries/userTasks.md deleted file mode 100644 index 0c3064b19..000000000 --- a/talawa-mobile-docs/utils_task_queries/TaskQueries/userTasks.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# userTasks method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) userTasks -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) - - - - - - - - -## Implementation - -```dart -static String userTasks(String userId) => ''' - query { - tasksByUser(id: "$userId") { - _id - title - description - createdAt - deadline - creator { - _id - firstName - } - event { - _id - title - } - } - } -'''; -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_task_queries/utils_task_queries-library.md b/talawa-mobile-docs/utils_task_queries/utils_task_queries-library.md deleted file mode 100644 index b1fba2ded..000000000 --- a/talawa-mobile-docs/utils_task_queries/utils_task_queries-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# task_queries library - - - - - - - - - - - -## Classes - -##### [TaskQueries](../utils_task_queries/TaskQueries-class.md) - - - -This class creates queries for the tasks in the application. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator-class.md b/talawa-mobile-docs/utils_validators/Validator-class.md deleted file mode 100644 index f179f31a1..000000000 --- a/talawa-mobile-docs/utils_validators/Validator-class.md +++ /dev/null @@ -1,167 +0,0 @@ - - - -# Validator class - - - - - - - - - -

This class creats various validator methods for the application. -They are used to validate information given by the users.

- - - - -## Constructors - -[Validator](../utils_validators/Validator/Validator.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [validateUrlExistence](../utils_validators/Validator/validateUrlExistence.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) url) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)?> - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - -## Static Methods - -##### [validateEmail](../utils_validators/Validator/validateEmail.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) email) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validateEventForm](../utils_validators/Validator/validateEventForm.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? label) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validateFirstName](../utils_validators/Validator/validateFirstName.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validateLastName](../utils_validators/Validator/validateLastName.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validatePassword](../utils_validators/Validator/validatePassword.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validatePasswordConfirm](../utils_validators/Validator/validatePasswordConfirm.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) comparator) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - -##### [validateURL](../utils_validators/Validator/validateURL.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/Validator.md b/talawa-mobile-docs/utils_validators/Validator/Validator.md deleted file mode 100644 index 4aa170cc1..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/Validator.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# Validator constructor - - - - - - - -Validator() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateEmail.md b/talawa-mobile-docs/utils_validators/Validator/validateEmail.md deleted file mode 100644 index b167aec82..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateEmail.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# validateEmail method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validateEmail -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) email) - - - - - - - - -## Implementation - -```dart -static String? validateEmail( - String email, -) { - // If email is empty return. - if (email.isEmpty) { - return "Email must not be left blank"; - } - const String pattern = - r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$"; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(email)) { - return 'Please enter a valid Email Address'; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateEventForm.md b/talawa-mobile-docs/utils_validators/Validator/validateEventForm.md deleted file mode 100644 index 2742c9277..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateEventForm.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# validateEventForm method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validateEventForm -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? label) - - - - - - - - -## Implementation - -```dart -static String? validateEventForm(String value, String? label) { - if (value.isEmpty) { - return '$label must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r'(?=.*?[A-Za-z]).+'; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid $label"; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateFirstName.md b/talawa-mobile-docs/utils_validators/Validator/validateFirstName.md deleted file mode 100644 index bef755da6..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateFirstName.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# validateFirstName method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validateFirstName -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) - - - - - - - - -## Implementation - -```dart -static String? validateFirstName(String value) { - if (value.isEmpty) { - return 'Firstname must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r'(?=.*?[A-Za-z]).+'; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid Firstname"; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateLastName.md b/talawa-mobile-docs/utils_validators/Validator/validateLastName.md deleted file mode 100644 index d0f24762f..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateLastName.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# validateLastName method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validateLastName -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) - - - - - - - - -## Implementation - -```dart -static String? validateLastName(String value) { - if (value.isEmpty) { - return 'Lastname must not be left blank.'; - } - // ignore: unnecessary_raw_strings - const String pattern = r"(?=.*?[A-Za-z]).+"; - final RegExp regex = RegExp(pattern); - if (!regex.hasMatch(value)) { - return "Invalid Lastname"; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validatePassword.md b/talawa-mobile-docs/utils_validators/Validator/validatePassword.md deleted file mode 100644 index f79ec49c7..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validatePassword.md +++ /dev/null @@ -1,57 +0,0 @@ - - - -# validatePassword method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validatePassword -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) password) - - - - - - - - -## Implementation - -```dart -static String? validatePassword( - String password, -) { - // If password is empty return. - if (password.isEmpty) { - return "Password must not be left blank"; - } - const String pattern = - r'^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[!@#\$&*%^~.]).{8,}$'; - final RegExp regExp = RegExp(pattern); - - //Regex for no spaces allowed - const String noSpaces = r'^\S+$'; - final RegExp noSpaceRegex = RegExp(noSpaces); - - if (!noSpaceRegex.hasMatch(password)) { - return "Password must not contain spaces"; - } - if (!regExp.hasMatch(password)) { - return "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)"; - } - - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validatePasswordConfirm.md b/talawa-mobile-docs/utils_validators/Validator/validatePasswordConfirm.md deleted file mode 100644 index aa89e2f44..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validatePasswordConfirm.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# validatePasswordConfirm method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validatePasswordConfirm -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) comparator) - - - - - - - - -## Implementation - -```dart -static String? validatePasswordConfirm( - String value, - String comparator, -) { - if (value != comparator) { - return 'Password does not match original'; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateURL.md b/talawa-mobile-docs/utils_validators/Validator/validateURL.md deleted file mode 100644 index b1608f917..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateURL.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# validateURL method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? validateURL -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) - - - - - - - - -## Implementation - -```dart -static String? validateURL( - String value, -) { - if (value.isEmpty) { - return 'Please verify URL first'; - } - final bool validURL = Uri.parse(value).isAbsolute; - if (!validURL) { - return 'Enter a valid URL'; - } - return null; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/Validator/validateUrlExistence.md b/talawa-mobile-docs/utils_validators/Validator/validateUrlExistence.md deleted file mode 100644 index 568b5ec31..000000000 --- a/talawa-mobile-docs/utils_validators/Validator/validateUrlExistence.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# validateUrlExistence method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)?> validateUrlExistence -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) url) - - - - - - - - -## Implementation - -```dart -Future validateUrlExistence(String url) async { - try { - await http.get(Uri.parse(url)); - return true; - } on Exception catch (e) { - debugPrint(e.toString()); - return false; - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/utils_validators/utils_validators-library.md b/talawa-mobile-docs/utils_validators/utils_validators-library.md deleted file mode 100644 index e19c39fe8..000000000 --- a/talawa-mobile-docs/utils_validators/utils_validators-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# validators library - - - - - - - - - - - -## Classes - -##### [Validator](../utils_validators/Validator-class.md) - - - -This class creats various validator methods for the application. -They are used to validate information given by the users. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel-class.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel-class.md deleted file mode 100644 index dcb8604ea..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel-class.md +++ /dev/null @@ -1,233 +0,0 @@ - - - -# AccessScreenViewModel class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- AccessScreenViewModel - - - - - - - - -## Constructors - -[AccessScreenViewModel](../view_model_access_request_view_model/AccessScreenViewModel/AccessScreenViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [optionalMessageController](../view_model_access_request_view_model/AccessScreenViewModel/optionalMessageController.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_final_ - - - -##### [organizations](../view_model_access_request_view_model/AccessScreenViewModel/organizations.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read / write_ - - - -##### [orgId](../view_model_access_request_view_model/AccessScreenViewModel/orgId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedOrganization](../view_model_access_request_view_model/AccessScreenViewModel/selectedOrganization.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_read / write_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialise](../view_model_access_request_view_model/AccessScreenViewModel/initialise.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) org) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [sendMembershipRequest](../view_model_access_request_view_model/AccessScreenViewModel/sendMembershipRequest.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/AccessScreenViewModel.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/AccessScreenViewModel.md deleted file mode 100644 index 067994386..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/AccessScreenViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# AccessScreenViewModel constructor - - - - - - - -AccessScreenViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/initialise.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/initialise.md deleted file mode 100644 index 7bb061c66..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/initialise.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialise -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) org) - - - - - - - - -## Implementation - -```dart -Future initialise(OrgInfo org) async { - selectedOrganization = org; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/optionalMessageController.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/optionalMessageController.md deleted file mode 100644 index 3feae3226..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/optionalMessageController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# optionalMessageController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) optionalMessageController - -_final_ - - - - - - -## Implementation - -```dart -final optionalMessageController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/orgId.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/orgId.md deleted file mode 100644 index 8401c3532..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/orgId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId - -_read / write_ - - - - - - -## Implementation - -```dart -late String orgId; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/organizations.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/organizations.md deleted file mode 100644 index d267d675b..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/organizations.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# organizations property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> organizations - -_read / write_ - - - - - - -## Implementation - -```dart -late List organizations = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/selectedOrganization.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/selectedOrganization.md deleted file mode 100644 index 1c7a65ca8..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/selectedOrganization.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# selectedOrganization property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) selectedOrganization - -_read / write_ - - - - - - -## Implementation - -```dart -late OrgInfo selectedOrganization = OrgInfo(id: '-1'); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/sendMembershipRequest.md b/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/sendMembershipRequest.md deleted file mode 100644 index badfa2c33..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/AccessScreenViewModel/sendMembershipRequest.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# sendMembershipRequest method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> sendMembershipRequest -() - - - - - - - - -## Implementation - -```dart -Future sendMembershipRequest() async { - //TODO: Implement Message arg for below function - final result = await databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(selectedOrganization.id!), - ); - if (result != null) { - final OrgInfo membershipRequest = OrgInfo.fromJson( - (((result as QueryResult).data!)['sendMembershipRequest'] - as Map)['organization'] as Map, - ); - userConfig.updateUserMemberRequestOrg([membershipRequest]); - if (userConfig.currentUser.joinedOrganizations!.isEmpty) { - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - 'Join in request sent to ${selectedOrganization.name} successfully', - MessageType.info, - ); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_access_request_view_model/view_model_access_request_view_model-library.md b/talawa-mobile-docs/view_model_access_request_view_model/view_model_access_request_view_model-library.md deleted file mode 100644 index 4f6d0332c..000000000 --- a/talawa-mobile-docs/view_model_access_request_view_model/view_model_access_request_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# access_request_view_model library - - - - - - - - - - - -## Classes - -##### [AccessScreenViewModel](../view_model_access_request_view_model/AccessScreenViewModel-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md deleted file mode 100644 index d1cf1ebe1..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md +++ /dev/null @@ -1,262 +0,0 @@ - - - -# AddPostViewModel class - - - - - - - - - -

AddPostViewModel class have different functions that are used.

-

to interact with the model to add a new post in the organization.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- AddPostViewModel - - - - - - - - -## Constructors - -[AddPostViewModel](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/AddPostViewModel.md) () - - - - -## Properties - -##### [controller](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/controller.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -Post body text controller. -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [imageFile](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/imageFile.md) → [File](https://api.flutter.dev/flutter/dart-io/File-class.html)? - - - -The image file that is to be uploaded. -_read-only_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [orgName](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/orgName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -The organisation name. -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [titleController](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/titleController.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -Post title text controller. -_read-only_ - - - -##### [userName](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/userName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -The Username. -_read-only_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getImageFromGallery](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/getImageFromGallery.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get the image from gallery. - - - - -##### [initialise](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/initialise.md)() void - - - -This function is usedto do initialisation of stuff in the view model. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeImage](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/removeImage.md)() void - - - -This function removes the image selected. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [uploadPost](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/uploadPost.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function uploads the post finally, and navigate the success message or error message in Snack Bar. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/AddPostViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/AddPostViewModel.md deleted file mode 100644 index 3c75d173a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/AddPostViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# AddPostViewModel constructor - - - - - - - -AddPostViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/controller.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/controller.md deleted file mode 100644 index 6bfa5f1a3..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/controller.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# controller property - - - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) controller - - - - - -

Post body text controller.

-

params: -None -returns:

-
    -
  • TextEditingController: The main text controller of the post body
  • -
- - - -## Implementation - -```dart -TextEditingController get controller => _controller; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/getImageFromGallery.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/getImageFromGallery.md deleted file mode 100644 index 4b687e6e2..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/getImageFromGallery.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# getImageFromGallery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getImageFromGallery -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) - - - - - -

This function is used to get the image from gallery.

-

The function uses the _multiMediaPickerService services.

-

params:

-
    -
  • camera: if true then open camera for image, else open gallery to select image.
  • -
-

returns:

-
    -
  • Future<void>: Getting image from gallery returns future
  • -
- - - -## Implementation - -```dart -Future getImageFromGallery({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - if (image != null) { - _imageFile = image; - _navigationService.showTalawaErrorSnackBar( - "Image is added", - MessageType.info, - ); - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/imageFile.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/imageFile.md deleted file mode 100644 index 19699241f..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/imageFile.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# imageFile property - - - - - - - - - -[File](https://api.flutter.dev/flutter/dart-io/File-class.html)? imageFile - - - - - -

The image file that is to be uploaded.

-

params: -None -returns:

-
    -
  • File?: The image file
  • -
- - - -## Implementation - -```dart -File? get imageFile => _imageFile; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/initialise.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/initialise.md deleted file mode 100644 index ab0e08b7e..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/initialise.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -() - - - - - -

This function is usedto do initialisation of stuff in the view model.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void initialise() { - _currentUser = locator().currentUser; - _navigationService = locator(); - _selectedOrg = locator().currentOrg; - _imageFile = null; - _multiMediaPickerService = locator(); - _dbFunctions = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/orgName.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/orgName.md deleted file mode 100644 index 1006f7768..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/orgName.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# orgName property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgName - - - - - -

The organisation name.

-

params: -None -returns:

-
    -
  • String: The organisation name
  • -
- - - -## Implementation - -```dart -String get orgName => _selectedOrg.name!; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/removeImage.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/removeImage.md deleted file mode 100644 index 43fd648c6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/removeImage.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# removeImage method - - - - - - - - -void removeImage -() - - - - - -

This function removes the image selected.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void removeImage() { - _imageFile = null; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/titleController.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/titleController.md deleted file mode 100644 index d3fac7285..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/titleController.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# titleController property - - - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) titleController - - - - - -

Post title text controller.

-

params: -None -returns:

-
    -
  • TextEditingController: The text controller of the title body
  • -
- - - -## Implementation - -```dart -TextEditingController get titleController => _titleController; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/uploadPost.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/uploadPost.md deleted file mode 100644 index 4fc93630b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/uploadPost.md +++ /dev/null @@ -1,68 +0,0 @@ - - - -# uploadPost method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> uploadPost -() - - - - - -

This function uploads the post finally, and navigate the success message or error message in Snack Bar.

-

params: - None

-

returns:

-
    -
  • Future<void>: Uploading post by contacting queries
  • -
- - - -## Implementation - -```dart -Future uploadPost() async { - // {TODO: } - if (_imageFile == null) { - try { - await _dbFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": _controller.text, - "organizationId": _selectedOrg.id, - "title": _titleController.text - }, - ); - _navigationService.showTalawaErrorSnackBar( - "Post is uploaded", - MessageType.info, - ); - } on Exception catch (_) { - _navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ); - } - } - removeImage(); - _controller.text = ""; - _titleController.text = ""; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/userName.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/userName.md deleted file mode 100644 index 91033806d..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel/userName.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# userName property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) userName - - - - - -

The Username.

-

params: -None -returns:

-
    -
  • String: The username of the currentUser
  • -
- - - -## Implementation - -```dart -String get userName => _currentUser.firstName! + _currentUser.lastName!; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md deleted file mode 100644 index abcf04d8d..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_add_post_view_models_add_post_view_model/view_model_after_auth_view_models_add_post_view_models_add_post_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# add_post_view_model library - - - - - - - - - - - -## Classes - -##### [AddPostViewModel](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md) - - - -AddPostViewModel class have different functions that are used. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md deleted file mode 100644 index ba22f8b88..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md +++ /dev/null @@ -1,276 +0,0 @@ - - - -# DirectChatViewModel class - - - - - - - - - -

This ViewModel class have different functions that are used interact with model in the context of Direct Chat.

-

Functions include:

-
    -
  • initialise : Initialise the states.
  • -
  • getChatMessages : to get all the messages of a chat.
  • -
  • sendMessageToDirectChat : to send the message to chat.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- DirectChatViewModel - - - - - - - - -## Constructors - -[DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/DirectChatViewModel.md) () - - - - -## Properties - -##### [chatMessagesByUser](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatMessagesByUser.md) → [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatMessage](../models_chats_chat_message/ChatMessage-class.md)>> - - - - -_read-only_ - - - -##### [chats](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chats.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md)> - - - - -_read-only_ - - - -##### [chatState](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatState.md) ↔ [ChatState](../enums_enums/ChatState.md) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [listKey](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/listKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[AnimatedListState](https://api.flutter.dev/flutter/widgets/AnimatedListState-class.html)> - - - - -_final_ - - - -##### [name](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/name.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [chatName](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatName.md)(dynamic chatId) void - - - - - - - - -##### [dispose](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [getChatMessages](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/getChatMessages.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function get all messages for a chat. - - - - -##### [initialise](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/initialise.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [refreshChats](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/refreshChats.md)() void - - - -This function refresh the chats. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [sendMessageToDirectChat](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/sendMessageToDirectChat.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) messageContent) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function send the message to Direct Chat. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/DirectChatViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/DirectChatViewModel.md deleted file mode 100644 index 04646cdf5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/DirectChatViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# DirectChatViewModel constructor - - - - - - - -DirectChatViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatMessagesByUser.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatMessagesByUser.md deleted file mode 100644 index 77f46270e..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatMessagesByUser.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# chatMessagesByUser property - - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatMessage](../../models_chats_chat_message/ChatMessage-class.md)>> chatMessagesByUser - - - - - - - - -## Implementation - -```dart -Map> get chatMessagesByUser => _chatMessagesByUser; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatName.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatName.md deleted file mode 100644 index 5c2f3625b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatName.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# chatName method - - - - - - - - -void chatName -(dynamic chatId) - - - - - - - - -## Implementation - -```dart -void chatName(chatId) { - final List users = - _chats.firstWhere((element) => element.id == chatId).users!; - - users.forEach((element) { - if (element.id != userConfig.currentUser.id!) { - name = element.firstName; - } - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatState.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatState.md deleted file mode 100644 index 0ebdda61c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chatState.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# chatState property - - - - - - - -[ChatState](../../enums_enums/ChatState.md) chatState - -_read / write_ - - - - - - -## Implementation - -```dart -ChatState chatState = ChatState.initial; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chats.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chats.md deleted file mode 100644 index 81f69657a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/chats.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# chats property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[ChatListTileDataModel](../../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md)> chats - - - - - - - - -## Implementation - -```dart -List get chats => _chats; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/dispose.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/dispose.md deleted file mode 100644 index 551ec7916..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/dispose.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -void dispose() { - _chatMessageSubscription?.cancel(); - _chatListSubscription.cancel(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/getChatMessages.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/getChatMessages.md deleted file mode 100644 index bf87af3bc..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/getChatMessages.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# getChatMessages method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getChatMessages -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId) - - - - - -

This function get all messages for a chat.

-

params:

-
    -
  • chatId : id of a chat for which messages need to be fetched.
  • -
- - - -## Implementation - -```dart -Future getChatMessages(String chatId) async { - _chatMessagesByUser.clear(); - chatState = ChatState.loading; - // await _chatService.getMessagesFromDirectChat(); - // variable - final List messages = []; - _chatMessageSubscription = - _chatService.chatMessagesStream.listen((newMessage) { - messages.add(newMessage); - _chatMessagesByUser[chatId] = messages; - }); - // use `chatService` services - await _chatService.getDirectChatMessagesByChatId(chatId); - chatState = ChatState.complete; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/initialise.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/initialise.md deleted file mode 100644 index 1ddffc5e0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/initialise.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialise -() - - - - - - - - -## Implementation - -```dart -Future initialise() async { - setState(ViewState.busy); - chatState = ChatState.loading; - - _chatListSubscription = _chatService.chatListStream.listen((newChat) { - _uniqueChatIds.add(newChat.id!); - _chats.insert(0, newChat); - }); - - await _chatService.getDirectChatsByUserId(); - - chatState = ChatState.complete; - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/listKey.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/listKey.md deleted file mode 100644 index 64ba84797..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/listKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# listKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[AnimatedListState](https://api.flutter.dev/flutter/widgets/AnimatedListState-class.html)> listKey - -_final_ - - - - - - -## Implementation - -```dart -final listKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/name.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/name.md deleted file mode 100644 index 8a9acbd90..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/name.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# name property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name - -_read / write_ - - - - - - -## Implementation - -```dart -String? name; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/refreshChats.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/refreshChats.md deleted file mode 100644 index 87d21035e..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/refreshChats.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# refreshChats method - - - - - - - - -void refreshChats -() - - - - - -

This function refresh the chats.

- - - -## Implementation - -```dart -void refreshChats() { - _chats.clear(); - _uniqueChatIds.clear(); - notifyListeners(); - _chatService.getDirectChatsByUserId(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/sendMessageToDirectChat.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/sendMessageToDirectChat.md deleted file mode 100644 index d1cf19519..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel/sendMessageToDirectChat.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# sendMessageToDirectChat method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> sendMessageToDirectChat -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) messageContent) - - - - - -

This function send the message to Direct Chat.

-

params:

-
    -
  • chatId : id of a chat where message need to be send.
  • -
  • messageContent : content of a message.
  • -
- - - -## Implementation - -```dart -Future sendMessageToDirectChat( - String chatId, - String messageContent, -) async { - chatState = ChatState.loading; - _chatService.chatMessagesStream.listen((newMessage) { - _chatMessagesByUser[chatId]!.add(newMessage); - }); - await _chatService.sendMessageToDirectChat(chatId, messageContent); - chatState = ChatState.complete; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md deleted file mode 100644 index e1737c8bb..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/view_model_after_auth_view_models_chat_view_models_direct_chat_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# direct_chat_view_model library - - - - - - - - - - - -## Classes - -##### [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) - - - -This ViewModel class have different functions that are used interact with model in the context of Direct Chat. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md deleted file mode 100644 index d1b8cd05b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md +++ /dev/null @@ -1,211 +0,0 @@ - - - -# SelectContactViewModel class - - - - - - - - - -

SelectContactViewModel class have different functions to interact with model.

-

Functions include:

-
    -
  • getCurrentOrgUsersList : to get all users of current organization.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- SelectContactViewModel - - - - - - - - -## Constructors - -[SelectContactViewModel](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/SelectContactViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [orgMembersList](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/orgMembersList.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)> - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getCurrentOrgUsersList](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/getCurrentOrgUsersList.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get all users list of an current organization. - - - - -##### [initialise](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/initialise.md)() void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/SelectContactViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/SelectContactViewModel.md deleted file mode 100644 index 195db77ac..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/SelectContactViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# SelectContactViewModel constructor - - - - - - - -SelectContactViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/getCurrentOrgUsersList.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/getCurrentOrgUsersList.md deleted file mode 100644 index 8c9f8c8cd..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/getCurrentOrgUsersList.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# getCurrentOrgUsersList method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getCurrentOrgUsersList -() - - - - - -

This function is used to get all users list of an current organization.

- - - -## Implementation - -```dart -Future getCurrentOrgUsersList() async { - if (orgMembersList.isEmpty) { - orgMembersList = await _organizationService - .getOrgMembersList(userConfig.currentOrg.id!); - } - - //return orgMembersList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/initialise.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/initialise.md deleted file mode 100644 index a51657cbb..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/initialise.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -() - - - - - - - - -## Implementation - -```dart -void initialise() { - _organizationService = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/orgMembersList.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/orgMembersList.md deleted file mode 100644 index fc9910f37..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel/orgMembersList.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgMembersList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)> orgMembersList - -_read / write_ - - - - - - -## Implementation - -```dart -late List orgMembersList = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md deleted file mode 100644 index 8d9207601..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_chat_view_models_select_contact_view_model/view_model_after_auth_view_models_chat_view_models_select_contact_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# select_contact_view_model library - - - - - - - - - - - -## Classes - -##### [SelectContactViewModel](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md) - - - -SelectContactViewModel class have different functions to interact with model. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md deleted file mode 100644 index 38267d729..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md +++ /dev/null @@ -1,432 +0,0 @@ - - - -# CreateEventViewModel class - - - - - - - - - -

CreateEventViewModel class have methods to interact with model in.

-

the context of creating the event in the organization.

-

Methods include:

-
    -
  • createEvent : to create an event.
  • -
  • getImageFromGallery : to select image for a post.
  • -
  • removeImage : to remove the image.
  • -
  • getCurrentOrgUsersList : to get all user list of current organization.
  • -
  • removeUserFromList : to remove a user from list.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- CreateEventViewModel - - - - - - - - -## Constructors - -[CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/CreateEventViewModel.md) () - - - - -## Properties - -##### [descriptionFocus](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/descriptionFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - -DescriptionFocus FocusNode. -_read / write_ - - - -##### [eventDescriptionTextController](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventDescriptionTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -Event Description Text Controller. -_read / write_ - - - -##### [eventEndDate](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndDate.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) - - - -Event End Date. -_read / write_ - - - -##### [eventEndTime](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndTime.md) ↔ [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) - - - -Event End Time. -_read / write_ - - - -##### [eventLocationTextController](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventLocationTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -Event Location Text Controller. -_read / write_ - - - -##### [eventStartDate](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartDate.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) - - - -Event Start Date. -_read / write_ - - - -##### [eventStartTime](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartTime.md) ↔ [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) - - - -Event Start Time. -_read / write_ - - - -##### [eventTitleTextController](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventTitleTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -Event Title Text Controller. -_read / write_ - - - -##### [formKey](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/formKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> - - - -Global FormKey. -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [imageFile](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/imageFile.md) → [File](https://api.flutter.dev/flutter/dart-io/File-class.html)? - - - -Getter to return imageFile. -_read-only_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [isPublicSwitch](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isPublicSwitch.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Public Event or Not. -_read / write_ - - - -##### [isRegisterableSwitch](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isRegisterableSwitch.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -If event is registerable after creation. -_read / write_ - - - -##### [latitude](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/latitude.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - -Latitude store. -_read / write_ - - - -##### [locationFocus](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/locationFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - -LocationFocus FocusNode. -_read / write_ - - - -##### [longitude](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/longitude.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - -Longitude store. -_read / write_ - - - -##### [memberCheckedMap](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/memberCheckedMap.md) → [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -Getter to return members map. -_read-only_ - - - -##### [orgMembersList](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/orgMembersList.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)> - - - -Organisation Members List. -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedMembers](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/selectedMembers.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)> - - - -Getter to return selected members. -_read-only_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [titleFocus](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/titleFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - -TitleFocus FocusNode. -_read / write_ - - - -##### [validate](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/validate.md) ↔ [AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) - - - -AutoValidateMode default to disabled. -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [buildUserList](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/buildUserList.md)() void - - - -This function build the user list. - - - - -##### [createEvent](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/createEvent.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to create the event for the organization. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getCurrentOrgUsersList](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getCurrentOrgUsersList.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)>> - - - -This function fetch all the users in the current organization and return List. - - - - -##### [getImageFromGallery](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getImageFromGallery.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get the image from gallery. - - - - -##### [initialize](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/initialize.md)() void - - - -Function To Initialize. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeImage](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeImage.md)() void - - - -This function remove the selected image. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [removeUserFromList](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeUserFromList.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId}) void - - - -This function is used to remove a user from user's list. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/CreateEventViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/CreateEventViewModel.md deleted file mode 100644 index 50eb1089f..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/CreateEventViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CreateEventViewModel constructor - - - - - - - -CreateEventViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/buildUserList.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/buildUserList.md deleted file mode 100644 index 49b43c3ff..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/buildUserList.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# buildUserList method - - - - - - - - -void buildUserList -() - - - - - -

This function build the user list.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void buildUserList() { - _selectedMembers.clear(); - - // loop through the organization member list - - orgMembersList.forEach((orgMember) { - if (_memberCheckedMap[orgMember.id] == true) { - _selectedMembers.add(orgMember); - } - }); - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/createEvent.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/createEvent.md deleted file mode 100644 index e02be1250..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/createEvent.md +++ /dev/null @@ -1,106 +0,0 @@ - - - -# createEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> createEvent -() - - - - - -

This function is used to create the event for the organization.

-

The function uses database_mutation_functions services to call the graphQL mutation -for creating an event and passes the required variables for the event.

-

params: - None

-

returns:

-
    -
  • Future<void>: Asynchronous function for creating event
  • -
- - - -## Implementation - -```dart -Future createEvent() async { - titleFocus.unfocus(); - locationFocus.unfocus(); - descriptionFocus.unfocus(); - validate = AutovalidateMode.always; - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - - // variables initialisation - final DateTime startDate = eventStartDate; - final DateTime endDate = eventEndDate; - final DateTime startTime = DateTime( - startDate.year, - startDate.month, - startDate.day, - eventStartTime.hour, - eventStartTime.minute, - ); - final DateTime endTime = DateTime( - endDate.year, - endDate.month, - endDate.day, - eventEndTime.hour, - eventEndTime.minute, - ); - - // all required data for creating an event - final Map variables = { - 'startDate': DateFormat('yyyy-MM-dd').format(startDate), - 'endDate': DateFormat('yyyy-MM-dd').format(endDate), - 'organizationId': _currentOrg.id, - 'title': eventTitleTextController.text, - 'description': eventDescriptionTextController.text, - 'location': eventLocationTextController.text, - 'isPublic': isPublicSwitch, - 'isRegisterable': isRegisterableSwitch, - 'recurring': false, - 'allDay': false, - 'startTime': '${DateFormat('HH:mm:ss').format(startTime)}Z', - 'endTime': '${DateFormat('HH:mm:ss').format(endTime)}Z', - if (latitude != null) 'latitude': latitude, - if (longitude != null) 'longitude': longitude, - }; - - navigationService.pushDialog( - const CustomProgressDialog(key: Key('EventCreationProgress')), - ); - final tokenResult = await databaseFunctions - .refreshAccessToken(userConfig.currentUser.refreshToken!); - print(tokenResult); - // invoke the `gqlAuthMutation` function of `databaseFunctions` - // service along with the mutation query and variable map. - final result = await databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: variables, - ); - navigationService.pop(); - if (result != null) { - navigationService.pop(); - - await _eventService.getEvents(); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/descriptionFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/descriptionFocus.md deleted file mode 100644 index 2d720cdd9..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/descriptionFocus.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# descriptionFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) descriptionFocus - -_read / write_ - - - -

DescriptionFocus FocusNode.

- - - -## Implementation - -```dart -FocusNode descriptionFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventDescriptionTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventDescriptionTextController.md deleted file mode 100644 index abda49060..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventDescriptionTextController.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# eventDescriptionTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventDescriptionTextController - -_read / write_ - - - -

Event Description Text Controller.

- - - -## Implementation - -```dart -TextEditingController eventDescriptionTextController = - TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndDate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndDate.md deleted file mode 100644 index 2eae857b1..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndDate.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventEndDate property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) eventEndDate - -_read / write_ - - - -

Event End Date.

- - - -## Implementation - -```dart -DateTime eventEndDate = DateTime.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndTime.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndTime.md deleted file mode 100644 index 18d766fed..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventEndTime.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventEndTime property - - - - - - - -[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) eventEndTime - -_read / write_ - - - -

Event End Time.

- - - -## Implementation - -```dart -TimeOfDay eventEndTime = TimeOfDay.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventLocationTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventLocationTextController.md deleted file mode 100644 index d371ed22b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventLocationTextController.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventLocationTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventLocationTextController - -_read / write_ - - - -

Event Location Text Controller.

- - - -## Implementation - -```dart -TextEditingController eventLocationTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartDate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartDate.md deleted file mode 100644 index d568203e3..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartDate.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventStartDate property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) eventStartDate - -_read / write_ - - - -

Event Start Date.

- - - -## Implementation - -```dart -DateTime eventStartDate = DateTime.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartTime.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartTime.md deleted file mode 100644 index 0ba2d449b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventStartTime.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventStartTime property - - - - - - - -[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) eventStartTime - -_read / write_ - - - -

Event Start Time.

- - - -## Implementation - -```dart -TimeOfDay eventStartTime = TimeOfDay.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventTitleTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventTitleTextController.md deleted file mode 100644 index 0ff98f1e4..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/eventTitleTextController.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventTitleTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventTitleTextController - -_read / write_ - - - -

Event Title Text Controller.

- - - -## Implementation - -```dart -TextEditingController eventTitleTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/formKey.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/formKey.md deleted file mode 100644 index 8d24a83fc..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/formKey.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# formKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> formKey - -_final_ - - - -

Global FormKey.

- - - -## Implementation - -```dart -final formKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getCurrentOrgUsersList.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getCurrentOrgUsersList.md deleted file mode 100644 index dd2d7bc7f..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getCurrentOrgUsersList.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# getCurrentOrgUsersList method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)>> getCurrentOrgUsersList -() - - - - - -

This function fetch all the users in the current organization and return List.

-

params: - None

-

returns:

-
    -
  • Future<List<User>>: Current Organization Users List
  • -
- - - -## Implementation - -```dart -Future> getCurrentOrgUsersList() async { - if (orgMembersList.isEmpty) { - orgMembersList = await organizationService - .getOrgMembersList(userConfig.currentOrg.id!); - } - - // loop through list - orgMembersList.forEach((orgMember) { - _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - }); - // return list - return orgMembersList; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getImageFromGallery.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getImageFromGallery.md deleted file mode 100644 index 8401473f6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/getImageFromGallery.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# getImageFromGallery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getImageFromGallery -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) - - - - - -

This function is used to get the image from gallery.

-

The function uses the _multiMediaPickerService services.

-

params:

-
    -
  • camera: if true then open camera for image, else open gallery to select image.
  • -
-

returns:

-
    -
  • Future<void>: Asynchronous function for getting image from gallery
  • -
- - - -## Implementation - -```dart -Future getImageFromGallery({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - if (image != null) { - _imageFile = image; - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/imageFile.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/imageFile.md deleted file mode 100644 index 041c6defc..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/imageFile.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# imageFile property - - - - - - - - - -[File](https://api.flutter.dev/flutter/dart-io/File-class.html)? imageFile - - - - - -

Getter to return imageFile.

-

params: -None

-

returns:

-
    -
  • File?: Returns imageFile.
  • -
- - - -## Implementation - -```dart -File? get imageFile => _imageFile; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/initialize.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/initialize.md deleted file mode 100644 index 1f60b376d..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/initialize.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -() - - - - - -

Function To Initialize.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void initialize() { - _currentOrg = _userConfig.currentOrg; - //_organizationService = locator(); - - _imageFile = null; - _multiMediaPickerService = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isPublicSwitch.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isPublicSwitch.md deleted file mode 100644 index 8c49650a2..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isPublicSwitch.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# isPublicSwitch property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isPublicSwitch - -_read / write_ - - - -

Public Event or Not.

- - - -## Implementation - -```dart -bool isPublicSwitch = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isRegisterableSwitch.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isRegisterableSwitch.md deleted file mode 100644 index 4c0808ed0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/isRegisterableSwitch.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# isRegisterableSwitch property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isRegisterableSwitch - -_read / write_ - - - -

If event is registerable after creation.

- - - -## Implementation - -```dart -bool isRegisterableSwitch = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/latitude.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/latitude.md deleted file mode 100644 index da17e9b9c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/latitude.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# latitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? latitude - -_read / write_ - - - -

Latitude store.

- - - -## Implementation - -```dart -double? latitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/locationFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/locationFocus.md deleted file mode 100644 index df230e493..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/locationFocus.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# locationFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) locationFocus - -_read / write_ - - - -

LocationFocus FocusNode.

- - - -## Implementation - -```dart -FocusNode locationFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/longitude.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/longitude.md deleted file mode 100644 index eba02e97c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/longitude.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# longitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? longitude - -_read / write_ - - - -

Longitude store.

- - - -## Implementation - -```dart -double? longitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/memberCheckedMap.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/memberCheckedMap.md deleted file mode 100644 index 81076cdb6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/memberCheckedMap.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# memberCheckedMap property - - - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> memberCheckedMap - - - - - -

Getter to return members map.

-

params: -None

-

returns:

-
    -
  • Map<String, bool>: Returns a map of entries with id and boolean if they are -selected for events or not in bottom sheet.
  • -
- - - -## Implementation - -```dart -Map get memberCheckedMap => _memberCheckedMap; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/orgMembersList.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/orgMembersList.md deleted file mode 100644 index 5e26fd928..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/orgMembersList.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# orgMembersList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)> orgMembersList - -_read / write_ - - - -

Organisation Members List.

- - - -## Implementation - -```dart -late List orgMembersList = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeImage.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeImage.md deleted file mode 100644 index 11b3c4f3e..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeImage.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# removeImage method - - - - - - - - -void removeImage -() - - - - - -

This function remove the selected image.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void removeImage() { - _imageFile = null; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeUserFromList.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeUserFromList.md deleted file mode 100644 index eafdab6ec..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/removeUserFromList.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# removeUserFromList method - - - - - - - - -void removeUserFromList -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId}) - - - - - -

This function is used to remove a user from user's list.

-

params:

-
    -
  • userId: id of the user that need to be removed.
  • -
-

returns: - None

- - - -## Implementation - -```dart -void removeUserFromList({required String userId}) { - _selectedMembers.removeWhere((user) => user.id == userId); - _memberCheckedMap[userId] = false; - - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/selectedMembers.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/selectedMembers.md deleted file mode 100644 index cc72b1eb8..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/selectedMembers.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# selectedMembers property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)> selectedMembers - - - - - -

Getter to return selected members.

-

params: -None

-

returns:

-
    -
  • List<User>: Returns a list of selectedMembers for events
  • -
- - - -## Implementation - -```dart -List get selectedMembers => _selectedMembers; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/titleFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/titleFocus.md deleted file mode 100644 index dafe064f7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/titleFocus.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# titleFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) titleFocus - -_read / write_ - - - -

TitleFocus FocusNode.

- - - -## Implementation - -```dart -FocusNode titleFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/validate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/validate.md deleted file mode 100644 index 0c6ee84f7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel/validate.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# validate property - - - - - - - -[AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) validate - -_read / write_ - - - -

AutoValidateMode default to disabled.

- - - -## Implementation - -```dart -AutovalidateMode validate = AutovalidateMode.disabled; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md deleted file mode 100644 index 71a028978..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_create_event_view_model/view_model_after_auth_view_models_event_view_models_create_event_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# create_event_view_model library - - - - - - - - - - - -## Classes - -##### [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) - - - -CreateEventViewModel class have methods to interact with model in. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md deleted file mode 100644 index d2eed60cf..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md +++ /dev/null @@ -1,330 +0,0 @@ - - - -# EditEventViewModel class - - - - - - - - - -

EditEventViewModel class have methods to interact with model in -the context of editing the event in the organization.

-

Methods include:

-
    -
  • updateEvent : to update an event.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- EditEventViewModel - - - - - - - - -## Constructors - -[EditEventViewModel](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/EditEventViewModel.md) () - - - - -## Properties - -##### [descriptionFocus](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/descriptionFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [eventDescriptionTextController](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventDescriptionTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [eventEndDate](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndDate.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) - - - - -_read / write_ - - - -##### [eventEndTime](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndTime.md) ↔ [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) - - - - -_read / write_ - - - -##### [eventLocationTextController](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventLocationTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [eventStartDate](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartDate.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) - - - - -_read / write_ - - - -##### [eventStartTime](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartTime.md) ↔ [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) - - - - -_read / write_ - - - -##### [eventTitleTextController](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventTitleTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [formKey](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/formKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [isPublicSwitch](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isPublicSwitch.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [isRegisterableSwitch](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isRegisterableSwitch.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [locationFocus](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/locationFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [titleFocus](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/titleFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [validate](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/validate.md) ↔ [AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) - - - - -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialize](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/initialize.md)([Event](../models_events_event_model/Event-class.md) event) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updateEvent](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/updateEvent.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to update an event. -The function uses editEvent function provided by eventService service. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/EditEventViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/EditEventViewModel.md deleted file mode 100644 index 13fcad2a0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/EditEventViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# EditEventViewModel constructor - - - - - - - -EditEventViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/descriptionFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/descriptionFocus.md deleted file mode 100644 index 42e3cadfa..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/descriptionFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# descriptionFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) descriptionFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode descriptionFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventDescriptionTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventDescriptionTextController.md deleted file mode 100644 index 6c46c7d62..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventDescriptionTextController.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# eventDescriptionTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventDescriptionTextController - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController eventDescriptionTextController = - TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndDate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndDate.md deleted file mode 100644 index 9e06aaece..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventEndDate property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) eventEndDate - -_read / write_ - - - - - - -## Implementation - -```dart -DateTime eventEndDate = DateTime.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndTime.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndTime.md deleted file mode 100644 index fbcf2e3a5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventEndTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventEndTime property - - - - - - - -[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) eventEndTime - -_read / write_ - - - - - - -## Implementation - -```dart -TimeOfDay eventEndTime = TimeOfDay.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventLocationTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventLocationTextController.md deleted file mode 100644 index 65a364695..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventLocationTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventLocationTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventLocationTextController - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController eventLocationTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartDate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartDate.md deleted file mode 100644 index 0f6005ef7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventStartDate property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) eventStartDate - -_read / write_ - - - - - - -## Implementation - -```dart -DateTime eventStartDate = DateTime.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartTime.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartTime.md deleted file mode 100644 index 4a0fbcbd6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventStartTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventStartTime property - - - - - - - -[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) eventStartTime - -_read / write_ - - - - - - -## Implementation - -```dart -TimeOfDay eventStartTime = TimeOfDay.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventTitleTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventTitleTextController.md deleted file mode 100644 index a8880e96a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/eventTitleTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventTitleTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) eventTitleTextController - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController eventTitleTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/formKey.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/formKey.md deleted file mode 100644 index d7de0e859..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/formKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# formKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> formKey - -_final_ - - - - - - -## Implementation - -```dart -final formKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/initialize.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/initialize.md deleted file mode 100644 index 1ecb6819c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/initialize.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -([Event](../../models_events_event_model/Event-class.md) event) - - - - - - - - -## Implementation - -```dart -void initialize(Event event) { - _event = event; - _fillEditForm(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isPublicSwitch.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isPublicSwitch.md deleted file mode 100644 index 3f1458f4b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isPublicSwitch.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isPublicSwitch property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isPublicSwitch - -_read / write_ - - - - - - -## Implementation - -```dart -bool isPublicSwitch = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isRegisterableSwitch.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isRegisterableSwitch.md deleted file mode 100644 index 02f53c66c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/isRegisterableSwitch.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isRegisterableSwitch property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isRegisterableSwitch - -_read / write_ - - - - - - -## Implementation - -```dart -bool isRegisterableSwitch = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/locationFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/locationFocus.md deleted file mode 100644 index bd199d216..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/locationFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# locationFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) locationFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode locationFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/titleFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/titleFocus.md deleted file mode 100644 index 43897adf9..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/titleFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# titleFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) titleFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode titleFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/updateEvent.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/updateEvent.md deleted file mode 100644 index 5befd21fe..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/updateEvent.md +++ /dev/null @@ -1,73 +0,0 @@ - - - -# updateEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> updateEvent -() - - - - - -

This function is used to update an event. -The function uses editEvent function provided by eventService service.

- - - -## Implementation - -```dart -Future updateEvent() async { - titleFocus.unfocus(); - locationFocus.unfocus(); - descriptionFocus.unfocus(); - validate = AutovalidateMode.always; - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - final DateTime startTime = DateTime( - eventStartDate.year, - eventStartDate.month, - eventStartDate.day, - eventStartTime.hour, - eventStartTime.minute, - ); - final DateTime endTime = DateTime( - eventEndDate.year, - eventEndDate.month, - eventEndDate.day, - eventEndTime.hour, - eventEndTime.minute, - ); - // map for the required data to update an event. - final Map variables = { - 'title': eventTitleTextController.text, - 'description': eventDescriptionTextController.text, - 'location': eventLocationTextController.text, - 'isPublic': isPublicSwitch, - 'isRegisterable': isRegisterableSwitch, - 'recurring': false, - 'allDay': false, - 'startDate': DateFormat('yyyy-MM-dd').format(eventStartDate), - 'endDate': DateFormat('yyyy-MM-dd').format(eventEndDate), - 'startTime': '${DateFormat('HH:mm:ss').format(startTime)}Z', - 'endTime': '${DateFormat('HH:mm:ss').format(endTime)}Z', - }; - _eventService.editEvent(eventId: _event.id!, variables: variables); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/validate.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/validate.md deleted file mode 100644 index 7dd63a4d4..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel/validate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# validate property - - - - - - - -[AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) validate - -_read / write_ - - - - - - -## Implementation - -```dart -AutovalidateMode validate = AutovalidateMode.disabled; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md deleted file mode 100644 index ea15b6471..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_edit_event_view_model/view_model_after_auth_view_models_event_view_models_edit_event_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# edit_event_view_model library - - - - - - - - - - - -## Classes - -##### [EditEventViewModel](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) - - - -EditEventViewModel class have methods to interact with model in -the context of editing the event in the organization. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md deleted file mode 100644 index ca90a6094..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md +++ /dev/null @@ -1,248 +0,0 @@ - - - -# EventInfoViewModel class - - - - - - - - - -

EventInfoViewModel class helps interacting with model to serve view with the event information data.'

-

Methods include:

-
    -
  • registerForEvent : to register user for an event.
  • -
  • getFabTitle : to get the status of "registration" for an event.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- EventInfoViewModel - - - - - - - - -## Constructors - -[EventInfoViewModel](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/EventInfoViewModel.md) () - - - - -## Properties - -##### [event](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/event.md) ↔ [Event](../models_events_event_model/Event-class.md) - - - - -_read / write_ - - - -##### [exploreEventsInstance](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/exploreEventsInstance.md) ↔ [ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) - - - - -_read / write_ - - - -##### [fabTitle](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/fabTitle.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [registrants](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registrants.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../models_user_user_info/User-class.md)> - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getFabTitle](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/getFabTitle.md)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -This function returns String type for the event registration status. - - - - -##### [initialize](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/initialize.md)({required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> args}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -initialise with the event data fetched from the model. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [registerForEvent](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registerForEvent.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function helps the user to register for an event. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/EventInfoViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/EventInfoViewModel.md deleted file mode 100644 index e97f40787..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/EventInfoViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# EventInfoViewModel constructor - - - - - - - -EventInfoViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/event.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/event.md deleted file mode 100644 index c2c81ab4f..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/event.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# event property - - - - - - - -[Event](../../models_events_event_model/Event-class.md) event - -_read / write_ - - - - - - -## Implementation - -```dart -late Event event; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/exploreEventsInstance.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/exploreEventsInstance.md deleted file mode 100644 index 577772d85..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/exploreEventsInstance.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# exploreEventsInstance property - - - - - - - -[ExploreEventsViewModel](../../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) exploreEventsInstance - -_read / write_ - - - - - - -## Implementation - -```dart -late ExploreEventsViewModel exploreEventsInstance; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/fabTitle.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/fabTitle.md deleted file mode 100644 index ec2aa5e29..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/fabTitle.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# fabTitle property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) fabTitle - -_read / write_ - - - - - - -## Implementation - -```dart -late String fabTitle; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/getFabTitle.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/getFabTitle.md deleted file mode 100644 index 2c51f02c8..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/getFabTitle.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# getFabTitle method - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) getFabTitle -() - - - - - -

This function returns String type for the event registration status.

- - - -## Implementation - -```dart -String getFabTitle() { - if (event.isRegisterable == false) { - return "Not Registrable"; - } else if (event.isRegistered == true) { - return "Registered"; - } else { - return "Register"; - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/initialize.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/initialize.md deleted file mode 100644 index 4c6cd87ca..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/initialize.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# initialize method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialize -({required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> args}) - - - - - -

initialise with the event data fetched from the model.

- - - -## Implementation - -```dart -Future initialize({required Map args}) async { - event = args["event"] as Event; - exploreEventsInstance = - args["exploreEventViewModel"] as ExploreEventsViewModel; - fabTitle = getFabTitle(); - setState(ViewState.busy); - final fetchRegistrantsByEventQueryResult = await locator() - .fetchRegistrantsByEvent(event.id!) as QueryResult; - final registrantsJsonList = fetchRegistrantsByEventQueryResult - .data!['registrantsByEvent'] as List; - registrants = registrantsJsonList - .map( - (registrantJson) => User.fromJson( - registrantJson! as Map, - fromOrg: true, - ), - ) - .toList(); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registerForEvent.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registerForEvent.md deleted file mode 100644 index 453b65075..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registerForEvent.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# registerForEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> registerForEvent -() - - - - - -

This function helps the user to register for an event.

- - - -## Implementation - -```dart -Future registerForEvent() async { - // if event registration is open and user not already registered for the event. - if (event.isRegisterable == true && event.isRegistered == false) { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('RegisterEvent'), - ), - ); - - // use `registerForAnEvent` function provided by `EventService` service. - final registerResult = - await locator().registerForAnEvent(event.id!); - //final registerResult = await EventService().registerForAnEvent(event.id!); - // if the registration is successful. - if (registerResult != null) { - event.isRegistered = true; - registrants.add(locator().currentUser); - } - print(registerResult); - fabTitle = getFabTitle(); - navigationService.pop(); - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registrants.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registrants.md deleted file mode 100644 index 3074b46da..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel/registrants.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# registrants property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[User](../../models_user_user_info/User-class.md)> registrants - -_read / write_ - - - - - - -## Implementation - -```dart -late List registrants; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md deleted file mode 100644 index d652071d5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_event_info_view_model/view_model_after_auth_view_models_event_view_models_event_info_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_info_view_model library - - - - - - - - - - - -## Classes - -##### [EventInfoViewModel](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md) - - - -EventInfoViewModel class helps interacting with model to serve view with the event information data.' - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md deleted file mode 100644 index 0db9f1f4b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md +++ /dev/null @@ -1,281 +0,0 @@ - - - -# ExploreEventsViewModel class - - - - - - - - - -

ExploreEventsViewModel class helps to interact with model to serve data to view for event explore section.

-

Methods include:

-
    -
  • fetchNewEvents : to fetch new events in the organization.
  • -
  • refreshEvents : to refersh the event.
  • -
  • checkIfExistsAndAddNewEvent : to check if the event exists or not, if now add a new event.
  • -
  • deleteEvent : to delete the event.
  • -
  • choseValueFromDropdown : to return the relevant message in the dropdown after any action.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- ExploreEventsViewModel - - - - - - - - -## Constructors - -[ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/ExploreEventsViewModel.md) () - - - - -## Properties - -##### [chosenValue](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/chosenValue.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [emptyListMessage](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/emptyListMessage.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [events](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/events.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> - - - - -_read-only_ - - - -##### [eventService](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/eventService.md) → [EventService](../services_event_service/EventService-class.md) - - - - -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [checkIfExistsAndAddNewEvent](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/checkIfExistsAndAddNewEvent.md)([Event](../models_events_event_model/Event-class.md) newEvent) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function add a new event if the event not exist. - - - - -##### [choseValueFromDropdown](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/choseValueFromDropdown.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function takes the choosen value from dropdown and -return the filter events, if empty list then return relevant message. - - - - -##### [deleteEvent](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/deleteEvent.md)({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function deletes the event. - - - - -##### [dispose](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [fetchNewEvents](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/fetchNewEvents.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to fetch new events in the organization. -The function uses getEvents method from EventService. - - - - -##### [initialise](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/initialise.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [refreshEvents](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/refreshEvents.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to refresh the events in the organization. -The function uses getEvents method from EventService. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/ExploreEventsViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/ExploreEventsViewModel.md deleted file mode 100644 index ee83f259c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/ExploreEventsViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ExploreEventsViewModel constructor - - - - - - - -ExploreEventsViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/checkIfExistsAndAddNewEvent.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/checkIfExistsAndAddNewEvent.md deleted file mode 100644 index e16d37fb2..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/checkIfExistsAndAddNewEvent.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# checkIfExistsAndAddNewEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> checkIfExistsAndAddNewEvent -([Event](../../models_events_event_model/Event-class.md) newEvent) - - - - - -

This function add a new event if the event not exist.

-

params:

-
    -
  • newEvent : Event type variable containing data to create a new event.
  • -
- - - -## Implementation - -```dart -Future checkIfExistsAndAddNewEvent(Event newEvent) async { - // checking if the `newEvent.id` is unique and not exist already. - if ((!_uniqueEventIds.contains(newEvent.id)) && - (newEvent.organization!.id == userConfig.currentOrg.id)) { - _uniqueEventIds.add(newEvent.id!); - _parseEventDateTime(newEvent); - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/choseValueFromDropdown.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/choseValueFromDropdown.md deleted file mode 100644 index a875ad66a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/choseValueFromDropdown.md +++ /dev/null @@ -1,117 +0,0 @@ - - - -# choseValueFromDropdown method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> choseValueFromDropdown -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) value) - - - - - -

This function takes the choosen value from dropdown and -return the filter events, if empty list then return relevant message.

-

params:

-
    -
  • value : choosen value from dropdown.
  • -
- - - -## Implementation - -```dart -Future choseValueFromDropdown(String value) async { - _chosenValue = value; - notifyListeners(); - setState(ViewState.busy); - - switch (_chosenValue) { - // if `_chosenValue` is "All events". - case 'All Events': - { - // all events - _events = _bufferEvents; - // if list is empty - _emptyListMessage = "Looks like there aren't any events."; - } - break; - // if `_chosenValue` is "created event". - case 'Created Events': - { - // loop through the `_events` list and check - // for the creator id matched the current user id. - _events = List.from( - _bufferEvents.where( - (element) => element.creator!.id == userConfig.currentUser.id, - ), - ); - // if list is empty - _emptyListMessage = "You have not created any event."; - } - break; - // if `_chosenValue` is "Registered Events". - case 'Registered Events': - { - // loop through the `_events` list and filter elements - // if `element.isRegistered` is true and user is not the creator. - _events = List.from( - _bufferEvents.where( - (element) => - element.isRegistered == true && - element.creator!.id != userConfig.currentUser.id, - ), - ); - // if list is empty - _emptyListMessage = "No registered events are present"; - } - break; - // if `_chosenValue` is "Registered Events". - case 'Public Events': - { - // loop through the `_events` list and filter elements - // with the `isPublic` as true. - _events = _bufferEvents - .where((element) => element.isPublic == true) - .toList(); - - // if list is empty - _emptyListMessage = "There aren't any public events."; - } - break; - case 'Private Events': - { - // loop through the `_events` list and filter elements - // with the `isPublic` as false. - _events = _bufferEvents - .where((element) => element.isPublic == false) - .toList(); - // if list is empty - _emptyListMessage = "There aren't any private events."; - } - break; - - default: - { - _events = _bufferEvents; - } - } - await Future.delayed(const Duration(milliseconds: 500)); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/chosenValue.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/chosenValue.md deleted file mode 100644 index d75248d69..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/chosenValue.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# chosenValue property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) chosenValue - - - - - - - - -## Implementation - -```dart -String get chosenValue => _chosenValue; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/deleteEvent.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/deleteEvent.md deleted file mode 100644 index 62435c10d..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/deleteEvent.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# deleteEvent method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> deleteEvent -({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) - - - - - -

This function deletes the event.

-

params:

-
    -
  • eventId : id of the event that need to be delete.
  • -
- - - -## Implementation - -```dart -Future deleteEvent({required String eventId}) async { - // push the custom alert dialog to ask for confirmation. - navigationService.pushDialog( - CustomAlertDialog( - reverse: true, - dialogSubTitle: 'Are you sure you want to delete this event?', - successText: 'Delete', - success: () { - navigationService.pop(); - _eventService.deleteEvent(eventId).then( - (result) async { - if (result != null) { - navigationService.pop(); - setState(ViewState.busy); - print(result); - _uniqueEventIds.remove(eventId); - _events.removeWhere((element) => element.id == eventId); - await Future.delayed(const Duration(milliseconds: 500)); - setState(ViewState.idle); - } - }, - ); - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/dispose.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/dispose.md deleted file mode 100644 index 6c23fac6a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/dispose.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -void dispose() { - _eventStreamSubscription.cancel(); - _currentOrganizationStreamSubscription.cancel(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/emptyListMessage.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/emptyListMessage.md deleted file mode 100644 index 9f89f47ba..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/emptyListMessage.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# emptyListMessage property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) emptyListMessage - - - - - - - - -## Implementation - -```dart -String get emptyListMessage => _emptyListMessage; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/eventService.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/eventService.md deleted file mode 100644 index face3b442..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/eventService.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# eventService property - - - - - - - - - -[EventService](../../services_event_service/EventService-class.md) eventService - - - - - - - - -## Implementation - -```dart -EventService get eventService => _eventService; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/events.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/events.md deleted file mode 100644 index c267070c5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/events.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# events property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> events - - - - - - - - -## Implementation - -```dart -List get events => _events; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/fetchNewEvents.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/fetchNewEvents.md deleted file mode 100644 index 9722f847c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/fetchNewEvents.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# fetchNewEvents method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> fetchNewEvents -() - - - - - -

This function is used to fetch new events in the organization. -The function uses getEvents method from EventService.

- - - -## Implementation - -```dart -Future fetchNewEvents() async { - setState(ViewState.busy); - notifyListeners(); - await _eventService.getEvents(); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/initialise.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/initialise.md deleted file mode 100644 index cb43c5c96..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/initialise.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialise -() - - - - - - - - -## Implementation - -```dart -Future initialise() async { - setState(ViewState.busy); - _currentOrganizationStreamSubscription = userConfig.currentOrgInfoStream - .listen((updatedOrganization) => refreshEvents()); - await _eventService.getEvents(); - - _eventStreamSubscription = _eventService.eventStream.listen( - (newEvent) => checkIfExistsAndAddNewEvent(newEvent), - ); - _bufferEvents = _events; - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/refreshEvents.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/refreshEvents.md deleted file mode 100644 index ed1c495c5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel/refreshEvents.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# refreshEvents method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> refreshEvents -() - - - - - -

This function is used to refresh the events in the organization. -The function uses getEvents method from EventService.

- - - -## Implementation - -```dart -Future refreshEvents() async { - setState(ViewState.busy); - _events.clear(); - _uniqueEventIds.clear(); - await _eventService.getEvents(); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md deleted file mode 100644 index c28d0174c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_event_view_models_explore_events_view_model/view_model_after_auth_view_models_event_view_models_explore_events_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# explore_events_view_model library - - - - - - - - - - - -## Classes - -##### [ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) - - - -ExploreEventsViewModel class helps to interact with model to serve data to view for event explore section. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md deleted file mode 100644 index 3241daad6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md +++ /dev/null @@ -1,306 +0,0 @@ - - - -# OrganizationFeedViewModel class - - - - - - - - - -

OrganizationFeedViewModel class helps to interact with model to serve data to view for organization feed section.

-

Methods include:

-
    -
  • setCurrentOrganizationName : to set current organization name.
  • -
  • fetchNewPosts : to fetch new posts in the organization.
  • -
  • navigateToIndividualPage : to navigate to individual page.
  • -
  • navigateToPinnedPostPage : to navigate to pinned post page.
  • -
  • addNewPost : to add new post in the organization.
  • -
  • updatedPost : to update a post in the organization.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- OrganizationFeedViewModel - - - - - - - - -## Constructors - -[OrganizationFeedViewModel](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/OrganizationFeedViewModel.md) () - - - - -## Properties - -##### [currentOrgName](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/currentOrgName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [istest](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/istest.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [pinnedPosts](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/pinnedPosts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_read-only_ - - - -##### [posts](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/posts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [addNewPost](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/addNewPost.md)([Post](../models_post_post_model/Post-class.md) newPost) void - - - -This function adds new Post. - - - - -##### [buildNewPosts](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/buildNewPosts.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> newPosts) void - - - -This function initialise _posts with newPosts. - - - - -##### [dispose](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [fetchNewPosts](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/fetchNewPosts.md)() void - - - -This function fetches new posts in the organization. - - - - -##### [initialise](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initialise.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) void - - - - - - - - -##### [initializeWithDemoData](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initializeWithDemoData.md)() void - - - - - - - - -##### [navigateToIndividualPage](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToIndividualPage.md)([Post](../models_post_post_model/Post-class.md) post) void - - - -This function navigate to individual post page. - - - - -##### [navigateToPinnedPostPage](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToPinnedPostPage.md)() void - - - -This function navigate to pinned post page. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setCurrentOrganizationName](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/setCurrentOrganizationName.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) updatedOrganization) void - - - -This function sets the organization name after update. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updatedPost](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/updatedPost.md)([Post](../models_post_post_model/Post-class.md) post) void - - - -This function updates the post. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/OrganizationFeedViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/OrganizationFeedViewModel.md deleted file mode 100644 index 67813533b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/OrganizationFeedViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# OrganizationFeedViewModel constructor - - - - - - - -OrganizationFeedViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/addNewPost.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/addNewPost.md deleted file mode 100644 index 8c2c03afe..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/addNewPost.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# addNewPost method - - - - - - - - -void addNewPost -([Post](../../models_post_post_model/Post-class.md) newPost) - - - - - -

This function adds new Post.

-

params:

-
    -
  • newPost
  • -
- - - -## Implementation - -```dart -void addNewPost(Post newPost) { - _posts.insert(0, newPost); - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/buildNewPosts.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/buildNewPosts.md deleted file mode 100644 index 55261441c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/buildNewPosts.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# buildNewPosts method - - - - - - - - -void buildNewPosts -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> newPosts) - - - - - -

This function initialise _posts with newPosts.

-

params:

-
    -
  • newPosts
  • -
- - - -## Implementation - -```dart -void buildNewPosts(List newPosts) { - _posts = newPosts; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/currentOrgName.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/currentOrgName.md deleted file mode 100644 index 9688a5a1b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/currentOrgName.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# currentOrgName property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) currentOrgName - - - - - - - - -## Implementation - -```dart -String get currentOrgName => _currentOrgName; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/dispose.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/dispose.md deleted file mode 100644 index b9bddb208..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/dispose.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -void dispose() { - // Canceling the subscription so that there will be no rebuild after the widget is disposed. - _currentOrganizationStreamSubscription.cancel(); - _postsSubscription.cancel(); - _updatePostSubscription.cancel(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/fetchNewPosts.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/fetchNewPosts.md deleted file mode 100644 index a01c185d7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/fetchNewPosts.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# fetchNewPosts method - - - - - - - - -void fetchNewPosts -() - - - - - -

This function fetches new posts in the organization.

- - - -## Implementation - -```dart -void fetchNewPosts() { - _postService.getPosts(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initialise.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initialise.md deleted file mode 100644 index cea956cdb..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initialise.md +++ /dev/null @@ -1,58 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - - - - - -## Implementation - -```dart -void initialise( - // bool forTest, - { - bool isTest = false, -}) { - // For caching/initializing the current organization after the stream subscription has canceled and the stream is updated - - _currentOrgName = _userConfig.currentOrg.name!; - // ------ - // Attaching the stream subscription to rebuild the widgets automatically - _currentOrganizationStreamSubscription = - _userConfig.currentOrgInfoStream.listen( - (updatedOrganization) => - setCurrentOrganizationName(updatedOrganization.name!), - ); - _postsSubscription = _postService.postStream.listen((newPosts) { - return buildNewPosts(newPosts); - }); - - _updatePostSubscription = - _postService.updatedPostStream.listen((post) => updatedPost(post)); - if (isTest) { - istest = true; - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initializeWithDemoData.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initializeWithDemoData.md deleted file mode 100644 index a6589facc..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/initializeWithDemoData.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# initializeWithDemoData method - - - - - - - - -void initializeWithDemoData -() - - - - - - - - -## Implementation - -```dart -void initializeWithDemoData() { - // final postJsonResult = postsDemoData; - // - // ------ - // // Calling function to ge the post for the only 1st time. - // _postService.getPosts(); - // - // //fetching pinnedPosts - // final pinnedPostJsonResult = pinnedPostsDemoData; - // pinnedPostJsonResult.forEach((pinnedPostJsonData) { - // _pinnedPosts.add(Post.fromJson(pinnedPostJsonData)); - // }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/istest.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/istest.md deleted file mode 100644 index 7b27c4dd8..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/istest.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# istest property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) istest - -_read / write_ - - - - - - -## Implementation - -```dart -bool istest = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToIndividualPage.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToIndividualPage.md deleted file mode 100644 index 82d923bcd..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToIndividualPage.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# navigateToIndividualPage method - - - - - - - - -void navigateToIndividualPage -([Post](../../models_post_post_model/Post-class.md) post) - - - - - -

This function navigate to individual post page.

- - - -## Implementation - -```dart -void navigateToIndividualPage(Post post) { - // uses `pushScreen` method by `navigationService` service. - _navigationService.pushScreen(Routes.individualPost, arguments: post); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToPinnedPostPage.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToPinnedPostPage.md deleted file mode 100644 index 75f8159c1..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/navigateToPinnedPostPage.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# navigateToPinnedPostPage method - - - - - - - - -void navigateToPinnedPostPage -() - - - - - -

This function navigate to pinned post page.

- - - -## Implementation - -```dart -void navigateToPinnedPostPage() { - // uses `pushScreen` method by `navigationService` service. - _navigationService.pushScreen( - Routes.pinnedPostPage, - arguments: _pinnedPosts, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/pinnedPosts.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/pinnedPosts.md deleted file mode 100644 index 88ef2709e..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/pinnedPosts.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# pinnedPosts property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts - - - - - - - - -## Implementation - -```dart -List get pinnedPosts { - if (istest) { - _pinnedPosts = []; - return _pinnedPosts; - } - return _pinnedPosts; -} -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/posts.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/posts.md deleted file mode 100644 index be2240d6a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/posts.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# posts property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> posts - - - - - - - - -## Implementation - -```dart -List get posts { - // if (istest) { - // _posts = pinnedPostsDemoData.map((e) => Post.fromJson(e)).toList(); - // return _posts; - // } - return _posts; -} -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/setCurrentOrganizationName.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/setCurrentOrganizationName.md deleted file mode 100644 index df80565db..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/setCurrentOrganizationName.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# setCurrentOrganizationName method - - - - - - - - -void setCurrentOrganizationName -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) updatedOrganization) - - - - - -

This function sets the organization name after update.

-

params:

-
    -
  • updatedOrganization : updated organization name.
  • -
- - - -## Implementation - -```dart -void setCurrentOrganizationName(String updatedOrganization) { - // if `updatedOrganization` is not same to `_currentOrgName`. - if (updatedOrganization != _currentOrgName) { - _posts.clear(); - _renderedPostID.clear(); - _currentOrgName = updatedOrganization; - notifyListeners(); - } - // _postService.getPosts(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/updatedPost.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/updatedPost.md deleted file mode 100644 index ad276dec3..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel/updatedPost.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# updatedPost method - - - - - - - - -void updatedPost -([Post](../../models_post_post_model/Post-class.md) post) - - - - - -

This function updates the post.

-

params:

-
    -
  • post
  • -
- - - -## Implementation - -```dart -void updatedPost(Post post) { - for (int i = 0; i < _posts.length; i++) { - if (_posts[i].sId == post.sId) { - _posts[i] = post; - notifyListeners(); - break; - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md deleted file mode 100644 index 4f9361201..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/view_model_after_auth_view_models_feed_view_models_organization_feed_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# organization_feed_view_model library - - - - - - - - - - - -## Classes - -##### [OrganizationFeedViewModel](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md) - - - -OrganizationFeedViewModel class helps to interact with model to serve data to view for organization feed section. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md deleted file mode 100644 index f83ea766c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md +++ /dev/null @@ -1,275 +0,0 @@ - - - -# EditProfilePageViewModel class - - - - - - - - - -

EditProfilePageViewModel class helps to interact with model to serve data to edit profile views.

-

Methods include:

-
    -
  • getImageFromGallery
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- EditProfilePageViewModel - - - - - - - - -## Constructors - -[EditProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/EditProfilePageViewModel.md) () - - - - -## Properties - -##### [databaseService](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/databaseService.md) → [DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions-class.md) - - - - -_final_ - - - -##### [firstNameFocus](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [firstNameTextController](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [imageFile](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/imageFile.md) ↔ [File](https://api.flutter.dev/flutter/dart-io/File-class.html)? - - - - -_read / write_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [lastNameFocus](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [lastNameTextController](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameTextController.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [user](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/user.md) → [User](../models_user_user_info/User-class.md) - - - - -_final_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getImageFromGallery](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/getImageFromGallery.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to get the image from gallery. -The function uses the _multiMediaPickerService services. - - - - -##### [initialize](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/initialize.md)() void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeImage](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/removeImage.md)() void - - - -This function remove the selected image. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/EditProfilePageViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/EditProfilePageViewModel.md deleted file mode 100644 index 0bac4a494..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/EditProfilePageViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# EditProfilePageViewModel constructor - - - - - - - -EditProfilePageViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/databaseService.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/databaseService.md deleted file mode 100644 index 611b93985..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/databaseService.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# databaseService property - - - - - - - -[DataBaseMutationFunctions](../../services_database_mutation_functions/DataBaseMutationFunctions-class.md) databaseService - -_final_ - - - - - - -## Implementation - -```dart -final databaseService = databaseFunctions; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameFocus.md deleted file mode 100644 index 48ab5e6a5..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# firstNameFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) firstNameFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode firstNameFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameTextController.md deleted file mode 100644 index ad9f13aa6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/firstNameTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# firstNameTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) firstNameTextController - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController firstNameTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/getImageFromGallery.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/getImageFromGallery.md deleted file mode 100644 index b1f5eda7c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/getImageFromGallery.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# getImageFromGallery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getImageFromGallery -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) camera = false}) - - - - - -

This function is used to get the image from gallery. -The function uses the _multiMediaPickerService services.

-

params:

-
    -
  • camera : if true then open camera for image, else open gallery to select image.
  • -
- - - -## Implementation - -```dart -Future getImageFromGallery({bool camera = false}) async { - final image = - await _multiMediaPickerService.getPhotoFromGallery(camera: camera); - if (image != null) { - imageFile = image; - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/imageFile.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/imageFile.md deleted file mode 100644 index 57c47fbe1..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/imageFile.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# imageFile property - - - - - - - -[File](https://api.flutter.dev/flutter/dart-io/File-class.html)? imageFile - -_read / write_ - - - - - - -## Implementation - -```dart -late File? imageFile; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/initialize.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/initialize.md deleted file mode 100644 index 0c1fdae5c..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/initialize.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -() - - - - - - - - -## Implementation - -```dart -void initialize() { - imageFile = null; - _multiMediaPickerService = locator(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameFocus.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameFocus.md deleted file mode 100644 index e304beed0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# lastNameFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) lastNameFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode lastNameFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameTextController.md deleted file mode 100644 index e7cd6c0a2..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/lastNameTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# lastNameTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) lastNameTextController - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController lastNameTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/removeImage.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/removeImage.md deleted file mode 100644 index 2f0f573c0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/removeImage.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# removeImage method - - - - - - - - -void removeImage -() - - - - - -

This function remove the selected image.

- - - -## Implementation - -```dart -void removeImage() { - imageFile = null; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/user.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/user.md deleted file mode 100644 index d20415aec..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel/user.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# user property - - - - - - - -[User](../../models_user_user_info/User-class.md) user - -_final_ - - - - - - -## Implementation - -```dart -final user = userConfig.currentUser; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md deleted file mode 100644 index 6d453459b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/view_model_after_auth_view_models_profile_view_models_edit_profile_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# edit_profile_view_model library - - - - - - - - - - - -## Classes - -##### [EditProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md) - - - -EditProfilePageViewModel class helps to interact with model to serve data to edit profile views. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md deleted file mode 100644 index 399f3e789..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md +++ /dev/null @@ -1,385 +0,0 @@ - - - -# ProfilePageViewModel class - - - - - - - - - -

ProfilePageViewModel class helps to interact with model to serve data -and react to user's input in Profile Page view.

-

Methods include:

-
    -
  • logout
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- ProfilePageViewModel - - - - - - - - -## Constructors - -[ProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/ProfilePageViewModel.md) () - - - - -## Properties - -##### [bottomSheetHeight](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/bottomSheetHeight.md) ↔ [double](https://api.flutter.dev/flutter/dart-core/double-class.html) - - - - -_read / write_ - - - -##### [currentOrg](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentOrg.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_read / write_ - - - -##### [currentUser](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentUser.md) ↔ [User](../models_user_user_info/User-class.md) - - - - -_read / write_ - - - -##### [denomination](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/denomination.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> - - - - -_final_ - - - -##### [donationAmount](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationAmount.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [donationCurrency](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrency.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [donationCurrencySymbol](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrencySymbol.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [donationField](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationField.md) → [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [organisation](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/organisation.md) ↔ [Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_latefinal_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [scaffoldKey](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/scaffoldKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)> - - - - -_final_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [url](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/url.md) ↔ [Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html) - - - - -_latefinal_ - - - -##### [user](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/user.md) ↔ [Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html)<[User](../models_user_user_info/User-class.md)> - - - - -_latefinal_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [attachListener](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/attachListener.md)([Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) void - - - - - - - - -##### [changeCurrency](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/changeCurrency.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) void - - - -This method changes the currency of the user for donation purpose. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [dominationButton](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/dominationButton.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) amount, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -This widget returns button for domination. - - - - -##### [iconButton](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/iconButton.md)([Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onTap) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -This widget returns the button for social media sharing option. - - - - -##### [initialize](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/initialize.md)() void - - - - - - - - -##### [invite](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/invite.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - -This function generates the organization invitation link in a Dialog Box. -Dialog box contains the QR-code of organization invite link and social media sharing options. - - - - -##### [logout](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/logout.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This method destroys the user's session or sign out the user from app. -The function asks for the confimation in Custom Alert Dialog. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [popBottomSheet](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/popBottomSheet.md)() void - - - - - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [showSnackBar](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/showSnackBar.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) message) void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updateSheetHeight](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/updateSheetHeight.md)() void - - - - - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/ProfilePageViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/ProfilePageViewModel.md deleted file mode 100644 index d85feb283..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/ProfilePageViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ProfilePageViewModel constructor - - - - - - - -ProfilePageViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/attachListener.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/attachListener.md deleted file mode 100644 index edcf92782..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/attachListener.md +++ /dev/null @@ -1,50 +0,0 @@ - - - -# attachListener method - - - - - - - - -void attachListener -([Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) - - - - - - - - -## Implementation - -```dart -void attachListener(Function setter) { - donationField.addListener(() { - if (donationField.hasFocus) { - setter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.8725; - }); - } else { - Future.delayed(const Duration(milliseconds: 300), () { - { - setter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.68; - }); - } - }); - } - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/bottomSheetHeight.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/bottomSheetHeight.md deleted file mode 100644 index 6b02dd542..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/bottomSheetHeight.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# bottomSheetHeight property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html) bottomSheetHeight - -_read / write_ - - - - - - -## Implementation - -```dart -double bottomSheetHeight = SizeConfig.screenHeight! * 0.68; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/changeCurrency.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/changeCurrency.md deleted file mode 100644 index 123044aa4..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/changeCurrency.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# changeCurrency method - - - - - - - - -void changeCurrency -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) - - - - - -

This method changes the currency of the user for donation purpose.

- - - -## Implementation - -```dart -void changeCurrency(BuildContext context, Function setter) { - showCurrencyPicker( - context: context, - currencyFilter: supportedCurrencies, - onSelect: (Currency currency) { - setter(() { - donationCurrency = currency.code; - donationCurrencySymbol = currency.symbol; - }); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentOrg.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentOrg.md deleted file mode 100644 index 6455d508d..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentOrg.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# currentOrg property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) currentOrg - -_read / write_ - - - - - - -## Implementation - -```dart -late OrgInfo currentOrg; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentUser.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentUser.md deleted file mode 100644 index e955d4062..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/currentUser.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# currentUser property - - - - - - - -[User](../../models_user_user_info/User-class.md) currentUser - -_read / write_ - - - - - - -## Implementation - -```dart -late User currentUser; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/denomination.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/denomination.md deleted file mode 100644 index d75e715f0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/denomination.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# denomination property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> denomination - -_final_ - - - - - - -## Implementation - -```dart -final List denomination = ['1', '5', '10']; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/dominationButton.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/dominationButton.md deleted file mode 100644 index b69ecf716..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/dominationButton.md +++ /dev/null @@ -1,68 +0,0 @@ - - - -# dominationButton method - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) dominationButton -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) amount, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setter) - - - - - -

This widget returns button for domination.

-

params:

-
    -
  • amount : donation Amount.
  • -
  • setter : Function type, which on tap set the amount to donationAmount.
  • -
- - - -## Implementation - -```dart -Widget dominationButton( - String amount, - BuildContext context, - Function setter, -) { - return InkWell( - onTap: () { - setter(() { - donationAmount.text = amount; - }); - }, - child: Container( - padding: EdgeInsets.symmetric( - vertical: SizeConfig.screenHeight! * 0.02, - horizontal: SizeConfig.screenWidth! * 0.075, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: donationAmount.text == amount - ? Theme.of(context).colorScheme.secondary - : Theme.of(context).colorScheme.primary, - ), - child: Text( - '$donationCurrencySymbol $amount', - style: Theme.of(context).textTheme.titleMedium, - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationAmount.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationAmount.md deleted file mode 100644 index 9ce57b258..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationAmount.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# donationAmount property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) donationAmount - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController donationAmount = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrency.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrency.md deleted file mode 100644 index aacae7fd4..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrency.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# donationCurrency property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) donationCurrency - -_read / write_ - - - - - - -## Implementation - -```dart -String donationCurrency = "USD"; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrencySymbol.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrencySymbol.md deleted file mode 100644 index bd1213350..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationCurrencySymbol.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# donationCurrencySymbol property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) donationCurrencySymbol - -_read / write_ - - - - - - -## Implementation - -```dart -String donationCurrencySymbol = "\$"; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationField.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationField.md deleted file mode 100644 index a8002fbd9..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/donationField.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# donationField property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) donationField - -_final_ - - - - - - -## Implementation - -```dart -final FocusNode donationField = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/iconButton.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/iconButton.md deleted file mode 100644 index 3c4daade7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/iconButton.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# iconButton method - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) iconButton -([Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onTap) - - - - - -

This widget returns the button for social media sharing option.

-

params:

-
    -
  • icon : This is Widget type with icon details.
  • -
  • onTap : This is Function, which invoke on tap.
  • -
- - - -## Implementation - -```dart -Widget iconButton(Widget icon, Function onTap) { - return Stack( - children: [ - IconButton( - onPressed: () { - print('tapped'); - onTap(); - }, - icon: icon, - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/initialize.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/initialize.md deleted file mode 100644 index 831375087..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/initialize.md +++ /dev/null @@ -1,39 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -() - - - - - - - - -## Implementation - -```dart -void initialize() { - setState(ViewState.busy); - currentOrg = _userConfig.currentOrg; - currentUser = _userConfig.currentUser; - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/invite.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/invite.md deleted file mode 100644 index 3126aa8f9..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/invite.md +++ /dev/null @@ -1,134 +0,0 @@ - - - -# invite method - - - - - - - - -void invite -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

This function generates the organization invitation link in a Dialog Box. -Dialog box contains the QR-code of organization invite link and social media sharing options.

- - - -## Implementation - -```dart -void invite(BuildContext context) { - _appLanguageService.initialize(); - // organization url - final String url = - 'https://cyberwake.github.io/applink/invite?selectLang=${_appLanguageService.appLocal.languageCode}&setUrl=${GraphqlConfig.orgURI}&selectOrg=${userConfig.currentOrg.id!}'; - // QR - final String qrData = - '${GraphqlConfig.orgURI}?orgid=${userConfig.currentOrg.id!}'; - print(url); - print(qrData); - showModalBottomSheet( - context: context, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.height * 0.75, - decoration: const BoxDecoration( - color: Colors.white, - ), - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - QrImage( - data: qrData, - version: QrVersions.auto, - size: 200.0, - foregroundColor: Colors.black, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.08, - ), - Text( - 'Scan the QR to join ${userConfig.currentOrg.name}', - style: const TextStyle(color: Colors.black), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.02, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.min, - children: [ - iconButton( - const FaIcon( - FontAwesomeIcons.twitter, - size: 35, - color: Color(0xFF1DA1F2), - ), - () async => SocialShare.shareTwitter('Join us', url: url), - ), - iconButton( - CustomPaint( - size: const Size( - 50, - 50 * 1.004, - ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - painter: WhatsappLogo(), - ), - () async => SocialShare.shareWhatsapp(url), - ), - iconButton( - CustomPaint( - size: Size( - 45, - (45 * 1).toDouble(), - ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - painter: TelegramLogo(), - ), - () async => SocialShare.shareTelegram(url), - ), - iconButton( - const FaIcon( - FontAwesomeIcons.shareNodes, - size: 30, - color: Color(0xff40c351), - ), - () async => SocialShare.shareOptions(url), - ), - ], - ) - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/logout.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/logout.md deleted file mode 100644 index 32f820dbc..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/logout.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# logout method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> logout -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

This method destroys the user's session or sign out the user from app. -The function asks for the confimation in Custom Alert Dialog.

- - - -## Implementation - -```dart -Future logout(BuildContext context) async { - // push custom alert dialog with the confirmation message. - navigationService.pushDialog( - CustomAlertDialog( - reverse: true, - dialogSubTitle: 'Are you sure you want to logout?', - successText: 'Logout', - success: () async { - try { - final result = await databaseFunctions - .gqlAuthMutation(queries.logout()) as QueryResult?; - if (result != null && result.data!['logout'] == true) { - navigationService.pop(); - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('LogoutProgress'), - ), - ); - Future.delayed(const Duration(seconds: 1)).then((value) { - user = Hive.box('currentUser'); - url = Hive.box('url'); - final androidFirebaseOptionsBox = - Hive.box('androidFirebaseOptions'); - final iosFirebaseOptionsBox = Hive.box('iosFirebaseOptions'); - organisation = Hive.box('currentOrg'); - user.clear(); - url.clear(); - androidFirebaseOptionsBox.clear(); - iosFirebaseOptionsBox.clear(); - try { - Firebase.app() - .delete(); // Deleting app will stop all Firebase plugins - } catch (e) { - debugPrint("ERROR: Unable to delete firebase app $e"); - } - organisation.clear(); - navigationService.pop(); - navigationService.removeAllAndPush( - '/selectLang', - '/', - arguments: '0', - ); - }); - } - } catch (e) { - print(e); - } - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/organisation.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/organisation.md deleted file mode 100644 index 3d34e04e3..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/organisation.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# organisation property - - - - - - - -[Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> organisation - -_latefinal_ - - - - - - -## Implementation - -```dart -late final Box organisation; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/popBottomSheet.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/popBottomSheet.md deleted file mode 100644 index 13718f6ff..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/popBottomSheet.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# popBottomSheet method - - - - - - - - -void popBottomSheet -() - - - - - - - - -## Implementation - -```dart -void popBottomSheet() { - _navigationService.pop(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/scaffoldKey.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/scaffoldKey.md deleted file mode 100644 index 2ecabe500..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/scaffoldKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# scaffoldKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)> scaffoldKey - -_final_ - - - - - - -## Implementation - -```dart -final GlobalKey scaffoldKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/showSnackBar.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/showSnackBar.md deleted file mode 100644 index aabf7b6b9..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/showSnackBar.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# showSnackBar method - - - - - - - - -void showSnackBar -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) message) - - - - - - - - -## Implementation - -```dart -void showSnackBar(String message) { - _navigationService.showTalawaErrorDialog(message, MessageType.error); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/updateSheetHeight.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/updateSheetHeight.md deleted file mode 100644 index e79f361a2..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/updateSheetHeight.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# updateSheetHeight method - - - - - - - - -void updateSheetHeight -() - - - - - - - - -## Implementation - -```dart -void updateSheetHeight() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.65; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/url.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/url.md deleted file mode 100644 index 0c2f3bed7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/url.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# url property - - - - - - - -[Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html) url - -_latefinal_ - - - - - - -## Implementation - -```dart -late final Box url; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/user.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/user.md deleted file mode 100644 index 441993dc6..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel/user.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# user property - - - - - - - -[Box](https://pub.dev/documentation/hive/2.2.3/hive/Box-class.html)<[User](../../models_user_user_info/User-class.md)> user - -_latefinal_ - - - - - - -## Implementation - -```dart -late final Box user; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md deleted file mode 100644 index 02602c2f7..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_profile_view_models_profile_page_view_model/view_model_after_auth_view_models_profile_view_models_profile_page_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# profile_page_view_model library - - - - - - - - - - - -## Classes - -##### [ProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md) - - - -ProfilePageViewModel class helps to interact with model to serve data -and react to user's input in Profile Page view. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md deleted file mode 100644 index 4050b66df..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md +++ /dev/null @@ -1,252 +0,0 @@ - - - -# CreateTaskViewModel class - - - - - - - - - -

CreateTaskViewModel class helps to interact with model to serve data -and react to user's input in Create Task view.

-

Methods include:

-
    -
  • fillTask
  • -
  • `editTask
  • -
  • createTask
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- CreateTaskViewModel - - - - - - - - -## Constructors - -[CreateTaskViewModel](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/CreateTaskViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [taskDescriptionTextController](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskDescriptionTextController.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_final_ - - - -##### [taskEndDate](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndDate.md) ↔ [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) - - - - -_read / write_ - - - -##### [taskEndTime](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndTime.md) ↔ [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) - - - - -_read / write_ - - - -##### [taskTitleTextController](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskTitleTextController.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_final_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [createTask](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/createTask.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function creates a new task for an event. -The function uses createTask method provided by Task Services. - - - - -##### [dispose](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [editTask](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/editTask.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> - - - -This function updates the task. -The function uses editTask method provided by Task Services. - - - - -##### [fillTask](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/fillTask.md)([Task](../models_task_task_model/Task-class.md) task) void - - - -This functions fills the task controller data. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/CreateTaskViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/CreateTaskViewModel.md deleted file mode 100644 index ddf303088..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/CreateTaskViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CreateTaskViewModel constructor - - - - - - - -CreateTaskViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/createTask.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/createTask.md deleted file mode 100644 index 5bcc17868..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/createTask.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# createTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> createTask -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function creates a new task for an event. -The function uses createTask method provided by Task Services.

-

params:

-
    -
  • eventId : id of the event for which task need to be add.
  • -
- - - -## Implementation - -```dart -Future createTask(String eventId) async { - final deadline = DateTime( - taskEndDate.year, - taskEndDate.month, - taskEndDate.day, - taskEndTime.hour, - taskEndTime.minute, - ); - return _taskService.createTask( - title: taskTitleTextController.text, - description: taskDescriptionTextController.text, - deadline: deadline.microsecondsSinceEpoch.toString(), - eventId: eventId, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/dispose.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/dispose.md deleted file mode 100644 index 220418033..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/dispose.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -void dispose() { - taskTitleTextController.dispose(); - taskDescriptionTextController.dispose(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/editTask.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/editTask.md deleted file mode 100644 index bb4079d46..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/editTask.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# editTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> editTask -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId) - - - - - -

This function updates the task. -The function uses editTask method provided by Task Services.

-

params:

-
    -
  • taskId : id of the task that needs to be updated.
  • -
- - - -## Implementation - -```dart -Future editTask(String taskId) async { - final deadline = DateTime( - taskEndDate.year, - taskEndDate.month, - taskEndDate.day, - taskEndTime.hour, - taskEndTime.minute, - ); - return _taskService.editTask( - title: taskTitleTextController.text, - description: taskDescriptionTextController.text, - deadline: deadline.microsecondsSinceEpoch.toString(), - taskId: taskId, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/fillTask.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/fillTask.md deleted file mode 100644 index 5bea4157a..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/fillTask.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# fillTask method - - - - - - - - -void fillTask -([Task](../../models_task_task_model/Task-class.md) task) - - - - - -

This functions fills the task controller data.

-

params:

-
    -
  • task : Task type contain task data.
  • -
- - - -## Implementation - -```dart -void fillTask(Task task) { - taskTitleTextController.text = task.title; - taskDescriptionTextController.text = task.description ?? ''; - if (task.deadline != null) { - taskEndDate = - DateTime.fromMicrosecondsSinceEpoch(int.parse(task.deadline!)); - taskEndTime = TimeOfDay.fromDateTime(taskEndDate); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskDescriptionTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskDescriptionTextController.md deleted file mode 100644 index 7f032da66..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskDescriptionTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# taskDescriptionTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) taskDescriptionTextController - -_final_ - - - - - - -## Implementation - -```dart -final taskDescriptionTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndDate.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndDate.md deleted file mode 100644 index 696d43408..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# taskEndDate property - - - - - - - -[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) taskEndDate - -_read / write_ - - - - - - -## Implementation - -```dart -DateTime taskEndDate = DateTime.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndTime.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndTime.md deleted file mode 100644 index 3e1250440..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskEndTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# taskEndTime property - - - - - - - -[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) taskEndTime - -_read / write_ - - - - - - -## Implementation - -```dart -TimeOfDay taskEndTime = TimeOfDay.now(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskTitleTextController.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskTitleTextController.md deleted file mode 100644 index 9936df399..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel/taskTitleTextController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# taskTitleTextController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) taskTitleTextController - -_final_ - - - - - - -## Implementation - -```dart -final taskTitleTextController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md deleted file mode 100644 index cfbe42c2b..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_create_task_view_model/view_model_after_auth_view_models_task_view_models_create_task_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# create_task_view_model library - - - - - - - - - - - -## Classes - -##### [CreateTaskViewModel](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md) - - - -CreateTaskViewModel class helps to interact with model to serve data -and react to user's input in Create Task view. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md deleted file mode 100644 index 688e124ea..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md +++ /dev/null @@ -1,226 +0,0 @@ - - - -# ExploreTasksViewModel class - - - - - - - - - -

ExploreTasksViewModel class helps to interact with model to serve data -and react to user's input in Explore Task section.

-

Methods include:

-
    -
  • fetchTasks
  • -
  • `fetchTasksByUser
  • -
  • deleteTask
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- ExploreTasksViewModel - - - - - - - - -## Constructors - -[ExploreTasksViewModel](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/ExploreTasksViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [tasks](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/tasks.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../models_task_task_model/Task-class.md)> - - - - -_read-only_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [deleteTask](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/deleteTask.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) creatorId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function deletes the task for an event. -The function uses deleteTask method of Task Service. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [fetchTasks](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasks.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function fetch all the task for an event. -The function uses getTasksForEvent method of Task Service. - - - - -##### [fetchTasksByUser](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasksByUser.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function fetch tasks created by the current user for an event. -The function uses getTasksByUser method of Task Service. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/ExploreTasksViewModel.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/ExploreTasksViewModel.md deleted file mode 100644 index 3d09387b0..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/ExploreTasksViewModel.md +++ /dev/null @@ -1,31 +0,0 @@ - - - -# ExploreTasksViewModel constructor - - - - - - - -ExploreTasksViewModel() - - - - - -## Implementation - -```dart -ExploreTasksViewModel() { - _taskService.callbackNotifyListeners = () => notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/deleteTask.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/deleteTask.md deleted file mode 100644 index 45d4afc88..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/deleteTask.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# deleteTask method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> deleteTask -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) taskId, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) creatorId) - - - - - -

This function deletes the task for an event. -The function uses deleteTask method of Task Service.

-

params:

-
    -
  • taskId : id of the task need to be deleted.
  • -
  • creatorId : id of the task creator.
  • -
- - - -## Implementation - -```dart -Future deleteTask(String taskId, String creatorId) async { - await _taskService.deleteTask(taskId, creatorId); - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasks.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasks.md deleted file mode 100644 index fc7f65268..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasks.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# fetchTasks method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> fetchTasks -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId) - - - - - -

This function fetch all the task for an event. -The function uses getTasksForEvent method of Task Service.

-

params:

-
    -
  • eventId : id of an event for which tasks need to be fetched.
  • -
- - - -## Implementation - -```dart -Future fetchTasks(String eventId) async { - setState(ViewState.busy); - await _taskService.getTasksForEvent(eventId); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasksByUser.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasksByUser.md deleted file mode 100644 index 968e5f374..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/fetchTasksByUser.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# fetchTasksByUser method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> fetchTasksByUser -() - - - - - -

This function fetch tasks created by the current user for an event. -The function uses getTasksByUser method of Task Service.

- - - -## Implementation - -```dart -Future fetchTasksByUser() async { - setState(ViewState.busy); - await _taskService.getTasksByUser(); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/tasks.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/tasks.md deleted file mode 100644 index a04396c29..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel/tasks.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# tasks property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../../models_task_task_model/Task-class.md)> tasks - - - - - - - - -## Implementation - -```dart -List get tasks => _taskService.tasks; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md b/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md deleted file mode 100644 index bdfdc5fcf..000000000 --- a/talawa-mobile-docs/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/view_model_after_auth_view_models_task_view_models_explore_tasks_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# explore_tasks_view_model library - - - - - - - - - - - -## Classes - -##### [ExploreTasksViewModel](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md) - - - -ExploreTasksViewModel class helps to interact with model to serve data -and react to user's input in Explore Task section. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/BaseModel-class.md b/talawa-mobile-docs/view_model_base_view_model/BaseModel-class.md deleted file mode 100644 index 873cf71cf..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/BaseModel-class.md +++ /dev/null @@ -1,206 +0,0 @@ - - - -# BaseModel class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- BaseModel - - - -**Implementers** - -- [AccessScreenViewModel](../view_model_access_request_view_model/AccessScreenViewModel-class.md) -- [AddPostViewModel](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md) -- [AppLanguage](../view_model_lang_view_model/AppLanguage-class.md) -- [AppTheme](../view_model_theme_view_model/AppTheme-class.md) -- [CommentsViewModel](../view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md) -- [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) -- [CreateTaskViewModel](../view_model_after_auth_view_models_task_view_models_create_task_view_model/CreateTaskViewModel-class.md) -- [CustomDrawerViewModel](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md) -- [DemoViewModel](../main/DemoViewModel-class.md) -- [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) -- [EditEventViewModel](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) -- [EditProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_edit_profile_view_model/EditProfilePageViewModel-class.md) -- [EventInfoViewModel](../view_model_after_auth_view_models_event_view_models_event_info_view_model/EventInfoViewModel-class.md) -- [ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) -- [ExploreTasksViewModel](../view_model_after_auth_view_models_task_view_models_explore_tasks_view_model/ExploreTasksViewModel-class.md) -- [LikeButtonViewModel](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md) -- [LoginViewModel](../view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md) -- [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md) -- [OrganizationFeedViewModel](../view_model_after_auth_view_models_feed_view_models_organization_feed_view_model/OrganizationFeedViewModel-class.md) -- [ProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md) -- [ProgressDialogViewModel](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md) -- [SelectContactViewModel](../view_model_after_auth_view_models_chat_view_models_select_contact_view_model/SelectContactViewModel-class.md) -- [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) -- [SetUrlViewModel](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md) -- [SignupDetailsViewModel](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md) -- [WaitingViewModel](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md) - - - - - -## Constructors - -[BaseModel](../view_model_base_view_model/BaseModel/BaseModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-only_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/BaseModel/BaseModel.md b/talawa-mobile-docs/view_model_base_view_model/BaseModel/BaseModel.md deleted file mode 100644 index 679d13ccb..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/BaseModel/BaseModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# BaseModel constructor - - - - - - - -BaseModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/BaseModel/isBusy.md b/talawa-mobile-docs/view_model_base_view_model/BaseModel/isBusy.md deleted file mode 100644 index e7de222ca..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/BaseModel/isBusy.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# isBusy property - - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isBusy - - - - - - - - -## Implementation - -```dart -bool get isBusy => _state == ViewState.busy; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/BaseModel/setState.md b/talawa-mobile-docs/view_model_base_view_model/BaseModel/setState.md deleted file mode 100644 index a225602b8..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/BaseModel/setState.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# setState method - - - - - - - - -void setState -([ViewState](../../enums_enums/ViewState.md) viewState) - - - - - - - - -## Implementation - -```dart -void setState(ViewState viewState) { - _state = viewState; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/BaseModel/state.md b/talawa-mobile-docs/view_model_base_view_model/BaseModel/state.md deleted file mode 100644 index 1c802c49d..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/BaseModel/state.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# state property - - - - - - - - - -[ViewState](../../enums_enums/ViewState.md) state - - - - - - - - -## Implementation - -```dart -ViewState get state => _state; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_base_view_model/view_model_base_view_model-library.md b/talawa-mobile-docs/view_model_base_view_model/view_model_base_view_model-library.md deleted file mode 100644 index 95dcbc20c..000000000 --- a/talawa-mobile-docs/view_model_base_view_model/view_model_base_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# base_view_model library - - - - - - - - - - - -## Classes - -##### [BaseModel](../view_model_base_view_model/BaseModel-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage-class.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage-class.md deleted file mode 100644 index 2927d291d..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage-class.md +++ /dev/null @@ -1,292 +0,0 @@ - - - -# AppLanguage class - - - - - - - - - -

AppLanguage view model class interact with modal in the context of the App Language. -The class provides methods that set's the language, change the language in the modal.

-

Methods include:

-
    -
  • fetchLocale
  • -
  • changeLanguage
  • -
  • selectLanguagePress
  • -
  • dbLanguageUpdate
  • -
  • appLanguageQuery
  • -
  • userLanguageQuery
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- AppLanguage - - - - - - - - -## Constructors - -[AppLanguage](../view_model_lang_view_model/AppLanguage/AppLanguage.md) ({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - -## Properties - -##### [appLocal](../view_model_lang_view_model/AppLanguage/appLocal.md) → [Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) - - - - -_read-only_ - - - -##### [databaseFunctions](../view_model_lang_view_model/AppLanguage/databaseFunctions.md) → [DataBaseMutationFunctions](../services_database_mutation_functions/DataBaseMutationFunctions-class.md) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [isTest](../view_model_lang_view_model/AppLanguage/isTest.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [navigationService](../view_model_lang_view_model/AppLanguage/navigationService.md) → [NavigationService](../services_navigation_service/NavigationService-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [appLanguageQuery](../view_model_lang_view_model/AppLanguage/appLanguageQuery.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function perform graphQL query to check the app language. -The function uses gqlAuthQuery method provided by Database Functions Services. - - - - -##### [changeLanguage](../view_model_lang_view_model/AppLanguage/changeLanguage.md)([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) type) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function change the app default language. - - - - -##### [dbLanguageUpdate](../view_model_lang_view_model/AppLanguage/dbLanguageUpdate.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function updates the Database Language by running the graphQL mutations. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [fetchLocale](../view_model_lang_view_model/AppLanguage/fetchLocale.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function fetch the language of the user's app. - - - - -##### [initialize](../view_model_lang_view_model/AppLanguage/initialize.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [selectLanguagePress](../view_model_lang_view_model/AppLanguage/selectLanguagePress.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function navigate user to /appSettingsPage route if the user is authenticated -else navigate to /setUrl route. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [userLanguageQuery](../view_model_lang_view_model/AppLanguage/userLanguageQuery.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function perform graphQL query to check the user's language in the database. -The function uses gqlAuthQuery method provided by Database Functions Services. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/AppLanguage.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/AppLanguage.md deleted file mode 100644 index 893a5b3d7..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/AppLanguage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# AppLanguage constructor - - - - - - - -AppLanguage({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest = false}) - - - - - -## Implementation - -```dart -AppLanguage({this.isTest = false}); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLanguageQuery.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLanguageQuery.md deleted file mode 100644 index 5720f3225..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLanguageQuery.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# appLanguageQuery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> appLanguageQuery -() - - - - - -

This function perform graphQL query to check the app language. -The function uses gqlAuthQuery method provided by Database Functions Services.

- - - -## Implementation - -```dart -Future appLanguageQuery() async { - try { - await databaseFunctions.gqlAuthQuery(queries.userLanguage()); - } catch (e) { - print(e); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLocal.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLocal.md deleted file mode 100644 index 6dfb7e022..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/appLocal.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# appLocal property - - - - - - - - - -[Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) appLocal - - - - - - - - -## Implementation - -```dart -Locale get appLocal => _appLocale; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/changeLanguage.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/changeLanguage.md deleted file mode 100644 index 623634d01..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/changeLanguage.md +++ /dev/null @@ -1,94 +0,0 @@ - - - -# changeLanguage method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> changeLanguage -([Locale](https://api.flutter.dev/flutter/dart-ui/Locale-class.html) type) - - - - - -

This function change the app default language.

-

params:

-
    -
  • type : Locale type, the language need to be updated with.
  • -
- - - -## Implementation - -```dart -Future changeLanguage(Locale type) async { - // if the app language is of same [type]. - if (_appLocale == type) { - return; - } - - if (isTest) { - _appLocale = type; - } else { - final prefs = await SharedPreferences.getInstance(); - if (type == const Locale("es")) { - //If selected language is spanish - _appLocale = const Locale("es"); - await prefs.setString('language_code', 'es'); - await prefs.setString('countryCode', 'ES'); - } else if (type == const Locale("fr")) { - //If selected language is french - _appLocale = const Locale("fr"); - await prefs.setString('language_code', 'fr'); - await prefs.setString('countryCode', 'FR'); - } else if (type == const Locale("hi")) { - //If selected language is hindi - _appLocale = const Locale("hi"); - await prefs.setString('language_code', 'hi'); - await prefs.setString('countryCode', 'IN'); - } else if (type == const Locale("zh")) { - //If selected language is Chinese - _appLocale = const Locale("zh"); - await prefs.setString('language_code', 'zh'); - await prefs.setString('countryCode', 'CN'); - } else if (type == const Locale("de")) { - //If selected language is Chinese - _appLocale = const Locale("de"); - await prefs.setString('language_code', 'de'); - await prefs.setString('countryCode', 'GE'); - } else if (type == const Locale("ja")) { - //If selected language is Chinese - _appLocale = const Locale("ja"); - await prefs.setString('language_code', 'ja'); - await prefs.setString('countryCode', 'JP'); - } else if (type == const Locale("pt")) { - //If selected language is Chinese - _appLocale = const Locale("pt"); - await prefs.setString('language_code', 'pt'); - await prefs.setString('countryCode', 'PT'); - } else { - //If selected language is english - _appLocale = const Locale("en"); - await prefs.setString('language_code', 'en'); - await prefs.setString('countryCode', 'US'); - } - } - - /// notifying the consumers - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/databaseFunctions.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/databaseFunctions.md deleted file mode 100644 index 3d86d3cd6..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/databaseFunctions.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# databaseFunctions property - - - - - - - -[DataBaseMutationFunctions](../../services_database_mutation_functions/DataBaseMutationFunctions-class.md) databaseFunctions - -_final_ - - - - - - -## Implementation - -```dart -final databaseFunctions = locator(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/dbLanguageUpdate.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/dbLanguageUpdate.md deleted file mode 100644 index 82e5677ef..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/dbLanguageUpdate.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# dbLanguageUpdate method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> dbLanguageUpdate -() - - - - - -

This function updates the Database Language by running the graphQL mutations.

- - - -## Implementation - -```dart -Future dbLanguageUpdate() async { - try { - await databaseFunctions - .gqlAuthMutation(queries.updateLanguage(_appLocale.languageCode)); - print('Language Updated in Database'); - } catch (e) { - print(e); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/fetchLocale.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/fetchLocale.md deleted file mode 100644 index 6958ea213..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/fetchLocale.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# fetchLocale method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> fetchLocale -() - - - - - -

This function fetch the language of the user's app.

- - - -## Implementation - -```dart -Future fetchLocale() async { - final prefs = await SharedPreferences.getInstance(); - final String langCode = prefs.getString('language_code') ?? 'en'; - _appLocale = Locale(langCode); - - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/initialize.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/initialize.md deleted file mode 100644 index 8892ae6b8..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/initialize.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# initialize method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialize -() - - - - - - - - -## Implementation - -```dart -Future initialize() async { - _appLocale = const Locale('en'); - await fetchLocale(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/isTest.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/isTest.md deleted file mode 100644 index e6e920cda..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/isTest.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isTest property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isTest - -_final_ - - - - - - -## Implementation - -```dart -final bool isTest; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/navigationService.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/navigationService.md deleted file mode 100644 index e7dcec48a..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/navigationService.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# navigationService property - - - - - - - -[NavigationService](../../services_navigation_service/NavigationService-class.md) navigationService - -_final_ - - - - - - -## Implementation - -```dart -final navigationService = locator(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/selectLanguagePress.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/selectLanguagePress.md deleted file mode 100644 index 22b21ec3f..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/selectLanguagePress.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# selectLanguagePress method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> selectLanguagePress -() - - - - - -

This function navigate user to /appSettingsPage route if the user is authenticated -else navigate to /setUrl route.

- - - -## Implementation - -```dart -Future selectLanguagePress() async { - final bool userLoggedIn = await userConfig.userLoggedIn(); - if (userLoggedIn) { - dbLanguageUpdate(); - navigationService.popAndPushScreen('/appSettingsPage', arguments: ''); - } else { - navigationService.pushScreen('/setUrl', arguments: ''); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/userLanguageQuery.md b/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/userLanguageQuery.md deleted file mode 100644 index 2a4c097b7..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/AppLanguage/userLanguageQuery.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# userLanguageQuery method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> userLanguageQuery -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) userId) - - - - - -

This function perform graphQL query to check the user's language in the database. -The function uses gqlAuthQuery method provided by Database Functions Services.

-

params:

-
    -
  • userId : user for which language need to be fetch.
  • -
- - - -## Implementation - -```dart -Future userLanguageQuery(String userId) async { - try { - await databaseFunctions.gqlAuthQuery(queries.newUserLanguage(userId)); - } catch (e) { - print(e); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_lang_view_model/view_model_lang_view_model-library.md b/talawa-mobile-docs/view_model_lang_view_model/view_model_lang_view_model-library.md deleted file mode 100644 index 6ab708dcf..000000000 --- a/talawa-mobile-docs/view_model_lang_view_model/view_model_lang_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# lang_view_model library - - - - - - - - - - - -## Classes - -##### [AppLanguage](../view_model_lang_view_model/AppLanguage-class.md) - - - -AppLanguage view model class interact with modal in the context of the App Language. -The class provides methods that set's the language, change the language in the modal. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel-class.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel-class.md deleted file mode 100644 index 6935ca705..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel-class.md +++ /dev/null @@ -1,616 +0,0 @@ - - - -# MainScreenViewModel class - - - - - - - - - -

MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views.

-

The functions in this class are -mainly in the context of Tutorials for different componenets of the App.

-

Functions include:

-
    -
  • showTutorial
  • -
  • showHome
  • -
  • tourEventTargets
  • -
  • tourAddPost
  • -
  • tourChat
  • -
  • tourProfile
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- MainScreenViewModel - - - - - - - - -## Constructors - -[MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel/MainScreenViewModel.md) () - - - - -## Properties - -##### [context](../view_model_main_screen_view_model/MainScreenViewModel/context.md) ↔ [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) - - - -context consist of parent info. -_read / write_ - - - -##### [currentPageIndex](../view_model_main_screen_view_model/MainScreenViewModel/currentPageIndex.md) ↔ [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -var for current page in index. -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [keyBNChat](../view_model_main_screen_view_model/MainScreenViewModel/keyBNChat.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyBNEvents](../view_model_main_screen_view_model/MainScreenViewModel/keyBNEvents.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyBNHome](../view_model_main_screen_view_model/MainScreenViewModel/keyBNHome.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyBNPost](../view_model_main_screen_view_model/MainScreenViewModel/keyBNPost.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyBNProfile](../view_model_main_screen_view_model/MainScreenViewModel/keyBNProfile.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySEAdd](../view_model_main_screen_view_model/MainScreenViewModel/keySEAdd.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySECard](../view_model_main_screen_view_model/MainScreenViewModel/keySECard.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySECategoryMenu](../view_model_main_screen_view_model/MainScreenViewModel/keySECategoryMenu.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySEDateFilter](../view_model_main_screen_view_model/MainScreenViewModel/keySEDateFilter.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySHMenuIcon](../view_model_main_screen_view_model/MainScreenViewModel/keySHMenuIcon.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySHOrgName](../view_model_main_screen_view_model/MainScreenViewModel/keySHOrgName.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySHPinnedPost](../view_model_main_screen_view_model/MainScreenViewModel/keySHPinnedPost.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySHPost](../view_model_main_screen_view_model/MainScreenViewModel/keySHPost.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPAppSetting](../view_model_main_screen_view_model/MainScreenViewModel/keySPAppSetting.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPDonateUs](../view_model_main_screen_view_model/MainScreenViewModel/keySPDonateUs.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPEditProfile](../view_model_main_screen_view_model/MainScreenViewModel/keySPEditProfile.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPHelp](../view_model_main_screen_view_model/MainScreenViewModel/keySPHelp.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPInvite](../view_model_main_screen_view_model/MainScreenViewModel/keySPInvite.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPLogout](../view_model_main_screen_view_model/MainScreenViewModel/keySPLogout.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keySPPalisadoes](../view_model_main_screen_view_model/MainScreenViewModel/keySPPalisadoes.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [navBarItems](../view_model_main_screen_view_model/MainScreenViewModel/navBarItems.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[BottomNavigationBarItem](https://api.flutter.dev/flutter/widgets/BottomNavigationBarItem-class.html)> - - - -Actual BottomNavigationBarItems that show up on the screen. -_read / write_ - - - -##### [pages](../view_model_main_screen_view_model/MainScreenViewModel/pages.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html)> - - - -Contains the Widgets to be rendered for corresponding navbar items. -_read / write_ - - - -##### [pluginList](../view_model_main_screen_view_model/MainScreenViewModel/pluginList.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html) - - - -list of all the pluginList. -_read / write_ - - - -##### [pluginPrototypeData](../view_model_main_screen_view_model/MainScreenViewModel/pluginPrototypeData.md) ↔ [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) - - - -Maps the feature names with their proper Icon and Page. -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [showAppTour](../view_model_main_screen_view_model/MainScreenViewModel/showAppTour.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -bool to determine if we wanna show the apptour. -_read / write_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [targets](../view_model_main_screen_view_model/MainScreenViewModel/targets.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)> - - - -array of target. -_final_ - - - -##### [tourComplete](../view_model_main_screen_view_model/MainScreenViewModel/tourComplete.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -bool to determine if apptour is complete. -_read / write_ - - - -##### [tourSkipped](../view_model_main_screen_view_model/MainScreenViewModel/tourSkipped.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -bool to determine if apptour is skipped. -_read / write_ - - - -##### [tutorialCoachMark](../view_model_main_screen_view_model/MainScreenViewModel/tutorialCoachMark.md) ↔ [TutorialCoachMark](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TutorialCoachMark-class.html) - - - -tutorialCoachMark consist of coach used to give tutorial. -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [fetchAndAddPlugins](../view_model_main_screen_view_model/MainScreenViewModel/fetchAndAddPlugins.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - -Dynamically adds BottomNavigationBarItems in BottomNavigationBar. - - - - -##### [focusTarget](../view_model_main_screen_view_model/MainScreenViewModel/focusTarget.md)([GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> key, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) keyName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isCircle = false, [ContentAlign](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/ContentAlign.html) align = ContentAlign.bottom, [CrossAxisAlignment](https://api.flutter.dev/flutter/rendering/CrossAxisAlignment.html) crossAlign = CrossAxisAlignment.start, [Alignment](https://api.flutter.dev/flutter/painting/Alignment-class.html) skipAlignment = Alignment.topRight, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? next, [CrossAxisAlignment](https://api.flutter.dev/flutter/rendering/CrossAxisAlignment.html) nextCrossAlign = CrossAxisAlignment.end, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isEnd = false}) [TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html) - - - -This returns a widget for a step in a tutorial. - - - - -##### [initialise](../view_model_main_screen_view_model/MainScreenViewModel/initialise.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) ctx, {required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromSignUp, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex}) void - - - -Initalizing function. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [onTabTapped](../view_model_main_screen_view_model/MainScreenViewModel/onTabTapped.md)([int](https://api.flutter.dev/flutter/dart-core/int-class.html) index) void - - - -Handles click on BottomNavigationBarItem. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [showHome](../view_model_main_screen_view_model/MainScreenViewModel/showHome.md)([TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html) clickedTarget) void - - - -This function shows the Home screen. - - - - -##### [showTutorial](../view_model_main_screen_view_model/MainScreenViewModel/showTutorial.md)({required dynamic onClickTarget([TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)), required dynamic onFinish()}) void - - - -This function show tutorial to user. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [tourAddPost](../view_model_main_screen_view_model/MainScreenViewModel/tourAddPost.md)() void - - - -This function show the tutorial to add Post in the organization. - - - - -##### [tourChat](../view_model_main_screen_view_model/MainScreenViewModel/tourChat.md)() void - - - -This function show the tour of chats. - - - - -##### [tourEventTargets](../view_model_main_screen_view_model/MainScreenViewModel/tourEventTargets.md)() void - - - -This function show the tutorial for Events. - - - - -##### [tourHomeTargets](../view_model_main_screen_view_model/MainScreenViewModel/tourHomeTargets.md)() void - - - -this functions starts the tour and info to be displayed is mentioned in this functions. - - - - -##### [tourProfile](../view_model_main_screen_view_model/MainScreenViewModel/tourProfile.md)() void - - - -This function show the tutorial for the profile page. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - -## Static Properties - -##### [keyDrawerCurOrg](../view_model_main_screen_view_model/MainScreenViewModel/keyDrawerCurOrg.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyDrawerJoinOrg](../view_model_main_screen_view_model/MainScreenViewModel/keyDrawerJoinOrg.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyDrawerLeaveCurrentOrg](../view_model_main_screen_view_model/MainScreenViewModel/keyDrawerLeaveCurrentOrg.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [keyDrawerSwitchableOrg](../view_model_main_screen_view_model/MainScreenViewModel/keyDrawerSwitchableOrg.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -static variables. -_final_ - - - -##### [scaffoldKey](../view_model_main_screen_view_model/MainScreenViewModel/scaffoldKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)> - - - -static variables. -_final_ - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/MainScreenViewModel.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/MainScreenViewModel.md deleted file mode 100644 index 0351920dc..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/MainScreenViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# MainScreenViewModel constructor - - - - - - - -MainScreenViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/context.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/context.md deleted file mode 100644 index e4087fcab..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/context.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# context property - - - - - - - -[BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context - -_read / write_ - - - -

context consist of parent info.

- - - -## Implementation - -```dart -late BuildContext context; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/currentPageIndex.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/currentPageIndex.md deleted file mode 100644 index 93f295260..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/currentPageIndex.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# currentPageIndex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) currentPageIndex - -_read / write_ - - - -

var for current page in index.

- - - -## Implementation - -```dart -int currentPageIndex = 0; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/fetchAndAddPlugins.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/fetchAndAddPlugins.md deleted file mode 100644 index 9e2ca0105..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/fetchAndAddPlugins.md +++ /dev/null @@ -1,142 +0,0 @@ - - - -# fetchAndAddPlugins method - - - - - - - - -void fetchAndAddPlugins -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

Dynamically adds BottomNavigationBarItems in BottomNavigationBar.

-

by mapping over the data received from the server.

-

params:

-
    -
  • context: its the same context you use everywhere in the flutter framework refer flutter docs for more info.
  • -
-

returns: - None

- - - -## Implementation - -```dart -void fetchAndAddPlugins( - BuildContext context, -) { - navBarItems = [ - BottomNavigationBarItem( - icon: Icon( - Icons.home, - key: keyBNHome, - ), - label: AppLocalizations.of(context)!.strictTranslate('Home'), - ), - BottomNavigationBarItem( - icon: Icon( - Icons.event_note, - key: keyBNEvents, - ), - label: AppLocalizations.of(context)!.strictTranslate('Events'), - ), - BottomNavigationBarItem( - icon: Icon( - Icons.add_box, - key: keyBNPost, - ), - label: AppLocalizations.of(context)!.strictTranslate('Add'), - ), - BottomNavigationBarItem( - icon: Icon( - Icons.chat_outlined, - key: keyBNChat, - ), - label: AppLocalizations.of(context)!.strictTranslate('Chat'), - ), - BottomNavigationBarItem( - icon: Icon( - Icons.account_circle, - key: keyBNProfile, - ), - label: AppLocalizations.of(context)!.strictTranslate('Profile'), - ) - ]; - - pages = [ - OrganizationFeed( - key: const Key("HomeView"), - homeModel: this, - ), - ExploreEvents( - key: const Key('ExploreEvents'), - homeModel: this, - ), - AddPost( - key: const Key('AddPost'), - drawerKey: MainScreenViewModel.scaffoldKey, - ), - const ChatPage( - key: Key('Chats'), - ), - ProfilePage( - key: keySPEditProfile, - homeModel: this, - ), - ]; - - pluginList = (Hive.box('pluginBox').get('plugins') ?? []) as List; - - pluginList.forEach((plugin) { - if (pluginPrototypeData.containsKey( - (plugin as Map)["pluginName"] as String, - ) && - plugin["pluginInstallStatus"] as bool) { - navBarItems.add( - BottomNavigationBarItem( - icon: Icon( - (pluginPrototypeData[plugin["pluginName"]] - as Map)["icon"] as IconData, - ), - label: AppLocalizations.of(context)!.strictTranslate( - plugin["pluginName"] as String, - ), - ), - ); - pages.add( - (pluginPrototypeData[plugin["pluginName"]] - as Map)["class"] as StatelessWidget, - ); - } - }); - - /// Causes the app check the plugins updates in every 300 sec - /// - /// updated and re-render the navbar - Timer.periodic(const Duration(seconds: 300), (timer) { - FetchPluginList(); - final newPluginList = - (Hive.box('pluginBox').get('plugins') ?? []) as List; - - if (listEquals(pluginList, newPluginList)) { - notifyListeners(); - } - }); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/focusTarget.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/focusTarget.md deleted file mode 100644 index 0e1e09f12..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/focusTarget.md +++ /dev/null @@ -1,124 +0,0 @@ - - - -# focusTarget method - - - - - - - - -[TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html) focusTarget -([GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> key, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) keyName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) description, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isCircle = false, [ContentAlign](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/ContentAlign.html) align = ContentAlign.bottom, [CrossAxisAlignment](https://api.flutter.dev/flutter/rendering/CrossAxisAlignment.html) crossAlign = CrossAxisAlignment.start, [Alignment](https://api.flutter.dev/flutter/painting/Alignment-class.html) skipAlignment = Alignment.topRight, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? next, [CrossAxisAlignment](https://api.flutter.dev/flutter/rendering/CrossAxisAlignment.html) nextCrossAlign = CrossAxisAlignment.end, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isEnd = false}) - - - - - -

This returns a widget for a step in a tutorial.

-

params:

-
    -
  • key: key of type GlobalKey.
  • -
  • keyName: key where the widget shows.
  • -
  • description: description of the step.
  • -
  • isCircle: bool to specify if circle
  • -
  • align: align of type ContentAlign to align button.
  • -
  • crossAlign: Cross align axes
  • -
  • skipAlignment: to give alignment of skip option
  • -
  • next: Functiontype, this show the next step orkey` to show the tour of.
  • -
  • nextCrossAlign: nextCrossAlign to give alignment of next option
  • -
  • isEnd: true if last step of the tour.
  • -
-

returns:

-
    -
  • TargetFocus: This return widget foa a step in a tut
  • -
- - - -## Implementation - -```dart -TargetFocus focusTarget( - GlobalKey key, - String keyName, - String description, { - bool isCircle = false, - ContentAlign align = ContentAlign.bottom, - CrossAxisAlignment crossAlign = CrossAxisAlignment.start, - Alignment skipAlignment = Alignment.topRight, - Function? next, - CrossAxisAlignment nextCrossAlign = CrossAxisAlignment.end, - bool isEnd = false, -}) { - return TargetFocus( - enableOverlayTab: true, - color: Colors.transparent, - identify: keyName, - keyTarget: key, - alignSkip: skipAlignment, - shape: isCircle ? ShapeLightFocus.Circle : ShapeLightFocus.RRect, - contents: [ - TargetContent( - align: align, - builder: (context, controller) { - return Container( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: crossAlign, - children: [ - Text( - description, - style: TextStyle( - color: Theme.of(context).colorScheme.background, - fontSize: 20, - ), - ), - ], - ), - ); - }, - ), - TargetContent( - align: ContentAlign.custom, - customPosition: CustomTargetContentPosition( - bottom: SizeConfig.screenHeight! * 0.025, - ), - builder: (context, controller) { - return GestureDetector( - onTap: () { - if (next != null) { - // ignore: avoid_dynamic_calls - next(); - } - tutorialCoachMark.next(); - }, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: nextCrossAlign, - children: [ - Text( - isEnd ? 'COMPLETE' : 'NEXT', - style: TextStyle( - color: Theme.of(context).colorScheme.background, - fontSize: 20, - ), - ), - ], - ), - ); - }, - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/initialise.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/initialise.md deleted file mode 100644 index 6f3695326..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/initialise.md +++ /dev/null @@ -1,85 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) ctx, {required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) fromSignUp, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) mainScreenIndex}) - - - - - -

Initalizing function.

-

params:

-
    -
  • ctx: BuildContext, contain parent info
  • -
  • fromSignUp: Bool to find user entry
  • -
  • mainScreenIndex: Index to find tab on mainScreen
  • -
-

returns: - None

- - - -## Implementation - -```dart -void initialise( - BuildContext ctx, { - required bool fromSignUp, - required int mainScreenIndex, -}) { - currentPageIndex = mainScreenIndex; - showAppTour = fromSignUp; - - pluginPrototypeData = { - "Donation": { - "icon": Icons.attach_money_outlined, - "page": const ChangeThemeTile(), - } - }; - - notifyListeners(); - if (!showAppTour) { - tourComplete = true; - tourSkipped = false; - } else { - Future.delayed( - const Duration(seconds: 1), - () => navigationService.pushDialog( - CustomAlertDialog( - dialogTitle: 'App Tour', - dialogSubTitle: 'Start app tour to know talawa functioning', - successText: 'Start', - secondaryButtonText: 'Skip', - success: () { - context = ctx; - navigationService.pop(); - tourHomeTargets(); - }, - secondaryButtonTap: () { - tourComplete = false; - tourSkipped = true; - notifyListeners(); - }, - ), - ), - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNChat.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNChat.md deleted file mode 100644 index b879914b1..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNChat.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keyBNChat property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyBNChat - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keyBNChat = GlobalKey(debugLabel: "ChatTab"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNEvents.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNEvents.md deleted file mode 100644 index e30a54fde..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNEvents.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keyBNEvents property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyBNEvents - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keyBNEvents = GlobalKey(debugLabel: "EventTab"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNHome.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNHome.md deleted file mode 100644 index 769994405..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNHome.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keyBNHome property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyBNHome - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keyBNHome = GlobalKey(debugLabel: "HomeTab"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNPost.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNPost.md deleted file mode 100644 index fffa66901..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNPost.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keyBNPost property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyBNPost - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keyBNPost = GlobalKey(debugLabel: "PostTab"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNProfile.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNProfile.md deleted file mode 100644 index 911ddc8b6..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyBNProfile.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keyBNProfile property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyBNProfile - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keyBNProfile = GlobalKey(debugLabel: "ProfileTab"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerCurOrg.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerCurOrg.md deleted file mode 100644 index e719516e7..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerCurOrg.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keyDrawerCurOrg property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyDrawerCurOrg - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -static final GlobalKey keyDrawerCurOrg = - GlobalKey(debugLabel: "DrawerCurrentOrg"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerJoinOrg.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerJoinOrg.md deleted file mode 100644 index 384fecced..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerJoinOrg.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keyDrawerJoinOrg property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyDrawerJoinOrg - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -static final GlobalKey keyDrawerJoinOrg = - GlobalKey(debugLabel: "DrawerJoinOrg"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerLeaveCurrentOrg.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerLeaveCurrentOrg.md deleted file mode 100644 index 1c4a7087d..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerLeaveCurrentOrg.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keyDrawerLeaveCurrentOrg property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyDrawerLeaveCurrentOrg - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -static final GlobalKey keyDrawerLeaveCurrentOrg = - GlobalKey(debugLabel: "DrawerLeaveCurrentOr"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerSwitchableOrg.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerSwitchableOrg.md deleted file mode 100644 index decbb6072..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keyDrawerSwitchableOrg.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keyDrawerSwitchableOrg property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keyDrawerSwitchableOrg - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -static final GlobalKey keyDrawerSwitchableOrg = - GlobalKey(debugLabel: "DrawerSwitchableOrg"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEAdd.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEAdd.md deleted file mode 100644 index 0644acd2d..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEAdd.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySEAdd property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySEAdd - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySEAdd = GlobalKey(debugLabel: "EventScreenAdd"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECard.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECard.md deleted file mode 100644 index 52a9e67ab..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECard.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySECard property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySECard - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySECard = GlobalKey(debugLabel: "EventScreenCard"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECategoryMenu.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECategoryMenu.md deleted file mode 100644 index 729b2b95e..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySECategoryMenu.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySECategoryMenu property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySECategoryMenu - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySECategoryMenu = - GlobalKey(debugLabel: "EventScreenCategory"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEDateFilter.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEDateFilter.md deleted file mode 100644 index f2d5f5e1d..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySEDateFilter.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySEDateFilter property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySEDateFilter - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySEDateFilter = - GlobalKey(debugLabel: "EventScreenDateFilter"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHMenuIcon.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHMenuIcon.md deleted file mode 100644 index 89c78447f..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHMenuIcon.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySHMenuIcon property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySHMenuIcon - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySHMenuIcon = GlobalKey(debugLabel: "HomeScreenMenuIcon"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHOrgName.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHOrgName.md deleted file mode 100644 index 2960a23f9..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHOrgName.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySHOrgName property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySHOrgName - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySHOrgName = GlobalKey(debugLabel: "HomeScreenOrgName"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPinnedPost.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPinnedPost.md deleted file mode 100644 index 3afe39943..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPinnedPost.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySHPinnedPost property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySHPinnedPost - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySHPinnedPost = - GlobalKey(debugLabel: "HomeScreenPinnedPost"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPost.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPost.md deleted file mode 100644 index 1dcf20665..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySHPost.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySHPost property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySHPost - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySHPost = GlobalKey(debugLabel: "HomeScreenPost"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPAppSetting.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPAppSetting.md deleted file mode 100644 index fec002077..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPAppSetting.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySPAppSetting property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPAppSetting - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPAppSetting = - GlobalKey(debugLabel: "ProfileScreenAppSetting"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPDonateUs.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPDonateUs.md deleted file mode 100644 index c912d760f..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPDonateUs.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySPDonateUs property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPDonateUs - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPDonateUs = - GlobalKey(debugLabel: "ProfileScreenDonateUs"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPEditProfile.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPEditProfile.md deleted file mode 100644 index 9d406c2f9..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPEditProfile.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySPEditProfile property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPEditProfile - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPEditProfile = GlobalKey(debugLabel: "ProfileScreenEdit"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPHelp.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPHelp.md deleted file mode 100644 index f1e340f21..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPHelp.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySPHelp property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPHelp - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPHelp = GlobalKey(debugLabel: "ProfileScreenHelp"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPInvite.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPInvite.md deleted file mode 100644 index 8bda57f92..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPInvite.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySPInvite property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPInvite - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPInvite = GlobalKey(debugLabel: "ProfileScreenInvite"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPLogout.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPLogout.md deleted file mode 100644 index 418965242..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPLogout.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# keySPLogout property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPLogout - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPLogout = GlobalKey(debugLabel: "ProfileScreenLogout"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPPalisadoes.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPPalisadoes.md deleted file mode 100644 index 71ef98a27..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/keySPPalisadoes.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# keySPPalisadoes property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> keySPPalisadoes - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -final GlobalKey keySPPalisadoes = - GlobalKey(debugLabel: "ProfileScreenPalisadoes"); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/navBarItems.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/navBarItems.md deleted file mode 100644 index 48e1b405b..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/navBarItems.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# navBarItems property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[BottomNavigationBarItem](https://api.flutter.dev/flutter/widgets/BottomNavigationBarItem-class.html)> navBarItems - -_read / write_ - - - -

Actual BottomNavigationBarItems that show up on the screen.

- - - -## Implementation - -```dart -List navBarItems = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/onTabTapped.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/onTabTapped.md deleted file mode 100644 index 7bae5460f..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/onTabTapped.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# onTabTapped method - - - - - - - - -void onTabTapped -([int](https://api.flutter.dev/flutter/dart-core/int-class.html) index) - - - - - -

Handles click on BottomNavigationBarItem.

-

params:

-
    -
  • index: it is track of current page index.
  • -
-

returns: - None

- - - -## Implementation - -```dart -void onTabTapped(int index) { - currentPageIndex = index; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pages.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pages.md deleted file mode 100644 index d4bc8e82f..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pages.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# pages property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html)> pages - -_read / write_ - - - -

Contains the Widgets to be rendered for corresponding navbar items.

-

Features that should be implemented as plugins should be kept here.

- - - -## Implementation - -```dart -List pages = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginList.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginList.md deleted file mode 100644 index 8b7b6fca1..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginList.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# pluginList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html) pluginList - -_read / write_ - - - -

list of all the pluginList.

- - - -## Implementation - -```dart -List pluginList = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginPrototypeData.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginPrototypeData.md deleted file mode 100644 index 3974228ed..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/pluginPrototypeData.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# pluginPrototypeData property - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html) pluginPrototypeData - -_read / write_ - - - -

Maps the feature names with their proper Icon and Page.

-

icon contains the IconData corresponding to plugin's icon. -page contains the corresponding page to be displayed. -Name of the feature provided by the admin must exactly match with the. -name stored here.

- - - -## Implementation - -```dart -Map pluginPrototypeData = {}; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/scaffoldKey.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/scaffoldKey.md deleted file mode 100644 index e72672b7e..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/scaffoldKey.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# scaffoldKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)> scaffoldKey - -_final_ - - - -

static variables.

- - - -## Implementation - -```dart -static final GlobalKey scaffoldKey = - GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showAppTour.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showAppTour.md deleted file mode 100644 index a1d5c5f11..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showAppTour.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# showAppTour property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showAppTour - -_read / write_ - - - -

bool to determine if we wanna show the apptour.

- - - -## Implementation - -```dart -late bool showAppTour; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showHome.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showHome.md deleted file mode 100644 index b91cffd68..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showHome.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# showHome method - - - - - - - - -void showHome -([TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html) clickedTarget) - - - - - -

This function shows the Home screen.

-

params:

-
    -
  • clickedTarget: object to identify clickedTarget.
  • -
-

returns: - None

- - - -## Implementation - -```dart -void showHome(TargetFocus clickedTarget) { - switch (clickedTarget.identify) { - case "keySHMenuIcon": - scaffoldKey.currentState!.openDrawer(); - break; - case "keyDrawerLeaveCurrentOrg": - navigationService.pop(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showTutorial.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showTutorial.md deleted file mode 100644 index 010e415b6..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/showTutorial.md +++ /dev/null @@ -1,69 +0,0 @@ - - - -# showTutorial method - - - - - - - - -void showTutorial -({required dynamic onClickTarget([TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)), required dynamic onFinish()}) - - - - - -

This function show tutorial to user.

-

params:

-
    -
  • onClickTarget: Its a function which is required to run desired tasks on click.
  • -
  • onFinish: Its a function which is required to run desired tasks on finish
  • -
-

returns: - None

- - - -## Implementation - -```dart -void showTutorial({ - required dynamic Function(TargetFocus) onClickTarget, - required dynamic Function() onFinish, -}) { - tutorialCoachMark = TutorialCoachMark( - targets: targets, - colorShadow: Theme.of(context).colorScheme.secondaryContainer, - textSkip: "SKIP", - textStyleSkip: TextStyle( - color: Theme.of(context).colorScheme.background, - fontSize: 20, - ), - paddingFocus: 10, - opacityShadow: 1.0, - onFinish: onFinish, - onClickTarget: onClickTarget, - onSkip: () { - if (scaffoldKey.currentState!.isDrawerOpen) { - navigationService.pop(); - } - tourSkipped = true; - onTabTapped(0); - }, - onClickOverlay: (target) { - onClickTarget(target); - }, - )..show(context: context); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/targets.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/targets.md deleted file mode 100644 index 1a70dc391..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/targets.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# targets property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)> targets - -_final_ - - - -

array of target.

- - - -## Implementation - -```dart -final List targets = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourAddPost.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourAddPost.md deleted file mode 100644 index aff76a556..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourAddPost.md +++ /dev/null @@ -1,59 +0,0 @@ - - - -# tourAddPost method - - - - - - - - -void tourAddPost -() - - - - - -

This function show the tutorial to add Post in the organization.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void tourAddPost() { - targets.clear(); - targets.add( - focusTarget( - keyBNPost, - 'keyBNPost', - 'This is the Create post tab here you can add post to the current selected organization', - isCircle: true, - align: ContentAlign.top, - ), - ); - showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourChat(); - } - }, - onClickTarget: (TargetFocus a) {}, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourChat.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourChat.md deleted file mode 100644 index 9386279f5..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourChat.md +++ /dev/null @@ -1,59 +0,0 @@ - - - -# tourChat method - - - - - - - - -void tourChat -() - - - - - -

This function show the tour of chats.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void tourChat() { - targets.clear(); - targets.add( - focusTarget( - keyBNChat, - 'keyBNChat', - 'This is the Chat tab here you can see all your messages of the current selected organization', - isCircle: true, - align: ContentAlign.top, - ), - ); - showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourProfile(); - } - }, - onClickTarget: (TargetFocus a) {}, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourComplete.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourComplete.md deleted file mode 100644 index f95abfaf6..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourComplete.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# tourComplete property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) tourComplete - -_read / write_ - - - -

bool to determine if apptour is complete.

- - - -## Implementation - -```dart -bool tourComplete = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourEventTargets.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourEventTargets.md deleted file mode 100644 index 35a537747..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourEventTargets.md +++ /dev/null @@ -1,88 +0,0 @@ - - - -# tourEventTargets method - - - - - - - - -void tourEventTargets -() - - - - - -

This function show the tutorial for Events.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void tourEventTargets() { - targets.clear(); - targets.add( - focusTarget( - keyBNEvents, - 'keyBNEvents', - 'This is the Events tab here you can see all event related information of the current selected organization', - isCircle: true, - align: ContentAlign.top, - ), - ); - targets.add( - focusTarget( - keySECategoryMenu, - 'keySECategoryMenu', - 'Filter Events based on categories', - ), - ); - targets.add( - focusTarget( - keySEDateFilter, - 'keySEDateFilter', - 'Filter Events between selected dates', - ), - ); - targets.add( - focusTarget( - keySECard, - 'keySECard', - 'Description of event to see more details click on the card', - ), - ); - targets.add( - focusTarget( - keySEAdd, - 'keySEAdd', - 'You can create a new event from here', - align: ContentAlign.top, - ), - ); - showTutorial( - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourAddPost(); - } - }, - onClickTarget: (TargetFocus a) {}, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourHomeTargets.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourHomeTargets.md deleted file mode 100644 index 8a9dbd83b..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourHomeTargets.md +++ /dev/null @@ -1,122 +0,0 @@ - - - -# tourHomeTargets method - - - - - - - - -void tourHomeTargets -() - - - - - -

this functions starts the tour and info to be displayed is mentioned in this functions.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void tourHomeTargets() { - targets.clear(); - targets.add( - focusTarget( - keySHOrgName, - 'keySHOrgName', - 'Current selected Organization Name', - ), - ); - targets.add( - focusTarget( - keySHMenuIcon, - 'keySHMenuIcon', - 'Click this button to see options related to switching, joining and leaving organization(s)', - isCircle: true, - next: () => scaffoldKey.currentState!.openDrawer(), - ), - ); - targets.add( - focusTarget( - keyDrawerCurOrg, - 'keyDrawerCurOrg', - "Current selected Organization's Name appears here", - ), - ); - targets.add( - focusTarget( - keyDrawerSwitchableOrg, - 'keyDrawerSwitchableOrg', - "All your joined organizations appear over here you can click on them to change the current organization", - ), - ); - targets.add( - focusTarget( - keyDrawerJoinOrg, - 'keyDrawerJoinOrg', - "From this button you can join other listed organizations", - align: ContentAlign.top, - ), - ); - targets.add( - focusTarget( - keyDrawerLeaveCurrentOrg, - 'keyDrawerLeaveCurrentOrg', - "To leave the current organization you can use this option", - align: ContentAlign.top, - next: () => navigationService.pop(), - ), - ); - targets.add( - focusTarget( - keyBNHome, - 'keyBNHome', - "This is the home tab here you can see the latest post from other members of the current organization", - isCircle: true, - align: ContentAlign.top, - ), - ); - targets.add( - focusTarget( - keySHPinnedPost, - 'keySHPinnedPost', - "This section displays all the important post set by the organization admin(s)", - align: ContentAlign.bottom, - ), - ); - targets.add( - focusTarget( - keySHPost, - 'keySHPost', - "This is the post card you can like and comment on the post from the options available", - align: ContentAlign.bottom, - ), - ); - showTutorial( - onClickTarget: showHome, - onFinish: () { - onTabTapped(currentPageIndex + 1); - if (!tourComplete && !tourSkipped) { - tourEventTargets(); - } - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourProfile.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourProfile.md deleted file mode 100644 index 9aae9bc64..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourProfile.md +++ /dev/null @@ -1,96 +0,0 @@ - - - -# tourProfile method - - - - - - - - -void tourProfile -() - - - - - -

This function show the tutorial for the profile page.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void tourProfile() { - targets.clear(); - targets.add( - focusTarget( - keyBNProfile, - 'keyBNProfile', - 'This is the Profile tab here you can see all options related to account, app setting, invitation, help etc', - isCircle: true, - align: ContentAlign.top, - nextCrossAlign: CrossAxisAlignment.start, - ), - ); - targets.add( - focusTarget( - keySPAppSetting, - 'keySPAppSetting', - 'You can edit application settings like language, theme etc from here', - ), - ); - targets.add( - focusTarget( - keySPHelp, - 'keySPHelp', - 'For any help we are always there. You can reach us from here', - ), - ); - targets.add( - focusTarget( - keySPDonateUs, - 'keySPDonateUs', - 'To help your organization grow you can support them financially from here', - ), - ); - targets.add( - focusTarget( - keySPInvite, - 'keySPInvite', - 'Wanna invite colleague, invite them from here', - ), - ); - targets.add( - focusTarget( - keySPPalisadoes, - 'keySPPalisadoes', - 'You are all set to go lets get you in', - isEnd: true, - ), - ); - showTutorial( - onFinish: () { - if (!tourComplete && !tourSkipped) { - tourComplete = true; - onTabTapped(0); - } - }, - onClickTarget: (TargetFocus a) {}, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourSkipped.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourSkipped.md deleted file mode 100644 index 46465249e..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tourSkipped.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# tourSkipped property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) tourSkipped - -_read / write_ - - - -

bool to determine if apptour is skipped.

- - - -## Implementation - -```dart -bool tourSkipped = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tutorialCoachMark.md b/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tutorialCoachMark.md deleted file mode 100644 index e6c7406f7..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/MainScreenViewModel/tutorialCoachMark.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# tutorialCoachMark property - - - - - - - -[TutorialCoachMark](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TutorialCoachMark-class.html) tutorialCoachMark - -_read / write_ - - - -

tutorialCoachMark consist of coach used to give tutorial.

- - - -## Implementation - -```dart -late TutorialCoachMark tutorialCoachMark; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_main_screen_view_model/view_model_main_screen_view_model-library.md b/talawa-mobile-docs/view_model_main_screen_view_model/view_model_main_screen_view_model-library.md deleted file mode 100644 index 5d8d53324..000000000 --- a/talawa-mobile-docs/view_model_main_screen_view_model/view_model_main_screen_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# main_screen_view_model library - - - - - - - - - - - -## Classes - -##### [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md) - - - -MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md deleted file mode 100644 index c2c1a9d09..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md +++ /dev/null @@ -1,275 +0,0 @@ - - - -# LoginViewModel class - - - - - - - - - -

LoginViewModel class helps to interact with model to serve data -and react to user's input in Login View.

-

Methods include:

-
    -
  • login
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- LoginViewModel - - - - - - - - -## Constructors - -[LoginViewModel](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/LoginViewModel.md) () - - - - -## Properties - -##### [email](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/email.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [emailFocus](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/emailFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [formKey](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/formKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> - - - - -_final_ - - - -##### [greeting](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/greeting.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [hidePassword](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/hidePassword.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [password](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/password.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [passwordFocus](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/passwordFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [validate](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/validate.md) ↔ [AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) - - - - -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialize](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/initialize.md)() void - - - - - - - - -##### [login](../view_model_pre_auth_view_models_login_view_model/LoginViewModel/login.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to sign-in the user into application. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/LoginViewModel.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/LoginViewModel.md deleted file mode 100644 index c37c0bbc5..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/LoginViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# LoginViewModel constructor - - - - - - - -LoginViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/email.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/email.md deleted file mode 100644 index 8fc948122..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/email.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# email property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) email - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController email = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/emailFocus.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/emailFocus.md deleted file mode 100644 index ecd01d588..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/emailFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# emailFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) emailFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode emailFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/formKey.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/formKey.md deleted file mode 100644 index d7de0e859..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/formKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# formKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> formKey - -_final_ - - - - - - -## Implementation - -```dart -final formKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/greeting.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/greeting.md deleted file mode 100644 index de486919b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/greeting.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# greeting property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> greeting - -_read / write_ - - - - - - -## Implementation - -```dart -late List> greeting; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/hidePassword.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/hidePassword.md deleted file mode 100644 index bd2ce20b9..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/hidePassword.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# hidePassword property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) hidePassword - -_read / write_ - - - - - - -## Implementation - -```dart -bool hidePassword = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/initialize.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/initialize.md deleted file mode 100644 index 048ef7ef8..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/initialize.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -() - - - - - - - - -## Implementation - -```dart -void initialize() { - // greating message - greeting = [ - { - 'text': "We're ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'Glad ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24) - }, - { - 'text': "you're ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'Back ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24) - }, - ]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/login.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/login.md deleted file mode 100644 index dc101fdbe..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/login.md +++ /dev/null @@ -1,107 +0,0 @@ - - - -# login method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> login -() - - - - - -

This function is used to sign-in the user into application.

- - - -## Implementation - -```dart -Future login() async { - emailFocus.unfocus(); - passwordFocus.unfocus(); - validate = AutovalidateMode.always; - // if the email and password are not empty. - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - navigationService - .pushDialog(const CustomProgressDialog(key: Key('LoginProgress'))); - databaseFunctions.init(); - try { - // run the graph QL query to login the user, passing `email` and `password`. - final result = await databaseFunctions - .gqlNonAuthMutation(queries.loginUser(email.text, password.text)); - navigationService.pop(); - // if user found. - if (result != null) { - final User loggedInUser = - User.fromJson(result.data!['login'] as Map); - userConfig.updateUser(loggedInUser); - // if user has not already joined any organization. - if (userConfig.currentUser.joinedOrganizations!.isEmpty) { - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } else { - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: MainScreenArgs(mainScreenIndex: 0, fromSignUp: false), - ); - } - final loginResult = result.data['login'] as Map; - androidFirebaseOptions = - loginResult['androidFirebaseOptions'] as Map; - iosFirebaseOptions = - loginResult['iosFirebaseOptions'] as Map; - if (androidFirebaseOptions['apiKey'] != null || - iosFirebaseOptions['apiKey'] != null) { - await setUpFirebase(); - - final token = await FirebaseMessaging.instance.getToken(); - await databaseFunctions.gqlAuthMutation( - queries.saveFcmToken(token), - ); - - await setUpFirebaseMessaging(); - - final androidFirebaseOptionsBox = - await Hive.openBox('androidFirebaseOptions'); - androidFirebaseOptionsBox.put( - 'androidFirebaseOptions', - androidFirebaseOptions, - ); - - final iosFirebaseOptionsBox = - await Hive.openBox('iosFirebaseOptions'); - iosFirebaseOptionsBox.put( - 'iosFirebaseOptions', - iosFirebaseOptions, - ); - } - } - } on Exception catch (e) { - print('here'); - print(e); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/password.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/password.md deleted file mode 100644 index b344a9fed..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/password.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# password property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) password - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController password = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/passwordFocus.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/passwordFocus.md deleted file mode 100644 index 2b7716a5d..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/passwordFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# passwordFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) passwordFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode passwordFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/validate.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/validate.md deleted file mode 100644 index 7dd63a4d4..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/LoginViewModel/validate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# validate property - - - - - - - -[AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) validate - -_read / write_ - - - - - - -## Implementation - -```dart -AutovalidateMode validate = AutovalidateMode.disabled; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md b/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md deleted file mode 100644 index b183f6c11..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_login_view_model/view_model_pre_auth_view_models_login_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# login_view_model library - - - - - - - - - - - -## Classes - -##### [LoginViewModel](../view_model_pre_auth_view_models_login_view_model/LoginViewModel-class.md) - - - -LoginViewModel class helps to interact with model to serve data -and react to user's input in Login View. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md deleted file mode 100644 index f7fa3a76d..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md +++ /dev/null @@ -1,340 +0,0 @@ - - - -# SelectOrganizationViewModel class - - - - - - - - - -

SelectOrganizationViewModel class helps to interact with model to serve data -and react to user's input in Select Organization View.

-

Methods include:

-
    -
  • selectOrg
  • -
  • onTapJoin
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- SelectOrganizationViewModel - - - - - - - - -## Constructors - -[SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/SelectOrganizationViewModel.md) () - - - - -## Properties - -##### [allOrgController](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/allOrgController.md) → [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) - - - - -_final_ - - - -##### [controller](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/controller.md) → [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [organizations](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/organizations.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read / write_ - - - -##### [orgId](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/orgId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read / write_ - - - -##### [qrKey](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/qrKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - - -_final_ - - - -##### [result](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/result.md) ↔ [Barcode](https://pub.dev/documentation/qr_code_scanner/1.0.1/qr_code_scanner/Barcode-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [searchController](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchController.md) → [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_final_ - - - -##### [searchFocus](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchFocus.md) → [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_final_ - - - -##### [searching](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searching.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [selectedOrganization](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectedOrganization.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_read / write_ - - - -##### [showSearchOrgList](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/showSearchOrgList.md) ↔ [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - - -_read / write_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [fetchMoreHelper](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/fetchMoreHelper.md)([FetchMore](https://pub.dev/documentation/graphql_flutter/5.2.0-beta.5/graphql_flutter/FetchMore.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?> fetchMore, [List](https://api.flutter.dev/flutter/dart-core/List-class.html) organizations) void - - - -This function fetch more option. - - - - -##### [initialise](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/initialise.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) initialData) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [onTapContinue](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapContinue.md)() void - - - - - - - - -##### [onTapJoin](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapJoin.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function make user to join the selected organization. -The function uses joinOrgById graph QL query. - - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [searchActive](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchActive.md)() void - - - - - - - - -##### [selectOrg](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectOrg.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) item) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function select the organization. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/SelectOrganizationViewModel.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/SelectOrganizationViewModel.md deleted file mode 100644 index a03045c93..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/SelectOrganizationViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# SelectOrganizationViewModel constructor - - - - - - - -SelectOrganizationViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/allOrgController.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/allOrgController.md deleted file mode 100644 index 0e3bcabd3..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/allOrgController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# allOrgController property - - - - - - - -[ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) allOrgController - -_final_ - - - - - - -## Implementation - -```dart -final ScrollController allOrgController = ScrollController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/controller.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/controller.md deleted file mode 100644 index 00b8f4d3b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/controller.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# controller property - - - - - - - -[ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) controller - -_final_ - - - - - - -## Implementation - -```dart -final ScrollController controller = ScrollController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/fetchMoreHelper.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/fetchMoreHelper.md deleted file mode 100644 index e7c1a5972..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/fetchMoreHelper.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# fetchMoreHelper method - - - - - - - - -void fetchMoreHelper -([FetchMore](https://pub.dev/documentation/graphql_flutter/5.2.0-beta.5/graphql_flutter/FetchMore.html)<[Object](https://api.flutter.dev/flutter/dart-core/Object-class.html)?> fetchMore, [List](https://api.flutter.dev/flutter/dart-core/List-class.html) organizations) - - - - - -

This function fetch more option.

- - - -## Implementation - -```dart -void fetchMoreHelper(FetchMore fetchMore, List organizations) { - fetchMore( - FetchMoreOptions( - variables: { - "first": organizations.length + 15, - "skip": organizations.length, - }, - updateQuery: (existingOrganizations, newOrganizations) { - return { - 'organizationsConnection': [ - ...existingOrganizations!["organizationsConnection"], - ...newOrganizations!['organizationsConnection'], - ], - }; - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/initialise.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/initialise.md deleted file mode 100644 index a13f60bf1..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/initialise.md +++ /dev/null @@ -1,52 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialise -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) initialData) - - - - - - - - -## Implementation - -```dart -Future initialise(String initialData) async { - searchFocus.addListener(searchActive); - if (!initialData.contains('-1')) { - databaseFunctions.init(); - final fetch = await databaseFunctions.fetchOrgById(initialData); - if (fetch.runtimeType == OrgInfo) { - selectedOrganization = fetch as OrgInfo; - if (userConfig.currentUser.refreshToken?.isEmpty ?? true) { - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } else { - selectOrg(selectedOrganization); - } - setState(ViewState.idle); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapContinue.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapContinue.md deleted file mode 100644 index 916f8b18a..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapContinue.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# onTapContinue method - - - - - - - - -void onTapContinue -() - - - - - - - - -## Implementation - -```dart -void onTapContinue() { - // if user selected any organization. - if (selectedOrganization.id != '-1') { - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } else { - navigationService.showTalawaErrorSnackBar( - 'Select one organization to continue', - MessageType.warning, - duration: const Duration(milliseconds: 750), - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapJoin.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapJoin.md deleted file mode 100644 index c13233237..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/onTapJoin.md +++ /dev/null @@ -1,88 +0,0 @@ - - - -# onTapJoin method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> onTapJoin -() - - - - - -

This function make user to join the selected organization. -The function uses joinOrgById graph QL query.

- - - -## Implementation - -```dart -Future onTapJoin() async { - // if `selectedOrganization` is public. - if (selectedOrganization.isPublic == true) { - try { - // run the graph QL mutation - final QueryResult result = await databaseFunctions.gqlAuthMutation( - queries.joinOrgById(selectedOrganization.id!), - ) as QueryResult; - - final List? joinedOrg = - ((result.data!['joinPublicOrganization'] - as Map)['joinedOrganizations'] - as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList(); - userConfig.updateUserJoinedOrg(joinedOrg!); - // if user joined organization length is 1 - if (userConfig.currentUser.joinedOrganizations!.length == 1) { - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: MainScreenArgs(mainScreenIndex: 0), - ); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - 'Joined ${selectedOrganization.name} successfully', - MessageType.info, - ); - } - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'SomeThing went wrong', - MessageType.error, - ); - } - } - // else { - // try { - // // navigationService.pushScreen(Routes.requestAccess); - // } on Exception catch (e) { - // print(e); - // navigationService.showTalawaErrorSnackBar( - // 'SomeThing went wrong', - // MessageType.error, - // ); - // } - // } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/orgId.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/orgId.md deleted file mode 100644 index 8401c3532..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/orgId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId - -_read / write_ - - - - - - -## Implementation - -```dart -late String orgId; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/organizations.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/organizations.md deleted file mode 100644 index d267d675b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/organizations.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# organizations property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> organizations - -_read / write_ - - - - - - -## Implementation - -```dart -late List organizations = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/qrKey.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/qrKey.md deleted file mode 100644 index 1106a10ec..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/qrKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# qrKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> qrKey - -_final_ - - - - - - -## Implementation - -```dart -final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/result.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/result.md deleted file mode 100644 index 9e5c1d6a2..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/result.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# result property - - - - - - - -[Barcode](https://pub.dev/documentation/qr_code_scanner/1.0.1/qr_code_scanner/Barcode-class.html) result - -_read / write_ - - - - - - -## Implementation - -```dart -late Barcode result; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchActive.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchActive.md deleted file mode 100644 index da4b165c2..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchActive.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# searchActive method - - - - - - - - -void searchActive -() - - - - - - - - -## Implementation - -```dart -void searchActive() { - if (searchFocus.hasFocus) { - organizations = []; - searching = true; - setState(ViewState.idle); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchController.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchController.md deleted file mode 100644 index 5f278031a..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchController.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# searchController property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) searchController - -_final_ - - - - - - -## Implementation - -```dart -final TextEditingController searchController = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchFocus.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchFocus.md deleted file mode 100644 index a2cadd525..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searchFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# searchFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) searchFocus - -_final_ - - - - - - -## Implementation - -```dart -final FocusNode searchFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searching.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searching.md deleted file mode 100644 index 427df2c30..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/searching.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# searching property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) searching - -_read / write_ - - - - - - -## Implementation - -```dart -bool searching = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectOrg.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectOrg.md deleted file mode 100644 index 6a6ccd37b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectOrg.md +++ /dev/null @@ -1,91 +0,0 @@ - - - -# selectOrg method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> selectOrg -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) item) - - - - - -

This function select the organization.

-

params:

-
    -
  • item : Selected organization data.
  • -
- - - -## Implementation - -```dart -Future selectOrg(OrgInfo item) async { - print(item.id); - bool orgAlreadyJoined = false; - bool orgRequestAlreadyPresent = false; - final bool userLoggedIn = await userConfig.userLoggedIn(); - // if user session not expirec - if (userLoggedIn) { - // check if user has already joined the selected organization. - userConfig.currentUser.joinedOrganizations!.forEach((element) { - if (element.id! == item.id) { - orgAlreadyJoined = true; - } - }); - // check if user has already send the membership request to the selected organization. - userConfig.currentUser.membershipRequests!.forEach((element) { - if (element.id! == item.id) { - orgRequestAlreadyPresent = true; - } - }); - // if not already joined and not memebrship request. - if (!orgAlreadyJoined && !orgRequestAlreadyPresent) { - selectedOrganization = item; - notifyListeners(); - onTapJoin(); - // print(selectedOrganization.isPublic); - - if (!selectedOrganization.isPublic!) { - navigationService.pushScreen( - Routes.requestAccess, - arguments: selectedOrganization, - ); - } - } else if (orgAlreadyJoined) { - selectedOrganization = OrgInfo(id: '-1'); - navigationService.showTalawaErrorSnackBar( - 'Organisation already joined', - MessageType.warning, - ); - } else { - navigationService.showTalawaErrorSnackBar( - 'Membership request already sent', - MessageType.warning, - ); - } - } else { - selectedOrganization = item; - notifyListeners(); - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: selectedOrganization, - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectedOrganization.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectedOrganization.md deleted file mode 100644 index 1c7a65ca8..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/selectedOrganization.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# selectedOrganization property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) selectedOrganization - -_read / write_ - - - - - - -## Implementation - -```dart -late OrgInfo selectedOrganization = OrgInfo(id: '-1'); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/showSearchOrgList.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/showSearchOrgList.md deleted file mode 100644 index c8c83bdd4..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel/showSearchOrgList.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# showSearchOrgList property - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) showSearchOrgList - -_read / write_ - - - - - - -## Implementation - -```dart -late Widget showSearchOrgList = Container(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md b/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md deleted file mode 100644 index 074705cdc..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_select_organization_view_model/view_model_pre_auth_view_models_select_organization_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# select_organization_view_model library - - - - - - - - - - - -## Classes - -##### [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) - - - -SelectOrganizationViewModel class helps to interact with model to serve data -and react to user's input in Select Organization View. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md deleted file mode 100644 index eea1cc27f..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md +++ /dev/null @@ -1,319 +0,0 @@ - - - -# SetUrlViewModel class - - - - - - - - - -

SetUrlViewModel class helps to interact with model to serve data.

-

and react to user's input for Set Url Section. -Methods include:

-
    -
  • checkURLandNavigate
  • -
  • scanQR
  • -
  • initialise
  • -
  • checkURLandNavigate
  • -
  • checkURLandShowPopUp
  • -
  • scanQR
  • -
  • _onQRViewCreated
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- SetUrlViewModel - - - - - - - - -## Constructors - -[SetUrlViewModel](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/SetUrlViewModel.md) () - - - - -## Properties - -##### [formKey](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/formKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> - - - -formKey. -_final_ - - - -##### [greeting](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/greeting.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> - - - -qrController. -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [orgId](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/orgId.md) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -organizationID. -_read / write_ - - - -##### [qrKey](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/qrKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> - - - -qrKey. -_final_ - - - -##### [result](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/result.md) ↔ [Barcode](https://pub.dev/documentation/qr_code_scanner/1.0.1/qr_code_scanner/Barcode-class.html) - - - -qrText. -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [url](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/url.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - -url. -_read / write_ - - - -##### [urlFocus](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - -urlFocus. -_read / write_ - - - -##### [validate](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/validate.md) ↔ [AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) - - - -qrValidator. -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [checkURLandNavigate](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandNavigate.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) navigateTo, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) argument) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function check the URL and navigate to the respective URL. - - - - -##### [checkURLandShowPopUp](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandShowPopUp.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) argument) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function check the URL and navigate to the respective URL. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialise](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/initialise.md)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) inviteUrl = ''}) void - - - -This function initialises the variables. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [scanQR](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/scanQR.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - -This function create a widget which is used to scan the QR-code. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - -## Constants - -##### [imageUrlKey](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/imageUrlKey-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -imageUrlKey. - - - - -##### [urlKey](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlKey-constant.md) const [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -urlKey. - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/SetUrlViewModel.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/SetUrlViewModel.md deleted file mode 100644 index e77e026ae..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/SetUrlViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# SetUrlViewModel constructor - - - - - - - -SetUrlViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandNavigate.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandNavigate.md deleted file mode 100644 index 3d400b257..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandNavigate.md +++ /dev/null @@ -1,72 +0,0 @@ - - - -# checkURLandNavigate method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> checkURLandNavigate -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) navigateTo, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) argument) - - - - - -

This function check the URL and navigate to the respective URL.

-

params:

-
    -
  • navigateTo: url
  • -
  • argument: message
  • -
-

returns:

-
    -
  • Future<void>: void
  • -
- - - -## Implementation - -```dart -Future checkURLandNavigate(String navigateTo, String argument) async { - urlFocus.unfocus(); - validate = AutovalidateMode.always; - - /// if the url is valid. - if (formKey.currentState!.validate()) { - navigationService - .pushDialog(const CustomProgressDialog(key: Key('UrlCheckProgress'))); - validate = AutovalidateMode.disabled; - final String uri = url.text.trim(); - final bool? urlPresent = - await locator().validateUrlExistence(uri); - if (urlPresent! == true) { - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - - navigationService.pop(); - graphqlConfig.getOrgUrl(); - navigationService.pushScreen(navigateTo, arguments: argument); - } else { - navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - "URL doesn't exist/no connection please check", - MessageType.error, - ); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandShowPopUp.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandShowPopUp.md deleted file mode 100644 index bdfe2ca46..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/checkURLandShowPopUp.md +++ /dev/null @@ -1,73 +0,0 @@ - - - -# checkURLandShowPopUp method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> checkURLandShowPopUp -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) argument) - - - - - -

This function check the URL and navigate to the respective URL.

-

params:

-
    -
  • argument: message
  • -
-

returns:

-
    -
  • Future<void>: sdf
  • -
- - - -## Implementation - -```dart -Future checkURLandShowPopUp(String argument) async { - urlFocus.unfocus(); - validate = AutovalidateMode.always; - - // if the url is valid. - if (formKey.currentState!.validate()) { - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('UrlCheckProgress'), - ), - ); - validate = AutovalidateMode.disabled; - final String uri = url.text.trim(); - final bool? urlPresent = - await locator().validateUrlExistence(uri); - if (urlPresent! == true) { - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - navigationService.pop(); - graphqlConfig.getOrgUrl(); - navigationService.showSnackBar("Url is valid"); - } else { - navigationService.pop(); - navigationService.showTalawaErrorDialog( - "URL doesn't exist/no connection please check", - MessageType.info, - ); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/formKey.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/formKey.md deleted file mode 100644 index dc694cea6..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/formKey.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# formKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> formKey - -_final_ - - - -

formKey.

- - - -## Implementation - -```dart -final formKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/greeting.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/greeting.md deleted file mode 100644 index 3c142332f..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/greeting.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# greeting property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> greeting - -_read / write_ - - - -

qrController.

- - - -## Implementation - -```dart -late List> greeting; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/imageUrlKey-constant.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/imageUrlKey-constant.md deleted file mode 100644 index 6c8a4090a..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/imageUrlKey-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# imageUrlKey constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const imageUrlKey - - - - - -

imageUrlKey.

- - - -## Implementation - -```dart -static const imageUrlKey = "imageUrl"; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/initialise.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/initialise.md deleted file mode 100644 index 828addb8f..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/initialise.md +++ /dev/null @@ -1,89 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) inviteUrl = ''}) - - - - - -

This function initialises the variables.

-

params:

-
    -
  • inviteUrl: url
  • -
-

returns: - None

- - - -## Implementation - -```dart -void initialise({String inviteUrl = ''}) { - final uri = inviteUrl; - if (uri.isNotEmpty) { - /// assigning the invite server url to the url text controller. - url.text = uri; - final box = Hive.box('url'); - box.put(urlKey, uri); - box.put(imageUrlKey, "$uri/talawa/"); - graphqlConfig.getOrgUrl(); - } - - /// greeting message. - greeting = [ - { - 'text': 'Join ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700) - }, - { - 'text': 'and ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'Collaborate ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700) - }, - { - 'text': 'with your ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'Organizations', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall! - .copyWith(fontSize: 24, color: const Color(0xFF4285F4)) - }, - ]; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/orgId.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/orgId.md deleted file mode 100644 index 0dd4df433..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/orgId.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# orgId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId - -_read / write_ - - - -

organizationID.

- - - -## Implementation - -```dart -String orgId = '-1'; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/qrKey.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/qrKey.md deleted file mode 100644 index 911a3ddbb..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/qrKey.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# qrKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html)>> qrKey - -_final_ - - - -

qrKey.

- - - -## Implementation - -```dart -final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/result.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/result.md deleted file mode 100644 index e23ab6061..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/result.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# result property - - - - - - - -[Barcode](https://pub.dev/documentation/qr_code_scanner/1.0.1/qr_code_scanner/Barcode-class.html) result - -_read / write_ - - - -

qrText.

- - - -## Implementation - -```dart -late Barcode result; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/scanQR.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/scanQR.md deleted file mode 100644 index ead578be1..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/scanQR.md +++ /dev/null @@ -1,93 +0,0 @@ - - - -# scanQR method - - - - - - - - -void scanQR -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

This function create a widget which is used to scan the QR-code.

-

params:

-
    -
  • context: BuildContext
  • -
-

returns: - None

- - - -## Implementation - -```dart -void scanQR(BuildContext context) { - showModalBottomSheet( - context: context, - barrierColor: Colors.transparent, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.width, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 250, - width: 250, - child: QRView( - key: qrKey, - onQRViewCreated: _onQRViewCreated, - overlay: QrScannerOverlayShape( - borderRadius: 10, - borderLength: 20, - borderWidth: 10, - cutOutSize: 250, - ), - /*overlayMargin: EdgeInsets.all(50)*/ - ), - ), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - const Text('Scan QR'), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ) - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/url.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/url.md deleted file mode 100644 index 2f3e57fc8..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/url.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# url property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) url - -_read / write_ - - - -

url.

- - - -## Implementation - -```dart -TextEditingController url = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlFocus.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlFocus.md deleted file mode 100644 index bc8e159cf..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlFocus.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# urlFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) urlFocus - -_read / write_ - - - -

urlFocus.

- - - -## Implementation - -```dart -FocusNode urlFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlKey-constant.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlKey-constant.md deleted file mode 100644 index 3e462eee9..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/urlKey-constant.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# urlKey constant - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) const urlKey - - - - - -

urlKey.

- - - -## Implementation - -```dart -static const urlKey = "url"; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/validate.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/validate.md deleted file mode 100644 index 4c7538890..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel/validate.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# validate property - - - - - - - -[AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) validate - -_read / write_ - - - -

qrValidator.

- - - -## Implementation - -```dart -AutovalidateMode validate = AutovalidateMode.disabled; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md b/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md deleted file mode 100644 index 040465868..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_set_url_view_model/view_model_pre_auth_view_models_set_url_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# set_url_view_model library - - - - - - - - - - - -## Classes - -##### [SetUrlViewModel](../view_model_pre_auth_view_models_set_url_view_model/SetUrlViewModel-class.md) - - - -SetUrlViewModel class helps to interact with model to serve data. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md deleted file mode 100644 index 68a80ada5..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md +++ /dev/null @@ -1,303 +0,0 @@ - - - -# SignupDetailsViewModel class - - - - - - - - - -

SignupDetailsViewModel class helps to interact with model to serve data -and react to user's input for Sign Up Details section.

-

Methods include:

-
    -
  • signUp
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- SignupDetailsViewModel - - - - - - - - -## Constructors - -[SignupDetailsViewModel](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/SignupDetailsViewModel.md) () - - - - -## Properties - -##### [confirmFocus](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmFocus.md) ↔ [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) - - - - -_read / write_ - - - -##### [confirmPassword](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmPassword.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [email](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/email.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [firstName](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/firstName.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [formKey](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/formKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> - - - - -_final_ - - - -##### [greeting](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/greeting.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [hidePassword](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/hidePassword.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [lastName](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/lastName.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [password](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/password.md) ↔ [TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedOrganization](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/selectedOrganization.md) ↔ [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_read / write_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [validate](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/validate.md) ↔ [AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) - - - - -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialise](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/initialise.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) org) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [signUp](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/signUp.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - -This function is used to sign up the user into the application by passing the data to database query. -The function uses gqlNonAuthMutation method provided by databaseFunctions services. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/SignupDetailsViewModel.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/SignupDetailsViewModel.md deleted file mode 100644 index de1282e24..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/SignupDetailsViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# SignupDetailsViewModel constructor - - - - - - - -SignupDetailsViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmFocus.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmFocus.md deleted file mode 100644 index 66b9c41cb..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmFocus.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# confirmFocus property - - - - - - - -[FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html) confirmFocus - -_read / write_ - - - - - - -## Implementation - -```dart -FocusNode confirmFocus = FocusNode(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmPassword.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmPassword.md deleted file mode 100644 index be24345f1..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/confirmPassword.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# confirmPassword property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) confirmPassword - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController confirmPassword = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/email.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/email.md deleted file mode 100644 index 8fc948122..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/email.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# email property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) email - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController email = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/firstName.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/firstName.md deleted file mode 100644 index 05e3d39ab..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/firstName.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# firstName property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) firstName - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController firstName = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/formKey.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/formKey.md deleted file mode 100644 index d7de0e859..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/formKey.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# formKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[FormState](https://api.flutter.dev/flutter/widgets/FormState-class.html)> formKey - -_final_ - - - - - - -## Implementation - -```dart -final formKey = GlobalKey(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/greeting.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/greeting.md deleted file mode 100644 index de486919b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/greeting.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# greeting property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> greeting - -_read / write_ - - - - - - -## Implementation - -```dart -late List> greeting; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/hidePassword.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/hidePassword.md deleted file mode 100644 index bd2ce20b9..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/hidePassword.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# hidePassword property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) hidePassword - -_read / write_ - - - - - - -## Implementation - -```dart -bool hidePassword = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/initialise.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/initialise.md deleted file mode 100644 index eb0ac9473..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/initialise.md +++ /dev/null @@ -1,64 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) org) - - - - - - - - -## Implementation - -```dart -void initialise(OrgInfo org) { - selectedOrganization = org; - // greeting message - greeting = [ - { - 'text': "Let's ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'get ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': "you ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall - }, - { - 'text': 'SignUp ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24) - }, - ]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/lastName.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/lastName.md deleted file mode 100644 index 7f599f492..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/lastName.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# lastName property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) lastName - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController lastName = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/password.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/password.md deleted file mode 100644 index b344a9fed..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/password.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# password property - - - - - - - -[TextEditingController](https://api.flutter.dev/flutter/widgets/TextEditingController-class.html) password - -_read / write_ - - - - - - -## Implementation - -```dart -TextEditingController password = TextEditingController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/selectedOrganization.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/selectedOrganization.md deleted file mode 100644 index 627e15c4d..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/selectedOrganization.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# selectedOrganization property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) selectedOrganization - -_read / write_ - - - - - - -## Implementation - -```dart -late OrgInfo selectedOrganization; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/signUp.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/signUp.md deleted file mode 100644 index a21b802c3..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/signUp.md +++ /dev/null @@ -1,128 +0,0 @@ - - - -# signUp method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> signUp -() - - - - - -

This function is used to sign up the user into the application by passing the data to database query. -The function uses gqlNonAuthMutation method provided by databaseFunctions services.

- - - -## Implementation - -```dart -Future signUp() async { - FocusScope.of(navigationService.navigatorKey.currentContext!).unfocus(); - setState(ViewState.busy); - validate = AutovalidateMode.always; - setState(ViewState.idle); - if (formKey.currentState!.validate()) { - validate = AutovalidateMode.disabled; - navigationService - .pushDialog(const CustomProgressDialog(key: Key('SignUpProgress'))); - databaseFunctions.init(); - try { - final result = await databaseFunctions.gqlNonAuthMutation( - queries.registerUser( - firstName.text, - lastName.text, - email.text, - password.text, - ), - ); - navigationService.pop(); - if (result != null) { - final User signedInUser = - User.fromJson(result.data!['signUp'] as Map); - final bool userSaved = await userConfig.updateUser(signedInUser); - final bool tokenRefreshed = await graphqlConfig.getToken() as bool; - // if user successfully saved and access token is also generated. - if (userSaved && tokenRefreshed) { - // if the selected organization is public. - if (selectedOrganization.isPublic!) { - try { - final QueryResult result = - await databaseFunctions.gqlAuthMutation( - queries.joinOrgById(selectedOrganization.id!), - ) as QueryResult; - - final List? joinedOrg = (result - .data!['joinPublicOrganization'] - ['joinedOrganizations'] as List?) - ?.map((e) => OrgInfo.fromJson(e as Map)) - .toList(); - userConfig.updateUserJoinedOrg(joinedOrg!); - userConfig.saveCurrentOrgInHive( - userConfig.currentUser.joinedOrganizations![0], - ); - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: - MainScreenArgs(mainScreenIndex: 0, fromSignUp: true), - ); - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'SomeThing went wrong', - MessageType.error, - ); - } - } else { - try { - final QueryResult result = - await databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(selectedOrganization.id!), - ) as QueryResult; - - final OrgInfo membershipRequest = OrgInfo.fromJson( - result.data!['sendMembershipRequest']['organization'] - as Map, - ); - userConfig.updateUserMemberRequestOrg([membershipRequest]); - navigationService.pop(); - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ); - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'SomeThing went wrong', - MessageType.error, - ); - } - } - } - } - } on Exception catch (e) { - print(e); - navigationService.showTalawaErrorSnackBar( - 'SomeThing went wrong', - MessageType.error, - ); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/validate.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/validate.md deleted file mode 100644 index 7dd63a4d4..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel/validate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# validate property - - - - - - - -[AutovalidateMode](https://api.flutter.dev/flutter/widgets/AutovalidateMode.html) validate - -_read / write_ - - - - - - -## Implementation - -```dart -AutovalidateMode validate = AutovalidateMode.disabled; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md b/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md deleted file mode 100644 index 24e8f4fda..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_signup_details_view_model/view_model_pre_auth_view_models_signup_details_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# signup_details_view_model library - - - - - - - - - - - -## Classes - -##### [SignupDetailsViewModel](../view_model_pre_auth_view_models_signup_details_view_model/SignupDetailsViewModel-class.md) - - - -SignupDetailsViewModel class helps to interact with model to serve data -and react to user's input for Sign Up Details section. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md deleted file mode 100644 index 71a25deca..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md +++ /dev/null @@ -1,239 +0,0 @@ - - - -# WaitingViewModel class - - - - - - - - - -

WaitingViewModel class helps to interact with model to serve data -and react to user's input for Waiting section.

-

Methods include:

-
    -
  • logout
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- WaitingViewModel - - - - - - - - -## Constructors - -[WaitingViewModel](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/WaitingViewModel.md) () - - - - -## Properties - -##### [currentUser](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/currentUser.md) ↔ [User](../models_user_user_info/User-class.md) - - - - -_read / write_ - - - -##### [greeting](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/greeting.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [pendingRequestOrg](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/pendingRequestOrg.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialise](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/initialise.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - - - - - - -##### [joinOrg](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/joinOrg.md)() void - - - - - - - - -##### [logout](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/logout.md)() void - - - -This function ends the session for the user or logout the user from the application. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/WaitingViewModel.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/WaitingViewModel.md deleted file mode 100644 index 127dbe8ba..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/WaitingViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# WaitingViewModel constructor - - - - - - - -WaitingViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/currentUser.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/currentUser.md deleted file mode 100644 index e955d4062..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/currentUser.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# currentUser property - - - - - - - -[User](../../models_user_user_info/User-class.md) currentUser - -_read / write_ - - - - - - -## Implementation - -```dart -late User currentUser; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/greeting.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/greeting.md deleted file mode 100644 index de486919b..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/greeting.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# greeting property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> greeting - -_read / write_ - - - - - - -## Implementation - -```dart -late List> greeting; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/initialise.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/initialise.md deleted file mode 100644 index 7dce45b34..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/initialise.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# initialise method - - - - - - - - -void initialise -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - - - - -## Implementation - -```dart -void initialise(BuildContext context) { - currentUser = userConfig.currentUser; - pendingRequestOrg = currentUser.membershipRequests!; - // greetings - greeting = [ - { - 'text': "Please wait", - 'textStyle': Theme.of(context).textTheme.headlineSmall - }, - { - 'text': " ${currentUser.firstName} ", - 'textStyle': - Theme.of(context).textTheme.titleLarge!.copyWith(fontSize: 24) - }, - { - 'text': "for organisation(s) to accept your invitation.", - 'textStyle': Theme.of(context).textTheme.headlineSmall - }, - ]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/joinOrg.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/joinOrg.md deleted file mode 100644 index 428ddfc29..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/joinOrg.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# joinOrg method - - - - - - - - -void joinOrg -() - - - - - - - - -## Implementation - -```dart -void joinOrg() { - navigationService.pushScreen(Routes.joinOrg, arguments: '-1'); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/logout.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/logout.md deleted file mode 100644 index 278a53c3e..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/logout.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# logout method - - - - - - - - -void logout -() - - - - - -

This function ends the session for the user or logout the user from the application.

- - - -## Implementation - -```dart -void logout() { - final user = Hive.box('currentUser'); - final url = Hive.box('url'); - user.clear(); - url.clear(); - navigationService.removeAllAndPush( - Routes.languageSelectionRoute, - Routes.splashScreen, - arguments: '0', - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/pendingRequestOrg.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/pendingRequestOrg.md deleted file mode 100644 index 9ca3922f2..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel/pendingRequestOrg.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pendingRequestOrg property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> pendingRequestOrg - -_read / write_ - - - - - - -## Implementation - -```dart -late List pendingRequestOrg; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md b/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md deleted file mode 100644 index 9a3ae1c44..000000000 --- a/talawa-mobile-docs/view_model_pre_auth_view_models_waiting_view_model/view_model_pre_auth_view_models_waiting_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# waiting_view_model library - - - - - - - - - - - -## Classes - -##### [WaitingViewModel](../view_model_pre_auth_view_models_waiting_view_model/WaitingViewModel-class.md) - - - -WaitingViewModel class helps to interact with model to serve data -and react to user's input for Waiting section. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme-class.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme-class.md deleted file mode 100644 index 237c0f90f..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme-class.md +++ /dev/null @@ -1,220 +0,0 @@ - - - -# AppTheme class - - - - - - - - - -

AppTheme class is a type of View Model to serve data from modal to views in the context of App Themes.

-

Methods include:

-
    -
  • switchTheme
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- AppTheme - - - - - - - - -## Constructors - -[AppTheme](../view_model_theme_view_model/AppTheme/AppTheme.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [isdarkTheme](../view_model_theme_view_model/AppTheme/isdarkTheme.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-only_ - - - -##### [key](../view_model_theme_view_model/AppTheme/key.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialize](../view_model_theme_view_model/AppTheme/initialize.md)() void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [switchTheme](../view_model_theme_view_model/AppTheme/switchTheme.md)({required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isOn}) void - - - -This function switches the app theme. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/AppTheme.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme/AppTheme.md deleted file mode 100644 index 4e8b04727..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/AppTheme.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# AppTheme constructor - - - - - - - -AppTheme() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/initialize.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme/initialize.md deleted file mode 100644 index da8232bbd..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/initialize.md +++ /dev/null @@ -1,37 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -() - - - - - - - - -## Implementation - -```dart -void initialize() { - _isDarkMode = true; - _loadFromPrefs(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/isdarkTheme.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme/isdarkTheme.md deleted file mode 100644 index 4c2bac3ff..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/isdarkTheme.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# isdarkTheme property - - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isdarkTheme - - - - - - - - -## Implementation - -```dart -bool get isdarkTheme => _isDarkMode; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/key.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme/key.md deleted file mode 100644 index ca4316782..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/key.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# key property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) key - -_final_ - - - - - - -## Implementation - -```dart -final String key = "DynamicTheme"; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/switchTheme.md b/talawa-mobile-docs/view_model_theme_view_model/AppTheme/switchTheme.md deleted file mode 100644 index 25663ba89..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/AppTheme/switchTheme.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -# switchTheme method - - - - - - - - -void switchTheme -({required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isOn}) - - - - - -

This function switches the app theme.

-
    -
  • Dart -> Light
  • -
  • Light -> Dark
  • -
- - - -## Implementation - -```dart -void switchTheme({required bool isOn}) { - _isDarkMode = isOn; - _saveToPrefs(); - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_theme_view_model/view_model_theme_view_model-library.md b/talawa-mobile-docs/view_model_theme_view_model/view_model_theme_view_model-library.md deleted file mode 100644 index 46949516e..000000000 --- a/talawa-mobile-docs/view_model_theme_view_model/view_model_theme_view_model-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# theme_view_model library - - - - - - - - - - - -## Classes - -##### [AppTheme](../view_model_theme_view_model/AppTheme-class.md) - - - -AppTheme class is a type of View Model to serve data from modal to views in the context of App Themes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md deleted file mode 100644 index 4e83dc409..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md +++ /dev/null @@ -1,242 +0,0 @@ - - - -# CommentsViewModel class - - - - - - - - - -

CommentsViewModel class helps to serve the data from model -and to react to user's input for Comment Widget.

-

Methods include:

-
    -
  • getComments : to get all comments on the post.
  • -
  • createComment : to add comment on the post.
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- CommentsViewModel - - - - - - - - -## Constructors - -[CommentsViewModel](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/CommentsViewModel.md) () - - - - -## Properties - -##### [commentList](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/commentList.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comment](../models_comment_comment_model/Comment-class.md)> - - - - -_read-only_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [postId](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/postId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addCommentLocally](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/addCommentLocally.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) msg) void - - - - - - - - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [createComment](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/createComment.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) msg) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This function add comment on the post. -The function uses createComments method provided by Comment Service. - - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [getComments](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/getComments.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - -This methods fetch all comments on the post. -The function uses getCommentsForPost method by Comment Service. - - - - -##### [initialise](../view_model_widgets_view_models_comments_view_model/CommentsViewModel/initialise.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/CommentsViewModel.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/CommentsViewModel.md deleted file mode 100644 index 6be109507..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/CommentsViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CommentsViewModel constructor - - - - - - - -CommentsViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/addCommentLocally.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/addCommentLocally.md deleted file mode 100644 index 093423e4e..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/addCommentLocally.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# addCommentLocally method - - - - - - - - -void addCommentLocally -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) msg) - - - - - - - - -## Implementation - -```dart -void addCommentLocally(String msg) { - _postService.addCommentLocally(_postID); - final creator = _userConfig.currentUser; - final Comment localComment = Comment( - text: msg, - createdAt: DateTime.now().toString(), - creator: creator, - ); - _commentlist.insert(0, localComment); - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/commentList.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/commentList.md deleted file mode 100644 index 520c4d731..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/commentList.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# commentList property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comment](../../models_comment_comment_model/Comment-class.md)> commentList - - - - - - - - -## Implementation - -```dart -List get commentList => _commentlist; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/createComment.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/createComment.md deleted file mode 100644 index 28f2ea742..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/createComment.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# createComment method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) createComment -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) msg) - - - - - -

This function add comment on the post. -The function uses createComments method provided by Comment Service.

-

params:

-
    -
  • msg : text of the comment to add.
  • -
- - - -## Implementation - -```dart -Future createComment(String msg) async { - print("comment viewModel called"); - await _commentService.createComments(_postID, msg); - addCommentLocally(msg); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/getComments.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/getComments.md deleted file mode 100644 index 8969fdda4..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/getComments.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# getComments method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) getComments -() - - - - - -

This methods fetch all comments on the post. -The function uses getCommentsForPost method by Comment Service.

- - - -## Implementation - -```dart -Future getComments() async { - setState(ViewState.busy); - final List commentsJSON = - await _commentService.getCommentsForPost(_postID) as List; - print(commentsJSON); - commentsJSON.forEach((commentJson) { - _commentlist.add(Comment.fromJson(commentJson as Map)); - }); - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/initialise.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/initialise.md deleted file mode 100644 index 7515645c5..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/initialise.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html) initialise -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) - - - - - - - - -## Implementation - -```dart -Future initialise(String postID) async { - _commentlist = []; - _postID = postID; - _commentService = locator(); - _userConfig = locator(); - _postService = locator(); - notifyListeners(); - await getComments(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/postId.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/postId.md deleted file mode 100644 index fe08747d2..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/CommentsViewModel/postId.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# postId property - - - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) postId - - - - - - - - -## Implementation - -```dart -String get postId => _postID; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md b/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md deleted file mode 100644 index 05ca1b659..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_comments_view_model/view_model_widgets_view_models_comments_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# comments_view_model library - - - - - - - - - - - -## Classes - -##### [CommentsViewModel](../view_model_widgets_view_models_comments_view_model/CommentsViewModel-class.md) - - - -CommentsViewModel class helps to serve the data from model -and to react to user's input for Comment Widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md deleted file mode 100644 index 5379596e0..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md +++ /dev/null @@ -1,269 +0,0 @@ - - - -# CustomDrawerViewModel class - - - - - - - - - -

CustomDrawerViewModel class helps to serve the data and -to react to user's input for Custom Dialog Widget.

-

Functions include:

-
    -
  • switchOrg
  • -
  • isPresentinSwitchableOrg
  • -
  • setSelectedOrganizationName
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- CustomDrawerViewModel - - - - - - - - -## Constructors - -[CustomDrawerViewModel](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/CustomDrawerViewModel.md) () - - - - -## Properties - -##### [controller](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/controller.md) → [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedOrg](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/selectedOrg.md) → [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? - - - - -_read-only_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - -##### [switchAbleOrg](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchAbleOrg.md) ↔ [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../models_organization_org_info/OrgInfo-class.md)> - - - - -_read / write_ - - - -##### [targets](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/targets.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)> - - - - -_final_ - - - -##### [tutorialCoachMark](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/tutorialCoachMark.md) ↔ [TutorialCoachMark](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TutorialCoachMark-class.html) - - - - -_read / write_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [initialize](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/initialize.md)([MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md) homeModel, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - - - - - - -##### [isPresentinSwitchableOrg](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/isPresentinSwitchableOrg.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) switchToOrg) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -This function checks switchOrg is present in the switchAbleOrg. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/notifyListeners.md)() void - - - -Call all the registered listeners. -_override_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setSelectedOrganizationName](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/setSelectedOrganizationName.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) updatedOrganization) void - - - -This function switches the current organization to new organization. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [switchOrg](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchOrg.md)([OrgInfo](../models_organization_org_info/OrgInfo-class.md) switchToOrg) void - - - -This function switch the current organization to another organization, -if the organization(want switch to) is present. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/CustomDrawerViewModel.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/CustomDrawerViewModel.md deleted file mode 100644 index c3636dcc0..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/CustomDrawerViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CustomDrawerViewModel constructor - - - - - - - -CustomDrawerViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/controller.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/controller.md deleted file mode 100644 index 00b8f4d3b..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/controller.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# controller property - - - - - - - -[ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) controller - -_final_ - - - - - - -## Implementation - -```dart -final ScrollController controller = ScrollController(); -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/dispose.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/dispose.md deleted file mode 100644 index b73e68485..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/dispose.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -void dispose() { - _disposed = true; - _currentOrganizationStreamSubscription?.cancel(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/initialize.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/initialize.md deleted file mode 100644 index 8d3d536fe..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/initialize.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -([MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md) homeModel, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - - - - -## Implementation - -```dart -void initialize(MainScreenViewModel homeModel, BuildContext context) { - _currentOrganizationStreamSubscription = - userConfig.currentOrgInfoStream.listen( - (updatedOrganization) { - setSelectedOrganizationName(updatedOrganization); - }, - ); - _currentUser = userConfig.currentUser; - _selectedOrg = userConfig.currentOrg; - _switchAbleOrg = _currentUser.joinedOrganizations!; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/isPresentinSwitchableOrg.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/isPresentinSwitchableOrg.md deleted file mode 100644 index ccf6f13c7..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/isPresentinSwitchableOrg.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# isPresentinSwitchableOrg method - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isPresentinSwitchableOrg -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) switchToOrg) - - - - - -

This function checks switchOrg is present in the switchAbleOrg.

-

params:

-
    -
  • switchToOrg : OrgInfo type of organization want to switch into.
  • -
- - - -## Implementation - -```dart -bool isPresentinSwitchableOrg(OrgInfo switchToOrg) { - var isPresent = false; - for (final OrgInfo orgs in switchAbleOrg) { - if (orgs.id == switchToOrg.id) { - isPresent = true; - } - } - return isPresent; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/notifyListeners.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/notifyListeners.md deleted file mode 100644 index 1256555b5..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/notifyListeners.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# notifyListeners method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void notifyListeners -() - -_override_ - - - -

Call all the registered listeners.

-

Call this method whenever the object changes, to notify any clients the -object may have changed. Listeners that are added during this iteration -will not be visited. Listeners that are removed during this iteration will -not be visited after they are removed.

-

Exceptions thrown by listeners will be caught and reported using -FlutterError.reportError.

-

This method must not be called after dispose has been called.

-

Surprising behavior can result when reentrantly removing a listener (e.g. -in response to a notification) that has been registered multiple times. -See the discussion at removeListener.

- - - -## Implementation - -```dart -@override -void notifyListeners() { - if (!_disposed) { - super.notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/selectedOrg.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/selectedOrg.md deleted file mode 100644 index 55ad05093..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/selectedOrg.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# selectedOrg property - - - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? selectedOrg - - - - - - - - -## Implementation - -```dart -OrgInfo? get selectedOrg => _selectedOrg; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/setSelectedOrganizationName.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/setSelectedOrganizationName.md deleted file mode 100644 index ebc514a5e..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/setSelectedOrganizationName.md +++ /dev/null @@ -1,47 +0,0 @@ - - - -# setSelectedOrganizationName method - - - - - - - - -void setSelectedOrganizationName -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) updatedOrganization) - - - - - -

This function switches the current organization to new organization.

-

params:

-
    -
  • updatedOrganization : OrgInfo type, new organization.
  • -
- - - -## Implementation - -```dart -void setSelectedOrganizationName(OrgInfo updatedOrganization) { - // if current and updated organization are not same. - if (_selectedOrg != updatedOrganization) { - _selectedOrg = updatedOrganization; - // update in `UserConfig` variable. - userConfig.currentOrgInfoController.add(_selectedOrg!); - notifyListeners(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchAbleOrg.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchAbleOrg.md deleted file mode 100644 index 604cd6181..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchAbleOrg.md +++ /dev/null @@ -1,54 +0,0 @@ - - - -# switchAbleOrg property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> switchAbleOrg - - - - - - - - -## Implementation - -```dart -List get switchAbleOrg => _switchAbleOrg; -``` - - - - - -switchAbleOrg= -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)> switchableOrg) - - - - - - - -## Implementation - -```dart -set switchAbleOrg(List switchableOrg) => - _switchAbleOrg = switchableOrg; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchOrg.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchOrg.md deleted file mode 100644 index 2cccdb4b7..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/switchOrg.md +++ /dev/null @@ -1,53 +0,0 @@ - - - -# switchOrg method - - - - - - - - -void switchOrg -([OrgInfo](../../models_organization_org_info/OrgInfo-class.md) switchToOrg) - - - - - -

This function switch the current organization to another organization, -if the organization(want switch to) is present.

- - - -## Implementation - -```dart -void switchOrg(OrgInfo switchToOrg) { - // if `selectedOrg` is equal to `switchOrg` and `switchToOrg` present or not. - if (selectedOrg == switchToOrg && isPresentinSwitchableOrg(switchToOrg)) { - // _navigationService.pop(); - navigationService.showTalawaErrorSnackBar( - '${switchToOrg.name} already selected', - MessageType.warning, - ); - } else { - userConfig.saveCurrentOrgInHive(switchToOrg); - setSelectedOrganizationName(switchToOrg); - navigationService.showTalawaErrorSnackBar( - 'Switched to ${switchToOrg.name}', - MessageType.info, - ); - } - navigationService.pop(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/targets.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/targets.md deleted file mode 100644 index 730ed6ecb..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/targets.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# targets property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[TargetFocus](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TargetFocus-class.html)> targets - -_final_ - - - - - - -## Implementation - -```dart -final List targets = []; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/tutorialCoachMark.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/tutorialCoachMark.md deleted file mode 100644 index 8267cc6f1..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel/tutorialCoachMark.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# tutorialCoachMark property - - - - - - - -[TutorialCoachMark](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/TutorialCoachMark-class.html) tutorialCoachMark - -_read / write_ - - - - - - -## Implementation - -```dart -late TutorialCoachMark tutorialCoachMark; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md b/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md deleted file mode 100644 index f9c890977..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_custom_drawer_view_model/view_model_widgets_view_models_custom_drawer_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# custom_drawer_view_model library - - - - - - - - - - - -## Classes - -##### [CustomDrawerViewModel](../view_model_widgets_view_models_custom_drawer_view_model/CustomDrawerViewModel-class.md) - - - -CustomDrawerViewModel class helps to serve the data and -to react to user's input for Custom Dialog Widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_event_card_view_model/view_model_widgets_view_models_event_card_view_model-library.md b/talawa-mobile-docs/view_model_widgets_view_models_event_card_view_model/view_model_widgets_view_models_event_card_view_model-library.md deleted file mode 100644 index 40e6bafb6..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_event_card_view_model/view_model_widgets_view_models_event_card_view_model-library.md +++ /dev/null @@ -1,29 +0,0 @@ - - - - -# event_card_view_model library - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md deleted file mode 100644 index f31499362..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md +++ /dev/null @@ -1,260 +0,0 @@ - - - -# LikeButtonViewModel class - - - - - - - - - -

LikeButtonViewModel class helps to serve the data and -to react to user's input for Like Button Widget.

-

Methods include:

-
    -
  • toggleIsLiked
  • -
  • setIsLiked
  • -
  • updatePost
  • -
- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- LikeButtonViewModel - - - - - - - - -## Constructors - -[LikeButtonViewModel](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/LikeButtonViewModel.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [isLiked](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/isLiked.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-only_ - - - -##### [likedBy](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likedBy.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)> - - - - -_read-only_ - - - -##### [likesCount](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likesCount.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_read-only_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [checkAndSetTheIsLiked](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/checkAndSetTheIsLiked.md)() void - - - - - - - - -##### [dispose](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/dispose.md)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_override_ - - - -##### [initialize](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/initialize.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)> likedBy, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setIsLiked](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/setIsLiked.md)({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) val = true}) void - - - -This function set _isLike to true. - - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toggleIsLiked](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/toggleIsLiked.md)() void - - - -This function add like to the post if not liked and -remove the like from the post if liked. - - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [updatePost](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/updatePost.md)([Post](../models_post_post_model/Post-class.md) post) void - - - -This function updates the Post. - - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/LikeButtonViewModel.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/LikeButtonViewModel.md deleted file mode 100644 index c6399f1d3..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/LikeButtonViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# LikeButtonViewModel constructor - - - - - - - -LikeButtonViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/checkAndSetTheIsLiked.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/checkAndSetTheIsLiked.md deleted file mode 100644 index 067e2a13c..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/checkAndSetTheIsLiked.md +++ /dev/null @@ -1,41 +0,0 @@ - - - -# checkAndSetTheIsLiked method - - - - - - - - -void checkAndSetTheIsLiked -() - - - - - - - - -## Implementation - -```dart -void checkAndSetTheIsLiked() { - setIsLiked(val: false); - for (var i = 0; i < _likedBy.length; i++) { - if (_likedBy[i].sId == _user.id) { - setIsLiked(); - } - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/dispose.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/dispose.md deleted file mode 100644 index f93ec9beb..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/dispose.md +++ /dev/null @@ -1,46 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed).

-

This method should only be called by the object's owner.

-

This method does not notify listeners, and clears the listener list once -it is called. Consumers of this class must decide on whether to notify -listeners or not immediately before disposal.

- - - -## Implementation - -```dart -@override -// ignore: must_call_super -void dispose() { - _updatePostSubscription.cancel(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/initialize.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/initialize.md deleted file mode 100644 index 24b3ef3a8..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/initialize.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# initialize method - - - - - - - - -void initialize -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)> likedBy, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID) - - - - - - - - -## Implementation - -```dart -void initialize(List likedBy, String postID) { - _postID = postID; - _user = _userConfig.currentUser; - _likedBy = likedBy; - notifyListeners(); - checkAndSetTheIsLiked(); - _updatePostSubscription = - _postService.updatedPostStream.listen((post) => updatePost(post)); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/isLiked.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/isLiked.md deleted file mode 100644 index e1e07b47d..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/isLiked.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# isLiked property - - - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isLiked - - - - - - - - -## Implementation - -```dart -bool get isLiked => _isLiked; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likedBy.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likedBy.md deleted file mode 100644 index d35d176b5..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likedBy.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# likedBy property - - - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)> likedBy - - - - - - - - -## Implementation - -```dart -List get likedBy => _likedBy; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likesCount.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likesCount.md deleted file mode 100644 index 8766c21d5..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/likesCount.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# likesCount property - - - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) likesCount - - - - - - - - -## Implementation - -```dart -int get likesCount => _likedBy.length; -``` - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/setIsLiked.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/setIsLiked.md deleted file mode 100644 index 0f471fd16..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/setIsLiked.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# setIsLiked method - - - - - - - - -void setIsLiked -({[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) val = true}) - - - - - -

This function set _isLike to true.

- - - -## Implementation - -```dart -void setIsLiked({bool val = true}) { - _isLiked = val; - notifyListeners(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/toggleIsLiked.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/toggleIsLiked.md deleted file mode 100644 index 02c2ab66e..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/toggleIsLiked.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# toggleIsLiked method - - - - - - - - -void toggleIsLiked -() - - - - - -

This function add like to the post if not liked and -remove the like from the post if liked.

- - - -## Implementation - -```dart -void toggleIsLiked() { - if (!_isLiked) { - _postService.addLike(_postID); - } else { - _postService.removeLike(_postID); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/updatePost.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/updatePost.md deleted file mode 100644 index 4076fffea..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel/updatePost.md +++ /dev/null @@ -1,42 +0,0 @@ - - - -# updatePost method - - - - - - - - -void updatePost -([Post](../../models_post_post_model/Post-class.md) post) - - - - - -

This function updates the Post.

-

params: -post : Post type, the post that need to be updated.

- - - -## Implementation - -```dart -void updatePost(Post post) { - if (_postID == post.sId) { - _likedBy = post.likedBy!; - checkAndSetTheIsLiked(); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md b/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md deleted file mode 100644 index d178be920..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_like_button_view_model/view_model_widgets_view_models_like_button_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# like_button_view_model library - - - - - - - - - - - -## Classes - -##### [LikeButtonViewModel](../view_model_widgets_view_models_like_button_view_model/LikeButtonViewModel-class.md) - - - -LikeButtonViewModel class helps to serve the data and -to react to user's input for Like Button Widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md deleted file mode 100644 index 1fb945caa..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md +++ /dev/null @@ -1,208 +0,0 @@ - - - -# ProgressDialogViewModel class - - - - - - - - - -

ProgressDialogViewModel class helps to serve the data and -to react to user's input for Progress Dialog Widget.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html) -- [BaseModel](../view_model_base_view_model/BaseModel-class.md) -- ProgressDialogViewModel - - - - - - - - -## Constructors - -[ProgressDialogViewModel](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/ProgressDialogViewModel.md) () - - - - -## Properties - -##### [connectivityPresent](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityPresent.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [connectivityResult](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityResult.md) ↔ [ConnectivityResult](https://pub.dev/documentation/connectivity_plus_platform_interface/1.2.4/connectivity_plus_platform_interface/ConnectivityResult.html) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [hasListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether any listeners are currently registered. -_read-onlyinherited_ - - - -##### [isBusy](../view_model_base_view_model/BaseModel/isBusy.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [state](../view_model_base_view_model/BaseModel/state.md) → [ViewState](../enums_enums/ViewState.md) - - - - -_read-onlyinherited_ - - - - - -## Methods - -##### [addListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Register a closure to be called when the object changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)() void - - - -Discards any resources used by the object. After this is called, the -object is not in a usable state and should be discarded (calls to -addListener will throw after the object is disposed). -_inherited_ - - - -##### [initialise](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/initialise.md)() [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)() void - - - -Call all the registered listeners. -_inherited_ - - - -##### [removeListener](https://api.flutter.dev/flutter/foundation/ChangeNotifier/removeListener.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) listener) void - - - -Remove a previously registered closure from the list of closures that are -notified when the object changes. -_inherited_ - - - -##### [setState](../view_model_base_view_model/BaseModel/setState.md)([ViewState](../enums_enums/ViewState.md) viewState) void - - - - -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/ProgressDialogViewModel.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/ProgressDialogViewModel.md deleted file mode 100644 index f59d835a4..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/ProgressDialogViewModel.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# ProgressDialogViewModel constructor - - - - - - - -ProgressDialogViewModel() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityPresent.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityPresent.md deleted file mode 100644 index db77d704c..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityPresent.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# connectivityPresent property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) connectivityPresent - -_read / write_ - - - - - - -## Implementation - -```dart -bool connectivityPresent = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityResult.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityResult.md deleted file mode 100644 index f3c500a12..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/connectivityResult.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# connectivityResult property - - - - - - - -[ConnectivityResult](https://pub.dev/documentation/connectivity_plus_platform_interface/1.2.4/connectivity_plus_platform_interface/ConnectivityResult.html) connectivityResult - -_read / write_ - - - - - - -## Implementation - -```dart -late ConnectivityResult connectivityResult; -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/initialise.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/initialise.md deleted file mode 100644 index 7389c3d92..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel/initialise.md +++ /dev/null @@ -1,45 +0,0 @@ - - - -# initialise method - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> initialise -() - - - - - - - - -## Implementation - -```dart -Future initialise() async { - setState(ViewState.busy); - connectivityResult = await connectivity.checkConnectivity(); - if (connectivityResult == ConnectivityResult.none) { - connectivityPresent = false; - Future.delayed(const Duration(seconds: 2)) - .then((value) => navigationService.pop()); - } else { - connectivityPresent = true; - } - setState(ViewState.idle); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md b/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md deleted file mode 100644 index 51f0ddc22..000000000 --- a/talawa-mobile-docs/view_model_widgets_view_models_progress_dialog_view_model/view_model_widgets_view_models_progress_dialog_view_model-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# progress_dialog_view_model library - - - - - - - - - - - -## Classes - -##### [ProgressDialogViewModel](../view_model_widgets_view_models_progress_dialog_view_model/ProgressDialogViewModel-class.md) - - - -ProgressDialogViewModel class helps to serve the data and -to react to user's input for Progress Dialog Widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost-class.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost-class.md deleted file mode 100644 index f61800c2d..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# AddPost class - - - - - - - - - -

AddPost returns a widget to add(upload) the post.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- AddPost - - - - - - - - -## Constructors - -[AddPost](../views_after_auth_screens_add_post_page/AddPost/AddPost.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)>? drawerKey}) - - _const_ - - -## Properties - -##### [drawerKey](../views_after_auth_screens_add_post_page/AddPost/drawerKey.md) → [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)>? - - - -DrawerKey. -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_add_post_page/AddPost/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/AddPost.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/AddPost.md deleted file mode 100644 index a98f0d2a1..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/AddPost.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# AddPost constructor - - - - - - -const -AddPost({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)>? drawerKey}) - - - - - -## Implementation - -```dart -const AddPost({Key? key, this.drawerKey}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/build.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/build.md deleted file mode 100644 index dc744fe0a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/build.md +++ /dev/null @@ -1,229 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Scaffold( - resizeToAvoidBottomInset: false, - // header for the widget - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.9, - centerTitle: true, - // header title - title: Text( - AppLocalizations.of(context)!.strictTranslate('Share News'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - //TODO: showing the null pointer exception - key: const Key('add_post_icon_button1'), - color: Theme.of(context).iconTheme.color, - icon: const Icon(Icons.menu), - onPressed: () => drawerKey!.currentState!.openDrawer(), - ), - // button to upload the post. - actions: [ - TextButton( - key: const Key('add_post_text_btn1'), - onPressed: () => model.uploadPost(), - child: Text( - AppLocalizations.of(context)!.strictTranslate("Post"), - style: Theme.of(context).textTheme.headlineSmall!.copyWith( - fontWeight: FontWeight.w600, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - ], - ), - body: BaseView( - onModelReady: (m) { - m.initialise(); - model = m; - }, - builder: (context, model, child) => SingleChildScrollView( - child: Column( - children: [ - ListTile( - leading: const CircleAvatar(radius: 25), - title: Text(model.userName), - subtitle: Text( - AppLocalizations.of(context)!.strictTranslate(model.orgName), - ), - ), - // renders icon button to upload post files. - Row( - children: [ - // button to select the photo from gallery. - IconButton( - key: const Key('add_post_icon_button2'), - onPressed: () => model.getImageFromGallery(), - icon: const Icon(Icons.photo), - ), - // button to capture the image. - IconButton( - key: const Key('add_post_icon_button3'), - onPressed: () => model.getImageFromGallery(camera: true), - icon: const Icon(Icons.camera_alt), - ), - // button to select file - IconButton( - key: const Key('add_post_icon_button4'), - onPressed: () {}, - icon: const Icon(Icons.file_upload), - ), - // button to add hastags to the post. - TextButton( - key: const Key('add_post_text_btn2'), - onPressed: () {}, - child: Text( - '# ${AppLocalizations.of(context)!.strictTranslate("Add hashtag")}', - style: Theme.of(context).textTheme.titleLarge, - ), - ), - ], - ), - const Divider(), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: TextField( - controller: model.titleController, - // input field to write the description of the post. - decoration: InputDecoration( - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - hintText: AppLocalizations.of(context)!.strictTranslate( - "Enter the title of your post", - ), - label: Text( - AppLocalizations.of(context)!.strictTranslate( - "Title", - ), - ), - ), - ), - ), - const Divider(), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: TextField( - controller: model.controller, - maxLines: null, - // input field to write the description of the post. - decoration: InputDecoration( - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - errorBorder: InputBorder.none, - disabledBorder: InputBorder.none, - hintText: AppLocalizations.of(context)!.strictTranslate( - "Write here what do you want to share", - ), - ), - ), - ), - // if the image for the post is added then render button to remove it. - model.imageFile != null - // ignore: sized_box_for_whitespace - ? Container( - height: 230, - padding: const EdgeInsets.all(8.0), - child: Stack( - children: [ - Image.file( - model.imageFile!, - fit: BoxFit.cover, - width: MediaQuery.of(context).size.width, - ), - Positioned( - right: 5, - top: 5, - child: IconButton( - onPressed: () => model.removeImage(), - icon: const Icon( - Icons.cancel, - color: Colors.black, - ), - ), - ) - ], - ), - ) - : Container(), - ], - ), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/drawerKey.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/drawerKey.md deleted file mode 100644 index e50f7f58b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/AddPost/drawerKey.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# drawerKey property - - - - - - - -[GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html)<[ScaffoldState](https://api.flutter.dev/flutter/material/ScaffoldState-class.html)>? drawerKey - -_final_ - - - -

DrawerKey.

- - - -## Implementation - -```dart -final GlobalKey? drawerKey; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/model.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/model.md deleted file mode 100644 index b885e4796..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/model.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# model top-level property - - - - - - - - - -[AddPostViewModel](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md) model - -_read / write_ - - - -

Add Post View Model.

- - - -## Implementation - -```dart -late AddPostViewModel model; -``` - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md b/talawa-mobile-docs/views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md deleted file mode 100644 index 1283c8ee0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_add_post_page/views_after_auth_screens_add_post_page-library.md +++ /dev/null @@ -1,49 +0,0 @@ - - - - -# add_post_page library - - - - - - - - - - - -## Classes - -##### [AddPost](../views_after_auth_screens_add_post_page/AddPost-class.md) - - - -AddPost returns a widget to add(upload) the post. - - - - - - -## Properties - -##### [model](../views_after_auth_screens_add_post_page/model.md) ↔ [AddPostViewModel](../view_model_after_auth_view_models_add_post_view_models_add_post_view_model/AddPostViewModel-class.md) - - - -Add Post View Model. -_read / write_ - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md b/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md deleted file mode 100644 index b86bb1fbd..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# AppSettingsPage class - - - - - - - - - -

AppSettingsPage is a widget that has mutable state _AppSettingsPageState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- AppSettingsPage - - - - - - - - -## Constructors - -[AppSettingsPage](../views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/AppSettingsPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/createState.md)() _AppSettingsPageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/AppSettingsPage.md b/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/AppSettingsPage.md deleted file mode 100644 index cef89c44b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/AppSettingsPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# AppSettingsPage constructor - - - - - - -const -AppSettingsPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const AppSettingsPage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/createState.md b/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/createState.md deleted file mode 100644 index f6f01c5f1..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_AppSettingsPageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_AppSettingsPageState createState() => _AppSettingsPageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md b/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md deleted file mode 100644 index b5eed9934..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_app_settings_app_settings_page/views_after_auth_screens_app_settings_app_settings_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# app_settings_page library - - - - - - - - - - - -## Classes - -##### [AppSettingsPage](../views_after_auth_screens_app_settings_app_settings_page/AppSettingsPage-class.md) - - - -AppSettingsPage is a widget that has mutable state _AppSettingsPageState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md deleted file mode 100644 index d85f9dd3e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# ChatPage class - - - - - - - - - -

ChatPage returns a stateless widget for current user Chat Page which renders -the list of all the users that the current user has chat with.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ChatPage - - - - - - - - -## Constructors - -[ChatPage](../views_after_auth_screens_chat_chat_list_screen/ChatPage/ChatPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_chat_list_screen/ChatPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/ChatPage.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/ChatPage.md deleted file mode 100644 index c9653c01c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/ChatPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ChatPage constructor - - - - - - -const -ChatPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const ChatPage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/build.md deleted file mode 100644 index 11b31fb2a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/ChatPage/build.md +++ /dev/null @@ -1,114 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return DefaultTabController( - length: 2, - child: Scaffold( - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - title: Text( - "Chats", - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - bottom: const TabBar( - tabs: [ - Tab( - text: "Direct", - ), - Tab( - text: "Events", - ), - ], - ), - ), - // returns a tabs on the top for current user to switch between DirectChats and EventChats. - body: const TabBarView( - children: [ - DirectChats(), - EventChats(), - ], - ), - floatingActionButton: FloatingActionButton( - // onPressed to FloatingActionButton renders SelectContact Widget to chat with other users in the connection. - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => const SelectContact()), - ); - }, - child: const Icon(Icons.add), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md deleted file mode 100644 index fe58d6952..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_list_screen/views_after_auth_screens_chat_chat_list_screen-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# chat_list_screen library - - - - - - - - - - - -## Classes - -##### [ChatPage](../views_after_auth_screens_chat_chat_list_screen/ChatPage-class.md) - - - -ChatPage returns a stateless widget for current user Chat Page which renders -the list of all the users that the current user has chat with. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md deleted file mode 100644 index 131bed196..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# ChatMessageScreen class - - - - - - - - - -

ChatMessageScreen returns a StatelessWidget for showing the chat message screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ChatMessageScreen - - - - - - - - -## Constructors - -[ChatMessageScreen](../views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/ChatMessageScreen.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, required [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model}) - - _const_ - - -## Properties - -##### [chatId](../views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/chatId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/model.md) → [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/ChatMessageScreen.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/ChatMessageScreen.md deleted file mode 100644 index f6d0c8a5e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/ChatMessageScreen.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# ChatMessageScreen constructor - - - - - - -const -ChatMessageScreen({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, required [DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model}) - - - - - -## Implementation - -```dart -const ChatMessageScreen({Key? key, required this.chatId, required this.model}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/build.md deleted file mode 100644 index 0ba68ed58..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/build.md +++ /dev/null @@ -1,122 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - model.getChatMessages(chatId); - model.chatName(chatId); - return Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: Row( - children: [ - IconButton( - icon: const Icon(Icons.arrow_back), - onPressed: () => Navigator.pop(context), - ), - SizedBox(width: SizeConfig.safeBlockHorizontal! * 3), - CircleAvatar( - backgroundColor: Colors.white, - radius: SizeConfig.blockSizeVertical! * 2.3, - ), - SizedBox(width: SizeConfig.safeBlockHorizontal! * 3), - Text('${model.name}'), - ], - ), - ), - body: BaseView( - onModelReady: (model) => model.getChatMessages(chatId), - builder: (context, model, child) => - (Provider.of(context).chatState == - ChatState.complete) - ? Column( - children: [ - Expanded( - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 3, - ), - child: ListView.builder( - itemCount: model.chatMessagesByUser[chatId]!.length, - itemBuilder: (context, index) { - return Message( - message: - model.chatMessagesByUser[chatId]![index], - ); - }, - ), - ), - ), - ChatInputField(chatId: chatId, model: model), - ], - ) - : const Center( - child: CircularProgressIndicator(), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/chatId.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/chatId.md deleted file mode 100644 index 2dc5c3bec..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/chatId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# chatId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId - -_final_ - - - - - - -## Implementation - -```dart -final String chatId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/model.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/model.md deleted file mode 100644 index 45becc144..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model - -_final_ - - - - - - -## Implementation - -```dart -final DirectChatViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md deleted file mode 100644 index 7ee3f7021..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_chat_message_screen/views_after_auth_screens_chat_chat_message_screen-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_message_screen library - - - - - - - - - - - -## Classes - -##### [ChatMessageScreen](../views_after_auth_screens_chat_chat_message_screen/ChatMessageScreen-class.md) - - - -ChatMessageScreen returns a StatelessWidget for showing the chat message screen. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile-class.md deleted file mode 100644 index aa7aa3b89..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# ChatTile class - - - - - - - - - -

ChatTile return a widget for a tile in the list of Direct Chats in the Chat List Screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ChatTile - - - - - - - - -## Constructors - -[ChatTile](../views_after_auth_screens_chat_direct_chats/ChatTile/ChatTile.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md) chat, required [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model}) - - _const_ - - -## Properties - -##### [chat](../views_after_auth_screens_chat_direct_chats/ChatTile/chat.md) → [ChatListTileDataModel](../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../views_after_auth_screens_chat_direct_chats/ChatTile/model.md) → [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_direct_chats/ChatTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/ChatTile.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/ChatTile.md deleted file mode 100644 index d57031896..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/ChatTile.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# ChatTile constructor - - - - - - -const -ChatTile({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [ChatListTileDataModel](../../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md) chat, required [DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model}) - - - - - -## Implementation - -```dart -const ChatTile({Key? key, required this.chat, required this.model}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/build.md deleted file mode 100644 index b568e64b0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/build.md +++ /dev/null @@ -1,78 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return ListTile( - onTap: () => navigationService - .pushScreen(Routes.chatMessageScreen, arguments: [chat.id, model]), - leading: const CircleAvatar( - radius: 20, - ), - title: Text(chat.users![0].firstName!), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/chat.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/chat.md deleted file mode 100644 index f685bdc76..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/chat.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# chat property - - - - - - - -[ChatListTileDataModel](../../models_chats_chat_list_tile_data_model/ChatListTileDataModel-class.md) chat - -_final_ - - - - - - -## Implementation - -```dart -final ChatListTileDataModel chat; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/model.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/model.md deleted file mode 100644 index 45becc144..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/ChatTile/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model - -_final_ - - - - - - -## Implementation - -```dart -final DirectChatViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats-class.md deleted file mode 100644 index 2db88e0c7..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# DirectChats class - - - - - - - - - -

DirectChats return a statelessWidget for rendering all the directs -chats of the current user in the Chat List Screen

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- DirectChats - - - - - - - - -## Constructors - -[DirectChats](../views_after_auth_screens_chat_direct_chats/DirectChats/DirectChats.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_direct_chats/DirectChats/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/DirectChats.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/DirectChats.md deleted file mode 100644 index bacac35ba..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/DirectChats.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# DirectChats constructor - - - - - - -const -DirectChats({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const DirectChats({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/build.md deleted file mode 100644 index 13c976ecb..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/DirectChats/build.md +++ /dev/null @@ -1,85 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return ListView.builder( - // key: model.listKey, - itemCount: model.chats.length, - itemBuilder: (context, index) { - return ChatTile( - chat: model.chats[index], - model: model, - ); - }, - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md deleted file mode 100644 index f52c976e0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_direct_chats/views_after_auth_screens_chat_direct_chats-library.md +++ /dev/null @@ -1,46 +0,0 @@ - - - - -# direct_chats library - - - - - - - - - - - -## Classes - -##### [ChatTile](../views_after_auth_screens_chat_direct_chats/ChatTile-class.md) - - - -ChatTile return a widget for a tile in the list of Direct Chats in the Chat List Screen. - - -##### [DirectChats](../views_after_auth_screens_chat_direct_chats/DirectChats-class.md) - - - -DirectChats return a statelessWidget for rendering all the directs -chats of the current user in the Chat List Screen - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats-class.md deleted file mode 100644 index afab3cf58..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# EventChats class - - - - - - - - - -

EventChats return a statelessWidget for rendering all the events -chats of the current user in the Chat List Screen

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EventChats - - - - - - - - -## Constructors - -[EventChats](../views_after_auth_screens_chat_event_chats/EventChats/EventChats.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_event_chats/EventChats/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/EventChats.md b/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/EventChats.md deleted file mode 100644 index 5186b0822..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/EventChats.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventChats constructor - - - - - - -const -EventChats({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const EventChats({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/build.md deleted file mode 100644 index 0552bb07a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/EventChats/build.md +++ /dev/null @@ -1,73 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Container( - child: null, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md deleted file mode 100644 index 692360af1..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_event_chats/views_after_auth_screens_chat_event_chats-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# event_chats library - - - - - - - - - - - -## Classes - -##### [EventChats](../views_after_auth_screens_chat_event_chats/EventChats-class.md) - - - -EventChats return a statelessWidget for rendering all the events -chats of the current user in the Chat List Screen - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact-class.md deleted file mode 100644 index 790f504b5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# SelectContact class - - - - - - - - - -

SelectContact returns a widget that has mutable state _SelectContactState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SelectContact - - - - - - - - -## Constructors - -[SelectContact](../views_after_auth_screens_chat_select_contact/SelectContact/SelectContact.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_chat_select_contact/SelectContact/createState.md)() _SelectContactState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/SelectContact.md b/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/SelectContact.md deleted file mode 100644 index d896d61fd..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/SelectContact.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# SelectContact constructor - - - - - - -const -SelectContact({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const SelectContact({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/createState.md b/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/createState.md deleted file mode 100644 index 34529da24..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/SelectContact/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SelectContactState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SelectContactState createState() => _SelectContactState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md deleted file mode 100644 index f924dee20..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_select_contact/views_after_auth_screens_chat_select_contact-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# select_contact library - - - - - - - - - - - -## Classes - -##### [SelectContact](../views_after_auth_screens_chat_select_contact/SelectContact-class.md) - - - -SelectContact returns a widget that has mutable state _SelectContactState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md deleted file mode 100644 index 8eb646085..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# ChatInputField class - - - - - - - - - -

ChatInputField returns a widget that has mutable state _ChatInputFieldState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- ChatInputField - - - - - - - - -## Constructors - -[ChatInputField](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/ChatInputField.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, required [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [chatId](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/chatId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -ChatId. -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/model.md) → [DirectChatViewModel](../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) - - - -DirectChatViewModel instance. -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/createState.md)() [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[ChatInputField](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md)> - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/ChatInputField.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/ChatInputField.md deleted file mode 100644 index 9521860d9..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/ChatInputField.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# ChatInputField constructor - - - - - - -const -ChatInputField({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId, required [DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const ChatInputField({ - required this.chatId, - required this.model, - Key? key, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/chatId.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/chatId.md deleted file mode 100644 index e2b3e1207..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/chatId.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# chatId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) chatId - -_final_ - - - -

ChatId.

- - - -## Implementation - -```dart -final String chatId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/createState.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/createState.md deleted file mode 100644 index 1d7afc59b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[ChatInputField](../../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md)> createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -State createState() => _ChatInputFieldState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/model.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/model.md deleted file mode 100644 index 3abb558cf..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField/model.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# model property - - - - - - - -[DirectChatViewModel](../../view_model_after_auth_view_models_chat_view_models_direct_chat_view_model/DirectChatViewModel-class.md) model - -_final_ - - - -

DirectChatViewModel instance.

- - - -## Implementation - -```dart -final DirectChatViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md deleted file mode 100644 index bb61c05cc..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_input_field/views_after_auth_screens_chat_widgets_chat_input_field-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_input_field library - - - - - - - - - - - -## Classes - -##### [ChatInputField](../views_after_auth_screens_chat_widgets_chat_input_field/ChatInputField-class.md) - - - -ChatInputField returns a widget that has mutable state _ChatInputFieldState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md deleted file mode 100644 index 7bb1eb076..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# Message class - - - - - - - - - -

Message returns a widget for chat message in the bubble form.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- Message - - - - - - - - -## Constructors - -[Message](../views_after_auth_screens_chat_widgets_chat_message_bubble/Message/Message.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [ChatMessage](../models_chats_chat_message/ChatMessage-class.md) message}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_chat_widgets_chat_message_bubble/Message/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/Message.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/Message.md deleted file mode 100644 index 6f392e748..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/Message.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# Message constructor - - - - - - -const -Message({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [ChatMessage](../../models_chats_chat_message/ChatMessage-class.md) message}) - - - - - -## Implementation - -```dart -const Message({Key? key, required this.message}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/build.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/build.md deleted file mode 100644 index 824759c16..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/Message/build.md +++ /dev/null @@ -1,117 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - // styling - return Padding( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical! * 2), - child: Row( - mainAxisAlignment: - message.sender!.firstName == userConfig.currentUser.firstName - ? MainAxisAlignment.end - : MainAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.safeBlockHorizontal! * 2, - vertical: SizeConfig.blockSizeVertical! * 1.2, - ), - decoration: BoxDecoration( - // if the message is sent by current user, then the background color will be white else green - color: - message.sender!.firstName == userConfig.currentUser.firstName - ? Colors.white - : Colors.green, - borderRadius: - message.sender!.firstName == userConfig.currentUser.firstName - ? const BorderRadius.only( - bottomRight: Radius.circular(15), - topLeft: Radius.circular(15), - bottomLeft: Radius.circular(15), - ) - : const BorderRadius.only( - bottomRight: Radius.circular(15), - topRight: Radius.circular(15), - bottomLeft: Radius.circular(15), - ), - ), - child: Text( - message.messageContent!, - // if the message is sent by current user, then the text color will be black else theme bodyText color - style: TextStyle( - color: message.sender!.firstName == - userConfig.currentUser.firstName - ? Colors.black - : Theme.of(context).textTheme.bodyLarge!.color, - ), - ), - ), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md b/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md deleted file mode 100644 index 7a6b4a4f5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_chat_widgets_chat_message_bubble/views_after_auth_screens_chat_widgets_chat_message_bubble-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# chat_message_bubble library - - - - - - - - - - - -## Classes - -##### [Message](../views_after_auth_screens_chat_widgets_chat_message_bubble/Message-class.md) - - - -Message returns a widget for chat message in the bubble form. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm-class.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm-class.md deleted file mode 100644 index 6899a021e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm-class.md +++ /dev/null @@ -1,199 +0,0 @@ - - - -# CreateEventForm class - - - - - - - - - -

CreateEventForm returns a widget of a Form for creating events in the organization. -This widget is used in CreateEventPage widget.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CreateEventForm - - - - - - - - -## Constructors - -[CreateEventForm](../views_after_auth_screens_events_create_event_form/CreateEventForm/CreateEventForm.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) model}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../views_after_auth_screens_events_create_event_form/CreateEventForm/model.md) → [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_events_create_event_form/CreateEventForm/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/CreateEventForm.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/CreateEventForm.md deleted file mode 100644 index bc499612c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/CreateEventForm.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# CreateEventForm constructor - - - - - - -const -CreateEventForm({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [CreateEventViewModel](../../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) model}) - - - - - -## Implementation - -```dart -const CreateEventForm({Key? key, required this.model}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/build.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/build.md deleted file mode 100644 index 4f52a40cc..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/build.md +++ /dev/null @@ -1,194 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - // Form class is a container for grouping together multiple form field widgets. - return Form( - key: model.formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Text field for event title. - TextFormField( - key: const Key('create_event_form_tff1'), - textInputAction: TextInputAction.next, - controller: model.eventTitleTextController, - keyboardType: TextInputType.name, - maxLength: 20, - focusNode: model.titleFocus, - validator: (value) => Validator.validateEventForm(value!, 'Title'), - decoration: InputDecoration( - // placeholder of the text field - labelText: 'Add Event Title', - isDense: true, - labelStyle: Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - counterText: "", - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.title, - size: 25, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for the location. - TextFormField( - key: const Key('create_event_form_tff2'), - textInputAction: TextInputAction.next, - keyboardType: TextInputType.streetAddress, - controller: model.eventLocationTextController, - focusNode: model.locationFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Location'), - decoration: InputDecoration( - hintText: 'Where is the event?', - labelText: 'Add Location', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - suffix: GestureDetector( - key: const Key('gesture_cef_test'), - onTap: () => navigationService.pushScreen( - Routes.mapScreen, - arguments: { - 'model': model, - // initalize the map screen with a marker at this location - 'latitude': 37.42796133580664, - 'longitude': -122.085749655962, - }, - ), - child: Text( - AppLocalizations.of(context)! - .strictTranslate('Choose on map'), - style: Theme.of(context) - .textTheme - .bodySmall! - .copyWith(fontSize: 16), - ), - ), - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.place, - size: 25, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for event description. - TextFormField( - key: const Key('create_event_form_tff3'), - keyboardType: TextInputType.multiline, - controller: model.eventDescriptionTextController, - focusNode: model.descriptionFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Description'), - maxLines: 10, - minLines: 1, - decoration: InputDecoration( - hintText: 'Describe the event', - labelText: 'Add Description', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.view_headline, - size: 25, - ), - ), - ), - ), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/model.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/model.md deleted file mode 100644 index bbf439e81..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/CreateEventForm/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[CreateEventViewModel](../../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) model - -_final_ - - - - - - -## Implementation - -```dart -final CreateEventViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md deleted file mode 100644 index b2576e320..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_form/views_after_auth_screens_events_create_event_form-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# create_event_form library - - - - - - - - - - - -## Classes - -##### [CreateEventForm](../views_after_auth_screens_events_create_event_form/CreateEventForm-class.md) - - - -CreateEventForm returns a widget of a Form for creating events in the organization. -This widget is used in CreateEventPage widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage-class.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage-class.md deleted file mode 100644 index eae27c46b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# CreateEventPage class - - - - - - - - - -

CreateEventPage returns a widget that has mutable state _CreateEventPageState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- CreateEventPage - - - - - - - - -## Constructors - -[CreateEventPage](../views_after_auth_screens_events_create_event_page/CreateEventPage/CreateEventPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_events_create_event_page/CreateEventPage/createState.md)() _CreateEventPageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/CreateEventPage.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/CreateEventPage.md deleted file mode 100644 index 3692c4ee9..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/CreateEventPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# CreateEventPage constructor - - - - - - -const -CreateEventPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const CreateEventPage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/createState.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/createState.md deleted file mode 100644 index 2b79419a3..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/CreateEventPage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_CreateEventPageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_CreateEventPageState createState() => _CreateEventPageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md b/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md deleted file mode 100644 index 19a719544..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_create_event_page/views_after_auth_screens_events_create_event_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# create_event_page library - - - - - - - - - - - -## Classes - -##### [CreateEventPage](../views_after_auth_screens_events_create_event_page/CreateEventPage-class.md) - - - -CreateEventPage returns a widget that has mutable state _CreateEventPageState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage-class.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage-class.md deleted file mode 100644 index 612885d7f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# EditEventPage class - - - - - - - - - -

EditEventPage returns a widget that has mutable state _EditEventPageState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- EditEventPage - - - - - - - - -## Constructors - -[EditEventPage](../views_after_auth_screens_events_edit_event_page/EditEventPage/EditEventPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Event](../models_events_event_model/Event-class.md) event}) - - _const_ - - -## Properties - -##### [event](../views_after_auth_screens_events_edit_event_page/EditEventPage/event.md) → [Event](../models_events_event_model/Event-class.md) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_events_edit_event_page/EditEventPage/createState.md)() _EditEventPageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/EditEventPage.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/EditEventPage.md deleted file mode 100644 index 101f34c3d..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/EditEventPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EditEventPage constructor - - - - - - -const -EditEventPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Event](../../models_events_event_model/Event-class.md) event}) - - - - - -## Implementation - -```dart -const EditEventPage({Key? key, required this.event}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/createState.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/createState.md deleted file mode 100644 index f095ce13c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_EditEventPageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_EditEventPageState createState() => _EditEventPageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/event.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/event.md deleted file mode 100644 index 9714bc41a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/EditEventPage/event.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# event property - - - - - - - -[Event](../../models_events_event_model/Event-class.md) event - -_final_ - - - - - - -## Implementation - -```dart -final Event event; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md deleted file mode 100644 index 03f6aafa3..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_event_page/views_after_auth_screens_events_edit_event_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# edit_event_page library - - - - - - - - - - - -## Classes - -##### [EditEventPage](../views_after_auth_screens_events_edit_event_page/EditEventPage-class.md) - - - -EditEventPage returns a widget that has mutable state _EditEventPageState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm-class.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm-class.md deleted file mode 100644 index 4b944f021..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm-class.md +++ /dev/null @@ -1,199 +0,0 @@ - - - -# EditEventForm class - - - - - - - - - -

EditEventForm returns a widget of a Form for editing an event. -This widget is used in EditEventPage widget.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EditEventForm - - - - - - - - -## Constructors - -[EditEventForm](../views_after_auth_screens_events_edit_events_form/EditEventForm/EditEventForm.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [EditEventViewModel](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) model}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../views_after_auth_screens_events_edit_events_form/EditEventForm/model.md) → [EditEventViewModel](../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_events_edit_events_form/EditEventForm/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/EditEventForm.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/EditEventForm.md deleted file mode 100644 index 355dbe36f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/EditEventForm.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EditEventForm constructor - - - - - - -const -EditEventForm({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [EditEventViewModel](../../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) model}) - - - - - -## Implementation - -```dart -const EditEventForm({Key? key, required this.model}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/build.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/build.md deleted file mode 100644 index 586d7aeea..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/build.md +++ /dev/null @@ -1,188 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - // Form class is a container for grouping together multiple form field widgets. - return Form( - key: model.formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Text field for event title. - TextFormField( - textInputAction: TextInputAction.next, - controller: model.eventTitleTextController, - keyboardType: TextInputType.name, - maxLength: 20, - focusNode: model.titleFocus, - validator: (value) => Validator.validateEventForm(value!, 'Title'), - decoration: InputDecoration( - labelText: 'Add Event Title', - isDense: true, - labelStyle: Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - counterText: "", - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.title, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.titleFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for the location. - TextFormField( - textInputAction: TextInputAction.next, - keyboardType: TextInputType.streetAddress, - controller: model.eventLocationTextController, - focusNode: model.locationFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Location'), - decoration: InputDecoration( - hintText: 'Where is the event?', - labelText: 'Add Location', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.place, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.locationFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - // Text field for event description. - TextFormField( - keyboardType: TextInputType.multiline, - controller: model.eventDescriptionTextController, - focusNode: model.descriptionFocus, - validator: (value) => - Validator.validateEventForm(value!, 'Description'), - maxLines: 10, - minLines: 1, - decoration: InputDecoration( - hintText: 'Describe the event', - labelText: 'Add Description', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.view_headline, - size: 25, - ), - ), - suffixIcon: IconButton( - onPressed: () { - FocusScope.of(context).requestFocus(model.descriptionFocus); - }, - icon: const Icon(Icons.edit), - ), - ), - ), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/model.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/model.md deleted file mode 100644 index 9cf984beb..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/EditEventForm/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[EditEventViewModel](../../view_model_after_auth_view_models_event_view_models_edit_event_view_model/EditEventViewModel-class.md) model - -_final_ - - - - - - -## Implementation - -```dart -final EditEventViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md b/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md deleted file mode 100644 index a2c383396..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_edit_events_form/views_after_auth_screens_events_edit_events_form-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# edit_events_form library - - - - - - - - - - - -## Classes - -##### [EditEventForm](../views_after_auth_screens_events_edit_events_form/EditEventForm-class.md) - - - -EditEventForm returns a widget of a Form for editing an event. -This widget is used in EditEventPage widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar-class.md b/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar-class.md deleted file mode 100644 index 5d56cb4be..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# EventCalendar class - - - - - - - - - -

EventCalendar returns a widget that has mutable state _EventCalendarState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- EventCalendar - - - - - - - - -## Constructors - -[EventCalendar](../views_after_auth_screens_events_event_calendar/EventCalendar/EventCalendar.md) ([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> eventList, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [eventList](../views_after_auth_screens_events_event_calendar/EventCalendar/eventList.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_events_event_calendar/EventCalendar/createState.md)() [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[EventCalendar](../views_after_auth_screens_events_event_calendar/EventCalendar-class.md)> - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/EventCalendar.md b/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/EventCalendar.md deleted file mode 100644 index 65f8fdce0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/EventCalendar.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventCalendar constructor - - - - - - -const -EventCalendar([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> eventList, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const EventCalendar(this.eventList, {Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/createState.md b/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/createState.md deleted file mode 100644 index f0a5f419f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[EventCalendar](../../views_after_auth_screens_events_event_calendar/EventCalendar-class.md)> createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -State createState() => _EventCalendarState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/eventList.md b/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/eventList.md deleted file mode 100644 index 9fb10e4c0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/EventCalendar/eventList.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> eventList - -_final_ - - - - - - -## Implementation - -```dart -final List eventList; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md b/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md deleted file mode 100644 index d2022d1c0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_calendar/views_after_auth_screens_events_event_calendar-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_calendar library - - - - - - - - - - - -## Classes - -##### [EventCalendar](../views_after_auth_screens_events_event_calendar/EventCalendar-class.md) - - - -EventCalendar returns a widget that has mutable state _EventCalendarState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody-class.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody-class.md deleted file mode 100644 index 17d306b07..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# EventInfoBody class - - - - - - - - - -

EventInfoBody returns a stateless widget which describes the body of a particular event.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EventInfoBody - - - - - - - - -## Constructors - -[EventInfoBody](../views_after_auth_screens_events_event_info_body/EventInfoBody/EventInfoBody.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_events_event_info_body/EventInfoBody/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/EventInfoBody.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/EventInfoBody.md deleted file mode 100644 index f2834782c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/EventInfoBody.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventInfoBody constructor - - - - - - -const -EventInfoBody({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const EventInfoBody({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/build.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/build.md deleted file mode 100644 index 5800dc423..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/EventInfoBody/build.md +++ /dev/null @@ -1,332 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - // fetching the event data from model - final model = Provider.of(context); - final event = model.event; - // Slivers are special-purpose widgets that can be combined using a - //CustomScrollView to create custom scroll effects. A SliverToBoxAdapter - //is a basic sliver that creates a bridge back to one of the usual box-based widgets. - return SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - padding: EdgeInsets.only( - right: SizeConfig.safeBlockHorizontal! * 15, - ), - child: Row( - children: [ - Flexible( - child: Text( - // event title - event.title!, - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(fontSize: 26), - ), - ), - ], - ), - ), - Positioned( - right: SizeConfig.screenWidth! * 0.002, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - (model.event.creator!.id == userConfig.currentUser.id) - ? IconButton( - onPressed: () => navigationService.pushScreen( - "/editEventPage", - arguments: model.event, - ), - icon: const Icon(Icons.edit), - ) - : Container(), - const Icon(Icons.chat_bubble_outline), - ], - ), - ), - ], - ), - Text( - // Display event creator full name. - "${AppLocalizations.of(context)!.strictTranslate("Created by")}: ${event.creator!.firstName} ${event.creator!.lastName}", - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontWeight: FontWeight.w600), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon( - Icons.calendar_today, - size: 13, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - Text( - // Display start and end date of the Event. - "${event.startDate!} - ${event.endDate!}", - style: Theme.of(context).textTheme.bodySmall, - ), - const Spacer(), - // If event type is public then renders lock_open icon else renders lock icon. - event.isPublic! - ? Icon( - Icons.lock_open, - size: 13, - color: Theme.of(context).colorScheme.secondary, - ) - : Icon( - Icons.lock, - size: 13, - color: Theme.of(context).colorScheme.primary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - // If event type is public then renders 'public' - // else renders 'private' text translated into the app language. - event.isPublic! - ? Text( - AppLocalizations.of(context)!.strictTranslate('public'), - style: Theme.of(context).textTheme.bodySmall, - ) - : Text( - AppLocalizations.of(context)! - .strictTranslate('private'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // display schedule icon with the start and end date of the time. - const Icon( - Icons.schedule, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.025, - ), - Text( - "${event.startTime!} - ${event.endTime!}", - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.011, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Icon( - Icons.place, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - Text( - event.location!, - style: Theme.of(context).textTheme.bodySmall, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - maxLines: 3, - ), - const Spacer(), - // If the event location is not null then display the location - //on the map with the reference of latitude and longitude provided for the event. - if (event.latitude != null && event.longitude != null) - GestureDetector( - onTap: () => navigationService.pushScreen( - Routes.mapScreen, - arguments: { - "latitude": event.latitude, - "longitude": event.longitude, - }, - ), - child: Text( - 'View on map', - style: Theme.of(context).textTheme.bodySmall!.copyWith( - color: Theme.of(context).colorScheme.secondary, - ), - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - maxLines: 3, - ), - ), - ], - ), - const Divider(), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Text( - AppLocalizations.of(context)!.strictTranslate("Description"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - SizedBox(width: SizeConfig.screenWidth! * 0.013), - Text( - // Display the Description of the event if not null. - event.description!, - style: Theme.of(context).textTheme.bodySmall, - ), - SizedBox(height: SizeConfig.screenHeight! * 0.013), - Text( - AppLocalizations.of(context)!.strictTranslate("Admins"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 2, - ), - ListView.builder( - padding: EdgeInsets.zero, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: event.admins!.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: Key( - '${AppLocalizations.of(context)!.strictTranslate("Admins")}$index', - ), - index: index, - type: TileType.user, - userInfo: event.admins![index], - onTapUserInfo: () {}, - ); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Text( - AppLocalizations.of(context)!.strictTranslate("Attendees"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 16), - ), - Divider( - color: Theme.of(context).colorScheme.onBackground, - thickness: 2, - ), - if (model.isBusy) - // if the model is still fetching the attendees details then display Circular Progress Indicator Icon. - const Padding( - padding: EdgeInsets.only(top: 12.0), - child: Center(child: CircularProgressIndicator()), - ) - else - // else if the model fetched the attendees details successfully - //then renders all the attendees in ListView. - ListView.builder( - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: model.registrants.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: Key( - '${AppLocalizations.of(context)!.strictTranslate("Attendee")}$index', - ), - index: index, - type: TileType.user, - userInfo: model.registrants[index], - onTapUserInfo: () {}, - ); - }, - ) - ], - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md deleted file mode 100644 index 2035b82bd..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_body/views_after_auth_screens_events_event_info_body-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_info_body library - - - - - - - - - - - -## Classes - -##### [EventInfoBody](../views_after_auth_screens_events_event_info_body/EventInfoBody-class.md) - - - -EventInfoBody returns a stateless widget which describes the body of a particular event. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage-class.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage-class.md deleted file mode 100644 index 10ec2c8e7..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# EventInfoPage class - - - - - - - - - -

EventInfoPage returns a widget that has mutable state _EventInfoPageState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- EventInfoPage - - - - - - - - -## Constructors - -[EventInfoPage](../views_after_auth_screens_events_event_info_page/EventInfoPage/EventInfoPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> args}) - - _const_ - - -## Properties - -##### [args](../views_after_auth_screens_events_event_info_page/EventInfoPage/args.md) → [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_events_event_info_page/EventInfoPage/createState.md)() _EventInfoPageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/EventInfoPage.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/EventInfoPage.md deleted file mode 100644 index f56297666..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/EventInfoPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventInfoPage constructor - - - - - - -const -EventInfoPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> args}) - - - - - -## Implementation - -```dart -const EventInfoPage({Key? key, required this.args}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/args.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/args.md deleted file mode 100644 index bc15ede0a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/args.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# args property - - - - - - - -[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic> args - -_final_ - - - - - - -## Implementation - -```dart -final Map args; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/createState.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/createState.md deleted file mode 100644 index 40792cb7f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/EventInfoPage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_EventInfoPageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_EventInfoPageState createState() => _EventInfoPageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md b/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md deleted file mode 100644 index 143f14484..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_event_info_page/views_after_auth_screens_events_event_info_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_info_page library - - - - - - - - - - - -## Classes - -##### [EventInfoPage](../views_after_auth_screens_events_event_info_page/EventInfoPage-class.md) - - - -EventInfoPage returns a widget that has mutable state _EventInfoPageState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md deleted file mode 100644 index fd5c8bca4..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# ExploreEventDialog class - - - - - - - - - -

ExploreEventDialog returns a widget that has mutable state _ExploreEventDialogState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- ExploreEventDialog - - - - - - - - -## Constructors - -[ExploreEventDialog](../views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/ExploreEventDialog.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/createState.md)() _ExploreEventDialogState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/ExploreEventDialog.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/ExploreEventDialog.md deleted file mode 100644 index a932b4294..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/ExploreEventDialog.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ExploreEventDialog constructor - - - - - - -const -ExploreEventDialog({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const ExploreEventDialog({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/createState.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/createState.md deleted file mode 100644 index f864e77ec..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_ExploreEventDialogState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_ExploreEventDialogState createState() => _ExploreEventDialogState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md deleted file mode 100644 index d97223d2e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_event_dialogue/views_after_auth_screens_events_explore_event_dialogue-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# explore_event_dialogue library - - - - - - - - - - - -## Classes - -##### [ExploreEventDialog](../views_after_auth_screens_events_explore_event_dialogue/ExploreEventDialog-class.md) - - - -ExploreEventDialog returns a widget that has mutable state _ExploreEventDialogState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents-class.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents-class.md deleted file mode 100644 index 31f1fd129..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# ExploreEvents class - - - - - - - - - -

Shows the list of events with options to categorize them.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ExploreEvents - - - - - - - - -## Constructors - -[ExploreEvents](../views_after_auth_screens_events_explore_events/ExploreEvents/ExploreEvents.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [homeModel](../views_after_auth_screens_events_explore_events/ExploreEvents/homeModel.md) → [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? - - - -homeModal is a type of MainScreenViewModel which provides methods to handle the data for this component. -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_events_explore_events/ExploreEvents/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [dropDownList](../views_after_auth_screens_events_explore_events/ExploreEvents/dropDownList.md)([ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) model, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Shows a list of dropdown taken from model and context. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/ExploreEvents.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/ExploreEvents.md deleted file mode 100644 index 8329f47a9..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/ExploreEvents.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# ExploreEvents constructor - - - - - - -const -ExploreEvents({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel}) - - - - - -## Implementation - -```dart -const ExploreEvents({ - required Key key, - this.homeModel, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/build.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/build.md deleted file mode 100644 index fc8416b51..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/build.md +++ /dev/null @@ -1,291 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return Scaffold( - appBar: AppBar( - // AppBar returns widget for the header. - backgroundColor: Theme.of(context).primaryColor, - key: const Key("ExploreEventsAppBar"), - elevation: 0.0, - automaticallyImplyLeading: false, - centerTitle: true, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Explore Events'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - // returns a button of menu icon to redirect to home. - color: Theme.of(context).iconTheme.color, - icon: const Icon(Icons.menu), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - actions: [ - Padding( - padding: EdgeInsets.only( - right: SizeConfig.screenWidth! * 0.027, - ), - // if the events is not empty then renders button for searching the events else renders just a box. - child: model.events.isNotEmpty - ? IconButton( - onPressed: () { - showSearch( - context: context, - delegate: EventSearch( - eventList: model.events, - exploreEventsViewModel: model, - ), - ); - }, - icon: const Icon(Icons.search, size: 20), - ) - : const SizedBox(), - ) - ], - ), - // if the model is still fetching the events list then renders the Circular Progress Indicator - // else render refresh icon along with the list of searched events for exploration. - body: model.isBusy - ? const Center(child: CircularProgressIndicator()) - : RefreshIndicator( - onRefresh: () async => model.refreshEvents(), - child: Stack( - children: [ - SingleChildScrollView( - physics: const AlwaysScrollableScrollPhysics(), - child: Padding( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.010, - ), - child: Column( - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 3, - child: Card( - color: Theme.of(context) - .colorScheme - .onPrimary, - elevation: 2, - child: Container( - padding: const EdgeInsets.symmetric( - horizontal: 20, - ), - //width: SizeConfig.screenWidth! * 0.45, - child: DropdownButtonHideUnderline( - child: dropDownList(model, context), - ), - ), - ), - ), - Expanded( - flex: 2, - child: GestureDetector( - onTap: () { - showDialog( - // on tap open the Explore Event Dialog. - context: context, - builder: (_) { - return const ExploreEventDialog( - key: Key('ExploreEvents'), - ); - }, - ); - }, - child: Card( - key: homeModel?.keySEDateFilter, - color: Theme.of(context) - .colorScheme - .onPrimary, - child: Container( - padding: const EdgeInsets.symmetric( - vertical: 12, - ), - // width: SizeConfig.screenWidth! * 0.30, - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - const Icon( - Icons.calendar_today, - color: Color(0xff524F4F), - ), - const SizedBox( - width: 8, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate( - "Add Date", - ), - ), - ], - ), - ), - ), - ), - ), - Expanded( - flex: 1, - child: Card( - color: Theme.of(context) - .colorScheme - .onPrimary, - child: IconButton( - onPressed: () { - navigationService.pushScreen( - Routes.calendar, - arguments: model.events, - ); - }, - icon: const Icon( - Icons.calendar_month, - ), - ), - ), - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.027, - ), - // if the events model is empty then renders a box with text as "Empty List" - // else renders lists of the all event tile. - model.events.isEmpty - ? SizedBox( - height: SizeConfig.screenHeight! * 0.5, - child: Center( - child: Text(model.emptyListMessage), - ), - ) - : ListView.builder( - physics: - const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: model.events.length, - itemBuilder: - (BuildContext context, int index) { - return GestureDetector( - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": model.events[index], - "exploreEventViewModel": model - }, - ); - }, - child: EventCard( - event: model.events[index], - isSearchItem: false, - ), - ); - }, - ), - ], - ), - ), - ), - ], - ), - ), - floatingActionButton: FloatingActionButton.extended( - key: homeModel?.keySEAdd, - heroTag: "AddEventFab", - backgroundColor: Theme.of(context).colorScheme.background, - onPressed: () { - navigationService.pushScreen( - "/createEventPage", - ); - }, - icon: Icon( - Icons.add, - color: Theme.of(context).colorScheme.secondary, - ), - label: Text( - AppLocalizations.of(context)!.strictTranslate("Event"), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(color: Theme.of(context).colorScheme.secondary), - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/dropDownList.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/dropDownList.md deleted file mode 100644 index ab1c95642..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/dropDownList.md +++ /dev/null @@ -1,71 +0,0 @@ - - - -# dropDownList method - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) dropDownList -([ExploreEventsViewModel](../../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) model, [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

Shows a list of dropdown taken from model and context.

-

params:

-
    -
  • model: contains the events data
  • -
  • context: the overall context of UI
  • -
-

returns:

-
    -
  • Widget: the dropdown
  • -
- - - -## Implementation - -```dart -Widget dropDownList(ExploreEventsViewModel model, BuildContext context) { - return DropdownButton( - key: homeModel?.keySECategoryMenu, - value: model.chosenValue, - isExpanded: true, - items: [ - 'All Events', - 'Created Events', - 'Registered Events', - 'Public Events', - 'Private Events', - ].map>((String value) { - return DropdownMenuItem( - value: value, - child: Text( - AppLocalizations.of(context)!.strictTranslate(value), - style: Theme.of(context) - .textTheme - .titleLarge! - .copyWith(color: Theme.of(context).colorScheme.secondary), - ), - ); - }).toList(), - onChanged: (value) { - model.choseValueFromDropdown(value!); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/homeModel.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/homeModel.md deleted file mode 100644 index 57574b782..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/ExploreEvents/homeModel.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# homeModel property - - - - - - - -[MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel - -_final_ - - - -

homeModal is a type of MainScreenViewModel which provides methods to handle the data for this component.

- - - -## Implementation - -```dart -final MainScreenViewModel? homeModel; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md b/talawa-mobile-docs/views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md deleted file mode 100644 index 0e0ef06ba..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_events_explore_events/views_after_auth_screens_events_explore_events-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# explore_events library - - - - - - - - - - - -## Classes - -##### [ExploreEvents](../views_after_auth_screens_events_explore_events/ExploreEvents-class.md) - - - -Shows the list of events with options to categorize them. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate-class.md deleted file mode 100644 index fb53308d8..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# CommentTemplate class - - - - - - - - - -

CommentTemplate returns a widget of the individual user commented on the post.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CommentTemplate - - - - - - - - -## Constructors - -[CommentTemplate](../views_after_auth_screens_feed_individual_post/CommentTemplate/CommentTemplate.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Comment](../models_comment_comment_model/Comment-class.md) comment}) - - _const_ - - -## Properties - -##### [comment](../views_after_auth_screens_feed_individual_post/CommentTemplate/comment.md) → [Comment](../models_comment_comment_model/Comment-class.md) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_feed_individual_post/CommentTemplate/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/CommentTemplate.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/CommentTemplate.md deleted file mode 100644 index 03d248913..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/CommentTemplate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# CommentTemplate constructor - - - - - - -const -CommentTemplate({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Comment](../../models_comment_comment_model/Comment-class.md) comment}) - - - - - -## Implementation - -```dart -const CommentTemplate({ - Key? key, - required this.comment, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/build.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/build.md deleted file mode 100644 index 06c25c934..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/build.md +++ /dev/null @@ -1,105 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const CircleAvatar(), - Expanded( - child: Container( - decoration: BoxDecoration( - color: Theme.of(context).iconTheme.color!.withOpacity(0.2), - borderRadius: const BorderRadius.all(Radius.circular(8)), - ), - padding: const EdgeInsets.all(16.0), - margin: const EdgeInsets.only(left: 8.0, bottom: 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: Text( - "${comment.creator!.firstName!} ${comment.creator!.lastName!}", - style: Theme.of(context).textTheme.bodyMedium, - ), - ), - Text( - comment.text!, - style: Theme.of(context) - .textTheme - .bodyLarge! - .copyWith(fontSize: 16.0), - ), - ], - ), - ), - ) - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/comment.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/comment.md deleted file mode 100644 index c6fe7ea8c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/CommentTemplate/comment.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# comment property - - - - - - - -[Comment](../../models_comment_comment_model/Comment-class.md) comment - -_final_ - - - - - - -## Implementation - -```dart -final Comment comment; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md deleted file mode 100644 index 9a1ff325d..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# IndividualPageLikeSection class - - - - - - - - - -

IndividualPageLikeSection returns a widget that show the list of all the users liked the post.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- IndividualPageLikeSection - - - - - - - - -## Constructors - -[IndividualPageLikeSection](../views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/IndividualPageLikeSection.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)> usersLiked}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [usersLiked](../views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/usersLiked.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../models_post_post_model/LikedBy-class.md)> - - - - -_final_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/IndividualPageLikeSection.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/IndividualPageLikeSection.md deleted file mode 100644 index 277f839a8..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/IndividualPageLikeSection.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# IndividualPageLikeSection constructor - - - - - - -const -IndividualPageLikeSection({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)> usersLiked}) - - - - - -## Implementation - -```dart -const IndividualPageLikeSection({ - Key? key, - required this.usersLiked, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/build.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/build.md deleted file mode 100644 index 3f7bb9e2c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/build.md +++ /dev/null @@ -1,84 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildPadding(context, "Liked by"), - Row( - children: [ - // Looping through the usersLiked list, - for (int i = 0; i < usersLiked.length; i++) - // renders the custom widget for invidual user. - likedUserCircleAvatar(usersLiked[i]) - ], - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/usersLiked.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/usersLiked.md deleted file mode 100644 index 6a93bef90..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPageLikeSection/usersLiked.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# usersLiked property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[LikedBy](../../models_post_post_model/LikedBy-class.md)> usersLiked - -_final_ - - - - - - -## Implementation - -```dart -final List usersLiked; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md deleted file mode 100644 index ee38a46c9..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# IndividualPostCommentSection class - - - - - - - - - -

IndividualPostCommentSection returns a widget that show the list of all the users commented on the post.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- IndividualPostCommentSection - - - - - - - - -## Constructors - -[IndividualPostCommentSection](../views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/IndividualPostCommentSection.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../models_post_post_model/Comments-class.md)> comments, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID}) - - _const_ - - -## Properties - -##### [comments](../views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/comments.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../models_post_post_model/Comments-class.md)> - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [postID](../views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/postID.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/IndividualPostCommentSection.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/IndividualPostCommentSection.md deleted file mode 100644 index 211002b58..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/IndividualPostCommentSection.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# IndividualPostCommentSection constructor - - - - - - -const -IndividualPostCommentSection({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../../models_post_post_model/Comments-class.md)> comments, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID}) - - - - - -## Implementation - -```dart -const IndividualPostCommentSection({ - Key? key, - required this.comments, - required this.postID, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/build.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/build.md deleted file mode 100644 index 09d6c82d3..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/build.md +++ /dev/null @@ -1,87 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) async { - await model.initialise(postID); - // print(model.commentList.first.creator); - _commentViewModel = model; - }, - builder: (context, model, child) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildPadding(context, "Comments"), - // Looping through the commentList list, - for (int i = 0; i < model.commentList.length; i++) - // renders the custom widget for invidual user. - CommentTemplate(comment: model.commentList[i]) - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/comments.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/comments.md deleted file mode 100644 index 0276c53d6..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/comments.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# comments property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Comments](../../models_post_post_model/Comments-class.md)> comments - -_final_ - - - - - - -## Implementation - -```dart -final List comments; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/postID.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/postID.md deleted file mode 100644 index 9e5c5243b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostCommentSection/postID.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# postID property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) postID - -_final_ - - - - - - -## Implementation - -```dart -final String postID; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView-class.md deleted file mode 100644 index 453fc8cf2..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# IndividualPostView class - - - - - - - - - -

IndividualPostView returns a widget that has mutable state _IndividualPostViewState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- IndividualPostView - - - - - - - - -## Constructors - -[IndividualPostView](../views_after_auth_screens_feed_individual_post/IndividualPostView/IndividualPostView.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Post](../models_post_post_model/Post-class.md) post}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [post](../views_after_auth_screens_feed_individual_post/IndividualPostView/post.md) → [Post](../models_post_post_model/Post-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_feed_individual_post/IndividualPostView/createState.md)() _IndividualPostViewState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/IndividualPostView.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/IndividualPostView.md deleted file mode 100644 index 46d963572..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/IndividualPostView.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# IndividualPostView constructor - - - - - - -const -IndividualPostView({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Post](../../models_post_post_model/Post-class.md) post}) - - - - - -## Implementation - -```dart -const IndividualPostView({Key? key, required this.post}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/createState.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/createState.md deleted file mode 100644 index dfbb3d183..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_IndividualPostViewState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_IndividualPostViewState createState() => _IndividualPostViewState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/post.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/post.md deleted file mode 100644 index e986becbc..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/IndividualPostView/post.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# post property - - - - - - - -[Post](../../models_post_post_model/Post-class.md) post - -_final_ - - - - - - -## Implementation - -```dart -final Post post; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/buildPadding.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/buildPadding.md deleted file mode 100644 index a98749bed..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/buildPadding.md +++ /dev/null @@ -1,44 +0,0 @@ - - - -# buildPadding function - - - - - - - - - - -[Padding](https://api.flutter.dev/flutter/widgets/Padding-class.html) buildPadding -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text) - - - - - - - - -## Implementation - -```dart -Padding buildPadding(BuildContext context, String text) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: Text( - AppLocalizations.of(context)!.strictTranslate(text), - style: Theme.of(context).textTheme.titleLarge, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/likedUserCircleAvatar.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/likedUserCircleAvatar.md deleted file mode 100644 index fb2e6b9a9..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/likedUserCircleAvatar.md +++ /dev/null @@ -1,62 +0,0 @@ - - - -# likedUserCircleAvatar function - - - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) likedUserCircleAvatar -([LikedBy](../models_post_post_model/LikedBy-class.md) user) - - - - - -

likedUserCircleAvatar returns a widget of the individual user liked the post.

- - - -## Implementation - -```dart -Widget likedUserCircleAvatar(LikedBy user) { - return Padding( - padding: const EdgeInsets.only(right: 10.0, bottom: 16.0), - child: Stack( - clipBehavior: Clip.none, - alignment: Alignment.center, - children: [ - const CircleAvatar( - backgroundColor: Color(0xfff2f2f2), - radius: 20, - ), - const Positioned( - top: 30, - right: 0, - bottom: 20, - left: 20, - child: Icon( - Icons.thumb_up, - color: Colors.blue, - size: 20, - ), - ), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md b/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md deleted file mode 100644 index 1f2f4b615..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_individual_post/views_after_auth_screens_feed_individual_post-library.md +++ /dev/null @@ -1,79 +0,0 @@ - - - - -# individual_post library - - - - - - - - - - - -## Classes - -##### [CommentTemplate](../views_after_auth_screens_feed_individual_post/CommentTemplate-class.md) - - - -CommentTemplate returns a widget of the individual user commented on the post. - - -##### [IndividualPageLikeSection](../views_after_auth_screens_feed_individual_post/IndividualPageLikeSection-class.md) - - - -IndividualPageLikeSection returns a widget that show the list of all the users liked the post. - - -##### [IndividualPostCommentSection](../views_after_auth_screens_feed_individual_post/IndividualPostCommentSection-class.md) - - - -IndividualPostCommentSection returns a widget that show the list of all the users commented on the post. - - -##### [IndividualPostView](../views_after_auth_screens_feed_individual_post/IndividualPostView-class.md) - - - -IndividualPostView returns a widget that has mutable state _IndividualPostViewState. - - - - - - - -## Functions - -##### [buildPadding](../views_after_auth_screens_feed_individual_post/buildPadding.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text) [Padding](https://api.flutter.dev/flutter/widgets/Padding-class.html) - - - - - - - - -##### [likedUserCircleAvatar](../views_after_auth_screens_feed_individual_post/likedUserCircleAvatar.md)([LikedBy](../models_post_post_model/LikedBy-class.md) user) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -likedUserCircleAvatar returns a widget of the individual user liked the post. - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md deleted file mode 100644 index 8c5de718c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# OrganizationFeed class - - - - - - - - - -

OrganizationFeed returns a widget that shows the feed of the organization.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- OrganizationFeed - - - - - - - - -## Constructors - -[OrganizationFeed](../views_after_auth_screens_feed_organization_feed/OrganizationFeed/OrganizationFeed.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) forTest = false}) - - _const_ - - -## Properties - -##### [forTest](../views_after_auth_screens_feed_organization_feed/OrganizationFeed/forTest.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [homeModel](../views_after_auth_screens_feed_organization_feed/OrganizationFeed/homeModel.md) → [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_feed_organization_feed/OrganizationFeed/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/OrganizationFeed.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/OrganizationFeed.md deleted file mode 100644 index 553285ef8..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/OrganizationFeed.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# OrganizationFeed constructor - - - - - - -const -OrganizationFeed({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) forTest = false}) - - - - - -## Implementation - -```dart -const OrganizationFeed({ - required Key key, - this.homeModel, - this.forTest = false, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/build.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/build.md deleted file mode 100644 index 271b6e9d5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/build.md +++ /dev/null @@ -1,130 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(isTest: forTest), - builder: (context, model, child) { - return Scaffold( - appBar: AppBar( - // AppBar returns a widget for the header of the page. - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - title: Text( - model.currentOrgName, - key: homeModel?.keySHOrgName, - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - leading: IconButton( - key: homeModel?.keySHMenuIcon, - icon: Icon( - Icons.menu, - color: Theme.of(context).iconTheme.color, - ), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - ), - // if the model is fetching the data then renders Circular Progress Indicator else renders the result. - body: model.isBusy - ? const CircularProgressIndicator() - : RefreshIndicator( - onRefresh: () async => model.fetchNewPosts(), - child: ListView( - shrinkWrap: true, - children: [ - // If the organization has pinned posts then renders PinnedPostCarousel widget else Container. - model.pinnedPosts.isNotEmpty - ? PinnedPostCarousel( - key: homeModel?.keySHPinnedPost, - pinnedPosts: model.pinnedPosts, - navigateToPinnedPostPage: - model.navigateToPinnedPostPage, - navigateToIndividualPostPage: - model.navigateToIndividualPage, - ) - : Container(), - // If the organization has posts then renders PostListWidget widget else Container. - model.posts.isNotEmpty - ? PostListWidget( - key: homeModel?.keySHPost, - posts: model.posts, - function: model.navigateToIndividualPage, - ) - : Container(), - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/forTest.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/forTest.md deleted file mode 100644 index 6505e3f01..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/forTest.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# forTest property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) forTest - -_final_ - - - - - - -## Implementation - -```dart -final bool forTest; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/homeModel.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/homeModel.md deleted file mode 100644 index d7359e061..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/OrganizationFeed/homeModel.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# homeModel property - - - - - - - -[MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel - -_final_ - - - - - - -## Implementation - -```dart -final MainScreenViewModel? homeModel; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md b/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md deleted file mode 100644 index b349ef21b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_organization_feed/views_after_auth_screens_feed_organization_feed-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# organization_feed library - - - - - - - - - - - -## Classes - -##### [OrganizationFeed](../views_after_auth_screens_feed_organization_feed/OrganizationFeed-class.md) - - - -OrganizationFeed returns a widget that shows the feed of the organization. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md b/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md deleted file mode 100644 index 03e0b0a90..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# PinnedPostPage class - - - - - - - - - -

PinnedPostPage returns a widget that shows the list of all the pinned post.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- PinnedPostPage - - - - - - - - -## Constructors - -[PinnedPostPage](../views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/PinnedPostPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> pinnedPosts}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [pinnedPosts](../views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/pinnedPosts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/PinnedPostPage.md b/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/PinnedPostPage.md deleted file mode 100644 index e0f59c0c6..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/PinnedPostPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# PinnedPostPage constructor - - - - - - -const -PinnedPostPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts}) - - - - - -## Implementation - -```dart -const PinnedPostPage({Key? key, required this.pinnedPosts}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/build.md b/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/build.md deleted file mode 100644 index 17efc1768..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/build.md +++ /dev/null @@ -1,87 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - iconTheme: Theme.of(context).iconTheme, - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - title: Text( - AppLocalizations.of(context)!.strictTranslate('Pinned Posts'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - ), - body: ListView( - children: [PostListWidget(posts: pinnedPosts)], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/pinnedPosts.md b/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/pinnedPosts.md deleted file mode 100644 index 4071846ea..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/PinnedPostPage/pinnedPosts.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pinnedPosts property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts - -_final_ - - - - - - -## Implementation - -```dart -final List pinnedPosts; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md b/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md deleted file mode 100644 index b53b74bc3..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_feed_pinned_post_page/views_after_auth_screens_feed_pinned_post_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# pinned_post_page library - - - - - - - - - - - -## Classes - -##### [PinnedPostPage](../views_after_auth_screens_feed_pinned_post_page/PinnedPostPage-class.md) - - - -PinnedPostPage returns a widget that shows the list of all the pinned post. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md deleted file mode 100644 index c490c40bc..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# SendAccessRequest class - - - - - - - - - -

requestAccess

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- SendAccessRequest - - - - - - - - -## Constructors - -[SendAccessRequest](../views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/SendAccessRequest.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [OrgInfo](../models_organization_org_info/OrgInfo-class.md) org}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [org](../views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/org.md) → [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/SendAccessRequest.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/SendAccessRequest.md deleted file mode 100644 index 40408e8de..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/SendAccessRequest.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# SendAccessRequest constructor - - - - - - -const -SendAccessRequest({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [OrgInfo](../../models_organization_org_info/OrgInfo-class.md) org}) - - - - - -## Implementation - -```dart -const SendAccessRequest({ - Key? key, - required this.org, - // required this.model -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/build.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/build.md deleted file mode 100644 index 64d8efdde..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/build.md +++ /dev/null @@ -1,152 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(org), - builder: (context, model, child) { - return SafeArea( - child: Scaffold( - appBar: AppBar( - backgroundColor: Colors.transparent, - ), - resizeToAvoidBottomInset: false, - body: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset('assets/images/Group 8948.png'), - Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "You need access", - style: AppTheme.title.copyWith(color: AppTheme.white), - ), - const SizedBox( - height: 5, - ), - const Text( - "Request access, or switch to an account with access", - ), - const SizedBox( - height: 20, - ), - Container( - child: TextField( - style: const TextStyle(color: AppTheme.blackPrimary), - minLines: 15, - maxLines: 20, - decoration: InputDecoration( - constraints: const BoxConstraints( - maxWidth: 400, - minWidth: 100, - ), - enabledBorder: UnderlineInputBorder( - borderRadius: BorderRadius.circular(20.0), - borderSide: const BorderSide( - width: 3, - color: Colors.white, - ), - ), - hintText: "Message (optional)", - hintStyle: const TextStyle( - color: AppTheme.blackSecondary, - ), - filled: true, - fillColor: AppTheme.white, - ), - ), - ), - ], - ), - ), - Center( - child: TextButton( - onPressed: () { - model.sendMembershipRequest(); - }, - style: - TextButton.styleFrom(backgroundColor: AppTheme.green), - child: const Text( - "Request Access", - style: TextStyle( - color: AppTheme.white, - ), - ), - ), - ) - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/org.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/org.md deleted file mode 100644 index 5aa35421b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest/org.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# org property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) org - -_final_ - - - - - - -## Implementation - -```dart -final OrgInfo org; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md deleted file mode 100644 index b615cea0e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_access_request_screen/views_after_auth_screens_join_org_after_auth_access_request_screen-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# access_request_screen library - - - - - - - - - - - -## Classes - -##### [SendAccessRequest](../views_after_auth_screens_join_org_after_auth_access_request_screen/SendAccessRequest-class.md) - - - -requestAccess - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md deleted file mode 100644 index dfd63ddc7..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# JoinOrganisationAfterAuth class - - - - - - - - - -

JoinOrganisationAfterAuth returns a widget for page to join the organization just after user authentication.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- JoinOrganisationAfterAuth - - - - - - - - -## Constructors - -[JoinOrganisationAfterAuth](../views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/JoinOrganisationAfterAuth.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [orgId](../views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/orgId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [scanQR](../views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/scanQR.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model) void - - - -scanQR returns a widget that is use in joining the organization via the QR code. - - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/JoinOrganisationAfterAuth.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/JoinOrganisationAfterAuth.md deleted file mode 100644 index 1b9db464b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/JoinOrganisationAfterAuth.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# JoinOrganisationAfterAuth constructor - - - - - - -const -JoinOrganisationAfterAuth({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId}) - - - - - -## Implementation - -```dart -const JoinOrganisationAfterAuth({Key? key, required this.orgId}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/build.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/build.md deleted file mode 100644 index b5cbaa0c5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/build.md +++ /dev/null @@ -1,123 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(orgId), - builder: (context, model, child) { - return Scaffold( - key: const Key('JoinOrgScreen'), - // header for the widget - appBar: AppBar( - centerTitle: true, - // title of the header. - title: Text( - AppLocalizations.of(context)! - .strictTranslate('Join Organisation'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - // action button for the option to join the organization using QR code. - actions: [ - IconButton( - icon: const Icon( - Icons.qr_code_scanner, - size: 30, - semanticLabel: 'Join Organisation with QR', - ), - onPressed: () => scanQR(context, model), - ), - ], - ), - body: Column( - children: [ - const Padding( - padding: EdgeInsets.symmetric(horizontal: 12.0), - child: Divider( - color: Colors.grey, - thickness: 2.0, - ), - ), - Expanded( - // if model searching is under process then renders OrganizationSearchList widget - // else renders OrganizationList widget. - child: model.searching - ? OrganizationSearchList(model: model) - : OrganizationList(model: model), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/orgId.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/orgId.md deleted file mode 100644 index 317117668..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/orgId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) orgId - -_final_ - - - - - - -## Implementation - -```dart -final String orgId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/scanQR.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/scanQR.md deleted file mode 100644 index f660938f2..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth/scanQR.md +++ /dev/null @@ -1,89 +0,0 @@ - - - -# scanQR method - - - - - - - - -void scanQR -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [SelectOrganizationViewModel](../../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model) - - - - - -

scanQR returns a widget that is use in joining the organization via the QR code.

- - - -## Implementation - -```dart -void scanQR(BuildContext context, SelectOrganizationViewModel model) { - showModalBottomSheet( - context: context, - barrierColor: Colors.transparent, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.width, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 250, - width: 250, - child: QRView( - key: model.qrKey, - onQRViewCreated: (controller) => - _onQRViewCreated(controller, model), - overlay: QrScannerOverlayShape( - overlayColor: Theme.of(context).colorScheme.secondary, - borderRadius: 10, - borderLength: 20, - borderWidth: 10, - cutOutSize: 250, - ), - /*overlayMargin: EdgeInsets.all(50)*/ - ), - ), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ), - const Text('Scan QR'), - SizedBox( - height: SizeConfig.safeBlockVertical! * 4, - ) - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md b/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md deleted file mode 100644 index d7987c80f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/views_after_auth_screens_join_org_after_auth_join_organisation_after_auth-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# join_organisation_after_auth library - - - - - - - - - - - -## Classes - -##### [JoinOrganisationAfterAuth](../views_after_auth_screens_join_org_after_auth_join_organisation_after_auth/JoinOrganisationAfterAuth-class.md) - - - -JoinOrganisationAfterAuth returns a widget for page to join the organization just after user authentication. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md b/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md deleted file mode 100644 index 62aad1769..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# EditProfilePage class - - - - - - - - - -

EditProfilePage returns a widget that has mutable state _EditProfilePageState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- EditProfilePage - - - - - - - - -## Constructors - -[EditProfilePage](../views_after_auth_screens_profile_edit_profile_page/EditProfilePage/EditProfilePage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_profile_edit_profile_page/EditProfilePage/createState.md)() _EditProfilePageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/EditProfilePage.md b/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/EditProfilePage.md deleted file mode 100644 index 54f963a39..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/EditProfilePage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EditProfilePage constructor - - - - - - -const -EditProfilePage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const EditProfilePage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/createState.md b/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/createState.md deleted file mode 100644 index cb46e96d3..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/EditProfilePage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_EditProfilePageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_EditProfilePageState createState() => _EditProfilePageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md b/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md deleted file mode 100644 index 84dd71907..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_edit_profile_page/views_after_auth_screens_profile_edit_profile_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# edit_profile_page library - - - - - - - - - - - -## Classes - -##### [EditProfilePage](../views_after_auth_screens_profile_edit_profile_page/EditProfilePage-class.md) - - - -EditProfilePage returns a widget that has mutable state _EditProfilePageState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage-class.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage-class.md deleted file mode 100644 index 83715717f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# ProfilePage class - - - - - - - - - -

ProfilePage returns a widget that renders a page of user's profile.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ProfilePage - - - - - - - - -## Constructors - -[ProfilePage](../views_after_auth_screens_profile_profile_page/ProfilePage/ProfilePage.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [homeModel](../views_after_auth_screens_profile_profile_page/ProfilePage/homeModel.md) → [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md)? - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_profile_profile_page/ProfilePage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [donate](../views_after_auth_screens_profile_profile_page/ProfilePage/donate.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [ProfilePageViewModel](../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md) model) void - - - - - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/ProfilePage.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/ProfilePage.md deleted file mode 100644 index 200752360..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/ProfilePage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# ProfilePage constructor - - - - - - -const -ProfilePage({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel}) - - - - - -## Implementation - -```dart -const ProfilePage({ - required Key key, - this.homeModel, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/build.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/build.md deleted file mode 100644 index b4a084ed5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/build.md +++ /dev/null @@ -1,322 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return Scaffold( - key: model.scaffoldKey, - appBar: AppBar( - backgroundColor: Theme.of(context).primaryColor, - elevation: 0.0, - centerTitle: true, - leading: IconButton( - color: Theme.of(context).iconTheme.color, - icon: const Icon(Icons.menu), - onPressed: () => - MainScreenViewModel.scaffoldKey.currentState!.openDrawer(), - ), - key: const Key("ProfilePageAppBar"), - title: Text( - AppLocalizations.of(context)!.strictTranslate('Profile'), - style: Theme.of(context).textTheme.titleLarge!.copyWith( - fontWeight: FontWeight.w600, - fontSize: 20, - ), - ), - ), - // if data fetching is under process then renders Circular Progress Icon - // else renders the widget. - body: model.isBusy - ? const CircularProgressIndicator() - : SingleChildScrollView( - child: Column( - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - CustomListTile( - key: const Key('OptionEditProfile'), - index: 0, - type: TileType.option, - option: Options( - // Avatar - icon: CustomAvatar( - isImageNull: model.currentUser.image == null, - firstAlphabet: - model.currentUser.firstName!.substring(0, 1), - imageUrl: model.currentUser.image, - fontSize: Theme.of(context) - .textTheme - .titleLarge! - .fontSize, - ), - // display first and last name. - title: - '${model.currentUser.firstName!} ${model.currentUser.lastName!}', - // display email address - subtitle: model.currentUser.email!, - // button to edit the profile which redirects to edit profile page. - trailingIconButton: IconButton( - icon: Icon( - Icons.drive_file_rename_outline, - color: Theme.of(context).colorScheme.secondary, - ), - onPressed: () { - navigationService.pushScreen("/editProfilePage"); - }, - ), - ), - onTapOption: () {}, - ), - const Divider( - thickness: 1, // thickness of the line - indent: - 20, // empty space to the leading edge of divider. - endIndent: - 20, // empty space to the trailing edge of the divider. - color: Colors - .black26, // The color to use when painting the line. - height: 20, // - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.67, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: SizeConfig.screenHeight! * 0.01, - ), - CustomListTile( - key: homeModel!.keySPAppSetting, - index: 0, - type: TileType.option, - option: Options( - icon: Icon( - Icons.phonelink_setup, - color: - Theme.of(context).colorScheme.secondary, - size: 30, - ), - // title for App Settings. - title: AppLocalizations.of(context)! - .strictTranslate('App Settings'), - // display language of the app. - subtitle: - '${AppLocalizations.of(context)!.strictTranslate("Language")}, ${AppLocalizations.of(context)!.strictTranslate("dark mode")}, ${AppLocalizations.of(context)!.strictTranslate("font size")}', - ), - // button for the app setting which redirects to app setting page. - onTapOption: () { - navigationService - .pushScreen("/appSettingsPage"); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - CustomListTile( - key: const Key('TasksByUser'), - index: 1, - type: TileType.option, - option: Options( - icon: Icon( - Icons.task_outlined, - color: - Theme.of(context).colorScheme.secondary, - size: 30, - ), - // title for My Tasks tile - title: AppLocalizations.of(context)! - .strictTranslate('My Tasks'), - // display subtitle - subtitle: AppLocalizations.of(context)! - .strictTranslate( - "View and edit all tasks created by you", - ), - ), - // on tag redirects to the user Tasks page. - onTapOption: () { - navigationService.pushScreen(Routes.userTasks); - }, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - // // Will be added later when we add the Help Section in Documentation. - // CustomListTile( - // key: homeModel!.keySPHelp, - // index: 1, - // type: TileType.option, - // option: Options( - // icon: const Icon( - // Icons.help_outline, - // size: 30, - // ), - // title: AppLocalizations.of(context)! - // .strictTranslate('Help'), - // subtitle: AppLocalizations.of(context)! - // .strictTranslate( - // 'Reach out to us for help', - // ), - // ), - // onTapOption: () {}, - // ), - /// `Donation` acts as plugin. If visible is true the it will be always visible. - /// even if it's uninstalled by the admin (for development purposes) - TalawaPluginProvider( - pluginName: "Donation", - visible: true, - child: Column( - children: [ - CustomListTile( - key: homeModel!.keySPDonateUs, - index: 2, - type: TileType.option, - option: Options( - icon: Icon( - Icons.monetization_on, - color: Theme.of(context) - .colorScheme - .secondary, - size: 30, - ), - title: AppLocalizations.of(context)! - .strictTranslate('Donate Us'), - subtitle: AppLocalizations.of(context)! - .strictTranslate( - 'Help us to develop for you', - ), - ), - onTapOption: () => donate(context, model), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - ], - ), - ), - // custom tile for Invitation. - CustomListTile( - key: homeModel!.keySPInvite, - index: 3, - type: TileType.option, - option: Options( - icon: Icon( - Icons.share, - color: - Theme.of(context).colorScheme.secondary, - size: 30, - ), - // title - title: AppLocalizations.of(context)! - .strictTranslate('Invite'), - // subtitle - subtitle: AppLocalizations.of(context)! - .strictTranslate('Invite to org'), - ), - // on tap call the invite function - onTapOption: () => model.invite(context), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - // Custom tile for Logout option. - CustomListTile( - key: homeModel!.keySPLogout, - index: 3, - type: TileType.option, - option: Options( - icon: Icon( - Icons.logout, - color: - Theme.of(context).colorScheme.secondary, - size: 30, - ), - title: AppLocalizations.of(context)! - .strictTranslate('Log out'), - subtitle: AppLocalizations.of(context)! - .strictTranslate('Log out from Talawa'), - ), - // on tap calls the logout function - onTapOption: () => model.logout(context), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.05, - ), - FromPalisadoes(key: homeModel!.keySPPalisadoes), - ], - ), - ) - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/donate.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/donate.md deleted file mode 100644 index 32bb9a58e..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/donate.md +++ /dev/null @@ -1,302 +0,0 @@ - - - -# donate method - - - - - - - - -void donate -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [ProfilePageViewModel](../../view_model_after_auth_view_models_profile_view_models_profile_page_view_model/ProfilePageViewModel-class.md) model) - - - - - - - - -## Implementation - -```dart -void donate(BuildContext context, ProfilePageViewModel model) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - builder: (BuildContext context) { - return StatefulBuilder( - builder: (context, setState) { - model.attachListener(setState); - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: SizedBox( - height: model.bottomSheetHeight, - child: Scaffold( - // background color set to Primary - backgroundColor: - Theme.of(context).colorScheme.primaryContainer, - // header - appBar: AppBar( - centerTitle: true, - automaticallyImplyLeading: false, - backgroundColor: Colors.transparent, - elevation: 0.0, - toolbarHeight: SizeConfig.screenHeight! * 0.15, - title: Padding( - padding: const EdgeInsets.only(top: 8.0), - // display title - child: Text( - 'Donating to \n${model.currentOrg.name}', - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(fontSize: 24), - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - ), - ), - actions: [ - Padding( - padding: EdgeInsets.only( - right: 8.0, - top: SizeConfig.screenHeight! * 0.01, - ), - child: IconButton( - icon: Icon( - Icons.cancel, - color: Theme.of(context).colorScheme.primary, - ), - onPressed: model.popBottomSheet, - ), - ) - ], - ), - body: SingleChildScrollView( - // SingleChildScrollView is a box in which a single widget can be scrolled. - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Text( - 'Please Select and amount', - style: Theme.of(context).textTheme.headlineSmall, - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // looping through and renders button for donation amounts. - children: List.generate( - 3, - (index) => model.dominationButton( - model.denomination[index], - context, - setState, - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - Text( - 'Or', - style: Theme.of(context).textTheme.headlineSmall, - ), - Text( - 'Input custom amount', - style: Theme.of(context).textTheme.headlineSmall, - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - // containers for custom amount - Container( - padding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.05, - ), - child: TextField( - controller: model.donationAmount, - focusNode: model.donationField, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.number, - autofillHints: const [AutofillHints.email], - enableSuggestions: true, - style: Theme.of(context).textTheme.titleLarge, - onChanged: (text) { - setState(() {}); - }, - decoration: InputDecoration( - hintText: AppLocalizations.of(context)! - .translate("Enter donation amount"), - labelText: AppLocalizations.of(context)! - .translate("Enter custom donation amount"), - labelStyle: - Theme.of(context).textTheme.titleMedium, - prefixIcon: GestureDetector( - onTap: () { - model.changeCurrency(context, setState); - }, - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 15.0, - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - model.donationCurrency, - textAlign: TextAlign.center, - style: Theme.of(context) - .textTheme - .headlineSmall, - ), - const Icon( - Icons.arrow_drop_down_circle_outlined, - ) - ], - ), - ), - ), - enabledBorder: OutlineInputBorder( - borderRadius: const BorderRadius.all( - Radius.circular(12.0), - ), - borderSide: BorderSide( - color: - Theme.of(context).colorScheme.secondary, - width: 2, - ), - ), - focusedBorder: OutlineInputBorder( - borderRadius: const BorderRadius.all( - Radius.circular(10.0), - ), - borderSide: BorderSide( - color: - Theme.of(context).colorScheme.secondary, - ), - ), - ), - ), - ), - SizedBox( - height: SizeConfig.screenWidth! * 0.05, - ), - ElevatedButton( - onPressed: () async { - ///required fields for donation transaction - late final String userId; - late final String orgId; - late final String nameOfOrg; - late final String nameOfUser; - late final String payPalId; - late final double amount; - orgId = model.currentOrg.id!; - userId = model.currentUser.id!; - nameOfUser = - "${model.currentUser.firstName!} ${model.currentUser.lastName!}"; - nameOfOrg = model.currentOrg.name!; - - amount = double.parse(model.donationAmount.text); - final request = BraintreeDropInRequest( - tokenizationKey: - '', - collectDeviceData: true, - paypalRequest: BraintreePayPalRequest( - amount: model.donationAmount.text, - displayName: "Talawa", - ), - cardEnabled: true, - ); - - final BraintreeDropInResult? result = - await BraintreeDropIn.start(request); - if (result != null) { - ///saving the donation in server - late final GraphQLClient client = - graphqlConfig.clientToQuery(); - - ///getting transaction id from `brainTree` API - payPalId = result.paymentMethodNonce.nonce; - - final QueryResult donationResult = - await client.mutate( - MutationOptions( - document: gql( - queries.createDonation( - userId, - orgId, - nameOfOrg, - nameOfUser, - payPalId, - amount, - ), - ), - ), - ); - if (donationResult.hasException) { - model.showSnackBar( - "Error occurred while making a donation", - ); - } - - /// hiding the donation UI once it is successful - model.popBottomSheet(); - model.showSnackBar( - 'Donation Successful,Thanks for the support !', - ); - } - }, - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - // if the donation amount entered or selected is empty then renders grey color - // else render primary color - model.donationAmount.text.isEmpty - ? Colors.grey - : Theme.of(context).colorScheme.primary, - ), - ), - child: Text( - 'DONATE', - style: Theme.of(context).textTheme.labelLarge, - ), - ) - ], - ), - ), - ), - ), - ); - }, - ); - }, - ).then((value) => model.updateSheetHeight()); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/homeModel.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/homeModel.md deleted file mode 100644 index d7359e061..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/ProfilePage/homeModel.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# homeModel property - - - - - - - -[MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md)? homeModel - -_final_ - - - - - - -## Implementation - -```dart -final MainScreenViewModel? homeModel; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md b/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md deleted file mode 100644 index 7d8218ef7..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_profile_profile_page/views_after_auth_screens_profile_profile_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# profile_page library - - - - - - - - - - - -## Classes - -##### [ProfilePage](../views_after_auth_screens_profile_profile_page/ProfilePage-class.md) - - - -ProfilePage returns a widget that renders a page of user's profile. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md b/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md deleted file mode 100644 index c14032295..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# CreateTaskPage class - - - - - - - - - -

CreateTaskPage returns a widget for page to create task for the user.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CreateTaskPage - - - - - - - - -## Constructors - -[CreateTaskPage](../views_after_auth_screens_tasks_create_task_page/CreateTaskPage/CreateTaskPage.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [eventId](../views_after_auth_screens_tasks_create_task_page/CreateTaskPage/eventId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_tasks_create_task_page/CreateTaskPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/CreateTaskPage.md b/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/CreateTaskPage.md deleted file mode 100644 index 67c1b703b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/CreateTaskPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# CreateTaskPage constructor - - - - - - -const -CreateTaskPage({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const CreateTaskPage({required this.eventId, Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/build.md b/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/build.md deleted file mode 100644 index b173c4741..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/build.md +++ /dev/null @@ -1,80 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - builder: (context, model, _) { - // renders custom widget TaskForm, you can explore TaskForm widget [here](/widgets/task_form.dart). - return TaskForm( - onSave: () => model.createTask(eventId), - title: 'Create Task', - actionText: 'Add', - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/eventId.md b/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/eventId.md deleted file mode 100644 index 4ca1b3890..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/CreateTaskPage/eventId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId - -_final_ - - - - - - -## Implementation - -```dart -final String eventId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md b/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md deleted file mode 100644 index e30821a17..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_create_task_page/views_after_auth_screens_tasks_create_task_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# create_task_page library - - - - - - - - - - - -## Classes - -##### [CreateTaskPage](../views_after_auth_screens_tasks_create_task_page/CreateTaskPage-class.md) - - - -CreateTaskPage returns a widget for page to create task for the user. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md b/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md deleted file mode 100644 index 8a8ff4c7f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# EditTaskPage class - - - - - - - - - -

EditTaskPage returns a widget for page to edit the task for the user.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EditTaskPage - - - - - - - - -## Constructors - -[EditTaskPage](../views_after_auth_screens_tasks_edit_task_page/EditTaskPage/EditTaskPage.md) ({required [Task](../models_task_task_model/Task-class.md) task, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [task](../views_after_auth_screens_tasks_edit_task_page/EditTaskPage/task.md) → [Task](../models_task_task_model/Task-class.md) - - - - -_final_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_tasks_edit_task_page/EditTaskPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/EditTaskPage.md b/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/EditTaskPage.md deleted file mode 100644 index 204de2133..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/EditTaskPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EditTaskPage constructor - - - - - - -const -EditTaskPage({required [Task](../../models_task_task_model/Task-class.md) task, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const EditTaskPage({required this.task, Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/build.md b/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/build.md deleted file mode 100644 index 35493bb5b..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/build.md +++ /dev/null @@ -1,81 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.fillTask(task), - builder: (context, model, _) { - // renders custom widget TaskForm, you can explore TaskForm widget [here](/widgets/task_form.dart). - return TaskForm( - onSave: () => model.editTask(task.id), - title: 'Edit Task', - actionText: 'Update', - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/task.md b/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/task.md deleted file mode 100644 index 3cf99076f..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/EditTaskPage/task.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# task property - - - - - - - -[Task](../../models_task_task_model/Task-class.md) task - -_final_ - - - - - - -## Implementation - -```dart -final Task task; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md b/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md deleted file mode 100644 index 58b4e96c1..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_edit_task_page/views_after_auth_screens_tasks_edit_task_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# edit_task_page library - - - - - - - - - - - -## Classes - -##### [EditTaskPage](../views_after_auth_screens_tasks_edit_task_page/EditTaskPage-class.md) - - - -EditTaskPage returns a widget for page to edit the task for the user. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md b/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md deleted file mode 100644 index 25f2d41a0..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# EventTasksPage class - - - - - - - - - -

EventTasksPage return a widget for Event Task Page that is created by event creator.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EventTasksPage - - - - - - - - -## Constructors - -[EventTasksPage](../views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/EventTasksPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) - - _const_ - - -## Properties - -##### [eventId](../views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/eventId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/EventTasksPage.md b/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/EventTasksPage.md deleted file mode 100644 index fcfe45d50..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/EventTasksPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventTasksPage constructor - - - - - - -const -EventTasksPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId}) - - - - - -## Implementation - -```dart -const EventTasksPage({Key? key, required this.eventId}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/build.md b/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/build.md deleted file mode 100644 index a5fc7f839..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/build.md +++ /dev/null @@ -1,95 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.fetchTasks(eventId), - builder: (_, model, __) { - final tasks = model.tasks; - return RefreshIndicator( - onRefresh: () => model.fetchTasks(eventId), - child: Scaffold( - appBar: AppBar( - title: const Text('Event Tasks'), - ), - // TaskSchedule is custom widget. - body: TaskSchedule(tasks: tasks), - floatingActionButton: FloatingActionButton( - onPressed: () async { - await navigationService.pushScreen( - Routes.addTask, - arguments: eventId, - ); - }, - child: const Icon(Icons.add), - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/eventId.md b/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/eventId.md deleted file mode 100644 index 4ca1b3890..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/EventTasksPage/eventId.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) eventId - -_final_ - - - - - - -## Implementation - -```dart -final String eventId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md b/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md deleted file mode 100644 index 47d26bcc2..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_event_tasks_page/views_after_auth_screens_tasks_event_tasks_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_tasks_page library - - - - - - - - - - - -## Classes - -##### [EventTasksPage](../views_after_auth_screens_tasks_event_tasks_page/EventTasksPage-class.md) - - - -EventTasksPage return a widget for Event Task Page that is created by event creator. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md b/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md deleted file mode 100644 index ca207fe6d..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# UserTasksPage class - - - - - - - - - -

UserTasksPage returns a widget for page of User Tasks.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- UserTasksPage - - - - - - - - -## Constructors - -[UserTasksPage](../views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/UserTasksPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/UserTasksPage.md b/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/UserTasksPage.md deleted file mode 100644 index 2263a899c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/UserTasksPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# UserTasksPage constructor - - - - - - -const -UserTasksPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const UserTasksPage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/build.md b/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/build.md deleted file mode 100644 index 2a4d3e2cc..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/UserTasksPage/build.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.fetchTasksByUser(), - builder: (_, model, __) { - final tasks = model.tasks; - return RefreshIndicator( - onRefresh: () => model.fetchTasksByUser(), - child: Scaffold( - appBar: AppBar( - title: const Text('User Tasks'), - ), - // TaskSchedule is custom widget. - body: TaskSchedule(tasks: tasks, showMoreOptions: true), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md b/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md deleted file mode 100644 index 8e4e1e055..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_tasks_user_tasks_page/views_after_auth_screens_tasks_user_tasks_page-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# user_tasks_page library - - - - - - - - - - - -## Classes - -##### [UserTasksPage](../views_after_auth_screens_tasks_user_tasks_page/UserTasksPage-class.md) - - - -UserTasksPage returns a widget for page of User Tasks. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen-class.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen-class.md deleted file mode 100644 index c5eaefb15..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen-class.md +++ /dev/null @@ -1,216 +0,0 @@ - - - -# MapScreen class - - - - - - - - - -

MapScreen returns a widget that has mutable state _MapScreenState.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- MapScreen - - - - - - - - -## Constructors - -[MapScreen](../views_after_auth_screens_venue_map_screen/MapScreen/MapScreen.md) ([CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md)? model, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) latitude, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) longitude, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [latitude](../views_after_auth_screens_venue_map_screen/MapScreen/latitude.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html) - - - - -_final_ - - - -##### [longitude](../views_after_auth_screens_venue_map_screen/MapScreen/longitude.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html) - - - - -_final_ - - - -##### [model](../views_after_auth_screens_venue_map_screen/MapScreen/model.md) → [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md)? - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_after_auth_screens_venue_map_screen/MapScreen/createState.md)() _MapScreenState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/MapScreen.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/MapScreen.md deleted file mode 100644 index c16e8d0be..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/MapScreen.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# MapScreen constructor - - - - - - -const -MapScreen([CreateEventViewModel](../../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md)? model, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) latitude, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) longitude, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const MapScreen(this.model, this.latitude, this.longitude, {Key? key}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/createState.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/createState.md deleted file mode 100644 index 713d88f2a..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_MapScreenState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_MapScreenState createState() => _MapScreenState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/latitude.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/latitude.md deleted file mode 100644 index 6af59a4a5..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/latitude.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# latitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html) latitude - -_final_ - - - - - - -## Implementation - -```dart -final double latitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/longitude.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/longitude.md deleted file mode 100644 index 7879ff570..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/longitude.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# longitude property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html) longitude - -_final_ - - - - - - -## Implementation - -```dart -final double longitude; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/model.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/model.md deleted file mode 100644 index 697bf3c0c..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/MapScreen/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[CreateEventViewModel](../../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md)? model - -_final_ - - - - - - -## Implementation - -```dart -final CreateEventViewModel? model; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md b/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md deleted file mode 100644 index 6fc918ae7..000000000 --- a/talawa-mobile-docs/views_after_auth_screens_venue_map_screen/views_after_auth_screens_venue_map_screen-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# map_screen library - - - - - - - - - - - -## Classes - -##### [MapScreen](../views_after_auth_screens_venue_map_screen/MapScreen-class.md) - - - -MapScreen returns a widget that has mutable state _MapScreenState. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/BaseView-class.md b/talawa-mobile-docs/views_base_view/BaseView-class.md deleted file mode 100644 index 8946f6bb4..000000000 --- a/talawa-mobile-docs/views_base_view/BaseView-class.md +++ /dev/null @@ -1,206 +0,0 @@ - - - -# BaseView<T extends ChangeNotifier> class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- BaseView - - - - - - - - -## Constructors - -[BaseView](../views_base_view/BaseView/BaseView.md) ({required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) builder([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html), T, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)?), dynamic onModelReady(T)?}) - - _const_ - - -## Properties - -##### [builder](../views_base_view/BaseView/builder.md) → [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) Function([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html), T, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)?) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [onModelReady](../views_base_view/BaseView/onModelReady.md) → (dynamic Function(T)?) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_base_view/BaseView/createState.md)() _BaseViewState<T> - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/BaseView/BaseView.md b/talawa-mobile-docs/views_base_view/BaseView/BaseView.md deleted file mode 100644 index b2b14d9c9..000000000 --- a/talawa-mobile-docs/views_base_view/BaseView/BaseView.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# BaseView<T extends ChangeNotifier> constructor - - - - - - -const -BaseView<T extends ChangeNotifier>({required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) builder([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html), T, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)?), dynamic onModelReady(T)?}) - - - - - -## Implementation - -```dart -const BaseView({ - required this.builder, - this.onModelReady, -}); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/BaseView/builder.md b/talawa-mobile-docs/views_base_view/BaseView/builder.md deleted file mode 100644 index e30644f09..000000000 --- a/talawa-mobile-docs/views_base_view/BaseView/builder.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# builder property - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) Function([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html), T, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)?) builder - -_final_ - - - - - - -## Implementation - -```dart -final Widget Function(BuildContext, T, Widget?) builder; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/BaseView/createState.md b/talawa-mobile-docs/views_base_view/BaseView/createState.md deleted file mode 100644 index e14ec4540..000000000 --- a/talawa-mobile-docs/views_base_view/BaseView/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_BaseViewState<T> createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_BaseViewState createState() => _BaseViewState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/BaseView/onModelReady.md b/talawa-mobile-docs/views_base_view/BaseView/onModelReady.md deleted file mode 100644 index 2ac8d9e41..000000000 --- a/talawa-mobile-docs/views_base_view/BaseView/onModelReady.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onModelReady property - - - - - - - -(dynamic Function(T)?) onModelReady - -_final_ - - - - - - -## Implementation - -```dart -final Function(T)? onModelReady; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_base_view/views_base_view-library.md b/talawa-mobile-docs/views_base_view/views_base_view-library.md deleted file mode 100644 index c235dde85..000000000 --- a/talawa-mobile-docs/views_base_view/views_base_view-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# base_view library - - - - - - - - - - - -## Classes - -##### [BaseView](../views_base_view/BaseView-class.md)<T extends [ChangeNotifier](https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html)> - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_main_screen/MainScreen-class.md b/talawa-mobile-docs/views_main_screen/MainScreen-class.md deleted file mode 100644 index 27015e107..000000000 --- a/talawa-mobile-docs/views_main_screen/MainScreen-class.md +++ /dev/null @@ -1,197 +0,0 @@ - - - -# MainScreen class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- MainScreen - - - - - - - - -## Constructors - -[MainScreen](../views_main_screen/MainScreen/MainScreen.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MainScreenArgs](../models_mainscreen_navigation_args/MainScreenArgs-class.md) mainScreenArgs}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [mainScreenArgs](../views_main_screen/MainScreen/mainScreenArgs.md) → [MainScreenArgs](../models_mainscreen_navigation_args/MainScreenArgs-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_main_screen/MainScreen/createState.md)() [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[MainScreen](../views_main_screen/MainScreen-class.md)> - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_main_screen/MainScreen/MainScreen.md b/talawa-mobile-docs/views_main_screen/MainScreen/MainScreen.md deleted file mode 100644 index bdcd9e82e..000000000 --- a/talawa-mobile-docs/views_main_screen/MainScreen/MainScreen.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# MainScreen constructor - - - - - - -const -MainScreen({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MainScreenArgs](../../models_mainscreen_navigation_args/MainScreenArgs-class.md) mainScreenArgs}) - - - - - -## Implementation - -```dart -const MainScreen({Key? key, required this.mainScreenArgs}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_main_screen/MainScreen/createState.md b/talawa-mobile-docs/views_main_screen/MainScreen/createState.md deleted file mode 100644 index 6553b2090..000000000 --- a/talawa-mobile-docs/views_main_screen/MainScreen/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[MainScreen](../../views_main_screen/MainScreen-class.md)> createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -State createState() => _MainScreenState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_main_screen/MainScreen/mainScreenArgs.md b/talawa-mobile-docs/views_main_screen/MainScreen/mainScreenArgs.md deleted file mode 100644 index 5ca52b985..000000000 --- a/talawa-mobile-docs/views_main_screen/MainScreen/mainScreenArgs.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# mainScreenArgs property - - - - - - - -[MainScreenArgs](../../models_mainscreen_navigation_args/MainScreenArgs-class.md) mainScreenArgs - -_final_ - - - - - - -## Implementation - -```dart -final MainScreenArgs mainScreenArgs; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_main_screen/views_main_screen-library.md b/talawa-mobile-docs/views_main_screen/views_main_screen-library.md deleted file mode 100644 index f880632ed..000000000 --- a/talawa-mobile-docs/views_main_screen/views_main_screen-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# main_screen library - - - - - - - - - - - -## Classes - -##### [MainScreen](../views_main_screen/MainScreen-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass-class.md b/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass-class.md deleted file mode 100644 index 731c511f0..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass-class.md +++ /dev/null @@ -1,192 +0,0 @@ - - - -# ChangePass class - - - - - - - - - -

This widget lets the user change his/her password. -There are two input fields. The first one is for entering the new password, and the -second one is for re-entering the password for verification. -There is a raised button which finally updates the password when pressed.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- ChangePass - - - - - - - - -## Constructors - -[ChangePass](../views_pre_auth_screens_change_password/ChangePass/ChangePass.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_change_password/ChangePass/createState.md)() _ChangePassState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/ChangePass.md b/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/ChangePass.md deleted file mode 100644 index 1cd9383e7..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/ChangePass.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ChangePass constructor - - - - - - -const -ChangePass({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const ChangePass({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/createState.md b/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/createState.md deleted file mode 100644 index 895a6ff7f..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_change_password/ChangePass/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_ChangePassState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_ChangePassState createState() => _ChangePassState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md b/talawa-mobile-docs/views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md deleted file mode 100644 index 23eb04bfc..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_change_password/views_pre_auth_screens_change_password-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# change_password library - - - - - - - - - - - -## Classes - -##### [ChangePass](../views_pre_auth_screens_change_password/ChangePass-class.md) - - - -This widget lets the user change his/her password. -There are two input fields. The first one is for entering the new password, and the -second one is for re-entering the password for verification. -There is a raised button which finally updates the password when pressed. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_login/Login-class.md b/talawa-mobile-docs/views_pre_auth_screens_login/Login-class.md deleted file mode 100644 index 70fae78e2..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_login/Login-class.md +++ /dev/null @@ -1,194 +0,0 @@ - - - -# Login class - - - - - - - - - -

This is the login widget. -There are two input fiels. The first one takes in the email and -the second one takes in the password of the user. -There is also a "Forgot Password" text button, which directs to -the "recover password" screen when pressed. -At the bottom, there is a login button to initiate the login.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- Login - - - - - - - - -## Constructors - -[Login](../views_pre_auth_screens_login/Login/Login.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_login/Login/createState.md)() _LoginState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_login/Login/Login.md b/talawa-mobile-docs/views_pre_auth_screens_login/Login/Login.md deleted file mode 100644 index 286bc4a1e..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_login/Login/Login.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# Login constructor - - - - - - -const -Login({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const Login({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_login/Login/createState.md b/talawa-mobile-docs/views_pre_auth_screens_login/Login/createState.md deleted file mode 100644 index 15962de2e..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_login/Login/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_LoginState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_LoginState createState() => _LoginState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_login/views_pre_auth_screens_login-library.md b/talawa-mobile-docs/views_pre_auth_screens_login/views_pre_auth_screens_login-library.md deleted file mode 100644 index ce705ea1d..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_login/views_pre_auth_screens_login-library.md +++ /dev/null @@ -1,43 +0,0 @@ - - - - -# login library - - - - - - - - - - - -## Classes - -##### [Login](../views_pre_auth_screens_login/Login-class.md) - - - -This is the login widget. -There are two input fiels. The first one takes in the email and -the second one takes in the password of the user. -There is also a "Forgot Password" text button, which directs to -the "recover password" screen when pressed. -At the bottom, there is a login button to initiate the login. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover-class.md b/talawa-mobile-docs/views_pre_auth_screens_recover/Recover-class.md deleted file mode 100644 index 729d6af96..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# Recover class - - - - - - - - - -

This class recovers the users password. -The users needs to enter his/her email and press on the button at the bottom to recover his/her password.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- Recover - - - - - - - - -## Constructors - -[Recover](../views_pre_auth_screens_recover/Recover/Recover.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_recover/Recover/createState.md)() _RecoverState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/Recover.md b/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/Recover.md deleted file mode 100644 index 62e8bdcc4..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/Recover.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# Recover constructor - - - - - - -const -Recover({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const Recover({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/createState.md b/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/createState.md deleted file mode 100644 index 2ba2ecaf8..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_recover/Recover/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_RecoverState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_RecoverState createState() => _RecoverState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md b/talawa-mobile-docs/views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md deleted file mode 100644 index 4847fa5eb..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_recover/views_pre_auth_screens_recover-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# recover library - - - - - - - - - - - -## Classes - -##### [Recover](../views_pre_auth_screens_recover/Recover-class.md) - - - -This class recovers the users password. -The users needs to enter his/her email and press on the button at the bottom to recover his/her password. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage-class.md b/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage-class.md deleted file mode 100644 index ebdca5873..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage-class.md +++ /dev/null @@ -1,192 +0,0 @@ - - - -# SelectLanguage class - - - - - - - - - -

This widget enables us to select a different language. -The default language is English. We can choose among the options to switch the language. -There is a text button at the right bottom of the screen which changes the language when tapped. -The user finally gets redirected to the previous screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SelectLanguage - - - - - - - - -## Constructors - -[SelectLanguage](../views_pre_auth_screens_select_language/SelectLanguage/SelectLanguage.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_select_language/SelectLanguage/createState.md)() _SelectLanguageState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/SelectLanguage.md b/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/SelectLanguage.md deleted file mode 100644 index e41052761..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/SelectLanguage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# SelectLanguage constructor - - - - - - -const -SelectLanguage({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const SelectLanguage({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/createState.md b/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/createState.md deleted file mode 100644 index 2428e069e..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_language/SelectLanguage/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SelectLanguageState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SelectLanguageState createState() => _SelectLanguageState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md b/talawa-mobile-docs/views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md deleted file mode 100644 index d177a30d0..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_language/views_pre_auth_screens_select_language-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# select_language library - - - - - - - - - - - -## Classes - -##### [SelectLanguage](../views_pre_auth_screens_select_language/SelectLanguage-class.md) - - - -This widget enables us to select a different language. -The default language is English. We can choose among the options to switch the language. -There is a text button at the right bottom of the screen which changes the language when tapped. -The user finally gets redirected to the previous screen. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization-class.md b/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization-class.md deleted file mode 100644 index 971cf7ddf..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization-class.md +++ /dev/null @@ -1,200 +0,0 @@ - - - -# SelectOrganization class - - - - - - - - - -

This widget lets the user select new organizations.

-

There is a list tile which displays the organization selected by the user. -He/she needs to press the "continue" button to proceed.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SelectOrganization - - - - - - - - -## Constructors - -[SelectOrganization](../views_pre_auth_screens_select_organization/SelectOrganization/SelectOrganization.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) selectedOrgId}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedOrgId](../views_pre_auth_screens_select_organization/SelectOrganization/selectedOrgId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Contains Integer value for selected org id. -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_select_organization/SelectOrganization/createState.md)() _SelectOrganizationState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/SelectOrganization.md b/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/SelectOrganization.md deleted file mode 100644 index e50889bab..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/SelectOrganization.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# SelectOrganization constructor - - - - - - -const -SelectOrganization({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) selectedOrgId}) - - - - - -## Implementation - -```dart -const SelectOrganization({required Key key, required this.selectedOrgId}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/createState.md b/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/createState.md deleted file mode 100644 index f79eaff9e..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SelectOrganizationState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SelectOrganizationState createState() => _SelectOrganizationState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/selectedOrgId.md b/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/selectedOrgId.md deleted file mode 100644 index c195ff636..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_organization/SelectOrganization/selectedOrgId.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# selectedOrgId property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) selectedOrgId - -_final_ - - - -

Contains Integer value for selected org id.

- - - -## Implementation - -```dart -final String selectedOrgId; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md b/talawa-mobile-docs/views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md deleted file mode 100644 index af27a16c9..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_select_organization/views_pre_auth_screens_select_organization-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# select_organization library - - - - - - - - - - - -## Classes - -##### [SelectOrganization](../views_pre_auth_screens_select_organization/SelectOrganization-class.md) - - - -This widget lets the user select new organizations. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl-class.md b/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl-class.md deleted file mode 100644 index a79b2add3..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl-class.md +++ /dev/null @@ -1,203 +0,0 @@ - - - -# SetUrl class - - - - - - - - - -

This widget lets a user sign in/up with the organization url.

-

The user can enter an organization through the QR code scanner, -or enter the organization URL and then login. -There is also a signup option which navigates to a screen for the user -to select an organization. -At the bottom, there is also a gesture detector for changing the language.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SetUrl - - - - - - - - -## Constructors - -[SetUrl](../views_pre_auth_screens_set_url/SetUrl/SetUrl.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) uri}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [uri](../views_pre_auth_screens_set_url/SetUrl/uri.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Variable. -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_set_url/SetUrl/createState.md)() _SetUrlState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/SetUrl.md b/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/SetUrl.md deleted file mode 100644 index aac3a1fad..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/SetUrl.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# SetUrl constructor - - - - - - -const -SetUrl({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) uri}) - - - - - -## Implementation - -```dart -const SetUrl({required Key key, required this.uri}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/createState.md b/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/createState.md deleted file mode 100644 index 90d6901db..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SetUrlState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SetUrlState createState() => _SetUrlState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/uri.md b/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/uri.md deleted file mode 100644 index 4eb44bdd7..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_set_url/SetUrl/uri.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# uri property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) uri - -_final_ - - - -

Variable.

- - - -## Implementation - -```dart -final String uri; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md b/talawa-mobile-docs/views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md deleted file mode 100644 index 3947441b1..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_set_url/views_pre_auth_screens_set_url-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# set_url library - - - - - - - - - - - -## Classes - -##### [SetUrl](../views_pre_auth_screens_set_url/SetUrl-class.md) - - - -This widget lets a user sign in/up with the organization url. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails-class.md b/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails-class.md deleted file mode 100644 index dc5cf6e2a..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails-class.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# SignUpDetails class - - - - - - - - - -

This widget takes the user details for signup. The form includes first name, last name, email, password, and password confirmation inputs.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- SignUpDetails - - - - - - - - -## Constructors - -[SignUpDetails](../views_pre_auth_screens_signup_details/SignUpDetails/SignUpDetails.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [OrgInfo](../models_organization_org_info/OrgInfo-class.md) selectedOrg}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [selectedOrg](../views_pre_auth_screens_signup_details/SignUpDetails/selectedOrg.md) → [OrgInfo](../models_organization_org_info/OrgInfo-class.md) - - - - -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../views_pre_auth_screens_signup_details/SignUpDetails/createState.md)() _SignUpDetailsState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/SignUpDetails.md b/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/SignUpDetails.md deleted file mode 100644 index 730d0de63..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/SignUpDetails.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# SignUpDetails constructor - - - - - - -const -SignUpDetails({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [OrgInfo](../../models_organization_org_info/OrgInfo-class.md) selectedOrg}) - - - - - -## Implementation - -```dart -const SignUpDetails({required Key key, required this.selectedOrg}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/createState.md b/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/createState.md deleted file mode 100644 index d63614dd6..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_SignUpDetailsState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_SignUpDetailsState createState() => _SignUpDetailsState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/selectedOrg.md b/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/selectedOrg.md deleted file mode 100644 index 93ed4601a..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_signup_details/SignUpDetails/selectedOrg.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# selectedOrg property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md) selectedOrg - -_final_ - - - - - - -## Implementation - -```dart -final OrgInfo selectedOrg; -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md b/talawa-mobile-docs/views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md deleted file mode 100644 index 4198a4f70..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_signup_details/views_pre_auth_screens_signup_details-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# signup_details library - - - - - - - - - - - -## Classes - -##### [SignUpDetails](../views_pre_auth_screens_signup_details/SignUpDetails-class.md) - - - -This widget takes the user details for signup. The form includes first name, last name, email, password, and password confirmation inputs. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md b/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md deleted file mode 100644 index bb3e35ccf..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# WaitingPage class - - - - - - - - - -

This class returns a widget which shows the request sent by the user to join a private organization.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- WaitingPage - - - - - - - - -## Constructors - -[WaitingPage](../views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/WaitingPage.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/WaitingPage.md b/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/WaitingPage.md deleted file mode 100644 index e02f65209..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/WaitingPage.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# WaitingPage constructor - - - - - - -const -WaitingPage({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const WaitingPage({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/build.md b/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/build.md deleted file mode 100644 index 853022b40..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/WaitingPage/build.md +++ /dev/null @@ -1,179 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(context), - builder: (context, model, child) { - return Scaffold( - key: const Key('WaitingPageScaffold'), - extendBodyBehindAppBar: true, - appBar: AppBar( - elevation: 0.0, - backgroundColor: Colors.transparent, - automaticallyImplyLeading: false, - ), - body: Container( - padding: EdgeInsets.only(top: SizeConfig.safeBlockVertical! * 6), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SignupProgressIndicator( - key: const Key('Waiting'), - currentPageIndex: 2, - ), - Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.01, - SizeConfig.screenWidth! * 0.06, - SizeConfig.screenHeight! * 0.01, - ), - width: SizeConfig.screenWidth, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - //Greeting text - CustomRichText( - key: const Key('WaitingPageText'), - words: model.greeting, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.03, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Request Sent to'), - style: Theme.of(context).textTheme.titleLarge, - ), - ], - ), - ), - //Information of the organization to which the request is sent. - Expanded( - child: ListView.builder( - key: const Key('PendingRequestList'), - shrinkWrap: true, - padding: EdgeInsets.zero, - itemCount: model.pendingRequestOrg.length, - itemBuilder: (BuildContext context, int index) { - return CustomListTile( - key: const Key('WaitingJoin'), - index: index, - type: TileType.org, - orgInfo: model.pendingRequestOrg[index], - onTapOrgInfo: (item) {}, - ); - }, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - //Join organization button - RaisedRoundedButton( - key: const Key('JoinOrg'), - buttonLabel: AppLocalizations.of(context)! - .strictTranslate('Join Organisation'), - onTap: model.joinOrg, - showArrow: true, - textColor: Theme.of(context).colorScheme.secondaryContainer, - backgroundColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - //Logout button - RaisedRoundedButton( - key: const Key('Logout'), - buttonLabel: - AppLocalizations.of(context)!.strictTranslate('Log out'), - onTap: model.logout, - textColor: Theme.of(context) - .inputDecorationTheme - .focusedBorder! - .borderSide - .color, - backgroundColor: - Theme.of(context).colorScheme.secondaryContainer, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.0215, - ), - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md b/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md deleted file mode 100644 index baca98c97..000000000 --- a/talawa-mobile-docs/views_pre_auth_screens_waiting_to_join_private_org/views_pre_auth_screens_waiting_to_join_private_org-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# waiting_to_join_private_org library - - - - - - - - - - - -## Classes - -##### [WaitingPage](../views_pre_auth_screens_waiting_to_join_private_org/WaitingPage-class.md) - - - -This class returns a widget which shows the request sent by the user to join a private organization. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet-class.md b/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet-class.md deleted file mode 100644 index fd1368ae6..000000000 --- a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet-class.md +++ /dev/null @@ -1,101 +0,0 @@ - - - -# EventBottomSheet class - - - - - - - - - -

Adds members to an event.

- - - - -## Constructors - -[EventBottomSheet](../widgets_add_members_bottom_sheet/EventBottomSheet/EventBottomSheet.md) () - - - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [addUserBottomSheet](../widgets_add_members_bottom_sheet/EventBottomSheet/addUserBottomSheet.md)({required [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, required [CreateEventViewModel](../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) model}) void - - - -This function creates a modal material design bottom sheet. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/EventBottomSheet.md b/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/EventBottomSheet.md deleted file mode 100644 index 588e22a0a..000000000 --- a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/EventBottomSheet.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# EventBottomSheet constructor - - - - - - - -EventBottomSheet() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/addUserBottomSheet.md b/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/addUserBottomSheet.md deleted file mode 100644 index c3727ed08..000000000 --- a/talawa-mobile-docs/widgets_add_members_bottom_sheet/EventBottomSheet/addUserBottomSheet.md +++ /dev/null @@ -1,148 +0,0 @@ - - - -# addUserBottomSheet method - - - - - - - - -void addUserBottomSheet -({required [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, required [CreateEventViewModel](../../view_model_after_auth_view_models_event_view_models_create_event_view_model/CreateEventViewModel-class.md) model}) - - - - - -

This function creates a modal material design bottom sheet.

-

to let the user add admin or members to an organization. -params:

-
    -
  • context: BuildContext
  • -
  • model: CreateEventViewModel
  • -
-

returns: - None

- - - -## Implementation - -```dart -void addUserBottomSheet({ - required BuildContext context, - required CreateEventViewModel model, -}) { - // Returns a Future that resolves to the value ("context") passed - // to Navigator.pop - showModalBottomSheet( - context: context, - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - ), - isScrollControlled: true, - builder: (BuildContext context) { - return StatefulBuilder( - builder: (BuildContext context, StateSetter setState) { - return ClipRRect( - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - ), - child: Container( - height: MediaQuery.of(context).size.height * 0.8, - decoration: BoxDecoration( - color: Theme.of(context).scaffoldBackgroundColor, - ), - child: Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - const Text( - "Add Members", - style: TextStyle(fontSize: 16), - ), - TextButton( - key: const Key('text_btn_ambs1'), - onPressed: () { - model.buildUserList(); - Navigator.pop(context); - }, - child: const Text("Done"), - ), - const Divider(), - FutureBuilder( - // an admin can access the list of the members in an organization - future: model.getCurrentOrgUsersList(), - builder: ( - BuildContext context, - AsyncSnapshot> snapshot, - ) { - if (snapshot.data == null) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return snapshot.data!.isEmpty - ? const Center( - child: Text( - "There aren't any members in this organization.", - ), - ) - // Displaying the list of the members - : Flexible( - child: ListView.builder( - shrinkWrap: true, - itemCount: snapshot.data!.length, - itemBuilder: (context, index) { - return CheckboxListTile( - checkColor: Theme.of(context) - .colorScheme - .background, - activeColor: Theme.of(context) - .colorScheme - .primary, - title: Text( - "${snapshot.data![index].firstName!} ${snapshot.data![index].lastName!}", - ), - value: model.memberCheckedMap[ - snapshot.data![index].id], - onChanged: (val) { - setState( - () { - model.memberCheckedMap[snapshot - .data![index].id!] = val!; - }, - ); - }, - ); - }, - ), - ); - } - }, - ) - ], - ), - ), - ), - ); - }, - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md b/talawa-mobile-docs/widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md deleted file mode 100644 index 852972d89..000000000 --- a/talawa-mobile-docs/widgets_add_members_bottom_sheet/widgets_add_members_bottom_sheet-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# add_members_bottom_sheet library - - - - - - - - - - - -## Classes - -##### [EventBottomSheet](../widgets_add_members_bottom_sheet/EventBottomSheet-class.md) - - - -Adds members to an event. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog-class.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog-class.md deleted file mode 100644 index 7cdcf62e3..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog-class.md +++ /dev/null @@ -1,255 +0,0 @@ - - - -# CustomAlertDialog class - - - - - - - - - -

This Class returns CustomAlertDialog widget. Custom Alert Dialog is a popup -that appeared in the screen showing Alert message along with the event buttons. -This extends stateless widget that means it cannot change its state during the -runtime of a application.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomAlertDialog - - - - - - - - -## Constructors - -[CustomAlertDialog](../widgets_custom_alert_dialog/CustomAlertDialog/CustomAlertDialog.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? successText, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? dialogTitle, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reverse = false, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) secondaryButtonText = 'Close', [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? secondaryButtonTap, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) success, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) dialogSubTitle}) - - _const_ - - -## Properties - -##### [dialogSubTitle](../widgets_custom_alert_dialog/CustomAlertDialog/dialogSubTitle.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [dialogTitle](../widgets_custom_alert_dialog/CustomAlertDialog/dialogTitle.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [reverse](../widgets_custom_alert_dialog/CustomAlertDialog/reverse.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [secondaryButtonTap](../widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonTap.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? - - - - -_final_ - - - -##### [secondaryButtonText](../widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonText.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [success](../widgets_custom_alert_dialog/CustomAlertDialog/success.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [successText](../widgets_custom_alert_dialog/CustomAlertDialog/successText.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_custom_alert_dialog/CustomAlertDialog/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/CustomAlertDialog.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/CustomAlertDialog.md deleted file mode 100644 index 8eaaa8ad1..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/CustomAlertDialog.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# CustomAlertDialog constructor - - - - - - -const -CustomAlertDialog({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? successText, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? dialogTitle, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reverse = false, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) secondaryButtonText = 'Close', [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? secondaryButtonTap, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) success, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) dialogSubTitle}) - - - - - -## Implementation - -```dart -const CustomAlertDialog({ - Key? key, - this.successText, - this.dialogTitle, - this.reverse = false, - this.secondaryButtonText = 'Close', - this.secondaryButtonTap, - required this.success, - required this.dialogSubTitle, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/build.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/build.md deleted file mode 100644 index 1e9548007..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/build.md +++ /dev/null @@ -1,108 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final List actions = [ - RaisedRoundedButton( - key: const Key('Close'), - onTap: () => secondaryButtonTap ?? navigationService.pop(), - buttonLabel: - AppLocalizations.of(context)!.strictTranslate(secondaryButtonText), - textColor: Colors.white, - backgroundColor: const Color(0xFF008A37), - width: SizeConfig.screenWidth! * 0.2, - height: SizeConfig.screenHeight! * 0.06, - ), - RaisedRoundedButton( - key: Key(successText ?? 'Confirm'), - onTap: () => success(), - buttonLabel: successText ?? - AppLocalizations.of(context)!.strictTranslate('Confirm'), - textColor: const Color(0xFF008A37), - backgroundColor: Colors.white, - width: SizeConfig.screenWidth! * 0.2, - height: SizeConfig.screenHeight! * 0.06, - ) - ]; - return AlertDialog( - title: Text( - dialogTitle ?? - AppLocalizations.of(context)!.strictTranslate('Confirmation'), - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontWeight: FontWeight.w800), - ), - content: Text(dialogSubTitle), - buttonPadding: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.05, - vertical: SizeConfig.screenHeight! * 0.05, - ), - actions: reverse ? actions.reversed.toList() : actions, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogSubTitle.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogSubTitle.md deleted file mode 100644 index 289f53404..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogSubTitle.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# dialogSubTitle property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) dialogSubTitle - -_final_ - - - - - - -## Implementation - -```dart -final String dialogSubTitle; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogTitle.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogTitle.md deleted file mode 100644 index e9b1201be..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/dialogTitle.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# dialogTitle property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? dialogTitle - -_final_ - - - - - - -## Implementation - -```dart -final String? dialogTitle; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/reverse.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/reverse.md deleted file mode 100644 index 1a6ef66a4..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/reverse.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# reverse property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reverse - -_final_ - - - - - - -## Implementation - -```dart -final bool reverse; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonTap.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonTap.md deleted file mode 100644 index 69581557b..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonTap.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# secondaryButtonTap property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? secondaryButtonTap - -_final_ - - - - - - -## Implementation - -```dart -final Function? secondaryButtonTap; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonText.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonText.md deleted file mode 100644 index d56250bfc..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/secondaryButtonText.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# secondaryButtonText property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) secondaryButtonText - -_final_ - - - - - - -## Implementation - -```dart -final String secondaryButtonText; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/success.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/success.md deleted file mode 100644 index 5a38d9633..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/success.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# success property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) success - -_final_ - - - - - - -## Implementation - -```dart -final Function success; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/successText.md b/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/successText.md deleted file mode 100644 index bae6cfb7b..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/CustomAlertDialog/successText.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# successText property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? successText - -_final_ - - - - - - -## Implementation - -```dart -final String? successText; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md b/talawa-mobile-docs/widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md deleted file mode 100644 index 04914c600..000000000 --- a/talawa-mobile-docs/widgets_custom_alert_dialog/widgets_custom_alert_dialog-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# custom_alert_dialog library - - - - - - - - - - - -## Classes - -##### [CustomAlertDialog](../widgets_custom_alert_dialog/CustomAlertDialog-class.md) - - - -This Class returns CustomAlertDialog widget. Custom Alert Dialog is a popup -that appeared in the screen showing Alert message along with the event buttons. -This extends stateless widget that means it cannot change its state during the -runtime of a application. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar-class.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar-class.md deleted file mode 100644 index b17358fba..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar-class.md +++ /dev/null @@ -1,236 +0,0 @@ - - - -# CustomAvatar class - - - - - - - - - -

Creates a custom avatar. -The avatar is created using the image provided, -or the first alphabet with a standard background color.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomAvatar - - - - - - - - -## Constructors - -[CustomAvatar](../widgets_custom_avatar/CustomAvatar/CustomAvatar.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isImageNull, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstAlphabet, [BaseCacheManager](https://pub.dev/documentation/flutter_cache_manager/3.3.1/flutter_cache_manager/BaseCacheManager-class.html)? cacheManager, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? fontSize = 40}) - - _const_ - - -## Properties - -##### [cacheManager](../widgets_custom_avatar/CustomAvatar/cacheManager.md) → [BaseCacheManager](https://pub.dev/documentation/flutter_cache_manager/3.3.1/flutter_cache_manager/BaseCacheManager-class.html)? - - - - -_final_ - - - -##### [firstAlphabet](../widgets_custom_avatar/CustomAvatar/firstAlphabet.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [fontSize](../widgets_custom_avatar/CustomAvatar/fontSize.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [imageUrl](../widgets_custom_avatar/CustomAvatar/imageUrl.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [isImageNull](../widgets_custom_avatar/CustomAvatar/isImageNull.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_custom_avatar/CustomAvatar/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/CustomAvatar.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/CustomAvatar.md deleted file mode 100644 index 6889bbd2e..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/CustomAvatar.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# CustomAvatar constructor - - - - - - -const -CustomAvatar({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isImageNull, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstAlphabet, [BaseCacheManager](https://pub.dev/documentation/flutter_cache_manager/3.3.1/flutter_cache_manager/BaseCacheManager-class.html)? cacheManager, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? fontSize = 40}) - - - - - -## Implementation - -```dart -const CustomAvatar({ - Key? key, - required this.isImageNull, - this.firstAlphabet, - this.cacheManager, - this.imageUrl, - this.fontSize = 40, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/build.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/build.md deleted file mode 100644 index 94273da49..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/build.md +++ /dev/null @@ -1,106 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return isImageNull - //creating the avatar with the icon-theme color when the image is null - ? CircleAvatar( - backgroundColor: - Theme.of(context).iconTheme.color!.withOpacity(0.2), - child: Center( - child: Text( - firstAlphabet!, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontSize: fontSize), - ), - ), - ) - //creating the avatar with the provided image - : CachedNetworkImage( - cacheManager: cacheManager, - imageBuilder: (context, imageProvider) { - return CircleAvatar( - backgroundColor: - Theme.of(context).iconTheme.color!.withOpacity(0.2), - backgroundImage: imageProvider, - ); - }, - imageUrl: imageUrl!, - placeholder: (context, url) => CircleAvatar( - child: Shimmer.fromColors( - baseColor: Colors.transparent, - highlightColor: Colors.white30, - child: const CircleAvatar(), - ), - ), - errorWidget: (context, url, error) => - const CircleAvatar(child: Icon(Icons.error)), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/cacheManager.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/cacheManager.md deleted file mode 100644 index 64667e800..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/cacheManager.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# cacheManager property - - - - - - - -[BaseCacheManager](https://pub.dev/documentation/flutter_cache_manager/3.3.1/flutter_cache_manager/BaseCacheManager-class.html)? cacheManager - -_final_ - - - - - - -## Implementation - -```dart -final BaseCacheManager? cacheManager; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/firstAlphabet.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/firstAlphabet.md deleted file mode 100644 index ae1ab0c5f..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/firstAlphabet.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# firstAlphabet property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? firstAlphabet - -_final_ - - - - - - -## Implementation - -```dart -final String? firstAlphabet; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/fontSize.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/fontSize.md deleted file mode 100644 index 67ce19850..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/fontSize.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# fontSize property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? fontSize - -_final_ - - - - - - -## Implementation - -```dart -final double? fontSize; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/imageUrl.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/imageUrl.md deleted file mode 100644 index c1aab3120..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/imageUrl.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# imageUrl property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? imageUrl - -_final_ - - - - - - -## Implementation - -```dart -final String? imageUrl; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/isImageNull.md b/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/isImageNull.md deleted file mode 100644 index 2485f03e9..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/CustomAvatar/isImageNull.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isImageNull property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isImageNull - -_final_ - - - - - - -## Implementation - -```dart -final bool isImageNull; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_avatar/widgets_custom_avatar-library.md b/talawa-mobile-docs/widgets_custom_avatar/widgets_custom_avatar-library.md deleted file mode 100644 index b11199567..000000000 --- a/talawa-mobile-docs/widgets_custom_avatar/widgets_custom_avatar-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# custom_avatar library - - - - - - - - - - - -## Classes - -##### [CustomAvatar](../widgets_custom_avatar/CustomAvatar-class.md) - - - -Creates a custom avatar. -The avatar is created using the image provided, -or the first alphabet with a standard background color. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer-class.md b/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer-class.md deleted file mode 100644 index d50b757b4..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer-class.md +++ /dev/null @@ -1,208 +0,0 @@ - - - -# CustomDrawer class - - - - - - - - - -

Creates a custom drawer for switching organizations.

-

joining new organizations, or leaving an organization.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomDrawer - - - - - - - - -## Constructors - -[CustomDrawer](../widgets_custom_drawer/CustomDrawer/CustomDrawer.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md) homeModel}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [homeModel](../widgets_custom_drawer/CustomDrawer/homeModel.md) → [MainScreenViewModel](../view_model_main_screen_view_model/MainScreenViewModel-class.md) - - - -home model. -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_custom_drawer/CustomDrawer/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [exitButton](../widgets_custom_drawer/CustomDrawer/exitButton.md)() void - - - -Button to exit the organization. - - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/CustomDrawer.md b/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/CustomDrawer.md deleted file mode 100644 index 1a91c48a2..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/CustomDrawer.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# CustomDrawer constructor - - - - - - -const -CustomDrawer({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md) homeModel}) - - - - - -## Implementation - -```dart -const CustomDrawer({ - Key? key, - required this.homeModel, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/build.md b/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/build.md deleted file mode 100644 index 179b7931f..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/build.md +++ /dev/null @@ -1,198 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialize(homeModel, context), - builder: (context, model, child) { - return Container( - width: SizeConfig.screenWidth! * 0.6, - alignment: Alignment.centerLeft, - child: Drawer( - key: const Key("Drawer"), - child: ListView( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - //A material design Drawer header that identifies the app's user. - UserAccountsDrawerHeader( - currentAccountPicture: CustomAvatar( - isImageNull: model.selectedOrg?.image == null, - imageUrl: model.selectedOrg?.image, - firstAlphabet: model.selectedOrg?.name!.substring(0, 1), - ), - accountName: Column( - key: MainScreenViewModel.keyDrawerCurOrg, - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - model.selectedOrg?.name! ?? "NULL", - ), - Text( - AppLocalizations.of(context)! - .strictTranslate("Selected Organization"), - ) - ], - ), - accountEmail: const SizedBox(), - ), - //Tile to Switch organizations - Column( - key: MainScreenViewModel.keyDrawerSwitchableOrg, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - vertical: 5, - horizontal: 8.0, - ), - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Switch Organization"), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.41, - child: Scrollbar( - controller: model.controller, - thumbVisibility: true, - child: ListView.builder( - key: const Key("Switching Org"), - controller: model.controller, - padding: EdgeInsets.zero, - itemCount: model.switchAbleOrg.length, - // itemCount: 3, - itemBuilder: (BuildContext context, int index) { - return ListTile( - key: const Key("Org"), - onTap: () => model - .switchOrg(model.switchAbleOrg[index]), - leading: CustomAvatar( - isImageNull: - model.switchAbleOrg[index].image == - null, - imageUrl: model.switchAbleOrg[index].image, - firstAlphabet: model - .switchAbleOrg[index].name! - .substring(0, 1), - fontSize: 18, - ), - title: Text( - model.switchAbleOrg[index].name!, - ), - ); - }, - ), - ), - ), - ], - ), - const Divider(), - // A Tile to join a new organization - ListTile( - key: MainScreenViewModel.keyDrawerJoinOrg, - onTap: () => navigationService - .popAndPushScreen(Routes.joinOrg, arguments: '-1'), - leading: const Icon( - Icons.add, - size: 30, - ), - title: Text( - AppLocalizations.of(context)! - .strictTranslate("Join new Organization"), - ), - ), - ListTile( - key: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - onTap: () => exitButton(), - leading: const Icon(Icons.logout, size: 30), - title: Text( - AppLocalizations.of(context)! - .strictTranslate("Leave Current Organization"), - ), - ), - SizedBox( - key: const Key("Sized Box Drawer"), - height: SizeConfig.screenHeight! * 0.03, - ), - const FromPalisadoes(key: Key("From Palisadoes")), - SizedBox( - key: const Key("Sized BottomBox Drawer"), - height: SizeConfig.screenHeight! * 0.03, - ) - ], - ), - ], - ), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/exitButton.md b/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/exitButton.md deleted file mode 100644 index 2d4c0b640..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/exitButton.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# exitButton method - - - - - - - - -void exitButton -() - - - - - -

Button to exit the organization.

-

params: - None

-

returns: - None

- - - -## Implementation - -```dart -void exitButton() { - return navigationService.pushDialog( - CustomAlertDialog( - key: const Key("Exit?"), - reverse: true, - dialogSubTitle: 'Are you sure you want to exit this organization?', - successText: 'Exit', - success: () { - //Exit org - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/homeModel.md b/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/homeModel.md deleted file mode 100644 index 310768eb9..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/CustomDrawer/homeModel.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# homeModel property - - - - - - - -[MainScreenViewModel](../../view_model_main_screen_view_model/MainScreenViewModel-class.md) homeModel - -_final_ - - - -

home model.

- - - -## Implementation - -```dart -final MainScreenViewModel homeModel; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_drawer/widgets_custom_drawer-library.md b/talawa-mobile-docs/widgets_custom_drawer/widgets_custom_drawer-library.md deleted file mode 100644 index 8ae003a91..000000000 --- a/talawa-mobile-docs/widgets_custom_drawer/widgets_custom_drawer-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# custom_drawer library - - - - - - - - - - - -## Classes - -##### [CustomDrawer](../widgets_custom_drawer/CustomDrawer-class.md) - - - -Creates a custom drawer for switching organizations. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile-class.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile-class.md deleted file mode 100644 index 1bffb888c..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile-class.md +++ /dev/null @@ -1,271 +0,0 @@ - - - -# CustomListTile class - - - - - - - - - -

Returns a widget for rendering Customized tiles. -A Tile shows the org info, user info, options that on tap user & org info.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomListTile - - - - - - - - -## Constructors - -[CustomListTile](../widgets_custom_list_tile/CustomListTile/CustomListTile.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) index, required [TileType](../enums_enums/TileType.md) type, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showIcon = false, [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? orgInfo, dynamic onTapOrgInfo([OrgInfo](../models_organization_org_info/OrgInfo-class.md))?, [User](../models_user_user_info/User-class.md)? userInfo, dynamic onTapUserInfo()?, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? onTapOption, [Options](../models_options_options/Options-class.md)? option}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [index](../widgets_custom_list_tile/CustomListTile/index.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [onTapOption](../widgets_custom_list_tile/CustomListTile/onTapOption.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? - - - - -_final_ - - - -##### [onTapOrgInfo](../widgets_custom_list_tile/CustomListTile/onTapOrgInfo.md) → (dynamic Function([OrgInfo](../models_organization_org_info/OrgInfo-class.md))?) - - - - -_final_ - - - -##### [onTapUserInfo](../widgets_custom_list_tile/CustomListTile/onTapUserInfo.md) → (dynamic Function()?) - - - - -_final_ - - - -##### [option](../widgets_custom_list_tile/CustomListTile/option.md) → [Options](../models_options_options/Options-class.md)? - - - - -_final_ - - - -##### [orgInfo](../widgets_custom_list_tile/CustomListTile/orgInfo.md) → [OrgInfo](../models_organization_org_info/OrgInfo-class.md)? - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [showIcon](../widgets_custom_list_tile/CustomListTile/showIcon.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [type](../widgets_custom_list_tile/CustomListTile/type.md) → [TileType](../enums_enums/TileType.md) - - - - -_final_ - - - -##### [userInfo](../widgets_custom_list_tile/CustomListTile/userInfo.md) → [User](../models_user_user_info/User-class.md)? - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_custom_list_tile/CustomListTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/CustomListTile.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/CustomListTile.md deleted file mode 100644 index 3eeda234d..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/CustomListTile.md +++ /dev/null @@ -1,40 +0,0 @@ - - - -# CustomListTile constructor - - - - - - -const -CustomListTile({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) index, required [TileType](../../enums_enums/TileType.md) type, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showIcon = false, [OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? orgInfo, dynamic onTapOrgInfo([OrgInfo](../../models_organization_org_info/OrgInfo-class.md))?, [User](../../models_user_user_info/User-class.md)? userInfo, dynamic onTapUserInfo()?, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? onTapOption, [Options](../../models_options_options/Options-class.md)? option}) - - - - - -## Implementation - -```dart -const CustomListTile({ - required Key key, - required this.index, - required this.type, - this.showIcon = false, - this.orgInfo, - this.onTapOrgInfo, - this.userInfo, - this.onTapUserInfo, - this.onTapOption, - this.option, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/build.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/build.md deleted file mode 100644 index 7f8f54cc0..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/build.md +++ /dev/null @@ -1,143 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return InkWell( - // checking wheather the tapped tile is of user or org. - onTap: () => type == TileType.org - ? onTapOrgInfo!(orgInfo!) - : type == TileType.user - ? onTapUserInfo!() - // ignore: avoid_dynamic_calls - : onTapOption!(), - child: Padding( - padding: const EdgeInsets.all(18.0), - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(20), - ), - height: 70, - child: Row( - children: [ - Expanded( - flex: 3, - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 25, - ), - child: Text( - type == TileType.org - ? orgInfo!.name! - : type == TileType.user - ? '${userInfo!.firstName!} ${userInfo!.lastName!}' - : option!.title, - style: type == TileType.org - ? Theme.of(context) - .textTheme - .headlineSmall! - .copyWith(fontSize: 18, color: Colors.black) - : type == TileType.user - ? Theme.of(context) - .textTheme - .titleLarge! - .copyWith(fontSize: 18, color: Colors.black) - : option!.trailingIconButton == null - ? Theme.of(context) - .textTheme - .bodyMedium! - .copyWith(fontSize: 18, color: Colors.black) - : Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - fontSize: 18, - color: Colors.black, - ), - ), - ), - ), - Expanded( - flex: 1, - child: type != TileType.user - ? type == TileType.org - ? Icon( - orgInfo!.isPublic! ? Icons.lock_open : Icons.lock, - color: orgInfo!.isPublic! - ? const Color(0xFF34AD64) - : const Color(0xffFABC57), - ) - : option!.trailingIconButton ?? const SizedBox() - : const SizedBox(), - ), - ], - ), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/index.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/index.md deleted file mode 100644 index 8d38fdfe8..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/index.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# index property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) index - -_final_ - - - - - - -## Implementation - -```dart -final int index; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOption.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOption.md deleted file mode 100644 index 1a38e0522..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOption.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onTapOption property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html)? onTapOption - -_final_ - - - - - - -## Implementation - -```dart -final Function? onTapOption; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOrgInfo.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOrgInfo.md deleted file mode 100644 index c835fb4c1..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapOrgInfo.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onTapOrgInfo property - - - - - - - -(dynamic Function([OrgInfo](../../models_organization_org_info/OrgInfo-class.md))?) onTapOrgInfo - -_final_ - - - - - - -## Implementation - -```dart -final Function(OrgInfo)? onTapOrgInfo; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapUserInfo.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapUserInfo.md deleted file mode 100644 index 7aed949ac..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/onTapUserInfo.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onTapUserInfo property - - - - - - - -(dynamic Function()?) onTapUserInfo - -_final_ - - - - - - -## Implementation - -```dart -final Function()? onTapUserInfo; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/option.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/option.md deleted file mode 100644 index 5ea411944..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/option.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# option property - - - - - - - -[Options](../../models_options_options/Options-class.md)? option - -_final_ - - - - - - -## Implementation - -```dart -final Options? option; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/orgInfo.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/orgInfo.md deleted file mode 100644 index 22dfb8f00..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/orgInfo.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# orgInfo property - - - - - - - -[OrgInfo](../../models_organization_org_info/OrgInfo-class.md)? orgInfo - -_final_ - - - - - - -## Implementation - -```dart -final OrgInfo? orgInfo; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/showIcon.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/showIcon.md deleted file mode 100644 index fff3c932a..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/showIcon.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# showIcon property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showIcon - -_final_ - - - - - - -## Implementation - -```dart -final bool showIcon; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/type.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/type.md deleted file mode 100644 index 1b487d771..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/type.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# type property - - - - - - - -[TileType](../../enums_enums/TileType.md) type - -_final_ - - - - - - -## Implementation - -```dart -final TileType type; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/userInfo.md b/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/userInfo.md deleted file mode 100644 index 04e9dd974..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/CustomListTile/userInfo.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# userInfo property - - - - - - - -[User](../../models_user_user_info/User-class.md)? userInfo - -_final_ - - - - - - -## Implementation - -```dart -final User? userInfo; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_list_tile/widgets_custom_list_tile-library.md b/talawa-mobile-docs/widgets_custom_list_tile/widgets_custom_list_tile-library.md deleted file mode 100644 index 20f3bdfd3..000000000 --- a/talawa-mobile-docs/widgets_custom_list_tile/widgets_custom_list_tile-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# custom_list_tile library - - - - - - - - - - - -## Classes - -##### [CustomListTile](../widgets_custom_list_tile/CustomListTile-class.md) - - - -Returns a widget for rendering Customized tiles. -A Tile shows the org info, user info, options that on tap user & org info. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog-class.md b/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog-class.md deleted file mode 100644 index 6f3003ddc..000000000 --- a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog-class.md +++ /dev/null @@ -1,191 +0,0 @@ - - - -# CustomProgressDialog class - - - - - - - - - -

A progress dialogue which shows an activity indicator -spinning clockwise if there is internet connectivity. -Otherwise, it shows no-internet image and text.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomProgressDialog - - - - - - - - -## Constructors - -[CustomProgressDialog](../widgets_custom_progress_dialog/CustomProgressDialog/CustomProgressDialog.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_custom_progress_dialog/CustomProgressDialog/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/CustomProgressDialog.md b/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/CustomProgressDialog.md deleted file mode 100644 index 3dbcc9b6f..000000000 --- a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/CustomProgressDialog.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# CustomProgressDialog constructor - - - - - - -const -CustomProgressDialog({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key}) - - - - - -## Implementation - -```dart -const CustomProgressDialog({required Key key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/build.md b/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/build.md deleted file mode 100644 index 543386b09..000000000 --- a/talawa-mobile-docs/widgets_custom_progress_dialog/CustomProgressDialog/build.md +++ /dev/null @@ -1,114 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return Container( - margin: EdgeInsets.symmetric( - horizontal: SizeConfig.screenWidth! * 0.25, - vertical: SizeConfig.screenHeight! * 0.35, - ), - decoration: BoxDecoration( - color: Theme.of(context).textTheme.titleLarge!.color, - borderRadius: BorderRadius.circular(15), - ), - child: model.connectivityPresent - ? Center( - //An iOS-style activity indicator that spins clockwise. - - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ) - // Shows no-internet image and text on no connectivity - : Column( - children: [ - Container( - alignment: Alignment.bottomCenter, - height: SizeConfig.screenWidth! * 0.4, - width: SizeConfig.screenWidth! * 0.4, - padding: const EdgeInsets.only(bottom: 10), - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage('assets/images/no_internet.png'), - fit: BoxFit.scaleDown, - ), - ), - ), - Text( - '${AppLocalizations.of(context)!.strictTranslate("No Internet")}!', - style: Theme.of(context).textTheme.headlineSmall, - ), - ], - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md b/talawa-mobile-docs/widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md deleted file mode 100644 index 6c67685cc..000000000 --- a/talawa-mobile-docs/widgets_custom_progress_dialog/widgets_custom_progress_dialog-library.md +++ /dev/null @@ -1,40 +0,0 @@ - - - - -# custom_progress_dialog library - - - - - - - - - - - -## Classes - -##### [CustomProgressDialog](../widgets_custom_progress_dialog/CustomProgressDialog-class.md) - - - -A progress dialogue which shows an activity indicator -spinning clockwise if there is internet connectivity. -Otherwise, it shows no-internet image and text. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_date_time_picker/customDatePicker.md b/talawa-mobile-docs/widgets_date_time_picker/customDatePicker.md deleted file mode 100644 index be6e41a57..000000000 --- a/talawa-mobile-docs/widgets_date_time_picker/customDatePicker.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# customDatePicker function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)> customDatePicker -({required [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) initialDate}) - - - - - -

Shows a dialog containing a Material Design date picker.

-

The returned Future resolves to the date selected by the user when the user confirms the dialog. -If the user cancels the dialog, null is returned.

- - - -## Implementation - -```dart -Future customDatePicker({required DateTime initialDate}) async { - // showDatePicker which shows a material design date range picker used to select a range of dates. - final DateTime? picked = await showDatePicker( - context: navigationService.navigatorKey.currentContext!, - initialDate: initialDate, - firstDate: DateTime(2015, 8), - lastDate: DateTime(2101), - ); - if (picked != null && picked != initialDate) { - return picked; - } - return initialDate; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_date_time_picker/customTimePicker.md b/talawa-mobile-docs/widgets_date_time_picker/customTimePicker.md deleted file mode 100644 index dbef8ac94..000000000 --- a/talawa-mobile-docs/widgets_date_time_picker/customTimePicker.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# customTimePicker function - - - - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html)> customTimePicker -({required [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) initialTime}) - - - - - -

Shows a dialog containing a material design time picker.

-

The returned Future resolves to the time selected by the user when the user closes the dialog. -If the user cancels the dialog, null is returned.

- - - -## Implementation - -```dart -Future customTimePicker({required TimeOfDay initialTime}) async { - // showTimePicker which shows a material design time range picker used to select a range of times. - // Click ![here](https://api.flutter.dev/flutter/material/showTimePicker.html) to know more. - final TimeOfDay? pickedTime = await showTimePicker( - context: navigationService.navigatorKey.currentContext!, - initialTime: initialTime, - ); - - if (pickedTime != null && pickedTime != initialTime) { - return pickedTime; - } - return initialTime; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_date_time_picker/widgets_date_time_picker-library.md b/talawa-mobile-docs/widgets_date_time_picker/widgets_date_time_picker-library.md deleted file mode 100644 index 2a02458bf..000000000 --- a/talawa-mobile-docs/widgets_date_time_picker/widgets_date_time_picker-library.md +++ /dev/null @@ -1,49 +0,0 @@ - - - - -# date_time_picker library - - - - - - - - - - - - - - - - -## Functions - -##### [customDatePicker](../widgets_date_time_picker/customDatePicker.md)({required [DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html) initialDate}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[DateTime](https://api.flutter.dev/flutter/dart-core/DateTime-class.html)> - - - -Shows a dialog containing a Material Design date picker. - - - - -##### [customTimePicker](../widgets_date_time_picker/customTimePicker.md)({required [TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html) initialTime}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[TimeOfDay](https://api.flutter.dev/flutter/material/TimeOfDay-class.html)> - - - -Shows a dialog containing a material design time picker. - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard-class.md b/talawa-mobile-docs/widgets_event_card/EventCard-class.md deleted file mode 100644 index a823fc9c5..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard-class.md +++ /dev/null @@ -1,225 +0,0 @@ - - - -# EventCard class - - - - - - - - - -

This class returns the EventCard widget.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- EventCard - - - - - - - - -## Constructors - -[EventCard](../widgets_event_card/EventCard/EventCard.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Event](../models_events_event_model/Event-class.md) event, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleHighlightedText, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleNormalText, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isSearchItem}) - - _const_ - - -## Properties - -##### [event](../widgets_event_card/EventCard/event.md) → [Event](../models_events_event_model/Event-class.md) - - - - -_final_ - - - -##### [eventTitleHighlightedText](../widgets_event_card/EventCard/eventTitleHighlightedText.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [eventTitleNormalText](../widgets_event_card/EventCard/eventTitleNormalText.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [isSearchItem](../widgets_event_card/EventCard/isSearchItem.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_event_card/EventCard/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/EventCard.md b/talawa-mobile-docs/widgets_event_card/EventCard/EventCard.md deleted file mode 100644 index f6421729a..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/EventCard.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# EventCard constructor - - - - - - -const -EventCard({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Event](../../models_events_event_model/Event-class.md) event, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleHighlightedText, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleNormalText, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isSearchItem}) - - - - - -## Implementation - -```dart -const EventCard({ - Key? key, - required this.event, - this.eventTitleHighlightedText, - this.eventTitleNormalText, - required this.isSearchItem, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/build.md b/talawa-mobile-docs/widgets_event_card/EventCard/build.md deleted file mode 100644 index feddc8335..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/build.md +++ /dev/null @@ -1,336 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final bool isRegistered = event.isRegistered ?? false; - return Padding( - padding: const EdgeInsets.only(bottom: 10), - child: Stack( - children: [ - Card( - shape: RoundedRectangleBorder( - side: - isRegistered && userConfig.currentUser.id != event.creator!.id - ? BorderSide( - color: Theme.of(context).colorScheme.secondary, - width: SizeConfig.screenWidth! * 0.008, - ) - : BorderSide.none, - ), - elevation: 3, - color: Theme.of(context).primaryColor, - child: Column( - children: [ - AspectRatio( - aspectRatio: 2.5, - child: Container( - height: SizeConfig.screenHeight! * 0.11, - width: double.infinity, - decoration: BoxDecoration( - color: Colors.grey.withOpacity(0.3), - image: const DecorationImage( - fit: BoxFit.fitWidth, - alignment: FractionalOffset.topCenter, - image: NetworkImage( - 'https://picsum.photos/id/1022/200/300', - ), - ), - ), - child: ClipRRect( - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), - child: Container( - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.0), - ), - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - Row( - children: [ - SizedBox( - width: SizeConfig.screenWidth! * 0.48, - child: isSearchItem - ? RichText( - text: TextSpan( - text: eventTitleHighlightedText, - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - fontWeight: FontWeight.bold, - ), - children: [ - TextSpan( - text: eventTitleNormalText, - style: Theme.of(context) - .textTheme - .headlineSmall! - .copyWith( - color: Colors.grey, - ), - ) - ], - ), - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - ) - : Text( - event.title!, - style: Theme.of(context) - .textTheme - .headlineSmall, - ), - ), - const Spacer(), - const Icon( - Icons.calendar_today, - size: 13, - ), - const Spacer(), - Text( - "${event.startDate!} - ${event.endDate!}", - style: Theme.of(context).textTheme.bodySmall, - ) - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.006, - ), - Row( - children: [ - const Icon( - Icons.schedule, - size: 12, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.015, - ), - Text( - "${event.startTime!} - ${event.endTime!}", - style: Theme.of(context).textTheme.bodySmall, - ), - const Spacer(), - const Icon( - Icons.place, - size: 12, - ), - SizedBox( - child: Text( - event.location!.substring( - 0, - min(event.location!.length, 20), - ), - style: Theme.of(context).textTheme.bodySmall, - ), - ) - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.013, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - width: SizeConfig.screenWidth! * 0.55, - child: Text( - event.description!, - style: Theme.of(context).textTheme.bodySmall, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.left, - maxLines: 3, - ), - ), - const Icon( - Icons.chevron_right, - ), - ], - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.007, - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - userConfig.currentUser.id == event.creator!.id - ? Row( - children: [ - Icon( - Icons.verified, - size: 13, - color: Theme.of(context) - .colorScheme - .secondary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - Text( - AppLocalizations.of(context)! - .strictTranslate('Created'), - style: - Theme.of(context).textTheme.bodySmall, - ), - ], - ) - : const SizedBox(), - const Spacer(), - event.isPublic! - ? Icon( - Icons.lock_open, - size: 13, - color: Theme.of(context).colorScheme.primary, - ) - : Icon( - Icons.lock, - size: 13, - color: Theme.of(context).colorScheme.primary, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - event.isPublic! - ? Text( - AppLocalizations.of(context)! - .strictTranslate('public'), - style: Theme.of(context).textTheme.bodySmall, - ) - : Text( - AppLocalizations.of(context)! - .strictTranslate('private'), - style: Theme.of(context).textTheme.bodySmall, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.027, - ), - const Icon( - Icons.people_outline, - size: 13, - color: Color(0xff4285F4), - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.013, - ), - event.attendees != null - ? Text( - event.attendees!, - style: Theme.of(context).textTheme.bodySmall, - ) - : Text( - (event.registrants?.length ?? 0).toString(), - style: Theme.of(context).textTheme.bodySmall, - ) - ], - ), - ], - ), - ) - ], - ), - ), - Positioned( - top: SizeConfig.screenHeight! * 0.007, - right: SizeConfig.screenWidth! * 0.013, - child: isRegistered && - userConfig.currentUser.id != event.creator!.id - ? DecoratedBox( - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondary, - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(15), - ), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Center( - child: Text( - AppLocalizations.of(context)! - .strictTranslate("Registered"), - style: - Theme.of(context).textTheme.titleLarge!.copyWith( - color: Colors.white, - fontWeight: FontWeight.w700, - ), - ), - ), - ), - ) - : const SizedBox(), - ) - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/event.md b/talawa-mobile-docs/widgets_event_card/EventCard/event.md deleted file mode 100644 index 9714bc41a..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/event.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# event property - - - - - - - -[Event](../../models_events_event_model/Event-class.md) event - -_final_ - - - - - - -## Implementation - -```dart -final Event event; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleHighlightedText.md b/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleHighlightedText.md deleted file mode 100644 index 237bbbb81..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleHighlightedText.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventTitleHighlightedText property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleHighlightedText - -_final_ - - - - - - -## Implementation - -```dart -final String? eventTitleHighlightedText; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleNormalText.md b/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleNormalText.md deleted file mode 100644 index bbc1edc6c..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/eventTitleNormalText.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventTitleNormalText property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? eventTitleNormalText - -_final_ - - - - - - -## Implementation - -```dart -final String? eventTitleNormalText; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/EventCard/isSearchItem.md b/talawa-mobile-docs/widgets_event_card/EventCard/isSearchItem.md deleted file mode 100644 index 463d3fb1e..000000000 --- a/talawa-mobile-docs/widgets_event_card/EventCard/isSearchItem.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# isSearchItem property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) isSearchItem - -_final_ - - - - - - -## Implementation - -```dart -final bool isSearchItem; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_card/widgets_event_card-library.md b/talawa-mobile-docs/widgets_event_card/widgets_event_card-library.md deleted file mode 100644 index 36714b8fc..000000000 --- a/talawa-mobile-docs/widgets_event_card/widgets_event_card-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_card library - - - - - - - - - - - -## Classes - -##### [EventCard](../widgets_event_card/EventCard-class.md) - - - -This class returns the EventCard widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile-class.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile-class.md deleted file mode 100644 index 4e7838b6e..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile-class.md +++ /dev/null @@ -1,225 +0,0 @@ - - - -# DateTimeTile class - - - - - - - - - -

Returns a widget tile(item) for displaying date and time.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- DateTimeTile - - - - - - - - -## Constructors - -[DateTimeTile](../widgets_event_date_time_tile/DateTimeTile/DateTimeTile.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) date, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) time, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setDate, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setTime}) - - _const_ - - -## Properties - -##### [date](../widgets_event_date_time_tile/DateTimeTile/date.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [setDate](../widgets_event_date_time_tile/DateTimeTile/setDate.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [setTime](../widgets_event_date_time_tile/DateTimeTile/setTime.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [time](../widgets_event_date_time_tile/DateTimeTile/time.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_event_date_time_tile/DateTimeTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/DateTimeTile.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/DateTimeTile.md deleted file mode 100644 index 9a1255317..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/DateTimeTile.md +++ /dev/null @@ -1,35 +0,0 @@ - - - -# DateTimeTile constructor - - - - - - -const -DateTimeTile({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) date, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) time, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setDate, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setTime}) - - - - - -## Implementation - -```dart -const DateTimeTile({ - Key? key, - required this.date, - required this.time, - required this.setDate, - required this.setTime, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/build.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/build.md deleted file mode 100644 index ab4c1078f..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/build.md +++ /dev/null @@ -1,120 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Container( - color: Theme.of(context).colorScheme.primaryContainer, - height: SizeConfig.screenHeight! * 0.068, - width: double.infinity, - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: SizeConfig.screenWidth! * 0.083), - child: Row( - children: [ - const Icon( - Icons.calendar_today, - color: Color(0xff524F4F), - size: 19, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - InkWell( - key: const Key('EventDateTimeTileDate'), - onTap: () async { - setDate(); - }, - child: Text( - date, - style: const TextStyle(fontSize: 16), - ), - ), - const Spacer(), - const Icon( - Icons.schedule, - color: Color(0xff524F4F), - size: 19, - ), - SizedBox( - width: SizeConfig.screenWidth! * 0.045, - ), - InkWell( - key: const Key('EventDateTimeTileTime'), - onTap: () async { - setTime(); - }, - child: Text( - time, - style: const TextStyle(fontSize: 16), - ), - ), - ], - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/date.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/date.md deleted file mode 100644 index 5c32ea33f..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/date.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# date property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) date - -_final_ - - - - - - -## Implementation - -```dart -final String date; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setDate.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setDate.md deleted file mode 100644 index b07f5810d..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setDate.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# setDate property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setDate - -_final_ - - - - - - -## Implementation - -```dart -final Function setDate; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setTime.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setTime.md deleted file mode 100644 index 8ede21b12..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/setTime.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# setTime property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) setTime - -_final_ - - - - - - -## Implementation - -```dart -final Function setTime; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/time.md b/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/time.md deleted file mode 100644 index ebc301185..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/DateTimeTile/time.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# time property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) time - -_final_ - - - - - - -## Implementation - -```dart -final String time; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_date_time_tile/widgets_event_date_time_tile-library.md b/talawa-mobile-docs/widgets_event_date_time_tile/widgets_event_date_time_tile-library.md deleted file mode 100644 index c425fb7a5..000000000 --- a/talawa-mobile-docs/widgets_event_date_time_tile/widgets_event_date_time_tile-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_date_time_tile library - - - - - - - - - - - -## Classes - -##### [DateTimeTile](../widgets_event_date_time_tile/DateTimeTile-class.md) - - - -Returns a widget tile(item) for displaying date and time. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch-class.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch-class.md deleted file mode 100644 index 1b25b05d5..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch-class.md +++ /dev/null @@ -1,279 +0,0 @@ - - - -# EventSearch class - - - - - - - - - -

This class returns a list of the events which match the search query.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [SearchDelegate](https://api.flutter.dev/flutter/material/SearchDelegate-class.html)<[Event](../models_events_event_model/Event-class.md)> -- EventSearch - - - - - - - - -## Constructors - -[EventSearch](../widgets_event_search_delegate/EventSearch/EventSearch.md) ({required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> eventList, required [ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) exploreEventsViewModel}) - - - - -## Properties - -##### [eventList](../widgets_event_search_delegate/EventSearch/eventList.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> - - - - -_final_ - - - -##### [exploreEventsViewModel](../widgets_event_search_delegate/EventSearch/exploreEventsViewModel.md) ↔ [ExploreEventsViewModel](../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) - - - - -_read / write_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [keyboardType](https://api.flutter.dev/flutter/material/SearchDelegate/keyboardType.html) → [TextInputType](https://api.flutter.dev/flutter/services/TextInputType-class.html)? - - - -The type of action button to use for the keyboard. -_finalinherited_ - - - -##### [query](https://api.flutter.dev/flutter/material/SearchDelegate/query.html) ↔ [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -The current query string shown in the AppBar. -_read / writeinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [searchFieldDecorationTheme](https://api.flutter.dev/flutter/material/SearchDelegate/searchFieldDecorationTheme.html) → [InputDecorationTheme](https://api.flutter.dev/flutter/material/InputDecorationTheme-class.html)? - - - -The InputDecorationTheme used to configure the search field's visuals. -_finalinherited_ - - - -##### [searchFieldLabel](https://api.flutter.dev/flutter/material/SearchDelegate/searchFieldLabel.html) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - -The hint text that is shown in the search field when it is empty. -_finalinherited_ - - - -##### [searchFieldStyle](https://api.flutter.dev/flutter/material/SearchDelegate/searchFieldStyle.html) → [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html)? - - - -The style of the searchFieldLabel. -_finalinherited_ - - - -##### [textInputAction](https://api.flutter.dev/flutter/material/SearchDelegate/textInputAction.html) → [TextInputAction](https://api.flutter.dev/flutter/services/TextInputAction.html) - - - -The text input action configuring the soft keyboard to a particular action -button. -_finalinherited_ - - - -##### [transitionAnimation](https://api.flutter.dev/flutter/material/SearchDelegate/transitionAnimation.html) → [Animation](https://api.flutter.dev/flutter/animation/Animation-class.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> - - - -Animation triggered when the search pages fades in or out. -_read-onlyinherited_ - - - - - -## Methods - -##### [appBarTheme](https://api.flutter.dev/flutter/material/SearchDelegate/appBarTheme.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [ThemeData](https://api.flutter.dev/flutter/material/ThemeData-class.html) - - - -The theme used to configure the search page. -_inherited_ - - - -##### [buildActions](../widgets_event_search_delegate/EventSearch/buildActions.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)> - - - -Widgets to display after the search query in the AppBar. -_override_ - - - -##### [buildBottom](https://api.flutter.dev/flutter/material/SearchDelegate/buildBottom.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [PreferredSizeWidget](https://api.flutter.dev/flutter/widgets/PreferredSizeWidget-class.html)? - - - -Widget to display across the bottom of the AppBar. -_inherited_ - - - -##### [buildLeading](../widgets_event_search_delegate/EventSearch/buildLeading.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -A widget to display before the current query in the AppBar. -_override_ - - - -##### [buildResults](../widgets_event_search_delegate/EventSearch/buildResults.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -The results shown after the user submits a search from the search page. -_override_ - - - -##### [buildSuggestions](../widgets_event_search_delegate/EventSearch/buildSuggestions.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Suggestions shown in the body of the search page while the user types a -query into the search field. -_override_ - - - -##### [buildSuggestionsSucess](../widgets_event_search_delegate/EventSearch/buildSuggestionsSucess.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../models_events_event_model/Event-class.md)> suggestions) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - - - - - - -##### [close](https://api.flutter.dev/flutter/material/SearchDelegate/close.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context, [Event](../models_events_event_model/Event-class.md) result) void - - - -Closes the search page and returns to the underlying route. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [showResults](https://api.flutter.dev/flutter/material/SearchDelegate/showResults.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - -Transition from the suggestions returned by buildSuggestions to the -query results returned by buildResults. -_inherited_ - - - -##### [showSuggestions](https://api.flutter.dev/flutter/material/SearchDelegate/showSuggestions.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) void - - - -Transition from showing the results returned by buildResults to showing -the suggestions returned by buildSuggestions. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/dart-core/Object/toString.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/EventSearch.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/EventSearch.md deleted file mode 100644 index 63dfbfee0..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/EventSearch.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# EventSearch constructor - - - - - - - -EventSearch({required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> eventList, required [ExploreEventsViewModel](../../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) exploreEventsViewModel}) - - - - - -## Implementation - -```dart -EventSearch({required this.eventList, required this.exploreEventsViewModel}); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildActions.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildActions.md deleted file mode 100644 index 955593cee..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildActions.md +++ /dev/null @@ -1,57 +0,0 @@ - - - -# buildActions method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)> buildActions -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Widgets to display after the search query in the AppBar.

-

If the query is not empty, this should typically contain a button to -clear the query and show the suggestions again (via showSuggestions) if -the results are currently shown.

-

Returns null if no widget should be shown.

-

See also:

-
    -
  • AppBar.actions, the intended use for the return value of this method.
  • -
- - - -## Implementation - -```dart -@override -List buildActions(BuildContext context) { - /// Returns an icon button which closes the search page and returns - /// to the underlying route if the query is empty. Otherwise it sets the - /// query empty. - return [ - IconButton( - onPressed: () { - query.isNotEmpty ? query = '' : close(context, eventList.first); - }, - icon: const Icon(Icons.clear), - ) - ]; -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildLeading.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildLeading.md deleted file mode 100644 index 932c3165c..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildLeading.md +++ /dev/null @@ -1,55 +0,0 @@ - - - -# buildLeading method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) buildLeading -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

A widget to display before the current query in the AppBar.

-

Typically an IconButton configured with a BackButtonIcon that exits -the search with close. One can also use an AnimatedIcon driven by -transitionAnimation, which animates from e.g. a hamburger menu to the -back button as the search overlay fades in.

-

Returns null if no widget should be shown.

-

See also:

-
    -
  • AppBar.leading, the intended use for the return value of this method.
  • -
- - - -## Implementation - -```dart -@override -Widget buildLeading(BuildContext context) { - /// Returns an icon button which closes the search page and returns - /// to the underlying route - return IconButton( - onPressed: () { - close(context, eventList.first); - }, - icon: const Icon(Icons.arrow_back), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildResults.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildResults.md deleted file mode 100644 index f2746447d..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildResults.md +++ /dev/null @@ -1,48 +0,0 @@ - - - -# buildResults method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) buildResults -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

The results shown after the user submits a search from the search page.

-

The current value of query can be used to determine what the user -searched for.

-

This method might be applied more than once to the same query. -If your buildResults method is computationally expensive, you may want -to cache the search results for one or more queries.

-

Typically, this method returns a ListView with the search results. -When the user taps on a particular search result, close should be called -with the selected result as argument. This will close the search page and -communicate the result back to the initial caller of showSearch.

- - - -## Implementation - -```dart -@override -Widget buildResults(BuildContext context) { - return Container(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestions.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestions.md deleted file mode 100644 index 214844f00..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestions.md +++ /dev/null @@ -1,57 +0,0 @@ - - - -# buildSuggestions method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) buildSuggestions -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Suggestions shown in the body of the search page while the user types a -query into the search field.

-

The delegate method is called whenever the content of query changes. -The suggestions should be based on the current query string. If the query -string is empty, it is good practice to show suggested queries based on -past queries or the current context.

-

Usually, this method will return a ListView with one ListTile per -suggestion. When ListTile.onTap is called, query should be updated -with the corresponding suggestion and the results page should be shown -by calling showResults.

- - - -## Implementation - -```dart -@override -Widget buildSuggestions(BuildContext context) { - /// Returns a scrollable list through "buildSuggestionsSuccess" function. - /// where() method Returns a new lazy Iterable with all elements that satisfy the predicate test. - /// toList( ) method is used to convert an Iterable to a List. - /// toLowerCase() converts all characters in a string to lower case. - final suggestions = eventList.where((event) { - final eventLowerCase = event.title!.toLowerCase(); - final queryLowerCase = query.toLowerCase(); - return eventLowerCase.startsWith(queryLowerCase); - }).toList(); - return buildSuggestionsSucess(suggestions); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestionsSucess.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestionsSucess.md deleted file mode 100644 index f4ebd1ef3..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/buildSuggestionsSucess.md +++ /dev/null @@ -1,71 +0,0 @@ - - - -# buildSuggestionsSucess method - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) buildSuggestionsSucess -([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> suggestions) - - - - - - - - -## Implementation - -```dart -Widget buildSuggestionsSucess(List suggestions) { - /// Takes a List of Events as parameter which is passed by the "buildSuggestions" function. - /// Returns a SingleChildScrollView of the events from the list. - /// SingleChildScrollView is box in which a single widget can be scrolled. - return SingleChildScrollView( - child: ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: suggestions.length, - itemBuilder: (BuildContext context, int index) { - final highlightedText = - suggestions[index].title!.substring(0, query.length); - final normalText = suggestions[index].title!.substring(query.length); - - /// Returns a widget that detects gestures. - /// Defers to its child for its sizing behavior. - /// Navigates to the screen with the event information. - return GestureDetector( - onTap: () { - navigationService.pushScreen( - "/eventInfo", - arguments: { - "event": suggestions[index], - "exploreEventViewModel": exploreEventsViewModel - }, - ); - }, - child: EventCard( - event: suggestions[index], - isSearchItem: true, - eventTitleHighlightedText: highlightedText, - eventTitleNormalText: normalText, - ), - ); - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/eventList.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/eventList.md deleted file mode 100644 index 9fb10e4c0..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/eventList.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# eventList property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Event](../../models_events_event_model/Event-class.md)> eventList - -_final_ - - - - - - -## Implementation - -```dart -final List eventList; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/exploreEventsViewModel.md b/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/exploreEventsViewModel.md deleted file mode 100644 index 3ca7e2f79..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/EventSearch/exploreEventsViewModel.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# exploreEventsViewModel property - - - - - - - -[ExploreEventsViewModel](../../view_model_after_auth_view_models_event_view_models_explore_events_view_model/ExploreEventsViewModel-class.md) exploreEventsViewModel - -_read / write_ - - - - - - -## Implementation - -```dart -ExploreEventsViewModel exploreEventsViewModel; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_event_search_delegate/widgets_event_search_delegate-library.md b/talawa-mobile-docs/widgets_event_search_delegate/widgets_event_search_delegate-library.md deleted file mode 100644 index 100e00d1b..000000000 --- a/talawa-mobile-docs/widgets_event_search_delegate/widgets_event_search_delegate-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# event_search_delegate library - - - - - - - - - - - -## Classes - -##### [EventSearch](../widgets_event_search_delegate/EventSearch-class.md) - - - -This class returns a list of the events which match the search query. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes-class.md b/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes-class.md deleted file mode 100644 index 29596a85e..000000000 --- a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# FromPalisadoes class - - - - - - - - - -

This class generates the text "From Palisadoes" in a custom way.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- FromPalisadoes - - - - - - - - -## Constructors - -[FromPalisadoes](../widgets_from_palisadoes/FromPalisadoes/FromPalisadoes.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_from_palisadoes/FromPalisadoes/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/FromPalisadoes.md b/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/FromPalisadoes.md deleted file mode 100644 index 2932b6ed5..000000000 --- a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/FromPalisadoes.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# FromPalisadoes constructor - - - - - - -const -FromPalisadoes({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const FromPalisadoes({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/build.md b/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/build.md deleted file mode 100644 index e4b6eb4cf..000000000 --- a/talawa-mobile-docs/widgets_from_palisadoes/FromPalisadoes/build.md +++ /dev/null @@ -1,106 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Column( - children: [ - // Customizing the word "from". - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - // This method is called for localized text. - AppLocalizations.of(context)!.strictTranslate('from'), - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ), - SizedBox( - height: SizeConfig.blockSizeHorizontal, - ), - // Customizing the word "Palisadoes". - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'PALISADOES', - style: Theme.of(context) - .textTheme - .titleSmall! - .copyWith(fontWeight: FontWeight.w700), - ), - ], - ), - SizedBox( - height: SizeConfig.blockSizeHorizontal! * 5, - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_from_palisadoes/widgets_from_palisadoes-library.md b/talawa-mobile-docs/widgets_from_palisadoes/widgets_from_palisadoes-library.md deleted file mode 100644 index f0fec4648..000000000 --- a/talawa-mobile-docs/widgets_from_palisadoes/widgets_from_palisadoes-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# from_palisadoes library - - - - - - - - - - - -## Classes - -##### [FromPalisadoes](../widgets_from_palisadoes/FromPalisadoes-class.md) - - - -This class generates the text "From Palisadoes" in a custom way. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_invite_child/iconButton.md b/talawa-mobile-docs/widgets_invite_child/iconButton.md deleted file mode 100644 index 69577b9a8..000000000 --- a/talawa-mobile-docs/widgets_invite_child/iconButton.md +++ /dev/null @@ -1,51 +0,0 @@ - - - -# iconButton function - - - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) iconButton -([String](https://api.flutter.dev/flutter/dart-core/String-class.html) key, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onTap) - - - - - -

This function is for debugging purposes. -It prints "tapped" in the console for the developer to know that the button was tapped.

- - - -## Implementation - -```dart -Widget iconButton(String key, Widget icon, Function onTap) { - return Stack( - children: [ - IconButton( - key: Key(key), - onPressed: () { - print('tapped'); - onTap(); - }, - icon: icon, - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_invite_child/invite.md b/talawa-mobile-docs/widgets_invite_child/invite.md deleted file mode 100644 index 2b55a998b..000000000 --- a/talawa-mobile-docs/widgets_invite_child/invite.md +++ /dev/null @@ -1,122 +0,0 @@ - - - -# invite function - - - - - - - - - - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) invite -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - - - - - -

This widget gives us various options to invite someone to an organization. -We can use QR code scanner, social media platforms like twitter, whatsapp, telegram and many more.

- - - -## Implementation - -```dart -Widget invite(BuildContext context) { - _appLanguageService.initialize(); - - final String url = - 'https://cyberwake.github.io/applink/invite?selectLang=${_appLanguageService.appLocal.languageCode}&setUrl=${GraphqlConfig.orgURI}&selectOrg=${userConfig.currentOrg.id!}'; - final String qrData = - '${GraphqlConfig.orgURI}?orgid=${userConfig.currentOrg.id!}'; - - // print(url); - // print(qrData); - - return Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - //Scan the below given QR code to join the organization. - QrImage( - key: const Key("QRcode"), - data: qrData, - version: QrVersions.auto, - size: 200.0, - foregroundColor: Colors.black, - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.08, - ), - Text( - 'Scan the QR to join ${userConfig.currentOrg.name}', - style: const TextStyle(color: Colors.black), - ), - SizedBox( - height: SizeConfig.screenHeight! * 0.02, - ), - //Tap on the Twitter icon to join the organization through Twitter. - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.min, - children: [ - iconButton( - "Twitter", - const FaIcon( - FontAwesomeIcons.twitter, - size: 35, - color: Color(0xFF1DA1F2), - ), - () async => SocialShare.shareTwitter('Join us', url: url), - ), - //Tap on the Whatsapp icon to join the organization through Whatsapp. - iconButton( - "WhatsApp", - CustomPaint( - size: const Size( - 50, - 50 * 1.004, - ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - painter: WhatsappLogo(), - ), - () async => SocialShare.shareWhatsapp(url), - ), - iconButton( - "Telegram", - CustomPaint( - size: Size( - 45, - (45 * 1).toDouble(), - ), //You can Replace [WIDTH] with your desired width for Custom Paint and height will be calculated automatically - painter: TelegramLogo(), - ), - () async => SocialShare.shareTelegram(url), - ), - iconButton( - "Alt", - const FaIcon( - FontAwesomeIcons.shareNodes, - size: 30, - color: Color(0xff40c351), - ), - () async => SocialShare.shareOptions(url), - ), - ], - ) - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_invite_child/widgets_invite_child-library.md b/talawa-mobile-docs/widgets_invite_child/widgets_invite_child-library.md deleted file mode 100644 index dfc730d90..000000000 --- a/talawa-mobile-docs/widgets_invite_child/widgets_invite_child-library.md +++ /dev/null @@ -1,51 +0,0 @@ - - - - -# invite_child library - - - - - - - - - - - - - - - - -## Functions - -##### [iconButton](../widgets_invite_child/iconButton.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) key, [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon, [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onTap) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -This function is for debugging purposes. -It prints "tapped" in the console for the developer to know that the button was tapped. - - - - -##### [invite](../widgets_invite_child/invite.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -This widget gives us various options to invite someone to an organization. -We can use QR code scanner, social media platforms like twitter, whatsapp, telegram and many more. - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_lang_switch/LanguageTile-class.md b/talawa-mobile-docs/widgets_lang_switch/LanguageTile-class.md deleted file mode 100644 index 436640611..000000000 --- a/talawa-mobile-docs/widgets_lang_switch/LanguageTile-class.md +++ /dev/null @@ -1,189 +0,0 @@ - - - -# LanguageTile class - - - - - - - - - -

This widget enables language switch for "internationalizing our app".

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- LanguageTile - - - - - - - - -## Constructors - -[LanguageTile](../widgets_lang_switch/LanguageTile/LanguageTile.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_lang_switch/LanguageTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_lang_switch/LanguageTile/LanguageTile.md b/talawa-mobile-docs/widgets_lang_switch/LanguageTile/LanguageTile.md deleted file mode 100644 index 34f40dc1f..000000000 --- a/talawa-mobile-docs/widgets_lang_switch/LanguageTile/LanguageTile.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# LanguageTile constructor - - - - - - -const -LanguageTile({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const LanguageTile({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_lang_switch/LanguageTile/build.md b/talawa-mobile-docs/widgets_lang_switch/LanguageTile/build.md deleted file mode 100644 index 71ec7fde9..000000000 --- a/talawa-mobile-docs/widgets_lang_switch/LanguageTile/build.md +++ /dev/null @@ -1,97 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - //AppLanguage enables to set up localized values for each locale that our app supports. - //A locale is an identifier used to select a user's language and formatting preferences. - //This represents a Unicode Language Identifier (i.e. without Locale extensions), - //except variants are not supported. - return Consumer( - builder: (context, appLang, _) { - final Language userLanguage = languages.firstWhere( - (element) => element.langCode == appLang.appLocal.languageCode, - ); - return ListTile( - key: const Key('LanguageTile'), - contentPadding: EdgeInsets.zero, - title: - Text(AppLocalizations.of(context)!.strictTranslate("Language")), - trailing: TextButton( - key: const Key('LanguageSelector'), - onPressed: () { - navigationService.pushReplacementScreen( - '/selectLang', - arguments: '0', - ); - }, - child: Text(userLanguage.langName), - ), - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_lang_switch/widgets_lang_switch-library.md b/talawa-mobile-docs/widgets_lang_switch/widgets_lang_switch-library.md deleted file mode 100644 index d09274809..000000000 --- a/talawa-mobile-docs/widgets_lang_switch/widgets_lang_switch-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# lang_switch library - - - - - - - - - - - -## Classes - -##### [LanguageTile](../widgets_lang_switch/LanguageTile-class.md) - - - -This widget enables language switch for "internationalizing our app". - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile-class.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile-class.md deleted file mode 100644 index 10202832b..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile-class.md +++ /dev/null @@ -1,219 +0,0 @@ - - - -# MemberNameTile class - - - - - - - - - -

This widget returns a tile containing the name of the member. -Along with the name, there is a circle avatar which either contains -the image uploaded by the user or the first character of his/her name in -uppercase.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- MemberNameTile - - - - - - - - -## Constructors - -[MemberNameTile](../widgets_member_name_tile/MemberNameTile/MemberNameTile.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) userName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? userImage, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onDelete}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [onDelete](../widgets_member_name_tile/MemberNameTile/onDelete.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [userImage](../widgets_member_name_tile/MemberNameTile/userImage.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? - - - - -_final_ - - - -##### [userName](../widgets_member_name_tile/MemberNameTile/userName.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_member_name_tile/MemberNameTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/MemberNameTile.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/MemberNameTile.md deleted file mode 100644 index a2ae5471c..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/MemberNameTile.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# MemberNameTile constructor - - - - - - -const -MemberNameTile({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) userName, [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? userImage, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onDelete}) - - - - - -## Implementation - -```dart -const MemberNameTile({ - Key? key, - required this.userName, - this.userImage, - required this.onDelete, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/build.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/build.md deleted file mode 100644 index 2a1b65b43..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/build.md +++ /dev/null @@ -1,119 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(top: 10, right: 5), - child: Container( - width: SizeConfig.screenWidth! * (0.3 + userName.length / 50), - height: SizeConfig.screenHeight! * 0.04, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(SizeConfig.screenHeight! * 0.02), - color: Theme.of(context).colorScheme.primaryContainer, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Background is set with the image uploaded by the user. - userImage != null - ? CircleAvatar( - radius: SizeConfig.screenHeight! * 0.0201, - backgroundImage: NetworkImage(userImage!), - ) - // If the user has not uploaded his/her image, then a circle avatar is created. - // It has the first character of the user's name in uppercase and the default background color. - : CircleAvatar( - radius: SizeConfig.screenHeight! * 0.0201, - backgroundColor: Theme.of(context).colorScheme.secondary, - child: Text( - userName.substring(0, 1).toUpperCase(), - style: const TextStyle(color: Colors.white), - ), - ), - // The name of the member in text form. - Padding( - padding: const EdgeInsets.only(left: 5), - child: Text( - userName, - ), - ), - IconButton( - padding: EdgeInsets.zero, - onPressed: () => onDelete(), - icon: const Icon( - Icons.cancel_rounded, - color: Color(0xff524F4F), - size: 19, - ), - ) - ], - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/onDelete.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/onDelete.md deleted file mode 100644 index 043ff31fe..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/onDelete.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onDelete property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) onDelete - -_final_ - - - - - - -## Implementation - -```dart -final Function onDelete; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userImage.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userImage.md deleted file mode 100644 index a26568fc3..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userImage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# userImage property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? userImage - -_final_ - - - - - - -## Implementation - -```dart -final String? userImage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userName.md b/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userName.md deleted file mode 100644 index 196794fd6..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/MemberNameTile/userName.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# userName property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) userName - -_final_ - - - - - - -## Implementation - -```dart -final String userName; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_member_name_tile/widgets_member_name_tile-library.md b/talawa-mobile-docs/widgets_member_name_tile/widgets_member_name_tile-library.md deleted file mode 100644 index a2d0955cb..000000000 --- a/talawa-mobile-docs/widgets_member_name_tile/widgets_member_name_tile-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# member_name_tile library - - - - - - - - - - - -## Classes - -##### [MemberNameTile](../widgets_member_name_tile/MemberNameTile-class.md) - - - -This widget returns a tile containing the name of the member. -Along with the name, there is a circle avatar which either contains -the image uploaded by the user or the first character of his/her name in -uppercase. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_list/OrganizationList-class.md b/talawa-mobile-docs/widgets_organization_list/OrganizationList-class.md deleted file mode 100644 index 11404fa29..000000000 --- a/talawa-mobile-docs/widgets_organization_list/OrganizationList-class.md +++ /dev/null @@ -1,200 +0,0 @@ - - - -# OrganizationList class - - - - - - - - - -

This class returns the OrganizationList widget.

-

which shows the list of all organizations exists in the URL. -This widget is used after the authentication.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- OrganizationList - - - - - - - - -## Constructors - -[OrganizationList](../widgets_organization_list/OrganizationList/OrganizationList.md) ({required [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../widgets_organization_list/OrganizationList/model.md) → [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) - - - -model is a type of SelectOrganizationViewModel which provides methods to handle the data for this component. -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_organization_list/OrganizationList/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_list/OrganizationList/OrganizationList.md b/talawa-mobile-docs/widgets_organization_list/OrganizationList/OrganizationList.md deleted file mode 100644 index d697ef284..000000000 --- a/talawa-mobile-docs/widgets_organization_list/OrganizationList/OrganizationList.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# OrganizationList constructor - - - - - - -const -OrganizationList({required [SelectOrganizationViewModel](../../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const OrganizationList({required this.model, Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_list/OrganizationList/build.md b/talawa-mobile-docs/widgets_organization_list/OrganizationList/build.md deleted file mode 100644 index b4c96e963..000000000 --- a/talawa-mobile-docs/widgets_organization_list/OrganizationList/build.md +++ /dev/null @@ -1,185 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final navigationServiceLocal = locator(); - model.organizations = []; - int noOfRefetch = 0; - return GraphQLProvider( - client: ValueNotifier(graphqlConfig.clientToQuery()), - child: Query( - options: QueryOptions( - document: gql(queries.fetchJoinInOrg), - variables: { - // fetch 15 items only, will fetch more when scrolling index is at the 3rd last item! - 'first': 15, - 'skip': 0, - }, - ), - builder: ( - QueryResult result, { - Future Function(FetchMoreOptions)? fetchMore, - Future Function()? refetch, - }) { - // checking for any errors, if true fetch again! - if (result.hasException) { - final isException = databaseFunctions.encounteredExceptionOrError( - result.exception!, - showSnackBar: noOfRefetch == 0, - ); - if (isException != null) { - if (isException) { - refetch!(); - noOfRefetch++; - } else { - refetch!(); - noOfRefetch++; - } - } - } else { - // If the result is still loading! - if (!result.isLoading) { - model.organizations = OrgInfo().fromJsonToList( - result.data!['organizationsConnection'] as List, - ); - } - - Timer(const Duration(seconds: TimeOuts.small), () { - if (model.organizations.isEmpty) { - navigationServiceLocal.showTalawaErrorDialog( - "No organizations found Please contact your admin", - MessageType.error, - ); - } - }); - return Scrollbar( - thumbVisibility: true, - interactive: true, - controller: model.allOrgController, - // Listview is a scrollable list of widgets arranged linearly. - child: ListView.separated( - controller: model.allOrgController, - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: result.isLoading - ? model.organizations.length + 1 - : model.organizations.length, - itemBuilder: (BuildContext context, int index) { - // If the index is at the end of the list! - if (index == model.organizations.length) { - // return the ListTile showing the loading icon! - return ListTile( - title: Center( - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ), - ); - } - // If the index is at the 3rd last item in the organization list. - if (index == model.organizations.length - 3) { - // return VisibilityDetector and fetch more items in the list to show up! - return VisibilityDetector( - key: const Key('OrgSelItem'), - onVisibilityChanged: (VisibilityInfo info) { - if (info.visibleFraction > 0) { - model.fetchMoreHelper( - fetchMore!, - model.organizations, - ); - } - }, - child: CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ), - ); - } - // return CustomeTile that shows a particular item in the list! - return CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ); - }, - separatorBuilder: (BuildContext context, int index) { - return Container(); - }, - ), - ); - } - return Container(); - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_list/OrganizationList/model.md b/talawa-mobile-docs/widgets_organization_list/OrganizationList/model.md deleted file mode 100644 index d08ac7e69..000000000 --- a/talawa-mobile-docs/widgets_organization_list/OrganizationList/model.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# model property - - - - - - - -[SelectOrganizationViewModel](../../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model - -_final_ - - - -

model is a type of SelectOrganizationViewModel which provides methods to handle the data for this component.

- - - -## Implementation - -```dart -final SelectOrganizationViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_list/widgets_organization_list-library.md b/talawa-mobile-docs/widgets_organization_list/widgets_organization_list-library.md deleted file mode 100644 index dfd618cfd..000000000 --- a/talawa-mobile-docs/widgets_organization_list/widgets_organization_list-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# organization_list library - - - - - - - - - - - -## Classes - -##### [OrganizationList](../widgets_organization_list/OrganizationList-class.md) - - - -This class returns the OrganizationList widget. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList-class.md b/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList-class.md deleted file mode 100644 index c7def0d5c..000000000 --- a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList-class.md +++ /dev/null @@ -1,199 +0,0 @@ - - - -# OrganizationSearchList class - - - - - - - - - -

OrganizationSearchList class return a widget that shows all -the matching organizations searched on the search bar.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- OrganizationSearchList - - - - - - - - -## Constructors - -[OrganizationSearchList](../widgets_organization_search_list/OrganizationSearchList/OrganizationSearchList.md) ({required [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [model](../widgets_organization_search_list/OrganizationSearchList/model.md) → [SelectOrganizationViewModel](../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_organization_search_list/OrganizationSearchList/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/OrganizationSearchList.md b/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/OrganizationSearchList.md deleted file mode 100644 index 96e9f385d..000000000 --- a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/OrganizationSearchList.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# OrganizationSearchList constructor - - - - - - -const -OrganizationSearchList({required [SelectOrganizationViewModel](../../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const OrganizationSearchList({required this.model, Key? key}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/build.md b/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/build.md deleted file mode 100644 index 9ce460535..000000000 --- a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/build.md +++ /dev/null @@ -1,182 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return GraphQLProvider( - client: ValueNotifier(graphqlConfig.authClient()), - child: Query( - options: QueryOptions( - document: gql(Queries().fetchJoinInOrgByName), - variables: { - 'nameStartsWith': model.searchController.text, - // fetch 30 items only, will fetch more when scrolling index is at the 3rd last item! - 'first': 30, - 'skip': 0, - }, - ), - builder: ( - QueryResult result, { - Future Function(FetchMoreOptions)? fetchMore, - Future Function()? refetch, - }) { - // checking for any errors, if true fetch again! - if (result.hasException) { - final isException = databaseFunctions.encounteredExceptionOrError( - result.exception!, - showSnackBar: false, - ); - if (isException!) { - refetch!(); - } else { - refetch!(); - } - } else { - // If the result is still loading! - if (!result.isLoading) { - model.organizations = OrgInfo().fromJsonToList( - result.data!['organizationsConnection'] as List, - ); - } - // return the Scroll bar widget for scrolling down the organizations. - return Scrollbar( - thumbVisibility: true, - interactive: true, - controller: model.controller, - // Listview is a scrollable list of widgets arranged linearly. - child: ListView.separated( - controller: model.controller, - padding: EdgeInsets.zero, - shrinkWrap: true, - itemCount: result.isLoading - ? model.organizations.length + 1 - : model.organizations.length, - itemBuilder: (BuildContext context, int index) { - // If the index is at the end of the list! - if (index == model.organizations.length) { - // return the ListTile showing the loading icon! - return ListTile( - title: Center( - child: CupertinoActivityIndicator( - radius: SizeConfig.screenWidth! * 0.065, - ), - ), - ); - } - // If the index is at the 3rd last item in the organization list. - if (index == model.organizations.length - 3) { - // return VisibilityDetector and fetch more items in the list to show up! - return VisibilityDetector( - key: const Key('OrgSelItem'), - onVisibilityChanged: (VisibilityInfo info) { - if (info.visibleFraction > 0) { - print(model.organizations.length); - model.fetchMoreHelper( - fetchMore!, - model.organizations, - ); - print(model.organizations.length); - } - }, - child: CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ), - ); - } - // return CustomeTile that shows a particular item in the list! - return CustomListTile( - index: index, - type: TileType.org, - orgInfo: model.organizations[index], - onTapOrgInfo: (item) => model.selectOrg(item), - key: Key('OrgSelItem$index'), - ); - }, - separatorBuilder: (BuildContext context, int index) { - return Padding( - padding: EdgeInsets.only( - left: SizeConfig.screenWidth! * 0.2, - right: 12, - ), - child: const Divider( - color: Color(0xFFE5E5E5), - thickness: 0.5, - ), - ); - }, - ), - ); - } - return Container(); - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/model.md b/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/model.md deleted file mode 100644 index 5906910b4..000000000 --- a/talawa-mobile-docs/widgets_organization_search_list/OrganizationSearchList/model.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# model property - - - - - - - -[SelectOrganizationViewModel](../../view_model_pre_auth_view_models_select_organization_view_model/SelectOrganizationViewModel-class.md) model - -_final_ - - - - - - -## Implementation - -```dart -final SelectOrganizationViewModel model; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_organization_search_list/widgets_organization_search_list-library.md b/talawa-mobile-docs/widgets_organization_search_list/widgets_organization_search_list-library.md deleted file mode 100644 index bfd5d1159..000000000 --- a/talawa-mobile-docs/widgets_organization_search_list/widgets_organization_search_list-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# organization_search_list library - - - - - - - - - - - -## Classes - -##### [OrganizationSearchList](../widgets_organization_search_list/OrganizationSearchList-class.md) - - - -OrganizationSearchList class return a widget that shows all -the matching organizations searched on the search bar. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller-class.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller-class.md deleted file mode 100644 index cf25bd381..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller-class.md +++ /dev/null @@ -1,209 +0,0 @@ - - - -# CustomCarouselScroller class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- CustomCarouselScroller - - - - - - -**Annotations** - -- @[visibleForTesting](https://pub.dev/documentation/meta/1.8.0/meta/visibleForTesting-constant.html) - - -## Constructors - -[CustomCarouselScroller](../widgets_pinned_carousel_widget/CustomCarouselScroller/CustomCarouselScroller.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> pinnedPosts, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [navigateToIndividualPostPage](../widgets_pinned_carousel_widget/CustomCarouselScroller/navigateToIndividualPostPage.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [pinnedPosts](../widgets_pinned_carousel_widget/CustomCarouselScroller/pinnedPosts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_pinned_carousel_widget/CustomCarouselScroller/createState.md)() [CustomCarouselScrollerState](../widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md) - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/CustomCarouselScroller.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/CustomCarouselScroller.md deleted file mode 100644 index 5cb9c6ebd..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/CustomCarouselScroller.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# CustomCarouselScroller constructor - - - - - - -const -CustomCarouselScroller({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage}) - - - - - -## Implementation - -```dart -const CustomCarouselScroller({ - Key? key, - required this.pinnedPosts, - required this.navigateToIndividualPostPage, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/createState.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/createState.md deleted file mode 100644 index 581e73be4..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[CustomCarouselScrollerState](../../widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md) createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -CustomCarouselScrollerState createState() => CustomCarouselScrollerState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/navigateToIndividualPostPage.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/navigateToIndividualPostPage.md deleted file mode 100644 index 362a98fd3..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/navigateToIndividualPostPage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# navigateToIndividualPostPage property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage - -_final_ - - - - - - -## Implementation - -```dart -final Function navigateToIndividualPostPage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/pinnedPosts.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/pinnedPosts.md deleted file mode 100644 index 4071846ea..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScroller/pinnedPosts.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pinnedPosts property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts - -_final_ - - - - - - -## Implementation - -```dart -final List pinnedPosts; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md deleted file mode 100644 index 3af904b51..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md +++ /dev/null @@ -1,268 +0,0 @@ - - - -# CustomCarouselScrollerState class - - - - - - - - - -

CustomCarouselScrollerState class return a widget that is -used to generate slider for pinned post on the top of the Home Screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[CustomCarouselScroller](../widgets_pinned_carousel_widget/CustomCarouselScroller-class.md)> -- CustomCarouselScrollerState - - - - -**Available Extensions** - -- [StateExt](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/StateExt.html) - - -**Annotations** - -- @[visibleForTesting](https://pub.dev/documentation/meta/1.8.0/meta/visibleForTesting-constant.html) - - -## Constructors - -[CustomCarouselScrollerState](../widgets_pinned_carousel_widget/CustomCarouselScrollerState/CustomCarouselScrollerState.md) () - - - - -## Properties - -##### [context](https://api.flutter.dev/flutter/widgets/State/context.html) → [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) - - - -The location in the tree where this widget builds. -_read-onlyinherited_ - - - -##### [controller](../widgets_pinned_carousel_widget/CustomCarouselScrollerState/controller.md) → [PageController](https://api.flutter.dev/flutter/widgets/PageController-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [mounted](https://api.flutter.dev/flutter/widgets/State/mounted.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether this State object is currently in a tree. -_read-onlyinherited_ - - - -##### [pindex](../widgets_pinned_carousel_widget/CustomCarouselScrollerState/pindex.md) ↔ [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [widget](https://api.flutter.dev/flutter/widgets/State/widget.html) → [CustomCarouselScroller](../widgets_pinned_carousel_widget/CustomCarouselScroller-class.md) - - - -The current configuration. -_read-onlyinherited_ - - - - - -## Methods - -##### [activate](https://api.flutter.dev/flutter/widgets/State/activate.html)() void - - - -Called when this object is reinserted into the tree after having been -removed via deactivate. -_inherited_ - - - -##### [build](../widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [deactivate](https://api.flutter.dev/flutter/widgets/State/deactivate.html)() void - - - -Called when this object is removed from the tree. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/State/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [didChangeDependencies](https://api.flutter.dev/flutter/widgets/State/didChangeDependencies.html)() void - - - -Called when a dependency of this State object changes. -_inherited_ - - - -##### [didUpdateWidget](https://api.flutter.dev/flutter/widgets/State/didUpdateWidget.html)(covariant [CustomCarouselScroller](../widgets_pinned_carousel_widget/CustomCarouselScroller-class.md) oldWidget) void - - - -Called whenever the widget configuration changes. -_inherited_ - - - -##### [dispose](https://api.flutter.dev/flutter/widgets/State/dispose.html)() void - - - -Called when this object is removed from the tree permanently. -_inherited_ - - - -##### [initState](https://api.flutter.dev/flutter/widgets/State/initState.html)() void - - - -Called when this object is inserted into the tree. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [reassemble](https://api.flutter.dev/flutter/widgets/State/reassemble.html)() void - - - -Called whenever the application is reassembled during debugging, for -example during hot reload. -_inherited_ - - - -##### [setState](https://api.flutter.dev/flutter/widgets/State/setState.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) fn) void - - - -Notify the framework that the internal state of this object has changed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/Diagnosticable/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/foundation/Diagnosticable/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A brief description of this object, usually just the runtimeType and the -hashCode. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/CustomCarouselScrollerState.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/CustomCarouselScrollerState.md deleted file mode 100644 index c6b1a3deb..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/CustomCarouselScrollerState.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# CustomCarouselScrollerState constructor - - - - - - - -CustomCarouselScrollerState() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/controller.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/controller.md deleted file mode 100644 index 1ba09ce41..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/controller.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# controller property - - - - - - - -[PageController](https://api.flutter.dev/flutter/widgets/PageController-class.html) controller - -_final_ - - - - - - -## Implementation - -```dart -final PageController controller = PageController(initialPage: 0); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/pindex.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/pindex.md deleted file mode 100644 index e609f0c28..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/pindex.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pindex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) pindex - -_read / write_ - - - - - - -## Implementation - -```dart -int pindex = 0; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel-class.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel-class.md deleted file mode 100644 index fc37c1891..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel-class.md +++ /dev/null @@ -1,218 +0,0 @@ - - - -# PinnedPostCarousel class - - - - - - - - - -

PinnedPostCarousel class returns a widget for pinned posts in -the slider/carousel on the top of the Home Screen. -Tapping on a post will redirect you to the respective post screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- PinnedPostCarousel - - - - - - - - -## Constructors - -[PinnedPostCarousel](../widgets_pinned_carousel_widget/PinnedPostCarousel/PinnedPostCarousel.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> pinnedPosts, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToPinnedPostPage, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [navigateToIndividualPostPage](../widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToIndividualPostPage.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [navigateToPinnedPostPage](../widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToPinnedPostPage.md) → [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) - - - - -_final_ - - - -##### [pinnedPosts](../widgets_pinned_carousel_widget/PinnedPostCarousel/pinnedPosts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_pinned_carousel_widget/PinnedPostCarousel/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/PinnedPostCarousel.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/PinnedPostCarousel.md deleted file mode 100644 index f2cc5392f..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/PinnedPostCarousel.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# PinnedPostCarousel constructor - - - - - - -const -PinnedPostCarousel({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToPinnedPostPage, required [Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage}) - - - - - -## Implementation - -```dart -const PinnedPostCarousel({ - Key? key, - required this.pinnedPosts, - required this.navigateToPinnedPostPage, - required this.navigateToIndividualPostPage, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/build.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/build.md deleted file mode 100644 index 8010d7a73..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/build.md +++ /dev/null @@ -1,119 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Column( - children: [ - Container( - height: 220, - color: - Theme.of(context).colorScheme.primaryContainer.withOpacity(0.5), - child: CustomCarouselScroller( - pinnedPosts: pinnedPosts, - key: const Key('Carousel'), - navigateToIndividualPostPage: navigateToIndividualPostPage, - ), - ), - // Gesture Detector in Flutter is used to detect the user's gestures on the application. - // It is a non-visual widget. Inside the gesture detector, another widget is placed and - // the gesture detector will capture all these events (gestures) and execute the tasks accordingly. - GestureDetector( - onTap: () => navigateToPinnedPostPage(), - child: Container( - height: 50, - width: SizeConfig.screenWidth, - padding: const EdgeInsets.symmetric(horizontal: 16.0), - color: Theme.of(context).colorScheme.primaryContainer, - child: Row( - children: [ - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.only(right: 8.0), - child: Icon( - Icons.article, - color: Theme.of(context).colorScheme.secondary, - ), - ), - ), - Expanded( - flex: 8, - child: Text( - AppLocalizations.of(context)! - .strictTranslate("See all Pinned news"), - style: Theme.of(context).textTheme.titleLarge, - ), - ), - const Expanded(flex: 1, child: Icon(Icons.arrow_forward_ios)) - ], - ), - ), - ) - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToIndividualPostPage.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToIndividualPostPage.md deleted file mode 100644 index 362a98fd3..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToIndividualPostPage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# navigateToIndividualPostPage property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToIndividualPostPage - -_final_ - - - - - - -## Implementation - -```dart -final Function navigateToIndividualPostPage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToPinnedPostPage.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToPinnedPostPage.md deleted file mode 100644 index 9fbe8e275..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/navigateToPinnedPostPage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# navigateToPinnedPostPage property - - - - - - - -[Function](https://api.flutter.dev/flutter/dart-core/Function-class.html) navigateToPinnedPostPage - -_final_ - - - - - - -## Implementation - -```dart -final Function navigateToPinnedPostPage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/pinnedPosts.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/pinnedPosts.md deleted file mode 100644 index 4071846ea..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/PinnedPostCarousel/pinnedPosts.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pinnedPosts property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> pinnedPosts - -_final_ - - - - - - -## Implementation - -```dart -final List pinnedPosts; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md b/talawa-mobile-docs/widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md deleted file mode 100644 index a40cca69e..000000000 --- a/talawa-mobile-docs/widgets_pinned_carousel_widget/widgets_pinned_carousel_widget-library.md +++ /dev/null @@ -1,55 +0,0 @@ - - - - -# pinned_carousel_widget library - - - - - - - - - - - -## Classes - -##### [CustomCarouselScroller](../widgets_pinned_carousel_widget/CustomCarouselScroller-class.md) - - - - - - -##### [CustomCarouselScrollerState](../widgets_pinned_carousel_widget/CustomCarouselScrollerState-class.md) - - - -CustomCarouselScrollerState class return a widget that is -used to generate slider for pinned post on the top of the Home Screen. - - -##### [PinnedPostCarousel](../widgets_pinned_carousel_widget/PinnedPostCarousel-class.md) - - - -PinnedPostCarousel class returns a widget for pinned posts in -the slider/carousel on the top of the Home Screen. -Tapping on a post will redirect you to the respective post screen. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget-class.md b/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget-class.md deleted file mode 100644 index 270bf50da..000000000 --- a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget-class.md +++ /dev/null @@ -1,201 +0,0 @@ - - - -# DescriptionTextWidget class - - - - - - - - - -

This class sets up the post page. -To implement the "show less" and "show more" functions for the text, -we divide the text into two parts: firstHalf and secondHalf. A flag is set to -track whether to display either the firstHalf or both(the entire text).

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- DescriptionTextWidget - - - - - - - - -## Constructors - -[DescriptionTextWidget](../widgets_post_detailed_page/DescriptionTextWidget/DescriptionTextWidget.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [text](../widgets_post_detailed_page/DescriptionTextWidget/text.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_post_detailed_page/DescriptionTextWidget/createState.md)() _DescriptionTextWidgetState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/DescriptionTextWidget.md b/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/DescriptionTextWidget.md deleted file mode 100644 index 9e9f4749e..000000000 --- a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/DescriptionTextWidget.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# DescriptionTextWidget constructor - - - - - - -const -DescriptionTextWidget({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) text}) - - - - - -## Implementation - -```dart -const DescriptionTextWidget({required this.text}); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/createState.md b/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/createState.md deleted file mode 100644 index 334915de6..000000000 --- a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_DescriptionTextWidgetState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_DescriptionTextWidgetState createState() => _DescriptionTextWidgetState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/text.md b/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/text.md deleted file mode 100644 index a7f6f7d63..000000000 --- a/talawa-mobile-docs/widgets_post_detailed_page/DescriptionTextWidget/text.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# text property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) text - -_final_ - - - - - - -## Implementation - -```dart -final String text; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_detailed_page/widgets_post_detailed_page-library.md b/talawa-mobile-docs/widgets_post_detailed_page/widgets_post_detailed_page-library.md deleted file mode 100644 index 62d50933d..000000000 --- a/talawa-mobile-docs/widgets_post_detailed_page/widgets_post_detailed_page-library.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -# post_detailed_page library - - - - - - - - - - - -## Classes - -##### [DescriptionTextWidget](../widgets_post_detailed_page/DescriptionTextWidget-class.md) - - - -This class sets up the post page. -To implement the "show less" and "show more" functions for the text, -we divide the text into two parts: firstHalf and secondHalf. A flag is set to -track whether to display either the firstHalf or both(the entire text). - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget-class.md b/talawa-mobile-docs/widgets_post_list_widget/PostListWidget-class.md deleted file mode 100644 index 45a69dc1c..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# PostListWidget class - - - - - - - - - -

This class receives a List of all the Post widgets and returns a ListView.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- PostListWidget - - - - - - - - -## Constructors - -[PostListWidget](../widgets_post_list_widget/PostListWidget/PostListWidget.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> posts, dynamic function([Post](../models_post_post_model/Post-class.md))?}) - - _const_ - - -## Properties - -##### [function](../widgets_post_list_widget/PostListWidget/function.md) → (dynamic Function([Post](../models_post_post_model/Post-class.md))?) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [posts](../widgets_post_list_widget/PostListWidget/posts.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../models_post_post_model/Post-class.md)> - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_post_list_widget/PostListWidget/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/PostListWidget.md b/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/PostListWidget.md deleted file mode 100644 index de0623977..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/PostListWidget.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# PostListWidget constructor - - - - - - -const -PostListWidget({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> posts, dynamic function([Post](../../models_post_post_model/Post-class.md))?}) - - - - - -## Implementation - -```dart -const PostListWidget({ - Key? key, - required this.posts, - this.function, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/build.md b/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/build.md deleted file mode 100644 index 9bc187f9a..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/build.md +++ /dev/null @@ -1,93 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return ListView.builder( - scrollDirection: Axis.vertical, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: posts.length, - itemBuilder: (BuildContext context, int index) { - return Column( - children: [ - NewsPost( - post: posts[index], - function: function, - ), - const Padding( - padding: EdgeInsets.symmetric(vertical: 10.0), - child: Divider( - height: 8, - thickness: 8, - ), - ) - ], - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/function.md b/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/function.md deleted file mode 100644 index 4e87ea5a3..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/function.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# function property - - - - - - - -(dynamic Function([Post](../../models_post_post_model/Post-class.md))?) function - -_final_ - - - - - - -## Implementation - -```dart -final Function(Post)? function; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/posts.md b/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/posts.md deleted file mode 100644 index 9a3b8ad65..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/PostListWidget/posts.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# posts property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Post](../../models_post_post_model/Post-class.md)> posts - -_final_ - - - - - - -## Implementation - -```dart -final List posts; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_list_widget/widgets_post_list_widget-library.md b/talawa-mobile-docs/widgets_post_list_widget/widgets_post_list_widget-library.md deleted file mode 100644 index 4a511f63b..000000000 --- a/talawa-mobile-docs/widgets_post_list_widget/widgets_post_list_widget-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# post_list_widget library - - - - - - - - - - - -## Classes - -##### [PostListWidget](../widgets_post_list_widget/PostListWidget-class.md) - - - -This class receives a List of all the Post widgets and returns a ListView. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/NewsPost-class.md b/talawa-mobile-docs/widgets_post_widget/NewsPost-class.md deleted file mode 100644 index 181f9935b..000000000 --- a/talawa-mobile-docs/widgets_post_widget/NewsPost-class.md +++ /dev/null @@ -1,206 +0,0 @@ - - - -# NewsPost class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- NewsPost - - - - - - - - -## Constructors - -[NewsPost](../widgets_post_widget/NewsPost/NewsPost.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Post](../models_post_post_model/Post-class.md) post, dynamic function([Post](../models_post_post_model/Post-class.md))?}) - - _const_ - - -## Properties - -##### [function](../widgets_post_widget/NewsPost/function.md) → (dynamic Function([Post](../models_post_post_model/Post-class.md))?) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [post](../widgets_post_widget/NewsPost/post.md) → [Post](../models_post_post_model/Post-class.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_post_widget/NewsPost/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/NewsPost/NewsPost.md b/talawa-mobile-docs/widgets_post_widget/NewsPost/NewsPost.md deleted file mode 100644 index 4f831c08b..000000000 --- a/talawa-mobile-docs/widgets_post_widget/NewsPost/NewsPost.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# NewsPost constructor - - - - - - -const -NewsPost({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Post](../../models_post_post_model/Post-class.md) post, dynamic function([Post](../../models_post_post_model/Post-class.md))?}) - - - - - -## Implementation - -```dart -const NewsPost({ - Key? key, - required this.post, - this.function, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/NewsPost/build.md b/talawa-mobile-docs/widgets_post_widget/NewsPost/build.md deleted file mode 100644 index 3e6ebf469..000000000 --- a/talawa-mobile-docs/widgets_post_widget/NewsPost/build.md +++ /dev/null @@ -1,164 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // const PinnedPostCarousel(), - ListTile( - leading: CustomAvatar( - isImageNull: post.creator!.image == null, - firstAlphabet: - post.creator!.firstName!.substring(0, 1).toUpperCase(), - imageUrl: post.creator!.image, - fontSize: 24, - ), - title: Text( - "${post.creator!.firstName} ${post.creator!.lastName}", - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.w400), - ), - subtitle: Text(post.getPostCreatedDuration()), - ), - DescriptionTextWidget(text: post.description!), - Container( - height: 400, - color: - Theme.of(context).colorScheme.primaryContainer.withOpacity(0.5), - child: PostContainer(id: post.sId), - ), - BaseView( - onModelReady: (model) { - model.initialize(post.likedBy ?? [], post.sId); - }, - builder: (context, model, child) => Column( - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 10), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - GestureDetector( - onTap: () => function != null ? function!(post) : {}, - child: Text( - "${model.likedBy.length} ${AppLocalizations.of(context)!.strictTranslate("Likes")}", - style: const TextStyle( - fontFamily: 'open-sans', - fontWeight: FontWeight.w800, - ), - ), - ), - GestureDetector( - onTap: () => function != null ? function!(post) : {}, - child: Text( - "${post.comments!.length} ${AppLocalizations.of(context)!.strictTranslate("comments")}", - ), - ) - ], - ), - ), - const Padding( - padding: EdgeInsets.symmetric(horizontal: 16.0), - child: Divider(), - ), - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 5), - child: Row( - children: [ - GestureDetector( - onTap: () { - model.toggleIsLiked(); - }, - child: Icon( - Icons.thumb_up, - color: model.isLiked - ? Theme.of(context).colorScheme.secondary - : const Color(0xff737373), - ), - ), - GestureDetector( - onTap: () => function != null ? function!(post) : {}, - child: const Padding( - padding: EdgeInsets.only(left: 18.0), - child: Icon( - Icons.comment, - color: Color(0xff737373), - ), - ), - ), - ], - ), - ), - ], - ), - ), - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/NewsPost/function.md b/talawa-mobile-docs/widgets_post_widget/NewsPost/function.md deleted file mode 100644 index 4e87ea5a3..000000000 --- a/talawa-mobile-docs/widgets_post_widget/NewsPost/function.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# function property - - - - - - - -(dynamic Function([Post](../../models_post_post_model/Post-class.md))?) function - -_final_ - - - - - - -## Implementation - -```dart -final Function(Post)? function; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/NewsPost/post.md b/talawa-mobile-docs/widgets_post_widget/NewsPost/post.md deleted file mode 100644 index e986becbc..000000000 --- a/talawa-mobile-docs/widgets_post_widget/NewsPost/post.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# post property - - - - - - - -[Post](../../models_post_post_model/Post-class.md) post - -_final_ - - - - - - -## Implementation - -```dart -final Post post; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainer-class.md b/talawa-mobile-docs/widgets_post_widget/PostContainer-class.md deleted file mode 100644 index 5ae9ca9e6..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainer-class.md +++ /dev/null @@ -1,197 +0,0 @@ - - - -# PostContainer class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- PostContainer - - - - - - - - -## Constructors - -[PostContainer](../widgets_post_widget/PostContainer/PostContainer.md) ({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [id](../widgets_post_widget/PostContainer/id.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_post_widget/PostContainer/createState.md)() [PostContainerState](../widgets_post_widget/PostContainerState-class.md) - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainer/PostContainer.md b/talawa-mobile-docs/widgets_post_widget/PostContainer/PostContainer.md deleted file mode 100644 index dc9ee62f1..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainer/PostContainer.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# PostContainer constructor - - - - - - -const -PostContainer({required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const PostContainer({ - required this.id, - Key? key, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainer/createState.md b/talawa-mobile-docs/widgets_post_widget/PostContainer/createState.md deleted file mode 100644 index 85cd7e218..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainer/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[PostContainerState](../../widgets_post_widget/PostContainerState-class.md) createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -PostContainerState createState() => PostContainerState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainer/id.md b/talawa-mobile-docs/widgets_post_widget/PostContainer/id.md deleted file mode 100644 index 672a052c2..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainer/id.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# id property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) id - -_final_ - - - - - - -## Implementation - -```dart -final String id; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState-class.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState-class.md deleted file mode 100644 index e8506d7a1..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState-class.md +++ /dev/null @@ -1,281 +0,0 @@ - - - -# PostContainerState class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[PostContainer](../widgets_post_widget/PostContainer-class.md)> -- PostContainerState - - - - -**Available Extensions** - -- [StateExt](https://pub.dev/documentation/tutorial_coach_mark/1.2.9/tutorial_coach_mark/StateExt.html) - - - - -## Constructors - -[PostContainerState](../widgets_post_widget/PostContainerState/PostContainerState.md) () - - - - -## Properties - -##### [context](https://api.flutter.dev/flutter/widgets/State/context.html) → [BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) - - - -The location in the tree where this widget builds. -_read-onlyinherited_ - - - -##### [controller](../widgets_post_widget/PostContainerState/controller.md) → [PageController](https://api.flutter.dev/flutter/widgets/PageController-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/dart-core/Object/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [inView](../widgets_post_widget/PostContainerState/inView.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [mounted](https://api.flutter.dev/flutter/widgets/State/mounted.html) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -Whether this State object is currently in a tree. -_read-onlyinherited_ - - - -##### [pindex](../widgets_post_widget/PostContainerState/pindex.md) ↔ [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_read / write_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [startedPlaying](../widgets_post_widget/PostContainerState/startedPlaying.md) ↔ [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_read / write_ - - - -##### [widget](https://api.flutter.dev/flutter/widgets/State/widget.html) → [PostContainer](../widgets_post_widget/PostContainer-class.md) - - - -The current configuration. -_read-onlyinherited_ - - - - - -## Methods - -##### [activate](https://api.flutter.dev/flutter/widgets/State/activate.html)() void - - - -Called when this object is reinserted into the tree after having been -removed via deactivate. -_inherited_ - - - -##### [build](../widgets_post_widget/PostContainerState/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [deactivate](https://api.flutter.dev/flutter/widgets/State/deactivate.html)() void - - - -Called when this object is removed from the tree. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/State/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [didChangeDependencies](https://api.flutter.dev/flutter/widgets/State/didChangeDependencies.html)() void - - - -Called when a dependency of this State object changes. -_inherited_ - - - -##### [didUpdateWidget](https://api.flutter.dev/flutter/widgets/State/didUpdateWidget.html)(covariant [PostContainer](../widgets_post_widget/PostContainer-class.md) oldWidget) void - - - -Called whenever the widget configuration changes. -_inherited_ - - - -##### [dispose](../widgets_post_widget/PostContainerState/dispose.md)() void - - - -Called when this object is removed from the tree permanently. -_override_ - - - -##### [initState](../widgets_post_widget/PostContainerState/initState.md)() void - - - -Called when this object is inserted into the tree. -_override_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [reassemble](https://api.flutter.dev/flutter/widgets/State/reassemble.html)() void - - - -Called whenever the application is reassembled during debugging, for -example during hot reload. -_inherited_ - - - -##### [setState](https://api.flutter.dev/flutter/widgets/State/setState.html)([VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) fn) void - - - -Notify the framework that the internal state of this object has changed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/Diagnosticable/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/foundation/Diagnosticable/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A brief description of this object, usually just the runtimeType and the -hashCode. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/PostContainerState.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/PostContainerState.md deleted file mode 100644 index 14ae45f06..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/PostContainerState.md +++ /dev/null @@ -1,24 +0,0 @@ - - - -# PostContainerState constructor - - - - - - - -PostContainerState() - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/controller.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/controller.md deleted file mode 100644 index 1ba09ce41..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/controller.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# controller property - - - - - - - -[PageController](https://api.flutter.dev/flutter/widgets/PageController-class.html) controller - -_final_ - - - - - - -## Implementation - -```dart -final PageController controller = PageController(initialPage: 0); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/dispose.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/dispose.md deleted file mode 100644 index 74c5469f9..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/dispose.md +++ /dev/null @@ -1,65 +0,0 @@ - - - -# dispose method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void dispose -() - -_override_ - - - -

Called when this object is removed from the tree permanently.

-

The framework calls this method when this State object will never -build again. After the framework calls dispose, the State object is -considered unmounted and the mounted property is false. It is an error -to call setState at this point. This stage of the lifecycle is terminal: -there is no way to remount a State object that has been disposed.

-

Subclasses should override this method to release any resources retained -by this object (e.g., stop any active animations).

-

If a State's build method depends on an object that can itself -change state, for example a ChangeNotifier or Stream, or some -other object to which one can subscribe to receive notifications, then -be sure to subscribe and unsubscribe properly in initState, -didUpdateWidget, and dispose:

-
    -
  • In initState, subscribe to the object.
  • -
  • In didUpdateWidget unsubscribe from the old object and subscribe -to the new one if the updated widget configuration requires -replacing the object.
  • -
  • In dispose, unsubscribe from the object.
  • -
-

Implementations of this method should end with a call to the inherited -method, as in super.dispose().

-

See also:

- - - - -## Implementation - -```dart -@override -void dispose() { - controller.dispose(); - super.dispose(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/inView.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/inView.md deleted file mode 100644 index 92c14bb97..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/inView.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# inView property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) inView - -_read / write_ - - - - - - -## Implementation - -```dart -bool inView = true; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/initState.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/initState.md deleted file mode 100644 index 7e0019516..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/initState.md +++ /dev/null @@ -1,62 +0,0 @@ - - - -# initState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -void initState -() - -_override_ - - - -

Called when this object is inserted into the tree.

-

The framework will call this method exactly once for each State object -it creates.

-

Override this method to perform initialization that depends on the -location at which this object was inserted into the tree (i.e., context) -or on the widget used to configure this object (i.e., widget).

-

If a State's build method depends on an object that can itself -change state, for example a ChangeNotifier or Stream, or some -other object to which one can subscribe to receive notifications, then -be sure to subscribe and unsubscribe properly in initState, -didUpdateWidget, and dispose:

-
    -
  • In initState, subscribe to the object.
  • -
  • In didUpdateWidget unsubscribe from the old object and subscribe -to the new one if the updated widget configuration requires -replacing the object.
  • -
  • In dispose, unsubscribe from the object.
  • -
-

You cannot use BuildContext.dependOnInheritedWidgetOfExactType from this -method. However, didChangeDependencies will be called immediately -following this method, and BuildContext.dependOnInheritedWidgetOfExactType can -be used there.

-

Implementations of this method should start with a call to the inherited -method, as in super.initState().

- - - -## Implementation - -```dart -@override -void initState() { - super.initState(); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/pindex.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/pindex.md deleted file mode 100644 index e609f0c28..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/pindex.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# pindex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) pindex - -_read / write_ - - - - - - -## Implementation - -```dart -int pindex = 0; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/PostContainerState/startedPlaying.md b/talawa-mobile-docs/widgets_post_widget/PostContainerState/startedPlaying.md deleted file mode 100644 index 765d3d6af..000000000 --- a/talawa-mobile-docs/widgets_post_widget/PostContainerState/startedPlaying.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# startedPlaying property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) startedPlaying - -_read / write_ - - - - - - -## Implementation - -```dart -bool startedPlaying = false; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_post_widget/widgets_post_widget-library.md b/talawa-mobile-docs/widgets_post_widget/widgets_post_widget-library.md deleted file mode 100644 index 88746391b..000000000 --- a/talawa-mobile-docs/widgets_post_widget/widgets_post_widget-library.md +++ /dev/null @@ -1,52 +0,0 @@ - - - - -# post_widget library - - - - - - - - - - - -## Classes - -##### [NewsPost](../widgets_post_widget/NewsPost-class.md) - - - - - - -##### [PostContainer](../widgets_post_widget/PostContainer-class.md) - - - - - - -##### [PostContainerState](../widgets_post_widget/PostContainerState-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton-class.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton-class.md deleted file mode 100644 index f4dd829d2..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton-class.md +++ /dev/null @@ -1,253 +0,0 @@ - - - -# RaisedRoundedButton class - - - - - - - - - -

This class returns a widget for a raised rounded button, -for example: login button in login screen.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- RaisedRoundedButton - - - - - - - - -## Constructors - -[RaisedRoundedButton](../widgets_raised_round_edge_button/RaisedRoundedButton/RaisedRoundedButton.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) buttonLabel, required [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) backgroundColor, required [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) textColor, required dynamic onTap(), [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? height, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? width, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showArrow = false}) - - _const_ - - -## Properties - -##### [backgroundColor](../widgets_raised_round_edge_button/RaisedRoundedButton/backgroundColor.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - -_final_ - - - -##### [buttonLabel](../widgets_raised_round_edge_button/RaisedRoundedButton/buttonLabel.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [height](../widgets_raised_round_edge_button/RaisedRoundedButton/height.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_final_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [onTap](../widgets_raised_round_edge_button/RaisedRoundedButton/onTap.md) → dynamic Function() - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [showArrow](../widgets_raised_round_edge_button/RaisedRoundedButton/showArrow.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [textColor](../widgets_raised_round_edge_button/RaisedRoundedButton/textColor.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) - - - - -_final_ - - - -##### [width](../widgets_raised_round_edge_button/RaisedRoundedButton/width.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? - - - - -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_raised_round_edge_button/RaisedRoundedButton/createState.md)() _RaisedRoundedButtonState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/RaisedRoundedButton.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/RaisedRoundedButton.md deleted file mode 100644 index 99d95d5c8..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/RaisedRoundedButton.md +++ /dev/null @@ -1,38 +0,0 @@ - - - -# RaisedRoundedButton constructor - - - - - - -const -RaisedRoundedButton({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) buttonLabel, required [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) backgroundColor, required [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) textColor, required dynamic onTap(), [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? height, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? width, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showArrow = false}) - - - - - -## Implementation - -```dart -const RaisedRoundedButton({ - required Key key, - required this.buttonLabel, - required this.backgroundColor, - required this.textColor, - required this.onTap, - this.height, - this.width, - this.showArrow = false, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/backgroundColor.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/backgroundColor.md deleted file mode 100644 index 07df8f904..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/backgroundColor.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# backgroundColor property - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) backgroundColor - -_final_ - - - - - - -## Implementation - -```dart -final Color backgroundColor; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/buttonLabel.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/buttonLabel.md deleted file mode 100644 index 9dad55b19..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/buttonLabel.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# buttonLabel property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) buttonLabel - -_final_ - - - - - - -## Implementation - -```dart -final String buttonLabel; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/createState.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/createState.md deleted file mode 100644 index 153347625..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_RaisedRoundedButtonState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_RaisedRoundedButtonState createState() => _RaisedRoundedButtonState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/height.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/height.md deleted file mode 100644 index 3db9a95b5..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/height.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# height property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? height - -_final_ - - - - - - -## Implementation - -```dart -final double? height; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/onTap.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/onTap.md deleted file mode 100644 index 71f15a9ad..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/onTap.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onTap property - - - - - - - -dynamic Function() onTap - -_final_ - - - - - - -## Implementation - -```dart -final Function() onTap; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/showArrow.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/showArrow.md deleted file mode 100644 index 989fd8683..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/showArrow.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# showArrow property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showArrow - -_final_ - - - - - - -## Implementation - -```dart -final bool showArrow; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/textColor.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/textColor.md deleted file mode 100644 index 7c04e7051..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/textColor.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# textColor property - - - - - - - -[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) textColor - -_final_ - - - - - - -## Implementation - -```dart -final Color textColor; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/width.md b/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/width.md deleted file mode 100644 index e35287c28..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/RaisedRoundedButton/width.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# width property - - - - - - - -[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? width - -_final_ - - - - - - -## Implementation - -```dart -final double? width; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md b/talawa-mobile-docs/widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md deleted file mode 100644 index e0cb23ea2..000000000 --- a/talawa-mobile-docs/widgets_raised_round_edge_button/widgets_raised_round_edge_button-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# raised_round_edge_button library - - - - - - - - - - - -## Classes - -##### [RaisedRoundedButton](../widgets_raised_round_edge_button/RaisedRoundedButton-class.md) - - - -This class returns a widget for a raised rounded button, -for example: login button in login screen. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_rich_text/CustomRichText-class.md b/talawa-mobile-docs/widgets_rich_text/CustomRichText-class.md deleted file mode 100644 index c57b561fd..000000000 --- a/talawa-mobile-docs/widgets_rich_text/CustomRichText-class.md +++ /dev/null @@ -1,199 +0,0 @@ - - - -# CustomRichText class - - - - - - - - - -

CustomRichText class returns a widget for customized rich/bold text. -These rich text are being used in form for changing the password.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- CustomRichText - - - - - - - - -## Constructors - -[CustomRichText](../widgets_rich_text/CustomRichText/CustomRichText.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> words}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [words](../widgets_rich_text/CustomRichText/words.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_rich_text/CustomRichText/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_rich_text/CustomRichText/CustomRichText.md b/talawa-mobile-docs/widgets_rich_text/CustomRichText/CustomRichText.md deleted file mode 100644 index a8ef77480..000000000 --- a/talawa-mobile-docs/widgets_rich_text/CustomRichText/CustomRichText.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# CustomRichText constructor - - - - - - -const -CustomRichText({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> words}) - - - - - -## Implementation - -```dart -const CustomRichText({required Key key, required this.words}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_rich_text/CustomRichText/build.md b/talawa-mobile-docs/widgets_rich_text/CustomRichText/build.md deleted file mode 100644 index 47b346239..000000000 --- a/talawa-mobile-docs/widgets_rich_text/CustomRichText/build.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return RichText( - textAlign: TextAlign.start, - text: TextSpan( - text: - "${AppLocalizations.of(context)!.strictTranslate(words[0]['text'].toString().trim())} ", - style: words[0]['textStyle'] as TextStyle, - children: List.generate( - words.length - 1, - (index) => TextSpan( - text: - "${AppLocalizations.of(context)!.strictTranslate(words[index + 1]['text'].toString().trim())} ", - style: words[index + 1]['textStyle'] as TextStyle, - ), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_rich_text/CustomRichText/words.md b/talawa-mobile-docs/widgets_rich_text/CustomRichText/words.md deleted file mode 100644 index 6f9a30900..000000000 --- a/talawa-mobile-docs/widgets_rich_text/CustomRichText/words.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# words property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Map](https://api.flutter.dev/flutter/dart-core/Map-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html), dynamic>> words - -_final_ - - - - - - -## Implementation - -```dart -final List> words; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_rich_text/widgets_rich_text-library.md b/talawa-mobile-docs/widgets_rich_text/widgets_rich_text-library.md deleted file mode 100644 index 40221a34b..000000000 --- a/talawa-mobile-docs/widgets_rich_text/widgets_rich_text-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# rich_text library - - - - - - - - - - - -## Classes - -##### [CustomRichText](../widgets_rich_text/CustomRichText-class.md) - - - -CustomRichText class returns a widget for customized rich/bold text. -These rich text are being used in form for changing the password. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator-class.md b/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator-class.md deleted file mode 100644 index 55f30f008..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator-class.md +++ /dev/null @@ -1,208 +0,0 @@ - - - -# SignupProgressIndicator class - - - - - - - - - -

This class returns a widget for showing the -progress indicator/flow while Signing Up/ Registration.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- SignupProgressIndicator - - - - - - - - -## Constructors - -[SignupProgressIndicator](../widgets_signup_progress_indicator/SignupProgressIndicator/SignupProgressIndicator.md) ({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) currentPageIndex}) - - - - -## Properties - -##### [currentPageIndex](../widgets_signup_progress_indicator/SignupProgressIndicator/currentPageIndex.md) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [progressLabel](../widgets_signup_progress_indicator/SignupProgressIndicator/progressLabel.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_signup_progress_indicator/SignupProgressIndicator/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/SignupProgressIndicator.md b/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/SignupProgressIndicator.md deleted file mode 100644 index a3b52a67b..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/SignupProgressIndicator.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# SignupProgressIndicator constructor - - - - - - - -SignupProgressIndicator({required [Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, required [int](https://api.flutter.dev/flutter/dart-core/int-class.html) currentPageIndex}) - - - - - -## Implementation - -```dart -SignupProgressIndicator({required Key key, required this.currentPageIndex}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/build.md b/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/build.md deleted file mode 100644 index 7ed129c74..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/build.md +++ /dev/null @@ -1,119 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Container( - alignment: Alignment.center, - height: SizeConfig.screenHeight! * 0.15, - child: Timeline.tileBuilder( - scrollDirection: Axis.horizontal, - physics: const NeverScrollableScrollPhysics(), - padding: EdgeInsets.zero, - builder: TimelineTileBuilder.connected( - contentsBuilder: (_, index) => Text( - AppLocalizations.of(context)!.strictTranslate(progressLabel[index]), - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - // If the flow index is greater than currentPageIndex then - // show green(visited) color else show fade(not visited) color. - color: index <= currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - ), - textAlign: TextAlign.center, - ), - connectorBuilder: (_, index, __) { - return SolidLineConnector( - space: 30, - // If the flow index is greater than currentPageIndex then - // show green(visited) color else show fade(not visited) color. - color: index < currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - ); - }, - indicatorBuilder: (_, index) { - return DotIndicator( - size: 25, - color: index <= currentPageIndex - ? const Color(0xFF008A37) - : const Color(0xFF737373), - child: index < currentPageIndex - ? const Icon( - Icons.done, - color: Colors.white, - size: 20, - ) - : const SizedBox(), - ); - }, - itemExtentBuilder: (_, __) => MediaQuery.of(context).size.width / 3, - itemCount: 3, - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/currentPageIndex.md b/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/currentPageIndex.md deleted file mode 100644 index f5f2af3ea..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/currentPageIndex.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# currentPageIndex property - - - - - - - -[int](https://api.flutter.dev/flutter/dart-core/int-class.html) currentPageIndex - -_final_ - - - - - - -## Implementation - -```dart -final int currentPageIndex; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/progressLabel.md b/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/progressLabel.md deleted file mode 100644 index 7bb05930d..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/SignupProgressIndicator/progressLabel.md +++ /dev/null @@ -1,36 +0,0 @@ - - - -# progressLabel property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[String](https://api.flutter.dev/flutter/dart-core/String-class.html)> progressLabel - -_final_ - - - - - - -## Implementation - -```dart -final List progressLabel = [ - 'Select\nOrganization', - 'Enter Details', - 'Final', -]; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md b/talawa-mobile-docs/widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md deleted file mode 100644 index 4986b8387..000000000 --- a/talawa-mobile-docs/widgets_signup_progress_indicator/widgets_signup_progress_indicator-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# signup_progress_indicator library - - - - - - - - - - - -## Classes - -##### [SignupProgressIndicator](../widgets_signup_progress_indicator/SignupProgressIndicator-class.md) - - - -This class returns a widget for showing the -progress indicator/flow while Signing Up/ Registration. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog-class.md b/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog-class.md deleted file mode 100644 index 3718686e1..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog-class.md +++ /dev/null @@ -1,206 +0,0 @@ - - - -# TalawaErrorDialog class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TalawaErrorDialog - - - - - - - - -## Constructors - -[TalawaErrorDialog](../widgets_talawa_error_dialog/TalawaErrorDialog/TalawaErrorDialog.md) ([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MessageType](../enums_enums/MessageType.md) messageType}) - - _const_ - - -## Properties - -##### [errorMessage](../widgets_talawa_error_dialog/TalawaErrorDialog/errorMessage.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [messageType](../widgets_talawa_error_dialog/TalawaErrorDialog/messageType.md) → [MessageType](../enums_enums/MessageType.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_talawa_error_dialog/TalawaErrorDialog/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/TalawaErrorDialog.md b/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/TalawaErrorDialog.md deleted file mode 100644 index 7ae8a4bd2..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/TalawaErrorDialog.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# TalawaErrorDialog constructor - - - - - - -const -TalawaErrorDialog([String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, {[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [MessageType](../../enums_enums/MessageType.md) messageType}) - - - - - -## Implementation - -```dart -const TalawaErrorDialog( - this.errorMessage, { - Key? key, - required this.messageType, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/build.md b/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/build.md deleted file mode 100644 index a8c9273fa..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/build.md +++ /dev/null @@ -1,168 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return SizedBox( - child: AlertDialog( - content: SizedBox( - width: 200, - height: 135, - child: Column( - children: [ - SvgPicture.asset( - messageType == MessageType.error - ? 'assets/images/Vector.svg' - : messageType == MessageType.warning - ? 'assets/images/Vector.svg' - : messageType == MessageType.info - ? 'assets/icons/Info.svg' - : 'assets/images/Vector.svg', - colorFilter: ColorFilter.mode( - messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - BlendMode.srcIn, - ), - ), - const SizedBox( - height: 5, - ), - Text( - messageType == MessageType.error - ? AppLocalizations.of(context)!.strictTranslate('Error') - : messageType == MessageType.warning - ? AppLocalizations.of(context)! - .strictTranslate('Warning') - : messageType == MessageType.info - ? AppLocalizations.of(context)! - .strictTranslate('Information') - : AppLocalizations.of(context)! - .strictTranslate('Error'), - style: TextStyle( - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - fontSize: 20, - ), - textAlign: TextAlign.center, - ), - const SizedBox( - height: 5, - ), - AutoSizeText( - AppLocalizations.of(context)!.strictTranslate(errorMessage), - style: const TextStyle(fontSize: 16), - maxLines: 3, - ), - const SizedBox( - height: 19, - ), - ], - ), - ), - actions: [ - // Expanded( - // child: - TextButton( - style: TextButton.styleFrom( - backgroundColor: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.red - : messageType == MessageType.info - ? Colors.black26 - : Colors.red, - foregroundColor: Colors.red, - ), - child: Text( - messageType == MessageType.error - ? 'Dismiss' - : messageType == MessageType.warning - ? 'Dismiss' - : messageType == MessageType.info - ? 'Close' - : 'Dismiss', - style: const TextStyle(color: Color.fromRGBO(202, 202, 202, 1)), - ), - onPressed: () { - Navigator.of(context).pop(); - }, - ), - // ), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/errorMessage.md b/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/errorMessage.md deleted file mode 100644 index b9844493a..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/errorMessage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# errorMessage property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage - -_final_ - - - - - - -## Implementation - -```dart -final String errorMessage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/messageType.md b/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/messageType.md deleted file mode 100644 index 62809db57..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/TalawaErrorDialog/messageType.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# messageType property - - - - - - - -[MessageType](../../enums_enums/MessageType.md) messageType - -_final_ - - - - - - -## Implementation - -```dart -final MessageType messageType; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md b/talawa-mobile-docs/widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md deleted file mode 100644 index c5a3d6a1a..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_dialog/widgets_talawa_error_dialog-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# talawa_error_dialog library - - - - - - - - - - - -## Classes - -##### [TalawaErrorDialog](../widgets_talawa_error_dialog/TalawaErrorDialog-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md deleted file mode 100644 index 8d8412b33..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md +++ /dev/null @@ -1,206 +0,0 @@ - - - -# TalawaErrorSnackBar class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TalawaErrorSnackBar - - - - - - - - -## Constructors - -[TalawaErrorSnackBar](../widgets_talawa_error_snackbar/TalawaErrorSnackBar/TalawaErrorSnackBar.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, required [MessageType](../enums_enums/MessageType.md) messageType}) - - _const_ - - -## Properties - -##### [errorMessage](../widgets_talawa_error_snackbar/TalawaErrorSnackBar/errorMessage.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [messageType](../widgets_talawa_error_snackbar/TalawaErrorSnackBar/messageType.md) → [MessageType](../enums_enums/MessageType.md) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_talawa_error_snackbar/TalawaErrorSnackBar/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/TalawaErrorSnackBar.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/TalawaErrorSnackBar.md deleted file mode 100644 index c8d6fa0af..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/TalawaErrorSnackBar.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# TalawaErrorSnackBar constructor - - - - - - -const -TalawaErrorSnackBar({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage, required [MessageType](../../enums_enums/MessageType.md) messageType}) - - - - - -## Implementation - -```dart -const TalawaErrorSnackBar({ - Key? key, - required this.errorMessage, - required this.messageType, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/build.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/build.md deleted file mode 100644 index 34867b9c1..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/build.md +++ /dev/null @@ -1,121 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Row( - children: [ - Container( - width: 20, - height: 80, - decoration: BoxDecoration( - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - ), - ), - const SizedBox( - width: 10, - ), - Icon( - messageType == MessageType.error - ? Icons.error - : messageType == MessageType.warning - ? Icons.error - : messageType == MessageType.info - ? Icons.info_outline - : Icons.error, - // Icons.error, - color: messageType == MessageType.error - ? Colors.red - : messageType == MessageType.warning - ? Colors.yellow - : messageType == MessageType.info - ? Colors.green - : Colors.red, - size: 35, - ), - const SizedBox( - width: 10, - ), - Expanded( - flex: 1, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Text( - AppLocalizations.of(context)!.strictTranslate(errorMessage), - style: const TextStyle(color: Colors.white), - ), - ), - ) - ], - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/errorMessage.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/errorMessage.md deleted file mode 100644 index b9844493a..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/errorMessage.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# errorMessage property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) errorMessage - -_final_ - - - - - - -## Implementation - -```dart -final String errorMessage; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/messageType.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/messageType.md deleted file mode 100644 index 62809db57..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/TalawaErrorSnackBar/messageType.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# messageType property - - - - - - - -[MessageType](../../enums_enums/MessageType.md) messageType - -_final_ - - - - - - -## Implementation - -```dart -final MessageType messageType; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md b/talawa-mobile-docs/widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md deleted file mode 100644 index cf70f2bf6..000000000 --- a/talawa-mobile-docs/widgets_talawa_error_snackbar/widgets_talawa_error_snackbar-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# talawa_error_snackbar library - - - - - - - - - - - -## Classes - -##### [TalawaErrorSnackBar](../widgets_talawa_error_snackbar/TalawaErrorSnackBar-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/DescriptionField-class.md b/talawa-mobile-docs/widgets_task_form/DescriptionField-class.md deleted file mode 100644 index f6fad42ea..000000000 --- a/talawa-mobile-docs/widgets_task_form/DescriptionField-class.md +++ /dev/null @@ -1,188 +0,0 @@ - - - -# DescriptionField class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- DescriptionField - - - - - - - - -## Constructors - -[DescriptionField](../widgets_task_form/DescriptionField/DescriptionField.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_task_form/DescriptionField/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/DescriptionField/DescriptionField.md b/talawa-mobile-docs/widgets_task_form/DescriptionField/DescriptionField.md deleted file mode 100644 index cc0418776..000000000 --- a/talawa-mobile-docs/widgets_task_form/DescriptionField/DescriptionField.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# DescriptionField constructor - - - - - - -const -DescriptionField({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const DescriptionField({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/DescriptionField/build.md b/talawa-mobile-docs/widgets_task_form/DescriptionField/build.md deleted file mode 100644 index 27bb4f287..000000000 --- a/talawa-mobile-docs/widgets_task_form/DescriptionField/build.md +++ /dev/null @@ -1,100 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final taskDescriptionTextController = context.select( - (CreateTaskViewModel model) => model.taskDescriptionTextController, - ); - - return TextFormField( - keyboardType: TextInputType.multiline, - controller: taskDescriptionTextController, - validator: (value) => Validator.validateEventForm(value!, 'Description'), - maxLines: 10, - minLines: 1, - decoration: InputDecoration( - hintText: 'Describe the task', - labelText: 'Add Description', - labelStyle: Theme.of(context).textTheme.titleMedium, - border: InputBorder.none, - focusedBorder: InputBorder.none, - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.view_headline, - size: 25, - ), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm-class.md b/talawa-mobile-docs/widgets_task_form/TaskForm-class.md deleted file mode 100644 index 6f56ca2b4..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm-class.md +++ /dev/null @@ -1,215 +0,0 @@ - - - -# TaskForm class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- TaskForm - - - - - - - - -## Constructors - -[TaskForm](../widgets_task_form/TaskForm/TaskForm.md) ({required [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> onSave(), required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) actionText, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [actionText](../widgets_task_form/TaskForm/actionText.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [onSave](../widgets_task_form/TaskForm/onSave.md) → [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> Function() - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [title](../widgets_task_form/TaskForm/title.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_task_form/TaskForm/createState.md)() [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[TaskForm](../widgets_task_form/TaskForm-class.md)> - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm/TaskForm.md b/talawa-mobile-docs/widgets_task_form/TaskForm/TaskForm.md deleted file mode 100644 index 4270294a8..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm/TaskForm.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# TaskForm constructor - - - - - - -const -TaskForm({required [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> onSave(), required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) title, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) actionText, [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const TaskForm({ - required this.onSave, - required this.title, - required this.actionText, - Key? key, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm/actionText.md b/talawa-mobile-docs/widgets_task_form/TaskForm/actionText.md deleted file mode 100644 index ca533420f..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm/actionText.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# actionText property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) actionText - -_final_ - - - - - - -## Implementation - -```dart -final String actionText; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm/createState.md b/talawa-mobile-docs/widgets_task_form/TaskForm/createState.md deleted file mode 100644 index f74687116..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[State](https://api.flutter.dev/flutter/widgets/State-class.html)<[TaskForm](../../widgets_task_form/TaskForm-class.md)> createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -State createState() => _TaskFormState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm/onSave.md b/talawa-mobile-docs/widgets_task_form/TaskForm/onSave.md deleted file mode 100644 index 3a1d1a70c..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm/onSave.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# onSave property - - - - - - - -[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)> Function() onSave - -_final_ - - - - - - -## Implementation - -```dart -final Future Function() onSave; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TaskForm/title.md b/talawa-mobile-docs/widgets_task_form/TaskForm/title.md deleted file mode 100644 index 7c14a3864..000000000 --- a/talawa-mobile-docs/widgets_task_form/TaskForm/title.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# title property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) title - -_final_ - - - - - - -## Implementation - -```dart -final String title; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TitleField-class.md b/talawa-mobile-docs/widgets_task_form/TitleField-class.md deleted file mode 100644 index 3a1b005b5..000000000 --- a/talawa-mobile-docs/widgets_task_form/TitleField-class.md +++ /dev/null @@ -1,188 +0,0 @@ - - - -# TitleField class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TitleField - - - - - - - - -## Constructors - -[TitleField](../widgets_task_form/TitleField/TitleField.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_task_form/TitleField/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TitleField/TitleField.md b/talawa-mobile-docs/widgets_task_form/TitleField/TitleField.md deleted file mode 100644 index 4ceaed2f9..000000000 --- a/talawa-mobile-docs/widgets_task_form/TitleField/TitleField.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# TitleField constructor - - - - - - -const -TitleField({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const TitleField({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/TitleField/build.md b/talawa-mobile-docs/widgets_task_form/TitleField/build.md deleted file mode 100644 index 8efb4db8d..000000000 --- a/talawa-mobile-docs/widgets_task_form/TitleField/build.md +++ /dev/null @@ -1,98 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final taskTitleTextController = context - .select((CreateTaskViewModel model) => model.taskTitleTextController); - return TextFormField( - textInputAction: TextInputAction.next, - controller: taskTitleTextController, - keyboardType: TextInputType.name, - maxLength: 100, - validator: (value) => Validator.validateEventForm(value!, 'Title'), - decoration: InputDecoration( - labelText: 'Add Task Title', - isDense: true, - labelStyle: Theme.of(context).textTheme.titleMedium, - focusedBorder: InputBorder.none, - counterText: "", - enabledBorder: InputBorder.none, - prefixIcon: Container( - transform: Matrix4.translationValues( - -SizeConfig.screenWidth! * 0.027, - 0.0, - 0.0, - ), - child: const Icon( - Icons.title, - size: 25, - ), - ), - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_form/widgets_task_form-library.md b/talawa-mobile-docs/widgets_task_form/widgets_task_form-library.md deleted file mode 100644 index a1a5faa5d..000000000 --- a/talawa-mobile-docs/widgets_task_form/widgets_task_form-library.md +++ /dev/null @@ -1,52 +0,0 @@ - - - - -# task_form library - - - - - - - - - - - -## Classes - -##### [DescriptionField](../widgets_task_form/DescriptionField-class.md) - - - - - - -##### [TaskForm](../widgets_task_form/TaskForm-class.md) - - - - - - -##### [TitleField](../widgets_task_form/TitleField-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard-class.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard-class.md deleted file mode 100644 index 75f697cb2..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard-class.md +++ /dev/null @@ -1,215 +0,0 @@ - - - -# TaskCard class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TaskCard - - - - - - - - -## Constructors - -[TaskCard](../widgets_task_schedule/TaskCard/TaskCard.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Appointment](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/Appointment-class.html) appointment, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions, required [Task](../models_task_task_model/Task-class.md) task}) - - _const_ - - -## Properties - -##### [appointment](../widgets_task_schedule/TaskCard/appointment.md) → [Appointment](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/Appointment-class.html) - - - - -_final_ - - - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [showMoreOptions](../widgets_task_schedule/TaskCard/showMoreOptions.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [task](../widgets_task_schedule/TaskCard/task.md) → [Task](../models_task_task_model/Task-class.md) - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_task_schedule/TaskCard/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard/TaskCard.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard/TaskCard.md deleted file mode 100644 index 1f611b973..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard/TaskCard.md +++ /dev/null @@ -1,34 +0,0 @@ - - - -# TaskCard constructor - - - - - - -const -TaskCard({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Appointment](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/Appointment-class.html) appointment, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions, required [Task](../../models_task_task_model/Task-class.md) task}) - - - - - -## Implementation - -```dart -const TaskCard({ - Key? key, - required this.appointment, - required this.showMoreOptions, - required this.task, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard/appointment.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard/appointment.md deleted file mode 100644 index 7c06657a2..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard/appointment.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# appointment property - - - - - - - -[Appointment](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/Appointment-class.html) appointment - -_final_ - - - - - - -## Implementation - -```dart -final Appointment appointment; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard/build.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard/build.md deleted file mode 100644 index 3ff8b0121..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard/build.md +++ /dev/null @@ -1,153 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: appointment.color, - borderRadius: const BorderRadius.all( - Radius.circular(4), - ), - ), - padding: const EdgeInsets.only(left: 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - ' ${appointment.subject}', - style: const TextStyle( - fontWeight: FontWeight.w500, - fontSize: 18, - ), - ), - const SizedBox(height: 8), - Row( - children: [ - const Icon( - Icons.access_time_filled, - size: 16, - ), - const SizedBox(width: 4), - Text( - DateFormat('hh:mm a').format(appointment.endTime), - ), - ], - ), - ], - ), - showMoreOptions - ? IconButton( - onPressed: () { - navigationService.pushDialog( - AlertDialog( - title: Text( - 'User Actions', - style: TextStyle( - color: Theme.of(context).primaryColorLight, - ), - ), - actions: [ - TextButton( - child: const Text('Delete'), - onPressed: () { - context.read().deleteTask( - task.id, - task.creator.id!, - ); - navigationService.pop(); - }, - ), - TextButton( - child: const Text('Edit'), - onPressed: () { - navigationService.pop(); - navigationService.pushScreen( - Routes.editTask, - arguments: task, - ); - }, - ), - TextButton( - child: const Text('Cancel'), - onPressed: () => navigationService.pop(), - ), - ], - ), - ); - }, - icon: const Icon(Icons.more_vert), - ) - : Container(), - ], - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard/showMoreOptions.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard/showMoreOptions.md deleted file mode 100644 index 8ea655614..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard/showMoreOptions.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# showMoreOptions property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions - -_final_ - - - - - - -## Implementation - -```dart -final bool showMoreOptions; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskCard/task.md b/talawa-mobile-docs/widgets_task_schedule/TaskCard/task.md deleted file mode 100644 index 3cf99076f..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskCard/task.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# task property - - - - - - - -[Task](../../models_task_task_model/Task-class.md) task - -_final_ - - - - - - -## Implementation - -```dart -final Task task; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule-class.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule-class.md deleted file mode 100644 index 26e9e352d..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule-class.md +++ /dev/null @@ -1,215 +0,0 @@ - - - -# TaskSchedule class - - - - - - - - - - - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- TaskSchedule - - - - - - - - -## Constructors - -[TaskSchedule](../widgets_task_schedule/TaskSchedule/TaskSchedule.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../models_task_task_model/Task-class.md)> tasks, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions = false}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [showMoreOptions](../widgets_task_schedule/TaskSchedule/showMoreOptions.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [tasks](../widgets_task_schedule/TaskSchedule/tasks.md) → [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../models_task_task_model/Task-class.md)> - - - - -_final_ - - - - - -## Methods - -##### [build](../widgets_task_schedule/TaskSchedule/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [calendarTapped](../widgets_task_schedule/TaskSchedule/calendarTapped.md)([CalendarTapDetails](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/CalendarTapDetails-class.html) details) void - - - - - - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/TaskSchedule.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/TaskSchedule.md deleted file mode 100644 index 06e9a9ce6..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/TaskSchedule.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -# TaskSchedule constructor - - - - - - -const -TaskSchedule({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../../models_task_task_model/Task-class.md)> tasks, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions = false}) - - - - - -## Implementation - -```dart -const TaskSchedule({ - Key? key, - required this.tasks, - this.showMoreOptions = false, -}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/build.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/build.md deleted file mode 100644 index 88667691a..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/build.md +++ /dev/null @@ -1,91 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - return SfCalendar( - view: CalendarView.schedule, - dataSource: _getCalendarDataSource(tasks), - scheduleViewSettings: const ScheduleViewSettings( - hideEmptyScheduleWeek: true, - appointmentItemHeight: 70, - monthHeaderSettings: MonthHeaderSettings( - height: 0, - ), - ), - onTap: calendarTapped, - appointmentBuilder: (context, appointments) { - final appointment = appointments.appointments.first as Appointment; - final task = tasks.firstWhere((task) => task.id == appointment.id); - return TaskCard( - appointment: appointment, - showMoreOptions: showMoreOptions, - task: task, - ); - }, - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/calendarTapped.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/calendarTapped.md deleted file mode 100644 index 8f719be54..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/calendarTapped.md +++ /dev/null @@ -1,75 +0,0 @@ - - - -# calendarTapped method - - - - - - - - -void calendarTapped -([CalendarTapDetails](https://pub.dev/documentation/syncfusion_flutter_calendar/20.4.54/calendar/CalendarTapDetails-class.html) details) - - - - - - - - -## Implementation - -```dart -void calendarTapped(CalendarTapDetails details) { - if (details.targetElement == CalendarElement.appointment || - details.targetElement == CalendarElement.agenda) { - final Appointment appointmentDetails = - details.appointments![0] as Appointment; - final subjectText = appointmentDetails.subject; - final dateText = - DateFormat('MMMM dd, yyyy').format(appointmentDetails.startTime); - final endTimeText = - DateFormat('hh:mm a').format(appointmentDetails.endTime); - final timeDetails = endTimeText; - - navigationService.pushDialog( - AlertDialog( - title: Text( - subjectText, - style: TextStyle( - color: Theme.of(navigationService.navigatorKey.currentContext!) - .primaryColorLight, - fontWeight: FontWeight.w500, - fontSize: 22, - ), - ), - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text(appointmentDetails.notes!), - const SizedBox(height: 10), - Text('$dateText $timeDetails') - ], - ), - actions: [ - TextButton( - onPressed: () => navigationService.pop(), - child: const Text('Close'), - ) - ], - ), - ); - } -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/showMoreOptions.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/showMoreOptions.md deleted file mode 100644 index 8ea655614..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/showMoreOptions.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# showMoreOptions property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showMoreOptions - -_final_ - - - - - - -## Implementation - -```dart -final bool showMoreOptions; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/tasks.md b/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/tasks.md deleted file mode 100644 index d003e0b0e..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/TaskSchedule/tasks.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# tasks property - - - - - - - -[List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Task](../../models_task_task_model/Task-class.md)> tasks - -_final_ - - - - - - -## Implementation - -```dart -final List tasks; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_task_schedule/widgets_task_schedule-library.md b/talawa-mobile-docs/widgets_task_schedule/widgets_task_schedule-library.md deleted file mode 100644 index 2510a7b76..000000000 --- a/talawa-mobile-docs/widgets_task_schedule/widgets_task_schedule-library.md +++ /dev/null @@ -1,45 +0,0 @@ - - - - -# task_schedule library - - - - - - - - - - - -## Classes - -##### [TaskCard](../widgets_task_schedule/TaskCard-class.md) - - - - - - -##### [TaskSchedule](../widgets_task_schedule/TaskSchedule-class.md) - - - - - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile-class.md b/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile-class.md deleted file mode 100644 index 3a74a348c..000000000 --- a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile-class.md +++ /dev/null @@ -1,190 +0,0 @@ - - - -# ChangeThemeTile class - - - - - - - - - -

This class enables theme switch. -It returns a ListTile which contains a Toggle button to switch between Dark and Light Themes.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatelessWidget](https://api.flutter.dev/flutter/widgets/StatelessWidget-class.html) -- ChangeThemeTile - - - - - - - - -## Constructors - -[ChangeThemeTile](../widgets_theme_switch/ChangeThemeTile/ChangeThemeTile.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - - - -## Methods - -##### [build](../widgets_theme_switch/ChangeThemeTile/build.md)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) - - - -Describes the part of the user interface represented by this widget. -_override_ - - - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatelessWidget/createElement.html)() [StatelessElement](https://api.flutter.dev/flutter/widgets/StatelessElement-class.html) - - - -Creates a StatelessElement to manage this widget's location in the tree. -_inherited_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/ChangeThemeTile.md b/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/ChangeThemeTile.md deleted file mode 100644 index 88b586d9d..000000000 --- a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/ChangeThemeTile.md +++ /dev/null @@ -1,29 +0,0 @@ - - - -# ChangeThemeTile constructor - - - - - - -const -ChangeThemeTile({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key}) - - - - - -## Implementation - -```dart -const ChangeThemeTile({Key? key}) : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/build.md b/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/build.md deleted file mode 100644 index bc0b2b30f..000000000 --- a/talawa-mobile-docs/widgets_theme_switch/ChangeThemeTile/build.md +++ /dev/null @@ -1,86 +0,0 @@ - - - -# build method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) build -([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) - -_override_ - - - -

Describes the part of the user interface represented by this widget.

-

The framework calls this method when this widget is inserted into the tree -in a given BuildContext and when the dependencies of this widget change -(e.g., an InheritedWidget referenced by this widget changes). This -method can potentially be called in every frame and should not have any side -effects beyond building a widget.

-

The framework replaces the subtree below this widget with the widget -returned by this method, either by updating the existing subtree or by -removing the subtree and inflating a new subtree, depending on whether the -widget returned by this method can update the root of the existing -subtree, as determined by calling Widget.canUpdate.

-

Typically implementations return a newly created constellation of widgets -that are configured with information from this widget's constructor and -from the given BuildContext.

-

The given BuildContext contains information about the location in the -tree at which this widget is being built. For example, the context -provides the set of inherited widgets for this location in the tree. A -given widget might be built with multiple different BuildContext -arguments over time if the widget is moved around the tree or if the -widget is inserted into the tree in multiple places at once.

-

The implementation of this method must only depend on:

- -

If a widget's build method is to depend on anything else, use a -StatefulWidget instead.

-

See also:

-
    -
  • StatelessWidget, which contains the discussion on performance considerations.
  • -
- - - -## Implementation - -```dart -@override -Widget build(BuildContext context) { - final themeProvider = Provider.of(context); - return ListTile( - key: const Key('ThemeSwitch'), - contentPadding: EdgeInsets.zero, - title: Text(AppLocalizations.of(context)!.strictTranslate("Dark Theme")), - trailing: Switch( - key: const Key('ToggleTheme'), - autofocus: true, - activeColor: Theme.of(context).colorScheme.primary, - value: themeProvider.isdarkTheme, - onChanged: (value) { - final provider = Provider.of(context, listen: false); - provider.switchTheme(isOn: value); - }, - ), - ); -} -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_theme_switch/widgets_theme_switch-library.md b/talawa-mobile-docs/widgets_theme_switch/widgets_theme_switch-library.md deleted file mode 100644 index 7eadafcb6..000000000 --- a/talawa-mobile-docs/widgets_theme_switch/widgets_theme_switch-library.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -# theme_switch library - - - - - - - - - - - -## Classes - -##### [ChangeThemeTile](../widgets_theme_switch/ChangeThemeTile-class.md) - - - -This class enables theme switch. -It returns a ListTile which contains a Toggle button to switch between Dark and Light Themes. - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/VideoWidget-class.md b/talawa-mobile-docs/widgets_video_widget/VideoWidget-class.md deleted file mode 100644 index 162c160f8..000000000 --- a/talawa-mobile-docs/widgets_video_widget/VideoWidget-class.md +++ /dev/null @@ -1,207 +0,0 @@ - - - -# VideoWidget class - - - - - - - - - -

This class creates a video widget.

- - - -**Inheritance** - -- [Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) -- [DiagnosticableTree](https://api.flutter.dev/flutter/foundation/DiagnosticableTree-class.html) -- [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) -- [StatefulWidget](https://api.flutter.dev/flutter/widgets/StatefulWidget-class.html) -- VideoWidget - - - - - - - - -## Constructors - -[VideoWidget](../widgets_video_widget/VideoWidget/VideoWidget.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) url, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) play}) - - _const_ - - -## Properties - -##### [hashCode](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html) → [int](https://api.flutter.dev/flutter/dart-core/int-class.html) - - - -The hash code for this object. -_read-onlyinherited_ - - - -##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? - - - -Controls how one widget replaces another widget in the tree. -_finalinherited_ - - - -##### [play](../widgets_video_widget/VideoWidget/play.md) → [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - - -_final_ - - - -##### [runtimeType](https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html) → [Type](https://api.flutter.dev/flutter/dart-core/Type-class.html) - - - -A representation of the runtime type of the object. -_read-onlyinherited_ - - - -##### [url](../widgets_video_widget/VideoWidget/url.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - - -_final_ - - - - - -## Methods - -##### [createElement](https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html)() [StatefulElement](https://api.flutter.dev/flutter/widgets/StatefulElement-class.html) - - - -Creates a StatefulElement to manage this widget's location in the tree. -_inherited_ - - - -##### [createState](../widgets_video_widget/VideoWidget/createState.md)() _VideoWidgetState - - - -Creates the mutable state for this widget at a given location in the tree. -_override_ - - - -##### [debugDescribeChildren](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)() [List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)> - - - -Returns a list of DiagnosticsNode objects describing this node's -children. -_inherited_ - - - -##### [debugFillProperties](https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html)([DiagnosticPropertiesBuilder](https://api.flutter.dev/flutter/foundation/DiagnosticPropertiesBuilder-class.html) properties) void - - - -Add additional properties associated with the node. -_inherited_ - - - -##### [noSuchMethod](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html)([Invocation](https://api.flutter.dev/flutter/dart-core/Invocation-class.html) invocation) dynamic - - - -Invoked when a non-existent method or property is accessed. -_inherited_ - - - -##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html) - - - -Returns a debug representation of the object that is used by debugging -tools and by DiagnosticsNode.toStringDeep. -_inherited_ - - - -##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A string representation of this object. -_inherited_ - - - -##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a string representation of this node and its descendants. -_inherited_ - - - -##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -Returns a one-line detailed description of the object. -_inherited_ - - - -##### [toStringShort](https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html)() [String](https://api.flutter.dev/flutter/dart-core/String-class.html) - - - -A short, textual description of this widget. -_inherited_ - - - - - -## Operators - -##### [operator ==](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)([Object](https://api.flutter.dev/flutter/dart-core/Object-class.html) other) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) - - - -The equality operator. -_inherited_ - - - - - - - - - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/VideoWidget/VideoWidget.md b/talawa-mobile-docs/widgets_video_widget/VideoWidget/VideoWidget.md deleted file mode 100644 index 6e7a0763b..000000000 --- a/talawa-mobile-docs/widgets_video_widget/VideoWidget/VideoWidget.md +++ /dev/null @@ -1,30 +0,0 @@ - - - -# VideoWidget constructor - - - - - - -const -VideoWidget({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) url, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) play}) - - - - - -## Implementation - -```dart -const VideoWidget({Key? key, required this.url, required this.play}) - : super(key: key); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/VideoWidget/createState.md b/talawa-mobile-docs/widgets_video_widget/VideoWidget/createState.md deleted file mode 100644 index 723fd8374..000000000 --- a/talawa-mobile-docs/widgets_video_widget/VideoWidget/createState.md +++ /dev/null @@ -1,49 +0,0 @@ - - - -# createState method - - - - - - - -- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html) - -_VideoWidgetState createState -() - -_override_ - - - -

Creates the mutable state for this widget at a given location in the tree.

-

Subclasses should override this method to return a newly created -instance of their associated State subclass:

-
@override
-State<SomeWidget> createState() => _SomeWidgetState();
-
-

The framework can call this method multiple times over the lifetime of -a StatefulWidget. For example, if the widget is inserted into the tree -in multiple locations, the framework will create a separate State object -for each location. Similarly, if the widget is removed from the tree and -later inserted into the tree again, the framework will call createState -again to create a fresh State object, simplifying the lifecycle of -State objects.

- - - -## Implementation - -```dart -@override -_VideoWidgetState createState() => _VideoWidgetState(); -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/VideoWidget/play.md b/talawa-mobile-docs/widgets_video_widget/VideoWidget/play.md deleted file mode 100644 index 6a981df47..000000000 --- a/talawa-mobile-docs/widgets_video_widget/VideoWidget/play.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# play property - - - - - - - -[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) play - -_final_ - - - - - - -## Implementation - -```dart -final bool play; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/VideoWidget/url.md b/talawa-mobile-docs/widgets_video_widget/VideoWidget/url.md deleted file mode 100644 index 872efdaa1..000000000 --- a/talawa-mobile-docs/widgets_video_widget/VideoWidget/url.md +++ /dev/null @@ -1,32 +0,0 @@ - - - -# url property - - - - - - - -[String](https://api.flutter.dev/flutter/dart-core/String-class.html) url - -_final_ - - - - - - -## Implementation - -```dart -final String url; -``` - - - - - - - diff --git a/talawa-mobile-docs/widgets_video_widget/widgets_video_widget-library.md b/talawa-mobile-docs/widgets_video_widget/widgets_video_widget-library.md deleted file mode 100644 index bd07455d2..000000000 --- a/talawa-mobile-docs/widgets_video_widget/widgets_video_widget-library.md +++ /dev/null @@ -1,38 +0,0 @@ - - - - -# video_widget library - - - - - - - - - - - -## Classes - -##### [VideoWidget](../widgets_video_widget/VideoWidget-class.md) - - - -This class creates a video widget. - - - - - - - - - - - - - - - diff --git a/talawa_lint/bin/talawa_lint.dart b/talawa_lint/bin/talawa_lint.dart deleted file mode 100644 index 00f9a994e..000000000 --- a/talawa_lint/bin/talawa_lint.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:args/args.dart'; -import 'package:custom_lint/custom_lint.dart'; - -Future entrypoint([List args = const []]) async { - final parser = ArgParser() - ..addFlag( - 'watch', - help: "Watches plugins' sources and perform a hot-reload on change", - negatable: false, - ) - ..addFlag( - 'help', - abbr: 'h', - negatable: false, - help: 'Prints command usage', - ) - ..addMultiOption( - 'files', - abbr: 'f', - help: 'Takes a list of files as argument', - ); - final result = parser.parse(args); - - final help = result['help'] as bool; - if (help) { - stdout.writeln('Usage: custom_lint [--watch]'); - stdout.writeln(parser.usage); - return; - } - - final fileList = result['files'] as List; - - if (fileList.isNotEmpty) { - stdout.writeln("file mode"); - stdout.writeln(fileList[0]); - return; - } - - final watchMode = result['watch'] as bool; - - await customLint(workingDirectory: Directory.current, watchMode: watchMode); -} - -void main([List args = const []]) async { - await entrypoint(args); - // TODO figure out why this exit is necessary - exit(exitCode); -} diff --git a/talawa_lint/lib/helpers.dart b/talawa_lint/lib/helpers.dart deleted file mode 100644 index bbb8ec0f9..000000000 --- a/talawa_lint/lib/helpers.dart +++ /dev/null @@ -1,166 +0,0 @@ -import 'package:analyzer/dart/ast/ast.dart'; -import 'package:analyzer/dart/ast/syntactic_entity.dart'; -import 'package:analyzer/dart/ast/token.dart'; -import 'package:analyzer/dart/element/element.dart'; -import 'package:analyzer/dart/element/type.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; - -SyntacticEntity? _getNodeToAnnotate(Declaration node) { - if (node is MethodDeclaration) { - return node.name; - } - if (node is ConstructorDeclaration) { - return node.name; - } - if (node is FieldDeclaration) { - return node.fields; - } - if (node is ClassTypeAlias) { - return node.name; - } - if (node is FunctionTypeAlias) { - return node.name; - } - if (node is ClassDeclaration) { - return node.name; - } - if (node is EnumDeclaration) { - return node.name; - } - if (node is ExtensionDeclaration) { - return node.name; - } - if (node is FunctionDeclaration) { - return node.name; - } - if (node is TopLevelVariableDeclaration) { - return node.variables; - } - if (node is EnumConstantDeclaration) { - return node.name; - } - if (node is TypeParameter) { - return node.name; - } - if (node is VariableDeclaration) { - return node.name; - } - return null; -} - -/// Returns the most specific AST node appropriate for associating errors. -SyntacticEntity getNodeToAnnotate(Declaration node) { - final mostSpecific = _getNodeToAnnotate(node); - return mostSpecific ?? node; -} - -Element? getOverriddenMember(Element? member) { - if (member == null) { - return null; - } - - return member.hasOverride ? member : null; - // final interfaceElement = member.thisOrAncestorOfType(); - // if (interfaceElement == null) { - // return null; - // } - // final name = member.name; - // if (name == null) { - // return null; - // } - - // final libraryUri = interfaceElement.library.source.uri; - // return context.inheritanceManager.getInherited( - // interfaceElement.thisType, - // Name(libraryUri, name), - // ); -} - -bool isOverridingMember(Declaration node) => - getOverriddenMember(node.declaredElement) != null; - -void checkMethods( - bool Function(Declaration) check, - List members, - ErrorReporter reporter, - LintRule rule, -) { - // Check methods - - final getters = {}; - final setters = []; - - // Non-getters/setters. - final methods = []; - - // Identify getter/setter pairs. - for (final member in members) { - // if (member is MethodDeclaration && !isPrivate(member.name)) { - if (member is MethodDeclaration) { - // print(member.parameters); - if (member.isGetter) { - getters[member.name.lexeme] = member; - } else if (member.isSetter) { - setters.add(member); - } else { - methods.add(member); - } - } - } - - // Check all getters, and collect offenders along the way. - final missingDocs = {}; - for (final getter in getters.values) { - if (check(getter)) { - missingDocs.add(getter); - } - } - - // But only setters whose getter is missing a doc. - for (final setter in setters) { - final getter = getters[setter.name.lexeme]; - if (getter != null && missingDocs.contains(getter)) { - check(setter); - } - } - - // Check remaining methods. - methods.forEach(check); -} - -/// Returns `true` if the given [id] is a Dart keyword. -bool isKeyWord(String id) => Keyword.keywords.containsKey(id); - -/// Returns `true` if the given [ClassMember] is a method. -bool isMethod(ClassMember m) => m is MethodDeclaration; - -/// Check if the given identifier has a private name. -bool isPrivate(Token? name) => - // ignore: avoid_bool_literals_in_conditional_expressions - name != null ? Identifier.isPrivateName(name.lexeme) : false; - -class TalawaLintHelpers { - static bool isVoid(Declaration node) { - return returnType(node) is VoidType || - returnType(node)?.getDisplayString( - withNullability: true, - ) == - "Future"; - } - - static bool isImplicitReturn(Declaration node) { - return ((node is FunctionDeclaration) - ? node.declaredElement?.hasImplicitReturnType - : (node as MethodDeclaration) - .declaredElement - ?.hasImplicitReturnType) ?? - false; - } - - static DartType? returnType(Declaration node) { - return (node is FunctionDeclaration) - ? node.returnType?.type - : (node as MethodDeclaration).returnType?.type; - } -} diff --git a/talawa_lint/lib/talawa_api_doc/talawa_api_doc.dart b/talawa_lint/lib/talawa_api_doc/talawa_api_doc.dart deleted file mode 100644 index c9b7fd960..000000000 --- a/talawa_lint/lib/talawa_api_doc/talawa_api_doc.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:analyzer/error/error.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/talawa_api_doc/talawa_api_doc_fixer.dart'; -import 'package:talawa_lint/talawa_api_doc/talawa_api_doc_visitor.dart'; - -class TalawaApiDocLintRule extends DartLintRule { - const TalawaApiDocLintRule() : super(code: _code); - - /// Metadata about the warning that will show-up in the IDE. - /// This is used for `// ignore: code` and enabling/disabling the lint - static const _code = LintCode( - name: 'talawa_api_doc', - problemMessage: 'No documentation found for this field.', - correctionMessage: "Add a valid documentation describing usecase.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - @override - void run( - CustomLintResolver resolver, - ErrorReporter reporter, - CustomLintContext context, - ) { - final visitor = TalawaApiDocVisitor( - this, - context, - reporter, - ); - - if (reporter.source.fullName.contains(RegExp('.*/test/.*/.*test.dart')) || - reporter.source.fullName.contains(RegExp('.*/.*g.dart'))) { - return; - } - - context.registry.addClassDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addClassTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addCompilationUnit( - (node) => node.visitChildren(visitor), - ); - context.registry.addConstructorDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addEnumConstantDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addEnumDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addExtensionDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addFieldDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addFunctionDeclaration( - (node) => visitor.check(node), - ); - context.registry.addFunctionTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addGenericTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addMixinDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addVariableDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addTopLevelVariableDeclaration( - (node) => node.visitChildren(visitor), - ); - } - - @override - List getFixes() => [ - TalawaAPIDocFixer(), - ]; -} diff --git a/talawa_lint/lib/talawa_api_doc/talawa_api_doc_fixer.dart b/talawa_lint/lib/talawa_api_doc/talawa_api_doc_fixer.dart deleted file mode 100644 index f1136d71b..000000000 --- a/talawa_lint/lib/talawa_api_doc/talawa_api_doc_fixer.dart +++ /dev/null @@ -1,185 +0,0 @@ -import 'package:analyzer/dart/ast/ast.dart'; -import 'package:analyzer/error/error.dart'; -import 'package:analyzer/source/source_range.dart'; -import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/helpers.dart'; - -class TalawaAPIDocFixer extends DartFix { - @override - void run( - CustomLintResolver resolver, - ChangeReporter reporter, - CustomLintContext context, - AnalysisError analysisError, - List others, - ) { - context.registry.addVariableDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addClassDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addClassTypeAlias( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addConstructorDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addEnumConstantDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addEnumDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addExtensionDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addFieldDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addFunctionDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addMethodDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addFunctionTypeAlias( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addGenericTypeAlias( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addMixinDeclaration( - (node) => fix(node, reporter, analysisError), - ); - context.registry.addTopLevelVariableDeclaration( - (node) => fix(node, reporter, analysisError), - ); - } - - void fix( - Declaration node, - ChangeReporter reporter, - AnalysisError analysisError, - ) { - // Verifying that the node and error offset match (collide) - - if (!analysisError.sourceRange.intersects(node.sourceRange)) return; - - // The [SourceRange] of the ClassDeclaration spans to the whole class - // and will intersect with everything inside it. This is a problem, as the - // error for it's fields will match to itself, and the fixes will be applied - // to the wrong place. - - if (node is ClassDeclaration && - !analysisError.sourceRange.intersects( - SourceRange( - node.offset, - node.leftBracket.offset - node.offset, - ), - )) return; - - // The same issue exists for Functions and Methods. We can define functions - // inside functions, and the same overlap of [SourceRange] occurs due to that - - if (node is FunctionDeclaration && - !analysisError.sourceRange.intersects( - SourceRange( - node.offset, - (node.functionExpression.parameters?.end ?? - node.name.length + node.name.offset) - - node.offset, - ), - )) return; - - if (node is MethodDeclaration && - !analysisError.sourceRange.intersects( - SourceRange( - node.offset, - (node.parameters?.offset ?? node.name.length + node.name.offset) - - node.offset, - ), - )) return; - - final changeBuilder = reporter.createChangeBuilder( - message: 'Insert Doc skeleton', - priority: 3, - ); - - changeBuilder.addDartFileEdit((builder) { - builder.addInsertion(node.offset, (builder) { - builder.write( - "/// a_line_ending_with_end_punctuation.\n" - "/// \n" - "/// more_info_if_required\n", - ); - - if (node is FunctionDeclaration || node is MethodDeclaration) { - fixFun( - node, - builder, - ); - } - }); - }); - } - - void fixFun( - Declaration node, - DartEditBuilder builder, - ) { - // Putting in these obvious checks because in the edge case when someone - // mistakenly calls this function on non-function type entities, the linter - // will simply crash without any plausible explanation. - - if (!(node is FunctionDeclaration || node is MethodDeclaration)) { - return; - } - - if (node is MethodDeclaration && (node.isGetter || node.isSetter)) { - return; - } - - final fnInfo = StringBuffer(); - - fnInfo.write( - "/// \n" - "/// **params**:\n", - ); - - final paramList = (node is FunctionDeclaration) - ? node.functionExpression.parameters?.parameters - : (node as MethodDeclaration).parameters?.parameters; - - if (paramList == null || paramList.isEmpty) { - fnInfo.write("/// None\n"); - } else { - for (final param in paramList) { - fnInfo.write("/// * `${param.name}`: define_the_param\n"); - } - } - - fnInfo.write( - "/// \n" - "/// **returns**:\n", - ); - - final isImplicitReturn = TalawaLintHelpers.isImplicitReturn(node); - final isVoid = TalawaLintHelpers.isVoid(node); - - final returnType = (node is FunctionDeclaration) - ? node.returnType - : (node as MethodDeclaration).returnType; - - if (isImplicitReturn || returnType == null) { - fnInfo.write("/// * `undef`: type_the_return\n"); - } else if (isVoid) { - fnInfo.write("/// None\n"); - } else { - fnInfo.write("/// * `$returnType`: define_the_return\n"); - } - - builder.write(fnInfo.toString()); - } -} diff --git a/talawa_lint/lib/talawa_api_doc/talawa_api_doc_visitor.dart b/talawa_lint/lib/talawa_api_doc/talawa_api_doc_visitor.dart deleted file mode 100644 index fd64febd1..000000000 --- a/talawa_lint/lib/talawa_api_doc/talawa_api_doc_visitor.dart +++ /dev/null @@ -1,168 +0,0 @@ -import 'package:analyzer/dart/ast/ast.dart'; -import 'package:analyzer/dart/ast/token.dart'; -import 'package:analyzer/dart/ast/visitor.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/helpers.dart'; - -class TalawaApiDocVisitor extends SimpleAstVisitor { - TalawaApiDocVisitor( - this.rule, - this.context, - this.reporter, - ); - - final LintRule rule; - final CustomLintContext context; - final ErrorReporter reporter; - - bool check(Declaration node) { - // if (node.documentationComment == null && !isOverridingMember(node)) { - // If the class extends [State], we don't want documentation - // for it - final extendsState = (node is ClassDeclaration) && - node.extendsClause?.superclass.element?.name == "State"; - final isMain = - (node is FunctionDeclaration) && node.declaredElement?.name == "main"; - - if (node.documentationComment == null && - !isOverridingMember(node) && - !extendsState && - !isMain) { - final errorNode = getNodeToAnnotate(node); - - reporter.reportErrorForOffset( - rule.code, - errorNode.offset, - errorNode.length, - ); - - return true; - } - - return false; - } - - @override - void visitClassDeclaration(ClassDeclaration node) { - _visitMembers(node, node.name, node.members); - } - - @override - void visitClassTypeAlias(ClassTypeAlias node) { - check(node); - } - - @override - void visitCompilationUnit(CompilationUnit node) { - final getters = {}; - final setters = []; - - // Check functions. - - // Non-getters/setters. - final functions = []; - - // Identify getter/setter pairs. - for (final member in node.declarations) { - if (member is FunctionDeclaration) { - final name = member.name; - if (!isPrivate(name) && name.lexeme != 'main') { - if (member.isGetter) { - getters[member.name.lexeme] = member; - } else if (member.isSetter) { - setters.add(member); - } else { - functions.add(member); - } - } - } - } - - // Check all getters, and collect offenders along the way. - final missingDocs = {}; - for (final getter in getters.values) { - if (check(getter)) { - missingDocs.add(getter); - } - } - - // But only setters whose getter is missing a doc. - for (final setter in setters) { - final getter = getters[setter.name.lexeme]; - if (getter != null && missingDocs.contains(getter)) { - check(setter); - } - } - - // Check remaining functions. - functions.forEach(check); - - super.visitCompilationUnit(node); - } - - @override - void visitConstructorDeclaration(ConstructorDeclaration node) { - // if (!inPrivateMember(node) && !isPrivate(node.name)) { - // check(node); - // } - } - - @override - void visitEnumConstantDeclaration(EnumConstantDeclaration node) { - check(node); - } - - @override - void visitEnumDeclaration(EnumDeclaration node) { - check(node); - checkMethods(check, node.members, reporter, rule); - } - - @override - void visitExtensionDeclaration(ExtensionDeclaration node) { - // if (node.name == null || isPrivate(node.name)) { - if (node.name == null) { - return; - } - - check(node); - checkMethods(check, node.members, reporter, rule); - } - - @override - void visitFieldDeclaration(FieldDeclaration node) { - for (final field in node.fields.variables) { - if (!isPrivate(field.name)) { - check(field); - } - } - } - - @override - void visitFunctionTypeAlias(FunctionTypeAlias node) { - check(node); - } - - @override - void visitGenericTypeAlias(GenericTypeAlias node) { - check(node); - } - - @override - void visitMixinDeclaration(MixinDeclaration node) { - _visitMembers(node, node.name, node.members); - } - - @override - void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { - for (final decl in node.variables.variables) { - check(decl); - } - } - - void _visitMembers(Declaration node, Token name, List members) { - check(node); - checkMethods(check, members, reporter, rule); - } -} diff --git a/talawa_lint/lib/talawa_good_doc/talawa_good_doc.dart b/talawa_lint/lib/talawa_good_doc/talawa_good_doc.dart deleted file mode 100644 index 4af28689d..000000000 --- a/talawa_lint/lib/talawa_good_doc/talawa_good_doc.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'package:analyzer/error/error.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/talawa_good_doc/talawa_good_doc_visitor.dart'; - -class TalawaGoodDocComments extends DartLintRule { - const TalawaGoodDocComments() : super(code: _code); - - /// Metadata about the warning that will show-up in the IDE. - /// This is used for `// ignore: code` and enabling/disabling the lint - static const _code = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong comment format.', - correctionMessage: - 'Use "/// ..." for public api and "// ..." for other cases.', - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - @override - void run( - CustomLintResolver resolver, - ErrorReporter reporter, - CustomLintContext context, - ) { - final visitor = TalawaGoodDocVisitor( - this, - context, - reporter, - ); - - if (reporter.source.fullName.contains(RegExp('.*/test/.*/.*test.dart')) || - reporter.source.fullName.contains(RegExp('.*/.*g.dart'))) { - return; - } - - context.registry.addClassDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addClassTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addCompilationUnit( - (node) => node.visitChildren(visitor), - ); - context.registry.addConstructorDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addEnumConstantDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addEnumDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addExtensionDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addFieldDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addFunctionDeclaration( - visitor.check, - ); - context.registry.addFunctionTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addGenericTypeAlias( - (node) => node.visitChildren(visitor), - ); - context.registry.addMixinDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addTopLevelVariableDeclaration( - (node) => node.visitChildren(visitor), - ); - context.registry.addComment( - (node) => node.visitChildren(visitor), - ); - } -} diff --git a/talawa_lint/lib/talawa_good_doc/talawa_good_doc_visitor.dart b/talawa_lint/lib/talawa_good_doc/talawa_good_doc_visitor.dart deleted file mode 100644 index dcad849aa..000000000 --- a/talawa_lint/lib/talawa_good_doc/talawa_good_doc_visitor.dart +++ /dev/null @@ -1,413 +0,0 @@ -// ignore_for_file: implementation_imports, depend_on_referenced_packages - -import 'package:_fe_analyzer_shared/src/scanner/token.dart'; -import 'package:analyzer/dart/ast/ast.dart'; -import 'package:analyzer/dart/ast/visitor.dart'; -import 'package:analyzer/error/listener.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/helpers.dart'; -import 'package:talawa_lint/talawa_lint_rules.dart'; - -class TalawaGoodDocVisitor extends SimpleAstVisitor { - TalawaGoodDocVisitor( - this.rule, - this.context, - this.reporter, - ); - - final LintRule rule; - final CustomLintContext context; - final ErrorReporter reporter; - - @override - void visitClassDeclaration(ClassDeclaration node) { - _visitMembers(node, node.name, node.members); - } - - @override - void visitClassTypeAlias(ClassTypeAlias node) { - check(node); - } - - @override - void visitCompilationUnit(CompilationUnit node) { - final getters = {}; - final setters = []; - - // Non-getters/setters. - final functions = []; - - // Identify getter/setter pairs. - for (final member in node.declarations) { - if (member is FunctionDeclaration) { - final name = member.name; - if (!isPrivate(name) && name.lexeme != 'main') { - if (member.isGetter) { - getters[member.name.lexeme] = member; - } else if (member.isSetter) { - setters.add(member); - } else { - functions.add(member); - } - } - } - } - - // Check all getters, and collect offenders along the way. - final missingDocs = {}; - for (final getter in getters.values) { - if (check(getter)) { - missingDocs.add(getter); - } - } - - // But only setters whose getter is missing a doc. - for (final setter in setters) { - final getter = getters[setter.name.lexeme]; - if (getter != null && missingDocs.contains(getter)) { - check(setter); - } - } - - // Check remaining functions. - functions.forEach(check); - - super.visitCompilationUnit(node); - } - - @override - void visitConstructorDeclaration(ConstructorDeclaration node) { - check(node); - } - - @override - void visitEnumConstantDeclaration(EnumConstantDeclaration node) { - check(node); - } - - @override - void visitEnumDeclaration(EnumDeclaration node) { - check(node); - checkMethods(check, node.members, reporter, rule); - } - - @override - void visitExtensionDeclaration(ExtensionDeclaration node) { - if (node.name == null) { - return; - } - - check(node); - checkMethods(check, node.members, reporter, rule); - } - - @override - void visitFieldDeclaration(FieldDeclaration node) { - for (final field in node.fields.variables) { - if (!isPrivate(field.name)) { - check(field); - } - } - } - - @override - void visitFunctionTypeAlias(FunctionTypeAlias node) { - check(node); - } - - @override - void visitGenericTypeAlias(GenericTypeAlias node) { - check(node); - } - - @override - void visitMixinDeclaration(MixinDeclaration node) { - _visitMembers(node, node.name, node.members); - } - - @override - void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { - for (final decl in node.variables.variables) { - check(decl); - } - } - - bool check(Declaration node) { - if (node.documentationComment == null) { - return false; - } - - final doc = node.documentationComment!.tokens; - if (!doc[0].lexeme.endsWith('.')) { - reporter.reportErrorForToken( - TalawaGoodDocLintRules.firstLineEndCode, - doc[0], - ); - } - - // Don't check for [setters] and [getters] - // TODO: Fix this completely - if (node is MethodDeclaration && (node.isGetter || node.isSetter)) { - return true; - } - - if (doc.length == 1) { - if (node is FunctionDeclaration || node is MethodDeclaration) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.includeParamsKeywordCode, - node.documentationComment!, - ); - - return false; - } else { - return true; - } - } - - // NOTE: The reason why we are checking for both '///' and '///' - // is because - - // - // 1. The extra space is automatically inserted whenever - // you hit 'enter' when on a line in documentation. - // 2. Flutter will automatically format and remove the extra - // space at the end when formatted - - if (doc[1].lexeme.trim() != '///') { - reporter.reportErrorForToken( - TalawaGoodDocLintRules.secondLineEmptyCode, - doc[1], - ); - } - - if (node is FunctionDeclaration || node is MethodDeclaration) { - if (checkContainsParams(doc, node)) { - checkContainsReturn(doc, node); - } - } - - return true; - } - - bool checkContainsParams(List doc, Declaration rawNode) { - final node = - rawNode is FunctionDeclaration ? rawNode : rawNode as MethodDeclaration; - - final params = rawNode is FunctionDeclaration - ? (node as FunctionDeclaration).functionExpression.parameters - : (node as MethodDeclaration).parameters; - - // If params is null or it is just '()' - // if (params == null || params.length == 2) { - // return; - // } - - bool containsParamsKeyword = false; - - // The line in the doc we are currently parsing - int currentDocLine = 0; - - for (; currentDocLine < doc.length; currentDocLine++) { - final line = doc[currentDocLine]; - if (line.lexeme == '/// **params**:') { - containsParamsKeyword = true; - currentDocLine++; - break; - } - } - - if (!containsParamsKeyword) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.includeParamsKeywordCode, - node.documentationComment!, - ); - - return false; - } - - final paramList = params?.parameterElements ?? []; - - if (paramList.isEmpty) { - if (currentDocLine == doc.length) { - return false; - } else if (doc[currentDocLine].lexeme != "/// None") { - reporter.reportErrorForToken( - TalawaGoodDocLintRules.noParamNone, - doc[currentDocLine], - ); - return false; - } - - return true; - } - - // The currentParam we are checking for - int currentParam = 0; - - for (; currentDocLine < doc.length; currentDocLine++) { - final line = doc[currentDocLine]; - - // If the line starts with '/// *', it must contain a param - if (line.length > 4 && line.lexeme[4] == '*') { - final paramRegex = RegExp( - '/// * `${paramList[currentParam]?.name}`:', - ); - - // TODO: RegExp.hasMatch() doesn't work for some reason. - if (!line.lexeme.startsWith(paramRegex.pattern)) { - if (line.lexeme.trim() == '/// **returns**:') { - reporter.reportErrorForToken( - TalawaGoodDocLintRules.allParamsNotDocumented, - line, - ); - - return false; - } - - reporter.reportErrorForToken( - TalawaGoodDocLintRules.startShouldFollowParam, - line, - ); - - return false; - } else { - if (line.lexeme.trim() == paramRegex.pattern) { - reporter.reportErrorForToken( - TalawaGoodDocLintRules.emptyParamDoc, - line, - ); - - return false; - } else { - currentParam++; - } - } - } - - if (currentParam == paramList.length) break; - } - - if (currentParam != paramList.length) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.allParamsNotDocumented, - node, - ); - - return false; - } - - return true; - } - - void checkContainsReturn( - List doc, - Declaration rawNode, - ) { - // Let the implicit_return_type warning be fixed first - - if (TalawaLintHelpers.isImplicitReturn(rawNode)) return; - - int currentDocLine = 0; - bool containsReturn = false; - - final node = - rawNode is FunctionDeclaration ? rawNode : rawNode as MethodDeclaration; - - for (; currentDocLine < doc.length; currentDocLine++) { - if (doc[currentDocLine].lexeme.trim() == '/// **returns**:') { - containsReturn = true; - break; - } - } - - final isVoid = TalawaLintHelpers.isVoid(node); - - if (!containsReturn) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.doesNotContainReturn, - node.documentationComment!, - ); - - return; - } - - // Check if there is atleast one blank line above - - if (doc[currentDocLine - 1].lexeme.trim() != '///') { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.noBlankLineBWParamAndReturn, - node.documentationComment!, - ); - - return; - } - - // Uncomment below line if returns block is made optional for - // void types someday :) - - // if (isVoid && currentDocLine == doc.length) return; - - if (doc[currentDocLine].lexeme.trim() != '/// **returns**:') { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.wrongReturnsDoc, - node.documentationComment!, - ); - - return; - } - - // Moving onto next lines and checking if documentation about - // the return type is found. - currentDocLine++; - - if (currentDocLine == doc.length) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.noReturnDoc, - node.documentationComment!, - ); - - return; - } - - // Moving ahead to find a line that contains information about the - // return type - currentDocLine++; - - // If return type is [void] and doc doesn't end with [None] or - // there are more lines to the doc - if (isVoid && - (doc[currentDocLine - 1].lexeme != '/// None' || - currentDocLine != doc.length)) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.noEndWithNoneForVoid, - node.documentationComment!, - ); - - return; - } - - final returnType = TalawaLintHelpers.returnType(node); - - // If return type is not [void] and doc doesn't end with [return_type] or - // there are more lines to the doc - final returnTypeDocPattern = RegExp( - '/// * `$returnType`:', - ); - - if (!isVoid && - !doc[currentDocLine - 1].lexeme.startsWith( - returnTypeDocPattern.pattern, - )) { - reporter.reportErrorForNode( - TalawaGoodDocLintRules.wrongReturnsDoc, - node.documentationComment!, - ); - - return; - } - } - - void _visitMembers(Declaration node, Token name, List members) { - check(node); - checkMethods(check, members, reporter, rule); - } -} diff --git a/talawa_lint/lib/talawa_lint.dart b/talawa_lint/lib/talawa_lint.dart deleted file mode 100644 index a892f8433..000000000 --- a/talawa_lint/lib/talawa_lint.dart +++ /dev/null @@ -1,16 +0,0 @@ -// This is the entrypoint of our custom linter -import 'package:custom_lint_builder/custom_lint_builder.dart'; -import 'package:talawa_lint/talawa_api_doc/talawa_api_doc.dart'; -import 'package:talawa_lint/talawa_good_doc/talawa_good_doc.dart'; - -PluginBase createPlugin() => _ExampleLinter(); - -/// A plugin class is used to list all the assists/lints defined by a plugin. -class _ExampleLinter extends PluginBase { - /// We list all the custom warnings/infos/errors - @override - List getLintRules(CustomLintConfigs configs) => [ - const TalawaApiDocLintRule(), - const TalawaGoodDocComments(), - ]; -} diff --git a/talawa_lint/lib/talawa_lint_rules.dart b/talawa_lint/lib/talawa_lint_rules.dart deleted file mode 100644 index 54af9a3d4..000000000 --- a/talawa_lint/lib/talawa_lint_rules.dart +++ /dev/null @@ -1,120 +0,0 @@ -import 'package:analyzer/error/error.dart'; -import 'package:custom_lint_builder/custom_lint_builder.dart'; - -class TalawaAPIDocLintRules {} - -class TalawaGoodDocLintRules { - static const firstLineEndCode = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: - "First line of the documentation doesn't end with end punctuation.", - correctionMessage: "End first line of documentation with '.', '!' etc", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const secondLineEmptyCode = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Second line of the doc is not empty.', - correctionMessage: - "Second line should be left empty to improve readability", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const includeParamsKeywordCode = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'params block not found in the documentation.', - correctionMessage: "Include `**params**:` keyword in function/method doc", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const noParamNone = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: "Empty param list should be documented as `/// None`", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const startShouldFollowParam = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: '* should follow a param name', - correctionMessage: "Make sure you have added a param name after *, and it\n" - "is in the same order as it appears in the function", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const emptyParamDoc = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'No documentation is written for this parameter', - correctionMessage: "Param name should follow its documentation", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const allParamsNotDocumented = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Some parameters are missing documentation', - correctionMessage: "Please make sure that you have documented all\n" - "of the parameters in the same order as they appear in the function.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const noBlankLineBWParamAndReturn = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: "Add a blank line between the end of 'params:' block\n" - "and start of 'returns:' block.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const doesNotContainReturn = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: - "Documentation does not contain information about the return type.\n" - "Add '**returns**:' block followed by the return doc.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const wrongReturnsDoc = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: - "Documentation format of return type is in wrong format.\n" - "For void type - \n" - "/// **returns**: \n/// None\n" - "For other types - \n" - "/// **returns**: \n" - "/// * `return_type`: documentation of the return type.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const noReturnDoc = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: - "'**returns**:' should immediately be followed by documentation about\n" - "the return type", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); - - static const noEndWithNoneForVoid = LintCode( - name: 'talawa_good_doc_comments', - problemMessage: 'Wrong doc format.', - correctionMessage: - "A function/method with [void] return type must end with\n" - "`/// None`\n" - "without extra lines.", - url: "https://docs.talawa.io/docs/developers/talawa/talawa-lint/", - errorSeverity: ErrorSeverity.WARNING, - ); -} diff --git a/talawa_lint/pubspec.lock b/talawa_lint/pubspec.lock deleted file mode 100644 index 9469794a9..000000000 --- a/talawa_lint/pubspec.lock +++ /dev/null @@ -1,357 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "36a321c3d2cbe01cbcb3540a87b8843846e0206df3e691fa7b23e19e78de6d49" - url: "https://pub.dev" - source: hosted - version: "65.0.0" - analyzer: - dependency: "direct main" - description: - name: analyzer - sha256: dfe03b90ec022450e22513b5e5ca1f01c0c01de9c3fba2f7fd233cb57a6b9a07 - url: "https://pub.dev" - source: hosted - version: "6.3.0" - analyzer_plugin: - dependency: "direct main" - description: - name: analyzer_plugin - sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" - url: "https://pub.dev" - source: hosted - version: "0.11.3" - args: - dependency: "direct main" - description: - name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - ci: - dependency: transitive - description: - name: ci - sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13" - url: "https://pub.dev" - source: hosted - version: "0.1.0" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 - url: "https://pub.dev" - source: hosted - version: "0.4.1" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - custom_lint: - dependency: "direct main" - description: - name: custom_lint - sha256: dfb893ff17c83cf08676c6b64df11d3e53d80590978d7c1fb242afff3ba6dedb - url: "https://pub.dev" - source: hosted - version: "0.5.8" - custom_lint_builder: - dependency: "direct main" - description: - name: custom_lint_builder - sha256: "8df6634b38a36a6c6cb74a9c0eb02e9ba0b0ab89b29e38e6daa86e8ed2c6288d" - url: "https://pub.dev" - source: hosted - version: "0.5.8" - custom_lint_core: - dependency: transitive - description: - name: custom_lint_core - sha256: "2b235be098d157e244f18ea905a15a18c16a205e30553888fac6544bbf52f03f" - url: "https://pub.dev" - source: hosted - version: "0.5.8" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d - url: "https://pub.dev" - source: hosted - version: "2.4.1" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - hotreloader: - dependency: transitive - description: - name: hotreloader - sha256: "94ee21a60ea2836500799f3af035dc3212b1562027f1e0031c14e087f0231449" - url: "https://pub.dev" - source: hosted - version: "4.1.0" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.dev" - source: hosted - version: "4.8.1" - lint: - dependency: "direct dev" - description: - name: lint - sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: "https://pub.dev" - source: hosted - version: "0.12.16+1" - meta: - dependency: transitive - description: - name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 - url: "https://pub.dev" - source: hosted - version: "1.2.3" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.dev" - source: hosted - version: "0.27.7" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" - url: "https://pub.dev" - source: hosted - version: "0.7.0" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 - url: "https://pub.dev" - source: hosted - version: "4.3.3" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.dev" - source: hosted - version: "13.0.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.2.0 <4.0.0" diff --git a/talawa_lint/pubspec.yaml b/talawa_lint/pubspec.yaml deleted file mode 100644 index e662f71c0..000000000 --- a/talawa_lint/pubspec.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# pubspec.yaml -name: talawa_lint -environment: - sdk: ">=2.12.0 <4.0.0" - -dev_dependencies: - lint: ^2.3.0 - -dependencies: - # we will use analyzer for inspecting Dart files - # _fe_analyzer_shared: ^61.0.0 - analyzer: ">=5.12.0 <7.0.0" - analyzer_plugin: ^0.11.0 - # args: - - # custom_lint_builder will give us tools for writing lints - args: ^2.4.2 - custom_lint: 0.5.8 - custom_lint_builder: ^0.5.8 - # watcher: ^1.1.0 - diff --git a/test/flutter_test_config.dart b/test/flutter_test_config.dart deleted file mode 100644 index a63fb510e..000000000 --- a/test/flutter_test_config.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_test/flutter_test.dart'; - -Future testExecutable(FutureOr Function() testMain) async { - WidgetController.hitTestWarningShouldBeFatal = true; - await testMain(); -} diff --git a/test/helpers/setup_firebase_mocks.dart b/test/helpers/setup_firebase_mocks.dart deleted file mode 100644 index 227194228..000000000 --- a/test/helpers/setup_firebase_mocks.dart +++ /dev/null @@ -1,208 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// ignore_for_file: return_of_invalid_type - -// import 'package:firebase_core/firebase_core.dart'; -// import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart'; -// import 'package:flutter/services.dart'; -// import 'package:flutter_test/flutter_test.dart'; -// import 'package:mockito/mockito.dart'; -// import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -// final kMockMessagingPlatform = MockFirebaseMessaging(); - -// Future neverEndingFuture() async { -// // ignore: literal_only_boolean_expressions -// while (true) { -// await Future.delayed(const Duration(minutes: 5)); -// } -// } - -// void setupFirebaseMocks() { -// TestWidgetsFlutterBinding.ensureInitialized(); - -// const firebaseChannel = MethodChannel( -// 'plugins.flutter.io/firebase_core', -// ); - -// // ignore: deprecated_member_use -// firebaseChannel.setMockMethodCallHandler((call) async { -// if (call.method == 'Firebase#initializeCore') { -// return [ -// { -// 'name': defaultFirebaseAppName, -// 'options': { -// 'apiKey': '123', -// 'appId': '123', -// 'messagingSenderId': '123', -// 'projectId': '123', -// }, -// 'pluginConstants': {}, -// } -// ]; -// } - -// if (call.method == 'Firebase#initializeApp') { -// final callArguments = call.arguments as Map; -// return { -// 'name': callArguments['appName'], -// 'options': callArguments['options'], -// 'pluginConstants': {}, -// }; -// } - -// return null; -// }); - -// when(kMockMessagingPlatform.delegateFor(app: anyNamed('app'))) -// .thenReturn(kMockMessagingPlatform); -// when( -// kMockMessagingPlatform.setInitialValues( -// isAutoInitEnabled: anyNamed('isAutoInitEnabled'), -// ), -// ).thenReturn(kMockMessagingPlatform); -// } - -// class MockFirebaseMessaging extends Mock -// with MockPlatformInterfaceMixin -// implements FirebaseMessagingPlatform { -// MockFirebaseMessaging() { -// TestFirebaseMessagingPlatform(); -// } - -// @override -// bool get isAutoInitEnabled { -// return super.noSuchMethod( -// Invocation.getter(#isAutoInitEnabled), -// returnValue: true, -// returnValueForMissingStub: true, -// ); -// } - -// @override -// FirebaseMessagingPlatform delegateFor({FirebaseApp? app}) { -// return super.noSuchMethod( -// Invocation.method(#delegateFor, [], {#app: app}), -// returnValue: TestFirebaseMessagingPlatform(), -// returnValueForMissingStub: TestFirebaseMessagingPlatform(), -// ); -// } - -// @override -// FirebaseMessagingPlatform setInitialValues({bool? isAutoInitEnabled}) { -// return super.noSuchMethod( -// Invocation.method( -// #setInitialValues, -// [], -// {#isAutoInitEnabled: isAutoInitEnabled}, -// ), -// returnValue: TestFirebaseMessagingPlatform(), -// returnValueForMissingStub: TestFirebaseMessagingPlatform(), -// ); -// } - -// @override -// Future getInitialMessage() { -// return super.noSuchMethod( -// Invocation.method(#getInitialMessage, []), -// returnValue: neverEndingFuture(), -// returnValueForMissingStub: neverEndingFuture(), -// ); -// } - -// @override -// Future deleteToken() { -// return super.noSuchMethod( -// Invocation.method(#deleteToken, []), -// returnValue: Future.value(), -// returnValueForMissingStub: Future.value(), -// ); -// } - -// @override -// Future getAPNSToken() { -// return super.noSuchMethod( -// Invocation.method(#getAPNSToken, []), -// returnValue: Future.value(''), -// returnValueForMissingStub: Future.value(''), -// ); -// } - -// @override -// Future getToken({String? vapidKey}) { -// return super.noSuchMethod( -// Invocation.method(#getToken, [], {#vapidKey: vapidKey}), -// returnValue: Future.value(''), -// returnValueForMissingStub: Future.value(''), -// ); -// } - -// @override -// Future setAutoInitEnabled(bool? enabled) { -// return super.noSuchMethod( -// Invocation.method(#setAutoInitEnabled, [enabled]), -// returnValue: Future.value(), -// returnValueForMissingStub: Future.value(), -// ); -// } - -// @override -// Stream get onTokenRefresh { -// return super.noSuchMethod( -// Invocation.getter(#onTokenRefresh), -// returnValue: const Stream.empty(), -// returnValueForMissingStub: const Stream.empty(), -// ); -// } - -// Comment out the notification logic for the MVP -// TODO: Re-enable notifications when needed for the final release. - -// @override -// Future requestPermission({ -// bool? alert = true, -// bool? announcement = false, -// bool? badge = true, -// bool? carPlay = false, -// bool? criticalAlert = false, -// bool? provisional = false, -// bool? sound = true, -// }) { -// return super.noSuchMethod( -// Invocation.method(#requestPermission, [], { -// #alert: alert, -// #announcement: announcement, -// #badge: badge, -// #carPlay: carPlay, -// #criticalAlert: criticalAlert, -// #provisional: provisional, -// #sound: sound, -// }), -// returnValue: neverEndingFuture(), -// returnValueForMissingStub: neverEndingFuture(), -// ); -// } - -// @override -// Future subscribeToTopic(String? topic) { -// return super.noSuchMethod( -// Invocation.method(#subscribeToTopic, [topic]), -// returnValue: Future.value(), -// returnValueForMissingStub: Future.value(), -// ); -// } - -// @override -// Future unsubscribeFromTopic(String? topic) { -// return super.noSuchMethod( -// Invocation.method(#unsubscribeFromTopic, [topic]), -// returnValue: Future.value(), -// returnValueForMissingStub: Future.value(), -// ); -// } -// } - -// class TestFirebaseMessagingPlatform extends FirebaseMessagingPlatform { -// TestFirebaseMessagingPlatform() : super(); -// } diff --git a/test/helpers/setup_hive.dart b/test/helpers/setup_hive.dart deleted file mode 100644 index 55cc63be5..000000000 --- a/test/helpers/setup_hive.dart +++ /dev/null @@ -1,44 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:hive/hive.dart'; -import 'package:mockito/annotations.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -@GenerateMocks( - [ - HiveInterface, - Box, - ], - customMocks: [ - MockSpec( - as: Symbol('MockHiveBox'), - onMissingStub: OnMissingStub.returnDefault, - ), - ], -) -Future setUpUserInfoHive() async { - Hive - ..init("./temporaryPath") - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - final userBox = await Hive.openBox('userInfo'); - return userBox; -} - -Future setUpURLHive() async { - Hive.init('test/fixtures/core'); - final urlBox = await Hive.openBox('url'); - return urlBox; -} - -Future setUpCurrentUserHive() async { - Hive - ..init('test/fixtures/core') - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - final user = await Hive.openBox('currentUser'); - return user; -} diff --git a/test/helpers/setup_hive.mocks.dart b/test/helpers/setup_hive.mocks.dart deleted file mode 100644 index 8b4dfda4a..000000000 --- a/test/helpers/setup_hive.mocks.dart +++ /dev/null @@ -1,837 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in talawa/test/helpers/setup_hive.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i3; -import 'dart:typed_data' as _i6; - -import 'package:hive/hive.dart' as _i2; -import 'package:hive/src/box/default_compaction_strategy.dart' as _i5; -import 'package:hive/src/box/default_key_comparator.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i7; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeBox_0 extends _i1.SmartFake implements _i2.Box { - _FakeBox_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLazyBox_1 extends _i1.SmartFake implements _i2.LazyBox { - _FakeLazyBox_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [HiveInterface]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockHiveInterface extends _i1.Mock implements _i2.HiveInterface { - MockHiveInterface() { - _i1.throwOnMissingStub(this); - } - - @override - void init( - String? path, { - _i2.HiveStorageBackendPreference? backendPreference = - _i2.HiveStorageBackendPreference.native, - }) => - super.noSuchMethod( - Invocation.method( - #init, - [path], - {#backendPreference: backendPreference}, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.Future<_i2.Box> openBox( - String? name, { - _i2.HiveCipher? encryptionCipher, - _i2.KeyComparator? keyComparator = _i4.defaultKeyComparator, - _i2.CompactionStrategy? compactionStrategy = _i5.defaultCompactionStrategy, - bool? crashRecovery = true, - String? path, - _i6.Uint8List? bytes, - String? collection, - List? encryptionKey, - }) => - (super.noSuchMethod( - Invocation.method( - #openBox, - [name], - { - #encryptionCipher: encryptionCipher, - #keyComparator: keyComparator, - #compactionStrategy: compactionStrategy, - #crashRecovery: crashRecovery, - #path: path, - #bytes: bytes, - #collection: collection, - #encryptionKey: encryptionKey, - }, - ), - returnValue: _i3.Future<_i2.Box>.value(_FakeBox_0( - this, - Invocation.method( - #openBox, - [name], - { - #encryptionCipher: encryptionCipher, - #keyComparator: keyComparator, - #compactionStrategy: compactionStrategy, - #crashRecovery: crashRecovery, - #path: path, - #bytes: bytes, - #collection: collection, - #encryptionKey: encryptionKey, - }, - ), - )), - ) as _i3.Future<_i2.Box>); - - @override - _i3.Future<_i2.LazyBox> openLazyBox( - String? name, { - _i2.HiveCipher? encryptionCipher, - _i2.KeyComparator? keyComparator = _i4.defaultKeyComparator, - _i2.CompactionStrategy? compactionStrategy = _i5.defaultCompactionStrategy, - bool? crashRecovery = true, - String? path, - String? collection, - List? encryptionKey, - }) => - (super.noSuchMethod( - Invocation.method( - #openLazyBox, - [name], - { - #encryptionCipher: encryptionCipher, - #keyComparator: keyComparator, - #compactionStrategy: compactionStrategy, - #crashRecovery: crashRecovery, - #path: path, - #collection: collection, - #encryptionKey: encryptionKey, - }, - ), - returnValue: _i3.Future<_i2.LazyBox>.value(_FakeLazyBox_1( - this, - Invocation.method( - #openLazyBox, - [name], - { - #encryptionCipher: encryptionCipher, - #keyComparator: keyComparator, - #compactionStrategy: compactionStrategy, - #crashRecovery: crashRecovery, - #path: path, - #collection: collection, - #encryptionKey: encryptionKey, - }, - ), - )), - ) as _i3.Future<_i2.LazyBox>); - - @override - _i2.Box box(String? name) => (super.noSuchMethod( - Invocation.method( - #box, - [name], - ), - returnValue: _FakeBox_0( - this, - Invocation.method( - #box, - [name], - ), - ), - ) as _i2.Box); - - @override - _i2.LazyBox lazyBox(String? name) => (super.noSuchMethod( - Invocation.method( - #lazyBox, - [name], - ), - returnValue: _FakeLazyBox_1( - this, - Invocation.method( - #lazyBox, - [name], - ), - ), - ) as _i2.LazyBox); - - @override - bool isBoxOpen(String? name) => (super.noSuchMethod( - Invocation.method( - #isBoxOpen, - [name], - ), - returnValue: false, - ) as bool); - - @override - _i3.Future close() => (super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteBoxFromDisk( - String? name, { - String? path, - }) => - (super.noSuchMethod( - Invocation.method( - #deleteBoxFromDisk, - [name], - {#path: path}, - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteFromDisk() => (super.noSuchMethod( - Invocation.method( - #deleteFromDisk, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - List generateSecureKey() => (super.noSuchMethod( - Invocation.method( - #generateSecureKey, - [], - ), - returnValue: [], - ) as List); - - @override - _i3.Future boxExists( - String? name, { - String? path, - }) => - (super.noSuchMethod( - Invocation.method( - #boxExists, - [name], - {#path: path}, - ), - returnValue: _i3.Future.value(false), - ) as _i3.Future); - - @override - void resetAdapters() => super.noSuchMethod( - Invocation.method( - #resetAdapters, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void registerAdapter( - _i2.TypeAdapter? adapter, { - bool? internal = false, - bool? override = false, - }) => - super.noSuchMethod( - Invocation.method( - #registerAdapter, - [adapter], - { - #internal: internal, - #override: override, - }, - ), - returnValueForMissingStub: null, - ); - - @override - bool isAdapterRegistered(int? typeId) => (super.noSuchMethod( - Invocation.method( - #isAdapterRegistered, - [typeId], - ), - returnValue: false, - ) as bool); - - @override - void ignoreTypeId(int? typeId) => super.noSuchMethod( - Invocation.method( - #ignoreTypeId, - [typeId], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [Box]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockBox extends _i1.Mock implements _i2.Box { - MockBox() { - _i1.throwOnMissingStub(this); - } - - @override - Iterable get values => (super.noSuchMethod( - Invocation.getter(#values), - returnValue: [], - ) as Iterable); - - @override - String get name => (super.noSuchMethod( - Invocation.getter(#name), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#name), - ), - ) as String); - - @override - bool get isOpen => (super.noSuchMethod( - Invocation.getter(#isOpen), - returnValue: false, - ) as bool); - - @override - bool get lazy => (super.noSuchMethod( - Invocation.getter(#lazy), - returnValue: false, - ) as bool); - - @override - Iterable get keys => (super.noSuchMethod( - Invocation.getter(#keys), - returnValue: [], - ) as Iterable); - - @override - int get length => (super.noSuchMethod( - Invocation.getter(#length), - returnValue: 0, - ) as int); - - @override - bool get isEmpty => (super.noSuchMethod( - Invocation.getter(#isEmpty), - returnValue: false, - ) as bool); - - @override - bool get isNotEmpty => (super.noSuchMethod( - Invocation.getter(#isNotEmpty), - returnValue: false, - ) as bool); - - @override - Iterable valuesBetween({ - dynamic startKey, - dynamic endKey, - }) => - (super.noSuchMethod( - Invocation.method( - #valuesBetween, - [], - { - #startKey: startKey, - #endKey: endKey, - }, - ), - returnValue: [], - ) as Iterable); - - @override - E? getAt(int? index) => (super.noSuchMethod(Invocation.method( - #getAt, - [index], - )) as E?); - - @override - Map toMap() => (super.noSuchMethod( - Invocation.method( - #toMap, - [], - ), - returnValue: {}, - ) as Map); - - @override - dynamic keyAt(int? index) => super.noSuchMethod(Invocation.method( - #keyAt, - [index], - )); - - @override - _i3.Stream<_i2.BoxEvent> watch({dynamic key}) => (super.noSuchMethod( - Invocation.method( - #watch, - [], - {#key: key}, - ), - returnValue: _i3.Stream<_i2.BoxEvent>.empty(), - ) as _i3.Stream<_i2.BoxEvent>); - - @override - bool containsKey(dynamic key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: false, - ) as bool); - - @override - _i3.Future put( - dynamic key, - E? value, - ) => - (super.noSuchMethod( - Invocation.method( - #put, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future putAt( - int? index, - E? value, - ) => - (super.noSuchMethod( - Invocation.method( - #putAt, - [ - index, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future putAll(Map? entries) => (super.noSuchMethod( - Invocation.method( - #putAll, - [entries], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future add(E? value) => (super.noSuchMethod( - Invocation.method( - #add, - [value], - ), - returnValue: _i3.Future.value(0), - ) as _i3.Future); - - @override - _i3.Future> addAll(Iterable? values) => (super.noSuchMethod( - Invocation.method( - #addAll, - [values], - ), - returnValue: _i3.Future>.value([]), - ) as _i3.Future>); - - @override - _i3.Future delete(dynamic key) => (super.noSuchMethod( - Invocation.method( - #delete, - [key], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteAt(int? index) => (super.noSuchMethod( - Invocation.method( - #deleteAt, - [index], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteAll(Iterable? keys) => (super.noSuchMethod( - Invocation.method( - #deleteAll, - [keys], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future compact() => (super.noSuchMethod( - Invocation.method( - #compact, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future clear() => (super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValue: _i3.Future.value(0), - ) as _i3.Future); - - @override - _i3.Future close() => (super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteFromDisk() => (super.noSuchMethod( - Invocation.method( - #deleteFromDisk, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future flush() => (super.noSuchMethod( - Invocation.method( - #flush, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); -} - -/// A class which mocks [Box]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockHiveBox extends _i1.Mock implements _i2.Box { - @override - Iterable get values => (super.noSuchMethod( - Invocation.getter(#values), - returnValue: [], - returnValueForMissingStub: [], - ) as Iterable); - - @override - String get name => (super.noSuchMethod( - Invocation.getter(#name), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#name), - ), - returnValueForMissingStub: _i7.dummyValue( - this, - Invocation.getter(#name), - ), - ) as String); - - @override - bool get isOpen => (super.noSuchMethod( - Invocation.getter(#isOpen), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get lazy => (super.noSuchMethod( - Invocation.getter(#lazy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - Iterable get keys => (super.noSuchMethod( - Invocation.getter(#keys), - returnValue: [], - returnValueForMissingStub: [], - ) as Iterable); - - @override - int get length => (super.noSuchMethod( - Invocation.getter(#length), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - - @override - bool get isEmpty => (super.noSuchMethod( - Invocation.getter(#isEmpty), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get isNotEmpty => (super.noSuchMethod( - Invocation.getter(#isNotEmpty), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - Iterable valuesBetween({ - dynamic startKey, - dynamic endKey, - }) => - (super.noSuchMethod( - Invocation.method( - #valuesBetween, - [], - { - #startKey: startKey, - #endKey: endKey, - }, - ), - returnValue: [], - returnValueForMissingStub: [], - ) as Iterable); - - @override - E? getAt(int? index) => (super.noSuchMethod( - Invocation.method( - #getAt, - [index], - ), - returnValueForMissingStub: null, - ) as E?); - - @override - Map toMap() => (super.noSuchMethod( - Invocation.method( - #toMap, - [], - ), - returnValue: {}, - returnValueForMissingStub: {}, - ) as Map); - - @override - dynamic keyAt(int? index) => super.noSuchMethod( - Invocation.method( - #keyAt, - [index], - ), - returnValueForMissingStub: null, - ); - - @override - _i3.Stream<_i2.BoxEvent> watch({dynamic key}) => (super.noSuchMethod( - Invocation.method( - #watch, - [], - {#key: key}, - ), - returnValue: _i3.Stream<_i2.BoxEvent>.empty(), - returnValueForMissingStub: _i3.Stream<_i2.BoxEvent>.empty(), - ) as _i3.Stream<_i2.BoxEvent>); - - @override - bool containsKey(dynamic key) => (super.noSuchMethod( - Invocation.method( - #containsKey, - [key], - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i3.Future put( - dynamic key, - E? value, - ) => - (super.noSuchMethod( - Invocation.method( - #put, - [ - key, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future putAt( - int? index, - E? value, - ) => - (super.noSuchMethod( - Invocation.method( - #putAt, - [ - index, - value, - ], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future putAll(Map? entries) => (super.noSuchMethod( - Invocation.method( - #putAll, - [entries], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future add(E? value) => (super.noSuchMethod( - Invocation.method( - #add, - [value], - ), - returnValue: _i3.Future.value(0), - returnValueForMissingStub: _i3.Future.value(0), - ) as _i3.Future); - - @override - _i3.Future> addAll(Iterable? values) => (super.noSuchMethod( - Invocation.method( - #addAll, - [values], - ), - returnValue: _i3.Future>.value([]), - returnValueForMissingStub: _i3.Future>.value([]), - ) as _i3.Future>); - - @override - _i3.Future delete(dynamic key) => (super.noSuchMethod( - Invocation.method( - #delete, - [key], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteAt(int? index) => (super.noSuchMethod( - Invocation.method( - #deleteAt, - [index], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteAll(Iterable? keys) => (super.noSuchMethod( - Invocation.method( - #deleteAll, - [keys], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future compact() => (super.noSuchMethod( - Invocation.method( - #compact, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future clear() => (super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValue: _i3.Future.value(0), - returnValueForMissingStub: _i3.Future.value(0), - ) as _i3.Future); - - @override - _i3.Future close() => (super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future deleteFromDisk() => (super.noSuchMethod( - Invocation.method( - #deleteFromDisk, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); - - @override - _i3.Future flush() => (super.noSuchMethod( - Invocation.method( - #flush, - [], - ), - returnValue: _i3.Future.value(), - returnValueForMissingStub: _i3.Future.value(), - ) as _i3.Future); -} diff --git a/test/helpers/talawa_plugin_provider_test.dart b/test/helpers/talawa_plugin_provider_test.dart deleted file mode 100644 index 38c3c524f..000000000 --- a/test/helpers/talawa_plugin_provider_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/cupertino.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/plugins/talawa_plugin_provider.dart'; - -void main() { - test('TalwaPluginProvider Test', () async { - const talwaPluginProvider = TalawaPluginProvider( - pluginName: "sample", - visible: false, - child: Text("hi"), - ); - expect(talwaPluginProvider.visible, false); - expect(talwaPluginProvider.pluginName, "sample"); - }); -} diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart deleted file mode 100644 index dfdae1de6..000000000 --- a/test/helpers/test_helpers.dart +++ /dev/null @@ -1,945 +0,0 @@ -import 'dart:async'; -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:flutter/material.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/chat_service.dart'; -import 'package:talawa/services/comment_service.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/image_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/org_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/session_manager.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/event_queries.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/waiting_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/progress_dialog_view_model.dart'; - -import '../service_tests/image_service_test.dart'; -import '../service_tests/user_config_test.dart'; -import '../views/main_screen_test.dart'; -import 'test_helpers.mocks.dart'; - -@GenerateMocks( - [], - customMocks: [ - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec( - onMissingStub: OnMissingStub.returnDefault, - ), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec( - onMissingStub: OnMissingStub.returnDefault, - ), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec( - onMissingStub: OnMissingStub.returnDefault, - ), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec( - onMissingStub: OnMissingStub.returnDefault, - ), - MockSpec( - onMissingStub: OnMissingStub.returnDefault, - ), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), - ], -) - -/// member1 represents a member of the organization. -final User member1 = User(id: "testMem1"); - -/// member2 represents a member of the organization. -final User member2 = User(id: "testMem2"); - -/// admin1 represents an admin of the organization. -final User admin1 = User(id: "testAdmin1"); - -/// admin2 represents an admin of the organization. -final User admin2 = User(id: "testAdmin2"); - -/// members represents a list of members of the organization. -final List members = [member1, member2]; - -/// admins represents a list of admins of the organization. -final List admins = [admin1, admin2]; - -/// fakeOrgInfo represents a mock organization. -final fakeOrgInfo = OrgInfo( - id: "XYZ", - name: "Organization Name", - members: members, - admins: admins, - creatorInfo: User( - firstName: "ravidi", - lastName: "shaikh", - ), - userRegistrationRequired: true, -); - -/// `removeRegistrationIfExists` removes the registration of a service if it is already registered. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void _removeRegistrationIfExists() { - if (locator.isRegistered()) { - locator.unregister(); - } -} - -/// `getAndRegisterNavigationService` returns a mock instance of the `NavigationService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `NavigationService`: A mock instance of the `NavigationService` class. -NavigationService getAndRegisterNavigationService() { - _removeRegistrationIfExists(); - final service = MockNavigationService(); - when(service.navigatorKey).thenReturn(GlobalKey()); - when(service.removeAllAndPush(any, any, arguments: anyNamed('arguments'))) - .thenAnswer((_) async {}); - when(service.pushScreen(any, arguments: anyNamed('arguments'))) - .thenAnswer((_) async {}); - when(service.popAndPushScreen(any, arguments: '-1')).thenAnswer((_) async {}); - when(service.pushDialog(any)).thenAnswer((_) async {}); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterOrganizationService` returns a mock instance of the `OrganizationService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `OrganizationService`: A mock instance of the `OrganizationService` class. -OrganizationService getAndRegisterOrganizationService() { - _removeRegistrationIfExists(); - final service = MockOrganizationService(); - locator.registerSingleton(service); - - final User user1 = User( - id: "fakeUser1", - firstName: 'ayush', - lastName: 'chaudhary', - image: 'www.image.com', - ); - final User user2 = User( - id: "fakeUser2", - firstName: 'ayush', - lastName: 'chaudhary', - image: 'www.image.com', - ); - final List users = [user1, user2]; - when(service.getOrgMembersList('XYZ')).thenAnswer((realInvocation) async { - return users; - }); - return service; -} - -/// `getAndRegisterAppTheme` returns a mock instance of the `AppTheme` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `AppTheme`: A mock instance of the `AppTheme` class. -AppTheme getAndRegisterAppTheme() { - _removeRegistrationIfExists(); - final service = MockAppTheme(); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterCommentService` returns a mock instance of the `CommentService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `CommentService`: A mock instance of the `CommentService` class. -CommentService getAndRegisterCommentService() { - _removeRegistrationIfExists(); - final service = MockCommentService(); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterSessionManager` returns a mock instance of the `SessionManager` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `SessionManager`: A mock instance of the `SessionManager` class. -SessionManager getAndRegisterSessionManager() { - _removeRegistrationIfExists(); - final service = MockSessionManger(); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterChatService` returns a mock instance of the `ChatService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `ChatService`: A mock instance of the `ChatService` class. -ChatService getAndRegisterChatService() { - _removeRegistrationIfExists(); - final service = MockChatService(); - final StreamController streamController = - StreamController(); - final Stream stream = - streamController.stream.asBroadcastStream(); - - final StreamController chatMessageController = - StreamController(); - final Stream messagestream = - chatMessageController.stream.asBroadcastStream(); - - when(service.chatListStream).thenAnswer((invocation) => stream); - when(service.chatMessagesStream).thenAnswer((invocation) => messagestream); - when(service.getDirectChatsByUserId()).thenAnswer( - (invocation) async => streamController.add( - ChatListTileDataModel( - [ - ChatUser( - firstName: 'test', - id: '1', - image: 'fakeHttp', - ), - ], - '1', - ), - ), - ); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterAppLanguage` returns a mock instance of the `AppLanguage` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `AppLanguage`: A mock instance of the `AppLanguage` class. -AppLanguage getAndRegisterAppLanguage() { - _removeRegistrationIfExists(); - final service = MockAppLanguage(); - - when(service.appLocal).thenReturn(const Locale('en')); - - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterGraphqlConfig` returns a mock instance of the `GraphqlConfig` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `GraphqlConfig`: A mock instance of the `GraphqlConfig` class. -GraphqlConfig getAndRegisterGraphqlConfig() { - _removeRegistrationIfExists(); - final service = MockGraphqlConfig(); - - when(service.httpLink).thenReturn( - HttpLink( - 'https://talawa-graphql-api.herokuapp.com/graphql', - httpClient: MockHttpClient(), - ), - ); - - when(service.clientToQuery()).thenAnswer((realInvocation) { - // return GraphQLClient( - // cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - // link: service.httpLink, - // ); - - return locator(); - }); - - when(service.authClient()).thenAnswer((realInvocation) { - // final AuthLink authLink = - // AuthLink(getToken: () async => 'Bearer ${GraphqlConfig.token}'); - // final Link finalAuthLink = authLink.concat(service.httpLink); - // return GraphQLClient( - // cache: GraphQLCache(partialDataPolicy: PartialDataCachePolicy.accept), - // link: finalAuthLink, - // ); - return locator(); - }); - - when(service.getToken()).thenAnswer((_) async => "sample_token"); - - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterGraphQLClient` returns a mock instance of the `GraphQLClient` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `GraphQLClient`: A mock instance of the `GraphQLClient` class. -GraphQLClient getAndRegisterGraphQLClient() { - _removeRegistrationIfExists(); - - final service = MockGraphQLClient(); - - // Either fill this with mock data or override this stub - // and return null - - when(service.query(any)).thenAnswer( - (realInvocation) async { - if (locator.isRegistered()) { - return Future.value( - QueryResult>( - source: QueryResultSource.network, - data: { - "getPlugins": null, - }, - options: QueryOptions( - document: gql(queries.getPluginsList()), - ), - ), - ); - } else { - return Future.value( - QueryResult>( - source: QueryResultSource.network, - data: null, - options: QueryOptions( - document: gql(queries.getPluginsList()), - ), - ), - ); - } - }, - ); - - when(service.defaultPolicies).thenAnswer( - (realInvocation) => DefaultPolicies(), - ); - when(service.queryManager).thenAnswer( - (realInvocation) => QueryManager( - link: HttpLink("testurl"), - cache: GraphQLCache(), - ), - ); - - locator.registerSingleton(service); - - return service; -} - -/// `getAndRegisterDatabaseMutationFunctions` returns a mock instance of the `DataBaseMutationFunctions` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `DataBaseMutationFunctions`: A mock instance of the `DataBaseMutationFunctions` class. -DataBaseMutationFunctions getAndRegisterDatabaseMutationFunctions() { - _removeRegistrationIfExists(); - final service = MockDataBaseMutationFunctions(); - when(service.refreshAccessToken('testtoken')).thenAnswer((_) async { - return true; - }); - when(service.fetchOrgById('fake_id')).thenAnswer((_) async { - return fakeOrgInfo; - }); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterUserConfig` returns a mock instance of the `UserConfig` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `UserConfig`: A mock instance of the `UserConfig` class. -UserConfig getAndRegisterUserConfig() { - _removeRegistrationIfExists(); - final service = MockUserConfig(); - - when(service.userLoggedIn()).thenAnswer( - (realInvocation) => Future.value(false), - ); - - when(service.currentUser).thenReturn( - User( - id: 'id', - firstName: 'john', - lastName: 'snow', - ), - ); - - //Mock Data for current organizaiton. - when(service.currentOrg).thenReturn( - OrgInfo( - id: "XYZ", - name: "Organization Name", - members: members, - admins: admins, - ), - ); - - //Mock Stream for currentOrgStream - final StreamController streamController = StreamController(); - final Stream stream = streamController.stream.asBroadcastStream(); - when(service.currentOrgInfoController) - .thenAnswer((invocation) => streamController); - when(service.currentOrgInfoStream).thenAnswer((invocation) => stream); - - //Mkock current user - when(service.currentUser).thenReturn( - User( - id: "xzy1", - firstName: "Test", - lastName: "User", - email: "testuser@gmail.com", - refreshToken: "testtoken", - authToken: 'testtoken', - adminFor: [], - joinedOrganizations: [ - OrgInfo( - id: '3', - name: 'test org 3', - userRegistrationRequired: false, - creatorInfo: User(firstName: 'test', lastName: '1'), - ), - OrgInfo( - id: '4', - name: 'test org 4', - userRegistrationRequired: true, - creatorInfo: User(firstName: 'test', lastName: '2'), - ), - OrgInfo( - id: "XYZ", - name: "Organization Name", - ), - ], - membershipRequests: [ - OrgInfo( - id: '1', - name: 'test org', - userRegistrationRequired: true, - creatorInfo: User(firstName: 'test', lastName: 'test'), - ), - OrgInfo( - id: '2', - name: 'test org', - userRegistrationRequired: true, - creatorInfo: User(firstName: 'test', lastName: 'test'), - ), - ], - ), - ); - - locator.registerSingleton(service); - - return service; -} - -/// `getAndRegisterPostService` returns a mock instance of the `PostService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `PostService`: A mock instance of the `PostService` class. -PostService getAndRegisterPostService() { - _removeRegistrationIfExists(); - final service = MockPostService(); - - //Mock Stream for currentOrgStream - final StreamController> streamController = StreamController(); - final Stream> stream = streamController.stream.asBroadcastStream(); - // _streamController.add(posts); - when(service.postStream).thenAnswer((invocation) => stream); - - final StreamController updateStreamController = StreamController(); - final Stream updateStream = - updateStreamController.stream.asBroadcastStream(); - when(service.updatedPostStream).thenAnswer((invocation) => updateStream); - - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterMultiMediaPickerService` returns a mock instance of the `MultiMediaPickerService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `MultiMediaPickerService`: A mock instance of the `MultiMediaPickerService` class. -MultiMediaPickerService getAndRegisterMultiMediaPickerService() { - _removeRegistrationIfExists(); - final service = MockMultiMediaPickerService(); - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterImageCropper` returns a mock instance of the `ImageCropper` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `ImageCropper`: A mock instance of the `ImageCropper` class. -ImageCropper getAndRegisterImageCropper() { - _removeRegistrationIfExists(); - final service = MockImageCropper(); - locator.registerLazySingleton(() => service); - return service; -} - -/// `getAndRegisterImageService` returns a mock instance of the `ImageService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `ImageService`: A mock instance of the `ImageService` class. -ImageService getAndRegisterImageService() { - _removeRegistrationIfExists(); - final service = MockImageService(); - locator.registerLazySingleton(() => service); - return service; -} - -/// `getAndRegisterImagePicker` returns a mock instance of the `ImagePicker` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `ImagePicker`: A mock instance of the `ImagePicker` class. -ImagePicker getAndRegisterImagePicker() { - _removeRegistrationIfExists(); - final service = MockImagePicker(); - locator.registerLazySingleton(() => service); - return service; -} - -/// `getAndRegisterEventService` returns a mock instance of the `EventService` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `EventService`: A mock instance of the `EventService` class. -EventService getAndRegisterEventService() { - _removeRegistrationIfExists(); - final service = MockEventService(); - - //Mock Stream for currentOrgStream - final StreamController streamController = StreamController(); - final Stream stream = streamController.stream.asBroadcastStream(); - when(service.eventStream).thenAnswer((invocation) => stream); - when(service.getEvents()).thenAnswer( - (invocation) async => streamController.add( - Event( - id: '1', - title: 'test', - startTime: '10000', - endTime: '20000', - location: 'ABC', - description: 'test', - creator: User( - id: "xzy1", - firstName: "Test", - lastName: "User", - email: "testuser@gmail.com", - refreshToken: "testtoken", - authToken: 'testtoken', - ), - admins: [ - User( - id: "xzy1", - firstName: "Test", - lastName: "User", - ), - ], - isPublic: true, - organization: OrgInfo(id: 'XYZ'), - ), - ), - ); - const data = { - 'getEventAttendeesByEventId': [ - { - 'userId': 'xzy1', - } - ], - }; - when(service.fetchAttendeesByEvent('1')).thenAnswer( - (realInvocation) async => QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql( - EventQueries().attendeesByEvent('1'), - ), - ), - ), - ); - - locator.registerSingleton(service); - return service; -} - -/// `getAndRegisterConnectivityService` returns a mock instance of the `Connectivity` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `Connectivity`: A mock instance of the `Connectivity` class. -Connectivity getAndRegisterConnectivityService() { - _removeRegistrationIfExists(); - final service = MockConnectivity(); - locator.registerSingleton(service); - return service; -} - -/// `getPostMockModel` returns a mock instance of the `Post` class. -/// -/// **params**: -/// * `sId`: represent the post id. -/// * `description`: represent the post description. -/// * `duration`: represent the post duration. -/// -/// **returns**: -/// * `Post`: A mock instance of the `Post` class. -Post getPostMockModel({ - String sId = "PostID", - String description = "TestDescription", - String duration = "2 Months Ago", -}) { - final postMock = MockPost(); - when(postMock.sId).thenReturn(sId); - when(postMock.creator).thenReturn( - User( - firstName: "TestName", - ), - ); - when(postMock.description).thenReturn(description); - when(postMock.comments).thenReturn([]); - when(postMock.getPostCreatedDuration()).thenReturn(duration); - return postMock; -} - -/// `getAndRegisterCreateEventModel` returns a mock instance of the `CreateEventViewModel` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `CreateEventViewModel`: A mock instance of the `CreateEventViewModel` class. -CreateEventViewModel getAndRegisterCreateEventModel() { - _removeRegistrationIfExists(); - final cachedViewModel = MockCreateEventViewModel(); - - final formKey = GlobalKey(); - final textEditingController = TextEditingController(); - final focusNode = FocusNode(); - - when(cachedViewModel.formKey).thenReturn(formKey); - when(cachedViewModel.titleFocus).thenReturn(focusNode); - when(cachedViewModel.locationFocus).thenReturn(focusNode); - when(cachedViewModel.descriptionFocus).thenReturn(focusNode); - when(cachedViewModel.eventLocationTextController) - .thenReturn(textEditingController); - when(cachedViewModel.eventTitleTextController) - .thenReturn(textEditingController); - when(cachedViewModel.eventDescriptionTextController) - .thenReturn(textEditingController); - when(cachedViewModel.eventStartDate).thenReturn(DateTime.now()); - when(cachedViewModel.eventEndDate).thenReturn(DateTime.now()); - when(cachedViewModel.eventStartTime).thenReturn(TimeOfDay.now()); - when(cachedViewModel.eventEndTime).thenReturn(TimeOfDay.now()); - when(cachedViewModel.isPublicSwitch).thenReturn(true); - when(cachedViewModel.isRegisterableSwitch).thenReturn(true); - - final User user1 = User( - id: "fakeUser1", - firstName: 'r', - lastName: 'p', - ); - - final mapType = {user1.id!: true}; - - when(cachedViewModel.getCurrentOrgUsersList()) - .thenAnswer((realInvocation) async { - return [user1]; - }); - - when(cachedViewModel.selectedMembers).thenReturn([user1]); - when(cachedViewModel.orgMembersList).thenReturn([user1]); - when(cachedViewModel.memberCheckedMap).thenReturn(mapType); - when(cachedViewModel.isAllDay).thenReturn(true); - when(cachedViewModel.eventStartTime).thenReturn(TimeOfDay.now()); - - when(cachedViewModel.eventEndTime).thenReturn( - TimeOfDay.now().replacing( - hour: - (TimeOfDay.now().hour + (TimeOfDay.now().minute >= 30 ? 1 : 0)) % 24, - minute: (TimeOfDay.now().minute + 30) % 60, - ), - ); - - when(cachedViewModel.removeUserFromList(userId: "fakeUser1")) - .thenAnswer((realInvocation) async { - when(cachedViewModel.selectedMembers).thenReturn([]); - }); - - when(cachedViewModel.createEvent()).thenAnswer((realInvocation) async { - print('called'); - }); - - locator.registerSingleton(cachedViewModel); - return cachedViewModel; -} - -/// `getAndRegisterDirectChatViewModel` returns a mock instance of the `DirectChatViewModel` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `DirectChatViewModel`: A mock instance of the `DirectChatViewModel` class. -DirectChatViewModel getAndRegisterDirectChatViewModel() { - _removeRegistrationIfExists(); - final cachedViewModel = MockDirectChatViewModel(); - final formKey = GlobalKey(); - final ChatUser chatUser1 = - ChatUser(firstName: "XYZ", id: "XYZ", image: "XYZ"); - final ChatUser chatUser2 = - ChatUser(firstName: "ABC", id: "ABC", image: "ABC"); - final ChatMessage chatMessage1 = - ChatMessage("XYZ", chatUser1, "XYZ", chatUser2); - final ChatMessage chatMessage2 = - ChatMessage("XYZ", chatUser1, "Something", chatUser2); - final Map> messages = { - "XYZ": [chatMessage1], - }; - final ChatListTileDataModel chatListTileDataModel1 = - ChatListTileDataModel([chatUser1, chatUser2], "XYZ"); - - when(cachedViewModel.listKey).thenReturn(formKey); - // Default is the loaded state - when(cachedViewModel.chatState).thenReturn(ChatState.complete); - when(cachedViewModel.name).thenReturn("XYZ"); - when(cachedViewModel.chats).thenReturn([chatListTileDataModel1]); - when(cachedViewModel.chatMessagesByUser).thenReturn(messages); - when(cachedViewModel.initialise()).thenAnswer((realInvocation) async {}); - when(cachedViewModel.sendMessageToDirectChat("XYZ", "Something")) - .thenAnswer((realInvocation) async { - messages['XYZ']?.add(chatMessage2); - }); - when(cachedViewModel.getChatMessages("XYZ")) - .thenAnswer((realInvocation) async {}); - when(cachedViewModel.chatName("XYZ")).thenAnswer((realInvocation) {}); - - locator.registerSingleton(cachedViewModel); - return cachedViewModel; -} - -/// `getAndRegisterExploreEventsViewModel` returns a mock instance of the `ExploreEventsViewModel` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `ExploreEventsViewModel`: A mock instance of the `ExploreEventsViewModel` class. -ExploreEventsViewModel getAndRegisterExploreEventsViewModel() { - _removeRegistrationIfExists(); - final cachedViewModel = MockExploreEventsViewModel(); - - const String chosenValue = 'All Events'; - const String emptyListMessage = "Looks like there aren't any events."; - - final EventService mockEventService = EventService(); - - when(cachedViewModel.eventService).thenReturn(mockEventService); - when(cachedViewModel.chosenValue).thenReturn(chosenValue); - when(cachedViewModel.emptyListMessage).thenReturn(emptyListMessage); - - locator.registerSingleton(cachedViewModel); - return cachedViewModel; -} - -/// `getAndRegisterMainViewModel` returns a mock instance of the `MainScreenViewModel` class. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `MainScreenViewModel`: A mock instance of the `MainScreenViewModel` class. -MainScreenViewModel getAndRegisterMainViewModel() { - _removeRegistrationIfExists(); - final cachedViewModel = MockMainScreenViewModel(); - - locator.registerSingleton(cachedViewModel); - return cachedViewModel; -} - -/// `registerServices` registers all the services required for the test. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void registerServices() { - getAndRegisterNavigationService(); - getAndRegisterAppLanguage(); - getAndRegisterGraphQLClient(); - getAndRegisterGraphqlConfig(); - getAndRegisterUserConfig(); - getAndRegisterPostService(); - getAndRegisterEventService(); - getAndRegisterMultiMediaPickerService(); - getAndRegisterConnectivityService(); - getAndRegisterDatabaseMutationFunctions(); - getAndRegisterOrganizationService(); - getAndRegisterCommentService(); - getAndRegisterChatService(); - getAndRegisterImageCropper(); - getAndRegisterImagePicker(); -} - -/// `unregisterServices` unregisters all the services required for the test. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void unregisterServices() { - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); -} - -/// registerViewModels registers all the view models required for the test. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void registerViewModels() { - locator.registerFactory(() => MainScreenViewModel()); - locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => ExploreEventsViewModel()); - locator - .registerFactory(() => MockCreateEventViewModel()); - locator.registerFactory(() => AddPostViewModel()); - locator.registerFactory(() => ProfilePageViewModel()); - locator.registerFactory(() => LikeButtonViewModel()); - locator.registerFactory(() => SizeConfig()); - locator.registerFactory(() => DirectChatViewModel()); - locator.registerFactory(() => WaitingViewModel()); - locator.registerFactory(() => EventInfoViewModel()); - locator.registerFactory(() => ProgressDialogViewModel()); - locator.registerFactory(() => SelectOrganizationViewModel()); - locator.registerFactory(() => CustomDrawerViewModel()); - locator.registerFactory(() => SelectContactViewModel()); -} - -/// `unregisterViewModels` unregisters all the view models required for the test. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void unregisterViewModels() { - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); - locator.unregister(); -} diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart deleted file mode 100644 index 017b54648..000000000 --- a/test/helpers/test_helpers.mocks.dart +++ /dev/null @@ -1,4412 +0,0 @@ -// Mocks generated by Mockito 5.4.4 from annotations -// in talawa/test/helpers/test_helpers.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:io' as _i19; -import 'dart:ui' as _i10; - -import 'package:connectivity_plus/connectivity_plus.dart' as _i27; -import 'package:connectivity_plus_platform_interface/connectivity_plus_platform_interface.dart' - as _i28; -import 'package:flutter/material.dart' as _i1; -import 'package:graphql_flutter/graphql_flutter.dart' as _i3; -import 'package:image_cropper/src/cropper.dart' as _i41; -import 'package:image_cropper_platform_interface/image_cropper_platform_interface.dart' - as _i42; -import 'package:image_picker/image_picker.dart' as _i13; -import 'package:mockito/mockito.dart' as _i2; -import 'package:mockito/src/dummies.dart' as _i25; -import 'package:qr_code_scanner/src/qr_code_scanner.dart' as _i34; -import 'package:qr_code_scanner/src/types/barcode.dart' as _i35; -import 'package:qr_code_scanner/src/types/camera.dart' as _i36; -import 'package:qr_code_scanner/src/types/features.dart' as _i12; -import 'package:talawa/enums/enums.dart' as _i14; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart' as _i22; -import 'package:talawa/models/chats/chat_message.dart' as _i23; -import 'package:talawa/models/events/event_model.dart' as _i20; -import 'package:talawa/models/organization/org_info.dart' as _i6; -import 'package:talawa/models/post/post_model.dart' as _i17; -import 'package:talawa/models/user/user_info.dart' as _i7; -import 'package:talawa/services/chat_service.dart' as _i21; -import 'package:talawa/services/comment_service.dart' as _i37; -import 'package:talawa/services/database_mutation_functions.dart' as _i9; -import 'package:talawa/services/event_service.dart' as _i11; -import 'package:talawa/services/graphql_config.dart' as _i15; -import 'package:talawa/services/navigation_service.dart' as _i8; -import 'package:talawa/services/org_service.dart' as _i30; -import 'package:talawa/services/post_service.dart' as _i16; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart' - as _i18; -import 'package:talawa/services/user_config.dart' as _i24; -import 'package:talawa/utils/validators.dart' as _i33; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart' - as _i40; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart' - as _i39; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart' - as _i31; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart' - as _i32; -import 'package:talawa/view_model/lang_view_model.dart' as _i26; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart' - as _i29; -import 'package:talawa/view_model/theme_view_model.dart' as _i38; -import 'package:talawa/widgets/custom_alert_dialog.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeGlobalKey_0> - extends _i2.SmartFake implements _i1.GlobalKey { - _FakeGlobalKey_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeHttpLink_1 extends _i2.SmartFake implements _i3.HttpLink { - _FakeHttpLink_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeWebSocketLink_2 extends _i2.SmartFake implements _i3.WebSocketLink { - _FakeWebSocketLink_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeGraphQLClient_3 extends _i2.SmartFake implements _i3.GraphQLClient { - _FakeGraphQLClient_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDefaultPolicies_4 extends _i2.SmartFake - implements _i3.DefaultPolicies { - _FakeDefaultPolicies_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLink_5 extends _i2.SmartFake implements _i3.Link { - _FakeLink_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeGraphQLCache_6 extends _i2.SmartFake implements _i3.GraphQLCache { - _FakeGraphQLCache_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeQueryManager_7 extends _i2.SmartFake implements _i3.QueryManager { - _FakeQueryManager_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeObservableQuery_8 extends _i2.SmartFake - implements _i3.ObservableQuery { - _FakeObservableQuery_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeQueryResult_9 extends _i2.SmartFake - implements _i3.QueryResult { - _FakeQueryResult_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeCustomAlertDialog_10 extends _i2.SmartFake - implements _i4.CustomAlertDialog { - _FakeCustomAlertDialog_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); - - @override - String toString({_i1.DiagnosticLevel? minLevel = _i1.DiagnosticLevel.info}) => - super.toString(); -} - -class _FakeStreamController_11 extends _i2.SmartFake - implements _i5.StreamController { - _FakeStreamController_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeOrgInfo_12 extends _i2.SmartFake implements _i6.OrgInfo { - _FakeOrgInfo_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeUser_13 extends _i2.SmartFake implements _i7.User { - _FakeUser_13( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeNavigationService_14 extends _i2.SmartFake - implements _i8.NavigationService { - _FakeNavigationService_14( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDataBaseMutationFunctions_15 extends _i2.SmartFake - implements _i9.DataBaseMutationFunctions { - _FakeDataBaseMutationFunctions_15( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLocale_16 extends _i2.SmartFake implements _i10.Locale { - _FakeLocale_16( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTextEditingController_17 extends _i2.SmartFake - implements _i1.TextEditingController { - _FakeTextEditingController_17( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFocusNode_18 extends _i2.SmartFake implements _i1.FocusNode { - _FakeFocusNode_18( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); - - @override - String toString({_i1.DiagnosticLevel? minLevel = _i1.DiagnosticLevel.info}) => - super.toString(); -} - -class _FakeGraphQLError_19 extends _i2.SmartFake implements _i3.GraphQLError { - _FakeGraphQLError_19( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeEventService_20 extends _i2.SmartFake implements _i11.EventService { - _FakeEventService_20( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeSystemFeatures_21 extends _i2.SmartFake - implements _i12.SystemFeatures { - _FakeSystemFeatures_21( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeTimeOfDay_22 extends _i2.SmartFake implements _i1.TimeOfDay { - _FakeTimeOfDay_22( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDateTime_23 extends _i2.SmartFake implements DateTime { - _FakeDateTime_23( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLostDataResponse_24 extends _i2.SmartFake - implements _i13.LostDataResponse { - _FakeLostDataResponse_24( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [NavigationService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockNavigationService extends _i2.Mock implements _i8.NavigationService { - @override - _i1.GlobalKey<_i1.NavigatorState> get navigatorKey => (super.noSuchMethod( - Invocation.getter(#navigatorKey), - returnValue: _FakeGlobalKey_0<_i1.NavigatorState>( - this, - Invocation.getter(#navigatorKey), - ), - returnValueForMissingStub: _FakeGlobalKey_0<_i1.NavigatorState>( - this, - Invocation.getter(#navigatorKey), - ), - ) as _i1.GlobalKey<_i1.NavigatorState>); - - @override - set navigatorKey(_i1.GlobalKey<_i1.NavigatorState>? _navigatorKey) => - super.noSuchMethod( - Invocation.setter( - #navigatorKey, - _navigatorKey, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future pushScreen( - String? routeName, { - dynamic arguments, - }) => - (super.noSuchMethod( - Invocation.method( - #pushScreen, - [routeName], - {#arguments: arguments}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future popAndPushScreen( - String? routeName, { - dynamic arguments, - }) => - (super.noSuchMethod( - Invocation.method( - #popAndPushScreen, - [routeName], - {#arguments: arguments}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future pushReplacementScreen( - String? routeName, { - dynamic arguments, - }) => - (super.noSuchMethod( - Invocation.method( - #pushReplacementScreen, - [routeName], - {#arguments: arguments}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future removeAllAndPush( - String? routeName, - String? tillRoute, { - dynamic arguments, - }) => - (super.noSuchMethod( - Invocation.method( - #removeAllAndPush, - [ - routeName, - tillRoute, - ], - {#arguments: arguments}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void pushDialog(_i1.Widget? dialog) => super.noSuchMethod( - Invocation.method( - #pushDialog, - [dialog], - ), - returnValueForMissingStub: null, - ); - - @override - void showSnackBar( - String? message, { - Duration? duration = const Duration(seconds: 2), - }) => - super.noSuchMethod( - Invocation.method( - #showSnackBar, - [message], - {#duration: duration}, - ), - returnValueForMissingStub: null, - ); - - @override - void showTalawaErrorSnackBar( - String? errorMessage, - _i14.MessageType? messageType, - ) => - super.noSuchMethod( - Invocation.method( - #showTalawaErrorSnackBar, - [ - errorMessage, - messageType, - ], - ), - returnValueForMissingStub: null, - ); - - @override - void showTalawaErrorDialog( - String? errorMessage, - _i14.MessageType? messageType, - ) => - super.noSuchMethod( - Invocation.method( - #showTalawaErrorDialog, - [ - errorMessage, - messageType, - ], - ), - returnValueForMissingStub: null, - ); - - @override - void pop() => super.noSuchMethod( - Invocation.method( - #pop, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [GraphqlConfig]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockGraphqlConfig extends _i2.Mock implements _i15.GraphqlConfig { - @override - _i3.HttpLink get httpLink => (super.noSuchMethod( - Invocation.getter(#httpLink), - returnValue: _FakeHttpLink_1( - this, - Invocation.getter(#httpLink), - ), - returnValueForMissingStub: _FakeHttpLink_1( - this, - Invocation.getter(#httpLink), - ), - ) as _i3.HttpLink); - - @override - set httpLink(_i3.HttpLink? _httpLink) => super.noSuchMethod( - Invocation.setter( - #httpLink, - _httpLink, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.WebSocketLink get webSocketLink => (super.noSuchMethod( - Invocation.getter(#webSocketLink), - returnValue: _FakeWebSocketLink_2( - this, - Invocation.getter(#webSocketLink), - ), - returnValueForMissingStub: _FakeWebSocketLink_2( - this, - Invocation.getter(#webSocketLink), - ), - ) as _i3.WebSocketLink); - - @override - set webSocketLink(_i3.WebSocketLink? _webSocketLink) => super.noSuchMethod( - Invocation.setter( - #webSocketLink, - _webSocketLink, - ), - returnValueForMissingStub: null, - ); - - @override - set displayImgRoute(String? _displayImgRoute) => super.noSuchMethod( - Invocation.setter( - #displayImgRoute, - _displayImgRoute, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future getToken() => (super.noSuchMethod( - Invocation.method( - #getToken, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void getOrgUrl() => super.noSuchMethod( - Invocation.method( - #getOrgUrl, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLClient clientToQuery() => (super.noSuchMethod( - Invocation.method( - #clientToQuery, - [], - ), - returnValue: _FakeGraphQLClient_3( - this, - Invocation.method( - #clientToQuery, - [], - ), - ), - returnValueForMissingStub: _FakeGraphQLClient_3( - this, - Invocation.method( - #clientToQuery, - [], - ), - ), - ) as _i3.GraphQLClient); - - @override - _i3.GraphQLClient authClient() => (super.noSuchMethod( - Invocation.method( - #authClient, - [], - ), - returnValue: _FakeGraphQLClient_3( - this, - Invocation.method( - #authClient, - [], - ), - ), - returnValueForMissingStub: _FakeGraphQLClient_3( - this, - Invocation.method( - #authClient, - [], - ), - ), - ) as _i3.GraphQLClient); - - @override - void test() => super.noSuchMethod( - Invocation.method( - #test, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [GraphQLClient]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { - @override - _i3.DefaultPolicies get defaultPolicies => (super.noSuchMethod( - Invocation.getter(#defaultPolicies), - returnValue: _FakeDefaultPolicies_4( - this, - Invocation.getter(#defaultPolicies), - ), - returnValueForMissingStub: _FakeDefaultPolicies_4( - this, - Invocation.getter(#defaultPolicies), - ), - ) as _i3.DefaultPolicies); - - @override - set defaultPolicies(_i3.DefaultPolicies? _defaultPolicies) => - super.noSuchMethod( - Invocation.setter( - #defaultPolicies, - _defaultPolicies, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.Link get link => (super.noSuchMethod( - Invocation.getter(#link), - returnValue: _FakeLink_5( - this, - Invocation.getter(#link), - ), - returnValueForMissingStub: _FakeLink_5( - this, - Invocation.getter(#link), - ), - ) as _i3.Link); - - @override - _i3.GraphQLCache get cache => (super.noSuchMethod( - Invocation.getter(#cache), - returnValue: _FakeGraphQLCache_6( - this, - Invocation.getter(#cache), - ), - returnValueForMissingStub: _FakeGraphQLCache_6( - this, - Invocation.getter(#cache), - ), - ) as _i3.GraphQLCache); - - @override - _i3.QueryManager get queryManager => (super.noSuchMethod( - Invocation.getter(#queryManager), - returnValue: _FakeQueryManager_7( - this, - Invocation.getter(#queryManager), - ), - returnValueForMissingStub: _FakeQueryManager_7( - this, - Invocation.getter(#queryManager), - ), - ) as _i3.QueryManager); - - @override - set queryManager(_i3.QueryManager? _queryManager) => super.noSuchMethod( - Invocation.setter( - #queryManager, - _queryManager, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLClient copyWith({ - _i3.Link? link, - _i3.GraphQLCache? cache, - _i3.DefaultPolicies? defaultPolicies, - bool? alwaysRebroadcast, - }) => - (super.noSuchMethod( - Invocation.method( - #copyWith, - [], - { - #link: link, - #cache: cache, - #defaultPolicies: defaultPolicies, - #alwaysRebroadcast: alwaysRebroadcast, - }, - ), - returnValue: _FakeGraphQLClient_3( - this, - Invocation.method( - #copyWith, - [], - { - #link: link, - #cache: cache, - #defaultPolicies: defaultPolicies, - #alwaysRebroadcast: alwaysRebroadcast, - }, - ), - ), - returnValueForMissingStub: _FakeGraphQLClient_3( - this, - Invocation.method( - #copyWith, - [], - { - #link: link, - #cache: cache, - #defaultPolicies: defaultPolicies, - #alwaysRebroadcast: alwaysRebroadcast, - }, - ), - ), - ) as _i3.GraphQLClient); - - @override - _i3.ObservableQuery watchQuery( - _i3.WatchQueryOptions? options) => - (super.noSuchMethod( - Invocation.method( - #watchQuery, - [options], - ), - returnValue: _FakeObservableQuery_8( - this, - Invocation.method( - #watchQuery, - [options], - ), - ), - returnValueForMissingStub: _FakeObservableQuery_8( - this, - Invocation.method( - #watchQuery, - [options], - ), - ), - ) as _i3.ObservableQuery); - - @override - _i3.ObservableQuery watchMutation( - _i3.WatchQueryOptions? options) => - (super.noSuchMethod( - Invocation.method( - #watchMutation, - [options], - ), - returnValue: _FakeObservableQuery_8( - this, - Invocation.method( - #watchMutation, - [options], - ), - ), - returnValueForMissingStub: _FakeObservableQuery_8( - this, - Invocation.method( - #watchMutation, - [options], - ), - ), - ) as _i3.ObservableQuery); - - @override - _i5.Future<_i3.QueryResult> query( - _i3.QueryOptions? options) => - (super.noSuchMethod( - Invocation.method( - #query, - [options], - ), - returnValue: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #query, - [options], - ), - )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #query, - [options], - ), - )), - ) as _i5.Future<_i3.QueryResult>); - - @override - _i5.Future<_i3.QueryResult> mutate( - _i3.MutationOptions? options) => - (super.noSuchMethod( - Invocation.method( - #mutate, - [options], - ), - returnValue: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #mutate, - [options], - ), - )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #mutate, - [options], - ), - )), - ) as _i5.Future<_i3.QueryResult>); - - @override - _i5.Stream<_i3.QueryResult> subscribe( - _i3.SubscriptionOptions? options) => - (super.noSuchMethod( - Invocation.method( - #subscribe, - [options], - ), - returnValue: _i5.Stream<_i3.QueryResult>.empty(), - returnValueForMissingStub: _i5.Stream<_i3.QueryResult>.empty(), - ) as _i5.Stream<_i3.QueryResult>); - - @override - _i5.Future<_i3.QueryResult> fetchMore( - _i3.FetchMoreOptions? fetchMoreOptions, { - required _i3.QueryOptions? originalOptions, - required _i3.QueryResult? previousResult, - }) => - (super.noSuchMethod( - Invocation.method( - #fetchMore, - [fetchMoreOptions], - { - #originalOptions: originalOptions, - #previousResult: previousResult, - }, - ), - returnValue: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #fetchMore, - [fetchMoreOptions], - { - #originalOptions: originalOptions, - #previousResult: previousResult, - }, - ), - )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( - _FakeQueryResult_9( - this, - Invocation.method( - #fetchMore, - [fetchMoreOptions], - { - #originalOptions: originalOptions, - #previousResult: previousResult, - }, - ), - )), - ) as _i5.Future<_i3.QueryResult>); - - @override - Map? readQuery( - _i3.Request? request, { - bool? optimistic = true, - }) => - (super.noSuchMethod( - Invocation.method( - #readQuery, - [request], - {#optimistic: optimistic}, - ), - returnValueForMissingStub: null, - ) as Map?); - - @override - Map? readFragment( - _i3.FragmentRequest? fragmentRequest, { - bool? optimistic = true, - }) => - (super.noSuchMethod( - Invocation.method( - #readFragment, - [fragmentRequest], - {#optimistic: optimistic}, - ), - returnValueForMissingStub: null, - ) as Map?); - - @override - void writeQuery( - _i3.Request? request, { - required Map? data, - bool? broadcast = true, - }) => - super.noSuchMethod( - Invocation.method( - #writeQuery, - [request], - { - #data: data, - #broadcast: broadcast, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void writeFragment( - _i3.FragmentRequest? fragmentRequest, { - bool? broadcast = true, - required Map? data, - }) => - super.noSuchMethod( - Invocation.method( - #writeFragment, - [fragmentRequest], - { - #broadcast: broadcast, - #data: data, - }, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future?>>? resetStore( - {bool? refetchQueries = true}) => - (super.noSuchMethod( - Invocation.method( - #resetStore, - [], - {#refetchQueries: refetchQueries}, - ), - returnValueForMissingStub: null, - ) as _i5.Future?>>?); -} - -/// A class which mocks [PostService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPostService extends _i2.Mock implements _i16.PostService { - @override - set postInfo(Map? _postInfo) => super.noSuchMethod( - Invocation.setter( - #postInfo, - _postInfo, - ), - returnValueForMissingStub: null, - ); - - @override - set after(String? _after) => super.noSuchMethod( - Invocation.setter( - #after, - _after, - ), - returnValueForMissingStub: null, - ); - - @override - set before(String? _before) => super.noSuchMethod( - Invocation.setter( - #before, - _before, - ), - returnValueForMissingStub: null, - ); - - @override - set first(int? _first) => super.noSuchMethod( - Invocation.setter( - #first, - _first, - ), - returnValueForMissingStub: null, - ); - - @override - set last(int? _last) => super.noSuchMethod( - Invocation.setter( - #last, - _last, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Stream> get postStream => (super.noSuchMethod( - Invocation.getter(#postStream), - returnValue: _i5.Stream>.empty(), - returnValueForMissingStub: _i5.Stream>.empty(), - ) as _i5.Stream>); - - @override - _i5.Stream<_i17.Post> get updatedPostStream => (super.noSuchMethod( - Invocation.getter(#updatedPostStream), - returnValue: _i5.Stream<_i17.Post>.empty(), - returnValueForMissingStub: _i5.Stream<_i17.Post>.empty(), - ) as _i5.Stream<_i17.Post>); - - @override - void setOrgStreamSubscription() => super.noSuchMethod( - Invocation.method( - #setOrgStreamSubscription, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future getPosts() => (super.noSuchMethod( - Invocation.method( - #getPosts, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future refreshFeed() => (super.noSuchMethod( - Invocation.method( - #refreshFeed, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void addNewpost(_i17.Post? newPost) => super.noSuchMethod( - Invocation.method( - #addNewpost, - [newPost], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future addLike(String? postID) => (super.noSuchMethod( - Invocation.method( - #addLike, - [postID], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future removeLike(String? postID) => (super.noSuchMethod( - Invocation.method( - #removeLike, - [postID], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void addCommentLocally(String? postID) => super.noSuchMethod( - Invocation.method( - #addCommentLocally, - [postID], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future nextPage() => (super.noSuchMethod( - Invocation.method( - #nextPage, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future previousPage() => (super.noSuchMethod( - Invocation.method( - #previousPage, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [MultiMediaPickerService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockMultiMediaPickerService extends _i2.Mock - implements _i18.MultiMediaPickerService { - @override - _i5.Stream get fileStream => (super.noSuchMethod( - Invocation.getter(#fileStream), - returnValue: _i5.Stream.empty(), - returnValueForMissingStub: _i5.Stream.empty(), - ) as _i5.Stream); - - @override - _i5.Future<_i19.File?> getPhotoFromGallery({bool? camera = false}) => - (super.noSuchMethod( - Invocation.method( - #getPhotoFromGallery, - [], - {#camera: camera}, - ), - returnValue: _i5.Future<_i19.File?>.value(), - returnValueForMissingStub: _i5.Future<_i19.File?>.value(), - ) as _i5.Future<_i19.File?>); - - @override - _i4.CustomAlertDialog permissionDeniedDialog() => (super.noSuchMethod( - Invocation.method( - #permissionDeniedDialog, - [], - ), - returnValue: _FakeCustomAlertDialog_10( - this, - Invocation.method( - #permissionDeniedDialog, - [], - ), - ), - returnValueForMissingStub: _FakeCustomAlertDialog_10( - this, - Invocation.method( - #permissionDeniedDialog, - [], - ), - ), - ) as _i4.CustomAlertDialog); -} - -/// A class which mocks [EventService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockEventService extends _i2.Mock implements _i11.EventService { - @override - _i5.Stream<_i20.Event> get eventStream => (super.noSuchMethod( - Invocation.getter(#eventStream), - returnValue: _i5.Stream<_i20.Event>.empty(), - returnValueForMissingStub: _i5.Stream<_i20.Event>.empty(), - ) as _i5.Stream<_i20.Event>); - - @override - void setOrgStreamSubscription() => super.noSuchMethod( - Invocation.method( - #setOrgStreamSubscription, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future getEvents() => (super.noSuchMethod( - Invocation.method( - #getEvents, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future fetchAttendeesByEvent(String? eventId) => - (super.noSuchMethod( - Invocation.method( - #fetchAttendeesByEvent, - [eventId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future registerForAnEvent(String? eventId) => - (super.noSuchMethod( - Invocation.method( - #registerForAnEvent, - [eventId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteEvent(String? eventId) => (super.noSuchMethod( - Invocation.method( - #deleteEvent, - [eventId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future editEvent({ - required String? eventId, - required Map? variables, - }) => - (super.noSuchMethod( - Invocation.method( - #editEvent, - [], - { - #eventId: eventId, - #variables: variables, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ChatService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockChatService extends _i2.Mock implements _i21.ChatService { - @override - _i5.Stream<_i3.QueryResult> get chatStream => (super.noSuchMethod( - Invocation.getter(#chatStream), - returnValue: _i5.Stream<_i3.QueryResult>.empty(), - returnValueForMissingStub: _i5.Stream<_i3.QueryResult>.empty(), - ) as _i5.Stream<_i3.QueryResult>); - - @override - set chatStream(_i5.Stream<_i3.QueryResult>? _chatStream) => - super.noSuchMethod( - Invocation.setter( - #chatStream, - _chatStream, - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Stream<_i22.ChatListTileDataModel> get chatListStream => - (super.noSuchMethod( - Invocation.getter(#chatListStream), - returnValue: _i5.Stream<_i22.ChatListTileDataModel>.empty(), - returnValueForMissingStub: - _i5.Stream<_i22.ChatListTileDataModel>.empty(), - ) as _i5.Stream<_i22.ChatListTileDataModel>); - - @override - _i5.Stream<_i23.ChatMessage> get chatMessagesStream => (super.noSuchMethod( - Invocation.getter(#chatMessagesStream), - returnValue: _i5.Stream<_i23.ChatMessage>.empty(), - returnValueForMissingStub: _i5.Stream<_i23.ChatMessage>.empty(), - ) as _i5.Stream<_i23.ChatMessage>); - - @override - _i5.Future sendMessageToDirectChat( - String? chatId, - String? messageContent, - ) => - (super.noSuchMethod( - Invocation.method( - #sendMessageToDirectChat, - [ - chatId, - messageContent, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getDirectChatsByUserId() => (super.noSuchMethod( - Invocation.method( - #getDirectChatsByUserId, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getDirectChatMessagesByChatId(dynamic chatId) => - (super.noSuchMethod( - Invocation.method( - #getDirectChatMessagesByChatId, - [chatId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [UserConfig]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockUserConfig extends _i2.Mock implements _i24.UserConfig { - @override - _i5.Stream<_i6.OrgInfo> get currentOrgInfoStream => (super.noSuchMethod( - Invocation.getter(#currentOrgInfoStream), - returnValue: _i5.Stream<_i6.OrgInfo>.empty(), - returnValueForMissingStub: _i5.Stream<_i6.OrgInfo>.empty(), - ) as _i5.Stream<_i6.OrgInfo>); - - @override - _i5.StreamController<_i6.OrgInfo> get currentOrgInfoController => - (super.noSuchMethod( - Invocation.getter(#currentOrgInfoController), - returnValue: _FakeStreamController_11<_i6.OrgInfo>( - this, - Invocation.getter(#currentOrgInfoController), - ), - returnValueForMissingStub: _FakeStreamController_11<_i6.OrgInfo>( - this, - Invocation.getter(#currentOrgInfoController), - ), - ) as _i5.StreamController<_i6.OrgInfo>); - - @override - _i6.OrgInfo get currentOrg => (super.noSuchMethod( - Invocation.getter(#currentOrg), - returnValue: _FakeOrgInfo_12( - this, - Invocation.getter(#currentOrg), - ), - returnValueForMissingStub: _FakeOrgInfo_12( - this, - Invocation.getter(#currentOrg), - ), - ) as _i6.OrgInfo); - - @override - String get currentOrgName => (super.noSuchMethod( - Invocation.getter(#currentOrgName), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#currentOrgName), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#currentOrgName), - ), - ) as String); - - @override - bool get loggedIn => (super.noSuchMethod( - Invocation.getter(#loggedIn), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set currentOrg(_i6.OrgInfo? org) => super.noSuchMethod( - Invocation.setter( - #currentOrg, - org, - ), - returnValueForMissingStub: null, - ); - - @override - _i7.User get currentUser => (super.noSuchMethod( - Invocation.getter(#currentUser), - returnValue: _FakeUser_13( - this, - Invocation.getter(#currentUser), - ), - returnValueForMissingStub: _FakeUser_13( - this, - Invocation.getter(#currentUser), - ), - ) as _i7.User); - - @override - set currentUser(_i7.User? user) => super.noSuchMethod( - Invocation.setter( - #currentUser, - user, - ), - returnValueForMissingStub: null, - ); - - @override - void initialiseStream() => super.noSuchMethod( - Invocation.method( - #initialiseStream, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future userLoggedIn() => (super.noSuchMethod( - Invocation.method( - #userLoggedIn, - [], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future userLogOut() => (super.noSuchMethod( - Invocation.method( - #userLogOut, - [], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future updateUserJoinedOrg(List<_i6.OrgInfo>? orgDetails) => - (super.noSuchMethod( - Invocation.method( - #updateUserJoinedOrg, - [orgDetails], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateUserCreatedOrg(List<_i6.OrgInfo>? orgDetails) => - (super.noSuchMethod( - Invocation.method( - #updateUserCreatedOrg, - [orgDetails], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateUserMemberRequestOrg(List<_i6.OrgInfo>? orgDetails) => - (super.noSuchMethod( - Invocation.method( - #updateUserMemberRequestOrg, - [orgDetails], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateUserAdminOrg(List<_i6.OrgInfo>? orgDetails) => - (super.noSuchMethod( - Invocation.method( - #updateUserAdminOrg, - [orgDetails], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateAccessToken({ - required String? accessToken, - required String? refreshToken, - }) => - (super.noSuchMethod( - Invocation.method( - #updateAccessToken, - [], - { - #accessToken: accessToken, - #refreshToken: refreshToken, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future updateUser(_i7.User? updatedUserDetails) => - (super.noSuchMethod( - Invocation.method( - #updateUser, - [updatedUserDetails], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - void saveUserInHive() => super.noSuchMethod( - Invocation.method( - #saveUserInHive, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void saveCurrentOrgInHive(_i6.OrgInfo? saveOrgAsCurrent) => - super.noSuchMethod( - Invocation.method( - #saveCurrentOrgInHive, - [saveOrgAsCurrent], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [AppLanguage]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppLanguage extends _i2.Mock implements _i26.AppLanguage { - @override - bool get isTest => (super.noSuchMethod( - Invocation.getter(#isTest), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i8.NavigationService get navigationService => (super.noSuchMethod( - Invocation.getter(#navigationService), - returnValue: _FakeNavigationService_14( - this, - Invocation.getter(#navigationService), - ), - returnValueForMissingStub: _FakeNavigationService_14( - this, - Invocation.getter(#navigationService), - ), - ) as _i8.NavigationService); - - @override - _i9.DataBaseMutationFunctions get databaseFunctions => (super.noSuchMethod( - Invocation.getter(#databaseFunctions), - returnValue: _FakeDataBaseMutationFunctions_15( - this, - Invocation.getter(#databaseFunctions), - ), - returnValueForMissingStub: _FakeDataBaseMutationFunctions_15( - this, - Invocation.getter(#databaseFunctions), - ), - ) as _i9.DataBaseMutationFunctions); - - @override - _i10.Locale get appLocal => (super.noSuchMethod( - Invocation.getter(#appLocal), - returnValue: _FakeLocale_16( - this, - Invocation.getter(#appLocal), - ), - returnValueForMissingStub: _FakeLocale_16( - this, - Invocation.getter(#appLocal), - ), - ) as _i10.Locale); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i5.Future initialize() => (super.noSuchMethod( - Invocation.method( - #initialize, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future fetchLocale() => (super.noSuchMethod( - Invocation.method( - #fetchLocale, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future changeLanguage(_i10.Locale? type) => (super.noSuchMethod( - Invocation.method( - #changeLanguage, - [type], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future selectLanguagePress() => (super.noSuchMethod( - Invocation.method( - #selectLanguagePress, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future dbLanguageUpdate() => (super.noSuchMethod( - Invocation.method( - #dbLanguageUpdate, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future appLanguageQuery() => (super.noSuchMethod( - Invocation.method( - #appLanguageQuery, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future userLanguageQuery(String? userId) => (super.noSuchMethod( - Invocation.method( - #userLanguageQuery, - [userId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [Connectivity]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockConnectivity extends _i2.Mock implements _i27.Connectivity { - @override - _i5.Stream<_i28.ConnectivityResult> get onConnectivityChanged => - (super.noSuchMethod( - Invocation.getter(#onConnectivityChanged), - returnValue: _i5.Stream<_i28.ConnectivityResult>.empty(), - returnValueForMissingStub: _i5.Stream<_i28.ConnectivityResult>.empty(), - ) as _i5.Stream<_i28.ConnectivityResult>); - - @override - _i5.Future<_i28.ConnectivityResult> checkConnectivity() => - (super.noSuchMethod( - Invocation.method( - #checkConnectivity, - [], - ), - returnValue: _i5.Future<_i28.ConnectivityResult>.value( - _i28.ConnectivityResult.bluetooth), - returnValueForMissingStub: _i5.Future<_i28.ConnectivityResult>.value( - _i28.ConnectivityResult.bluetooth), - ) as _i5.Future<_i28.ConnectivityResult>); -} - -/// A class which mocks [SignupDetailsViewModel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockSignupDetailsViewModel extends _i2.Mock - implements _i29.SignupDetailsViewModel { - @override - _i1.GlobalKey<_i1.FormState> get formKey => (super.noSuchMethod( - Invocation.getter(#formKey), - returnValue: _FakeGlobalKey_0<_i1.FormState>( - this, - Invocation.getter(#formKey), - ), - returnValueForMissingStub: _FakeGlobalKey_0<_i1.FormState>( - this, - Invocation.getter(#formKey), - ), - ) as _i1.GlobalKey<_i1.FormState>); - - @override - List> get greeting => (super.noSuchMethod( - Invocation.getter(#greeting), - returnValue: >[], - returnValueForMissingStub: >[], - ) as List>); - - @override - set greeting(List>? _greeting) => super.noSuchMethod( - Invocation.setter( - #greeting, - _greeting, - ), - returnValueForMissingStub: null, - ); - - @override - _i6.OrgInfo get selectedOrganization => (super.noSuchMethod( - Invocation.getter(#selectedOrganization), - returnValue: _FakeOrgInfo_12( - this, - Invocation.getter(#selectedOrganization), - ), - returnValueForMissingStub: _FakeOrgInfo_12( - this, - Invocation.getter(#selectedOrganization), - ), - ) as _i6.OrgInfo); - - @override - set selectedOrganization(_i6.OrgInfo? _selectedOrganization) => - super.noSuchMethod( - Invocation.setter( - #selectedOrganization, - _selectedOrganization, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get confirmPassword => (super.noSuchMethod( - Invocation.getter(#confirmPassword), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#confirmPassword), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#confirmPassword), - ), - ) as _i1.TextEditingController); - - @override - set confirmPassword(_i1.TextEditingController? _confirmPassword) => - super.noSuchMethod( - Invocation.setter( - #confirmPassword, - _confirmPassword, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get firstName => (super.noSuchMethod( - Invocation.getter(#firstName), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#firstName), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#firstName), - ), - ) as _i1.TextEditingController); - - @override - set firstName(_i1.TextEditingController? _firstName) => super.noSuchMethod( - Invocation.setter( - #firstName, - _firstName, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get lastName => (super.noSuchMethod( - Invocation.getter(#lastName), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#lastName), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#lastName), - ), - ) as _i1.TextEditingController); - - @override - set lastName(_i1.TextEditingController? _lastName) => super.noSuchMethod( - Invocation.setter( - #lastName, - _lastName, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get password => (super.noSuchMethod( - Invocation.getter(#password), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#password), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#password), - ), - ) as _i1.TextEditingController); - - @override - set password(_i1.TextEditingController? _password) => super.noSuchMethod( - Invocation.setter( - #password, - _password, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get email => (super.noSuchMethod( - Invocation.getter(#email), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#email), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#email), - ), - ) as _i1.TextEditingController); - - @override - set email(_i1.TextEditingController? _email) => super.noSuchMethod( - Invocation.setter( - #email, - _email, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.AutovalidateMode get validate => (super.noSuchMethod( - Invocation.getter(#validate), - returnValue: _i1.AutovalidateMode.disabled, - returnValueForMissingStub: _i1.AutovalidateMode.disabled, - ) as _i1.AutovalidateMode); - - @override - set validate(_i1.AutovalidateMode? _validate) => super.noSuchMethod( - Invocation.setter( - #validate, - _validate, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.FocusNode get confirmFocus => (super.noSuchMethod( - Invocation.getter(#confirmFocus), - returnValue: _FakeFocusNode_18( - this, - Invocation.getter(#confirmFocus), - ), - returnValueForMissingStub: _FakeFocusNode_18( - this, - Invocation.getter(#confirmFocus), - ), - ) as _i1.FocusNode); - - @override - set confirmFocus(_i1.FocusNode? _confirmFocus) => super.noSuchMethod( - Invocation.setter( - #confirmFocus, - _confirmFocus, - ), - returnValueForMissingStub: null, - ); - - @override - bool get hidePassword => (super.noSuchMethod( - Invocation.getter(#hidePassword), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set hidePassword(bool? _hidePassword) => super.noSuchMethod( - Invocation.setter( - #hidePassword, - _hidePassword, - ), - returnValueForMissingStub: null, - ); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - void initialise(_i6.OrgInfo? org) => super.noSuchMethod( - Invocation.method( - #initialise, - [org], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future signUp() => (super.noSuchMethod( - Invocation.method( - #signUp, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [Post]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPost extends _i2.Mock implements _i17.Post { - @override - String get sId => (super.noSuchMethod( - Invocation.getter(#sId), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#sId), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#sId), - ), - ) as String); - - @override - set sId(String? _sId) => super.noSuchMethod( - Invocation.setter( - #sId, - _sId, - ), - returnValueForMissingStub: null, - ); - - @override - set description(String? _description) => super.noSuchMethod( - Invocation.setter( - #description, - _description, - ), - returnValueForMissingStub: null, - ); - - @override - set createdAt(DateTime? _createdAt) => super.noSuchMethod( - Invocation.setter( - #createdAt, - _createdAt, - ), - returnValueForMissingStub: null, - ); - - @override - set imageUrl(String? _imageUrl) => super.noSuchMethod( - Invocation.setter( - #imageUrl, - _imageUrl, - ), - returnValueForMissingStub: null, - ); - - @override - set base64String(String? _base64String) => super.noSuchMethod( - Invocation.setter( - #base64String, - _base64String, - ), - returnValueForMissingStub: null, - ); - - @override - set videoUrl(String? _videoUrl) => super.noSuchMethod( - Invocation.setter( - #videoUrl, - _videoUrl, - ), - returnValueForMissingStub: null, - ); - - @override - set creator(_i7.User? _creator) => super.noSuchMethod( - Invocation.setter( - #creator, - _creator, - ), - returnValueForMissingStub: null, - ); - - @override - set organization(_i6.OrgInfo? _organization) => super.noSuchMethod( - Invocation.setter( - #organization, - _organization, - ), - returnValueForMissingStub: null, - ); - - @override - set likedBy(List<_i17.LikedBy>? _likedBy) => super.noSuchMethod( - Invocation.setter( - #likedBy, - _likedBy, - ), - returnValueForMissingStub: null, - ); - - @override - set comments(List<_i17.Comments>? _comments) => super.noSuchMethod( - Invocation.setter( - #comments, - _comments, - ), - returnValueForMissingStub: null, - ); - - @override - String getPostCreatedDuration() => (super.noSuchMethod( - Invocation.method( - #getPostCreatedDuration, - [], - ), - returnValue: _i25.dummyValue( - this, - Invocation.method( - #getPostCreatedDuration, - [], - ), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.method( - #getPostCreatedDuration, - [], - ), - ), - ) as String); -} - -/// A class which mocks [DataBaseMutationFunctions]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDataBaseMutationFunctions extends _i2.Mock - implements _i9.DataBaseMutationFunctions { - @override - _i3.GraphQLClient get clientNonAuth => (super.noSuchMethod( - Invocation.getter(#clientNonAuth), - returnValue: _FakeGraphQLClient_3( - this, - Invocation.getter(#clientNonAuth), - ), - returnValueForMissingStub: _FakeGraphQLClient_3( - this, - Invocation.getter(#clientNonAuth), - ), - ) as _i3.GraphQLClient); - - @override - set clientNonAuth(_i3.GraphQLClient? _clientNonAuth) => super.noSuchMethod( - Invocation.setter( - #clientNonAuth, - _clientNonAuth, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLClient get clientAuth => (super.noSuchMethod( - Invocation.getter(#clientAuth), - returnValue: _FakeGraphQLClient_3( - this, - Invocation.getter(#clientAuth), - ), - returnValueForMissingStub: _FakeGraphQLClient_3( - this, - Invocation.getter(#clientAuth), - ), - ) as _i3.GraphQLClient); - - @override - set clientAuth(_i3.GraphQLClient? _clientAuth) => super.noSuchMethod( - Invocation.setter( - #clientAuth, - _clientAuth, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get userNotFound => (super.noSuchMethod( - Invocation.getter(#userNotFound), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#userNotFound), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#userNotFound), - ), - ) as _i3.GraphQLError); - - @override - set userNotFound(_i3.GraphQLError? _userNotFound) => super.noSuchMethod( - Invocation.setter( - #userNotFound, - _userNotFound, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get userNotAuthenticated => (super.noSuchMethod( - Invocation.getter(#userNotAuthenticated), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#userNotAuthenticated), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#userNotAuthenticated), - ), - ) as _i3.GraphQLError); - - @override - set userNotAuthenticated(_i3.GraphQLError? _userNotAuthenticated) => - super.noSuchMethod( - Invocation.setter( - #userNotAuthenticated, - _userNotAuthenticated, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get emailAccountPresent => (super.noSuchMethod( - Invocation.getter(#emailAccountPresent), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#emailAccountPresent), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#emailAccountPresent), - ), - ) as _i3.GraphQLError); - - @override - set emailAccountPresent(_i3.GraphQLError? _emailAccountPresent) => - super.noSuchMethod( - Invocation.setter( - #emailAccountPresent, - _emailAccountPresent, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get wrongCredentials => (super.noSuchMethod( - Invocation.getter(#wrongCredentials), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#wrongCredentials), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#wrongCredentials), - ), - ) as _i3.GraphQLError); - - @override - set wrongCredentials(_i3.GraphQLError? _wrongCredentials) => - super.noSuchMethod( - Invocation.setter( - #wrongCredentials, - _wrongCredentials, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get organizationNotFound => (super.noSuchMethod( - Invocation.getter(#organizationNotFound), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#organizationNotFound), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#organizationNotFound), - ), - ) as _i3.GraphQLError); - - @override - set organizationNotFound(_i3.GraphQLError? _organizationNotFound) => - super.noSuchMethod( - Invocation.setter( - #organizationNotFound, - _organizationNotFound, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get refreshAccessTokenExpiredException => - (super.noSuchMethod( - Invocation.getter(#refreshAccessTokenExpiredException), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#refreshAccessTokenExpiredException), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#refreshAccessTokenExpiredException), - ), - ) as _i3.GraphQLError); - - @override - set refreshAccessTokenExpiredException( - _i3.GraphQLError? _refreshAccessTokenExpiredException) => - super.noSuchMethod( - Invocation.setter( - #refreshAccessTokenExpiredException, - _refreshAccessTokenExpiredException, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get memberRequestExist => (super.noSuchMethod( - Invocation.getter(#memberRequestExist), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#memberRequestExist), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#memberRequestExist), - ), - ) as _i3.GraphQLError); - - @override - set memberRequestExist(_i3.GraphQLError? _memberRequestExist) => - super.noSuchMethod( - Invocation.setter( - #memberRequestExist, - _memberRequestExist, - ), - returnValueForMissingStub: null, - ); - - @override - _i3.GraphQLError get notifFeatureNotInstalled => (super.noSuchMethod( - Invocation.getter(#notifFeatureNotInstalled), - returnValue: _FakeGraphQLError_19( - this, - Invocation.getter(#notifFeatureNotInstalled), - ), - returnValueForMissingStub: _FakeGraphQLError_19( - this, - Invocation.getter(#notifFeatureNotInstalled), - ), - ) as _i3.GraphQLError); - - @override - set notifFeatureNotInstalled(_i3.GraphQLError? _notifFeatureNotInstalled) => - super.noSuchMethod( - Invocation.setter( - #notifFeatureNotInstalled, - _notifFeatureNotInstalled, - ), - returnValueForMissingStub: null, - ); - - @override - void init() => super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void initClientNonAuth() => super.noSuchMethod( - Invocation.method( - #initClientNonAuth, - [], - ), - returnValueForMissingStub: null, - ); - - @override - bool? encounteredExceptionOrError( - _i3.OperationException? exception, { - bool? showSnackBar = true, - }) => - (super.noSuchMethod( - Invocation.method( - #encounteredExceptionOrError, - [exception], - {#showSnackBar: showSnackBar}, - ), - returnValueForMissingStub: null, - ) as bool?); - - @override - _i5.Future gqlAuthQuery( - String? query, { - Map? variables, - }) => - (super.noSuchMethod( - Invocation.method( - #gqlAuthQuery, - [query], - {#variables: variables}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future gqlAuthMutation( - String? mutation, { - Map? variables, - }) => - (super.noSuchMethod( - Invocation.method( - #gqlAuthMutation, - [mutation], - {#variables: variables}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future gqlNonAuthMutation( - String? mutation, { - Map? variables, - bool? reCall = true, - }) => - (super.noSuchMethod( - Invocation.method( - #gqlNonAuthMutation, - [mutation], - { - #variables: variables, - #reCall: reCall, - }, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i3.QueryResult?> gqlNonAuthQuery( - String? query, { - Map? variables, - }) => - (super.noSuchMethod( - Invocation.method( - #gqlNonAuthQuery, - [query], - {#variables: variables}, - ), - returnValue: _i5.Future<_i3.QueryResult?>.value(), - returnValueForMissingStub: - _i5.Future<_i3.QueryResult?>.value(), - ) as _i5.Future<_i3.QueryResult?>); - - @override - _i5.Future refreshAccessToken(String? refreshToken) => - (super.noSuchMethod( - Invocation.method( - #refreshAccessToken, - [refreshToken], - ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); - - @override - _i5.Future fetchOrgById(String? id) => (super.noSuchMethod( - Invocation.method( - #fetchOrgById, - [id], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [OrganizationService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockOrganizationService extends _i2.Mock - implements _i30.OrganizationService { - @override - _i5.Future> getOrgMembersList(String? orgId) => - (super.noSuchMethod( - Invocation.method( - #getOrgMembersList, - [orgId], - ), - returnValue: _i5.Future>.value(<_i7.User>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i7.User>[]), - ) as _i5.Future>); -} - -/// A class which mocks [ExploreEventsViewModel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockExploreEventsViewModel extends _i2.Mock - implements _i31.ExploreEventsViewModel { - @override - bool get demoMode => (super.noSuchMethod( - Invocation.getter(#demoMode), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set demoMode(bool? _demoMode) => super.noSuchMethod( - Invocation.setter( - #demoMode, - _demoMode, - ), - returnValueForMissingStub: null, - ); - - @override - List<_i20.Event> get events => (super.noSuchMethod( - Invocation.getter(#events), - returnValue: <_i20.Event>[], - returnValueForMissingStub: <_i20.Event>[], - ) as List<_i20.Event>); - - @override - List<_i20.Event> get userEvents => (super.noSuchMethod( - Invocation.getter(#userEvents), - returnValue: <_i20.Event>[], - returnValueForMissingStub: <_i20.Event>[], - ) as List<_i20.Event>); - - @override - _i11.EventService get eventService => (super.noSuchMethod( - Invocation.getter(#eventService), - returnValue: _FakeEventService_20( - this, - Invocation.getter(#eventService), - ), - returnValueForMissingStub: _FakeEventService_20( - this, - Invocation.getter(#eventService), - ), - ) as _i11.EventService); - - @override - String get emptyListMessage => (super.noSuchMethod( - Invocation.getter(#emptyListMessage), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#emptyListMessage), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#emptyListMessage), - ), - ) as String); - - @override - String get chosenValue => (super.noSuchMethod( - Invocation.getter(#chosenValue), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#chosenValue), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#chosenValue), - ), - ) as String); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i5.Future fetchNewEvents() => (super.noSuchMethod( - Invocation.method( - #fetchNewEvents, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future refreshEvents() => (super.noSuchMethod( - Invocation.method( - #refreshEvents, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future initialise() => (super.noSuchMethod( - Invocation.method( - #initialise, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future checkIfExistsAndAddNewEvent(_i20.Event? newEvent) => - (super.noSuchMethod( - Invocation.method( - #checkIfExistsAndAddNewEvent, - [newEvent], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future deleteEvent({required String? eventId}) => - (super.noSuchMethod( - Invocation.method( - #deleteEvent, - [], - {#eventId: eventId}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future choseValueFromDropdown(String? value) => (super.noSuchMethod( - Invocation.method( - #choseValueFromDropdown, - [value], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [OrganizationFeedViewModel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockOrganizationFeedViewModel extends _i2.Mock - implements _i32.OrganizationFeedViewModel { - @override - bool get istest => (super.noSuchMethod( - Invocation.getter(#istest), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set istest(bool? _istest) => super.noSuchMethod( - Invocation.setter( - #istest, - _istest, - ), - returnValueForMissingStub: null, - ); - - @override - List<_i17.Post> get posts => (super.noSuchMethod( - Invocation.getter(#posts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); - - @override - List<_i17.Post> get userPosts => (super.noSuchMethod( - Invocation.getter(#userPosts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); - - @override - List<_i17.Post> get pinnedPosts => (super.noSuchMethod( - Invocation.getter(#pinnedPosts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); - - @override - String get currentOrgName => (super.noSuchMethod( - Invocation.getter(#currentOrgName), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#currentOrgName), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#currentOrgName), - ), - ) as String); - - @override - bool get isFetchingPosts => (super.noSuchMethod( - Invocation.getter(#isFetchingPosts), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - void setCurrentOrganizationName(String? updatedOrganization) => - super.noSuchMethod( - Invocation.method( - #setCurrentOrganizationName, - [updatedOrganization], - ), - returnValueForMissingStub: null, - ); - - @override - void fetchNewPosts() => super.noSuchMethod( - Invocation.method( - #fetchNewPosts, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void initialise({bool? isTest = false}) => super.noSuchMethod( - Invocation.method( - #initialise, - [], - {#isTest: isTest}, - ), - returnValueForMissingStub: null, - ); - - @override - void buildNewPosts(List<_i17.Post>? newPosts) => super.noSuchMethod( - Invocation.method( - #buildNewPosts, - [newPosts], - ), - returnValueForMissingStub: null, - ); - - @override - void navigateToIndividualPage(_i17.Post? post) => super.noSuchMethod( - Invocation.method( - #navigateToIndividualPage, - [post], - ), - returnValueForMissingStub: null, - ); - - @override - void navigateToPinnedPostPage() => super.noSuchMethod( - Invocation.method( - #navigateToPinnedPostPage, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void addNewPost(_i17.Post? newPost) => super.noSuchMethod( - Invocation.method( - #addNewPost, - [newPost], - ), - returnValueForMissingStub: null, - ); - - @override - void updatedPost(_i17.Post? post) => super.noSuchMethod( - Invocation.method( - #updatedPost, - [post], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future removePost(_i17.Post? post) => (super.noSuchMethod( - Invocation.method( - #removePost, - [post], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void nextPage() => super.noSuchMethod( - Invocation.method( - #nextPage, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void previousPage() => super.noSuchMethod( - Invocation.method( - #previousPage, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [Validator]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockValidator extends _i2.Mock implements _i33.Validator { - @override - _i5.Future validateUrlExistence(String? url) => (super.noSuchMethod( - Invocation.method( - #validateUrlExistence, - [url], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [QRViewController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockQRViewController extends _i2.Mock implements _i34.QRViewController { - @override - _i5.Stream<_i35.Barcode> get scannedDataStream => (super.noSuchMethod( - Invocation.getter(#scannedDataStream), - returnValue: _i5.Stream<_i35.Barcode>.empty(), - returnValueForMissingStub: _i5.Stream<_i35.Barcode>.empty(), - ) as _i5.Stream<_i35.Barcode>); - - @override - bool get hasPermissions => (super.noSuchMethod( - Invocation.getter(#hasPermissions), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i5.Future<_i36.CameraFacing> getCameraInfo() => (super.noSuchMethod( - Invocation.method( - #getCameraInfo, - [], - ), - returnValue: - _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back), - returnValueForMissingStub: - _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back), - ) as _i5.Future<_i36.CameraFacing>); - - @override - _i5.Future<_i36.CameraFacing> flipCamera() => (super.noSuchMethod( - Invocation.method( - #flipCamera, - [], - ), - returnValue: - _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back), - returnValueForMissingStub: - _i5.Future<_i36.CameraFacing>.value(_i36.CameraFacing.back), - ) as _i5.Future<_i36.CameraFacing>); - - @override - _i5.Future getFlashStatus() => (super.noSuchMethod( - Invocation.method( - #getFlashStatus, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future toggleFlash() => (super.noSuchMethod( - Invocation.method( - #toggleFlash, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future pauseCamera() => (super.noSuchMethod( - Invocation.method( - #pauseCamera, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future stopCamera() => (super.noSuchMethod( - Invocation.method( - #stopCamera, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future resumeCamera() => (super.noSuchMethod( - Invocation.method( - #resumeCamera, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i12.SystemFeatures> getSystemFeatures() => (super.noSuchMethod( - Invocation.method( - #getSystemFeatures, - [], - ), - returnValue: - _i5.Future<_i12.SystemFeatures>.value(_FakeSystemFeatures_21( - this, - Invocation.method( - #getSystemFeatures, - [], - ), - )), - returnValueForMissingStub: - _i5.Future<_i12.SystemFeatures>.value(_FakeSystemFeatures_21( - this, - Invocation.method( - #getSystemFeatures, - [], - ), - )), - ) as _i5.Future<_i12.SystemFeatures>); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future scanInvert(bool? isScanInvert) => (super.noSuchMethod( - Invocation.method( - #scanInvert, - [isScanInvert], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); -} - -/// A class which mocks [CommentService]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCommentService extends _i2.Mock implements _i37.CommentService { - @override - _i5.Future createComments( - String? postId, - String? text, - ) => - (super.noSuchMethod( - Invocation.method( - #createComments, - [ - postId, - text, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> getCommentsForPost(String? postId) => - (super.noSuchMethod( - Invocation.method( - #getCommentsForPost, - [postId], - ), - returnValue: _i5.Future>.value([]), - returnValueForMissingStub: _i5.Future>.value([]), - ) as _i5.Future>); -} - -/// A class which mocks [AppTheme]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppTheme extends _i2.Mock implements _i38.AppTheme { - @override - String get key => (super.noSuchMethod( - Invocation.getter(#key), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#key), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#key), - ), - ) as String); - - @override - bool get isdarkTheme => (super.noSuchMethod( - Invocation.getter(#isdarkTheme), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - void initialize() => super.noSuchMethod( - Invocation.method( - #initialize, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void switchTheme({required bool? isOn}) => super.noSuchMethod( - Invocation.method( - #switchTheme, - [], - {#isOn: isOn}, - ), - returnValueForMissingStub: null, - ); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [CreateEventViewModel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockCreateEventViewModel extends _i2.Mock - implements _i39.CreateEventViewModel { - @override - _i1.TextEditingController get eventTitleTextController => (super.noSuchMethod( - Invocation.getter(#eventTitleTextController), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#eventTitleTextController), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#eventTitleTextController), - ), - ) as _i1.TextEditingController); - - @override - set eventTitleTextController( - _i1.TextEditingController? _eventTitleTextController) => - super.noSuchMethod( - Invocation.setter( - #eventTitleTextController, - _eventTitleTextController, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get eventLocationTextController => - (super.noSuchMethod( - Invocation.getter(#eventLocationTextController), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#eventLocationTextController), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#eventLocationTextController), - ), - ) as _i1.TextEditingController); - - @override - set eventLocationTextController( - _i1.TextEditingController? _eventLocationTextController) => - super.noSuchMethod( - Invocation.setter( - #eventLocationTextController, - _eventLocationTextController, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get eventDescriptionTextController => - (super.noSuchMethod( - Invocation.getter(#eventDescriptionTextController), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#eventDescriptionTextController), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#eventDescriptionTextController), - ), - ) as _i1.TextEditingController); - - @override - set eventDescriptionTextController( - _i1.TextEditingController? _eventDescriptionTextController) => - super.noSuchMethod( - Invocation.setter( - #eventDescriptionTextController, - _eventDescriptionTextController, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get repeatsEveryCountController => - (super.noSuchMethod( - Invocation.getter(#repeatsEveryCountController), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#repeatsEveryCountController), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#repeatsEveryCountController), - ), - ) as _i1.TextEditingController); - - @override - set repeatsEveryCountController( - _i1.TextEditingController? _repeatsEveryCountController) => - super.noSuchMethod( - Invocation.setter( - #repeatsEveryCountController, - _repeatsEveryCountController, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TextEditingController get endOccurenceController => (super.noSuchMethod( - Invocation.getter(#endOccurenceController), - returnValue: _FakeTextEditingController_17( - this, - Invocation.getter(#endOccurenceController), - ), - returnValueForMissingStub: _FakeTextEditingController_17( - this, - Invocation.getter(#endOccurenceController), - ), - ) as _i1.TextEditingController); - - @override - set endOccurenceController( - _i1.TextEditingController? _endOccurenceController) => - super.noSuchMethod( - Invocation.setter( - #endOccurenceController, - _endOccurenceController, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TimeOfDay get eventStartTime => (super.noSuchMethod( - Invocation.getter(#eventStartTime), - returnValue: _FakeTimeOfDay_22( - this, - Invocation.getter(#eventStartTime), - ), - returnValueForMissingStub: _FakeTimeOfDay_22( - this, - Invocation.getter(#eventStartTime), - ), - ) as _i1.TimeOfDay); - - @override - set eventStartTime(_i1.TimeOfDay? _eventStartTime) => super.noSuchMethod( - Invocation.setter( - #eventStartTime, - _eventStartTime, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.TimeOfDay get eventEndTime => (super.noSuchMethod( - Invocation.getter(#eventEndTime), - returnValue: _FakeTimeOfDay_22( - this, - Invocation.getter(#eventEndTime), - ), - returnValueForMissingStub: _FakeTimeOfDay_22( - this, - Invocation.getter(#eventEndTime), - ), - ) as _i1.TimeOfDay); - - @override - set eventEndTime(_i1.TimeOfDay? _eventEndTime) => super.noSuchMethod( - Invocation.setter( - #eventEndTime, - _eventEndTime, - ), - returnValueForMissingStub: null, - ); - - @override - DateTime get eventStartDate => (super.noSuchMethod( - Invocation.getter(#eventStartDate), - returnValue: _FakeDateTime_23( - this, - Invocation.getter(#eventStartDate), - ), - returnValueForMissingStub: _FakeDateTime_23( - this, - Invocation.getter(#eventStartDate), - ), - ) as DateTime); - - @override - set eventStartDate(DateTime? _eventStartDate) => super.noSuchMethod( - Invocation.setter( - #eventStartDate, - _eventStartDate, - ), - returnValueForMissingStub: null, - ); - - @override - DateTime get eventEndDate => (super.noSuchMethod( - Invocation.getter(#eventEndDate), - returnValue: _FakeDateTime_23( - this, - Invocation.getter(#eventEndDate), - ), - returnValueForMissingStub: _FakeDateTime_23( - this, - Invocation.getter(#eventEndDate), - ), - ) as DateTime); - - @override - set eventEndDate(DateTime? _eventEndDate) => super.noSuchMethod( - Invocation.setter( - #eventEndDate, - _eventEndDate, - ), - returnValueForMissingStub: null, - ); - - @override - DateTime get recurrenceStartDate => (super.noSuchMethod( - Invocation.getter(#recurrenceStartDate), - returnValue: _FakeDateTime_23( - this, - Invocation.getter(#recurrenceStartDate), - ), - returnValueForMissingStub: _FakeDateTime_23( - this, - Invocation.getter(#recurrenceStartDate), - ), - ) as DateTime); - - @override - set recurrenceStartDate(DateTime? _recurrenceStartDate) => super.noSuchMethod( - Invocation.setter( - #recurrenceStartDate, - _recurrenceStartDate, - ), - returnValueForMissingStub: null, - ); - - @override - set recurrenceEndDate(DateTime? _recurrenceEndDate) => super.noSuchMethod( - Invocation.setter( - #recurrenceEndDate, - _recurrenceEndDate, - ), - returnValueForMissingStub: null, - ); - - @override - bool get isPublicSwitch => (super.noSuchMethod( - Invocation.getter(#isPublicSwitch), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set isPublicSwitch(bool? _isPublicSwitch) => super.noSuchMethod( - Invocation.setter( - #isPublicSwitch, - _isPublicSwitch, - ), - returnValueForMissingStub: null, - ); - - @override - bool get isRegisterableSwitch => (super.noSuchMethod( - Invocation.getter(#isRegisterableSwitch), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set isRegisterableSwitch(bool? _isRegisterableSwitch) => super.noSuchMethod( - Invocation.setter( - #isRegisterableSwitch, - _isRegisterableSwitch, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.FocusNode get titleFocus => (super.noSuchMethod( - Invocation.getter(#titleFocus), - returnValue: _FakeFocusNode_18( - this, - Invocation.getter(#titleFocus), - ), - returnValueForMissingStub: _FakeFocusNode_18( - this, - Invocation.getter(#titleFocus), - ), - ) as _i1.FocusNode); - - @override - set titleFocus(_i1.FocusNode? _titleFocus) => super.noSuchMethod( - Invocation.setter( - #titleFocus, - _titleFocus, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.FocusNode get locationFocus => (super.noSuchMethod( - Invocation.getter(#locationFocus), - returnValue: _FakeFocusNode_18( - this, - Invocation.getter(#locationFocus), - ), - returnValueForMissingStub: _FakeFocusNode_18( - this, - Invocation.getter(#locationFocus), - ), - ) as _i1.FocusNode); - - @override - set locationFocus(_i1.FocusNode? _locationFocus) => super.noSuchMethod( - Invocation.setter( - #locationFocus, - _locationFocus, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.FocusNode get descriptionFocus => (super.noSuchMethod( - Invocation.getter(#descriptionFocus), - returnValue: _FakeFocusNode_18( - this, - Invocation.getter(#descriptionFocus), - ), - returnValueForMissingStub: _FakeFocusNode_18( - this, - Invocation.getter(#descriptionFocus), - ), - ) as _i1.FocusNode); - - @override - set descriptionFocus(_i1.FocusNode? _descriptionFocus) => super.noSuchMethod( - Invocation.setter( - #descriptionFocus, - _descriptionFocus, - ), - returnValueForMissingStub: null, - ); - - @override - bool get isAllDay => (super.noSuchMethod( - Invocation.getter(#isAllDay), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set isAllDay(bool? _isAllDay) => super.noSuchMethod( - Invocation.setter( - #isAllDay, - _isAllDay, - ), - returnValueForMissingStub: null, - ); - - @override - bool get isRecurring => (super.noSuchMethod( - Invocation.getter(#isRecurring), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - set isRecurring(bool? _isRecurring) => super.noSuchMethod( - Invocation.setter( - #isRecurring, - _isRecurring, - ), - returnValueForMissingStub: null, - ); - - @override - String get recurrenceInterval => (super.noSuchMethod( - Invocation.getter(#recurrenceInterval), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#recurrenceInterval), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#recurrenceInterval), - ), - ) as String); - - @override - set recurrenceInterval(String? _recurrenceInterval) => super.noSuchMethod( - Invocation.setter( - #recurrenceInterval, - _recurrenceInterval, - ), - returnValueForMissingStub: null, - ); - - @override - String get eventEndType => (super.noSuchMethod( - Invocation.getter(#eventEndType), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#eventEndType), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#eventEndType), - ), - ) as String); - - @override - set eventEndType(String? _eventEndType) => super.noSuchMethod( - Invocation.setter( - #eventEndType, - _eventEndType, - ), - returnValueForMissingStub: null, - ); - - @override - String get frequency => (super.noSuchMethod( - Invocation.getter(#frequency), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#frequency), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#frequency), - ), - ) as String); - - @override - set frequency(String? _frequency) => super.noSuchMethod( - Invocation.setter( - #frequency, - _frequency, - ), - returnValueForMissingStub: null, - ); - - @override - Set get weekDays => (super.noSuchMethod( - Invocation.getter(#weekDays), - returnValue: {}, - returnValueForMissingStub: {}, - ) as Set); - - @override - set weekDays(Set? _weekDays) => super.noSuchMethod( - Invocation.setter( - #weekDays, - _weekDays, - ), - returnValueForMissingStub: null, - ); - - @override - int get interval => (super.noSuchMethod( - Invocation.getter(#interval), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - - @override - set interval(int? _interval) => super.noSuchMethod( - Invocation.setter( - #interval, - _interval, - ), - returnValueForMissingStub: null, - ); - - @override - set count(int? _count) => super.noSuchMethod( - Invocation.setter( - #count, - _count, - ), - returnValueForMissingStub: null, - ); - - @override - set weekDayOccurenceInMonth(int? _weekDayOccurenceInMonth) => - super.noSuchMethod( - Invocation.setter( - #weekDayOccurenceInMonth, - _weekDayOccurenceInMonth, - ), - returnValueForMissingStub: null, - ); - - @override - String get recurrenceLabel => (super.noSuchMethod( - Invocation.getter(#recurrenceLabel), - returnValue: _i25.dummyValue( - this, - Invocation.getter(#recurrenceLabel), - ), - returnValueForMissingStub: _i25.dummyValue( - this, - Invocation.getter(#recurrenceLabel), - ), - ) as String); - - @override - set recurrenceLabel(String? _recurrenceLabel) => super.noSuchMethod( - Invocation.setter( - #recurrenceLabel, - _recurrenceLabel, - ), - returnValueForMissingStub: null, - ); - - @override - List<_i7.User> get orgMembersList => (super.noSuchMethod( - Invocation.getter(#orgMembersList), - returnValue: <_i7.User>[], - returnValueForMissingStub: <_i7.User>[], - ) as List<_i7.User>); - - @override - set orgMembersList(List<_i7.User>? _orgMembersList) => super.noSuchMethod( - Invocation.setter( - #orgMembersList, - _orgMembersList, - ), - returnValueForMissingStub: null, - ); - - @override - _i1.GlobalKey<_i1.FormState> get formKey => (super.noSuchMethod( - Invocation.getter(#formKey), - returnValue: _FakeGlobalKey_0<_i1.FormState>( - this, - Invocation.getter(#formKey), - ), - returnValueForMissingStub: _FakeGlobalKey_0<_i1.FormState>( - this, - Invocation.getter(#formKey), - ), - ) as _i1.GlobalKey<_i1.FormState>); - - @override - _i1.AutovalidateMode get validate => (super.noSuchMethod( - Invocation.getter(#validate), - returnValue: _i1.AutovalidateMode.disabled, - returnValueForMissingStub: _i1.AutovalidateMode.disabled, - ) as _i1.AutovalidateMode); - - @override - set validate(_i1.AutovalidateMode? _validate) => super.noSuchMethod( - Invocation.setter( - #validate, - _validate, - ), - returnValueForMissingStub: null, - ); - - @override - List<_i7.User> get selectedMembers => (super.noSuchMethod( - Invocation.getter(#selectedMembers), - returnValue: <_i7.User>[], - returnValueForMissingStub: <_i7.User>[], - ) as List<_i7.User>); - - @override - Map get memberCheckedMap => (super.noSuchMethod( - Invocation.getter(#memberCheckedMap), - returnValue: {}, - returnValueForMissingStub: {}, - ) as Map); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - void initialize() => super.noSuchMethod( - Invocation.method( - #initialize, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future createEvent() => (super.noSuchMethod( - Invocation.method( - #createEvent, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getImageFromGallery({bool? camera = false}) => - (super.noSuchMethod( - Invocation.method( - #getImageFromGallery, - [], - {#camera: camera}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void removeImage() => super.noSuchMethod( - Invocation.method( - #removeImage, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future> getCurrentOrgUsersList() => (super.noSuchMethod( - Invocation.method( - #getCurrentOrgUsersList, - [], - ), - returnValue: _i5.Future>.value(<_i7.User>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i7.User>[]), - ) as _i5.Future>); - - @override - void buildUserList() => super.noSuchMethod( - Invocation.method( - #buildUserList, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void removeUserFromList({required String? userId}) => super.noSuchMethod( - Invocation.method( - #removeUserFromList, - [], - {#userId: userId}, - ), - returnValueForMissingStub: null, - ); - - @override - void setEventEndDate(DateTime? selectedEndDate) => super.noSuchMethod( - Invocation.method( - #setEventEndDate, - [selectedEndDate], - ), - returnValueForMissingStub: null, - ); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [DirectChatViewModel]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDirectChatViewModel extends _i2.Mock - implements _i40.DirectChatViewModel { - @override - _i1.GlobalKey<_i1.AnimatedListState> get listKey => (super.noSuchMethod( - Invocation.getter(#listKey), - returnValue: _FakeGlobalKey_0<_i1.AnimatedListState>( - this, - Invocation.getter(#listKey), - ), - returnValueForMissingStub: _FakeGlobalKey_0<_i1.AnimatedListState>( - this, - Invocation.getter(#listKey), - ), - ) as _i1.GlobalKey<_i1.AnimatedListState>); - - @override - _i14.ChatState get chatState => (super.noSuchMethod( - Invocation.getter(#chatState), - returnValue: _i14.ChatState.initial, - returnValueForMissingStub: _i14.ChatState.initial, - ) as _i14.ChatState); - - @override - set chatState(_i14.ChatState? _chatState) => super.noSuchMethod( - Invocation.setter( - #chatState, - _chatState, - ), - returnValueForMissingStub: null, - ); - - @override - set name(String? _name) => super.noSuchMethod( - Invocation.setter( - #name, - _name, - ), - returnValueForMissingStub: null, - ); - - @override - List<_i22.ChatListTileDataModel> get chats => (super.noSuchMethod( - Invocation.getter(#chats), - returnValue: <_i22.ChatListTileDataModel>[], - returnValueForMissingStub: <_i22.ChatListTileDataModel>[], - ) as List<_i22.ChatListTileDataModel>); - - @override - Map> get chatMessagesByUser => - (super.noSuchMethod( - Invocation.getter(#chatMessagesByUser), - returnValue: >{}, - returnValueForMissingStub: >{}, - ) as Map>); - - @override - _i14.ViewState get state => (super.noSuchMethod( - Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); - - @override - bool get isBusy => (super.noSuchMethod( - Invocation.getter(#isBusy), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - void refreshChats() => super.noSuchMethod( - Invocation.method( - #refreshChats, - [], - ), - returnValueForMissingStub: null, - ); - - @override - _i5.Future initialise() => (super.noSuchMethod( - Invocation.method( - #initialise, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future getChatMessages(String? chatId) => (super.noSuchMethod( - Invocation.method( - #getChatMessages, - [chatId], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future sendMessageToDirectChat( - String? chatId, - String? messageContent, - ) => - (super.noSuchMethod( - Invocation.method( - #sendMessageToDirectChat, - [ - chatId, - messageContent, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void chatName(dynamic chatId) => super.noSuchMethod( - Invocation.method( - #chatName, - [chatId], - ), - returnValueForMissingStub: null, - ); - - @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( - Invocation.method( - #setState, - [viewState], - ), - returnValueForMissingStub: null, - ); - - @override - void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ImageCropper]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockImageCropper extends _i2.Mock implements _i41.ImageCropper { - @override - _i5.Future<_i42.CroppedFile?> cropImage({ - required String? sourcePath, - int? maxWidth, - int? maxHeight, - _i42.CropAspectRatio? aspectRatio, - List<_i42.CropAspectRatioPreset>? aspectRatioPresets = const [ - _i42.CropAspectRatioPreset.original, - _i42.CropAspectRatioPreset.square, - _i42.CropAspectRatioPreset.ratio3x2, - _i42.CropAspectRatioPreset.ratio4x3, - _i42.CropAspectRatioPreset.ratio16x9, - ], - _i42.CropStyle? cropStyle = _i42.CropStyle.rectangle, - _i42.ImageCompressFormat? compressFormat = _i42.ImageCompressFormat.jpg, - int? compressQuality = 90, - List<_i42.PlatformUiSettings>? uiSettings, - }) => - (super.noSuchMethod( - Invocation.method( - #cropImage, - [], - { - #sourcePath: sourcePath, - #maxWidth: maxWidth, - #maxHeight: maxHeight, - #aspectRatio: aspectRatio, - #aspectRatioPresets: aspectRatioPresets, - #cropStyle: cropStyle, - #compressFormat: compressFormat, - #compressQuality: compressQuality, - #uiSettings: uiSettings, - }, - ), - returnValue: _i5.Future<_i42.CroppedFile?>.value(), - returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(), - ) as _i5.Future<_i42.CroppedFile?>); - - @override - _i5.Future<_i42.CroppedFile?> recoverImage() => (super.noSuchMethod( - Invocation.method( - #recoverImage, - [], - ), - returnValue: _i5.Future<_i42.CroppedFile?>.value(), - returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(), - ) as _i5.Future<_i42.CroppedFile?>); -} - -/// A class which mocks [ImagePicker]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { - @override - _i5.Future<_i13.XFile?> pickImage({ - required _i13.ImageSource? source, - double? maxWidth, - double? maxHeight, - int? imageQuality, - _i13.CameraDevice? preferredCameraDevice = _i13.CameraDevice.rear, - bool? requestFullMetadata = true, - }) => - (super.noSuchMethod( - Invocation.method( - #pickImage, - [], - { - #source: source, - #maxWidth: maxWidth, - #maxHeight: maxHeight, - #imageQuality: imageQuality, - #preferredCameraDevice: preferredCameraDevice, - #requestFullMetadata: requestFullMetadata, - }, - ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); - - @override - _i5.Future> pickMultiImage({ - double? maxWidth, - double? maxHeight, - int? imageQuality, - bool? requestFullMetadata = true, - int? limit, - }) => - (super.noSuchMethod( - Invocation.method( - #pickMultiImage, - [], - { - #maxWidth: maxWidth, - #maxHeight: maxHeight, - #imageQuality: imageQuality, - #requestFullMetadata: requestFullMetadata, - #limit: limit, - }, - ), - returnValue: _i5.Future>.value(<_i13.XFile>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i13.XFile>[]), - ) as _i5.Future>); - - @override - _i5.Future<_i13.XFile?> pickMedia({ - double? maxWidth, - double? maxHeight, - int? imageQuality, - bool? requestFullMetadata = true, - }) => - (super.noSuchMethod( - Invocation.method( - #pickMedia, - [], - { - #maxWidth: maxWidth, - #maxHeight: maxHeight, - #imageQuality: imageQuality, - #requestFullMetadata: requestFullMetadata, - }, - ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); - - @override - _i5.Future> pickMultipleMedia({ - double? maxWidth, - double? maxHeight, - int? imageQuality, - bool? requestFullMetadata = true, - int? limit, - }) => - (super.noSuchMethod( - Invocation.method( - #pickMultipleMedia, - [], - { - #maxWidth: maxWidth, - #maxHeight: maxHeight, - #imageQuality: imageQuality, - #requestFullMetadata: requestFullMetadata, - #limit: limit, - }, - ), - returnValue: _i5.Future>.value(<_i13.XFile>[]), - returnValueForMissingStub: - _i5.Future>.value(<_i13.XFile>[]), - ) as _i5.Future>); - - @override - _i5.Future<_i13.XFile?> pickVideo({ - required _i13.ImageSource? source, - _i13.CameraDevice? preferredCameraDevice = _i13.CameraDevice.rear, - Duration? maxDuration, - }) => - (super.noSuchMethod( - Invocation.method( - #pickVideo, - [], - { - #source: source, - #preferredCameraDevice: preferredCameraDevice, - #maxDuration: maxDuration, - }, - ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); - - @override - _i5.Future<_i13.LostDataResponse> retrieveLostData() => (super.noSuchMethod( - Invocation.method( - #retrieveLostData, - [], - ), - returnValue: - _i5.Future<_i13.LostDataResponse>.value(_FakeLostDataResponse_24( - this, - Invocation.method( - #retrieveLostData, - [], - ), - )), - returnValueForMissingStub: - _i5.Future<_i13.LostDataResponse>.value(_FakeLostDataResponse_24( - this, - Invocation.method( - #retrieveLostData, - [], - ), - )), - ) as _i5.Future<_i13.LostDataResponse>); - - @override - bool supportsImageSource(_i13.ImageSource? source) => (super.noSuchMethod( - Invocation.method( - #supportsImageSource, - [source], - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); -} diff --git a/test/helpers/test_locator.dart b/test/helpers/test_locator.dart deleted file mode 100644 index 698696d44..000000000 --- a/test/helpers/test_locator.dart +++ /dev/null @@ -1,123 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:get_it/get_it.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:talawa/main.dart'; -import 'package:talawa/services/comment_service.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/image_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/org_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/view_model/access_request_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/login_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/set_url_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/waiting_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/comments_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/progress_dialog_view_model.dart'; - -GetIt locator = GetIt.instance; -final userConfig = locator(); -final navigationService = locator(); -final databaseFunctions = locator(); -final graphqlConfig = locator(); -final sizeConfig = locator(); -final queries = locator(); -final appLanguageService = locator(); -final multimediaPickerService = locator(); -final organizationService = locator(); -final eventService = locator(); -final commentsService = locator(); -final postService = locator(); -final mainScreenViewModel = locator(); -final imageService = locator(); -final imagePicker = locator(); -final imageCropper = locator(); - -void testSetupLocator() { - //services - locator.registerSingleton(NavigationService()); - - //sizeConfig - locator.registerSingleton(SizeConfig()); - - //userConfig - locator.registerSingleton(UserConfig()); - - //Services - locator.registerLazySingleton(() => OrganizationService()); - locator.registerLazySingleton(() => PostService()); - locator.registerLazySingleton(() => EventService()); - locator.registerLazySingleton(() => CommentService()); - locator.registerLazySingleton(() => MultiMediaPickerService()); - locator.registerLazySingleton(() => ImageService()); - locator.registerLazySingleton(() => ImagePicker()); - locator.registerLazySingleton(() => ImageCropper()); - locator.registerSingleton(() => OrganizationService()); - - //graphql - locator.registerSingleton(GraphqlConfig()); - - //databaseMutationFunction - locator.registerSingleton(DataBaseMutationFunctions()); - - //queries - locator.registerSingleton(Queries()); - - //Page viewModels - locator.registerFactory(() => DemoViewModel()); - // locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => OrganizationFeedViewModel()); - locator.registerFactory(() => SetUrlViewModel()); - locator.registerFactory(() => LoginViewModel()); - - locator.registerFactory(() => SelectOrganizationViewModel()); - locator.registerFactory(() => AccessScreenViewModel()); - locator.registerFactory(() => SignupDetailsViewModel()); - locator.registerFactory(() => WaitingViewModel()); - locator.registerFactory(() => ExploreEventsViewModel()); - locator.registerFactory(() => MainScreenViewModel()); - locator.registerFactory(() => ProfilePageViewModel()); - locator.registerFactory(() => EditProfilePageViewModel()); - locator.registerFactory(() => CreateEventViewModel()); - locator.registerFactory(() => EditEventViewModel()); - locator.registerFactory(() => AddPostViewModel()); - locator.registerFactory(() => EventInfoViewModel()); - locator.registerFactory(() => AppSettingViewModel()); - - //Widgets viewModels - locator.registerFactory(() => ProgressDialogViewModel()); - locator.registerFactory(() => CustomDrawerViewModel()); - locator.registerFactory(() => LikeButtonViewModel()); - locator.registerFactory(() => AppLanguage(isTest: true)); - locator.registerFactory(() => CommentsViewModel()); - locator.registerFactory(() => AppTheme()); - locator.registerFactory(() => DirectChatViewModel()); - locator.registerFactory(() => SelectContactViewModel()); -} diff --git a/test/model_tests/app_tour_test.dart b/test/model_tests/app_tour_test.dart deleted file mode 100644 index f9009417a..000000000 --- a/test/model_tests/app_tour_test.dart +++ /dev/null @@ -1,255 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/app_tour.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -class CustomTutorialController extends TutorialCoachMarkController { - @override - void next() {} - - @override - void previous() {} - - @override - void skip() {} -} - -class MockTutorialCoachMark extends Mock implements TutorialCoachMark { - @override - void next() {} -} - -class MockAppTour extends Mock implements AppTour { - MockAppTour({ - required this.model, - }); - - @override - TutorialCoachMark get tutorialCoachMark => MockTutorialCoachMark(); - - @override - void showTutorial({ - required Function(TargetFocus p1) onClickTarget, - required Function() onFinish, - required List targets, - }) { - onFinish(); - onClickTarget( - TargetFocus( - identify: MainScreenViewModel.keyDrawerCurOrg, - keyTarget: model.keyBNChat, - ), - ); - } - - @override - MainScreenViewModel model; -} - -/// Creates a MaterialApp widget with the given home widget and common localizations. -/// -/// **params**: -/// * `home`: The home widget of the MaterialApp. -/// -/// **returns**: -/// * `MaterialApp`: The MaterialApp widget. -/// -MaterialApp createMaterialApp({required Widget home}) { - return MaterialApp( - home: home, - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - supportedLocales: const [ - Locale('en', ''), - ], - ); -} - -void main() { - setupLocator(); - sizeConfig.test(); - // registerServices(); - - group('Tests for FocusTarget', () { - testWidgets('Test for first TargetContent builder in FocusTarget model.', - (tester) async { - AppTour? mockAppTour; - FocusTarget? mockFocusTarget; - BuildContext? capturedContext; - final app = BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: BaseView( - onModelReady: (model2) => model2.initialise( - context, - fromSignUp: false, - mainScreenIndex: 0, - demoMode: true, - testMode: true, - ), - builder: (context, model2, child) { - capturedContext = context; - mockAppTour = AppTour(model: model2); - mockFocusTarget = FocusTarget( - key: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - keyName: 'keyDrawerLeaveCurrentOrg', - description: 'description', - next: () {}, - appTour: mockAppTour!, - ); - // SizeConfig().init(context); - model2.context = context; - return Scaffold( - drawer: const Drawer(), - key: MainScreenViewModel.scaffoldKey, - body: TextButton( - key: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - child: const Text('tutorial'), - onPressed: () { - MainScreenViewModel.scaffoldKey.currentState! - .openDrawer(); - mockAppTour!.showTutorial( - onClickTarget: (x) {}, - onFinish: () {}, - targets: [ - mockFocusTarget!, - ], - ); - }, - ), - ); - }, - ), - navigatorKey: navigationService.navigatorKey, - // onGenerateRoute: router.generateRoute, - ); - }, - ); - - await tester.pumpWidget(app); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final tutorialBtn = - find.byKey(MainScreenViewModel.keyDrawerLeaveCurrentOrg); - - expect(tutorialBtn, findsOneWidget); - - (tester.widget(tutorialBtn) as TextButton).onPressed!(); - await tester.pumpAndSettle(); - - expect( - mockFocusTarget!.focusWidget.contents![0].builder!( - capturedContext!, - CustomTutorialController(), - ) as Container, - isA(), - ); - }); - - testWidgets('Test for showTutorial method.', (tester) async { - AppTour? mockAppTour; - FocusTarget? mockFocusTarget; - BuildContext? capturedContext; - final app = BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: BaseView( - onModelReady: (model2) => model2.initialise( - context, - fromSignUp: false, - mainScreenIndex: 0, - demoMode: true, - testMode: true, - ), - builder: (context, model2, child) { - capturedContext = context; - mockAppTour = AppTour(model: model2); - mockFocusTarget = FocusTarget( - key: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - keyName: 'keyDrawerLeaveCurrentOrg', - description: 'description', - next: () {}, - appTour: mockAppTour!, - ); - // SizeConfig().init(context); - model2.context = context; - return Scaffold( - drawer: const Drawer(), - key: MainScreenViewModel.scaffoldKey, - body: TextButton( - key: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - child: const Text('tutorial'), - onPressed: () { - MainScreenViewModel.scaffoldKey.currentState! - .openDrawer(); - mockAppTour!.showTutorial( - onClickTarget: (x) {}, - onFinish: () {}, - targets: [ - mockFocusTarget!, - ], - ); - }, - ), - ); - }, - ), - navigatorKey: navigationService.navigatorKey, - // onGenerateRoute: router.generateRoute, - ); - }, - ); - - await tester.pumpWidget(app); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final tutorialBtn = - find.byKey(MainScreenViewModel.keyDrawerLeaveCurrentOrg); - - expect(tutorialBtn, findsOneWidget); - - (tester.widget(tutorialBtn) as TextButton).onPressed!(); - await tester.pumpAndSettle(); - - mockAppTour!.tutorialCoachMark.onSkip!(); - mockAppTour!.tutorialCoachMark.onClickOverlay!( - TargetFocus( - identify: MainScreenViewModel.keyDrawerCurOrg, - keyTarget: MainScreenViewModel.keyDrawerCurOrg, - ), - ); - - (mockFocusTarget!.focusWidget.contents![1].builder!( - capturedContext!, - CustomTutorialController(), - ) as GestureDetector) - .onTap!(); - }); - }); -} diff --git a/test/model_tests/chat/chat_list_tile_data_model_test.dart b/test/model_tests/chat/chat_list_tile_data_model_test.dart deleted file mode 100644 index 5571f7aec..000000000 --- a/test/model_tests/chat/chat_list_tile_data_model_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_user.dart'; - -/// function to check if the users are equal or not. -/// -/// **params**: -/// * `users1`: list of ChatUser -/// * `users2`: list of ChatUser -/// -/// **returns**: -/// None -void checkUsers(List? users1, List? users2) { - if (users1 == null || users2 == null) { - expect(users1, users2); - return; - } - - for (int index = 0; index < users1.length; index++) { - expect(users1[index].id, users2[index].id); - expect(users1[index].firstName, users2[index].firstName); - expect(users1[index].image, users2[index].image); - } -} - -void main() { - group('Test ChatListTileDataModel', () { - const int listLength = 4; - - final List users = List.generate(listLength, (index) { - return ChatUser( - id: '$index', - firstName: 'First$index', - image: 'Image$index', - ); - }); - - final ChatListTileDataModel chatListTileDataModel = ChatListTileDataModel( - users, - '123', - ); - - final Map json = { - 'id': '123', - 'users': List.generate(listLength, (index) { - return { - 'id': '$index', - 'firstName': 'First$index', - 'image': 'Image$index', - }; - }), - }; - - test('Test constructor', () { - expect(chatListTileDataModel.id, '123'); - checkUsers(chatListTileDataModel.users, users); - }); - - test('Test ChatListTileDataModel.fromJson', () { - final ChatListTileDataModel chatListTileDataModelFromJson = - ChatListTileDataModel.fromJson(json); - - expect(chatListTileDataModel.id, chatListTileDataModelFromJson.id); - checkUsers( - chatListTileDataModel.users, - chatListTileDataModelFromJson.users, - ); - }); - - test('Test toJson', () { - final Map json = chatListTileDataModel.toJson(); - - expect(json['id'], chatListTileDataModel.id); - checkUsers(json['users'] as List, chatListTileDataModel.users); - }); - }); -} diff --git a/test/model_tests/chat/chat_message_test.dart b/test/model_tests/chat/chat_message_test.dart deleted file mode 100644 index 972a9231a..000000000 --- a/test/model_tests/chat/chat_message_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; - -final chatUserOne = - ChatUser(firstName: 'Ravidi', id: '1', image: "https://testimg.com"); -final chatUserTwo = - ChatUser(firstName: 'Sheikh', id: '2', image: "https://testimg.com"); -void main() { - group("Tests for ChatMessage.dart", () { - test('check if ChatMessage JSON serialization works', () { - final message = - ChatMessage('1', chatUserOne, 'Hello, how are you?', chatUserTwo); - - final messageJson = message.toJson(); - - final messageFromJson = ChatMessage.fromJson(messageJson); - - expect(messageFromJson.id, message.id); - expect(messageFromJson.sender!.firstName, message.sender!.firstName); - expect(messageFromJson.receiver!.id, message.receiver!.id); - expect(messageFromJson.messageContent, message.messageContent); - }); - }); -} diff --git a/test/model_tests/chat/chat_user_test.dart b/test/model_tests/chat/chat_user_test.dart deleted file mode 100644 index 50430f830..000000000 --- a/test/model_tests/chat/chat_user_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/chats/chat_user.dart'; - -void main() { - group('Test chat_user model', () { - final chatUser = ChatUser( - firstName: 'Ayush', - id: null, - image: 'random image url', - ); - final chatUserJson = { - 'firstName': 'Ayush', - 'id': null, - 'image': 'random image url', - }; - test('Test json to model', () { - final chatUserFromJson = ChatUser.fromJson(chatUserJson); - expect(chatUser.firstName, chatUserFromJson.firstName); - expect(chatUser.id, chatUserFromJson.id); - expect(chatUser.image, chatUserFromJson.image); - }); - test('Test model to json', () { - final json = chatUser.toJson(); - expect(json, chatUserJson); - }); - }); -} diff --git a/test/model_tests/chats/chat_message_test.dart b/test/model_tests/chats/chat_message_test.dart deleted file mode 100644 index 972a9231a..000000000 --- a/test/model_tests/chats/chat_message_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; - -final chatUserOne = - ChatUser(firstName: 'Ravidi', id: '1', image: "https://testimg.com"); -final chatUserTwo = - ChatUser(firstName: 'Sheikh', id: '2', image: "https://testimg.com"); -void main() { - group("Tests for ChatMessage.dart", () { - test('check if ChatMessage JSON serialization works', () { - final message = - ChatMessage('1', chatUserOne, 'Hello, how are you?', chatUserTwo); - - final messageJson = message.toJson(); - - final messageFromJson = ChatMessage.fromJson(messageJson); - - expect(messageFromJson.id, message.id); - expect(messageFromJson.sender!.firstName, message.sender!.firstName); - expect(messageFromJson.receiver!.id, message.receiver!.id); - expect(messageFromJson.messageContent, message.messageContent); - }); - }); -} diff --git a/test/model_tests/comment/comment_model_test.dart b/test/model_tests/comment/comment_model_test.dart deleted file mode 100644 index dec61ce5e..000000000 --- a/test/model_tests/comment/comment_model_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/user/user_info.dart'; - -void main() { - group('Test Task model', () { - test('Test task json', () { - final comment = Comment( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - createdAt: '123456', - text: 'test text', - post: 'test post', - likeCount: 'test count', - ); - final commentJson = { - 'creator': { - '_id': '123', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'test@test.com', - }, - 'createdAt': '123456', - 'text': 'test text', - 'post': 'test post', - 'likeCount': 'test count', - }; - final commentFromJson = Comment.fromJson(commentJson); - expect(comment.creator?.id, commentFromJson.creator?.id); - expect(comment.creator?.firstName, commentFromJson.creator?.firstName); - expect(comment.creator?.lastName, commentFromJson.creator?.lastName); - expect(comment.creator?.email, commentFromJson.creator?.email); - expect(comment.createdAt, commentFromJson.createdAt); - expect(comment.text, commentFromJson.text); - expect(comment.post, commentFromJson.post); - expect(comment.likeCount, commentFromJson.likeCount); - }); - }); -} diff --git a/test/model_tests/events/event_model_test.dart b/test/model_tests/events/event_model_test.dart deleted file mode 100644 index 2557fa085..000000000 --- a/test/model_tests/events/event_model_test.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -void main() { - group('Test Event Model', () { - test('Test Event ', () { - final User user1 = User(id: "fakeUser1"); - final User user2 = User(id: "fakeUser2"); - final List users = [user1, user2]; - - final event = Event( - creator: User( - id: '123', - firstName: 'Ayush', - lastName: 'Chaudhary', - email: 'test@test.com', - ), - id: '12', - title: 'for test only', - description: 'for test only', - location: 'for test only', - recurring: false, - allDay: false, - startDate: 'for test only', - endDate: 'for test only', - startTime: 'for test only', - endTime: 'for test only', - isPublic: true, - isRegistered: true, - isRegisterable: true, - organization: OrgInfo(admins: users), - admins: users, - attendees: [ - Attendee( - id: "attendee1", - firstName: "firstName1", - lastName: "lastName1", - image: null, - ), - ], - ); - - final eventJson = { - 'creator': { - '_id': '123', - 'firstName': 'Ayush', - 'lastName': 'Chaudhary', - 'email': 'test@test.com', - }, - '_id': '12', - 'title': 'for test only', - 'description': 'for test only', - 'location': 'for test only', - 'recurring': false, - 'allDay': false, - 'startDate': 'for test only', - 'endDate': 'for test only', - 'startTime': 'for test only', - 'endTime': 'for test only', - 'isPublic': true, - 'isRegistered': true, - 'isRegisterable': true, - 'organization': { - 'admin': { - 'id': '123', - 'firstName': 'Ayush', - 'lastName': 'Chaudhary', - 'email': 'test@test.com', - }, - }, - 'admins': [ - { - 'id': '123', - 'firstName': 'Ayush', - 'lastName': 'Chaudhary', - 'email': 'test@test.com', - }, - { - 'id': '123', - 'firstName': 'Aykkush', - 'lastName': 'Chaudhary', - 'email': 'test@test.com', - }, - ], - 'attendees': [ - Attendee( - id: "attendee1", - firstName: "firstName1", - lastName: "lastName1", - image: null, - ).toJson(), - ], - }; - final eventFromJson = Event.fromJson(eventJson); - - expect(event.creator?.id, eventFromJson.creator?.id); - expect(event.creator?.firstName, eventFromJson.creator?.firstName); - expect(event.creator?.lastName, eventFromJson.creator?.lastName); - expect(event.creator?.email, eventFromJson.creator?.email); - expect(event.title, eventFromJson.title); - expect(event.id, eventFromJson.id); - expect(event.description, eventFromJson.description); - expect(event.attendees?[0].id, eventFromJson.attendees?[0].id); - expect( - event.attendees?[0].firstName, - eventFromJson.attendees?[0].firstName, - ); - expect( - event.attendees?[0].lastName, - eventFromJson.attendees?[0].lastName, - ); - expect(event.attendees?[0].image, eventFromJson.attendees?[0].image); - expect(event.location, eventFromJson.location); - expect(event.recurring, eventFromJson.recurring); - expect(event.allDay, eventFromJson.allDay); - expect(event.startDate, eventFromJson.startDate); - expect(event.startTime, eventFromJson.startTime); - expect(event.endTime, eventFromJson.endTime); - expect(event.isPublic, eventFromJson.isPublic); - expect(event.isRegistered, eventFromJson.isRegistered); - expect(event.isRegisterable, eventFromJson.isRegisterable); - }); - }); -} diff --git a/test/model_tests/mainscreen_navigation_args_test.dart b/test/model_tests/mainscreen_navigation_args_test.dart deleted file mode 100644 index fc25ccb78..000000000 --- a/test/model_tests/mainscreen_navigation_args_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; - -void main() { - group('MainScreenArgs', () { - test('Equality', () { - // Test 1: Creating two equal instances of MainScreenArgs - final mainScreenArgs1 = MainScreenArgs( - fromSignUp: true, - mainScreenIndex: 1, - toggleDemoMode: false, - ); - final mainScreenArgs2 = MainScreenArgs( - fromSignUp: true, - mainScreenIndex: 1, - toggleDemoMode: false, - ); - - expect(mainScreenArgs1, equals(mainScreenArgs2)); - expect(mainScreenArgs1.hashCode, equals(mainScreenArgs2.hashCode)); - - // Test 2: Creating instances with different properties - final mainScreenArgs3 = MainScreenArgs( - fromSignUp: false, - mainScreenIndex: 2, - toggleDemoMode: true, - ); - - expect(mainScreenArgs1, isNot(equals(mainScreenArgs3))); - expect(mainScreenArgs1.hashCode, isNot(equals(mainScreenArgs3.hashCode))); - }); - }); -} diff --git a/test/model_tests/organization/org_info_address_test.dart b/test/model_tests/organization/org_info_address_test.dart deleted file mode 100644 index c080b64b0..000000000 --- a/test/model_tests/organization/org_info_address_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/organization/org_info_address.dart'; - -void main() { - group('Test OrgInfoAddress model', () { - final Map addressJson = { - "city": "Delhi", - "countryCode": "IN", - "dependentLocality": "Some Dependent Locality", - "line1": "123 Random Street", - "line2": "Apartment 456", - "postalCode": "110001", - "sortingCode": "ABC-123", - "state": "Delhi", - }; - test('Test fromJson function', () { - final Address result = Address.fromJson(addressJson); - expect(result.city, 'Delhi'); - expect(result.countryCode, 'IN'); - expect(result.dependentLocality, 'Some Dependent Locality'); - expect(result.line1, '123 Random Street'); - expect(result.line2, 'Apartment 456'); - expect(result.postalCode, '110001'); - expect(result.sortingCode, 'ABC-123'); - expect(result.state, 'Delhi'); - }); - }); -} diff --git a/test/model_tests/organization/org_info_test.dart b/test/model_tests/organization/org_info_test.dart deleted file mode 100644 index 9f2b25296..000000000 --- a/test/model_tests/organization/org_info_test.dart +++ /dev/null @@ -1,213 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; - -import '../../helpers/test_helpers.dart'; - -void main() { - setupLocator(); - sizeConfig.test(); - setUp(() { - registerServices(); - }); - - group('Test OrgInfo model', () { - final Map userJson = { - 'accessToken': ' ', - 'refreshToken': ' ', - '_id': 'user_id', - }; - final Map json1 = { - '_id': '123', - 'image': 'image_url', - 'name': 'Name', - 'description': 'Description', - 'userRegistrationRequired': false, - 'creator': userJson, - 'members': [userJson], - 'admins': [userJson], - 'address': { - "city": "Delhi", - "countryCode": "IN", - "dependentLocality": "Some Dependent Locality", - "line1": "123 Random Street", - "line2": "Apartment 456", - "postalCode": "110001", - "sortingCode": "ABC-123", - "state": "Delhi", - }, - }; - final Map json2 = { - '_id': '321', - 'image': 'image_url', - 'name': 'Name', - 'description': 'Description', - 'userRegistrationRequired': false, - 'creator': userJson, - 'members': [userJson], - 'admins': [userJson], - 'address': { - "city": "Delhi", - "countryCode": "IN", - "dependentLocality": "Some Dependent Locality", - "line1": "123 Random Street", - "line2": "Apartment 456", - "postalCode": "110001", - "sortingCode": "ABC-123", - "state": "Delhi", - }, - }; - - test('Test fromJson function with memberRequest false', () { - final OrgInfo result = OrgInfo.fromJson(json1, memberRequest: false); - - expect(result.id, '123'); - expect(result.image, 'image_url'); - expect(result.name, 'Name'); - expect(result.description, 'Description'); - expect(result.userRegistrationRequired, false); - expect(result.creatorInfo!.authToken, ' '); - expect(result.creatorInfo!.refreshToken, ' '); - expect(result.creatorInfo!.id, 'user_id'); - expect(result.members!.length, 1); - expect(result.members![0].authToken, ' '); - expect(result.members![0].refreshToken, ' '); - expect(result.members![0].id, 'user_id'); - expect(result.admins!.length, 1); - expect(result.admins![0].authToken, ' '); - expect(result.admins![0].refreshToken, ' '); - expect(result.admins![0].id, 'user_id'); - expect(result.address!.city, 'Delhi'); - expect(result.address!.countryCode, "IN"); - expect(result.address!.state, 'Delhi'); - }); - - test('Test fromJson function with memberRequest true', () { - final Map json = { - 'organization': json1, - }; - - final OrgInfo result = OrgInfo.fromJson(json, memberRequest: true); - - expect(result.id, '123'); - expect(result.image, 'image_url'); - expect(result.name, 'Name'); - expect(result.description, 'Description'); - expect(result.userRegistrationRequired, false); - expect(result.creatorInfo!.authToken, ' '); - expect(result.creatorInfo!.refreshToken, ' '); - expect(result.creatorInfo!.id, 'user_id'); - expect(result.members!.length, 1); - expect(result.members![0].authToken, ' '); - expect(result.members![0].refreshToken, ' '); - expect(result.members![0].id, 'user_id'); - expect(result.admins!.length, 1); - expect(result.admins![0].authToken, ' '); - expect(result.admins![0].refreshToken, ' '); - expect(result.admins![0].id, 'user_id'); - expect(result.address!.city, 'Delhi'); - expect(result.address!.countryCode, "IN"); - expect(result.address!.state, 'Delhi'); - }); - - test('Test fromJsonToList', () { - final List res = OrgInfo().fromJsonToList([json1, json2]); - - expect(res.length, 2); - for (int i = 0; i < 2; i++) { - final result = res[i]; - if (i == 0) { - expect(result.id, '123'); - } else { - expect(result.id, '321'); - } - expect(result.image, 'image_url'); - expect(result.name, 'Name'); - expect(result.description, 'Description'); - expect(result.userRegistrationRequired, false); - expect(result.creatorInfo!.authToken, ' '); - expect(result.creatorInfo!.refreshToken, ' '); - expect(result.creatorInfo!.id, 'user_id'); - expect(result.members!.length, 1); - expect(result.members![0].authToken, ' '); - expect(result.members![0].refreshToken, ' '); - expect(result.members![0].id, 'user_id'); - expect(result.admins!.length, 1); - expect(result.admins![0].authToken, ' '); - expect(result.admins![0].refreshToken, ' '); - expect(result.admins![0].id, 'user_id'); - expect(result.address!.city, 'Delhi'); - expect(result.address!.countryCode, "IN"); - expect(result.address!.state, 'Delhi'); - } - }); - - test('Test fromJsonToList with nested structures', () { - final List nestedJson = [ - [json1, json2], // Nested list with org information - json1, // Single org information - ]; - - final List res = OrgInfo().fromJsonToList(nestedJson); - - expect( - res.length, - 3, - ); // There are two orgs in the nested list and one in the single org information - - expect(res[0].id, '123'); - expect(res[0].image, 'image_url'); - expect(res[0].name, 'Name'); - expect(res[0].description, 'Description'); - expect(res[0].userRegistrationRequired, false); - expect(res[0].creatorInfo!.authToken, ' '); - expect(res[0].creatorInfo!.refreshToken, ' '); - expect(res[0].creatorInfo!.id, 'user_id'); - expect(res[0].members!.length, 1); - expect(res[0].members![0].authToken, ' '); - expect(res[0].members![0].refreshToken, ' '); - expect(res[0].members![0].id, 'user_id'); - expect(res[0].admins!.length, 1); - expect(res[0].admins![0].authToken, ' '); - expect(res[0].admins![0].refreshToken, ' '); - expect(res[0].admins![0].id, 'user_id'); - - expect(res[1].id, '321'); - expect(res[1].image, 'image_url'); - expect(res[1].name, 'Name'); - expect(res[1].description, 'Description'); - expect(res[1].userRegistrationRequired, false); - expect(res[1].creatorInfo!.authToken, ' '); - expect(res[1].creatorInfo!.refreshToken, ' '); - expect(res[1].creatorInfo!.id, 'user_id'); - expect(res[1].members!.length, 1); - expect(res[1].members![0].authToken, ' '); - expect(res[1].members![0].refreshToken, ' '); - expect(res[1].members![0].id, 'user_id'); - expect(res[1].admins!.length, 1); - expect(res[1].admins![0].authToken, ' '); - expect(res[1].admins![0].refreshToken, ' '); - expect(res[1].admins![0].id, 'user_id'); - - expect(res[2].id, '123'); - expect(res[2].image, 'image_url'); - expect(res[2].name, 'Name'); - expect(res[2].description, 'Description'); - expect(res[2].userRegistrationRequired, false); - expect(res[2].creatorInfo!.authToken, ' '); - expect(res[2].creatorInfo!.refreshToken, ' '); - expect(res[2].creatorInfo!.id, 'user_id'); - expect(res[2].members!.length, 1); - expect(res[2].members![0].authToken, ' '); - expect(res[2].members![0].refreshToken, ' '); - expect(res[2].members![0].id, 'user_id'); - expect(res[2].admins!.length, 1); - expect(res[2].admins![0].authToken, ' '); - expect(res[2].admins![0].refreshToken, ' '); - expect(res[2].admins![0].id, 'user_id'); - }); - }); -} diff --git a/test/model_tests/post/post_model_test.dart b/test/model_tests/post/post_model_test.dart deleted file mode 100644 index 89c849ace..000000000 --- a/test/model_tests/post/post_model_test.dart +++ /dev/null @@ -1,274 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; - -void main() { - group('Test Post model', () { - final u1 = User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ); - final u2 = User( - id: '123', - firstName: 'Ayush', - lastName: 'Chaudhary', - email: 'test@test.com', - ); - final List users = [u1, u2]; - - final LikedBy l1 = LikedBy(sId: 'test1'); - final LikedBy l2 = LikedBy(sId: 'test2'); - final List likeby = [l1, l2]; - - final comment1 = Comments(sId: 'comment1'); - final comment2 = Comments(sId: 'comment2'); - final comment3 = Comments(sId: 'comment3'); - final List comments = [comment1, comment2, comment3]; - - test('Test Post model', () { - final myBirthday = DateTime.utc(2004, DateTime.june, 16, 5, 30, 0, 0, 0); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - final postJson = { - 'creator': { - '_id': '123', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'test@test.com', - }, - '_id': '1222', - 'createdAt': '2023-03-15T15:28:52.122Z', - 'description': 'test description', - 'imageUrl': 'https://image.com', - 'videoUrl': 'https://image.com', - 'organization': { - 'admins': [ - { - 'id': '123', - 'firstName': 'Ayush', - 'lastName': 'Chaudhary', - 'email': 'test@test.com', - }, - { - 'id': '123', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'test@test.com', - } - ], - }, - 'likedBy': [ - {'_id': 'test1'}, - {'_id': 'test2'}, - ], - 'comments': [ - { - '_id': 'comment1', - }, - { - '_id': 'comment2', - }, - { - '_id': 'comment3', - } - ], - }; - final postFromJson = Post.fromJson(postJson); - post.getPostCreatedDuration(); - expect(post.creator?.id, postFromJson.creator?.id); - expect(post.creator?.firstName, postFromJson.creator?.firstName); - expect(post.creator?.lastName, postFromJson.creator?.lastName); - expect(post.creator?.email, postFromJson.creator?.email); - }); - // final post = Post( - // creator: User( - // id: '123', - // firstName: 'John', - // lastName: 'Doe', - // email: 'test@test.com', - // ), - // sId: "sid", - // createdAt: myBirthday, - // description: 'test description', - // imageUrl: 'https://image.com', - // videoUrl: 'https://image.com', - // organization: OrgInfo(admins: users), - // likedBy: likeby, - // comments: comments, - // ); - group('check if getPostCreatedBuration is working', () { - test('check if getPostCreatedBuration is working', () { - final myBirthday = - DateTime.utc(2004, DateTime.june, 16, 5, 30, 0, 0, 0); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - test( - 'Check if getPostCreatedBuration work when time is less than 60 seconds', - () { - final myBirthday30 = - DateTime.now().subtract(const Duration(seconds: 30)); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday30, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - test( - 'Check if getPostCreatedBuration work when time is less than 60 minutes', - () { - final myBirthday30 = - DateTime.now().subtract(const Duration(minutes: 30)); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday30, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - test( - 'Check if getPostCreatedBuration work when time is less than 12 hours', - () { - final myBirthday12 = DateTime.now().subtract(const Duration(hours: 12)); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday12, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - test( - 'Check if getPostCreatedBuration work when time is less than 15 days', - () { - final myBirthday15 = DateTime.now().subtract(const Duration(days: 15)); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday15, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - test( - 'Check if getPostCreatedBuration work when time is less than 200 days', - () { - final myBirthday200 = - DateTime.now().subtract(const Duration(days: 200)); - final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday200, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments, - ); - post.getPostCreatedDuration(); - }); - }); - group('check if LikedBy toJson works', () { - test('LikeBy model toJson', () { - final likedBy = LikedBy(sId: "test"); - final likeByJson = { - '_id': 'test', - }; - expect(likedBy.toJson(), likeByJson); - }); - }); - group('check if Comment toJson works', () { - test('Comment model toJson', () { - final comment = Comments(sId: 'test'); - final commentJson = { - '_id': 'test', - }; - expect(comment.toJson(), commentJson); - }); - }); - }); -} diff --git a/test/model_tests/user/user_info_test.dart b/test/model_tests/user/user_info_test.dart deleted file mode 100644 index 0d9e7de24..000000000 --- a/test/model_tests/user/user_info_test.dart +++ /dev/null @@ -1,248 +0,0 @@ -// ignore_for_file: talawa_api_doc - -import 'dart:io'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; - -/// Encoded Organization. -final encodedOrg = { - "name": 'test_org', - "image": 'https://testimg.com', - "userRegistrationRequired": true, -}; - -/// Updated Organization. -final updatedOrg = OrgInfo.fromJson({ - "name": 'test_org_updated', - "image": 'https://testimg_updated.com', - "userRegistrationRequired": false, -}); - -/// Membership Request Organization. -final membershipRequestOrg = { - "organization": encodedOrg, -}; - -/// Updated Membership Request Organization. -final updatedMembershipRequestOrg = { - "organization": updatedOrg, -}; - -/// Test Organization List. -final testOrgList = [ - encodedOrg, - encodedOrg, -]; - -/// Membership Request Organization List. -final membershipRequestOrgList = [ - membershipRequestOrg, - membershipRequestOrg, -]; - -/// Test Data From Organization. -final testDataFromOrg = { - "firstName": "ravidi", - "lastName": "sheikh", - "email": "ravidisheikh@test.com", - "image": "https://testimg.com", - "accessToken": "randomAccessToken", - "authToken": "randomAuthToken", - "refreshToken": "randomRefreshToken", - "adminFor": testOrgList, - 'createdOrganizations': testOrgList, - 'joinedOrganizations': testOrgList, - 'membershipRequests': membershipRequestOrgList, -}; - -/// Test Data Not From Organization. -final testDataNotFromOrg = { - "user": { - "id": "1234567890", - "firstName": "ravidi", - "lastName": "sheikh", - "email": "ravidisheikh@test.com", - "image": "https://testimg.com", - "accessToken": "randomAccessToken", - "authToken": "randomAuthToken", - "refreshToken": "randomRefreshToken", - 'joinedOrganizations': testOrgList, - 'membershipRequests': membershipRequestOrgList, - }, - 'appUserProfile': { - 'createdOrganizations': testOrgList, - "adminFor": testOrgList, - }, -}; - -void main() { - group("Tests for UserInfo.dart", () { - test('Check if UserInfo.fromJson works with fromOrg', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.firstName, "ravidi"); - expect(userInfo.lastName, "sheikh"); - expect(userInfo.email, "ravidisheikh@test.com"); - expect(userInfo.image, "https://testimg.com"); - expect(userInfo.authToken, " "); - }); - - test('Check if UserInfo.fromJson works without fromOrg', () async { - final userInfo = User.fromJson(testDataNotFromOrg); - - expect(userInfo.firstName, "ravidi"); - expect(userInfo.lastName, "sheikh"); - expect(userInfo.email, "ravidisheikh@test.com"); - expect(userInfo.image, "https://testimg.com"); - expect(userInfo.authToken, null); - }); - - test('Check if the method "update" works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.firstName, "ravidi"); - expect(userInfo.lastName, "sheikh"); - expect(userInfo.email, "ravidisheikh@test.com"); - expect(userInfo.image, "https://testimg.com"); - expect(userInfo.authToken, " "); - - userInfo.update( - User( - firstName: "ravidi_updated", - lastName: "sheikh_updated", - email: "updatedemail@test.com", - image: "https://testimgupdated.com", - authToken: "randomAuthToken_updated", - ), - ); - - expect(userInfo.firstName, "ravidi_updated"); - expect(userInfo.lastName, "sheikh_updated"); - expect(userInfo.email, "updatedemail@test.com"); - expect(userInfo.image, "https://testimgupdated.com"); - expect(userInfo.authToken, "randomAuthToken_updated"); - }); - - test('Check if print method works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - // No way to test this. Calling here to increase - userInfo.print(); - }); - - test('Check if the method updateJoinedOrg works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.joinedOrganizations!.length, 2); - expect(userInfo.joinedOrganizations![0].name, 'test_org'); - expect(userInfo.joinedOrganizations![0].image, 'https://testimg.com'); - expect(userInfo.joinedOrganizations![0].userRegistrationRequired, true); - - userInfo.updateJoinedOrg([updatedOrg, updatedOrg, updatedOrg]); - - expect(userInfo.joinedOrganizations!.length, 3); - expect(userInfo.joinedOrganizations![0].name, 'test_org_updated'); - expect( - userInfo.joinedOrganizations![0].image, - 'https://testimg_updated.com', - ); - expect(userInfo.joinedOrganizations![0].userRegistrationRequired, false); - }); - - test('Check if the method updateCreatedOrg works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.createdOrganizations!.length, 2); - expect(userInfo.createdOrganizations![0].name, 'test_org'); - expect(userInfo.createdOrganizations![0].image, 'https://testimg.com'); - expect(userInfo.createdOrganizations![0].userRegistrationRequired, true); - - userInfo.updateCreatedOrg([updatedOrg, updatedOrg, updatedOrg]); - - expect(userInfo.createdOrganizations!.length, 3); - expect(userInfo.createdOrganizations![0].name, 'test_org_updated'); - expect( - userInfo.createdOrganizations![0].image, - 'https://testimg_updated.com', - ); - expect(userInfo.createdOrganizations![0].userRegistrationRequired, false); - }); - - test('Check if the method updateMemberRequestOrg works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.membershipRequests!.length, 2); - expect(userInfo.membershipRequests![0].name, 'test_org'); - expect(userInfo.membershipRequests![0].image, 'https://testimg.com'); - expect(userInfo.membershipRequests![0].userRegistrationRequired, true); - - userInfo.updateMemberRequestOrg([updatedOrg, updatedOrg, updatedOrg]); - - expect(userInfo.membershipRequests!.length, 5); - expect(userInfo.membershipRequests![3].name, 'test_org_updated'); - expect( - userInfo.membershipRequests![3].image, - 'https://testimg_updated.com', - ); - expect(userInfo.membershipRequests![3].userRegistrationRequired, false); - }); - - test('Check if the method updateAdminFor works', () async { - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - - expect(userInfo.adminFor!.length, 2); - expect(userInfo.adminFor![0].name, 'test_org'); - expect(userInfo.adminFor![0].image, 'https://testimg.com'); - expect(userInfo.adminFor![0].userRegistrationRequired, true); - - userInfo.updateAdminFor([updatedOrg, updatedOrg, updatedOrg]); - - expect(userInfo.adminFor!.length, 3); - expect(userInfo.adminFor![0].name, 'test_org_updated'); - expect(userInfo.adminFor![0].image, 'https://testimg_updated.com'); - expect(userInfo.adminFor![0].userRegistrationRequired, false); - }); - - test('Check if Hive storage works', () async { - Hive - ..init("./temporaryPath") - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - final userBox = await Hive.openBox('userInfo'); - expect(userBox.isOpen, true); - - final userInfo = User.fromJson(testDataFromOrg, fromOrg: true); - userBox.put('user', userInfo); - - final newUserBox = await Hive.openBox('userInfo'); - final loadedUserInfo = newUserBox.get('user') as User; - - expect(loadedUserInfo.firstName, "ravidi"); - expect(loadedUserInfo.lastName, "sheikh"); - expect(loadedUserInfo.email, "ravidisheikh@test.com"); - expect(loadedUserInfo.image, "https://testimg.com"); - expect(loadedUserInfo.authToken, " "); - - File('temporaryPath/userinfo.hive').delete(); - File('temporaryPath/userinfo.lock').delete(); - }); - - test('Test hashCode', () { - final userAdapter = UserAdapter(); - - final int hashCode = userAdapter.hashCode; - expect(userAdapter.hashCode, hashCode); - }); - - test('Test ==', () { - final userAdapter1 = UserAdapter(); - final userAdapter2 = UserAdapter(); - - expect(userAdapter1 == userAdapter2, true); - }); - }); -} diff --git a/test/plugins/fetch_plugin_list_test.dart b/test/plugins/fetch_plugin_list_test.dart deleted file mode 100644 index f8dc27d93..000000000 --- a/test/plugins/fetch_plugin_list_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/plugins/fetch_plugin_list.dart'; -import 'package:talawa/services/graphql_config.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -/// Tests fetch_plugin_list.dart. -/// -/// more_info_if_required -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() async { - testSetupLocator(); - locator().test(); - late FetchPluginList fetchPluginList; - - final Directory dir = await Directory.systemTemp.createTemp('talawa_test'); - Hive.init(dir.path); - await Hive.openBox('pluginBox'); - - setUp(() { - registerServices(); - locator.allowReassignment = true; - - locator.registerLazySingleton(() => FetchPluginList()); - fetchPluginList = locator(); - }); - group('FetchPluginList', () { - test('fetchList should fetch plugins and store them in Hive', () async { - final queryResult = QueryResult( - data: { - 'getPlugins': [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': true, - 'installedOrgs': ['Org A'], - }, - ], - }, - options: QueryOptions( - document: gql(queries.getPluginsList()), - ), - source: QueryResultSource.network, - ); - - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - when( - locator().query( - QueryOptions( - document: gql(queries.getPluginsList()), - ), - ), - ).thenAnswer((_) async => queryResult); - await fetchPluginList.fetchList(); - - verify(locator().clientToQuery()).called(2); - verify( - locator().query( - QueryOptions( - document: gql(queries.getPluginsList()), - ), - ), - ).called(2); - - expect(fetchPluginList.box, isNotNull); - expect( - fetchPluginList.box.get('plugins'), - equals(queryResult.data!["getPlugins"]), - ); - }); - }); -} diff --git a/test/plugins/talawa_plugin_provider_test.dart b/test/plugins/talawa_plugin_provider_test.dart deleted file mode 100644 index 940dd09c1..000000000 --- a/test/plugins/talawa_plugin_provider_test.dart +++ /dev/null @@ -1,246 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/plugins/talawa_plugin_provider.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -/// Test for talawa_plugin_provider_test.dart. -/// -/// more_info_if_required -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - testSetupLocator(); - TestWidgetsFlutterBinding.ensureInitialized(); - late Box box; - - final OrgInfo org = OrgInfo( - id: 'org1', - name: 'test org 3', - ); - - setUpAll(() async { - registerServices(); - final Directory dir = await Directory.systemTemp.createTemp('talawa_test'); - Hive.init(dir.path); - box = await Hive.openBox('pluginBox'); - }); - - tearDownAll(() { - unregisterServices(); - box.close(); - Hive.deleteBoxFromDisk('pluginBox'); - Hive.close(); - }); - - group('TalawaPluginProvider Tests', () { - testWidgets('Widget displays child when visible and plugins are installed', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': true, - 'installedOrgs': ['org1'], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: true, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsOneWidget); - }); - - testWidgets( - 'Widget hides child when not visible and plugins are not installed also plugin not installed in org', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': false, - 'installedOrgs': ['org2'], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: false, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsNothing); - }); - testWidgets( - 'Widget displays child when not visible and plugins are installed', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': true, - 'installedOrgs': ['org1'], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: false, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsOneWidget); - }); - testWidgets( - 'Widget displays child when not visible but plugin is already installed in that org', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': false, - 'installedOrgs': ['org1'], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: false, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsOneWidget); - }); - testWidgets( - 'Widget displays child when visible but plugins are not installed', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': false, - 'installedOrgs': ['org1'], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: true, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsOneWidget); - }); - testWidgets('Widget hides child when not visible and plugins is null', - (WidgetTester tester) async { - box.put('plugins', null); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: false, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsNothing); - }); - testWidgets( - 'Widget hides child when not visible and Current Organization is Not Set ', - (WidgetTester tester) async { - box.put( - 'plugins', - [ - { - '_id': '1', - 'pluginName': 'Plugin 1', - 'pluginCreatedBy': 'User A', - 'pluginDesc': 'Description A', - 'pluginInstallStatus': false, - 'installedOrgs': [''], - }, - ], - ); - - when(userConfig.currentOrg).thenReturn(org); - await tester.pumpWidget( - const MaterialApp( - home: TalawaPluginProvider( - visible: false, - pluginName: 'Plugin 1', - child: Text('Test Plugin'), - ), - ), - ); - - expect(find.text('Test Plugin'), findsNothing); - }, - ); - }); -} diff --git a/test/router_test.dart b/test/router_test.dart deleted file mode 100644 index 748f8fa9f..000000000 --- a/test/router_test.dart +++ /dev/null @@ -1,408 +0,0 @@ -// ignore_for_file: talawa_api_doc - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/main.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart'; -import 'package:talawa/splash_screen.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/views/after_auth_screens/add_post_page.dart'; -import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart'; -import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart'; -import 'package:talawa/views/after_auth_screens/chat/select_contact.dart'; -import 'package:talawa/views/after_auth_screens/events/create_custom_recurring_event.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_page.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_event_page.dart'; -import 'package:talawa/views/after_auth_screens/events/event_calendar.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -import 'package:talawa/views/after_auth_screens/feed/individual_post.dart'; -import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_page.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/access_request_screen.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart'; -import 'package:talawa/views/after_auth_screens/org_info_screen.dart'; -import 'package:talawa/views/after_auth_screens/profile/edit_profile_page.dart'; -import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; -import 'package:talawa/views/demo_screens/explore_events_demo.dart'; -import 'package:talawa/views/demo_screens/organization_feed_demo.dart'; -import 'package:talawa/views/demo_screens/profile_page_demo.dart'; -import 'package:talawa/views/main_screen.dart'; -import 'package:talawa/views/pre_auth_screens/change_password.dart'; -import 'package:talawa/views/pre_auth_screens/select_language.dart'; -import 'package:talawa/views/pre_auth_screens/select_organization.dart'; -import 'package:talawa/views/pre_auth_screens/set_url.dart'; -import 'package:talawa/views/pre_auth_screens/waiting_screen.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - setupLocator(); - - group('Tests for router', () { - testWidgets('Test SplashScreen route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.splashScreen, arguments: 0), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test SelectLanguage route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.languageSelectionRoute), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test SelectOrganization route', (WidgetTester tester) async { - const orgId = 'exampleOrgId'; // Provide an example organization ID - final route = generateRoute( - const RouteSettings(name: Routes.selectOrgScreen, arguments: orgId), - ); - expect(route, isA()); - if (route is CupertinoPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - final selectOrganizationWidget = widget as SelectOrganization; - expect(selectOrganizationWidget.selectedOrgId, orgId); - } - }); - - testWidgets('Test WaitingPage route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.waitingScreen, arguments: 0), - ); - expect(route, isA()); - if (route is CupertinoPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test ChangePass route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.updateScreen, arguments: 0), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test OrganizationFeed route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.homeScreen, arguments: 0), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test MainScreen route', (WidgetTester tester) async { - final mainScreenArgs = MainScreenArgs(mainScreenIndex: 1); - - final route = generateRoute( - RouteSettings(name: Routes.mainScreen, arguments: mainScreenArgs), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test IndividualPostView route', (WidgetTester tester) async { - final post = Post(sId: "testId", creator: User()); - - final route = generateRoute( - RouteSettings(name: Routes.individualPost, arguments: post), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test PinnedPostPage route', (WidgetTester tester) async { - final List pinnedPosts = [Post(sId: "testId", creator: User())]; - - final route = generateRoute( - RouteSettings(name: Routes.pinnedPostPage, arguments: pinnedPosts), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test ExploreEvents route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.exploreEventsScreen)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test CreateEventPage route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.createEventPage)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test createCustomRecurringEvent route', - (WidgetTester tester) async { - final route = generateRoute( - RouteSettings( - name: Routes.customRecurrencePage, - arguments: CreateEventViewModel(), - ), - ); - expect( - route, - isA(), - ); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test ProfilePage route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.profilePage)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test EditProfilePage route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.editProfilePage)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test JoinOrganisationAfterAuth route', - (WidgetTester tester) async { - const orgId = 'orgId'; - final route = generateRoute( - const RouteSettings(name: Routes.joinOrg, arguments: orgId), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for requestAccess route', (WidgetTester tester) async { - final OrgInfo orgInfo = OrgInfo(); - final route = generateRoute( - RouteSettings(name: Routes.requestAccess, arguments: orgInfo), - ); - expect(route, isA()); - if (route is CupertinoPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for editEventPage route', (WidgetTester tester) async { - final Event event = Event(); - final route = generateRoute( - RouteSettings(name: Routes.editEventPage, arguments: event), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test AppSettingsPage route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.appSettings, arguments: 0), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for chatMessageScreen route', - (WidgetTester tester) async { - final List arguments = [ - 'ChatId', - DirectChatViewModel(), - ]; - final route = generateRoute( - RouteSettings(name: Routes.chatMessageScreen, arguments: arguments), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for calendar route', (WidgetTester tester) async { - final List events = [ - Event(), - ]; - final route = generateRoute( - RouteSettings(name: Routes.calendar, arguments: events), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for selectContact route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.selectContact)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for addPostpage route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.addPostScreen)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for setUrl route', (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.setUrlScreen, arguments: ''), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for demoProfilePage route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.demoProfilePage)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for demoExploreEventsScreen route', - (WidgetTester tester) async { - final route = generateRoute( - const RouteSettings(name: Routes.demoExploreEventsScreen), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for demoHomeScreen route', (WidgetTester tester) async { - final route = - generateRoute(const RouteSettings(name: Routes.demoHomeScreen)); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for default DemoPage route', (WidgetTester tester) async { - final route = generateRoute(const RouteSettings(name: 'default')); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - - testWidgets('Test for default orgInfoScreen route', - (WidgetTester tester) async { - final route = generateRoute( - RouteSettings(name: Routes.orgInfoScreen, arguments: OrgInfo()), - ); - expect(route, isA()); - if (route is MaterialPageRoute) { - final builder = route.builder; - final widget = builder(MockBuildContext()); - expect(widget, isA()); - } - }); - }); -} diff --git a/test/service_tests/chat_service_test.dart b/test/service_tests/chat_service_test.dart deleted file mode 100644 index cd6da0d8d..000000000 --- a/test/service_tests/chat_service_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/chat_service.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/utils/chat_queries.dart'; -import '../helpers/test_helpers.dart'; - -void main() { - setUp(() { - registerServices(); - }); - group('Test ChatService', () { - test('Test SendMessageToDirectChat Method', () async { - final dataBaseMutationFunctions = locator(); - const id = "1"; - const messageContent = "test"; - - final query = ChatQueries().sendMessageToDirectChat(); - when( - dataBaseMutationFunctions.gqlAuthMutation( - query, - variables: { - "chatId": id, - "messageContent": messageContent, - }, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'sendMessageToDirectChat': { - '_id': id, - 'messageContent': messageContent, - 'sender': { - 'firstName': 'Mohamed', - }, - 'receiver': { - 'firstName': 'Ali', - }, - }, - }, - source: QueryResultSource.network, - ), - ); - final service = ChatService(); - await service.sendMessageToDirectChat( - id, - messageContent, - ); - }); - test('getDirectChatsByUserId Method', () async { - final dataBaseMutationFunctions = locator(); - const userId = "xzy1"; - final query = ChatQueries().fetchDirectChatsByUserId(userId); - // when(locator()).thenAnswer((_) => UserConfig()); - when(dataBaseMutationFunctions.gqlAuthQuery(query)).thenAnswer( - (_) async => QueryResult( - options: QueryOptions( - document: gql(query), - ), - data: { - 'directChatsByUserID': [ - { - 'users': [], - '_id': 'xzy1', - } - ], - }, - source: QueryResultSource.network, - ), - ); - final service = ChatService(); - await service.getDirectChatsByUserId(); - }); - test("getDirectChatMessagesByChatId Method", () async { - final dataBaseMutationFunctions = locator(); - const chatId = 'test'; - final query = ChatQueries().fetchDirectChatMessagesByChatId(chatId); - when(dataBaseMutationFunctions.gqlAuthQuery(query)).thenAnswer( - (_) async => QueryResult( - options: QueryOptions( - document: gql(query), - ), - data: { - 'directChatsMessagesByChatID': [ - { - '_id': 'test', - 'messageContent': 'test', - } - ], - }, - source: QueryResultSource.network, - ), - ); - - final service = ChatService(); - await service.getDirectChatMessagesByChatId(chatId); - }); - }); -} diff --git a/test/service_tests/comment_service_test.dart b/test/service_tests/comment_service_test.dart deleted file mode 100644 index 4a8af5695..000000000 --- a/test/service_tests/comment_service_test.dart +++ /dev/null @@ -1,373 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/comment_service.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/utils/comment_queries.dart'; -import '../helpers/test_helpers.dart'; - -void main() { - setUp(() { - registerServices(); - }); - group('test for comment servicce', () { - test('test for createComments', () async { - final dataBaseMutationFunctions = locator(); - - final query = CommentQueries().createComment(); - when( - dataBaseMutationFunctions.gqlAuthMutation( - query, - variables: { - 'postId': 'ayush post', //Add your variables here - 'text': 'hey Ayush here!', - }, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'text': 'hey Ayush here!', - 'postId': 'ayush post', - }, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - - await service.createComments( - 'ayush post', - 'hey Ayush here!', - ); - }); - test('test for createComments when throws exception', () async { - final dataBaseMutationFunctions = locator(); - - final query = CommentQueries().createComment(); - when( - dataBaseMutationFunctions.gqlAuthMutation( - query, - variables: { - 'postId': 'ayush post', - 'text': 'hey Ayush here!', - }, - ), - ).thenThrow(Exception('Your error message here')); - - final service = CommentService(); - - await service.createComments( - 'ayush post', - 'hey Ayush here!', - ); - - verify( - navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ), - ).called(1); - }); - test('test for getCommentsForPost', () async { - final dataBaseMutationFunctions = locator(); - final String getCommmentQuery = - CommentQueries().getPostsComments('Ayush s postid'); - - when( - dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(getCommmentQuery)), - data: { - 'post': { - 'comments': [ - { - 'creator': { - '_id': '123', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'test@test.com', - }, - 'createdAt': '123456', - 'text': 'test text', - 'post': 'test post', - 'likeCount': 'test count', - }, - { - 'creator': { - '_id': '123', - 'firstName': 'Ayush', - 'lastName': 'Doe', - 'email': 'test@test.com', - }, - 'createdAt': '123456', - 'text': 'test text', - 'post': 'test post', - 'likeCount': 'test count', - }, - { - 'creator': { - '_id': '123', - 'firstName': 'john', - 'lastName': 'chauhdary', - 'email': 'test@test.com', - }, - 'createdAt': '123456', - 'text': 'test text', - 'post': 'test post', - 'likeCount': 'test count', - } - ], - }, - }, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - final result = await service.getCommentsForPost('Ayush s postid'); - - if (result.toString().contains('[{creator: ' - '{' - '_id: 123, ' - 'firstName: John, ' - 'lastName: Doe, ' - 'email: test@test.com},' - ' createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: ' - '{_id: 123, ' - 'firstName: Ayush, ' - 'lastName: Doe, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: {_id: 123,' - ' firstName: john, ' - 'lastName: chauhdary, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}]')) { - } else { - fail('the result is not maatching'); - } - expect(result, isNotEmpty); - }); - test('test for getCommentsForPost for wrong post idd', () async { - final dataBaseMutationFunctions = locator(); - - final String getCommmentQuery = - CommentQueries().getPostsComments('Ayush s postid'); - when( - dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(getCommmentQuery)), - data: { - 'post': { - 'comments': [], - }, - }, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - final result = await service.getCommentsForPost('Ayush postid'); - - if (result.toString().contains('[{creator: ' - '{' - '_id: 123, ' - 'firstName: John, ' - 'lastName: Doe, ' - 'email: test@test.com},' - ' createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: ' - '{_id: 123, ' - 'firstName: Ayush, ' - 'lastName: Doe, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: {_id: 123,' - ' firstName: john, ' - 'lastName: chauhdary, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}]')) { - fail('the result is not maatching'); - } - expect(result, isEmpty); - }); - - test('test for zero comments on post', () async { - final dataBaseMutationFunctions = locator(); - - final String getCommmentQuery = - CommentQueries().getPostsComments('Ayush s postid'); - when( - dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(getCommmentQuery)), - data: { - 'post': {'comments': []}, - }, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - final result = await service.getCommentsForPost('Ayush postid'); - - if (result.toString().contains('[{creator: ' - '{' - '_id: 123, ' - 'firstName: John, ' - 'lastName: Doe, ' - 'email: test@test.com},' - ' createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: ' - '{_id: 123, ' - 'firstName: Ayush, ' - 'lastName: Doe, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: {_id: 123,' - ' firstName: john, ' - 'lastName: chauhdary, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}]')) { - fail('the result is not maatching'); - } - expect(result, isEmpty); - }); - - test('test when post is null', () async { - final dataBaseMutationFunctions = locator(); - - final String getCommmentQuery = - CommentQueries().getPostsComments('Ayush s postid'); - when( - dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(getCommmentQuery)), - data: { - 'post': null, - }, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - final result = await service.getCommentsForPost('Ayush postid'); - - if (result.toString().contains('[{creator: ' - '{' - '_id: 123, ' - 'firstName: John, ' - 'lastName: Doe, ' - 'email: test@test.com},' - ' createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: ' - '{_id: 123, ' - 'firstName: Ayush, ' - 'lastName: Doe, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: {_id: 123,' - ' firstName: john, ' - 'lastName: chauhdary, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}]')) { - fail('the result is not maatching'); - } - expect(result, isEmpty); - }); - - test('test when result is null', () async { - final dataBaseMutationFunctions = locator(); - - final String getCommmentQuery = - CommentQueries().getPostsComments('Ayush s postid'); - when( - dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(getCommmentQuery)), - data: null, - source: QueryResultSource.network, - ), - ); - - final service = CommentService(); - final result = await service.getCommentsForPost('Ayush postid'); - - if (result.toString().contains('[{creator: ' - '{' - '_id: 123, ' - 'firstName: John, ' - 'lastName: Doe, ' - 'email: test@test.com},' - ' createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: ' - '{_id: 123, ' - 'firstName: Ayush, ' - 'lastName: Doe, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}, ' - '{creator: {_id: 123,' - ' firstName: john, ' - 'lastName: chauhdary, ' - 'email: test@test.com}, ' - 'createdAt: 123456, ' - 'text: test text, ' - 'post: test post, ' - 'likeCount: test count}]')) { - fail('the result is not maatching'); - } - expect(result, isEmpty); - }); - }); -} diff --git a/test/service_tests/database_mutations_function_test.dart b/test/service_tests/database_mutations_function_test.dart deleted file mode 100644 index 061924ee3..000000000 --- a/test/service_tests/database_mutations_function_test.dart +++ /dev/null @@ -1,1080 +0,0 @@ -import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/utils/queries.dart'; -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -/// Tests database_mutations_functions.dart. -/// -/// more_info_if_required -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() async { - testSetupLocator(); - locator().test(); - late DataBaseMutationFunctions functionsClass; - final Directory dir = await Directory.systemTemp.createTemp('talawa_test'); - Hive.init(dir.path); - await Hive.openBox('url'); - - const userNotAuthenticated = - GraphQLError(message: 'User is not authenticated'); - - const userNotAuthenticatedrand = - GraphQLError(message: 'User is not authenticatedrand'); - const userNotFound = GraphQLError(message: 'User not found'); - const refreshAccessTokenExpiredException = GraphQLError( - message: - 'Access Token has expired. Please refresh session.: Undefined location', - ); - - const wrongCredentials = GraphQLError(message: 'Invalid credentials'); - - const organizationNotFound = GraphQLError(message: 'Organization not found'); - - const memberRequestExist = - GraphQLError(message: 'Membership Request already exists'); - - const notifFeatureNotInstalled = GraphQLError( - message: - 'Failed to determine project ID: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND', - ); - - const emailAccountPresent = - GraphQLError(message: 'Email address already exists'); - - final testOrg = OrgInfo.fromJson({ - 'image': 'sampleimg', - 'id': 'XYZ', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }); - - setUpAll(() { - registerServices(); - functionsClass = DataBaseMutationFunctions(); - functionsClass.init(); - functionsClass.initClientNonAuth(); - }); - - group('Database Mutation Functions Tests', () { - testWidgets('Widget Testing 1', (tester) async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException( - graphqlErrors: [userNotAuthenticated], - linkException: UnknownException( - userNotAuthenticated, - StackTrace.current, - ), - ), - source: QueryResultSource.network, - ), - ); - - await functionsClass.gqlNonAuthQuery(query); - - tester.binding.addPostFrameCallback((_) { - navigationService.showTalawaErrorSnackBar( - "Server not running/wrong url", - MessageType.error, - ); - }); - - await tester.pump(); - }); - - testWidgets('Widget Testing 2', (tester) async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException( - graphqlErrors: [userNotAuthenticatedrand], - ), - source: QueryResultSource.network, - ), - ); - - await functionsClass.gqlNonAuthQuery(query); - - tester.binding.addPostFrameCallback((_) { - navigationService.showTalawaErrorSnackBar( - "Something went wrong!", - MessageType.error, - ); - }); - - await tester.pump(); - }); - - test('fetchOrgById test in case of successful results', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions( - document: gql(queries.fetchOrgById('XYZ')), - ), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - data: { - 'organizations': [ - { - 'id': 'XYZ', - 'image': 'sampleimg', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }, - ], - }, - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ') as OrgInfo; - - expect(org.id, testOrg.id); - expect(org.name, testOrg.name); - expect(org.image, testOrg.image); - expect(org.userRegistrationRequired, testOrg.userRegistrationRequired); - expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName); - }); - - test('fetchOrgById test in case of exception', () async { - final String query = Queries().fetchOrgById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when( - locator().mutate( - MutationOptions(document: gql(query)), - ), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.fetchOrgById('XYZ'); - expect(res, false); - }); - - test('Testing wrong credential error', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions( - document: gql( - queries.fetchOrgById('XYZ'), - ), - ), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - exception: OperationException(graphqlErrors: [wrongCredentials]), - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ'); - expect(org, false); - }); - - test('Testing organization not found error', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions( - document: gql( - queries.fetchOrgById('XYZ'), - ), - ), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - exception: OperationException(graphqlErrors: [organizationNotFound]), - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ'); - expect(org, false); - }); - - test('Testing memberRequestExist error', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions( - document: gql(queries.fetchOrgById('XYZ')), - ), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - exception: OperationException(graphqlErrors: [memberRequestExist]), - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ'); - expect(org, false); - }); - - test('Testing emailAccountPresent error', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions(document: gql(queries.fetchOrgById('XYZ'))), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - exception: OperationException( - graphqlErrors: [emailAccountPresent], - ), - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ'); - expect(org, false); - }); - - test('Testing notifFeatureNotInstalled error', () async { - when(locator().clientToQuery()).thenAnswer( - (_) => locator(), - ); - - when( - locator().mutate( - MutationOptions(document: gql(queries.fetchOrgById('XYZ'))), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(queries.fetchOrgById('XYZ'))), - exception: OperationException( - graphqlErrors: [notifFeatureNotInstalled], - ), - source: QueryResultSource.network, - ), - ); - - final org = await functionsClass.fetchOrgById('XYZ'); - expect(org, false); - }); - - test('Testing gqlAuthQuery function without exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'organizations': [ - { - 'id': 'XYZ', - 'image': 'sampleimg', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }, - ], - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthQuery(query) as QueryResult; - final org = OrgInfo.fromJson( - (res.data!['organizations'] as List>)[0], - ); - - expect(org.id, testOrg.id); - expect(org.name, testOrg.name); - expect(org.image, testOrg.image); - expect(org.userRegistrationRequired, testOrg.userRegistrationRequired); - expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName); - }); - - test('Testing gqlAuthQuery with false exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException(graphqlErrors: [userNotFound]), - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthQuery(query); - expect(res, null); - }); - - test('Testing gqlAuthQuery with true exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthQuery(query); - expect(res, null); - }); - - test('Test for gql auth mutation', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'organizations': [ - { - 'id': 'XYZ', - 'image': 'sampleimg', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }, - ], - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthMutation(query) as QueryResult; - final org = OrgInfo.fromJson( - (res.data!['organizations'] as List>)[0], - ); - - expect(org.id, testOrg.id); - expect(org.name, testOrg.name); - expect(org.image, testOrg.image); - expect(org.userRegistrationRequired, testOrg.userRegistrationRequired); - expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName); - }); - - test('Test for gql auth mutation with false exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException(graphqlErrors: [userNotFound]), - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthMutation(query); - expect(res, null); - }); - - test('Test for gql auth mutation with true exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlAuthMutation(query); - expect(res, null); - }); - - test('Test for gql non auth query', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'organizations': [ - { - 'id': 'XYZ', - 'image': 'sampleimg', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }, - ], - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthQuery(query); - final org = OrgInfo.fromJson( - (res!.data!['organizations'] as List>)[0], - ); - - expect(org.id, testOrg.id); - expect(org.name, testOrg.name); - expect(org.image, testOrg.image); - expect(org.userRegistrationRequired, testOrg.userRegistrationRequired); - expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName); - }); - - test('Test for gql non auth mutation', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'organizations': [ - { - 'id': 'XYZ', - 'image': 'sampleimg', - 'name': 'Sample1', - 'userRegistrationRequired': false, - 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'}, - }, - ], - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthMutation(query) as QueryResult; - final org = OrgInfo.fromJson( - (res.data!['organizations'] as List>)[0], - ); - - expect(org.id, testOrg.id); - expect(org.name, testOrg.name); - expect(org.image, testOrg.image); - expect(org.userRegistrationRequired, testOrg.userRegistrationRequired); - expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName); - }); - - test('Test for gql non auth mutation with false exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException(graphqlErrors: [userNotFound]), - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthMutation(query); - expect(res, null); - }); - - test('Test for gql non auth mutation with true exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthMutation(query); - expect(res, null); - }); - - test('Test for refresh access token', () async { - final String query = Queries().refreshToken('reftok123'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'refreshToken': { - 'accessToken': 'acctok123', - 'refreshToken': 'reftok123', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.refreshAccessToken('reftok123'); - verify( - userConfig.updateAccessToken( - accessToken: 'acctok123', - refreshToken: 'reftok123', - ), - ); - verify(databaseFunctions.init()); - expect(res, true); - }); - - test('Test for refresh access token with false exception', () async { - final String query = Queries().refreshToken('reftok123'); - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException(graphqlErrors: [userNotFound]), - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.refreshAccessToken('reftok123'); - verify(navigationService.pop()); - expect(res, false); - }); - - test('Test for refresh access token with true exception', () async { - final String query = Queries().refreshToken('x'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when( - locator().mutate(MutationOptions(document: gql(query))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: MutationOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.refreshAccessToken('x'); - expect(res, false); - }); - - test('Test for gql non auth query with link exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: OperationException( - graphqlErrors: [userNotFound], - linkException: UnknownException( - userNotFound, - StackTrace.current, - ), - ), - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthQuery(query); - expect(res, null); - }); - - test('Test for gql non auth query with true exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [refreshAccessTokenExpiredException], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthQuery(query); - expect(res, null); - }); - test('Test for gql non auth query with false exception', () async { - final String query = Queries().fetchOrgDetailsById('XYZ'); - final String query2 = Queries().refreshToken('abc'); - final String query3 = Queries().refreshToken('xyz'); - - userConfig.currentUser.refreshToken = 'abc'; - - /// Returns the exception to be thrown in case of refresh token expired - /// - /// more_info_if_required - /// - /// **params**: - /// None - /// - /// **returns**: - /// * `Map`: Map of exception to be thrown - Map exp2() { - if (userConfig.currentUser.refreshToken == 'abc') { - userConfig.currentUser.refreshToken = 'xyz'; - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotAuthenticated], - ), - }); - } else { - return Map.from({ - 'val': OperationException( - graphqlErrors: [userNotFound], - ), - }); - } - } - - when(locator().query(QueryOptions(document: gql(query)))) - .thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - exception: exp2()['val'], - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query2))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query2)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - when( - locator().mutate(MutationOptions(document: gql(query3))), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query3)), - data: { - 'refreshToken': { - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, - }, - source: QueryResultSource.network, - ), - ); - - final res = await functionsClass.gqlNonAuthQuery(query); - expect(res, null); - }); - }); -} diff --git a/test/service_tests/event_service_test.dart b/test/service_tests/event_service_test.dart deleted file mode 100644 index 9da3f0935..000000000 --- a/test/service_tests/event_service_test.dart +++ /dev/null @@ -1,181 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/utils/event_queries.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; -import '../model_tests/user/user_info_test.dart'; - -void main() { - testSetupLocator(); - - setUp(() { - registerServices(); - }); - group('Test EventService', () { - test('Test editEvent method', () async { - final dataBaseMutationFunctions = locator(); - const query = ''; - final Map variables = {}; - when( - dataBaseMutationFunctions.gqlAuthMutation( - EventQueries().updateEvent(eventId: 'eventId'), - variables: variables, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'updateEvent': { - '_id': 'eventId', - 'title': 'Test task', - 'description': 'Test description', - }, - }, - source: QueryResultSource.network, - ), - ); - - final service = EventService(); - await service.editEvent( - eventId: 'eventId', - variables: variables, - ); - - verify( - navigationService.pop(), - ); - }); - - test('Test deleteEvent method', () async { - final dataBaseMutationFunctions = locator(); - const query = ''; - when( - dataBaseMutationFunctions.gqlAuthMutation( - EventQueries().deleteEvent('eventId'), - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'deleteEvent': { - '_id': 'eventId', - 'title': 'Test task', - 'description': 'Test description', - }, - }, - source: QueryResultSource.network, - ), - ); - final services = EventService(); - await services.deleteEvent('eventId'); - }); - - test('Test registerForAnEvent method', () async { - final dataBaseMutationFunctions = locator(); - const query = ''; - when( - dataBaseMutationFunctions.gqlAuthMutation( - EventQueries().registerForEvent(), - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'register for an event': { - '_id': 'eventId', - }, - }, - source: QueryResultSource.network, - ), - ); - final services = EventService(); - await services.registerForAnEvent('eventId'); - }); - - test('Test fetchAttendeesByEvent method', () async { - final dataBaseMutationFunctions = locator(); - const query = ''; - when( - dataBaseMutationFunctions.gqlAuthQuery( - EventQueries().attendeesByEvent('eventId'), - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'getEventAttendeesByEventId': {'userId': 'userId'}, - }, - source: QueryResultSource.network, - ), - ); - final services = EventService(); - services.fetchAttendeesByEvent('eventId'); - }); - - test('Test getEvents method', () async { - final dataBaseMutationFunctions = locator(); - const query = ''; - userConfig.currentOrg = OrgInfo(name: 'org', id: 'id'); - when( - dataBaseMutationFunctions.gqlAuthMutation( - EventQueries().fetchOrgEvents('XYZ'), - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: { - 'eventsByOrganizationConnection': [ - { - "_id": "1234567890", - "title": "Sample Event", - "description": "This is a sample event description.", - "location": "Sample Location", - "recurring": true, - "allDay": false, - "startDate": "2024-01-15", - "endDate": "2024-01-16", - "startTime": "10:00 AM", - "endTime": "4:00 PM", - "isPublic": true, - "isRegistered": true, - "isRegisterable": true, - "creator": { - "id": "user123", - "name": "Creator Name", - "email": "creator@example.com", - }, - "organization": { - "id": "org123", - "name": "Organization Name", - "description": "Sample organization description.", - }, - "attendees": [ - testDataNotFromOrg, - ], - } - ], - }, - source: QueryResultSource.network, - ), - ); - final services = EventService(); - services.getEvents(); - }); - - test('Test dispose method', () { - final eventService = EventService(); - eventService.dispose(); - }); - - test('Test for getters', () { - final model = EventService(); - expect(model.eventStream, isA>()); - }); - }); -} diff --git a/test/service_tests/graphql_config_test.dart b/test/service_tests/graphql_config_test.dart deleted file mode 100644 index 201b1aafc..000000000 --- a/test/service_tests/graphql_config_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:talawa/services/graphql_config.dart'; -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -void main() { - testSetupLocator(); - - setUp(() { - registerServices(); - }); - group('Testing Graphql Config', () { - test('test httpLink with MockHttpClient', () async { - final graphqlConfig = GraphqlConfig(); - final mockHttpClient = MockHttpClient(); - final mockUri = Uri.parse('https://example.com/graphql'); - - graphqlConfig.httpLink = HttpLink( - mockUri.toString(), - httpClient: mockHttpClient, - ); - - final response = await graphqlConfig - .clientToQuery() - .query(QueryOptions(document: gql('query {}'))); - expect( - response.data, - isNull, - ); - }); - }); -} diff --git a/test/service_tests/image_service_test.dart b/test/service_tests/image_service_test.dart deleted file mode 100644 index cce18ff63..000000000 --- a/test/service_tests/image_service_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:convert'; -import 'dart:io'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/services/image_service.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -class MockImageService extends Mock implements ImageService { - @override - Future convertToBase64(File file) async { - return ""; - } -} - -void main() { - testSetupLocator(); - - setUpAll(() { - registerServices(); - }); - - group('Tests for Crop Image', () { - test("test no image provided for the image cropper", () async { - const path = 'test'; - final file = await imageService.cropImage(imageFile: File(path)); - expect(file?.path, null); - }); - - test("crop image method", () async { - final mockImageCropper = imageCropper; - - const path = "test"; - final fakefile = File(path); - final croppedFile = CroppedFile("fakeCropped"); - - when( - mockImageCropper.cropImage( - sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: anyNamed('uiSettings'), - ), - ).thenAnswer((realInvocation) async => croppedFile); - - final file = await imageService.cropImage(imageFile: fakefile); - - expect(file?.path, croppedFile.path); - }); - - test("error in crop image", () async { - final mockImageCropper = locator(); - const path = "test"; - final fakefile = File(path); - when( - mockImageCropper.cropImage( - sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: anyNamed('uiSettings'), - ), - ).thenThrow(Exception()); - expect( - imageService.cropImage(imageFile: fakefile), - throwsException, - ); - }); - }); - - group('Tests for convertToBase64', () { - test('convertToBase64 converts file to base64 string', () async { - //using this asset as the test asset - final file = File('assets/images/Group 8948.png'); - final List encodedBytes = file.readAsBytesSync(); - - final fileString = await imageService.convertToBase64(file); - - final List decodedBytes = base64Decode(fileString!); - - expect(decodedBytes, equals(encodedBytes)); - }); - - test( - 'Check if convertToBase64 is working even if wrong file path is provided', - () async { - final file = File('fakePath'); - final fileString = await imageService.convertToBase64(file); - expect(null, fileString); - }); - }); -} diff --git a/test/service_tests/multi_media_pick_service_test.dart b/test/service_tests/multi_media_pick_service_test.dart deleted file mode 100644 index 1205bc509..000000000 --- a/test/service_tests/multi_media_pick_service_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:image_cropper/image_cropper.dart'; -import 'package:image_picker/image_picker.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -void main() { - testSetupLocator(); - setUp(() { - registerServices(); - }); - tearDown(() { - unregisterServices(); - }); - SizeConfig().test(); - group('MultiMediaPickerService test', () { - test("test get photo from gallery method if camera option is false", - () async { - final mockImageCropper = locator(); - final mockPicker = imagePicker; - final model = MultiMediaPickerService(); - const path = 'test'; - final image = XFile(path); - when(mockPicker.pickImage(source: ImageSource.gallery)) - .thenAnswer((realInvocation) async => image); - when( - mockImageCropper.cropImage( - sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: anyNamed('uiSettings'), - ), - ).thenAnswer((realInvocation) async => CroppedFile(path)); - - final result = await model.getPhotoFromGallery(camera: false); - - expect(result?.path, path); - }); - test("test get photo from gallery method if camera option is true", - () async { - final mockImageCropper = locator(); - final mockPicker = locator(); - final model = MultiMediaPickerService(); - const path = 'test'; - final image = XFile(path); - when(mockPicker.pickImage(source: ImageSource.camera)) - .thenAnswer((realInvocation) async => image); - when( - mockImageCropper.cropImage( - sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], - uiSettings: anyNamed('uiSettings'), - ), - ).thenAnswer((realInvocation) async => CroppedFile(path)); - - final result = await model.getPhotoFromGallery(camera: true); - - expect(result?.path, path); - }); - test("test no photo provided for the pick image", () async { - final model = MultiMediaPickerService(); - final file = await model.getPhotoFromGallery(camera: false); - expect(file?.path, null); - }); - test("camera access denied", () async { - final mockPicker = locator(); - final model = MultiMediaPickerService(); - final printed = []; - - final error = PlatformException(code: 'camera_access_denied'); - when(mockPicker.pickImage(source: ImageSource.camera)).thenThrow(error); - runZoned( - () async { - await model.getPhotoFromGallery(camera: true); - }, - zoneSpecification: ZoneSpecification( - print: (self, parent, zone, line) { - printed.add(line); - }, - ), - ); - expect( - printed[0], - "MultiMediaPickerService : Exception occurred while choosing photo from the gallery $error", - ); - }); - - testWidgets('Test for permission_denied_dialog success action.', - (tester) async { - final service = MultiMediaPickerService(); - - final Widget app = MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold(body: service.permissionDeniedDialog()), - ); - - await tester.pumpWidget(app); - await tester.pumpAndSettle(); - - final settingsFinder = find.textContaining('SETTINGS'); - - expect(settingsFinder, findsOneWidget); - - await tester.tap(settingsFinder); - - verify(navigationService.pop()); - }); - - test("test get fileStream", () async { - final model = MultiMediaPickerService(); - expect( - model.fileStream.toString(), - "Instance of '_AsBroadcastStream'", - ); - }); - }); -} diff --git a/test/service_tests/navigation_service_test.dart b/test/service_tests/navigation_service_test.dart deleted file mode 100644 index 564cc28b5..000000000 --- a/test/service_tests/navigation_service_test.dart +++ /dev/null @@ -1,608 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/talawa_error_dialog.dart'; -import 'package:talawa/widgets/talawa_error_snackbar.dart'; - -/// This methods tries to cover all the cases which can be there in future. -/// -/// **params**: -/// * `settings`: RouteSettings -/// -/// **returns**: -/// * `Route`: Returns Route Type -Route _onGenerateTestRoute(RouteSettings settings) { - if (settings.name == '/second-screen') { - if (settings.arguments == null) { - return MaterialPageRoute(builder: (context) => const SecondTestScreen()); - } else { - if (settings.arguments is String) { - return MaterialPageRoute( - builder: (context) => SecondTestScreen( - arguments: settings.arguments! as String, - ), - ); - } else if (settings.arguments is Function) { - return MaterialPageRoute( - builder: (context) => SecondTestScreen( - onclick: settings.arguments! as VoidCallback, - ), - ); - } else if (settings.arguments is Map) { - final map = settings.arguments! as Map; - return MaterialPageRoute( - builder: (context) => SecondTestScreen( - arguments: map['Argument'] as String, - onclick: map['Function'] as VoidCallback, - ), - ); - } - } - } - if (settings.name == '/first-screen') { - if (settings.arguments == null) { - return MaterialPageRoute( - builder: (context) => FirstTestScreen( - onClick: () {}, - ), - ); - } else { - return MaterialPageRoute( - builder: (context) => FirstTestScreen( - onClick: () {}, - arguments: settings.arguments! as String, - ), - ); - } - } - if (settings.name == '/third-screen') { - if (settings.arguments == null) { - return MaterialPageRoute(builder: (context) => const ThirdTestScreen()); - } else { - return MaterialPageRoute( - builder: (context) => ThirdTestScreen( - arguments: settings.arguments! as String, - ), - ); - } - } - return MaterialPageRoute( - builder: (context) => FirstTestScreen( - onClick: () {}, - ), - ); -} - -class HomeApp extends StatefulWidget { - const HomeApp({ - super.key, - required this.onClick, - required this.navigateorKey, - }); - final GlobalKey navigateorKey; - final VoidCallback onClick; - - @override - State createState() => _HomeAppState(); -} - -class _HomeAppState extends State { - @override - Widget build(BuildContext context) { - return MaterialApp( - navigatorKey: widget.navigateorKey, - initialRoute: '/', - onGenerateRoute: _onGenerateTestRoute, - home: FirstTestScreen( - onClick: () { - widget.onClick(); - }, - ), - ); - } -} - -class HomeApp2 extends StatefulWidget { - const HomeApp2({ - super.key, - required this.onClick, - required this.navigateorKey, - }); - final GlobalKey navigateorKey; - final VoidCallback onClick; - - @override - State createState() => _HomeAppState2(); -} - -class _HomeAppState2 extends State { - @override - Widget build(BuildContext context) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: widget.navigateorKey, - initialRoute: '/', - onGenerateRoute: _onGenerateTestRoute, - home: FirstTestScreen( - onClick: () { - widget.onClick(); - }, - ), - ); - } -} - -class FirstTestScreen extends StatefulWidget { - const FirstTestScreen({super.key, required this.onClick, this.arguments}); - final VoidCallback onClick; - final String? arguments; - - @override - State createState() => _FirstScrenState(); -} - -class _FirstScrenState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - Center( - child: ElevatedButton( - child: const Text('Button'), - onPressed: () { - widget.onClick(); - }, - ), - ), - const Text('First Screen'), - Center( - child: Text(widget.arguments == null ? 'null' : widget.arguments!), - ), - ], - ), - ); - } -} - -class SecondTestScreen extends StatefulWidget { - const SecondTestScreen({super.key, this.arguments, this.onclick}); - final String? arguments; - final VoidCallback? onclick; - - @override - State createState() => _SecondTestScreenState(); -} - -class _SecondTestScreenState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - const Center(child: Text('Second Screen')), - Center( - child: Text(widget.arguments == null ? 'null' : widget.arguments!), - ), - ElevatedButton( - onPressed: () { - if (widget.onclick != null) { - widget.onclick?.call(); - } - }, - child: const Text('Button 2'), - ), - ], - ), - ); - } -} - -class ThirdTestScreen extends StatefulWidget { - const ThirdTestScreen({super.key, this.arguments}); - final String? arguments; - @override - State createState() => _ThirdTestScreenState(); -} - -class _ThirdTestScreenState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - const Text('Third Screen'), - Center( - child: Text(widget.arguments == null ? 'null' : widget.arguments!), - ), - ], - ), - ); - } -} - -class TalawaErrorWidget extends StatelessWidget { - const TalawaErrorWidget({ - super.key, - required this.navigationService, - required this.onClick, - }); - final NavigationService navigationService; - final VoidCallback onClick; - - @override - Widget build(BuildContext context) { - return MaterialApp( - navigatorKey: navigationService.navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - onClick(); - }, - ), - ), - ); - } -} - -void main() { - SizeConfig().test(); - group('Navigation Services Tests', () { - late NavigationService navigationService; - late GlobalKey mockKey; - setUp(() { - navigationService = NavigationService(); - mockKey = navigationService.navigatorKey; - }); - testWidgets('pushScreen() test without arguments', - (WidgetTester tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await navigationService.pushScreen('/second-screen'); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('Second Screen'), findsOneWidget); - expect(find.textContaining('null'), findsOneWidget); - }); - testWidgets('pushScreen() test with arguments', (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await navigationService.pushScreen( - '/second-screen', - arguments: 'Hello Talawa', - ); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('Second Screen'), findsOneWidget); - expect(find.textContaining('Hello Talawa'), findsOneWidget); - }); - testWidgets('popAndPushScreen() test without arguments', (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed('/second-screen'); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - final initialPageLength = mockKey.currentState!.widget.pages.length; - navigationService.popAndPushScreen('/first-screen'); - await tester.pumpAndSettle(); - final finalPageLength = mockKey.currentState!.widget.pages.length; - expect(find.textContaining('null'), findsOneWidget); - expect(find.textContaining('First Screen'), findsOneWidget); - expect(finalPageLength, initialPageLength); - }); - testWidgets('popAndPushScreen() test with arguments', (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed('/second-screen'); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - final initialPageLength = mockKey.currentState!.widget.pages.length; - navigationService.popAndPushScreen( - '/first-screen', - arguments: 'Hello Talawa', - ); - await tester.pumpAndSettle(); - final finalPageLength = mockKey.currentState!.widget.pages.length; - expect(find.textContaining('Hello Talawa'), findsOneWidget); - expect(find.textContaining('First Screen'), findsOneWidget); - expect(finalPageLength, initialPageLength); - }); - testWidgets('pushReplacementScreen() test without arguments', - (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed( - '/second-screen', - arguments: mockKey.currentState!.pushNamed('/first-screen'), - ); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - navigationService.pushReplacementScreen('/first-screen'); - await tester.pumpAndSettle(); - expect(find.textContaining('null'), findsOneWidget); - expect(find.textContaining('First Screen'), findsOneWidget); - }); - testWidgets('pushReplacementScreen() test with arguments', (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed( - '/second-screen', - arguments: mockKey.currentState!.pushNamed('/first-screen'), - ); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - navigationService.pushReplacementScreen( - '/first-screen', - arguments: 'Hello Talawa', - ); - await tester.pumpAndSettle(); - expect(find.textContaining('Hello Talawa'), findsOneWidget); - expect(find.textContaining('First Screen'), findsOneWidget); - }); - testWidgets('removeAllAndPush() test without arguments', (tester) async { - void functionToTest() { - navigationService.removeAllAndPush( - '/third-screen', - '/second-screen', - ); - } - - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed( - '/second-screen', - arguments: functionToTest, - ); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('null'), findsOneWidget); - expect(find.textContaining('Third Screen'), findsOneWidget); - expect(mockKey.currentState!.widget.pages.length, 0); - }); - testWidgets('removeAllAndPush() test with arguments', (tester) async { - void functionToTest() { - navigationService.removeAllAndPush( - '/third-screen', - '/second-screen', - arguments: 'Hello Talawa', - ); - } - - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () async { - await mockKey.currentState!.pushNamed( - '/second-screen', - arguments: functionToTest, - ); - }, - ), - ); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('Hello Talawa'), findsOneWidget); - expect(find.textContaining('Third Screen'), findsOneWidget); - expect(mockKey.currentState!.widget.pages.length, 0); - }); - testWidgets('pushDialog() test', (tester) async { - Widget testDialog() { - return const AlertDialog( - title: Text('Test Dialog'), - content: Text('This is a test dialog.'), - ); - } - - void functionForOnClick() { - navigationService.pushDialog(testDialog()); - } - - await tester.pumpWidget( - HomeApp(navigateorKey: mockKey, onClick: functionForOnClick), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.byWidget(testDialog()), findsOneWidget); - await tester.tap(find.byType(FirstTestScreen), warnIfMissed: false); - await tester.pumpAndSettle(); - expect(find.byWidget(testDialog()), findsOneWidget); - }); - testWidgets('showSnackBar() test with default duration', (tester) async { - await tester.pumpWidget( - HomeApp2( - navigateorKey: mockKey, - onClick: () { - navigationService.showSnackBar('Hello Talawa'); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('Hello Talawa'), findsOneWidget); - final snackBarFinder = find.byType(SnackBar); - final snackBarWidget = tester.widget(snackBarFinder); - expect(snackBarWidget.behavior, equals(SnackBarBehavior.floating)); - expect(snackBarWidget.duration, equals(const Duration(seconds: 2))); - }); - testWidgets('showSnackBar() test with custom duration', (tester) async { - await tester.pumpWidget( - HomeApp2( - navigateorKey: mockKey, - onClick: () { - navigationService.showSnackBar( - 'Hello Talawa', - duration: const Duration(seconds: 3), - ); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(find.textContaining('Hello Talawa'), findsOneWidget); - final snackBarFinder = find.byType(SnackBar); - final snackBarWidget = tester.widget(snackBarFinder); - expect(snackBarWidget.behavior, equals(SnackBarBehavior.floating)); - expect(snackBarWidget.duration, equals(const Duration(seconds: 3))); - }); - testWidgets('showTalawaErrorSnackBar() test with default duration', - (tester) async { - await tester.pumpWidget( - TalawaErrorWidget( - navigationService: navigationService, - onClick: () { - navigationService.showTalawaErrorSnackBar( - 'Error Message', - MessageType.error, - ); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(TextButton)); - await tester.pumpAndSettle(); - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - final snackBarFinder = find.byType(SnackBar); - final snackBarWidget = tester.widget(snackBarFinder); - expect( - snackBarWidget.duration, - equals(const Duration(milliseconds: 1040)), - ); - expect( - snackBarWidget.backgroundColor, - const Color.fromRGBO(65, 65, 66, 1), - ); - }); - testWidgets('showTalawaErrorSnackBar() test with custom duration', - (tester) async { - await tester.pumpWidget( - TalawaErrorWidget( - navigationService: navigationService, - onClick: () { - navigationService.showTalawaErrorSnackBar( - 'Error Message', - MessageType.error, - ); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(TextButton)); - await tester.pumpAndSettle(); - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - final snackBarFinder = find.byType(SnackBar); - final snackBarWidget = tester.widget(snackBarFinder); - expect( - snackBarWidget.duration, - equals(const Duration(milliseconds: 1040)), - ); - expect( - snackBarWidget.backgroundColor, - const Color.fromRGBO(65, 65, 66, 1), - ); - }); - testWidgets('showTalawaErrorDialog() test with custom duration', - (tester) async { - await tester.pumpWidget( - TalawaErrorWidget( - navigationService: navigationService, - onClick: () { - navigationService.showTalawaErrorDialog( - 'Hello Talawa', - MessageType.error, - ); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(TextButton)); - await tester.pumpAndSettle(); - expect(find.byType(TalawaErrorDialog), findsOneWidget); - await tester.tap(find.byType(TalawaErrorWidget), warnIfMissed: false); - await tester.pumpAndSettle(); - expect(find.byType(TalawaErrorDialog), findsOneWidget); - }); - testWidgets('pop() method test', (tester) async { - await tester.pumpWidget( - HomeApp( - navigateorKey: mockKey, - onClick: () { - navigationService.pop(); - }, - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byType(ElevatedButton)); - await tester.pumpAndSettle(); - expect(mockKey.currentState!.canPop(), false); - }); - }); -} diff --git a/test/service_tests/org_service_test.dart b/test/service_tests/org_service_test.dart deleted file mode 100644 index 736e6cd77..000000000 --- a/test/service_tests/org_service_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/org_service.dart'; - -import '../helpers/test_helpers.dart'; - -/// Tests org_service.dart. -void main() { - registerServices(); - - group('Test OrganizationService', () { - final OrganizationService organizationService = OrganizationService(); - final dbFunctions = locator(); - - test('Test getOrgMembersList', () async { - const String orgId = '123'; - const String query = ''' - query{ - organizations(id: "$orgId"){ - image - _id - name - admins{ - _id - } - description - userRegistrationRequired - creator{ - _id - firstName - lastName - } - members{ - _id - firstName - lastName - image - } - } - } - '''; - - final List> userJsonList = [ - { - '_id': 'user_id_1', - 'accessToken': ' ', - 'refreshToken': ' ', - 'firstName': 'Some', - 'lastName': 'Name', - }, - { - '_id': 'user_id_2', - 'accessToken': ' ', - 'refreshToken': ' ', - 'firstName': 'Name', - 'lastName': 'Some', - }, - ]; - - final QueryResult queryResult = QueryResult.internal( - parserFn: (map) => '123', - source: null, - data: { - 'organizations': [ - { - 'members': userJsonList, - }, - ], - }, - ); - when(dbFunctions.gqlAuthMutation(query)) - .thenAnswer((realInvocation) async => queryResult); - - final result = await organizationService.getOrgMembersList(orgId); - - expect(result.length, 2); - for (int index = 0; index < result.length; index++) { - final User user = User.fromJson(userJsonList[index], fromOrg: true); - - expect(result[index].id, user.id); - expect(result[index].authToken, user.authToken); - expect(result[index].refreshToken, user.refreshToken); - expect(result[index].firstName, user.firstName); - expect(result[index].lastName, user.lastName); - } - }); - }); -} diff --git a/test/service_tests/post_service_test.dart b/test/service_tests/post_service_test.dart deleted file mode 100644 index 988100c36..000000000 --- a/test/service_tests/post_service_test.dart +++ /dev/null @@ -1,491 +0,0 @@ -import 'dart:async'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/post_queries.dart'; - -import '../helpers/test_helpers.dart'; - -/// Tests post_service.dart. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - setUp(() { - registerServices(); - }); - final demoJson = { - '__typename': 'Query', - 'organizations': [ - { - '__typename': 'Organization', - 'posts': { - '__typename': 'PostsConnection', - 'edges': [ - { - '__typename': 'PostEdge', - 'node': { - '__typename': 'Post', - '_id': '65e1aac38836aa003e4b8318', - 'title': 'testing', - 'text': 'test post', - 'imageUrl': - 'http://10.0.2.2:4000/images/5vFxR-8xE2GD-5Tu3E1QYimage.png', - 'videoUrl': null, - 'creator': { - '__typename': 'User', - '_id': '65378abd85008f171cf2990d', - 'firstName': 'Vyvyan', - 'lastName': 'Kerry', - 'email': 'testadmin1@example.com', - }, - 'createdAt': '2024-03-01T10:15:31.168Z', - 'likeCount': 0, - 'commentCount': 0, - 'likedBy': [], - 'comments': [], - 'pinned': true, - }, - 'cursor': '65e1aac38836aa003e4b8318', - }, - { - '__typename': 'PostEdge', - 'node': { - '__typename': 'Post', - '_id': '6589bdd92caa9d8d69087515', - 'title': 'Winter Wonderland: Ice Skating Extravaganza', - 'text': - 'Gliding gracefully on frozen lakes, surrounded by enchanting winter landscape—ice skating extravaganza, a dance in a winter wonderland.', - 'imageUrl': null, - 'videoUrl': null, - 'creator': { - '__typename': 'User', - '_id': '658938ba2caa9d8d6908748a', - 'firstName': 'Peggy', - 'lastName': 'Bowers', - 'email': 'testuser11@example.com', - }, - 'createdAt': '2024-03-01T10:15:31.168Z', - 'likeCount': 0, - 'commentCount': 0, - 'likedBy': [], - 'comments': [], - }, - 'cursor': '6589bdd92caa9d8d69087515', - } - ], - 'pageInfo': { - '__typename': 'DefaultConnectionPageInfo', - 'startCursor': '65e1aac38836aa003e4b8318', - 'endCursor': '6589bd9b2caa9d8d6908750f', - 'hasNextPage': true, - 'hasPreviousPage': false, - }, - }, - } - ], - }; - final demoJsonPage2 = { - '__typename': 'Query', - 'organizations': [ - { - '__typename': 'Organization', - 'posts': { - '__typename': 'PostsConnection', - 'edges': [ - { - '__typename': 'PostEdge', - 'node': { - '__typename': 'Post', - '_id': '65e1aac38836aa003e4b8319', - 'title': 'Second Page Post 1', - 'text': 'This is the first post on the second page', - 'imageUrl': 'http://example.com/image2.jpg', - 'videoUrl': null, - 'creator': { - '__typename': 'User', - '_id': 'user_id_2', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'john.doe@example.com', - }, - 'createdAt': '2024-03-02T10:15:31.168Z', - 'likeCount': 5, - 'commentCount': 2, - 'likedBy': [], - 'comments': [ - {'commentId': 'comment_id_1', 'text': 'Comment 1'}, - {'commentId': 'comment_id_2', 'text': 'Comment 2'}, - ], - 'pinned': false, - }, - 'cursor': '65e1aac38836aa003e4b8319', - }, - { - '__typename': 'PostEdge', - 'node': { - '__typename': 'Post', - '_id': '65e1aac38836aa003e4b8320', - 'title': 'Second Page Post 2', - 'text': 'This is the second post on the second page', - 'imageUrl': 'http://example.com/image3.jpg', - 'videoUrl': null, - 'creator': { - '__typename': 'User', - '_id': 'user_id_3', - 'firstName': 'Jane', - 'lastName': 'Doe', - 'email': 'jane.doe@example.com', - }, - 'createdAt': '2024-03-02T10:30:00.000Z', - 'likeCount': 10, - 'commentCount': 3, - 'likedBy': [], - 'comments': [ - {'commentId': 'comment_id_3', 'text': 'Comment 3'}, - {'commentId': 'comment_id_4', 'text': 'Comment 4'}, - {'commentId': 'comment_id_5', 'text': 'Comment 5'}, - ], - 'pinned': false, - }, - 'cursor': '65e1aac38836aa003e4b8320', - }, - // Add more posts as needed - ], - 'pageInfo': { - '__typename': 'DefaultConnectionPageInfo', - 'startCursor': '65e1aac38836aa003e4b8319', - 'endCursor': '65e1aac38836aa003e4b8320', - 'hasNextPage': false, - 'hasPreviousPage': true, - }, - }, - } - ], - }; - - //Fake CurrentOrgID - const currentOrgID = 'XYZ'; - //Fake PostID - const postID = '65e1aac38836aa003e4b8318'; - - group('Test PostService', () { - test('Test refreshFeed method', () async { - final service = PostService(); - // Populating refreshing feed - await service.refreshFeed(); - verify(service.getPosts()).called(2); - }); - - test('Test addNewPost method', () async { - final dataBaseMutationFunctions = locator(); - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - await service.getPosts(); - service.addNewpost(Post(sId: '1', creator: User())); - - final List posts = await service.postStream.first; - expect(posts.length, 3); - }); - test('Test getPosts Method', () async { - final dataBaseMutationFunctions = locator(); - //Setting up Demo data to be returned - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - await service.getPosts(); - //Fetching Post Stream - final List posts = await service.postStream.first; - //Testing if Two Mock posts got added - expect(posts.length, 2); - }); - - test('Test addLike Method', () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - //Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - //Populating posts Stream - await service.getPosts(); - //Calling AddLike - await service.addLike(postID); - //Fetching Post Stream - final List posts = await service.postStream.first; - //Finding The Post which is supposed to be Liked - final Post likedPost = - posts.firstWhere((element) => element.sId == postID); - //Testing if the post got liked - expect(likedPost.likedBy!.length, 1); - }); - - test('Test removeLike Method', () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - //Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - //Populating posts Stream - await service.getPosts(); - //Liking Post which is to be Unliked - await service.addLike(postID); - //Unliking Post - await service.removeLike(postID); - //Fetching Post Stream - final List posts = await service.postStream.first; - //Finding The Post which is supposed to be Unliked - final Post likedPost = - posts.firstWhere((element) => element.sId == postID); - //Testing if the post got unliked - expect(likedPost.likedBy!.length, 0); - }); - - test('Test addCommentLocally Method', () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - //Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - //Populating posts Stream - await service.getPosts(); - //Adding Comment to a Post - service.addCommentLocally(postID); - //Fetching Post Stream - final List posts = await service.postStream.first; - //Finding The Post which is supposed to be commented - final Post commentedPost = - posts.firstWhere((element) => element.sId == postID); - //Testing if the post got a comment - expect(commentedPost.comments!.length, 1); - }); - test('Test updatedPostStream Stream', () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - // Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - // Populating posts Stream - await service.getPosts(); - - // Listen to updatedPostStream and collect emitted values - final List updatedPosts = []; - final subscription = service.updatedPostStream.listen((post) { - updatedPosts.add(post); - }); - - // Trigger an event that should update the post - await service.addLike(postID); - - // Wait for the stream to emit values - await Future.delayed( - const Duration(seconds: 1), - ); // Adjust the delay as needed - - // Verify that the correct post was emitted - expect(updatedPosts.length, 1); - expect(updatedPosts[0].sId, postID); - // Cancel the subscription to avoid memory leaks - await subscription.cancel(); - }); - test( - 'Test setOrgStreamSubscription method after the organization is updated', - () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - // Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - // Populating posts Stream - await service.getPosts(); - - // Set up mock for currentOrgInfoStream - final mockUserConfig = locator(); - final orgInfoStreamController = StreamController(); - when(mockUserConfig.currentOrgInfoStream) - .thenAnswer((_) => orgInfoStreamController.stream); - - // Call setOrgStreamSubscription - service.setOrgStreamSubscription(); - - // Trigger an event that should update the organization - orgInfoStreamController.add(OrgInfo(id: 'newOrgId')); - - // Wait for the setOrgStreamSubscription logic to execute - await Future.delayed( - const Duration(seconds: 1), - ); // Adjust the delay as needed - - // Verify that refresh token was called to check getPost method was called correctly. - verify(service.getPosts()).called(1); - - // Close the stream controller to avoid memory leaks - await orgInfoStreamController.close(); - }); - test("Test the nextPage and previous page funcitonality", () async { - final dataBaseMutationFunctions = locator(); - - final query = - PostQueries().getPostsById(currentOrgID, null, null, 5, null); - // Mocking GetPosts - when( - dataBaseMutationFunctions.gqlAuthQuery( - query, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query)), - data: demoJson, - source: QueryResultSource.network, - ), - ); - final query2 = PostQueries().getPostsById( - currentOrgID, - "6589bd9b2caa9d8d6908750f", - null, - 5, - null, - ); - when( - dataBaseMutationFunctions.gqlAuthQuery( - query2, - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions(document: gql(query2)), - data: demoJsonPage2, - source: QueryResultSource.network, - ), - ); - - final service = PostService(); - // Populating posts Stream - await service.getPosts(); - //Fetching next posts - await service.nextPage(); - expect(service.after, "6589bd9b2caa9d8d6908750f"); - expect(service.first, 5); - expect(service.before, null); - expect(service.last, null); - verify(service.getPosts()).called(1); - - await service.previousPage(); - expect(service.after, null); - expect(service.last, 5); - expect(service.before, "65e1aac38836aa003e4b8319"); - expect(service.first, null); - verify(service.getPosts()).called(1); - }); - }); -} diff --git a/test/service_tests/session_manager_test.dart b/test/service_tests/session_manager_test.dart deleted file mode 100644 index 1834c561c..000000000 --- a/test/service_tests/session_manager_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -import 'package:fake_async/fake_async.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/session_manager.dart'; - -import '../helpers/test_helpers.dart'; - -void main() { - setupLocator(); - group('Test Session Manger', () { - setUpAll(() { - getAndRegisterDatabaseMutationFunctions(); - }); - test('Test Session Manager Constructor', () { - SessionManager(); - }); - - test('initialize refresh interval', () { - userConfig.currentUser = User( - id: "99", - firstName: 'Azad', - refreshToken: 'refreshToken', - ); - fakeAsync((async) { - sessionManager.initializeSessionRefresher(); - async.elapse(const Duration(seconds: 600)); - }); - }); - - test('Refresh Interval is set.', () { - expect(sessionManager.refreshInterval, 600); - }); - - test('Refresh Token Method', () { - sessionManager.refreshSession(); - verify(databaseFunctions.refreshAccessToken("refreshToken")); - }); - }); -} diff --git a/test/service_tests/size_config_test.dart b/test/service_tests/size_config_test.dart deleted file mode 100644 index c9f674ebd..000000000 --- a/test/service_tests/size_config_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/size_config.dart'; - -void main() { - late double safeAreaHorizontal; - late double safeAreaVertical; - const MediaQueryData mediaQueryData = MediaQueryData( - size: Size(360, 684), - padding: EdgeInsets.zero, - ); - - group( - 'Test SizeConfig', - () { - testWidgets('Test init method', (WidgetTester tester) async { - await tester.pumpWidget( - MediaQuery( - data: mediaQueryData, - child: Builder( - builder: (BuildContext context) { - final config = SizeConfig(); - config.init(context); - safeAreaHorizontal = - mediaQueryData.padding.left + mediaQueryData.padding.right; - safeAreaVertical = - mediaQueryData.padding.top + mediaQueryData.padding.bottom; - expect(SizeConfig.screenWidth, mediaQueryData.size.width); - expect(SizeConfig.screenHeight, mediaQueryData.size.height); - expect( - SizeConfig.blockSizeHorizontal, - SizeConfig.screenWidth! / 100, - ); - expect( - SizeConfig.blockSizeVertical, - SizeConfig.screenHeight! / 100, - ); - expect( - SizeConfig.safeBlockHorizontal, - (SizeConfig.screenWidth! - safeAreaHorizontal) / 100, - ); - expect( - SizeConfig.safeBlockVertical, - (SizeConfig.screenHeight! - safeAreaVertical) / 100, - ); - - return const Placeholder(); - }, - ), - ), - ); - }); - - test('Test test method', () async { - final config = SizeConfig(); - config.test(); - safeAreaHorizontal = - mediaQueryData.padding.left + mediaQueryData.padding.right; - safeAreaVertical = - mediaQueryData.padding.top + mediaQueryData.padding.bottom; - expect(SizeConfig.screenWidth, mediaQueryData.size.width); - expect(SizeConfig.screenHeight, mediaQueryData.size.height); - expect(SizeConfig.blockSizeHorizontal, SizeConfig.screenWidth! / 100); - expect(SizeConfig.blockSizeVertical, SizeConfig.screenHeight! / 100); - expect( - SizeConfig.safeBlockHorizontal, - (SizeConfig.screenWidth! - safeAreaHorizontal) / 100, - ); - expect( - SizeConfig.safeBlockVertical, - (SizeConfig.screenHeight! - safeAreaVertical) / 100, - ); - }); - }, - ); -} diff --git a/test/service_tests/user_config_test.dart b/test/service_tests/user_config_test.dart deleted file mode 100644 index 74575c598..000000000 --- a/test/service_tests/user_config_test.dart +++ /dev/null @@ -1,307 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/session_manager.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -class MockBox extends Mock implements Box {} - -// class MockUser extends Mock implements User { -// @override -// void updateJoinedOrg(List orgList) { -// // TODO: implement updateJoinedOrg -// } - -// @override -// void updateMemberRequestOrg(List orgList) { -// // TODO: implement updateMemberRequestOrg -// } -// } - -class MockSessionManger extends Mock implements SessionManager { - @override - Future refreshSession() { - // TODO: implement refreshSession - return Future.value(true); - } -} - -void main() async { - testSetupLocator(); - - final Directory dir = Directory('test/fixtures/core'); - - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - final userBox = await Hive.openBox('currentUser'); - final urlBox = await Hive.openBox('url'); - final orgBox = await Hive.openBox('currentOrg'); - - getAndRegisterSessionManager(); - - final mockUser = User( - adminFor: [ - OrgInfo(id: 'org1', name: 'orga'), - OrgInfo(id: 'org2', name: 'orgb'), - ], - createdOrganizations: [ - OrgInfo(id: 'org1', name: 'orga'), - OrgInfo(id: 'org2', name: 'orgb'), - ], - email: 'test@gmail.com', - firstName: 'user', - lastName: 'one', - image: 'sample.jpg', - joinedOrganizations: [ - OrgInfo(id: 'org1', name: 'orga'), - OrgInfo(id: 'org2', name: 'orgb'), - ], - authToken: 'AuthToken', - refreshToken: 'Refreshtoken', - membershipRequests: [ - OrgInfo(id: 'org1', name: 'orga'), - OrgInfo(id: 'org2', name: 'orgb'), - ], - ); - - final mockOrgDetails = [ - OrgInfo(id: 'org3', name: 'orgc'), - OrgInfo(id: 'org4', name: 'orgd'), - ]; - - group('Test UserConfig service', () { - setUpAll(() { - registerServices(); - }); - - test('Test for getters & setters.', () { - final model = UserConfig(); - - // model.currentOrgInfoController - expect(model.currentOrgInfoController, isA>()); - - // model.currentOrgName - expect(model.currentOrgName, isA()); - - // model.currenOrg (setter) - model.currentOrg = OrgInfo(name: 'org'); - - // print(model.currentOrgInfoController); - }); - - test('Test for userLoggedIn method.', () async { - final model = UserConfig(); - model.currentUser.id = 'fake_id'; - - userBox.put('user', User(id: 'fake', firstName: 'first')); - - final Map data = { - 'users': [ - { - "user": { - "id": "1234567890", - "firstName": "ravidi", - "lastName": "sheikh", - "email": "ravidisheikh@test.com", - "image": "https://testimg.com", - "accessToken": "randomAccessToken", - "authToken": "randomAuthToken", - "refreshToken": "randomRefreshToken", - }, - 'appUserProfile': { - 'createdOrganizations': [ - { - "name": 'test_org', - "image": 'https://testimg.com', - } - ], - "adminFor": [ - { - "name": 'test_org1', - "image": 'https://testimg.com', - } - ], - }, - } - ], - }; - - when( - databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: anyNamed('variables'), - ), - ).thenAnswer((_) async { - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.fetchUserInfo)), - ); - }); - - // if there is _currentUser. - bool loggedIn = await model.userLoggedIn(); - expect(loggedIn, true); - - userBox.delete('user'); - - // if there is no _currentUser. - loggedIn = await model.userLoggedIn(); - expect(loggedIn, false); - - // print(model.currentUser); - }); - - test('test user loggedin when result throws an exception', () async { - final model = UserConfig(); - - when( - databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: anyNamed('variables'), - ), - ).thenAnswer((_) async { - throw Exception('Simulated Exception.'); - }); - - // show couldn't update errorsnackbar. - final loggedIn = await model.userLoggedIn(); - expect(loggedIn, true); - }); - - test('Test for User log out method.', () async { - databaseFunctions.init(); - - when(databaseFunctions.gqlAuthMutation(queries.logout())) - .thenAnswer((realInvocation) async { - final data = { - 'logout': true, - }; - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.logout())), - ); - }); - - when(navigationService.pop()).thenAnswer((_) async {}); - when( - navigationService.pushDialog( - const CustomProgressDialog( - key: Key('LogoutProgress'), - ), - ), - ).thenAnswer((realInvocation) async {}); - - bool loggedOut = await UserConfig().userLogOut(); - - expect(loggedOut, true); - - expect(userBox.isEmpty, true); - expect(urlBox.isEmpty, true); - expect(orgBox.isEmpty, true); - - when(databaseFunctions.gqlAuthMutation(queries.logout())) - .thenAnswer((realInvocation) async { - throw Exception('test exception'); - }); - - loggedOut = await UserConfig().userLogOut(); - expect(loggedOut, false); - }); - - test('Test for updateUserJoinedOrg method', () async { - final model = UserConfig(); - model.currentUser = mockUser; - - await model.updateUserJoinedOrg(mockOrgDetails); - - expect(mockUser.joinedOrganizations, mockOrgDetails); - }); - - test('Test for updateUserCreatedOrg method', () async { - final model = UserConfig(); - model.currentUser = mockUser; - - await model.updateUserCreatedOrg(mockOrgDetails); - - expect(mockUser.createdOrganizations, mockOrgDetails); - }); - - test('Test for updateUserMemberRequestOrg method', () async { - final model = UserConfig(); - model.currentUser = mockUser; - final expected = [...mockUser.membershipRequests!, ...mockOrgDetails]; - await model.updateUserMemberRequestOrg(mockOrgDetails); - - expect(mockUser.membershipRequests, expected); - }); - - test('Test for updateUserAdminOrg method', () async { - final model = UserConfig(); - model.currentUser = mockUser; - - await model.updateUserAdminOrg(mockOrgDetails); - - expect(mockUser.adminFor, mockOrgDetails); - }); - - test('Test for updateAccessToken method.', () async { - final model = UserConfig(); - model.currentUser = mockUser; - const newAuthToken = 'newAccessToken'; - const newRefreshToken = 'newRefreshToken'; - - await model.updateAccessToken( - accessToken: newAuthToken, - refreshToken: newRefreshToken, - ); - - expect(mockUser.authToken, newAuthToken); - expect(mockUser.refreshToken, newRefreshToken); - }); - - test('Test for saveCurrentOrgInHive method.', () async { - final model = UserConfig(); - model.currentUser = mockUser; - - // To test the box.get('org') != null condition. - orgBox.put('org', OrgInfo(id: 'fakeId', name: 'org')); - model.saveCurrentOrgInHive(mockOrgDetails[0]); - - // To test the box.get('org') == null condition. - orgBox.delete('org'); - model.saveCurrentOrgInHive(mockOrgDetails[0]); - }); - - test('Test for updateUser method.', () async { - final model = UserConfig(); - - when(databaseFunctions.init()).thenAnswer((_) { - throw Exception('simulated exception.'); - }); - - final updated = await model.updateUser(User(id: 'sampleId')); - - // user updation failed. - expect(!updated, true); - }); - }); -} diff --git a/test/utils/app_localization_test.dart b/test/utils/app_localization_test.dart deleted file mode 100644 index 6a49121b3..000000000 --- a/test/utils/app_localization_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// ignore_for_file: talawa_api_doc - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/app_localization.dart'; - -void main() { - group("Test for App Localization Class", () { - WidgetsFlutterBinding.ensureInitialized(); - - test("Load JSON File for localizations", () async { - final appLocalizations = AppLocalizations(const Locale('en')); - final result = await appLocalizations.load(); - expect(result, true); - }); - - test("Test mode working properly", () async { - final appLocalizations = - AppLocalizations(const Locale('hi'), isTest: true); - final result = await appLocalizations.load(); - expect(result, true); - - // expect(appLocalizations.strictTranslate("Recover"), "Recover"); - }); - - test("Translate and strict translate", () async { - final appLocalizations = AppLocalizations(const Locale('en')); - final result = await appLocalizations.load(); - expect(result, true); - - // Translate known value - const key = "Please verify URL first"; - const trueData = "Please verify URL first"; - final checkData = appLocalizations.translate(key); - expect(checkData, trueData); - - // Translate unknown value - const key2 = "Lorem ipsum"; - expect(appLocalizations.translate(key2), null); - - // Translate null value - expect(appLocalizations.translate(null), "..."); - - //Strict translate known value - expect(appLocalizations.strictTranslate("Liked by"), "Liked by"); - - // Strict translate unknown value - expect(appLocalizations.strictTranslate(key2), key2); - }); - }); - - group("Test for App Localization Delegate", () { - WidgetsFlutterBinding.ensureInitialized(); - const appLocalizationsDelgate = AppLocalizationsDelegate(); - - test("Language is supported or not", () { - // A supported language - expect(appLocalizationsDelgate.isSupported(const Locale('hi')), true); - - // An unsupported language - expect(appLocalizationsDelgate.isSupported(const Locale('or')), false); - }); - - test("Localization loaded and changed properly", () async { - var testAppLocalization = - await appLocalizationsDelgate.load(const Locale('hi')); - - // In test mode - testAppLocalization.isTest = true; - expect(testAppLocalization.strictTranslate("Recover"), "Recover"); - - // In prod mode - testAppLocalization.isTest = false; - expect(testAppLocalization.strictTranslate("Recover"), "रिकवर कर लेंगे"); - - testAppLocalization = - await appLocalizationsDelgate.load(const Locale('fr')); - - // In test mode - testAppLocalization.isTest = true; - expect(testAppLocalization.strictTranslate("Recover"), "Recover"); - - // In prod mode - testAppLocalization.isTest = false; - expect(testAppLocalization.strictTranslate("Recover"), "votre mot"); - }); - - test("App Localization Delegate should not reload", () async { - expect( - appLocalizationsDelgate.shouldReload(appLocalizationsDelgate), - false, - ); - }); - }); -} diff --git a/test/utils/comment_queries_test.dart b/test/utils/comment_queries_test.dart deleted file mode 100644 index d9b34b9b7..000000000 --- a/test/utils/comment_queries_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/comment_queries.dart'; - -void main() { - group("Tests for comment_queries.dart", () { - test("Check if getPostsComments works correctly", () { - const data = """ - query { - post(id: "abc") - { _id, - comments{ - _id, - text, - createdAt - creator{ - firstName - lastName - } - } - } - } -"""; - final fnData = CommentQueries().getPostsComments("abc"); - expect(fnData, data); - }); - - test("Check if createComment works correctly", () { - const data = """ - mutation createComment(\$postId: ID!, \$text: String!) { - createComment(postId: \$postId, - data:{ - text: \$text, - } - ){ - _id - } - } - """; - final fnData = CommentQueries().createComment(); - expect(fnData, data); - }); - }); -} diff --git a/test/utils/encryptor_test.dart b/test/utils/encryptor_test.dart deleted file mode 100644 index 4c311a665..000000000 --- a/test/utils/encryptor_test.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'dart:convert'; -import 'dart:typed_data'; - -import 'package:crypto/crypto.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:pointycastle/api.dart' as pointy; -import 'package:pointycastle/asymmetric/oaep.dart'; -import 'package:pointycastle/asymmetric/rsa.dart'; -import 'package:pointycastle/pointycastle.dart'; -import 'package:talawa/models/asymetric_keys/asymetric_keys.dart'; -import 'package:talawa/utils/encryptor.dart'; -import '../helpers/setup_hive.mocks.dart'; - -// This test is being written believing that in future when Encryptor class will get rid of shouldEncrypt variable then all the tests using that variable can be removed -void main() { - group('When shouldEncrypt is true', () { - test('encryptString method should return the encrypted string', () { - Encryptor.shouldEncrypt = true; - const String inputString = 'password123'; - final String outputString = - sha256.convert(utf8.encode(inputString)).toString(); - expect(Encryptor.encryptString(inputString), outputString); - }); - }); -// As the bool variable is not used anywhere except in this method so moving ahead with making this variable as false -// On getting rid of this variable the above test can be removed - group('When shouldEncrypt is false', () { - late Encryptor encryptor; - late AsymmetricKeyPair keyPair; - late pointy.PublicKey publicKey; - late MockHiveInterface mockHiveInterface; - late MockBox mockHiveBox; - setUpAll(() { - encryptor = Encryptor(); - Encryptor.shouldEncrypt = false; - keyPair = encryptor.generateRSAKeyPair(); - publicKey = keyPair.publicKey; - mockHiveInterface = MockHiveInterface(); - mockHiveBox = MockBox(); - }); - test('encryptString method should return the same string', () { - const String inputString = 'password123'; - expect(Encryptor.encryptString(inputString), inputString); - }); - test( - 'Correct security options are added while generating keys from generateRSAKeyPair method', - () { - expect(publicKey, isA()); - final RSAPublicKey key = publicKey as RSAPublicKey; - expect(key.publicExponent, BigInt.parse('65537')); - expect(key.modulus!.bitLength, 2048); - }); - test( - 'Checking whether Box Names and Key Names are appropriate for Hive or not', - () async { - when(mockHiveInterface.openBox('user_keys')) - .thenAnswer((realInvocation) async { - return mockHiveBox; - }); - await encryptor.saveKeyPair(keyPair, mockHiveInterface); - verify(mockHiveInterface.openBox('user_keys')); - verify(mockHiveBox.put('key_pair', any)); - }); - test('For loadPairKey()', () async { - when(mockHiveInterface.openBox('user_keys')) - .thenAnswer((realInvocation) async { - return mockHiveBox; - }); - when(mockHiveBox.get('key_pair')) - .thenAnswer((realInvocation) => AsymetricKeys(keyPair: keyPair)); - await encryptor.loadKeyPair(mockHiveInterface); - verify(mockHiveBox.get('key_pair')); - }); - test( - 'For checking whether the data is properly encrypted through RSA by assymetricEncryptString()', - () { - const String data = 'Hello Talawa'; - final output = encryptor.assymetricEncryptString( - data, - keyPair.publicKey as RSAPublicKey, - ); - final cipher = OAEPEncoding(RSAEngine()) - ..init(false, PrivateKeyParameter(keyPair.privateKey)); - final decryptedBytes = cipher.process(base64Decode(output)); - expect(String.fromCharCodes(decryptedBytes), data); - }); - test( - 'For checking whether the data is getting decrypted properly through assymetricDecryptString()', - () { - const String data = 'Hello Talawa'; - final cipher = OAEPEncoding(RSAEngine()) - ..init(true, PublicKeyParameter(keyPair.publicKey)); - final encryptedBytes = cipher.process(Uint8List.fromList(data.codeUnits)); - final output = encryptor.assymetricDecryptString( - base64Encode(encryptedBytes), - keyPair.privateKey as RSAPrivateKey, - ); - expect(output, data); - }); - test('Test for wrong message sent to receiveMessage()', () { - const Map message = {"message": "Hello Talawa"}; - expect( - encryptor.receiveMessage(message, mockHiveInterface), - throwsException, - ); - }); - test('Unencrypted message sent to receiveMessage()', () { - const Map message = {"encryptedMessage": "Hello Talawa"}; - when(mockHiveInterface.openBox('user_keys')) - .thenAnswer((realInvocation) async { - return mockHiveBox; - }); - when(mockHiveBox.get('key_pair')) - .thenAnswer((realInvocation) => AsymetricKeys(keyPair: keyPair)); - expect( - encryptor.receiveMessage(message, mockHiveInterface), - throwsException, - ); - }); - test('Encrypted Message sent to receiveMessage()', () { - const String data = 'Hello Talawa'; - final cipher = OAEPEncoding(RSAEngine()) - ..init(true, PublicKeyParameter(keyPair.publicKey)); - final encryptedBytes = cipher.process(Uint8List.fromList(data.codeUnits)); - final String encryptedMessge = base64Encode(encryptedBytes); - final Map message = { - "encryptedMessage": encryptedMessge, - }; - when(mockHiveInterface.openBox('user_keys')) - .thenAnswer((realInvocation) async { - return mockHiveBox; - }); - when(mockHiveBox.get('key_pair')) - .thenAnswer((realInvocation) => AsymetricKeys(keyPair: keyPair)); - expect(encryptor.receiveMessage(message, mockHiveInterface), completes); - }); - }); -} diff --git a/test/utils/event_queries_test.dart b/test/utils/event_queries_test.dart deleted file mode 100644 index 83342ae37..000000000 --- a/test/utils/event_queries_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/event_queries.dart'; - -void main() { - group("Tests for event_queries.dart", () { - test("Check if fetchOrgEvents works correctly", () { - const data = """ - query { - eventsByOrganizationConnection( - where: { - organization_id: "sampleID" - } - ) { - _id - organization { - _id - image - } - title - description - isPublic - isRegisterable - recurring - startDate - endDate - allDay - startTime - endTime - location - creator { - _id - firstName - lastName - } - admins { - _id - firstName - lastName - } - attendees { - _id - firstName - lastName - image - } - } - } - """; - - final fnData = EventQueries().fetchOrgEvents("sampleID"); - expect(fnData, data); - }); - - test("Check if attendeesByEvent works correctly", () { - const data = ''' - query { - getEventAttendeesByEventId(eventId: "sampleID") { - eventId - userId - isRegistered - isInvited - isCheckedIn - isCheckedOut - } - } - '''; - - final fnData = EventQueries().attendeesByEvent("sampleID"); - expect(fnData, data); - }); - - test("Check if addEvent works correctly", () { - const data = """ - mutation Mutation(\$data: EventInput!, \$recurrenceRuleData: RecurrenceRuleInput) { - createEvent(data: \$data, recurrenceRuleData: \$recurrenceRuleData) { - _id - title - description - } - } - """; - - final fnData = EventQueries().addEvent(); - expect(fnData, data); - }); - - test("Check if registerForEvent works correctly", () { - const data = """ - mutation registerForEvent(\$eventId: ID!) { - registerForEvent(id: \$eventId) { - _id - } - } - """; - - final fnData = EventQueries().registerForEvent(); - expect(fnData, data); - }); - - test("Check if deleteEvent works correctly", () { - const data = """ - mutation { - removeEvent( - id: "sampleID", - ){ - _id - } - } - """; - - final fnData = EventQueries().deleteEvent("sampleID"); - expect(fnData, data); - }); - - test("Check if updateEvent works correctly", () { - const data = """mutation updateEvent( - \$title:String!, - \$description: String!, - \$startTime: Time, - \$endTime: Time, - \$allDay: Boolean!, - \$recurring: Boolean!, - \$isPublic: Boolean!, - \$isRegisterable: Boolean!, - \$location: String, - ) { - updateEvent( - id: "sampleID" - data:{ - title: \$title, - description: \$description, - isPublic: \$isPublic, - isRegisterable: \$isRegisterable, - recurring: \$recurring, - allDay: \$allDay, - startTime: \$startTime - endTime: \$endTime - location: \$location - } - ){ - _id - title - description - } - }"""; - - final fnData = EventQueries().updateEvent(eventId: "sampleID"); - expect(fnData, data); - }); - }); -} diff --git a/test/utils/post_queries_test.dart b/test/utils/post_queries_test.dart deleted file mode 100644 index ae4ee73bb..000000000 --- a/test/utils/post_queries_test.dart +++ /dev/null @@ -1,188 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/post_queries.dart'; - -void main() { - group("Tests for post_queries.dart", () { - test("Check if getPostsById works correctly", () { - const first = 5; - const last = 5; - const data = """ - query { - organizations(id: "sampleID") { - posts(first: $first, last:$last,after: "1", before: "2") { - edges { - node { - _id - title - text - imageUrl - videoUrl - creator { - _id - firstName - lastName - email - } - createdAt - likeCount - commentCount - likedBy{ - _id - } - comments{ - _id - } - pinned - } - cursor - } - pageInfo { - startCursor - endCursor - hasNextPage - hasPreviousPage - } - totalCount - } - } - } -"""; - final fnData = PostQueries().getPostsById("sampleID", "1", "2", 5, 5); - expect(fnData, data); - }); - - test("Check if addLike works correctly", () { - const data = """ - mutation likePost(\$postID: ID!) { - likePost( id: \$postID,) - { - _id - } - } - """; - final fnData = PostQueries().addLike(); - expect(fnData, data); - }); - - test("Check if getPostById works correctly", () { - const data = """ - query { - post(id: "abc") - { - _id - text - createdAt - imageUrl - videoUrl - title - commentCount - likeCount - creator{ - _id - firstName - lastName - image - } - organization{ - _id - } - likedBy{ - _id - } - comments{ - _id, - text, - createdAt - creator{ - firstName - lastName - } - } - } - } -"""; - final fnData = PostQueries().getPostById("abc"); - expect(fnData, data); - }); - - test("Check if removeLike works correctly", () { - const data = """ - mutation unlikePost(\$postID: ID!) { - unlikePost( id: \$postID,) - { - _id - likedBy{ - _id - } - } - } - """; - final fnData = PostQueries().removeLike(); - expect(fnData, data); - }); - - test("Check if removePost works correctly", () { - const data = ''' - mutation RemovePost(\$id: ID!) { - removePost(id: \$id) { - _id - } - } - '''; - final fnData = PostQueries().removePost(); - expect(fnData, data); - }); - test("Check if uploadPost works correctly", () { - const data = ''' - mutation CreatePost( - \$text: String! - \$title: String! - \$imageUrl: URL - \$videoUrl: URL - \$organizationId: ID! - \$file: String - ) { - createPost( - data: { - text: \$text - title: \$title - imageUrl: \$imageUrl - videoUrl: \$videoUrl - organizationId: \$organizationId - } - file: \$file - ) { - _id - text - createdAt - imageUrl - videoUrl - title - commentCount - likeCount - creator{ - _id - firstName - lastName - image - } - organization{ - _id - } - likedBy{ - _id - } - comments{ - _id - } - } - } - '''; - final fnData = PostQueries().uploadPost(); - expect(fnData, data); - }); - }); -} diff --git a/test/utils_tests/chat_queries_test.dart b/test/utils_tests/chat_queries_test.dart deleted file mode 100644 index 0930af861..000000000 --- a/test/utils_tests/chat_queries_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/chat_queries.dart'; - -void main() { - group("Tests for chat_queries.dart", () { - test("Check if fetchDirectChatsByUserId works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = ChatQueries().fetchDirectChatsByUserId('Ayush'); - if (fnData.contains(''' - query { - directChatsByUserID(id: "Ayush") { - _id - users{ - _id - firstName - email - } - } - } - ''')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if fetchDirectChatMessagesByChatId works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = ChatQueries().fetchDirectChatMessagesByChatId('Ayush'); - if (fnData.contains(''' - query { - directChatsMessagesByChatID(id: "Ayush") { - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } - ''')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if messageSentToDirectChatsubscription works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = ChatQueries().messageSentToDirectChatsubscription; - if (fnData.contains(''' - subscription{ - messageSentToDirectChat{ - _id - messageContent - sender { - _id - firstName - image - } - receiver { - _id - firstName - image - } - } - } - ''')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if sendMessageToDirectChat works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = ChatQueries().sendMessageToDirectChat(); - if (fnData.contains(''' - mutation sendMessageToDirectChat( - \$chatId: ID! - \$messageContent: String! - ){ - sendMessageToDirectChat( - chatId: \$chatId - messageContent: \$messageContent - ) { - messageContent - sender{ - firstName - } - receiver{ - firstName - } - } - } - ''')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if sendMessageToDirectChat works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = ChatQueries().sendMessageToDirectChat(); - if (fnData.contains(''' - mutation sendMessageToDirectChat( - \$chatId: ID! - \$messageContent: String! - ){ - sendMessageToDirectChat( - chatId: \$chatId - messageContent: \$messageContent - ) { - messageContent - sender{ - firstName - } - receiver{ - firstName - } - } - } - ''')) { - mutation = true; - } - expect(mutation, true); - }); - }); -} diff --git a/test/utils_tests/queries_test.dart b/test/utils_tests/queries_test.dart deleted file mode 100644 index cdb43da4d..000000000 --- a/test/utils_tests/queries_test.dart +++ /dev/null @@ -1,225 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/queries.dart'; - -void main() { - group("Tests for queries.dart", () { - test("Check if registerUser works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().registerUser( - 'Ayush', - 'Chaudhary', - 'ayush@gmail.com', - 'password', - 'orgId123', - ); - if (fnData.contains('Ayush')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if loginUser works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().loginUser('ayush@gmail.com', 'password'); - if (fnData.contains('ayush@gmail.com')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if logout works correctly", () { - const mutation = false; - expect(mutation, false); - - const data = """ - mutation { - logout - } - """; - final fnData = Queries().logout(); - expect(fnData, data); - }); - test("Check if fetchJoinInOrg works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries(); - final ff = fnData.fetchJoinInOrg; - if (ff.contains('query organizationsConnection')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if newUserLanguage works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().newUserLanguage('12345'); - if (fnData.contains('12345')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if fetchJoinInOrgByName works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries(); - final ff = fnData.fetchJoinInOrgByName; - if (ff.contains('query organizationsConnection')) { - mutation = true; - } - expect(mutation, true); - }); - - test("Check if joinOrgById works correctly", () { - var mutation = false; - - expect(mutation, false); - - final fnData = Queries().joinOrgById('orgId123'); - if (fnData.contains('orgId123')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if sendMembershipRequest works correctly", () { - var mutation = false; - - expect(mutation, false); - - final fnData = Queries().sendMembershipRequest('orgId123'); - if (fnData.contains('orgId123')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if refreshToken works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().refreshToken('orgId123'); - if (fnData.contains('orgId123')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if updateLanguage works correctly", () { - var mutation = false; - - expect(mutation, false); - final fnData = Queries().updateLanguage('orgId123'); - if (fnData.contains('orgId123')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if getPluginsList works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().getPluginsList(); - if (fnData.contains('getPlugins')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if fetchOrgById works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().fetchOrgById('orgId123'); - if (fnData.contains('orgId123')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if userlanguage works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().userLanguage(); - if (fnData.contains('myLanguage')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if fetchJoinInOrgByName works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries(); - final ff = fnData.fetchJoinInOrgByName; - if (ff.contains('query organizationsConnection')) { - mutation = true; - } - expect(mutation, true); - }); - - test("Check if newUserLanguage works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().newUserLanguage('12345'); - if (fnData.contains('12345')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if fetchOrgDetailsById works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().fetchOrgDetailsById('12345'); - if (fnData.contains('12345')) { - mutation = true; - } - expect(mutation, true); - }); - - test("Check if getPluginsList works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().getPluginsList(); - if (fnData.contains('getPlugins')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if createDonation works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().createDonation( - 'userId', - 'userId', - 'userId', - 'userId', - 'userId', - 12, - ); - if (fnData.contains('userId')) { - mutation = true; - } - expect(mutation, true); - }); - test("Check if updateUserProfile works correctly", () { - var mutation = false; - expect(mutation, false); - - final fnData = Queries().updateUserProfile(); - - if (fnData.contains('mutation UpdateUserProfile') && - fnData.contains('updateUserProfile')) { - mutation = true; - } - expect(mutation, true); - }); - }); -} diff --git a/test/utils_tests/validators_test.dart b/test/utils_tests/validators_test.dart deleted file mode 100644 index 97ed6f72b..000000000 --- a/test/utils_tests/validators_test.dart +++ /dev/null @@ -1,244 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/validators.dart'; - -void main() { - group( - 'Test Validator', - () { - group('Test validateURL', () { - test('Test validateURL when value is empty', () { - final result = Validator.validateURL(''); - - expect(result, 'Please verify URL first'); - }); - - test('Test validateURL when value is not absolute', () { - final result = Validator.validateURL('path/resource'); - - expect(result, 'Enter a valid URL'); - }); - - test('Test validateURL when value is not absolute', () { - final result = Validator.validateURL('https://domain/path/resource'); - - expect(result, null); - }); - }); - - group('Test validateFirstName', () { - test('Test validateFirstName when value is empty', () { - final result = Validator.validateFirstName(''); - - expect(result, 'Firstname must not be left blank.'); - }); - - test('Test validateFirstName when value does not match regex pattern', - () { - final result = Validator.validateFirstName('123'); - - expect(result, 'Invalid Firstname'); - }); - - test('Test validateFirstName when value match regex pattern', () { - final result = Validator.validateFirstName('Name'); - - expect(result, null); - }); - }); - - group('Test validateLastName', () { - test('Test validateLastName when value is empty', () { - final result = Validator.validateLastName(''); - - expect(result, 'Lastname must not be left blank.'); - }); - - test('Test validateLastName when value does not match regex pattern', - () { - final result = Validator.validateLastName('123'); - - expect(result, 'Invalid Lastname'); - }); - - test('Test validateLastName when value match regex pattern', () { - final result = Validator.validateLastName('Name'); - - expect(result, null); - }); - }); - - group('Test validateEmail', () { - test('Test validateEmail when value is empty', () { - final result = Validator.validateEmail(''); - - expect(result, 'Email must not be left blank'); - }); - - test('Test validateEmail when value does not match regex pattern', () { - final List invalidEmailList = [ - 'plainaddress', - '#@%^%#\$@#\$@#.com', - '@example.com', - 'Joe Smith ', - 'email.example.com', - 'email@example@example.com', - 'email@example.com (Joe Smith)', - ]; - - for (final String email in invalidEmailList) { - final result = Validator.validateEmail(email); - - expect(result, 'Please enter a valid Email Address'); - } - }); - - test('Test validateEmail when value match regex pattern', () { - final List validEmailList = [ - 'email@example.com', - 'firstname.lastname@example.com', - 'firstname+lastname@example.com', - 'email@example.name', - 'email@example.museum', - 'email@example.co.jp', - 'firstname-lastname@example.com', - ]; - - for (final String email in validEmailList) { - final result = Validator.validateEmail(email); - - expect(result, null); - } - }); - }); - - group( - 'Test validatePassword', - () { - test('Test validatePassword when value is empty', () { - final result = Validator.validatePassword(''); - - expect(result, 'Password must not be left blank'); - }); - - test('Test validatePassword when value has spaces', () { - final result = Validator.validatePassword('password with spaces'); - - expect(result, 'Password must not contain spaces'); - }); - - test('Test validatePassword when value does not match regex pattern', - () { - final List invalidPassword = [ - '12345678', - 'not8len', - 'notcapital', - 'NOSMALL', - 'nonum', - 'NoSpecialChar123', - ]; - - for (final String password in invalidPassword) { - final result = Validator.validatePassword(password); - - expect( - result, - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - ); - } - }); - - test('Test validatePassword when value match regex pattern', () { - final result = Validator.validatePassword('ValidPassword123@'); - - expect(result, null); - }); - }, - ); - - group( - 'Test validateUrlExistence', - () { - test('Test validateUrlExistence when url is not present', () async { - final result = await Validator() - .validateUrlExistence('https://nnnoootttaaasssiiittteee.com'); - - expect(result, false); - }); - - test('Test validateUrlExistence when url is not present', () async { - final result = await Validator().validateUrlExistence( - 'https://www.google.com', - ); - - expect(result, true); - }); - }, - ); - - group( - 'Test validatePasswordConfirm', - () { - test( - 'Test validatePasswordConfirm when value is not matching with comparator', - () { - final result = Validator.validatePasswordConfirm( - 'Password123@', - 'Password1234@', - ); - - expect(result, 'Password does not match original'); - }); - - test( - 'Test validatePasswordConfirm when value is matching with comparator', - () { - final result = Validator.validatePasswordConfirm( - 'Password123@', - 'Password123@', - ); - - expect(result, null); - }); - }, - ); - - group( - 'Test validateEventForm', - () { - test('Test validateEventForm when value is empty', () { - final result = Validator.validateEventForm('', 'label'); - - expect(result, 'label must not be left blank.'); - }); - - test('Test validateEventForm when value does not match regex pattern', - () { - final result = Validator.validateEventForm('12345', 'label'); - - expect(result, 'Invalid label'); - }); - - test('Test validateEventForm when value match regex pattern', () { - final result = Validator.validateEventForm('12345Name', 'label'); - - expect(result, null); - }); - - test('Test validateEventTime for start time greater than end time', - () { - const startTime = TimeOfDay(hour: 14, minute: 30); - const endTime = TimeOfDay(hour: 12, minute: 30); - - final result = Validator.validateEventTime(startTime, endTime); - - expect(result, 'Start time must be before or equal to end time'); - }); - }, - ); - }, - ); -} diff --git a/test/view_model_tests/access_request_view_model_test.dart b/test/view_model_tests/access_request_view_model_test.dart deleted file mode 100644 index e6a63d6a5..000000000 --- a/test/view_model_tests/access_request_view_model_test.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/view_model/access_request_view_model.dart'; -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -void main() { - testSetupLocator(); - - setUpAll(() { - registerServices(); - }); - - group( - "AccessScreenViewModel Test- ", - () { - test("Check if it's initialized correctly", () { - final org = userConfig.currentOrg; - final model = AccessScreenViewModel(); - expect(model.selectedOrganization.id, '-1'); - model.initialise(org); - expect(model.selectedOrganization.id, 'XYZ'); - }); - - test( - "Check if snackbar is showing in case of not empty joined organization", - () async { - final org = userConfig.currentOrg; - final model = AccessScreenViewModel(); - model.initialise(org); - - when( - databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(org.id!), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions( - document: gql(queries.sendMembershipRequest(org.id!)), - ), - data: { - 'sendMembershipRequest': { - 'organization': { - '_id': 'XYZ', - 'name': 'Organization Name', - 'image': null, - 'description': null, - 'userRegistrationRequired': true, - 'creator': { - 'firstName': 'ravidi', - 'lastName': 'shaikh', - 'image': null, - }, - }, - }, - }, - source: QueryResultSource.network, - ), - ); - - await model.sendMembershipRequest(); - - verify( - databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(org.id!), - ), - ); - - verify(locator().pop()); - verify( - locator().showTalawaErrorSnackBar( - "Join in request sent to Organization Name successfully", - MessageType.info, - ), - ); - }); - - test("Removing joined organizations for testing", () async { - getAndRegisterUserConfig(); - final org = userConfig.currentOrg; - userConfig.currentUser.joinedOrganizations = []; - final model = AccessScreenViewModel(); - model.initialise(org); - - when( - databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(org.id!), - ), - ).thenAnswer( - (_) async => QueryResult( - options: QueryOptions( - document: gql(queries.sendMembershipRequest(org.id!)), - ), - data: { - 'sendMembershipRequest': { - 'organization': { - '_id': 'XYZ', - 'name': 'Organization Name', - 'image': null, - 'description': null, - 'userRegistrationRequired': true, - 'creator': { - 'firstName': 'ravidi', - 'lastName': 'shaikh', - 'image': null, - }, - }, - }, - }, - source: QueryResultSource.network, - ), - ); - - await model.sendMembershipRequest(); - - verify( - databaseFunctions.gqlAuthMutation( - queries.sendMembershipRequest(org.id!), - ), - ); - - verify( - locator().removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - }); - }, - ); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/add_post_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/add_post_view_model_test.dart deleted file mode 100644 index 2a00ad6dd..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/add_post_view_model_test.dart +++ /dev/null @@ -1,261 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/utils/post_queries.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -final demoJson = { - 'createPost': { - '__typename': 'Post', - '_id': '1', - 'text': 'text #hastag', - 'createdAt': '2023-11-13T19:28:21.095Z', - 'imageUrl': 'https://imageurl', - 'videoUrl': 'https://videoUrl', - 'title': 'demo title', - 'commentCount': 0, - 'likeCount': 0, - 'creator': { - '__typename': 'User', - '_id': '1', - 'firstName': 'Ayush', - 'lastName': 'Raghuwanshi', - 'image': 'https://imageUrl', - }, - 'organization': {'__typename': 'Organization', '_id': '1'}, - 'likedBy': [], - 'comments': [], - }, -}; - -void main() { - testSetupLocator(); - setUp(() { - registerServices(); - getAndRegisterImageService(); - }); - group("AddPostViewModel Test - ", () { - test("Check if it's initialized correctly", () { - final model = AddPostViewModel(); - model.initialise(); - - expect(model.imageFile, null); - expect(model.orgName, userConfig.currentOrg.name); - expect( - model.userName, - userConfig.currentUser.firstName! + userConfig.currentUser.lastName!, - ); - }); - - test('Test for imageInBase64 getter', () async { - final model = AddPostViewModel(); - model.initialise(); - expect(model.imageInBase64, null); - }); - - test("Check if getImageFromGallery() is working fine", () async { - final model = AddPostViewModel(); - model.initialise(); - - when(locator().getPhotoFromGallery()) - .thenAnswer((_) async { - return null; - }); - - await model.getImageFromGallery(); - verify(locator().getPhotoFromGallery()); - expect(model.imageFile, null); - }); - test("Check if getImageFromGallery() is working fine (camera is true)", - () async { - final notifyListenerCallback = MockCallbackFunction(); - final model = AddPostViewModel()..addListener(notifyListenerCallback); - model.initialise(); - - final file = File('fakePath'); - when(locator().getPhotoFromGallery(camera: true)) - .thenAnswer((_) async { - return file; - }); - - await model.getImageFromGallery(camera: true); - - verify( - locator().getPhotoFromGallery(camera: true), - ); - verify( - locator().showTalawaErrorSnackBar( - "Image is added", - MessageType.info, - ), - ); - - expect(model.imageFile, file); - - verify(notifyListenerCallback()); - }); - test("Check if upload post works correctly", () async { - final dataBaseMutationFunctions = locator(); - final notifyListenerCallback = MockCallbackFunction(); - final model = AddPostViewModel()..addListener(notifyListenerCallback); - model.initialise(); - when( - dataBaseMutationFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": " #", - "organizationId": 'XYZ', - "title": '', - }, - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(PostQueries().uploadPost())), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - await model.uploadPost(); - verify( - locator().showTalawaErrorSnackBar( - "Post is uploaded", - MessageType.info, - ), - ); - // verify( - // locator().gqlAuthMutation( - // query, - // variables: { - // "text": "", - // "organizationId": "XYZ", - // "title": "", - // "file":"", - // }, - // ), - // ); - verify(notifyListenerCallback()); - }); - test('uploadPost with _imageFile != null and throws no exception', - () async { - final dataBaseMutationFunctions = locator(); - final viewModel = AddPostViewModel(); - viewModel.initialise(); - final mockImageFile = File( - 'path/to/mockImage.png', - ); - viewModel.setImageFile(mockImageFile); - - await viewModel.setImageInBase64(mockImageFile); - - viewModel.controller.text = "Some post content"; - viewModel.textHashTagController.text = "hashtag"; - viewModel.titleController.text = "Post Title"; - when( - dataBaseMutationFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": 'Some post content', - "organizationId": 'XYZ', - "title": 'Post Title', - "file": 'data:image/png;base64,', - }, - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(PostQueries().uploadPost())), - data: demoJson, - source: QueryResultSource.network, - ), - ); - - await viewModel.uploadPost(); - verify( - locator().showTalawaErrorSnackBar( - "Post is uploaded", - MessageType.info, - ), - ).called(1); - }); - test('uploadPost with _imageFile == null', () async { - final viewModel = AddPostViewModel(); - viewModel.initialise(); - viewModel.controller.text = "Some post content"; - viewModel.textHashTagController.text = "hashtag"; - viewModel.titleController.text = "Post Title"; - when( - locator().gqlAuthMutation( - PostQueries().uploadPost(), - variables: anyNamed('variables'), - ), - ).thenThrow(Exception("exception")); - - await viewModel.uploadPost(); - verify( - locator().showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ), - ).called(1); - }); - test('uploadPost with _imageFile != null', () async { - final viewModel = AddPostViewModel(); - viewModel.initialise(); - final mockImageFile = File( - 'path/to/mockImage.png', - ); - viewModel.setImageFile(mockImageFile); - - await viewModel.setImageInBase64(mockImageFile); - viewModel.controller.text = "Some post content"; - viewModel.textHashTagController.text = "hashtag"; - viewModel.titleController.text = "Post Title"; - when( - locator().gqlAuthMutation( - PostQueries().uploadPost(), - variables: anyNamed('variables'), - ), - ).thenThrow(Exception("exception")); - - await viewModel.uploadPost(); - verify( - locator().showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ), - ).called(1); - }); - test("Check if remove_image method works correctly", () async { - final notifyListenerCallback = MockCallbackFunction(); - final model = AddPostViewModel()..addListener(notifyListenerCallback); - - model.initialise(); - - final file = File('fakePath'); - when(locator().getPhotoFromGallery(camera: true)) - .thenAnswer((_) async { - return file; - }); - - await model.getImageFromGallery(camera: true); - model.removeImage(); - expect(model.imageFile, null); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/direct_chat_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/direct_chat_view_model_test.dart deleted file mode 100644 index f460d80a8..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/direct_chat_view_model_test.dart +++ /dev/null @@ -1,149 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:async'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/chat_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -void main() { - registerServices(); - - group('Test DirectChatViewModel', () { - final DirectChatViewModel directChatViewModel = DirectChatViewModel(); - final ChatService chatService = locator(); - final UserConfig userConfig = locator(); - - test('Test DirectChatViewModel extends BaseModel', () { - expect(directChatViewModel, isA()); - }); - - test('Test initial value of fields in DirectChatViewModel', () { - expect(directChatViewModel.listKey, isA>()); - expect(directChatViewModel.chatState, ChatState.initial); - expect(directChatViewModel.chats, []); - expect(directChatViewModel.chatMessagesByUser, {}); - }); - - test('Test refreshChats', () { - directChatViewModel.refreshChats(); - expect(directChatViewModel.chats, []); - }); - - test('Test initialise', () async { - final chats = directChatViewModel.chats; - - final future = directChatViewModel.initialise(); - - expect(directChatViewModel.chatState, ChatState.loading); - await future; - expect(directChatViewModel.chats, chats); - expect(directChatViewModel.chatState, ChatState.complete); - }); - - test('Test getChatMessages', () async { - final ChatMessage chatMessage = - ChatMessage('11', null, 'message11', null); - final StreamController chatMessageController = - StreamController(); - final Stream messagestream = - chatMessageController.stream.asBroadcastStream(); - - when(chatService.chatMessagesStream) - .thenAnswer((realInvocation) => messagestream); - when(chatService.getDirectChatMessagesByChatId('1')).thenAnswer( - (realInvocation) async => chatMessageController.add(chatMessage), - ); - - final future = directChatViewModel.getChatMessages('1'); - - expect(directChatViewModel.chatMessagesByUser, {}); - expect(directChatViewModel.chatState, ChatState.loading); - - await future; - - expect(directChatViewModel.chatMessagesByUser['1'], [chatMessage]); - expect(directChatViewModel.chatState, ChatState.complete); - }); - - test('Test sendMessageToDirectChat', () async { - final List chatMessages = [ - ChatMessage('11', null, 'message11', null), - ChatMessage('22', null, 'message22', null), - ]; - final StreamController chatMessageController = - StreamController(); - final Stream messagestream = - chatMessageController.stream.asBroadcastStream(); - - when(chatService.chatMessagesStream) - .thenAnswer((realInvocation) => messagestream); - when(chatService.getDirectChatMessagesByChatId('1')).thenAnswer( - (realInvocation) async => chatMessageController.add(chatMessages[0]), - ); - when(chatService.sendMessageToDirectChat('1', 'content')).thenAnswer( - (realInvocation) async => chatMessageController.add(chatMessages[1]), - ); - - await directChatViewModel.getChatMessages('1'); - final future = - directChatViewModel.sendMessageToDirectChat('1', 'content'); - - expect(directChatViewModel.chatState, ChatState.loading); - - await future; - - for (int index = 0; index < chatMessages.length; index++) { - final message = directChatViewModel.chatMessagesByUser['1']![index]; - expect(message.id, chatMessages[index].id); - } - - expect(directChatViewModel.chatState, ChatState.complete); - }); - - test('Test chatName', () async { - final User currentUser = User(id: '1', firstName: 'first_user'); - final ChatUser user1 = ChatUser(id: '1', firstName: 'first_user'); - final ChatUser user2 = ChatUser(id: '2', firstName: 'second_user'); - final List users = [ - user1, - user2, - ]; - final ChatListTileDataModel chatListTileDataModel = - ChatListTileDataModel(users, 'chat_id'); - final StreamController controller = - StreamController(); - final Stream stream = controller.stream; - - when(chatService.chatListStream).thenAnswer((realInvocation) { - return stream; - }); - when(chatService.getDirectChatsByUserId()).thenAnswer( - (realInvocation) async => controller.add(chatListTileDataModel), - ); - when(userConfig.currentUser).thenAnswer((realInvocation) => currentUser); - - await directChatViewModel.initialise(); - directChatViewModel.chatName('chat_id'); - - expect(directChatViewModel.name, 'second_user'); - }); - - test('Test dispose', () { - directChatViewModel.dispose(); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/select_contact_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/select_contact_view_model_test.dart deleted file mode 100644 index e9bcc87d3..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/chat_view_models_test/select_contact_view_model_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - test("test initialise function of model", () async { - final model = SelectContactViewModel(); - model.initialise(); - }); - test("test to check if getOrgMembersList is working", () async { - final model = SelectContactViewModel(); - model.initialise(); - final User user1 = User(id: "fakeUser1"); - final User user2 = User(id: "fakeUser2"); - final List users = [user1, user2]; - - when(organizationService.getOrgMembersList("XYZ")) - .thenAnswer((realInvocation) async { - return users; - }); - await model.getCurrentOrgUsersList(); - bool working = true; - model.orgMembersList.forEach((user) { - if (user.id == null) { - working = false; - } - }); - - expect(working, true); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart deleted file mode 100644 index cd683b6f8..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/create_event_view_model_test.dart +++ /dev/null @@ -1,577 +0,0 @@ -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/event_queries.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -/// `MockBuildContext` class represents mock instance of Build context. -class MockBuildContext extends Mock implements BuildContext {} - -/// Instance of callback function. -class MockCallbackFunction extends Mock { - /// Callback function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -/// a_line_ending_with_end_punctuation. -/// -/// more_info_if_required -/// -/// **params**: -/// * `formKey`: define_the_param -/// * `eventTitleTextController`: define_the_param -/// * `eventLocationTextController`: define_the_param -/// * `eventDescriptionTextController`: define_the_param -/// -/// **returns**: -/// * `Widget`: define_the_return -Widget createApp( - GlobalKey formKey, - TextEditingController eventTitleTextController, - TextEditingController eventLocationTextController, - TextEditingController eventDescriptionTextController, -) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: Container( - child: Form( - key: formKey, - child: Column( - children: [ - TextFormField( - controller: eventTitleTextController, - ), - TextFormField( - controller: eventLocationTextController, - ), - TextFormField( - controller: eventDescriptionTextController, - ), - ], - ), - ), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); -} - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Create Event Tests', () { - test("test getCurrentOrgUsersList with isAdmin false", () async { - final model = CreateEventViewModel(); - model.initialize(); - - final User user1 = User(id: "fakeUser1"); - final User user2 = User(id: "fakeUser2"); - final List users = [user1, user2]; - - when(organizationService.getOrgMembersList("XYZ")) - .thenAnswer((realInvocation) async { - return users; - }); - - await model.getCurrentOrgUsersList(); - - bool isListCorrect = true; - - users.forEach((user) { - final bool x = model.memberCheckedMap.containsKey(user.id); - if (!x) { - isListCorrect = false; - } - }); - - expect(isListCorrect, true); - }); - - testWidgets("testing createEvent function", (tester) async { - final model = CreateEventViewModel(); - model.initialize(); - await tester.pumpWidget( - createApp( - model.formKey, - model.eventTitleTextController, - model.eventLocationTextController, - model.eventDescriptionTextController, - ), - ); - - final DateTime startMoment = DateTime( - model.eventStartDate.year, - model.eventStartDate.month, - model.eventStartDate.day, - model.eventStartTime.hour, - model.eventStartTime.minute, - ); - final DateTime endMoment = DateTime( - model.eventEndDate.year, - model.eventEndDate.month, - model.eventEndDate.day, - model.eventEndTime.hour, - model.eventEndTime.minute, - ); - - await tester.pump(); - await tester.pumpAndSettle(); - - await tester.enterText( - find.byType(TextFormField).first, - 'fakeEventTitle', - ); - await tester.enterText( - find.byType(TextFormField).last, - 'fakeEventDescription', - ); - await tester.enterText( - find.byType(TextFormField).at(1), - 'fakeEventLocation', - ); - databaseFunctions.init(); - - when(databaseFunctions.refreshAccessToken("testtoken")) - .thenAnswer((realInvocation) async { - return true; - }); - - when( - databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: { - 'data': { - 'startDate': DateFormat('yyyy-MM-dd').format(startMoment), - 'endDate': DateFormat('yyyy-MM-dd').format(endMoment), - 'organizationId': 'XYZ', - 'title': model.eventTitleTextController.text, - 'description': model.eventDescriptionTextController.text, - 'location': model.eventLocationTextController.text, - 'isPublic': model.isPublicSwitch, - 'isRegisterable': model.isRegisterableSwitch, - 'recurring': model.isRecurring, - 'allDay': true, - 'startTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(startMoment)}Z', - 'endTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(endMoment)}Z', - }, - if (model.isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': - DateFormat('yyyy-MM-dd').format(model.recurrenceStartDate), - 'recurrenceEndDate': model.recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(model.recurrenceEndDate!) - : null, - 'frequency': model.frequency, - 'weekDays': (model.frequency == Frequency.weekly || - (model.frequency == Frequency.monthly && - model.weekDayOccurenceInMonth != null)) - ? model.weekDays.toList() - : null, - 'interval': model.interval, - 'count': model.count, - 'weekDayOccurenceInMonth': model.weekDayOccurenceInMonth, - }, - }, - ), - ).thenAnswer((_) async { - return true; - }); - - await model.createEvent(); - - verify( - databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: { - 'data': { - 'startDate': DateFormat('yyyy-MM-dd').format(startMoment), - 'endDate': DateFormat('yyyy-MM-dd').format(endMoment), - 'organizationId': 'XYZ', - 'title': model.eventTitleTextController.text, - 'description': model.eventDescriptionTextController.text, - 'location': model.eventLocationTextController.text, - 'isPublic': model.isPublicSwitch, - 'isRegisterable': model.isRegisterableSwitch, - 'recurring': model.isRecurring, - 'allDay': true, - 'startTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(startMoment)}Z', - 'endTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(endMoment)}Z', - }, - if (model.isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': - DateFormat('yyyy-MM-dd').format(model.recurrenceStartDate), - 'recurrenceEndDate': model.recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(model.recurrenceEndDate!) - : null, - 'frequency': model.frequency, - 'weekDays': (model.frequency == Frequency.weekly || - (model.frequency == Frequency.monthly && - model.weekDayOccurenceInMonth != null)) - ? model.weekDays.toList() - : null, - 'interval': model.interval, - 'count': model.count, - 'weekDayOccurenceInMonth': model.weekDayOccurenceInMonth, - }, - }, - ), - ); - - verify(navigationService.pop()); - }); - - testWidgets("testing createEvent function (Recurring)", (tester) async { - final model = CreateEventViewModel(); - model.initialize(); - await tester.pumpWidget( - createApp( - model.formKey, - model.eventTitleTextController, - model.eventLocationTextController, - model.eventDescriptionTextController, - ), - ); - - final DateTime startMoment = DateTime( - model.eventStartDate.year, - model.eventStartDate.month, - model.eventStartDate.day, - model.eventStartTime.hour, - model.eventStartTime.minute, - ); - - final DateTime endMoment = DateTime( - model.eventEndDate.year, - model.eventEndDate.month, - model.eventEndDate.day, - model.eventEndTime.hour, - model.eventEndTime.minute, - ); - - model.isRecurring = true; - - await tester.pump(); - await tester.pumpAndSettle(); - - await tester.enterText( - find.byType(TextFormField).first, - 'fakeEventTitle', - ); - await tester.enterText( - find.byType(TextFormField).last, - 'fakeEventDescription', - ); - await tester.enterText( - find.byType(TextFormField).at(1), - 'fakeEventLocation', - ); - databaseFunctions.init(); - - when(databaseFunctions.refreshAccessToken("testtoken")) - .thenAnswer((realInvocation) async { - return true; - }); - - when( - databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: { - 'data': { - 'startDate': DateFormat('yyyy-MM-dd').format(startMoment), - 'endDate': DateFormat('yyyy-MM-dd').format(endMoment), - 'organizationId': 'XYZ', - 'title': model.eventTitleTextController.text, - 'description': model.eventDescriptionTextController.text, - 'location': model.eventLocationTextController.text, - 'isPublic': model.isPublicSwitch, - 'isRegisterable': model.isRegisterableSwitch, - 'recurring': model.isRecurring, - 'allDay': true, - 'startTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(startMoment)}Z', - 'endTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(endMoment)}Z', - }, - if (model.isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': - DateFormat('yyyy-MM-dd').format(model.recurrenceStartDate), - 'recurrenceEndDate': model.recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(model.recurrenceEndDate!) - : null, - 'frequency': model.frequency, - 'weekDays': (model.frequency == Frequency.weekly || - (model.frequency == Frequency.monthly && - model.weekDayOccurenceInMonth != null)) - ? model.weekDays.toList() - : null, - 'interval': model.interval, - 'count': model.count, - 'weekDayOccurenceInMonth': model.weekDayOccurenceInMonth, - }, - }, - ), - ).thenAnswer((_) async { - return true; - }); - - await model.createEvent(); - - verify( - databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: { - 'data': { - 'startDate': DateFormat('yyyy-MM-dd').format(startMoment), - 'endDate': DateFormat('yyyy-MM-dd').format(endMoment), - 'organizationId': 'XYZ', - 'title': model.eventTitleTextController.text, - 'description': model.eventDescriptionTextController.text, - 'location': model.eventLocationTextController.text, - 'isPublic': model.isPublicSwitch, - 'isRegisterable': model.isRegisterableSwitch, - 'recurring': model.isRecurring, - 'allDay': true, - 'startTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(startMoment)}Z', - 'endTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(endMoment)}Z', - }, - if (model.isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': - DateFormat('yyyy-MM-dd').format(model.recurrenceStartDate), - 'recurrenceEndDate': model.recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(model.recurrenceEndDate!) - : null, - 'frequency': model.frequency, - 'weekDays': (model.frequency == Frequency.weekly || - (model.frequency == Frequency.monthly && - model.weekDayOccurenceInMonth != null)) - ? model.weekDays.toList() - : null, - 'interval': model.interval, - 'count': model.count, - 'weekDayOccurenceInMonth': model.weekDayOccurenceInMonth, - }, - }, - ), - ); - - verify(navigationService.pop()); - - model.recurrenceEndDate = DateTime.now(); - model.frequency = Frequency.monthly; - model.weekDayOccurenceInMonth = 1; - - await model.createEvent(); - - verify( - databaseFunctions.gqlAuthMutation( - EventQueries().addEvent(), - variables: { - 'data': { - 'startDate': DateFormat('yyyy-MM-dd').format(startMoment), - 'endDate': DateFormat('yyyy-MM-dd').format(endMoment), - 'organizationId': 'XYZ', - 'title': model.eventTitleTextController.text, - 'description': model.eventDescriptionTextController.text, - 'location': model.eventLocationTextController.text, - 'isPublic': model.isPublicSwitch, - 'isRegisterable': model.isRegisterableSwitch, - 'recurring': model.isRecurring, - 'allDay': true, - 'startTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(startMoment)}Z', - 'endTime': model.isAllDay - ? null - : '${DateFormat('HH:mm:ss').format(endMoment)}Z', - }, - if (model.isRecurring) - 'recurrenceRuleData': { - 'recurrenceStartDate': - DateFormat('yyyy-MM-dd').format(model.recurrenceStartDate), - 'recurrenceEndDate': model.recurrenceEndDate != null - ? DateFormat('yyyy-MM-dd').format(model.recurrenceEndDate!) - : null, - 'frequency': model.frequency, - 'weekDays': (model.frequency == Frequency.weekly || - (model.frequency == Frequency.monthly && - model.weekDayOccurenceInMonth != null)) - ? model.weekDays.toList() - : null, - 'interval': model.interval, - 'count': model.count, - 'weekDayOccurenceInMonth': model.weekDayOccurenceInMonth, - }, - }, - ), - ); - - verify(navigationService.pop()); - }); - - test("test getImageFromGallery and removeImage functions", () async { - final notifyListenerCallback = MockCallbackFunction(); - final model = CreateEventViewModel()..addListener(notifyListenerCallback); - model.initialize(); - - // testing getImageFromGallery - // with camera false - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((realInvocation) async { - return null; - }); - - await model.getImageFromGallery(); - verify(multimediaPickerService.getPhotoFromGallery(camera: false)); - expect(model.imageFile, null); - - // with camera true - final file = File('fakePath'); - when(multimediaPickerService.getPhotoFromGallery(camera: true)) - .thenAnswer((_) async { - return file; - }); - await model.getImageFromGallery(camera: true); - verify(multimediaPickerService.getPhotoFromGallery(camera: true)); - expect(model.imageFile, file); - verify(notifyListenerCallback()); - - // testing removeImage - model.removeImage(); - expect(model.imageFile, null); - verify(notifyListenerCallback()); - }); - - test('check that empty values are not accepted for required fields', () { - final String? emptyTitle = Validator.validateEventForm("", "Title"); - expect(emptyTitle, "Title must not be left blank."); - - final String? emptyLocation = Validator.validateEventForm("", "Location"); - expect(emptyLocation, "Location must not be left blank."); - - final String? emptyDescription = - Validator.validateEventForm("", "Description"); - expect(emptyDescription, "Description must not be left blank."); - }); - - test('Check validators return null for valid values', () { - final String? validTitle = - Validator.validateEventForm("Test Title", "Title"); - expect(validTitle, null); - - final String? validLocation = - Validator.validateEventForm("Test Location", "Location"); - expect(validLocation, null); - - final String? validDescription = - Validator.validateEventForm("Test Description", "Description"); - expect(validDescription, null); - }); - - test('Check addition of members', () { - final model = CreateEventViewModel(); - model.initialize(); - - final List allMembers = - userConfig.currentOrg.members! + userConfig.currentOrg.admins!; - model.orgMembersList = allMembers; - - // non admins (normal members) - final List usersInCurrentOrg = userConfig.currentOrg.members!; - model.memberCheckedMap[usersInCurrentOrg.first.id!] = true; - model.buildUserList(); - final bool isMemberFound = - model.selectedMembers.contains(usersInCurrentOrg.first); - expect(isMemberFound, true); - }); - - test('Removing of members from event', () { - final model = CreateEventViewModel(); - model.initialize(); - final List allMembers = - userConfig.currentOrg.members! + userConfig.currentOrg.admins!; - model.orgMembersList = allMembers; - - // non admins (normal members) - // to remove, first we need to add a member - final List usersInCurrentOrg = userConfig.currentOrg.members!; - model.memberCheckedMap[usersInCurrentOrg.first.id!] = true; - model.buildUserList(); - model.removeUserFromList( - userId: usersInCurrentOrg.first.id!, - ); - final bool isMemberFound = - model.selectedMembers.contains(usersInCurrentOrg.first); - expect(isMemberFound, false); - }); - - test('setEventEndDate should set the event end date and notify listeners', - () { - final model = CreateEventViewModel(); - model.initialize(); - - final newDate = DateTime.now().add(const Duration(days: 1)); - final notifyListenerCallback = MockCallbackFunction(); - model.addListener(notifyListenerCallback); - - model.setEventEndDate(newDate); - - expect(model.eventEndDate, newDate); - verify(notifyListenerCallback()).called(1); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/edit_event_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/edit_event_view_model_test.dart deleted file mode 100644 index b31c18c69..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/edit_event_view_model_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; - -final testEvent = Event( - id: '1', - title: 'test', - startDate: '01/30/2022', // mm/dd/yyyy - endDate: '01/30/2022', - startTime: '06:40 PM', - endTime: '07:40 PM', - location: 'ABC', - description: 'test', - creator: User( - id: 'xzy1', - firstName: 'Test', - lastName: 'User', - email: 'testuser@gmail.com', - refreshToken: 'testtoken', - authToken: 'testtoken', - ), - isPublic: true, - isRegisterable: true, - organization: OrgInfo(id: 'XYZ'), -); - -void main() { - setUp(() { - registerServices(); - }); - group('EditEventViewModel Test -', () { - test("Check if it's initialized correctly", () { - final model = EditEventViewModel(); - model.initialize(testEvent); - - expect(model.eventTitleTextController.text, 'test'); - expect(model.eventLocationTextController.text, 'ABC'); - expect(model.eventDescriptionTextController.text, 'test'); - expect(model.isPublicSwitch, true); - expect(model.isRegisterableSwitch, true); - expect(model.eventStartDate, DateFormat().add_yMd().parse('01/30/2022')); - expect(model.eventEndDate, DateFormat().add_yMd().parse('01/30/2022')); - expect( - model.eventStartTime, - TimeOfDay.fromDateTime(DateFormat('h:mm a').parse('06:40 PM')), - ); - expect( - model.eventEndTime, - TimeOfDay.fromDateTime(DateFormat('h:mm a').parse('07:40 PM')), - ); - }); - testWidgets('Check if updateEvent() is working fine', (tester) async { - final model = EditEventViewModel(); - model.initialize(testEvent); - await tester.pumpWidget( - Form( - key: model.formKey, - child: Container(), - ), - ); - - await model.updateEvent(); - - expect(model.validate, AutovalidateMode.disabled); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/event_info_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/event_info_view_model_test.dart deleted file mode 100644 index d36af3eaa..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/event_info_view_model_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Event Info Tests', () { - final model = EventInfoViewModel(); - - test("test initialization", () { - final Event event = - Event(id: "1", isRegisterable: true, isRegistered: false); - final ExploreEventsViewModel exploreEventsViewModel = - ExploreEventsViewModel(); - model.initialize( - args: { - "event": event, - "exploreEventViewModel": exploreEventsViewModel, - }, - ); - expect(model.fabTitle, "Register"); - }); - - test("Test register for event", () async { - final Event event1 = - Event(id: "1", isRegisterable: true, isRegistered: false); - model.event = event1; - - final eventService = getAndRegisterEventService(); - when(eventService.registerForAnEvent(model.event.id!)) - .thenAnswer((realInvocation) async { - return "Event Registered"; - }); - await model.registerForEvent(); - - verify(navigationService.pop()); - - verify(eventService.registerForAnEvent(model.event.id!)); - expect(model.event.isRegistered, true); - expect(model.fabTitle, "Registered"); - - // now make the event non registrable - model.event.isRegistered = false; - model.event.isRegisterable = false; - await model.registerForEvent(); - verifyNever(eventService.registerForAnEvent(model.event.id!)); - expect(model.event.isRegistered, false); - }); - - test("Test getFabTitle function", () { - final Event event1 = Event(id: "1", isRegisterable: false); - model.event = event1; - expect(model.getFabTitle(), "Not Registrable"); - - final Event event2 = - Event(id: "2", isRegisterable: true, isRegistered: false); - model.event = event2; - expect(model.getFabTitle(), "Register"); - - final Event event3 = - Event(id: "3", isRegisterable: true, isRegistered: true); - model.event = event3; - expect(model.getFabTitle(), "Registered"); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/explore_events_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/explore_events_view_model_test.dart deleted file mode 100644 index 294e7e79a..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/event_view_model_tests/explore_events_view_model_test.dart +++ /dev/null @@ -1,238 +0,0 @@ -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -class MockCallbackFunction extends Mock { - void call(); -} - -class _MockStreamSubscription extends Mock - implements StreamSubscription {} - -class _MockStream extends Mock implements Stream { - @override - StreamSubscription listen( - void Function(T event)? onData, { - Function? onError, - void Function()? onDone, - bool? cancelOnError, - }) => - _MockStreamSubscription(); -} - -class _MockNavigationService extends Mock implements NavigationService { - @override - GlobalKey navigatorKey = GlobalKey(); - @override - void pushDialog(Widget dialog) { - showDialog( - context: navigatorKey.currentContext!, - barrierColor: Colors.transparent, - barrierDismissible: false, - builder: (BuildContext context) { - return dialog; - }, - ); - } -} - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - - late Event newEvent; - setUp(() async { - registerServices(); - await locator.unregister(); - locator.registerSingleton(_MockNavigationService()); - locator().test(); - newEvent = Event( - id: "1", - title: "fake_event_title", - description: "fake_event_desc", - attendees: [Attendee(id: 'Test Id')], - location: "fake_event_loc", - recurring: false, - startDate: '2024-01-14', - endDate: '2024-01-14', - startTime: '08:01:00.000Z', - endTime: '08:50:00.000Z', - creator: User(id: 'Test Id'), - isPublic: true, - isRegistered: true, - isRegisterable: true, - organization: OrgInfo(id: 'XYZ'), - ); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Explore Event Tests', () { - test("Test fetchNewEvents and refreshEvents", () async { - final model = ExploreEventsViewModel(); - await model.initialise(); - when(eventService.getEvents()).thenAnswer((realInvocation) async {}); - await model.fetchNewEvents(); - verify(eventService.getEvents()); - - model.refreshEvents(); - verify(eventService.getEvents()); - }); - - test("Test checkIfExistsAndAddNewEvent function", () async { - final model = ExploreEventsViewModel(); - await model.initialise(); - await model.checkIfExistsAndAddNewEvent(newEvent); - expect(model.events.isNotEmpty, true); - expect(model.events.first.id, newEvent.id); - }); - - test( - "Test checkIfExistsAndAddNewEvent function when start time is not parsable", - () async { - final model = ExploreEventsViewModel(); - newEvent.startTime = "09:00:00"; - newEvent.organization!.id = 'Test Id 1'; - await model.checkIfExistsAndAddNewEvent(newEvent); - expect(model.events, isEmpty); - expect(model.events.length, 0); - // expect(model.events.first.id, '1'); - }); - testWidgets( - "Test function of CustomAlertDialog when deleteEvent function is executed", - (tester) async { - final model = ExploreEventsViewModel(); - when(model.eventService.deleteEvent(newEvent.id!)) - .thenAnswer((realInvocation) async => 1); - - await tester.pumpWidget( - MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: navigationService.navigatorKey, - home: Scaffold(body: Container()), - ), - ); - await tester.pumpAndSettle(); - await model.checkIfExistsAndAddNewEvent(newEvent); - await model.deleteEvent(eventId: newEvent.id!); - await tester.pumpAndSettle(); - final customFinder = find.byType(CustomAlertDialog); - expect(customFinder, findsOneWidget); - - final successFinder = find.byKey(const Key('Delete')); - await tester.tap(successFinder); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - expect(model.events, isEmpty); - }); - - test("Test chooseValueFromDropdown function", () async { - final model = ExploreEventsViewModel(); - await model.initialise(); - - await model.choseValueFromDropdown('All Events'); - expect(model.emptyListMessage, "Looks like there aren't any events."); - - await model.choseValueFromDropdown("My Events"); - bool allCreated = true; - final userConfig = getAndRegisterUserConfig(); - for (int i = 0; i < model.events.length; i++) { - if (model.events[i].creator?.id != userConfig.currentUser.id) { - allCreated = false; - } - } - expect(allCreated, true); - expect(model.emptyListMessage, "You have not created any event."); - - await model.choseValueFromDropdown("Registered Events"); - - allCreated = true; - bool allRegistered = true; - for (int i = 0; i < model.events.length; i++) { - if (model.events[i].creator?.id != userConfig.currentUser.id) { - allCreated = false; - } - if (model.events[i].isRegistered == false) { - allRegistered = false; - } - } - expect(allCreated, true); - expect(allRegistered, true); - expect(model.emptyListMessage, "No registered events are present"); - - await model.choseValueFromDropdown('Public Events'); - bool allPublic = true; - for (int i = 0; i < model.events.length; i++) { - if (model.events[i].isPublic == false) { - allPublic = false; - } - } - expect(allPublic, true); - expect(model.emptyListMessage, "There aren't any public events."); - - await model.choseValueFromDropdown('Private Events'); - bool allPrivate = true; - for (int i = 0; i < model.events.length; i++) { - if (model.events[i].isPublic == true) { - allPrivate = false; - } - } - expect(allPrivate, true); - expect(model.emptyListMessage, "There aren't any private events."); - - //run default block - await model.choseValueFromDropdown("Events"); - }); - test("Test get event service", () async { - final model = ExploreEventsViewModel(); - expect(model.eventService, isA()); - }); - test( - "Test chooseValueFromDropdown when value is Registered Events and _bufferEvents is not empty", - () async { - final model = ExploreEventsViewModel(); - when(userConfig.currentOrg) - .thenAnswer((realInvocation) => OrgInfo(id: '1')); - when(userConfig.currentOrgInfoStream) - .thenAnswer((realInvocation) => _MockStream()); - when(eventService.eventStream) - .thenAnswer((realInvocation) => _MockStream()); - - await model.checkIfExistsAndAddNewEvent(newEvent); - await model.initialise(); - await model.choseValueFromDropdown('Registered Events'); - expect(model.emptyListMessage, "No registered events are present"); - }); - test( - "Test chooseValueFromDropdown when value is Registered Events and _bufferEvents is not empty", - () async { - final model = ExploreEventsViewModel(); - final List userEvents = model.userEvents; - expect(userEvents, []); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/feed_view_models_test/organization_feed_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/feed_view_models_test/organization_feed_view_model_test.dart deleted file mode 100644 index 19cfdf60e..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/feed_view_models_test/organization_feed_view_model_test.dart +++ /dev/null @@ -1,159 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/post_service.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -void main() { - testSetupLocator(); - late OrganizationFeedViewModel model; - final notifyListenerCallback = MockCallbackFunction(); - - setUp(() { - registerServices(); - model = OrganizationFeedViewModel()..addListener(notifyListenerCallback); - }); - tearDown(() { - unregisterServices(); - }); - - group('OrganizationFeedViewModel Tests:', () { - test('Test initialise function', () { - expect(model.currentOrgName, ''); - model.initialise(isTest: true); - expect(model.currentOrgName, 'Organization Name'); - - locator() - .currentOrgInfoController - .add(OrgInfo(name: 'Updated Organization Name')); - - expect(model.posts.length, 0); - }); - - test('Test pinnedPosts getter when istest is true', () { - model.istest = true; - - final pinnedPosts = model.pinnedPosts; - - expect(pinnedPosts, isEmpty); - }); - - test('Test pinnedPosts getter when istest is false', () { - model.istest = false; - - final pinnedPosts = model.pinnedPosts; - - expect(pinnedPosts.length, 4); - - expect(pinnedPosts[0].sId, '1'); - }); - - test('Test setCurrentOrganizationName function', () { - model.setCurrentOrganizationName('Updated Organization Name'); - expect(model.posts.length, 0); - expect(model.userPosts.length, 0); - expect(model.currentOrgName, 'Updated Organization Name'); - }); - - test('Test fetchNewPosts function', () { - model.fetchNewPosts(); - verify(locator().refreshFeed()); - }); - - test('Test buildNewPosts function', () { - when(userConfig.currentUser).thenReturn(User(id: 'a')); - model.buildNewPosts([ - Post(sId: '1', creator: User(id: 'a')), - Post(sId: '2', creator: User(id: 'a')), - ]); - - expect(model.posts.length, 2); - expect(model.userPosts.length, 2); - verify(notifyListenerCallback()); - }); - - test('Test navigateToIndividualPage function', () { - final post = Post(sId: '1', creator: User()); - - model.navigateToIndividualPage(post); - - verify( - locator().pushScreen( - Routes.individualPost, - arguments: post, - ), - ); - }); - - test('Test navigateToPinnedPostPage function', () { - model.navigateToPinnedPostPage(); - - final captured = verify( - (locator() as MockNavigationService).pushScreen( - Routes.pinnedPostPage, - arguments: captureAnyNamed('arguments'), - ), - ).captured; - - expect((captured[0] as List).length, 4); - }); - - test('Test addNewPost function', () { - final post = Post(sId: '1', creator: User()); - - model.addNewPost(post); - - expect(model.posts[0], post); - verify(notifyListenerCallback()); - }); - - test('Test updatedPost function', () { - final post = Post(sId: '1', creator: User()); - model.addNewPost(post); - - final updatedPost = Post( - sId: '1', - description: 'updated', - creator: User(), - ); - model.updatedPost(updatedPost); - - expect(model.posts[0], updatedPost); - verify(notifyListenerCallback()).called(2); - }); - }); - - test('Test removePost function', () async { - final post = Post(sId: '1', creator: User()); - model.addNewPost(post); - model.initialise(); - - await model.removePost(post); - - expect(model.posts.isEmpty, true); - }); - test("test nextpage", () { - model.nextPage(); - expect(model.posts.isEmpty, true); - }); - test("test previousPage", () { - model.previousPage(); - expect(model.posts.isEmpty, true); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/edit_profile_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/edit_profile_view_model_test.dart deleted file mode 100644 index f3230fe2a..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/edit_profile_view_model_test.dart +++ /dev/null @@ -1,333 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -/// MockCallbackFunction class is used to mock callback function. -class MockCallbackFunction extends Mock { - /// `call` function is a placeholder function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -void main() { - testSetupLocator(); - SizeConfig().test(); - setUpAll(() { - registerServices(); - graphqlConfig.test(); - sizeConfig.test(); - }); - - tearDownAll(() { - unregisterServices(); - }); - - group('EditProfilePageViewModel Test -', () { - test("Check if it's initialized correctly", () { - final model = EditProfilePageViewModel(); - model.initialize(); - expect(model.imageFile, null); - }); - test('Profile shoud be edited if new values are given', () async { - final model = EditProfilePageViewModel(); - model.initialize(); - final Map mockData = { - 'updateUserProfile': { - '_id': '64378abd85008f171cf2990d', - }, - }; - final String a = await model.convertToBase64(File('path/to/newImage')); - final Map data = { - 'users': [ - { - '__typename': 'UserData', - 'appUserProfile': { - '__typename': 'AppUserProfile', - 'adminFor': [], - 'createdOrganizations': [], - }, - 'user': { - '__typename': 'User', - '_id': '1234567890', - 'firstName': 'John', - 'lastName': 'Doe', - 'email': 'johndoe@example.com', - 'image': 'https://example.com/profile.jpg', - 'joinedOrganizations': [ - { - '__typename': 'Organization', - '_id': '6537904485008f171cf29924', - 'name': 'Unity Foundation', - 'image': null, - 'description': - 'We are aimed at improving the education spaces for the under privileged girl child.', - 'userRegistrationRequired': false, - 'creator': { - '__typename': 'User', - '_id': '64378abd85008f171cf2990d', - 'firstName': 'Wilt', - 'lastName': 'Shepherd', - 'image': null, - }, - } - ], - 'membershipRequests': [], - }, - } - ], - }; - when( - databaseFunctions.gqlAuthMutation( - queries.updateUserProfile(), - variables: { - 'firstName': 'NewFirstName', - 'lastName': 'NewLastName', - 'newImage': 'data:image/png;base64,$a', - }, - ), - ).thenAnswer( - (_) async => QueryResult( - data: mockData, - source: QueryResultSource.network, - options: QueryOptions(document: gql(queries.updateUserProfile())), - ), - ); - when( - databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: {'id': model.user.id}, - ), - ).thenAnswer((_) async { - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.fetchUserInfo)), - ); - }); - await model.updateUserProfile( - firstName: 'NewFirstName', - lastName: 'NewLastName', - newImage: File('path/to/newImage'), - ); - - verify( - databaseFunctions.gqlAuthMutation( - queries.updateUserProfile(), - variables: { - "firstName": "NewFirstName", - "lastName": "NewLastName", - "file": 'data:image/png;base64,$a', - }, - ), - ).called(1); - verify( - navigationService.showTalawaErrorSnackBar( - "Profile updated successfully", - MessageType.info, - ), - ); - }); - - test('Test UpdateUserProfile when throwing exception', () async { - final model = EditProfilePageViewModel(); - model.initialize(); - final String b = await model.convertToBase64(File('path/to/newIma')); - when( - databaseFunctions.gqlAuthMutation( - queries.updateUserProfile(), - variables: { - 'firstName': 'NewFirstNa', - 'lastName': 'NewLastNa', - 'newImage': 'data:image/png;base64,$b', - }, - ), - ).thenThrow(Exception()); - when( - databaseFunctions.gqlAuthQuery( - queries.fetchUserInfo, - variables: {'id': model.user.id}, - ), - ).thenThrow(Exception()); - await model.updateUserProfile( - firstName: 'NewFirstNa', - lastName: 'NewLastNa', - newImage: File('path/to/newIma'), - ); - verify( - navigationService.showTalawaErrorSnackBar( - "Something went wrong", - MessageType.error, - ), - ); - }); - testWidgets('Test if SelectImage from camera method works', - (WidgetTester tester) async { - final model = EditProfilePageViewModel(); - model.initialize(); - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - return ElevatedButton( - key: const Key('btn1'), - onPressed: () => model.selectImage(camera: true), - child: const Text('listner'), - ); - }, - ), - ), - ), - ); - final file = File('fakePath'); - when(locator().getPhotoFromGallery(camera: true)) - .thenAnswer((realInvocation) async { - return file; - }); - await tester.tap(find.byKey(const Key('btn1'))); - await tester.pumpAndSettle(); - verify(multimediaPickerService.getPhotoFromGallery(camera: true)) - .called(1); - expect(model.imageFile, file); - }); - - testWidgets('Test if selectImage from gallery method works', - (WidgetTester tester) async { - final model = EditProfilePageViewModel(); - model.initialize(); - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - return ElevatedButton( - key: const Key('btn1'), - onPressed: () => model.selectImage(), - child: const Text('listner'), - ); - }, - ), - ), - ), - ); - final file = File('fakePath'); - when(locator().getPhotoFromGallery()) - .thenAnswer((realInvocation) async { - return file; - }); - await tester.tap(find.byKey(const Key('btn1'))); - await tester.pumpAndSettle(); - - expect(model.imageFile, file); - }); - testWidgets( - 'Test if SelectImage from camera method works if null is returned', - (WidgetTester tester) async { - final model = EditProfilePageViewModel(); - model.initialize(); - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - return ElevatedButton( - key: const Key('btn1'), - onPressed: () => model.selectImage(camera: true), - child: const Text('listner'), - ); - }, - ), - ), - ), - ); - when(locator().getPhotoFromGallery(camera: true)) - .thenAnswer((realInvocation) async { - return null; - }); - await tester.tap(find.byKey(const Key('btn1'))); - await tester.pumpAndSettle(); - verify(multimediaPickerService.getPhotoFromGallery(camera: true)) - .called(1); - expect(model.imageFile, null); - }); - testWidgets( - 'Test if selectImage from gallery method works when null is returned', - (WidgetTester tester) async { - final model = EditProfilePageViewModel(); - model.initialize(); - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - return ElevatedButton( - key: const Key('btn1'), - onPressed: () => model.selectImage(), - child: const Text('listner'), - ); - }, - ), - ), - ), - ); - when(locator().getPhotoFromGallery()) - .thenAnswer((realInvocation) async { - return null; - }); - await tester.tap(find.byKey(const Key('btn1'))); - await tester.pumpAndSettle(); - expect(model.imageFile, null); - }); - - test('No update performed if inputs are the same as existing data', - () async { - final model = EditProfilePageViewModel(); - model.initialize(); - await model.updateUserProfile( - firstName: model.user.firstName, - lastName: model.user.lastName, - newImage: null, - ); - verifyNever( - databaseFunctions.gqlAuthMutation( - queries.updateUserProfile(), - variables: {'id': 'xzy1'}, - ), - ); - }); - - test('convertToBase64 converts file to base64 string', () async { - final model = EditProfilePageViewModel(); - model.initialize(); - //using this asset as the test asset - final file = File('assets/images/Group 8948.png'); - final fileString = await model.convertToBase64(file); - expect(model.base64Image, fileString); - }); - - test('Check if removeImage() is working fine', () async { - final notifyListenerCallback = MockCallbackFunction(); - final model = EditProfilePageViewModel() - ..addListener(notifyListenerCallback); - - model.removeImage(); - - expect(model.imageFile, null); - verify(notifyListenerCallback()).called(1); - }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/profile_page_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/profile_page_view_model_test.dart deleted file mode 100644 index 0b51b0f6f..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/profile_view_model_tests/profile_page_view_model_test.dart +++ /dev/null @@ -1,279 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -class MockBuildContext extends Mock implements BuildContext {} - -void verifyInteraction(dynamic x, {required String mockName}) { - // Ensures that navigation service was called - try { - verifyZeroInteractions(x); - //If 0 interactions passes that means mock was not called hence test fails - throw Exception("Expected interaction but found 0 with $mockName"); - } on TestFailure { - //If test fails then 1 or more interactions with navigation service hence test passes - expect(true, true); - } -} - -void main() async { - testSetupLocator(); - - group('ProfilePageViewModel Tests -', () { - setUpAll(() { - registerServices(); - graphqlConfig.test(); - sizeConfig.test(); - }); - - tearDownAll(() { - unregisterServices(); - }); - - test("Test initialization", () { - final model = ProfilePageViewModel(); - model.initialize(); - expect(model.currentOrg, userConfig.currentOrg); - expect(model.currentUser, userConfig.currentUser); - }); - testWidgets('changeCurrency test', (WidgetTester tester) async { - final model = ProfilePageViewModel(); - model.initialize(); - void mockSetter(void Function() innerFunction) { - innerFunction(); - } - - await tester.pumpWidget( - MaterialApp( - home: Builder( - builder: (context) { - return ElevatedButton( - key: const Key('btn1'), - onPressed: () { - model.changeCurrency(context, mockSetter); - }, - child: const Text('Change Currency'), - ); - }, - ), - ), - ); - - await tester.tap(find.byKey(const Key('btn1'))); - await tester.pumpAndSettle(); - await tester.tap(find.text('USD')); - expect(find.byType(BottomSheet), findsOneWidget); - }); - - test("Test showSnackBar and popBottomSheet function", () { - final model = ProfilePageViewModel(); - model.initialize(); - - model.showSnackBar("fake_message"); - verify( - navigationService.showTalawaErrorDialog( - "fake_message", - MessageType.error, - ), - ).called(1); - - model.popBottomSheet(); - verify(navigationService.pop()); - }); - - test("Test updateSheetHeight function", () { - final model = ProfilePageViewModel(); - model.initialize(); - model.updateSheetHeight(); - expect(model.bottomSheetHeight, SizeConfig.screenHeight! * 0.65); - }); - - testWidgets("Test iconButton function", (tester) async { - final model = ProfilePageViewModel(); - model.initialize(); - bool setterCalled = false; - void mockSetter() { - setterCalled = true; - } - - const Icon testIcon = Icon(Icons.cancel); - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: model.iconButton(testIcon, mockSetter), - ), - ), - ); - await tester.tap(find.byKey(const Key('iconbtn1'))); - expect(setterCalled, true); - final iconButtonFinder = find.byType(IconButton); - final iconButton = tester.firstWidget(iconButtonFinder); - expect((iconButton as IconButton).icon, testIcon); - }); - - testWidgets("Test dominationButton function", (tester) async { - final mockContext = MockBuildContext(); - final model = ProfilePageViewModel(); - model.initialize(); - const String amt = "test_amt"; - model.donationAmount.text = amt; - - bool setterCalled = false; - void mockSetter(void Function() innerFunction) { - setterCalled = true; - innerFunction(); - } - - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: model.dominationButton( - amt, - mockContext, - mockSetter, - ), - ), - ), - ); - await tester.tap(find.byKey(const Key('domBtn_$amt'))); - await tester.pump(); - await tester.pumpAndSettle(); - expect(setterCalled, true); - final containerFinder = find.byType(Container); - final Container container = tester.firstWidget(containerFinder); - expect( - container.padding, - EdgeInsets.symmetric( - vertical: SizeConfig.screenHeight! * 0.02, - horizontal: SizeConfig.screenWidth! * 0.075, - ), - ); - }); - testWidgets("Test invite method", (WidgetTester tester) async { - final model = ProfilePageViewModel(); - model.initialize(); - await tester.pumpWidget( - MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - // Trigger the invite method on button press - return ElevatedButton( - key: const Key('inviteButton'), - onPressed: () => model.invite(context), - child: const Text('Invoke Invite'), - ); - }, - ), - ), - ), - ); - await tester.pumpAndSettle(); - - // model.invite(mockContext); - - await tester.tap(find.byKey(const Key('inviteButton'))); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('iconbtn1'))); - - expect(find.byType(Dialog), findsOneWidget); - expect(find.byType(QrImageView), findsOneWidget); - }); - - testWidgets('attachListener test', (WidgetTester tester) async { - final viewModel = ProfilePageViewModel(); - viewModel.initialize(); - double bottomSheetHeight = 0; - final FocusNode focusNode = viewModel.donationField; - const testFocus = Key('testFocus'); - const testFocus1 = Key('testFocus1'); - - void mockSetter(void Function() innerFunction) { - innerFunction(); - } - - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Builder( - builder: (BuildContext context) { - return Scaffold( - body: Container( - child: Column( - children: [ - TextField( - key: testFocus, - focusNode: focusNode, - ), - TextField( - key: testFocus1, - focusNode: FocusNode(), - ), - ], - ), - ), - ); - }, - ), - ), - ), - ); - - viewModel.attachListener(mockSetter); - await tester.enterText(find.byKey(testFocus), 'test attach listener'); - mockSetter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.8725; - }); - await tester.pump(); - expect(bottomSheetHeight, SizeConfig.screenHeight! * 0.8725); - await tester.enterText( - find.byKey(testFocus1), - 'viewmodel.dontaionField out of focus', - ); - - await tester.pump(const Duration(milliseconds: 300)); - - mockSetter(() { - bottomSheetHeight = SizeConfig.screenHeight! * 0.68; - }); - expect(bottomSheetHeight, SizeConfig.screenHeight! * 0.68); - }); - - // test('logout success', () { - // final model = ProfilePageViewModel(); - // when(userConfig.loggedIn).thenReturn(true); - // model.logoutSuccess(); - - // // when(userConfig.loggedIn).thenReturn(false); - // // model.logoutSuccess(); - - // // verify( navigationService.removeAllAndPush( - // // '/selectLang', - // // '/', - // // arguments: '0', - // // )); - // }); - }); -} diff --git a/test/view_model_tests/after_auth_view_model_tests/settings_view_models_test/app_setting_view_model_test.dart b/test/view_model_tests/after_auth_view_model_tests/settings_view_models_test/app_setting_view_model_test.dart deleted file mode 100644 index 3827b490f..000000000 --- a/test/view_model_tests/after_auth_view_model_tests/settings_view_models_test/app_setting_view_model_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart'; -import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart'; -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockUrlLauncher extends Mock - with MockPlatformInterfaceMixin - implements UrlLauncherPlatform { - @override - Future launchUrl(String url, LaunchOptions? options) { - if (url == 'http://www.success.com') return Future.value(true); - return Future.value(false); - } -} - -void main() async { - SizeConfig().test(); - testSetupLocator(); - - final Directory dir = Directory('test/fixtures/core1'); - - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - await Hive.openBox('currentUser'); - await Hive.openBox('url'); - await Hive.openBox('currentOrg'); - - group('Test for appSettingviewModel', () { - setUpAll(() async { - getAndRegisterNavigationService(); - getAndRegisterUserConfig(); - final mock = MockUrlLauncher(); - UrlLauncherPlatform.instance = mock; - }); - - tearDownAll(() async { - await Hive.close(); - - // Clean up the test directory if needed - dir.delete(recursive: true); - }); - - test('Test logout function.', () { - final model = AppSettingViewModel(); - model.logout(); - }); - - test('test for launchWebsite method', () async { - final model = AppSettingViewModel(); - const successUrl = 'http://www.success.com'; - const failUrl = 'http://www.fail.com'; - - bool opened = false; - - // if successfully launches the website. - opened = await model.launchWebsite(successUrl); - expect(opened, true); - - // if failed to launch the website. - opened = await model.launchWebsite(failUrl); - expect(opened, false); - }); - }); -} diff --git a/test/view_model_tests/base_view_model_test.dart b/test/view_model_tests/base_view_model_test.dart deleted file mode 100644 index 3d62f6559..000000000 --- a/test/view_model_tests/base_view_model_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/view_model/base_view_model.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -void main() { - BaseModel getBaseModel() { - final model = BaseModel(); - return model; - } - - group("BaseViewModel Test- ", () { - final callback = MockCallbackFunction(); - - test("When initialized viewstate should be ViewState.idle", () { - final model = getBaseModel(); - expect(model.state, ViewState.idle); - }); - test("When initialized isBusy should be false ", () { - final model = getBaseModel(); - expect(model.isBusy, false); - }); - - test( - "When setState is called the state should reflect the state passed to the setState function ", - () { - final model = getBaseModel(); - model.setState(ViewState.busy); - expect(model.state, ViewState.busy); - model.setState(ViewState.idle); - expect(model.state, ViewState.idle); - }); - - test("When setState is called, BaseModel should call notifyListners", () { - final model = getBaseModel(); - model.addListener(callback); - model.setState(ViewState.busy); - verify(callback()); - }); - }); -} diff --git a/test/view_model_tests/custom_drawer_view_model_test.dart b/test/view_model_tests/custom_drawer_view_model_test.dart deleted file mode 100644 index 3d5f92550..000000000 --- a/test/view_model_tests/custom_drawer_view_model_test.dart +++ /dev/null @@ -1,284 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -/// Mocked context. -/// -/// more_info_if_required -class MockBuildContext extends Mock implements BuildContext {} - -/// Main. -/// -/// more_info_if_required -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - locator(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - group('CustomDrawerViewModel Tests', () { - test('switchAbleOrg should correctly get and set value', () { - final model = CustomDrawerViewModel(); - final orgList = [ - OrgInfo(name: 'Test Org 1'), - OrgInfo(name: 'Test Org 2'), - ]; - - model.switchAbleOrg = orgList; - - expect(model.switchAbleOrg, equals(orgList)); - }); - test("initialize should setup the model with user's joined organizations", - () { - final homeModel = MainScreenViewModel(); - final MockBuildContext mockContext = MockBuildContext(); - final model = CustomDrawerViewModel(); - final user = User(joinedOrganizations: [OrgInfo(name: 'Test Org')]); - - when(userConfig.currentOrgInfoStream) - .thenAnswer((_) => Stream.value(OrgInfo())); - when(userConfig.currentUser).thenReturn(user); - when(userConfig.currentOrg).thenReturn(OrgInfo()); - - model.initialize(homeModel, mockContext); - - expect(model.switchAbleOrg, equals(user.joinedOrganizations)); - }); - - test('switchOrg should show info message if different organization', () { - final model = CustomDrawerViewModel(); - final orgInfo = OrgInfo(name: 'Test Org'); - - when(userConfig.currentOrg).thenReturn(OrgInfo(name: 'Current Org')); - model.switchAbleOrg = [orgInfo]; - - model.switchOrg(orgInfo); - - verify( - navigationService.showTalawaErrorSnackBar( - 'Switched to ${orgInfo.name}', - MessageType.info, - ), - ); - }); - - test('switchOrg should pop navigation after switching or showing error', - () { - final model = CustomDrawerViewModel(); - final orgInfo = OrgInfo(name: 'Test Org'); - - when(userConfig.currentOrg).thenReturn(OrgInfo(name: 'Current Org')); - model.switchAbleOrg = [orgInfo]; - - model.switchOrg(orgInfo); - - verify(navigationService.pop()); - }); - - test('initialize should setup the model with userConfig values', () { - final homeModel = MainScreenViewModel(); - final MockBuildContext mockContext = MockBuildContext(); - final model = CustomDrawerViewModel(); - final user = User(joinedOrganizations: [OrgInfo(name: 'Test Org')]); - - when(userConfig.currentOrgInfoStream) - .thenAnswer((_) => Stream.value(OrgInfo())); - when(userConfig.currentUser).thenReturn(user); - when(userConfig.currentOrg).thenReturn(OrgInfo()); - - model.initialize(homeModel, mockContext); - - expect(model.switchAbleOrg, equals(user.joinedOrganizations)); - expect(model.selectedOrg, equals(userConfig.currentOrg)); - }); - test( - 'switchOrg should save new organization in userConfig if different organization', - () { - final model = CustomDrawerViewModel(); - final orgInfo = OrgInfo(name: 'Test Org'); - - when(userConfig.currentOrg).thenReturn(OrgInfo(name: 'Current Org')); - model.switchAbleOrg = [orgInfo]; - - model.switchOrg(orgInfo); - - verify(userConfig.saveCurrentOrgInHive(orgInfo)); - verify( - navigationService.showTalawaErrorSnackBar( - 'Switched to ${orgInfo.name}', - MessageType.info, - ), - ); - }); - - test('check if switchOrg is working with zero switchable orgs', () { - final model = CustomDrawerViewModel(); - model.setSelectedOrganizationName(userConfig.currentOrg); - - //No switchable org are present in the model - model.switchAbleOrg = []; - - //Acess mock joined Organisation for the mock user - final OrgInfo mockJoinedOrg = - userConfig.currentUser.joinedOrganizations!.first; - - //check if selected org is mocked joined org .Expectation-false. - expect(model.selectedOrg, isNot(mockJoinedOrg)); - }); - - test('check if switchOrg is working with wrong switchable org being passed', - () { - final model = CustomDrawerViewModel(); - model.setSelectedOrganizationName(userConfig.currentOrg); - - //Mock switchable org are present in the model - model.switchAbleOrg = userConfig.currentUser.joinedOrganizations!; - - //Mock fake org which is not present in the mock switchableOrg - - //Acess mock joined Organisation for the mock user - final OrgInfo fakeOrg = OrgInfo( - id: '5', - name: 'fake org 1', - userRegistrationRequired: true, - creatorInfo: User(firstName: 'fake', lastName: 'user'), - ); - //check if the mocked org is present or not - - final isPresent = model.isPresentinSwitchableOrg(fakeOrg); - - //expecting that the org is not present so will return false - expect(isPresent, false); - //check if selected org is changed or not. Expected-Not changing - expect(model.selectedOrg, isNot(fakeOrg)); - }); - - test('check if switchOrg is working with mock joined orgs', () async { - final model = CustomDrawerViewModel(); - final homeModel = MainScreenViewModel(); - final MockBuildContext mockContext = MockBuildContext(); - //Intializing a mock model with mockBuildContext - model.initialize(homeModel, mockContext); - //Storing the first switchable org in mockOrgInfo - final OrgInfo mockChangeOrgTo = model.switchAbleOrg.first; - - //Calling the switchOrg function - model.switchOrg(mockChangeOrgTo); - - //expecting the selected org will be equal to the mockChangeOrgto returns true - expect(model.selectedOrg, mockChangeOrgTo); - }); - - test('setSelectedOrganizationName should update selectedOrg if different', - () { - final model = CustomDrawerViewModel(); - final orgInfo = OrgInfo(name: 'Test Org'); - - model.setSelectedOrganizationName(orgInfo); - - expect(model.selectedOrg, equals(orgInfo)); - }); - - test('Check if OrgInfo is present in switchAbleOrg', () { - final model = CustomDrawerViewModel(); - model.switchAbleOrg = [ - OrgInfo(id: '1'), - OrgInfo(id: '2'), - OrgInfo(id: '3'), - ]; - final switchToOrg = OrgInfo(id: '2'); - - final result = model.isPresentinSwitchableOrg(switchToOrg); - - expect(result, true); - }); - - test('Check if OrgInfo is not present in switchAbleOrg', () { - final model = CustomDrawerViewModel(); - model.switchAbleOrg = [ - OrgInfo(id: '1'), - OrgInfo(id: '2'), - OrgInfo(id: '3'), - ]; - final switchToOrg = OrgInfo(id: '4'); - - final result = model.isPresentinSwitchableOrg(switchToOrg); - - expect(result, false); - }); - - test( - 'setSelectedOrganizationName should show error snackbar if org is same as selected', - () { - final homeModel = MainScreenViewModel(); - final MockBuildContext mockContext = MockBuildContext(); - final model = CustomDrawerViewModel(); - final user = - User(joinedOrganizations: [OrgInfo(id: '1', name: 'Test Org1')]); - - when(userConfig.currentOrgInfoStream) - .thenAnswer((_) => Stream.value(OrgInfo(id: '1', name: 'Test Org1'))); - when(userConfig.currentUser).thenReturn(user); - when(userConfig.currentOrg) - .thenReturn(OrgInfo(id: '1', name: 'Test Org1')); - model.initialize(homeModel, mockContext); - final switchToOrg = OrgInfo(id: '1', name: 'Test Org1'); - model.setSelectedOrganizationName(switchToOrg); - final result1 = model.isPresentinSwitchableOrg(switchToOrg); - - expect(result1, true); - // expect(model.selectedOrg, equals(userConfig.currentOrg)); - model.switchOrg(switchToOrg); - final result = model.isPresentinSwitchableOrg(switchToOrg); - - expect(result, true); - expect(model.selectedOrg, equals(switchToOrg)); - verify( - navigationService.showTalawaErrorSnackBar( - '${switchToOrg.name} already selected', - MessageType.warning, - ), - ).called(1); - }); - test('controller should return ScrollController instance', () { - final model = CustomDrawerViewModel(); - expect(model.controller, isA()); - }); - - test('targets should return List instance', () { - final model = CustomDrawerViewModel(); - expect(model.targets, isA>()); - }); - - test('selectedOrg should be initially null', () { - final model = CustomDrawerViewModel(); - expect(model.selectedOrg, isNull); - }); - }); -} diff --git a/test/view_model_tests/lang_view_model_test.dart b/test/view_model_tests/lang_view_model_test.dart deleted file mode 100644 index d1a9491ab..000000000 --- a/test/view_model_tests/lang_view_model_test.dart +++ /dev/null @@ -1,193 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - WidgetsFlutterBinding.ensureInitialized(); - SharedPreferences.setMockInitialValues({}); - - testSetupLocator(); - locator().test(); - - setUp(() { - registerServices(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Language View Model Tests', () { - test("test change language", () async { - final model = AppLanguage(isTest: true); - model.initialize(); - - // check that initially the app language is set to english - final Locale locale = model.appLocal; - expect(locale, const Locale('en')); - - // test changeLanguage function with same language as before - model.changeLanguage(const Locale('en')); - expect(model.appLocal, const Locale('en')); - - // test changeLanguage function with different language - model.changeLanguage(const Locale('es')); - final Locale changedLocale = model.appLocal; - expect(changedLocale, const Locale('es')); - }); - - test('change language with isTest false', () async { - final model = AppLanguage(isTest: false); - model.initialize(); - - // check that initially the app language is set to english - final Locale locale = model.appLocal; - expect(locale, const Locale('en')); - - // test changeLanguage function with same language as before - await model.changeLanguage(const Locale('en')); - expect(model.appLocal, const Locale('en')); - - // test changeLanguage function with different languages - await model.changeLanguage(const Locale('es')); - Locale changedLocale = model.appLocal; - expect(model.appLocal, const Locale('es')); - - await model.changeLanguage(const Locale('fr')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('fr')); - - await model.changeLanguage(const Locale('hi')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('hi')); - - await model.changeLanguage(const Locale('zh')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('zh')); - - await model.changeLanguage(const Locale('de')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('de')); - - await model.changeLanguage(const Locale('ja')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('ja')); - - await model.changeLanguage(const Locale('pt')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('pt')); - - await model.changeLanguage(const Locale('en')); - changedLocale = model.appLocal; - expect(changedLocale, const Locale('en')); - }); - - test("test functions", () async { - final model = AppLanguage(isTest: true); - await model.initialize(); - - // consider if user is not logged in. - when(userConfig.currentUser).thenReturn(User(id: 'null')); - - when( - navigationService.pushScreen( - Routes.mainScreen, - arguments: MainScreenArgs( - mainScreenIndex: 0, - fromSignUp: false, - toggleDemoMode: true, - ), - ), - ).thenAnswer((_) async {}); - - await model.selectLanguagePress(); - verify( - navigationService.pushScreen( - Routes.mainScreen, - arguments: MainScreenArgs( - mainScreenIndex: 0, - fromSignUp: false, - toggleDemoMode: true, - ), - ), - ); - - // consider if user is logged in. - when(userConfig.currentUser).thenReturn(User(id: 'xyz1')); - - when( - navigationService.popAndPushScreen( - '/appSettingsPage', - arguments: '', - ), - ).thenAnswer((_) async {}); - - databaseFunctions.init(); - - when( - databaseFunctions.gqlAuthMutation( - queries.updateLanguage(model.appLocal.languageCode), - ), - ).thenAnswer((_) async {}); - - await model.selectLanguagePress(); - - verify( - databaseFunctions.gqlAuthMutation( - queries.updateLanguage(model.appLocal.languageCode), - ), - ); - verify( - navigationService.popAndPushScreen( - '/appSettingsPage', - arguments: '', - ), - ); - - // testing userLanguageQuery function - const userId = "xyz1"; - when(databaseFunctions.gqlAuthQuery(queries.newUserLanguage(userId))) - .thenAnswer((_) async {}); - await model.userLanguageQuery(userId); - verify(databaseFunctions.gqlAuthQuery(queries.newUserLanguage(userId))); - - //testing appLanguageQueryFunction - when(databaseFunctions.gqlAuthQuery(queries.userLanguage())) - .thenAnswer((_) async {}); - await model.appLanguageQuery(); - verify(databaseFunctions.gqlAuthQuery(queries.userLanguage())); - - //testing catch block in userLanguageQuery - when(databaseFunctions.gqlAuthQuery(queries.newUserLanguage(userId))) - .thenThrow(Error()); - await model.userLanguageQuery(userId); - - //testing catch block in appLanguageQuery - when(databaseFunctions.gqlAuthQuery(queries.userLanguage())) - .thenThrow(Error()); - await model.appLanguageQuery(); - - //testing catch block in dbLanguageUpdate - when( - databaseFunctions.gqlAuthMutation( - queries.updateLanguage(model.appLocal.languageCode), - ), - ).thenThrow(Error()); - await model.dbLanguageUpdate(); - }); - }); -} diff --git a/test/view_model_tests/main_screen_view_model_test.dart b/test/view_model_tests/main_screen_view_model_test.dart deleted file mode 100644 index 0d07f071d..000000000 --- a/test/view_model_tests/main_screen_view_model_test.dart +++ /dev/null @@ -1,751 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/app_tour.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -import 'package:talawa/widgets/custom_drawer.dart'; -import 'package:talawa/widgets/theme_switch.dart'; -import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -// import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; - -import '../helpers/test_helpers.dart'; -// import '../helpers/test_helpers.mocks.dart'; -import '../helpers/test_locator.dart'; -import '../model_tests/app_tour_test.dart'; - -class MockLocalMainScreenViewModel extends MainScreenViewModel { - int stackLength = 0; - @override - void tourEventTargets() { - stackLength++; - // TODO: implement tourEventTargets - super.tourEventTargets(); - } - - @override - void tourProfile() { - stackLength++; - // TODO: implement tourProfile - super.tourProfile(); - } -} - -typedef FunctionType = void Function(MainScreenViewModel model2); - -Widget createMainScreenViewModelScreen(FunctionType onTap) { - final GlobalKey key = MainScreenViewModel.scaffoldKey; - return MaterialApp( - builder: (context, child) => BaseView( - builder: (context, model2, child) { - model2.context = context; - model2.testMode = true; - model2.appTour = MockAppTour(model: model2); - model2.currentPageIndex = 0; - return Scaffold( - key: key, - drawer: const Text('drawer123'), - body: TextButton( - onPressed: () { - onTap(model2); - }, - child: const Text('tour home'), - ), - ); - }, - ), - ); -} - -Widget createAppTourDialog({bool demoMode = true}) => BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: BaseView( - onModelReady: (model2) => model2.initialise( - context, - fromSignUp: false, - mainScreenIndex: 0, - demoMode: demoMode, - testMode: true, - ), - builder: (context, model2, child) { - model2.context = context; - model2.appTour = MockAppTour(model: model2); - model2.pluginPrototypeData.putIfAbsent( - "Plugin1", - () => { - "pluginName": "Plugin1", - "pluginInstallStatus": true, - 'icon': Icons.abc, - 'class': const ChangeThemeTile(), - }, - ); - model2.fetchAndAddPlugins(context); - return Scaffold( - drawer: CustomDrawer(homeModel: model2), - key: MainScreenViewModel.scaffoldKey, - body: model2.appTourDialog(context), - ); - }, - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -class MockCallBack extends Mock { - void call(); -} - -class MockBuildContext extends Mock implements BuildContext {} - -MainScreenViewModel getModel() { - final model = MainScreenViewModel(); - model.context = MockBuildContext(); - return model; -} - -void verifyInteraction(dynamic x, {required String mockName}) { - // Ensures that navigation service was called - try { - verifyZeroInteractions(x); - //If 0 interactions passes that means mock was not called hence test fails - throw Exception("Expected interaction but found 0 with $mockName"); - } on TestFailure { - //If test fails then 1 or more interactions with navigation service hence test passes - expect(true, true); - } -} - -void main() async { - final Directory dir = Directory('test/fixtures/core'); - - Hive.init(dir.path); - // ..registerAdapter(UserAdapter()) - // ..registerAdapter(OrgInfoAdapter()); - - // final userBox = await Hive.openBox('currentUser'); - // final urlBox = await Hive.openBox('url'); - // final orgBox = await Hive.openBox('currentOrg'); - final pluginBox = await Hive.openBox('pluginBox'); - - final List> samplePluginData = [ - { - "pluginName": "Plugin1", - "pluginInstallStatus": true, - }, - // Add more sample plugin data as needed - ]; - - // Store the sample data in the 'plugins' key of 'pluginBox' - pluginBox.put('plugins', samplePluginData); - - // No need to change - setUpAll(() { - locator.registerFactory(() => CustomDrawerViewModel()); - locator.registerFactory(() => MainScreenViewModel()); - locator.registerFactory(() => AppTheme()); - locator.registerSingleton(SizeConfig()); - locator.registerFactory(() => Queries()); - locator().test(); - }); - - tearDownAll(() { - locator.unregister(); - File('test/fixtures/core/currentorg.hive').delete(); - File('test/fixtures/core/currentorg.lock').delete(); - File('test/fixtures/core/currentuser.hive').delete(); - File('test/fixtures/core/currentuser.lock').delete(); - File('test/fixtures/core/pluginbox.hive').delete(); - File('test/fixtures/core/pluginbox.lock').delete(); - }); - - group("MainScreen ViewModel Tests - ", () { - test("When initialized current index should be 0", () { - final mainTestModel = getModel(); - expect(mainTestModel.currentPageIndex, 0); - }); - }); - - // May need to change - group("onTabTapped -", () { - test("When an index is passed that, current index should equal that index", - () { - final mainTestModel = getModel(); - mainTestModel.onTabTapped(4); - expect(mainTestModel.currentPageIndex, 4); - }); - - test("When called function should notify listeners of tab change", () { - final mockcallback = MockCallBack(); - final mainTestModel = getModel(); - mainTestModel.addListener(mockcallback); - - mainTestModel.onTabTapped(0); - verify(mockcallback()).called(1); - }); - }); - - group("initialize", () { - final context = MockBuildContext(); - SizeConfig().test(); - setUp(() => registerServices()); - tearDown(() => unregisterServices()); - - void runIntialize({ - required bool fSignUp, - int mainIndex = 1, - required MainScreenViewModel model, - BuildContext? pcontext, - }) { - model.initialise( - pcontext ?? context, - fromSignUp: fSignUp, - mainScreenIndex: mainIndex, - ); - } - - test( - "MainScreenViewModel showAppTour and currentIndex should equal values passed to fromSignUp and mainScreenIndex", - () { - const bool fSignup = true; - const int mainIndex = 1; - final mainTestModel = getModel(); - runIntialize( - fSignUp: fSignup, - mainIndex: mainIndex, - model: mainTestModel, - ); - - expect(mainTestModel.showAppTour, fSignup); - expect(mainTestModel.currentPageIndex, mainIndex); - }); - - test('Test for showHome method', () { - final model = getModel(); - - model.showHome( - TargetFocus( - identify: "keyDrawerLeaveCurrentOrg", - keyTarget: MainScreenViewModel.keyDrawerLeaveCurrentOrg, - ), - ); - }); - - test( - "When fromSignUp is false tourComplete should equal true, tourSkipped and showApptour false", - () { - final mainTestModel = getModel(); - runIntialize(fSignUp: false, model: mainTestModel); - expect(mainTestModel.tourComplete, true); - expect(mainTestModel.tourSkipped, false); - expect(mainTestModel.showAppTour, false); - }); - - test("When fromSignUp is false, App Tour dialog should not be displayed", - () async { - final mocknav = getAndRegisterNavigationService(); - final mainTestModel = getModel(); - - mainTestModel.initialise( - MockBuildContext(), - fromSignUp: false, - mainScreenIndex: 0, - ); - - // Ensures that navigation service was not called - verifyZeroInteractions(mocknav); - }); - - testWidgets('Test for apptour dialog skip action.', (tester) async { - await tester.pumpWidget(createAppTourDialog()); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.byType(CustomAlertDialog), findsOneWidget); - - // await tester.pumpAndSettle(); - - final skipBtn = find.textContaining('Skip'); - - expect(skipBtn, findsOneWidget); - - await tester.tap(skipBtn); - await tester.pumpAndSettle( - const Duration(seconds: 1), - ); - }); - - testWidgets('Test for apptour dialog success action.', (tester) async { - await tester.pumpWidget(createAppTourDialog()); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final mockUserConfig = getAndRegisterUserConfig(); - when(mockUserConfig.loggedIn).thenReturn(true); - - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - - expect(find.byType(CustomAlertDialog), findsOneWidget); - - final startBtn = find.textContaining('Start').last; - - expect(startBtn, findsOneWidget); - - await tester.tap(startBtn); - - await tester.pumpAndSettle(const Duration(seconds: 2)); - }); - - testWidgets('Test for fetchAndAddPlugins when not in demoMode', - (tester) async { - final app = createAppTourDialog(demoMode: false); - - await tester.pumpWidget(app); - await tester.pumpAndSettle(const Duration(seconds: 1)); - }); - - group('Tests for tour', () { - late UserConfig model; - late List expectedTargets; - late Map keysMap; - final GlobalKey key = MainScreenViewModel.scaffoldKey; - setUp(() { - keysMap = {}; - expectedTargets = []; - model = getAndRegisterUserConfig(); - }); - testWidgets('Test for tourhomeTargets when userconfig.loggedin is true.', - (tester) async { - const val1 = true; - when(model.loggedIn).thenAnswer((_) => val1); - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourComplete = true; - model2.tourHomeTargets(); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - // ignore: avoid_dynamic_calls - model2.targets[1].next!(); - // ignore: avoid_dynamic_calls - model2.targets[5].next!(); - keysMap = { - 'keySHOrgName': model2.keySHOrgName, - 'keySHMenuIcon': model2.keySHMenuIcon, - 'keyDrawerCurOrg': MainScreenViewModel.keyDrawerCurOrg, - 'keyDrawerSwitchableOrg': - MainScreenViewModel.keyDrawerSwitchableOrg, - 'keyDrawerJoinOrg': MainScreenViewModel.keyDrawerJoinOrg, - 'keyDrawerLeaveCurrentOrg': - MainScreenViewModel.keyDrawerLeaveCurrentOrg, - 'keyBNHome': model2.keyBNHome, - 'keySHPinnedPost': model2.keySHPinnedPost, - 'keySHPost': model2.keySHPost, - }; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(find.text('drawer123'), findsOneWidget); - - expect(expectedTargets.length, 9); - - final List keyNames = keysMap.keys.toList(); - - for (int i = 0; i < expectedTargets.length; i++) { - expect(expectedTargets[i].keyName, keyNames[i]); - expect(expectedTargets[i].key, keysMap[keyNames[i]]); - if (i != 1 && i != 4 && i != 5) { - expect(expectedTargets[i].next, null); - } else { - expect(expectedTargets[i].next, isNotNull); - } - } - }); - testWidgets('Whether AppTour is initialized or not', (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - late AppTour appTour; - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - appTour = model2.appTour; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(appTour, isNotNull); - }); - - testWidgets('Test for tourhomeTargets when userconfig.loggedin is false.', - (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourComplete = true; - model2.tourHomeTargets(model); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - // ignore: avoid_dynamic_calls - model2.targets[4].next!(); - keysMap = { - 'keySHOrgName': model2.keySHOrgName, - 'keySHMenuIcon': model2.keySHMenuIcon, - 'keyDrawerCurOrg': MainScreenViewModel.keyDrawerCurOrg, - 'keyDrawerSwitchableOrg': - MainScreenViewModel.keyDrawerSwitchableOrg, - 'keyDrawerJoinOrg': MainScreenViewModel.keyDrawerJoinOrg, - 'keyBNHome': model2.keyBNHome, - 'keySHPinnedPost': model2.keySHPinnedPost, - 'keySHPost': model2.keySHPost, - }; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(expectedTargets.length, 8); - - final List keyNames = keysMap.keys.toList(); - - for (int i = 0; i < expectedTargets.length; i++) { - expect(expectedTargets[i].keyName, keyNames[i]); - expect(expectedTargets[i].key, keysMap[keyNames[i]]); - if (i != 1 && i != 4) { - expect(expectedTargets[i].next, null); - } else { - expect(expectedTargets[i].next, isNotNull); - } - } - }); - testWidgets( - 'Test for tourhomeTargets whether correct function is called when tour is not exited.', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: MaterialApp( - home: Scaffold( - key: key, - body: Container(), - ), - ), - ), - ); - final BuildContext context = tester.element(find.byType(Container)); - final MainScreenViewModel modelForKeys = MainScreenViewModel(); - final MockLocalMainScreenViewModel model = - MockLocalMainScreenViewModel(); - model.context = context; - model.testMode = true; - model.appTour = MockAppTour(model: model); - model.currentPageIndex = 0; - model.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: modelForKeys.keySHMenuIcon, - ), - ); - model.tourHomeTargets(); - expect(model.stackLength, 2); - }); - - testWidgets('Test for tourEventTargets.', (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourComplete = true; - model2.tourEventTargets(); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - keysMap = { - 'keyBNEvents': model2.keyBNEvents, - 'keySECategoryMenu': model2.keySECategoryMenu, - 'keySEDateFilter': model2.keySEDateFilter, - 'keySECard': model2.keySECard, - 'keySEAdd': model2.keySEAdd, - }; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(expectedTargets.length, 5); - - final List keyNames = keysMap.keys.toList(); - - for (int i = 0; i < expectedTargets.length; i++) { - expect(expectedTargets[i].keyName, keyNames[i]); - expect(expectedTargets[i].key, keysMap[keyNames[i]]); - expect(expectedTargets[i].next, null); - } - }); - - testWidgets('Test for tourChats.', (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourComplete = true; - model2.tourChat(); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - // ignore: avoid_dynamic_calls - keysMap = {'keyBNChat': model2.keyBNChat}; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(expectedTargets.length, 1); - - final List keyNames = keysMap.keys.toList(); - - expect(expectedTargets[0].keyName, keyNames[0]); - expect(expectedTargets[0].key, keysMap[keyNames[0]]); - expect(expectedTargets[0].next, null); - }); - testWidgets( - 'Test for tourChat whether correct function is called when tour is not exited.', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: MaterialApp( - home: Scaffold( - key: key, - body: Container(), - ), - ), - ), - ); - final BuildContext context = tester.element(find.byType(Container)); - final MainScreenViewModel modelForKeys = MainScreenViewModel(); - final MockLocalMainScreenViewModel model = - MockLocalMainScreenViewModel(); - model.context = context; - model.testMode = true; - model.appTour = MockAppTour(model: model); - model.currentPageIndex = 0; - model.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: modelForKeys.keySHMenuIcon, - ), - ); - model.tourChat(); - expect(model.stackLength, 1); - }); - - testWidgets('Test for addPost.', (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourComplete = true; - model2.tourAddPost(); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - // ignore: avoid_dynamic_calls - keysMap = {'keyBNPost': model2.keyBNPost}; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(expectedTargets.length, 1); - - final List keyNames = keysMap.keys.toList(); - - expect(expectedTargets[0].keyName, keyNames[0]); - expect(expectedTargets[0].key, keysMap[keyNames[0]]); - expect(expectedTargets[0].next, null); - }); - testWidgets( - 'Test for tourAddPost whether correct function is called when tour is not exited.', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: MaterialApp( - home: Scaffold( - key: key, - body: Container(), - ), - ), - ), - ); - final BuildContext context = tester.element(find.byType(Container)); - final MainScreenViewModel modelForKeys = MainScreenViewModel(); - final MockLocalMainScreenViewModel model = - MockLocalMainScreenViewModel(); - model.context = context; - model.testMode = true; - model.appTour = MockAppTour(model: model); - model.currentPageIndex = 0; - model.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: modelForKeys.keySHMenuIcon, - ), - ); - model.tourAddPost(); - expect(model.stackLength, 1); - }); - - testWidgets('Test for profile tour.', (tester) async { - const val1 = false; - when(model.loggedIn).thenAnswer((_) => val1); - late MainScreenViewModel mainScreenViewModel; - - await tester.pumpWidget( - createMainScreenViewModelScreen((model2) { - model2.showHome( - TargetFocus( - identify: "keySHMenuIcon", - keyTarget: model2.keySHMenuIcon, - ), - ); - model2.tourProfile(); - for (int i = 0; i < model2.targets.length; i++) { - expectedTargets.add(model2.targets[i]); - } - keysMap = { - 'keyBNProfile': model2.keyBNProfile, - 'keySPAppSetting': model2.keySPAppSetting, - 'keySPHelp': model2.keySPHelp, - 'keySPDonateUs': model2.keySPDonateUs, - 'keySPPalisadoes': model2.keySPPalisadoes, - }; - mainScreenViewModel = model2; - }), - ); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect(find.textContaining('tour home'), findsOneWidget); - - await tester.tap(find.textContaining('tour home')); - - await tester.pump(); - - expect(expectedTargets.length, 5); - - final List keyNames = keysMap.keys.toList(); - - for (int i = 0; i < expectedTargets.length; i++) { - expect(expectedTargets[i].keyName, keyNames[i]); - expect(expectedTargets[i].key, keysMap[keyNames[i]]); - expect(expectedTargets[i].next, null); - } - expect(mainScreenViewModel.currentPageIndex, 0); - expect(mainScreenViewModel.tourComplete, true); - }); - }); - }); -} diff --git a/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart deleted file mode 100644 index b9f1c737e..000000000 --- a/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart +++ /dev/null @@ -1,173 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -// import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -// import 'package:talawa/constants/routing_constants.dart'; -// import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/view_model/pre_auth_view_models/login_view_model.dart'; - -import '../../helpers/test_helpers.dart'; -// import 'package:talawa/utils/queries.dart'; -// import 'package:talawa/view_model/pre_auth_view_models/login_view_model.dart'; - -// import '../../helpers/test_helpers.dart'; - -final data = { - 'login': { - 'user': { - '_id': 'xzy1', - 'firstName': 'Test', - 'lastName': 'User', - 'email': 'testuser@gmail.com', - }, - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, -}; - -bool empty = false; - -Future main() async { - // setupFirebaseMocks(); - // await Firebase.initializeApp(); - // FirebaseMessagingPlatform.instance = kMockMessagingPlatform; - - setUp(() async { - locator.registerSingleton(Queries()); - registerServices(); - await locator.unregister(); - }); - tearDown(() async { - await locator.unregister(); - }); - - group('LoginViewModel Test -', () { - testWidgets( - 'Check if login() is working fine when organisation is not empty', - (tester) async { - locator.registerSingleton(MockUserConfig()); - - final model = LoginViewModel(); - - await tester.pumpWidget( - Form( - key: model.formKey, - child: Container(), - ), - ); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.loginUser('', ''))), - ); - - when(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))) - .thenAnswer((_) async => result); - - await model.login(); - expect(model.validate, AutovalidateMode.disabled); - verify(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))); - }); - testWidgets('Check if login() is working fine when organisation empty', - (tester) async { - empty = true; - locator.registerSingleton(MockUserConfig()); - - final model = LoginViewModel(); - - await tester.pumpWidget( - Form( - key: model.formKey, - child: Container(), - ), - ); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.loginUser('', ''))), - ); - - when(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))) - .thenAnswer((_) async => result); - - await model.login(); - expect(model.validate, AutovalidateMode.disabled); - verify(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))); - }); - testWidgets('Check if login() is working fine when invalid credentials', - (tester) async { - reset(navigationService); - final model = LoginViewModel(); - - await tester.pumpWidget( - Form( - key: model.formKey, - child: Container(), - ), - ); - - when(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))) - .thenAnswer((_) async => null); - - await model.login(); - expect(model.validate, AutovalidateMode.disabled); - verify(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - }); - testWidgets('Check if login() is working fine when throws error', - (tester) async { - final model = LoginViewModel(); - - await tester.pumpWidget( - Form( - key: model.formKey, - child: Container(), - ), - ); - - when(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))) - .thenThrow(Exception()); - - await model.login(); - expect(model.validate, AutovalidateMode.disabled); - verify(databaseFunctions.gqlNonAuthMutation(queries.loginUser('', ''))); - }); - }); -} - -class MockUserConfig extends Mock implements UserConfig { - @override - User get currentUser => User( - joinedOrganizations: empty - ? [] - : [ - OrgInfo( - id: '3', - name: 'test org 3', - userRegistrationRequired: false, - creatorInfo: User(firstName: 'test', lastName: '1'), - ), - ], - ); - - @override - Future updateUser(User user) async => true; -} diff --git a/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart deleted file mode 100644 index 880fafdc5..000000000 --- a/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart +++ /dev/null @@ -1,779 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/queries.dart'; - -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; - -import '../../helpers/test_helpers.dart'; - -class SelectOrganizationViewModelWidget extends StatelessWidget { - const SelectOrganizationViewModelWidget({ - required this.qrKey, - this.child, - this.focusNode, - this.autoFocus, - super.key, - }); - final GlobalKey qrKey; - final FocusNode? focusNode; - final bool? autoFocus; - final Widget? child; - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - body: Container( - key: qrKey, - child: child ?? - TextField( - autofocus: autoFocus ?? false, - focusNode: focusNode, - ), - ), - ), - navigatorKey: navigationService.navigatorKey, - ); - } -} - -const initialiseString = "Org Id"; -late OrgInfo org; - -class _MockUserConfig extends Mock implements UserConfig { - @override - Future updateUserMemberRequestOrg(List? orgDetails) async => - Future.value(1); - - @override - User get currentUser => _user; - - @override - Future userLoggedIn() async => _userLoggedIn; - - @override - Future updateUserJoinedOrg(List orgDetails) async => 1; - - @override - int saveCurrentOrgInHive(OrgInfo saveOrgAsCurrent) => 1; -} - -User _user = User(); -bool _userLoggedIn = true; - -void main() { - SizeConfig().test(); - setUp(() async { - org = OrgInfo( - id: '3', - name: 'test org 3', - userRegistrationRequired: false, - creatorInfo: User(firstName: 'test', lastName: '1'), - ); - locator.registerSingleton(Queries()); - registerServices(); - locator.unregister(); - _user = User(); - _userLoggedIn = true; - }); - - tearDown(() async { - await locator.unregister(); - unregisterServices(); - }); - - group('Test for select organization view model - ', () { - testWidgets('Test for search Active function when focusNode has focus', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - focusNode: selectOrganizationViewModel.searchFocus, - autoFocus: true, - ), - ); - selectOrganizationViewModel.searchFocus.requestFocus(); - expect(selectOrganizationViewModel.searchFocus.hasFocus, true); - selectOrganizationViewModel.searchActive(); - - expect(selectOrganizationViewModel.organizations, []); - expect(selectOrganizationViewModel.searching, true); - expect(selectOrganizationViewModel.isBusy, false); - }); - - testWidgets( - 'Test for search Active function when focusNode does not have focus', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - focusNode: selectOrganizationViewModel.searchFocus, - ), - ); - expect(selectOrganizationViewModel.searchFocus.hasFocus, false); - selectOrganizationViewModel.searchActive(); - - expect(selectOrganizationViewModel.organizations, []); - expect(selectOrganizationViewModel.searching, false); - expect(selectOrganizationViewModel.isBusy, false); - }); - testWidgets('Test for successful initialise function', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - _user = User(refreshToken: ''); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - when(databaseFunctions.fetchOrgById(initialiseString)) - .thenAnswer((realInvocation) async => org); - - await selectOrganizationViewModel.initialise(initialiseString); - verify( - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: org, - ), - ); - - expect(selectOrganizationViewModel.isBusy, false); - }); - testWidgets('Test for initialise function when initialise data contains -1', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await selectOrganizationViewModel.initialise('-1 $initialiseString'); - verifyNever( - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: org, - ), - ); - - expect(selectOrganizationViewModel.isBusy, false); - }); - testWidgets( - 'Test for initialise function when fetch.runtimeType is != OrgInfo', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - when(databaseFunctions.fetchOrgById(initialiseString)) - .thenAnswer((realInvocation) async => 'hey'); - - await selectOrganizationViewModel.initialise(initialiseString); - - verifyNever( - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: org, - ), - ); - - expect(selectOrganizationViewModel.isBusy, false); - }); - testWidgets('Test for initialise function when refreshToken is not empty', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - _user = User(refreshToken: 'testtoken'); - _userLoggedIn = false; - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - when(databaseFunctions.fetchOrgById(initialiseString)) - .thenAnswer((realInvocation) async => org); - - await selectOrganizationViewModel.initialise(initialiseString); - - verifyNever( - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: org, - ), - ); - - expect(selectOrganizationViewModel.isBusy, false); - }); - testWidgets('Test for successful selectOrg function', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = org; - - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenAnswer((realInvocation) async { - final data = { - 'joinPublicOrganization': { - 'joinedOrganizations': [], - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - ); - }); - - _userLoggedIn = true; - _user = User( - joinedOrganizations: [ - OrgInfo( - id: '1', - ), - ], - membershipRequests: [ - OrgInfo( - id: '1', - ), - ], - ); - - await selectOrganizationViewModel.selectOrg(org); - - expect(selectOrganizationViewModel.selectedOrganization, org); - }); - testWidgets( - 'Test for successful selectOrg function when org requires userRegistration', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - org.userRegistrationRequired = true; - selectOrganizationViewModel.selectedOrganization = org; - - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenAnswer((realInvocation) async { - final data = { - 'joinPublicOrganization': { - 'joinedOrganizations': [], - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - ); - }); - - _userLoggedIn = true; - _user = User( - joinedOrganizations: [ - OrgInfo( - id: '1', - ), - ], - membershipRequests: [ - OrgInfo( - id: '1', - ), - ], - ); - - await selectOrganizationViewModel.selectOrg(org); - - expect(selectOrganizationViewModel.selectedOrganization, org); - }); - - testWidgets('Test for selectOrg function when userLoggedIn is false', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - _userLoggedIn = false; - - await selectOrganizationViewModel.selectOrg(org); - - expect(selectOrganizationViewModel.selectedOrganization, org); - }); - testWidgets( - 'Test for selectOrg function when orgAlreadyJoined is true and orgRequestAlreadyPresent is false', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - _user = User( - joinedOrganizations: [org], - membershipRequests: [ - OrgInfo( - id: '1', - ), - ], - ); - _userLoggedIn = true; - - await selectOrganizationViewModel.selectOrg(org); - - final orgTest = selectOrganizationViewModel.selectedOrganization; - expect(orgTest.id, '-1'); - verify( - navigationService.showTalawaErrorSnackBar( - 'Organisation already joined', - MessageType.warning, - ), - ); - }); - testWidgets( - 'Test for selectOrg function when orgAlreadyJoined is false and orgRequestAlreadyPresent is true', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - _userLoggedIn = true; - _user = User( - joinedOrganizations: [ - OrgInfo( - id: '1', - ), - ], - membershipRequests: [org], - ); - - await selectOrganizationViewModel.selectOrg(org); - - final orgTest = selectOrganizationViewModel.selectedOrganization; - expect(orgTest.id, '-1'); - verify( - navigationService.showTalawaErrorSnackBar( - 'Membership request already sent', - MessageType.warning, - ), - ); - }); - testWidgets('Test for successful onTapContinue function', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = org; - - selectOrganizationViewModel.onTapContinue(); - - verify( - navigationService.pushScreen( - Routes.signupDetailScreen, - arguments: org, - ), - ); - }); - testWidgets( - 'Test for successful onTapContinue function when selected organization id is -1', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = OrgInfo(id: '-1'); - - selectOrganizationViewModel.onTapContinue(); - - verify( - navigationService.showTalawaErrorSnackBar( - 'Select one organization to continue', - MessageType.warning, - ), - ); - }); - testWidgets('Test for successful onTapJoin function', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = org; - - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenAnswer((realInvocation) async { - final data = { - 'joinPublicOrganization': { - 'joinedOrganizations': [], - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - ); - }); - - _user = User( - joinedOrganizations: [org], - ); - - await selectOrganizationViewModel.onTapJoin(); - - verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))); - verify( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA().having( - (main) => main.mainScreenIndex, - "main screen index", - 0, - ), - ), - ); - }); - - testWidgets( - 'Test for onTapJoin function when joined organization length is not 1', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = org; - - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenAnswer((realInvocation) async { - final data = { - 'joinPublicOrganization': { - 'joinedOrganizations': [], - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - ); - }); - _user = User( - joinedOrganizations: [], - ); - - await selectOrganizationViewModel.onTapJoin(); - - verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))); - verify(navigationService.pop()); - verify( - navigationService.showTalawaErrorSnackBar( - 'Joined ${org.name} successfully', - MessageType.info, - ), - ); - }); - - /// we no longer have the tap button to join a org - // testWidgets('Test for successful onTapJoin function when userRegistrationRequired is false', - // (WidgetTester tester) async { - // locator.registerSingleton(_MockUserConfig()); - // final selectOrganizationViewModel = SelectOrganizationViewModel(); - // - // await tester.pumpWidget( - // SelectOrganizationViewModelWidget( - // qrKey: selectOrganizationViewModel.qrKey, - // ), - // ); - // - // org.userRegistrationRequired = false; - // selectOrganizationViewModel.selectedOrganization = org; - // _user = User(joinedOrganizations: []); - // - // when( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ).thenAnswer((realInvocation) async { - // final data = { - // 'sendMembershipRequest': { - // 'organization': {}, - // }, - // }; - // - // return QueryResult( - // source: QueryResultSource.network, - // data: data, - // options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - // ); - // }); - // - // await selectOrganizationViewModel.selectOrg(org); - // - // verify( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ); - // verify( - // navigationService.removeAllAndPush( - // Routes.waitingScreen, - // Routes.splashScreen, - // ), - // ); - // }); - // testWidgets( - // 'Test for successful onTapJoin function when userRegistrationRequired is false and joined orgnazation is not empty', - // (WidgetTester tester) async { - // locator.registerSingleton(_MockUserConfig()); - // final selectOrganizationViewModel = SelectOrganizationViewModel(); - // - // await tester.pumpWidget( - // SelectOrganizationViewModelWidget( - // qrKey: selectOrganizationViewModel.qrKey, - // ), - // ); - // - // org.userRegistrationRequired = false; - // selectOrganizationViewModel.selectedOrganization = org; - // _user = User(joinedOrganizations: [org]); - // - // when( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ).thenAnswer((realInvocation) async { - // final data = { - // 'sendMembershipRequest': { - // 'organization': {}, - // }, - // }; - // - // return QueryResult( - // source: QueryResultSource.network, - // data: data, - // options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - // ); - // }); - // - // await selectOrganizationViewModel.onTapJoin(); - // - // verify( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ); - // verify(navigationService.pop()); - // verify( - // navigationService.showTalawaErrorSnackBar( - // 'Join in request sent to ${org.name} successfully', - // MessageType.info, - // ), - // ); - // }); - // testWidgets( - // 'Test for successful onTapJoin function when userRegistrationRequired is false and result is null', - // (WidgetTester tester) async { - // locator.registerSingleton(_MockUserConfig()); - // final selectOrganizationViewModel = SelectOrganizationViewModel(); - // - // await tester.pumpWidget( - // SelectOrganizationViewModelWidget( - // qrKey: selectOrganizationViewModel.qrKey, - // ), - // ); - // - // org.userRegistrationRequired = false; - // selectOrganizationViewModel.selectedOrganization = org; - // - // when( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ).thenAnswer((realInvocation) async { - // return null; - // }); - // - // await selectOrganizationViewModel.onTapJoin(); - // - // verify( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ); - // verifyNever(navigationService.pop()); - // verifyNever( - // navigationService.showTalawaErrorSnackBar( - // 'Join in request sent to ${org.name} successfully', - // MessageType.info, - // ), - // ); - // verifyNever( - // navigationService.removeAllAndPush( - // Routes.waitingScreen, - // Routes.splashScreen, - // ), - // ); - // }); - testWidgets( - 'Test for successful onTapJoin function when userRegistrationRequired is false and throws exception', - (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - selectOrganizationViewModel.selectedOrganization = org; - - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenThrow(Exception()); - - await selectOrganizationViewModel.onTapJoin(); - - verify( - navigationService.showTalawaErrorSnackBar( - 'Something went wrong', - MessageType.error, - ), - ); - verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))); - }); - // testWidgets( - // 'Test for successful onTapJoin function when userRegistrationRequired is false and throws exception', - // (WidgetTester tester) async { - // locator.registerSingleton(_MockUserConfig()); - // final selectOrganizationViewModel = SelectOrganizationViewModel(); - // - // await tester.pumpWidget( - // SelectOrganizationViewModelWidget( - // qrKey: selectOrganizationViewModel.qrKey, - // ), - // ); - // org.userRegistrationRequired = false; - // - // selectOrganizationViewModel.selectedOrganization = org; - // - // when( - // databaseFunctions - // .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - // ).thenThrow(Exception()); - // - // await selectOrganizationViewModel.onTapJoin(); - // - // verify( - // navigationService.showTalawaErrorSnackBar( - // 'SomeThing went wrong', - // MessageType.error, - // ), - // ); - // }); - testWidgets('Test for organization list', (WidgetTester tester) async { - locator.registerSingleton(_MockUserConfig()); - final selectOrganizationViewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget( - SelectOrganizationViewModelWidget( - qrKey: selectOrganizationViewModel.qrKey, - ), - ); - - Map? expected; - - selectOrganizationViewModel.fetchMoreHelper( - (FetchMoreOptions options) async { - expected = options.updateQuery( - { - "organizationsConnection": [ - {"one": 1}, - {"two": 2}, - ], - }, - { - "organizationsConnection": [ - {"three": 3}, - {"four": 4}, - ], - }, - ); - return Future.value( - QueryResult( - source: QueryResultSource.network, - options: QueryOptions(document: gql(queries.fetchJoinInOrg)), - ), - ); - }, - [], - ); - - expect(expected, { - 'organizationsConnection': [ - {"one": 1}, - {"two": 2}, - {"three": 3}, - {"four": 4}, - ], - }); - }); - }); -} diff --git a/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart deleted file mode 100644 index 59c9c5259..000000000 --- a/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart +++ /dev/null @@ -1,366 +0,0 @@ -// ignore_for_file: talawa_api_doc - -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:qr_flutter/qr_flutter.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/validators.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/pre_auth_view_models/set_url_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_helpers.mocks.dart'; - -/// This is a TestWidget class. -class TestWidget extends StatelessWidget { - const TestWidget(this.model, {super.key}); - - /// State. - final SetUrlViewModel model; - @override - Widget build(BuildContext context) { - return Scaffold( - body: FloatingActionButton( - onPressed: () => model.scanQR(context), - ), - ); - } -} - -/// This is a class for mock url for testing. -class SetUrlMock extends StatelessWidget { - const SetUrlMock({required this.formKey, super.key}); - - /// formKey. - final GlobalKey formKey; - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Form( - key: formKey, - child: Container(), - ), - navigatorKey: navigationService.navigatorKey, - ); - } -} - -/// This is a class for mock url for testing. -/// -/// **params**: -/// * `themeMode`: dark -/// -/// **returns**: -/// * `Widget`: widget - -Widget forTest({ThemeMode themeMode = ThemeMode.dark}) => BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - final model1 = SetUrlViewModel(); - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.darkTheme, - home: FloatingActionButton( - onPressed: () async { - model1.initialise(); - }, - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: generateRoute, - ); - }, - ); - -Future main() async { - SizeConfig().test(); - - Hive.init('test/fixtures/core'); - await Hive.openBox('url'); - - late SetUrlViewModel model; - - setUp(() async { - registerServices(); - registerViewModels(); - model = SetUrlViewModel(); - }); - tearDown(() async { - unregisterViewModels(); - }); - - group('SetUrlViewModel Test -', () { - testWidgets( - 'Check if checkURLandNavigate() is working fine when urlPresent is true', - (tester) async { - locator.registerSingleton(Validator()); - - await tester.pumpWidget(Form(key: model.formKey, child: Container())); - - await model.checkURLandNavigate('/', 'arguments'); - - final captured = verify( - (navigationService as MockNavigationService).pushDialog(captureAny), - ).captured; - expect( - captured[0], - isA().having( - (e) => e.key, - 'key', - const Key('UrlCheckProgress'), - ), - ); - verify(navigationService.pop()); - verify(navigationService.pushScreen('/', arguments: 'arguments')); - verify(graphqlConfig.getOrgUrl()); - - final box = Hive.box('url'); - expect(box.get(SetUrlViewModel.urlKey), ''); - expect(box.get(SetUrlViewModel.imageUrlKey), '/talawa/'); - - File('test/fixtures/core/url.hive').delete(); - File('test/fixtures/core/url.lock').delete(); - }); - testWidgets('Check if initialize is working fine ', (tester) async { - final model = SetUrlViewModel(); - - await tester.pumpWidget(SetUrlMock(formKey: model.formKey)); - - model.initialise(); - }); - testWidgets('Check if initialize is working fine when we give url', - (tester) async { - final model = SetUrlViewModel(); - - await tester.pumpWidget(SetUrlMock(formKey: model.formKey)); - - model.initialise(inviteUrl: "http://www.youtube.com"); - }); - - testWidgets( - 'Check if checkURLandNavigate() is working fine when urlPresent is false', - (tester) async { - await locator.unregister(); - final service = MockValidator(); - - locator.registerSingleton(service); - - await tester.pumpWidget(Form(key: model.formKey, child: Container())); - - when(service.validateUrlExistence('')).thenAnswer((_) async => false); - - await model.checkURLandNavigate('/', 'arguments'); - - verify( - navigationService.showTalawaErrorSnackBar( - "URL doesn't exist/no connection please check", - MessageType.error, - ), - ); - - locator.unregister(); - }); - - testWidgets( - 'Check if checkURLandShowPopUp() is working fine when urlPresent is true', - (tester) async { - locator.registerSingleton(Validator()); - - await tester.pumpWidget(Form(key: model.formKey, child: Container())); - - await model.checkURLandShowPopUp('arguments'); - - final captured = verify( - (navigationService as MockNavigationService).pushDialog(captureAny), - ).captured; - expect( - captured[0], - isA().having( - (e) => e.key, - 'key', - const Key('UrlCheckProgress'), - ), - ); - verify(navigationService.pop()); - verify(graphqlConfig.getOrgUrl()); - verify(navigationService.showSnackBar("Url is valid")); - - final box = Hive.box('url'); - expect(box.get(SetUrlViewModel.urlKey), ''); - expect(box.get(SetUrlViewModel.imageUrlKey), '/talawa/'); - - File('test/fixtures/core/url.hive').delete(); - File('test/fixtures/core/url.lock').delete(); - }); - - testWidgets( - 'Check if checkURLandShowPopUp() is working fine when urlPresent is false', - (tester) async { - //await locator.unregister(); - final service = MockValidator(); - //locator.registerSingleton(service); - - await tester.pumpWidget(Form(key: model.formKey, child: Container())); - - when(service.validateUrlExistence('')).thenAnswer((_) async => false); - - await model.checkURLandShowPopUp('arguments'); - - verify(navigationService.pop()); - verifyNever( - navigationService.showTalawaErrorSnackBar( - "URL doesn't exist/no connection please check", - MessageType.info, - ), - ); - }); - - testWidgets('Check if scanQR() is working fine', (tester) async { - await tester.pumpWidget(MaterialApp(home: TestWidget(model))); - - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - expect(find.byType(ClipRRect), findsOneWidget); - expect(find.byType(QRView), findsOneWidget); - }); - - testWidgets('Check if _onQRViewCreated() is working fine', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: TestWidget(model), - navigatorKey: navigationService.navigatorKey, - ), - ); - - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - - testWidgets( - 'Check if _onQRViewCreated() is working fine when throws CameraException', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: TestWidget(model), - navigatorKey: navigationService.navigatorKey, - ), - ); - - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); - - when(controller.stopCamera()) - .thenThrow(CameraException("200", "cameraException")); - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets( - 'Check if _onQRViewCreated() is working fine when throws QrEmbeddedImageException', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: TestWidget(model), - navigatorKey: navigationService.navigatorKey, - ), - ); - - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); - - when(controller.stopCamera()) - .thenThrow(QrEmbeddedImageException("error")); - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets( - 'Check if _onQRViewCreated() is working fine when throws QrUnsupportedVersionException', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: TestWidget(model), - navigatorKey: navigationService.navigatorKey, - ), - ); - - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); - - when(controller.stopCamera()).thenThrow(QrUnsupportedVersionException(0)); - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets( - 'Check if _onQRViewCreated() is working fine when throws Exception', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: TestWidget(model), - navigatorKey: navigationService.navigatorKey, - ), - ); - - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); - - when(controller.stopCamera()).thenThrow(Exception(0)); - await tester.tap(find.byType(FloatingActionButton)); - await tester.pump(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - }); -} diff --git a/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart deleted file mode 100644 index a98bf1a02..000000000 --- a/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart +++ /dev/null @@ -1,561 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/user_config.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart'; - -import '../../helpers/test_helpers.dart'; - -bool empty = true; -bool userSaved = true; -bool userRegistrationRequired = false; -final data = { - 'signUp': { - 'user': { - '_id': 'xzy1', - 'firstName': 'Test', - 'lastName': 'User', - 'email': 'testuser@gmail.com', - }, - 'accessToken': 'testtoken', - 'refreshToken': 'testtoken', - }, -}; - -class SignUpMock extends StatelessWidget { - const SignUpMock({required this.formKey, super.key}); - - final GlobalKey formKey; - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Form( - key: formKey, - child: Container(), - ), - navigatorKey: navigationService.navigatorKey, - ); - } -} - -OrgInfo get org => OrgInfo( - id: '', - name: 'test org 3', - userRegistrationRequired: userRegistrationRequired, - creatorInfo: User(firstName: 'test', lastName: '1'), - ); - -void main() { - setUp(() async { - locator.registerSingleton(Queries()); - registerServices(); - await locator.unregister(); - userSaved = true; - empty = true; - userRegistrationRequired = false; - }); - tearDown(() async { - await locator.unregister(); - }); - - group('SignupDetailsViewModel Test -', () { - testWidgets( - 'Check if signup() is working fine when selected organization is not empty and public', - (tester) async { - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql(queries.registerUser('', '', '', '', '')), - ), - ); - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => result); - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenAnswer((realInvocation) async { - final data = { - 'joinPublicOrganization': { - 'joinedOrganizations': [], - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions(document: gql(queries.joinOrgById(org.id!))), - ); - }); - empty = false; - - await model.signUp(); - - expect(model.validate, AutovalidateMode.disabled); - - verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))); - verify( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ); - verify( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - testWidgets( - 'Check if signup() is working fine when credentials are invalid', - (tester) async { - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - model.selectedOrganization = OrgInfo(id: ""); - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => null); - - await model.signUp(); - - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - testWidgets( - 'Check if signup() is working fine when user is not save and/or token not refreshed', - (tester) async { - userSaved = false; - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql(queries.registerUser('', '', '', '', '')), - ), - ); - when(graphqlConfig.getToken()).thenAnswer((_) async => false); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => result); - - // Test for user not saved and user token not refreshed - await model.signUp(); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - - // Test for user saved and user token not refreshed - userSaved = true; - await model.signUp(); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - - // Test for user not saved and user token refreshed - userSaved = false; - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - await model.signUp(); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - testWidgets( - 'Check if signup() is working fine when selected organization requires userRegistration', - (tester) async { - userRegistrationRequired = true; - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql(queries.registerUser('', '', '', '', '')), - ), - ); - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => result); - when( - databaseFunctions - .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - ).thenAnswer((realInvocation) async { - final data = { - 'sendMembershipRequest': { - 'organization': {}, - }, - }; - - return QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql(queries.sendMembershipRequest(org.id!)), - ), - ); - }); - empty = false; - - await model.signUp(); - - expect(model.validate, AutovalidateMode.disabled); - - verify( - databaseFunctions - .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - ); - verify( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ); - verify( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - }); - testWidgets( - 'Check if signup() works fine when process of register user throws exception', - (tester) async { - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenThrow(Exception()); - - await model.signUp(); - - expect(model.validate, AutovalidateMode.disabled); - - verify( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - testWidgets( - 'Check if signup() works fine when process of user joining org throws exception', - (tester) async { - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql( - queries.registerUser('', '', '', '', ''), - ), - ), - ); - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => result); - when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))) - .thenThrow(Exception()); - - await model.signUp(); - - expect(model.validate, AutovalidateMode.disabled); - - verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!))); - verify( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - testWidgets( - 'Check if signup() is working fine when process of send membership request throws exception', - (tester) async { - userRegistrationRequired = true; - locator.registerSingleton(MockUserConfig()); - - final model = SignupDetailsViewModel(); - - await tester.pumpWidget(SignUpMock(formKey: model.formKey)); - - model.initialise(org); - - final result = QueryResult( - source: QueryResultSource.network, - data: data, - options: QueryOptions( - document: gql( - queries.registerUser('', '', '', '', ''), - ), - ), - ); - when(graphqlConfig.getToken()).thenAnswer((_) async => true); - when( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ).thenAnswer((_) async => result); - when( - databaseFunctions - .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - ).thenThrow(Exception()); - empty = false; - - await model.signUp(); - - expect(model.validate, AutovalidateMode.disabled); - - verify( - databaseFunctions - .gqlAuthMutation(queries.sendMembershipRequest(org.id!)), - ); - verify( - databaseFunctions.gqlNonAuthMutation( - queries.registerUser('', '', '', '', ''), - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.waitingScreen, - Routes.splashScreen, - ), - ); - verifyNever( - navigationService.removeAllAndPush( - Routes.mainScreen, - Routes.splashScreen, - arguments: isA() - .having( - (mainScreenArgs) => mainScreenArgs.mainScreenIndex, - "main screen index", - 0, - ) - .having( - (mainScreenArgs) => mainScreenArgs.fromSignUp, - "from sign up", - true, - ), - ), - ); - }); - }); -} - -class MockUserConfig extends Mock implements UserConfig { - @override - User get currentUser => User( - joinedOrganizations: empty ? [] : [org], - ); - - @override - Future updateUserJoinedOrg(List orgs) { - return Future.value(2); - } - - @override - dynamic saveCurrentOrgInHive(OrgInfo org) { - return null; - } - - @override - Future updateUser(User user) async => userSaved; - - @override - Future updateUserMemberRequestOrg(List orgs) async => null; -} diff --git a/test/view_model_tests/pre_auth_view_models/waiting_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/waiting_view_model_test.dart deleted file mode 100644 index c74209b06..000000000 --- a/test/view_model_tests/pre_auth_view_models/waiting_view_model_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/view_model/pre_auth_view_models/waiting_view_model.dart'; - -import '../../helpers/test_helpers.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - setUp(() { - registerServices(); - }); - group("WaitingViewModel Test - ", () { - test("Check if it's initialized correctly", () { - final model = WaitingViewModel(); - final context = MockBuildContext(); - model.initialise(context); - - expect(model.currentUser, userConfig.currentUser); - expect( - model.pendingRequestOrg, - userConfig.currentUser.membershipRequests, - ); - expect( - model.greeting, - [ - { - 'text': "Please wait", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - { - 'text': " ${model.currentUser.firstName} ", - 'textStyle': - Theme.of(context).textTheme.titleLarge!.copyWith(fontSize: 24), - }, - { - 'text': "for organisation(s) to accept your invitation.", - 'textStyle': Theme.of(context).textTheme.headlineSmall, - }, - ], - ); - }); - test("Check if joinOrg() is pushing the joinOrg route", () { - final model = WaitingViewModel(); - final context = MockBuildContext(); - model.initialise(context); - when(navigationService.pushScreen(Routes.joinOrg, arguments: '-1')) - .thenAnswer((_) async {}); - - model.joinOrg(); - - verify(navigationService.pushScreen(Routes.joinOrg, arguments: '-1')); - }); - test("Check if logout() is working properly", () async { - final model = WaitingViewModel(); - final context = MockBuildContext(); - model.initialise(context); - - when( - navigationService.removeAllAndPush( - Routes.languageSelectionRoute, - Routes.splashScreen, - arguments: '0', - ), - ).thenAnswer((_) async {}); - - Hive - ..init('test/fixtures/core') - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - final user = await Hive.openBox('currentUser'); - final url = await Hive.openBox('url'); - - await user.put('test', model.currentUser); - await url.put('test', 'fakeUrl'); - - model.logout(); - - verify( - navigationService.removeAllAndPush( - Routes.languageSelectionRoute, - Routes.splashScreen, - arguments: '0', - ), - ); - - Future.delayed(Duration.zero).then((_) { - expect(user.get('test'), null); - expect(url.get('test'), null); - }); - - File('test/fixtures/core/url.hive').delete(); - File('test/fixtures/core/url.lock').delete(); - }); - }); -} diff --git a/test/view_model_tests/progress_dialog_view_model_test.dart b/test/view_model_tests/progress_dialog_view_model_test.dart deleted file mode 100644 index bb5de02fb..000000000 --- a/test/view_model_tests/progress_dialog_view_model_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/view_model/widgets_view_models/progress_dialog_view_model.dart'; - -import '../helpers/test_helpers.dart'; - -void main() { - group('ProgressDialogViewModelTest -', () { - group('initialise -', () { - final mockConnectivity = getAndRegisterConnectivityService(); - final model = ProgressDialogViewModel(); - - test( - 'When called and connectivity is present, connectivityPresent must be set to true', - () async { - when(mockConnectivity.checkConnectivity()).thenAnswer( - (_) async => ConnectivityResult.mobile, - ); - - await model.initialise(); - - expect(model.connectivityPresent, true); - }); - - test( - 'When called and connectivity is not there, the screen must be popped after 2 seconds', - () async { - final mockNavigation = getAndRegisterNavigationService(); - - when(mockConnectivity.checkConnectivity()) - .thenAnswer((_) async => ConnectivityResult.none); - - await model.initialise(); - - await Future.delayed(const Duration(seconds: 2)) - .then((_) => verify(mockNavigation.pop())); - }, - ); - }); - }); -} diff --git a/test/view_model_tests/signup_details_view_model_test.dart b/test/view_model_tests/signup_details_view_model_test.dart deleted file mode 100644 index 6ac5ee5f7..000000000 --- a/test/view_model_tests/signup_details_view_model_test.dart +++ /dev/null @@ -1,167 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -// import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/validators.dart'; -import '../helpers/test_helpers.dart'; -// import '../helpers/test_helpers.mocks.dart'; -import '../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('SignUp Tests', () { - // final model = MockSignupDetailsViewModel(); - - test('Test validation for first and last name', () { - final String? blankFirstName = Validator.validateFirstName(""); - expect(blankFirstName, "Firstname must not be left blank."); - - final String? blankLastName = Validator.validateLastName(""); - expect(blankLastName, "Lastname must not be left blank."); - - final String? validFirstName = - Validator.validateFirstName("testFirstName"); - expect(validFirstName, null); - - final String? validLastName = Validator.validateLastName("testLastName"); - expect(validLastName, null); - }); - - test('Test validation for Email', () { - final String? blankEmail = Validator.validateEmail(""); - expect(blankEmail, "Email must not be left blank"); - - final String? invalidEmail1 = Validator.validateEmail("testInvalidEmail"); - expect(invalidEmail1, "Please enter a valid Email Address"); - - final String? invalidEmail2 = Validator.validateEmail("test@.com"); - expect(invalidEmail2, "Please enter a valid Email Address"); - - final String? invalidEmail3 = Validator.validateEmail("@test.com"); - expect(invalidEmail3, "Please enter a valid Email Address"); - - final String? validEmail = - Validator.validateEmail("testName@testOrg.com"); - expect(validEmail, null); - }); - - test('Test validation for password', () { - final String? blankPassword = Validator.validatePassword(""); - expect(blankPassword, "Password must not be left blank"); - - final String? invalidPassword1 = Validator.validatePassword("test"); - expect( - invalidPassword1, - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)", - ); - - final String? invalidPassword2 = Validator.validatePassword("123"); - expect( - invalidPassword2, - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)", - ); - - final String? invalidPassword3 = Validator.validatePassword("TEST"); - expect( - invalidPassword3, - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)", - ); - - final String? invalidPassword4 = Validator.validatePassword("test123"); - expect( - invalidPassword4, - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)", - ); - - final String? invalidPassword5 = Validator.validatePassword("test123!"); - expect( - invalidPassword5, - "Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)", - ); - - final String? validPassword = Validator.validatePassword("tesT123!"); - expect(validPassword, null); - - // test for confirm password - final String? differentPassword = - Validator.validatePasswordConfirm("tesT123", "test1234"); - expect(differentPassword, "Password does not match original"); - - final String? matchingPassword = - Validator.validatePasswordConfirm("tesT123", "tesT123"); - expect(matchingPassword, null); - }); - - test('Test sign up function', () async { - // final User newUser = User(); - - // NOTE: This test is entirely WRONG. - // TODO: Fix by testing GraphQL mutations. - - // when(model.signUp()).thenAnswer((realInvocation) { - // if (newUser.id == null || newUser.id == "") { - // return "User Id can't be blank"; - // } - // if (newUser.firstName == null || newUser.firstName == "") { - // return "First Name can't be blank"; - // } - // if (newUser.lastName == null || newUser.lastName == "") { - // return "Last Name can't be blank"; - // } - // if (newUser.email == null || newUser.email == "") { - // return "Email can't be blank"; - // } - // return { - // "id": newUser.id, - // "firstName": newUser.firstName, - // "lastName": newUser.lastName, - // "email": newUser.email, - // }; - // }); - - // //checking with blank user Id - // expect(model.signUp(), "User Id can't be blank"); - - // newUser.id = "5"; - // //checking with blank first name - // expect(model.signUp(), "First Name can't be blank"); - - // newUser.firstName = "testFirstName"; - // //checking with blank last name - // expect(model.signUp(), "Last Name can't be blank"); - - // newUser.lastName = "testLastName"; - // //checking with blank email - // expect(model.signUp(), "Email can't be blank"); - - // newUser.email = "testName@testOrg.com"; - // // checking with all details - // // should give proper response - // expect(model.signUp(), { - // "id": newUser.id, - // "firstName": newUser.firstName, - // "lastName": newUser.lastName, - // "email": newUser.email, - // }); - }); - }); -} diff --git a/test/view_model_tests/theme_view_model_test.dart b/test/view_model_tests/theme_view_model_test.dart deleted file mode 100644 index 1b0525b85..000000000 --- a/test/view_model_tests/theme_view_model_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -void main() { - WidgetsFlutterBinding.ensureInitialized(); - SharedPreferences.setMockInitialValues({}); - testSetupLocator(); - - setUp(() { - registerServices(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Theme View Model Tests', () { - test("test initialize function", () async { - final model = AppTheme(); - final prefs = await SharedPreferences.getInstance(); - model.initialize(); - expect(model.isdarkTheme, prefs.getBool("DynamicTheme") ?? true); - }); - - test("test switch theme function", () async { - final model = AppTheme(); - model.initialize(); - model.switchTheme(isOn: false); - expect(model.isdarkTheme, false); - - model.switchTheme(isOn: true); - expect(model.isdarkTheme, true); - }); - }); -} diff --git a/test/view_model_tests/widgets_view_model_test/comments_view_model_test.dart b/test/view_model_tests/widgets_view_model_test/comments_view_model_test.dart deleted file mode 100644 index 9ffecac01..000000000 --- a/test/view_model_tests/widgets_view_model_test/comments_view_model_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/view_model/widgets_view_models/comments_view_model.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -class MockCallbackFunction extends Mock { - void call(); -} - -void main() { - testSetupLocator(); - locator().test(); - - setUp(() { - registerServices(); - }); - - tearDown(() { - unregisterServices(); - }); - - final Post mockPost = Post( - sId: "1", - creator: userConfig.currentUser, - description: "mock post", - imageUrl: "mockImageUrl", - videoUrl: "mockVideoUrl", - organization: userConfig.currentOrg, - createdAt: DateTime.now(), - comments: [], - ); - - group('Comments View Model Tests', () { - test("Testing the functions", () async { - /// first testing initialize function - final model = CommentsViewModel(); - - when(commentsService.getCommentsForPost(mockPost.sId)) - .thenAnswer((realInvocation) async { - return []; - }); - - await model.initialise(mockPost.sId); - expect(model.commentList, []); - expect(model.postId, mockPost.sId); - - /// testing the get comments function - final commentJson1 = { - "text": "first comment", - "post": mockPost.sId, - }; - final commentJson2 = { - "text": "second comment", - "post": mockPost.sId, - }; - - final commentsJson = [commentJson1, commentJson2]; - - final comment1 = Comment( - text: "first comment", - post: mockPost.sId, - ); - final comment2 = Comment( - text: "second comment", - post: mockPost.sId, - ); - final comments = [comment1, comment2]; - when(commentsService.getCommentsForPost(mockPost.sId)) - .thenAnswer((realInvocation) async { - return commentsJson; - }); - - await model.getComments(); - - expect(model.commentList.length, comments.length); - expect(model.commentList.first.text, comment1.text); - expect(model.commentList.first.post, mockPost.sId); - expect(model.commentList.last.text, comment2.text); - expect(model.commentList.last.post, mockPost.sId); - - /// finally testing the create comment function - when(commentsService.getCommentsForPost(mockPost.sId)) - .thenAnswer((realInvocation) async { - return []; - }); - await model.initialise(mockPost.sId); - - when(commentsService.createComments(mockPost.sId, "fakeMsg")) - .thenAnswer((realInvocation) async {}); - when(postService.addCommentLocally(mockPost.sId)) - .thenAnswer((realInvocation) {}); - - await model.createComment("fakeMsg"); - - expect(model.commentList.length, 1); - expect(model.commentList.first.text, "fakeMsg"); - expect(model.commentList.first.creator!.id, "xzy1"); - }); - }); -} diff --git a/test/view_model_tests/widgets_view_model_test/like_button_view_model_test.dart b/test/view_model_tests/widgets_view_model_test/like_button_view_model_test.dart deleted file mode 100644 index e140861cf..000000000 --- a/test/view_model_tests/widgets_view_model_test/like_button_view_model_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -void main() { - registerServices(); - - final List likedBy0 = [ - LikedBy(sId: 'Test user 1'), - LikedBy(sId: 'Test user 2'), - ]; - - final post = Post( - sId: "test_post_id", - creator: userConfig.currentUser, - likedBy: likedBy0, - ); - - group("Tests for login_button_view_model", () { - test("Testing setIsLiked", () { - final model = LikeButtonViewModel(); - model.initialize(likedBy0, 'Test post_id'); - model.setIsLiked(); - expect(model.isLiked, true); - }); - test( - 'Testing checkAndSetTheIsLiked function when user is not present in likedby', - () { - final model = LikeButtonViewModel(); - model.initialize(likedBy0, 'Test post_id'); - model.checkAndSetTheIsLiked(); - expect(model.isLiked, false); - }); - - test( - 'Testing checkAndSetTheIsLiked function when user is present in likedby', - () { - final model = LikeButtonViewModel(); - likedBy0.add(LikedBy(sId: userConfig.currentUser.id)); - model.initialize(likedBy0, 'Test post_id'); - model.checkAndSetTheIsLiked(); - expect(model.isLiked, true); - likedBy0 - .removeWhere((element) => element.sId == userConfig.currentUser.id); - }); - - test("testing toggleIsLiked", () { - final model = LikeButtonViewModel(); - model.initialize(likedBy0, post.sId); - model.setIsLiked(val: false); - expect(model.isLiked, false); - final LikedBy likedBy = LikedBy( - sId: userConfig.currentUser.id, - ); - when(postService.addLike(post.sId)).thenAnswer((realInvocation) async { - model.likedBy.add(likedBy); - }); - model.toggleIsLiked(); - expect(model.likesCount, 3); - model.setIsLiked(val: true); - when(postService.removeLike(post.sId)).thenAnswer((realInvocation) async { - model.likedBy - .removeWhere((element) => element.sId == userConfig.currentUser.id); - }); - model.toggleIsLiked(); - // expect(model.likesCount, 2); - // expect(model.likedBy.contains(likedBy), false); - }); - - test("Testing updatePost", () { - final model = LikeButtonViewModel(); - model.initialize(likedBy0, post.sId); - final Post newPost = Post( - sId: "new_post_id", - creator: userConfig.currentUser, - likedBy: [], - ); - // with different post - model.updatePost(newPost); - // expect(model.likesCount, 2); - - final LikedBy likedBy3 = LikedBy(sId: "Test user 3"); - post.likedBy!.add(likedBy3); - // with same post - model.updatePost(post); - // expect(model.likesCount, 3); - // expect(model.likedBy.contains(likedBy3), true); - }); - }); -} diff --git a/test/views/after_auth_screens/add_post_page_test.dart b/test/views/after_auth_screens/add_post_page_test.dart deleted file mode 100644 index 4f42e79f6..000000000 --- a/test/views/after_auth_screens/add_post_page_test.dart +++ /dev/null @@ -1,524 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/post_queries.dart'; -import 'package:talawa/view_model/after_auth_view_models/add_post_view_models/add_post_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/add_post_page.dart'; - -import '../../helpers/test_helpers.dart'; - -final homeModel = locator(); -bool removeImageCalled = false; - -class MockAddPostViewModel extends Mock implements AddPostViewModel { - final _textHashTagController = TextEditingController(text: ''); - final _controller = TextEditingController(text: ''); - final _titleController = TextEditingController(text: ''); - - @override - File? get imageFile { - return File('example'); - } - - @override - String get userName => 'UserName'; - - @override - String? get userPic => userConfig.currentUser.image; - - @override - String get orgName => 'orgName'; - - @override - TextEditingController get textHashTagController => _textHashTagController; - - @override - TextEditingController get controller => _controller; - - @override - TextEditingController get titleController => _titleController; - - // @override - // void removeImage() { - // removeImageCalled = true; - // } -} - -Widget createAddPostScreen({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - home: Scaffold( - /// MainScreenViewModel.scaffoldKey.currentState will return null - /// until and unless their is another widget with the same global key - key: MainScreenViewModel.scaffoldKey, - body: AddPost( - drawerKey: MainScreenViewModel.scaffoldKey, - ), - ), - ); -} - -final demoJson = { - 'createPost': { - '__typename': 'Post', - '_id': '1', - 'text': 'text #hastag', - 'createdAt': '2023-11-13T19:28:21.095Z', - 'imageUrl': 'https://imageurl', - 'videoUrl': 'https://videoUrl', - 'title': 'demo title', - 'commentCount': 0, - 'likeCount': 0, - 'creator': { - '__typename': 'User', - '_id': '1', - 'firstName': 'Ayush', - 'lastName': 'Raghuwanshi', - 'image': 'https://imageUrl', - }, - 'organization': {'__typename': 'Organization', '_id': '1'}, - 'likedBy': [], - 'comments': [], - }, -}; - -void main() { - // SizeConfig().test(); - setupLocator(); - // locator.registerSingleton(LikeButtonViewModel()); - sizeConfig.test(); - - setUp(() { - registerServices(); - getAndRegisterImageService(); - }); - - group('createAddPostScreen Test', () { - testWidgets('check if back button in app bar works', (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - final backButtonFinder = find.byKey(const Key('add_post_icon_button1')); - expect(backButtonFinder, findsOneWidget); - await tester.tap(backButtonFinder); - await tester.pump(); - verify(navigationService.pop()).called(1); - }); - - testWidgets('check if createAddPostScreen shows up', (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - final finder = find.byType(Scaffold); - - expect(finder, findsNWidgets(2)); - }); - - group('checks if the upload post button is working properly', () { - testWidgets('checks if the upload post button is pressable', - (tester) async { - final dataBaseMutationFunctions = locator(); - when( - dataBaseMutationFunctions.gqlAuthMutation( - PostQueries().uploadPost(), - variables: { - "text": " #", - "organizationId": 'XYZ', - "title": '', - }, - ), - ).thenAnswer( - (realInvocation) async => QueryResult( - options: QueryOptions(document: gql(PostQueries().uploadPost())), - data: demoJson, - source: QueryResultSource.network, - ), - ); - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn1')); - await tester.tap(finder); - expect(finder, findsOneWidget); - await tester.pump(); - }); - testWidgets('checks if the upload post button shows correct text', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn1')); - final text = find.descendant(of: finder, matching: find.text('Post')); - - expect(finder, findsOneWidget); - expect(text, findsOneWidget); - }); - }); - - group('checks if the upload photo from gallery button is working properly', - () { - testWidgets( - 'checks if the upload photo from gallery button shows correct icon', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button2')); - - final icon = - find.descendant(of: finder, matching: find.byIcon(Icons.photo)); - - expect(finder, findsOneWidget); - expect(icon, findsOneWidget); - }); - - testWidgets( - 'checks if the upload photo from gallery button ad other process are working properly', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button2')); - - expect(finder, findsOneWidget); - - ///returning the file variable to the - ///result of function multimediaPickerService.getPhotoFromGallery - ///when this function is called in the - ///view model of add_post_page. - final file = File('fakePath'); - - /// using the new instance of multimediaPickerService - /// so that when statement can be used again, - /// else it gives null point exception - final multimediaPickerService = locator(); - - /// when is function provided by mockito lib - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - /// taping the button - await tester.tap(finder); - await tester.pump(); - }); - - testWidgets( - 'checks if the uploaded photo from gallery button is presented on the screen', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button2')); - - final finder2 = find.byType(Stack); - - final finder3 = find.byType(Positioned); - - expect(finder, findsOneWidget); - - ///returning the file variable to the - ///result of function multimediaPickerService.getPhotoFromGallery - ///when this function is called in the - ///view model of add_post_page. - final file = File('fakePath'); - - /// using the new instance of multimediaPickerService - /// so that when statement can be used again, - /// else it gives null point exception - final multimediaPickerService = locator(); - - /// when is function provided by mockito lib - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(finder); - await tester.pump(); - - expect(finder2, findsNWidgets(3)); - - expect(finder3, findsNWidgets(1)); - }); - - testWidgets( - 'checks if the uploaded photo from gallery button is removed after pressing remove button', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button2')); - - final cancelBtn = find.byIcon(Icons.cancel); - - expect(finder, findsOneWidget); - - ///returning the file variable to the - ///result of function multimediaPickerService.getPhotoFromGallery - ///when this function is called in the - ///view model of add_post_page. - final file = File('fakePath'); - - /// using the new instance of multimediaPickerService - /// so that when statement can be used again, - /// else it gives null point exception - final multimediaPickerService = locator(); - - /// when is function provided by mockito lib - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(finder); - await tester.pumpAndSettle(); - - final offSet = tester.getCenter(cancelBtn); - await tester.tapAt(offSet); - await tester.pump(); - }); - }); - - group('checks if the upload photo by camera button is working properly', - () { - testWidgets( - 'checks if the upload photo by camera button shows correct icon', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button3')); - - final icon = find.descendant( - of: finder, - matching: find.byIcon(Icons.camera_alt), - ); - - expect(finder, findsOneWidget); - expect(icon, findsOneWidget); - }); - - testWidgets( - 'checks if the upload by camera one button button is pressable', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button3')); - - expect(finder, findsOneWidget); - - ///returning the file variable to the - ///result of function multimediaPickerService.getPhotoFromGallery - ///when this function is called in the - ///view model of add_post_page. - final file = File('fakePath'); - - /// using the new instance of multimediaPickerService - /// so that when statement can be used again, - /// else it gives null point exception - final multimediaPickerService = locator(); - - /// when is function provided by mockito lib - when(multimediaPickerService.getPhotoFromGallery(camera: true)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(finder); - await tester.pump(); - }); - }); - - group('checks if the upload file button is working properly', () { - // testWidgets('checks if the upload file button button is pressable', - // (tester) async { - // await tester.pumpWidget(createAddPostScreen()); - // await tester.pump(); - // - // /// using the key of icon button - // /// because their are many icon button - // - // final finder = find.byKey(const Key('add_post_icon_button4')); - // - // expect(finder, findsOneWidget); - // - // await tester.tap(finder); - // await tester.pump(); - // }); - }); - - group('checks if the add hashtag button is working properly', () { - /// TODO: Hashtags implementation removed currently - testWidgets('checks if the add hashtag button shows correct text', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn2')); - - // final icon = - // find.descendant(of: finder, matching: find.text('Add tag')); - - expect(finder, findsOneWidget); - // expect(icon, findsOneWidget); - }); - - testWidgets('checks if the add hashtag button is pressable', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn2')); - - expect(finder, findsOneWidget); - - await tester.tap(finder); - await tester.pump(); - }); - testWidgets('checks if the add hashtag button add is pressable', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn2')); - - expect(finder, findsOneWidget); - - await tester.tap(finder); - await tester.pump(); - - final hashtag = find.byKey(const Key("add_hashtag_button")); - - expect(hashtag, findsOneWidget); - - await tester.tap(hashtag); - await tester.pump(); - }); - - testWidgets('checks if the cancel hashtag button add is pressable', - (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of text button - /// because their are many text button - - final finder = find.byKey(const Key('add_post_text_btn2')); - - expect(finder, findsOneWidget); - - await tester.tap(finder); - await tester.pump(); - - final hashtag = find.byKey(const Key("cancel_hashtag_button")); - - expect(hashtag, findsOneWidget); - - await tester.tap(hashtag); - await tester.pump(); - }); - }); - -//TODO: null - testWidgets('Check if icon button is pressable.', (tester) async { - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('add_post_icon_button1')); - - expect(finder, findsOneWidget); - - await tester.tap(finder); - await tester.pump(); - }); - - testWidgets('check if remove Image button works', (tester) async { - locator.unregister(); - final mockModel = - locator.registerSingleton(MockAddPostViewModel()); - - when(mockModel.removeImage()).thenAnswer((_) {}); - - await tester.pumpWidget(createAddPostScreen()); - await tester.pump(); - - final removeImageBtn = - tester.widget(find.byKey(const Key('remove_icon'))) as IconButton; - - removeImageBtn.onPressed!(); - - verify(mockModel.removeImage()); - }); - }); -} diff --git a/test/views/after_auth_screens/chat/chat_message_screen_test/chat_message_screen_test.dart b/test/views/after_auth_screens/chat/chat_message_screen_test/chat_message_screen_test.dart deleted file mode 100644 index 0026ffb01..000000000 --- a/test/views/after_auth_screens/chat/chat_message_screen_test/chat_message_screen_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/chat/chat_message_screen.dart'; -import 'package:talawa/views/after_auth_screens/chat/widgets/chat_input_field.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../../helpers/test_helpers.dart'; -import '../../../../helpers/test_locator.dart'; - -final directChatViewModel = getAndRegisterDirectChatViewModel(); - -Widget createApp() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: ChatMessageScreen(chatId: "XYZ", model: directChatViewModel), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -} - -Future showChatMessageScreen(WidgetTester tester) async { - await tester.pumpWidget(createApp()); - await tester.pumpAndSettle(); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - registerServices(); - - testWidgets('Check if Chat Message Screen page shows up', (tester) async { - await showChatMessageScreen(tester); - expect(find.byType(Scaffold), findsOneWidget); - }); - - testWidgets('Check if Back page button is working', (tester) async { - await showChatMessageScreen(tester); - await tester.tap(find.byIcon(Icons.arrow_back)); - - expect(find.byType(Scaffold), findsOneWidget); - }); - - testWidgets('Check if the Chat Input Field is in the widget tree', - (tester) async { - await showChatMessageScreen(tester); - - expect(find.byType(ChatInputField), findsOneWidget); - }); - - testWidgets( - 'Check if the circular progress indicator shows up on the loading state', - (tester) async { - when(directChatViewModel.chatState).thenReturn(ChatState.loading); - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(CircularProgressIndicator), findsOneWidget); - }, - ); -} diff --git a/test/views/after_auth_screens/chat/select_contact_test.dart b/test/views/after_auth_screens/chat/select_contact_test.dart deleted file mode 100644 index e581e4f52..000000000 --- a/test/views/after_auth_screens/chat/select_contact_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/select_contact_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/chat/chat_list_screen.dart'; -import 'package:talawa/views/after_auth_screens/chat/select_contact.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createApp() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const SelectContact(), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -} - -Widget createChatListScreen() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const ChatPage(), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -} - -Future showSelectContactScreen(WidgetTester tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - await tester.tap(find.textContaining('Ayush')); - await tester.pumpAndSettle(); -} - -Future showSelectContactScreenByChatPage(WidgetTester tester) async { - await tester.pumpWidget(createChatListScreen()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.add)); - await tester.pumpAndSettle(); -} - -void main() { - SizeConfig().test(); - // testSetupLocator(); - registerServices(); - registerViewModels(); - final model = SelectContactViewModel(); - model.initialise(); - final User user1 = User(id: "fakeUser1", firstName: "Shivam"); - final User user2 = User(id: "fakeUser2", firstName: "Talawa"); - final List users = [user1, user2]; - - when(organizationService.getOrgMembersList("XYZ")) - .thenAnswer((realInvocation) async { - return users; - }); - - testWidgets('Check if Select Contacts page shows up', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - expect(find.byType(Scaffold), findsOneWidget); - - await showSelectContactScreenByChatPage(tester); - expect(find.byType(Scaffold), findsOneWidget); - }); - testWidgets('Check if Back page button is working', (tester) async { - await showSelectContactScreenByChatPage(tester); - await tester.tap(find.byIcon(Icons.arrow_back)); - - expect(find.byType(Scaffold), findsOneWidget); - }); - testWidgets( - 'Check if Select contact comes up when prompted fromm chat list screen', - (tester) async { - await showSelectContactScreenByChatPage(tester); - await tester.pump(); - - expect(find.byType(Scaffold), findsOneWidget); - }); - - testWidgets("Test if list view is visible", (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createApp()); - await tester.pump(); - await tester.pumpAndSettle(const Duration(milliseconds: 4000)); - - expect(find.byType(ListView), findsOneWidget); - expect( - find.byKey( - const ValueKey('select_contact_gesture_0'), - ), - findsNWidgets(1), - ); - expect( - find.byKey( - const ValueKey('select_contact_gesture_1'), - ), - findsNWidgets(1), - ); - final gesturedetect = find.byKey( - const ValueKey('select_contact_gesture_1'), - ); - await tester.tap(gesturedetect); - - expect(find.text('Shivam'), findsOneWidget); - expect(find.text('Talawa'), findsOneWidget); - }); - }); -} diff --git a/test/views/after_auth_screens/chat/widgets/chat_input_field_test.dart b/test/views/after_auth_screens/chat/widgets/chat_input_field_test.dart deleted file mode 100644 index ed2a80187..000000000 --- a/test/views/after_auth_screens/chat/widgets/chat_input_field_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// ignore_for_file: talawa_api_doc - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/chat/widgets/chat_input_field.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../../helpers/test_helpers.dart'; -import '../../../../helpers/test_locator.dart'; - -/// DirectChatViewModel mock. -final directChatViewModel = getAndRegisterDirectChatViewModel(); - -/// Function creates chatInputField. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `Widget`: The actual chatInputField to test -Widget createChatInputField() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - theme: TalawaTheme.darkTheme, - home: Scaffold( - body: ChatInputField( - chatId: "XYZ", - model: directChatViewModel, - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - registerServices(); - testWidgets("Check if chat input field shows up", (tester) async { - await tester.pumpWidget(createChatInputField()); - await tester.pumpAndSettle(); - - expect(find.byType(ChatInputField), findsOneWidget); - expect(find.byType(TextField), findsOneWidget); - - final textFieldWidget = find.byType(TextField); - await tester.enterText(textFieldWidget, 'Something'); - - final TextField textField = tester.widget(textFieldWidget); - expect(textField.controller!.text, 'Something'); - - expect(find.text('Type a message'), findsOneWidget); - - expect(find.text('Something'), findsOneWidget); - }); - testWidgets('Check if sending messages work', (tester) async { - await tester.pumpWidget(createChatInputField()); - await tester.pumpAndSettle(); - - final textFieldWidget = find.byType(TextField); - await tester.enterText(textFieldWidget, 'Something'); - await tester.pumpAndSettle(); - expect(find.text('Something'), findsOneWidget); - await tester.pump(); - final sendMessageButton = find.byKey(const Key('InputFieldGestureKey')); - await tester.tap(sendMessageButton); - - expect(directChatViewModel.chatMessagesByUser['XYZ']?.length, 2); - - final TextField textField = tester.widget(textFieldWidget); - expect(textField.controller!.text, ''); - }); -} diff --git a/test/views/after_auth_screens/chat/widgets/chat_message_bubble.dart b/test/views/after_auth_screens/chat/widgets/chat_message_bubble.dart deleted file mode 100644 index 0372f9808..000000000 --- a/test/views/after_auth_screens/chat/widgets/chat_message_bubble.dart +++ /dev/null @@ -1,152 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_message.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/views/after_auth_screens/chat/widgets/chat_message_bubble.dart'; - -Widget createChatMessageBubble() { - return MaterialApp( - theme: TalawaTheme.darkTheme, - home: Scaffold( - body: Message( - message: ChatMessage( - "fake_id", - ChatUser( - firstName: "ravidi", - id: "chad", - image: "amogus", - ), - "fake_chat", - ChatUser( - firstName: "sheikh", - id: "gaad", - image: "amogus", - ), - ), - ), - ), - ); -} - -const remoteMessageBorderRadius = BorderRadius.only( - bottomRight: Radius.circular(15), - topRight: Radius.circular(15), - bottomLeft: Radius.circular(15), -); - -const localMessageBorderRadius = BorderRadius.only( - bottomRight: Radius.circular(15), - topLeft: Radius.circular(15), - bottomLeft: Radius.circular(15), -); - -void main() { - SizeConfig().test(); - setupLocator(); - - group("Tests for chat_message_bubble.dart", () { - testWidgets("Check if Message shows up", (tester) async { - await tester.pumpWidget(createChatMessageBubble()); - await tester.pump(); - - expect(find.byType(Message), findsOneWidget); - }); - - testWidgets("Check if chat text renders correctly", (tester) async { - userConfig.currentUser.firstName = "undef"; - await tester.pumpWidget(createChatMessageBubble()); - await tester.pump(); - - Finder chatTextBlack = find.byWidgetPredicate( - (widget) => - widget is Text && - widget.data == "fake_chat" && - widget.style!.color == - TalawaTheme.darkTheme.textTheme.bodyLarge!.color, - description: 'Text widget with color as black', - ); - - expect(chatTextBlack, findsOneWidget); - - userConfig.currentUser.firstName = "ravidi"; - - // Now the text color should change to black - chatTextBlack = find.byWidgetPredicate( - (widget) => - widget is Text && - widget.data == "fake_chat" && - widget.style!.color == Colors.black, - description: 'Text widget with color as black', - ); - - expect(chatTextBlack, findsNothing); - }); - - testWidgets("Check if remote chat aligns correctly", (tester) async { - userConfig.currentUser.firstName = "undef"; - - await tester.pumpWidget(createChatMessageBubble()); - await tester.pump(); - - // Remote message should be on the left - final chat = find.byWidgetPredicate( - (widget) => - widget is Padding && - widget.child is Row && - (widget.child! as Row).mainAxisAlignment == MainAxisAlignment.start, - description: 'A row aligned to left (remote message)', - ); - - expect(chat, findsOneWidget); - - find.byWidgetPredicate( - (widget) { - final chatContainer = - ((widget as Padding).child! as Row).children[0] as Container; - final chatDecoration = chatContainer.decoration! as BoxDecoration; - - return chatDecoration.color == Colors.green && - chatDecoration.borderRadius == remoteMessageBorderRadius; - }, - description: "Check if chat container is properly decorated", - ); - }); - - testWidgets("Check if local chat shows correctly", (tester) async { - userConfig.currentUser.firstName = "ravidi"; - - await tester.pumpWidget(createChatMessageBubble()); - await tester.pump(); - - // Local message should be on the right - expect( - find.byWidgetPredicate( - (widget) => - widget is Padding && - widget.child is Row && - (widget.child! as Row).mainAxisAlignment == MainAxisAlignment.end, - description: 'A row aligned to right (local message)', - ), - findsOneWidget, - ); - - find.byWidgetPredicate( - (widget) { - final chatContainer = - ((widget as Padding).child! as Row).children[0] as Container; - final chatDecoration = chatContainer.decoration! as BoxDecoration; - - return chatDecoration.color == Colors.white && - chatDecoration.borderRadius == localMessageBorderRadius; - }, - description: "Check if chat container is properly decorated", - ); - }); - }); -} diff --git a/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart b/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart deleted file mode 100644 index 9043883d4..000000000 --- a/test/views/after_auth_screens/events/create_custom_recurring_event_test.dart +++ /dev/null @@ -1,525 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/create_custom_recurring_event.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/create_recurring_event_helper_widgets.dart'; -import 'package:talawa/widgets/custom_weekday_selector.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -/// Creates a EventScreen for tests. -/// -/// **params**: -/// * `themeMode`: ThemeMode -/// * `theme`: ThemeData of App -/// * `model`: CreateEventViewModel -/// -/// **returns**: -/// * `Widget`: Event Screen Widget -Widget createCustomRecurrenceScreen({ - ThemeMode themeMode = ThemeMode.light, - required ThemeData theme, - CreateEventViewModel? model, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme, - home: Scaffold( - body: CustomRecurrencePage( - model: model ?? CreateEventViewModel(), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - SizeConfig().test(); - testSetupLocator(); - getAndRegisterNavigationService(); - - // setUp(() { - // registerServices(); - // }); - - // tearDown(() { - // unregisterServices(); - // }); - - group("RecurrenceUtils", () { - test("getRecurrenceRuleText for Frequency Daily", () { - final ruleText = RecurrenceUtils.getRecurrenceRuleText( - Frequency.daily, - null, - 2, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText, 'Every 2 days'); - - final ruleText2 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.daily, - null, - 1, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText2, 'Daily'); - }); - - test("getRecurrenceRuleText for Frequency Weekly", () { - final ruleText = RecurrenceUtils.getRecurrenceRuleText( - Frequency.weekly, - {'MONDAY'}, - 2, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText, 'Every 2 weeks on Monday'); - - final ruleText2 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.weekly, - {'MONDAY'}, - 1, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText2, 'Weekly on Monday'); - }); - - test("getRecurrenceRuleText for Frequency Monthly", () { - final ruleText = RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - null, - 2, - null, - 2, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText, 'Every 2 months on Second Monday'); - - final ruleText2 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - null, - 1, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText2, 'Monthly on Day 1'); - }); - - test("getRecurrenceRuleText for Frequency Yearly", () { - final ruleText = RecurrenceUtils.getRecurrenceRuleText( - Frequency.yearly, - null, - 3, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText, 'Every 3 years on January 1'); - - final ruleText2 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.yearly, - null, - 1, - null, - null, - DateTime(2024, 1, 1), - null, - ); - expect(ruleText2, 'Annually on January 1'); - }); - - test('getWeekDaysString formats string correctly', () { - final weekDaysString = RecurrenceUtils.getWeekDaysString([ - WeekDays.monday, - WeekDays.tuesday, - WeekDays.wednesday, - ]); - expect(weekDaysString, 'Monday, Tuesday & Wednesday'); - }); - - test('isLastOccurenceOfWeekDay returns true for last occurrence', () { - final date = DateTime(2022, 1, 31); // Last Monday of January 2022 - final isLastOccurrence = RecurrenceUtils.isLastOccurenceOfWeekDay(date); - expect(isLastOccurrence, true); - }); - - test('isLastOccurenceOfWeekDay returns false for not last occurrence', () { - final date = DateTime(2022, 1, 24); // Not the last Monday of January 2022 - final isLastOccurrence = RecurrenceUtils.isLastOccurenceOfWeekDay(date); - expect(isLastOccurrence, false); - }); - }); - group('Test custom recurrence page.', () { - testWidgets('Appbar is being rendered as expected.', (tester) async { - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - final appBarFinder = find.byType(AppBar); - - expect(appBarFinder, findsOne); - expect(find.text('Custom recurrence'), findsOneWidget); - expect(find.text('Done'), findsOneWidget); - }); - - testWidgets('Custom divider widget.', (tester) async { - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - final customDividerFinder = find.byType(Divider); - expect(customDividerFinder, findsNWidgets(2)); - }); - - testWidgets('Custom inpurFieldHeading widgets.', (tester) async { - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - expect(find.text("Repeats every"), findsOne); - expect(find.text("Repeats on"), findsOne); - expect(find.text("Ends"), findsOne); - }); - - testWidgets('CustomRectangle & CustomTextField widgets.', (tester) async { - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - final customRectangleFinder = find.byType(CustomRectangle); - final customTextFieldFinder = find.byType(CustomTextField); - - expect(customRectangleFinder, findsNWidgets(2)); - expect(customTextFieldFinder, findsNWidgets(2)); - }); - - testWidgets('Check functionality of Interval Frequency', (tester) async { - final model = CreateEventViewModel(); - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - model: model, - ), - ); - await tester.pump(); - - // Test text field. - final inputsection1TextField = - find.byKey(const Key('inputsection1TextField')); - - await tester.enterText(inputsection1TextField, "23"); - await tester.pumpAndSettle(); - - expect(find.text("23"), findsOne); - - await tester.enterText(inputsection1TextField, "235"); - await tester.pumpAndSettle(); - - // Testing the limit is set to 2. - expect(find.text("23"), findsOne); - - // Test RecurrenceFrequencyDropdown - expect(find.text("week"), findsOne); - - final popupMenuButton = find.byType(PopupMenuButton).first; - - await tester.tap(popupMenuButton); - await tester.pumpAndSettle(); - - expect(find.text("day"), findsOne); - expect(find.text("month"), findsOne); - expect(find.text("year"), findsOne); - - // check functionality of interval frequency day - await tester.tap(find.text(EventIntervals.daily)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.daily); - expect(model.recurrenceInterval, EventIntervals.daily); - expect(model.weekDayOccurenceInMonth, null); - expect(model.weekDays, []); - - // check functionality of interval frequency week - await tester.tap(popupMenuButton); - await tester.pumpAndSettle(); - await tester.tap(find.text(EventIntervals.weekly)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.weekly); - expect(model.recurrenceInterval, EventIntervals.weekly); - expect(model.weekDayOccurenceInMonth, null); - expect(model.weekDays, []); - - // check functionality of interval frequency week - await tester.tap(popupMenuButton); - await tester.pumpAndSettle(); - await tester.tap(find.text(EventIntervals.monthly)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.monthly); - expect(model.recurrenceInterval, EventIntervals.monthly); - expect(model.weekDayOccurenceInMonth, null); - expect(model.weekDays, []); - - // check functionality of interval frequency year - await tester.tap(popupMenuButton); - await tester.pumpAndSettle(); - await tester.tap(find.text(EventIntervals.yearly)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.yearly); - expect(model.recurrenceInterval, EventIntervals.yearly); - expect(model.weekDayOccurenceInMonth, null); - expect(model.weekDays, []); - }); - - testWidgets("Dropdown for Monthly frequency", (tester) async { - final model = CreateEventViewModel(); - model.recurrenceStartDate = DateTime(2023, 02, 28); - await tester.pumpWidget( - createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - model: model, - ), - ); - await tester.pump(); - - final frequencyDropdown = find.byType(PopupMenuButton).first; - await tester.tap(frequencyDropdown); - await tester.pumpAndSettle(); - - expect(find.text("day"), findsOne); - expect(find.text("month"), findsOne); - expect(find.text("year"), findsOne); - - // select interval frequency as month - await tester.tap(find.text("month")); - await tester.pumpAndSettle(); - - await tester.tap(find.byType(PopupMenuButton).last); - await tester.pumpAndSettle(); - - // check all the functionality of dropdown option shown on isLastDayOccurence is true (monthlyOption[2]) - final monthlyRecurrenceLabel1 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - { - RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1], - }, - int.parse(model.repeatsEveryCountController.text), - int.parse(model.endOccurenceController.text), - -1, - model.recurrenceStartDate, - model.recurrenceEndDate, - ); - expect( - find.text(monthlyRecurrenceLabel1), - findsOne, - ); - - await tester.tap(find.text(monthlyRecurrenceLabel1)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.monthly); - expect(model.recurrenceLabel, monthlyRecurrenceLabel1); - expect(model.weekDayOccurenceInMonth, -1); - expect(model.weekDays, { - RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1], - }); - - // check all the functionality of dropdown option shown when weekDayOccurence~=5 (monthlyOption[1]) - await tester.tap(find.byType(PopupMenuButton).last); - await tester.pumpAndSettle(); - - final monthlyRecurrenceLabel2 = RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - { - RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1], - }, - int.parse(model.repeatsEveryCountController.text), - int.parse(model.endOccurenceController.text), - RecurrenceUtils.getWeekDayOccurenceInMonth( - model.recurrenceStartDate, - ), - model.recurrenceStartDate, - model.recurrenceEndDate, - ); - expect( - find.text(monthlyRecurrenceLabel2), - findsOne, - ); - - await tester.tap(find.text(monthlyRecurrenceLabel2)); - await tester.pumpAndSettle(); - - expect(model.frequency, Frequency.monthly); - expect(model.recurrenceLabel, monthlyRecurrenceLabel2); - expect( - model.weekDayOccurenceInMonth, - RecurrenceUtils.getWeekDayOccurenceInMonth( - model.recurrenceStartDate, - ), - ); - expect(model.weekDays, { - RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1], - }); - }); - - testWidgets('CustomWeekDaySelector', (tester) async { - final widget = createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - ); - await tester.pumpWidget(widget); - await tester.pump(); - - expect(find.byType(CustomWeekDaySelector), findsOne); - - await tester.tap(find.text("M")); - await tester.pumpAndSettle(); - await tester.tap(find.text("W")); - await tester.pumpAndSettle(); - - expect(find.text("S"), findsNWidgets(2)); - expect(find.text("M"), findsNWidgets(1)); - expect(find.text("T"), findsNWidgets(2)); - expect(find.text("W"), findsNWidgets(1)); - expect(find.text("F"), findsNWidgets(1)); - }); - - testWidgets('EventEndOptions', (tester) async { - final CreateEventViewModel model = CreateEventViewModel(); - final widget = createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - model: model, - ); - await tester.pumpWidget(widget); - await tester.pump(); - - expect( - find.byKey( - const Key('neverRadioButton'), - ), - findsOne, - ); - expect( - find.byKey( - const Key('onRadioButton'), - ), - findsOne, - ); - expect(find.byKey(const Key('afterRadioButton')), findsOne); - - final afterFinder = find.byKey(const Key('afterRadioButton')); - - await tester.tap(afterFinder); - await tester.pumpAndSettle(); - - final dateSelectorCalendar = - find.byKey(const Key('dateSelectorCalendar')); - - await tester.tap(dateSelectorCalendar); - await tester.pumpAndSettle(); - - expect(find.byType(DatePickerDialog), findsOne); - - await tester.tap(find.text('15').last); - await tester.pumpAndSettle(); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - expect(find.byType(DatePickerDialog), findsNothing); - - await tester.tap(find.text('never')); - await tester.pumpAndSettle(); - - expect(model.eventEndType, EventEndTypes.never); - expect(model.recurrenceEndDate, null); - - await tester.tap(find.text('on')); - await tester.pumpAndSettle(); - - expect(model.eventEndType, EventEndTypes.on); - }); - - testWidgets('Done button', (tester) async { - final CreateEventViewModel model = CreateEventViewModel(); - final widget = createCustomRecurrenceScreen( - theme: TalawaTheme.darkTheme, - model: model, - ); - await tester.pumpWidget(widget); - await tester.pump(); - - await tester.tap(find.text('Done')); - await tester.pumpAndSettle(); - - expect(model.recurrenceEndDate, null); - - await tester.tap(find.text('on')); - await tester.pumpAndSettle(); - - await tester.tap(find.text('Done')); - await tester.pumpAndSettle(); - - await tester.tap(find.text('after')); - await tester.pumpAndSettle(); - - final afterTextField = find.byType(CustomTextField).last; - - await tester.tap(afterTextField); - await tester.pumpAndSettle(); - - await tester.enterText(afterTextField, '2'); - - await tester.tap(find.text('Done')); - await tester.pumpAndSettle(); - - expect(model.endOccurenceController.text, '2'); - }); - }); -} diff --git a/test/views/after_auth_screens/events/create_event_page_test.dart b/test/views/after_auth_screens/events/create_event_page_test.dart deleted file mode 100644 index c947afb14..000000000 --- a/test/views/after_auth_screens/events/create_event_page_test.dart +++ /dev/null @@ -1,807 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:mockito/mockito.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_page.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/recurrence_dialog.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; -import '../../../widget_tests/after_auth_screens/events/create_event_form_test.dart'; - -/// Mock class instance of CallbackFunction. -class MockCallbackFunction extends Mock { - /// Mock function call. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -/// mock instance for setDateCallback. -final setDateCallback = MockCallbackFunction(); - -/// mock instance for setTimeCallback. -final setTimeCallback = MockCallbackFunction(); - -/// Creates a EventScreen for tests. -/// -/// **params**: -/// * `themeMode`: ThemeMode -/// * `theme`: ThemeData of App -/// -/// **returns**: -/// * `Widget`: Event Screen Widget -Widget createEventScreen({ - ThemeMode themeMode = ThemeMode.light, - required ThemeData theme, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme, - home: const Scaffold( - body: CreateEventPage( - key: Key('CreateEventScreen'), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - SizeConfig().test(); - testSetupLocator(); - // locator.unregister(); - locator.unregister(); - // locator.registerSingleton(OrganizationService()); - // locator.registerSingleton(LikeButtonViewModel()); - - setUp(() { - registerServices(); - }); - - tearDown(() { - unregisterServices(); - }); - group('testing -> CreateEventPage', () { - testWidgets("Checking tap Inkwell for setDate 1 datetime", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - final inkwellFinder = find.byType(InkWell); - expect(inkwellFinder, findsNWidgets(8)); - - final file = File('fakePath'); - - final multimediaPickerService = locator(); - - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(inkwellFinder.at(1)); - await tester.pump(); - }); - - testWidgets("Checking tap Inkwell for setTime 1 datetime", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - final inkwellFinder = find.byType(InkWell); - expect(inkwellFinder, findsNWidgets(8)); - - final file = File('fakePath'); - - final multimediaPickerService = locator(); - - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(inkwellFinder.at(2)); - await tester.pump(); - }); - testWidgets('Test Add Button', (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - when(userConfig.loggedIn).thenReturn(true); - - final addBtn = find.byKey(const Key('addButton')); - - await tester.tap(addBtn); - await tester.pumpAndSettle(); - - expect(createEventViewModel.validate, AutovalidateMode.disabled); - }); - - testWidgets('recurrence button', (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - const String prev = "Does not repeat"; - - expect(find.text(prev), findsAny); - await tester.ensureVisible(find.byKey(const Key("inkwell_recurrLabel"))); - await tester.tap(find.text(prev)); - await tester.pumpAndSettle(); - await tester.tap(find.text("Custom...")); - await tester.pumpAndSettle(); - - expect(find.byType(ShowRecurrenceDialog), findsNothing); - }); - - testWidgets("Checking tap Inkwell for setDate 2 datetime", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - final inkwellFinder = find.byType(InkWell); - expect(inkwellFinder, findsNWidgets(8)); - - final file = File('fakePath'); - - final multimediaPickerService = locator(); - - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(inkwellFinder.at(3)); - await tester.pump(); - }); - - testWidgets("Checking tap Inkwell for set time 2 datetime", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - final inkwellFinder = find.byType(InkWell); - expect(inkwellFinder, findsNWidgets(8)); - - final file = File('fakePath'); - - final multimediaPickerService = locator(); - - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(inkwellFinder.at(4)); - await tester.pump(); - }); - - testWidgets('checks if the upload photo from button shows correct icon', - (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - final finder = find.byKey(const Key('txt_btn_cep')); - - expect(finder, findsOneWidget); - final file = File('fakePath'); - final multimediaPickerServices = locator(); - - when(multimediaPickerServices.getPhotoFromGallery()) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(finder); - await tester.pump(); - - expect(finder, findsOneWidget); - }); - - testWidgets( - 'checks if the uploaded photo from gallery button is removed after pressing remove button', - (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - /// using the key of icon button - /// because their are many icon button - - final finder = find.byKey(const Key('txt_btn_cep')); - - final cancelBtn = find.byIcon(Icons.cancel); - - expect(finder, findsOneWidget); - - final file = File('fakePath'); - - final multimediaPickerService = locator(); - - when(multimediaPickerService.getPhotoFromGallery(camera: false)) - .thenAnswer((_) async { - return file; - }); - - await tester.tap(finder); - await tester.pump(); - - await tester.tap(cancelBtn); - await tester.pump(); - }); - - testWidgets("Testing All day section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final allDayText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('All day'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(allDayText, findsOneWidget); - expect(switches, findsNWidgets(3)); - expect( - (tester.widget(allDayText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(0)); - await tester.pumpAndSettle(); - expect((tester.widgetList(switches).toList()[0] as Switch).value, false); - }); - - testWidgets("Testing Keep Registerable section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepRegisterableText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Registerable'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(keepRegisterableText, findsOneWidget); - expect(switches, findsNWidgets(3)); - expect( - (tester.widget(keepRegisterableText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.widgetList(switches).toList()[1] as Switch).value, true); - await tester.ensureVisible(switches.at(1)); - await tester.tap(switches.at(1)); - await tester.pumpAndSettle(); - expect((tester.widgetList(switches).toList()[1] as Switch).value, false); - }); - - testWidgets("Testing Keep public section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepPublicText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Public'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(keepPublicText, findsOneWidget); - expect(switches, findsNWidgets(3)); - expect( - (tester.widget(keepPublicText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.widgetList(switches).toList()[2] as Switch).value, true); - await tester.ensureVisible(switches.at(2)); - await tester.tap(switches.at(2)); - await tester.pumpAndSettle(); - expect((tester.widgetList(switches).toList()[2] as Switch).value, false); - }); - - // testWidgets("Checking tap Inkwell work for admin list", (tester) async { - // await tester.pumpWidget( - // createEventScreen( - // themeMode: ThemeMode.dark, - // theme: TalawaTheme.darkTheme, - // ), - // ); - // await tester.pump(); - // final inkwellFinder = find.byType(InkWell); - // expect(inkwellFinder, findsNWidgets(8)); - - // ///returning the file variable to the - // ///result of function multimediaPickerService.getPhotoFromGallery - // ///when this function is called in the - // ///view model of add_post_page. - // final file = File('fakePath'); - - // /// using the new instance of multimediaPickerService - // /// so that when statement can be used again, - // /// else it gives null point exception - // final multimediaPickerService = locator(); - - // /// when is function provided by mockito lib - // when(multimediaPickerService.getPhotoFromGallery(camera: false)) - // .thenAnswer((_) async { - // return file; - // }); - - // await tester.ensureVisible(find.byKey(const Key('inwell_cep1'))); - // await tester.pumpAndSettle(); - - // await tester.tap(find.byKey(const Key('inwell_cep1'))); - // await tester.pump(); - - // //TODO: implement Rest of the test when the _adminCheckedMap or _memberCheckedMap return true for some id - // //TODO: for not it return false for all the ordMember.id - // // - // // orgMembersList.forEach((orgMember) { - // // if (isAdmin) { - // // _adminCheckedMap.putIfAbsent(orgMember.id!, () => false); - // // } else { - // // _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - // // } - // // _memberCheckedMap.putIfAbsent(orgMember.id!, () => false); - // // }); - // }); - - testWidgets("Checking tap Inkwell for second add to bottom sheet", - (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - final inkwellFinder = find.byType(InkWell); - expect(inkwellFinder, findsNWidgets(8)); - - await tester.ensureVisible(find.byKey(const Key('inwell_cep2'))); - await tester.pump(); - - // await tester.tap(find.byKey(const Key('text_btn_ambs'))); - await tester.tap( - find.byKey( - const Key('inwell_cep2'), - ), - ); - await tester.pump(); - - await tester.pump(); - await tester.ensureVisible(find.byKey(const Key('text_btn_ambs1'))); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('text_btn_ambs1'))); - await tester.pump(); - }); - group('setState Coverage completion', () { - testWidgets('Tap on DateTimeTile date', (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileDate')).first); - await tester.pump(); - - await tester.ensureVisible(find.byKey(const Key('key for test cep'))); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - expect(find.byType(CalendarDatePicker), findsOneWidget); - - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - expect( - find.text(DateTime.now().toString().split(' ').first), - findsNWidgets(2), - ); - }); - - testWidgets('Test end date selection', (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileDate')).last); - await tester.pump(); - - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - expect(find.text('Does not repeat'), findsOneWidget); - }); - - testWidgets('Tap on DateTimeTile time', (tester) async { - final currentTime = DateTime.now(); - final futureTime = currentTime.add(const Duration(minutes: 30)); - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).first); - await tester.pump(); - - expect(find.byType(TimePickerDialog), findsOneWidget); - - await tester.tap(find.text('OK')); - await tester.pump(); - expect( - find.text(DateFormat.jm().format(currentTime)), - findsOneWidget, - ); - - expect( - find.text(DateFormat.jm().format(futureTime)), - findsOneWidget, - ); - }); - testWidgets('Tap on DateTimeTile date', (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileDate')).last); - await tester.pump(); - - await tester.ensureVisible(find.byKey(const Key('key for test cep'))); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - expect(find.byType(CalendarDatePicker), findsOneWidget); - - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - expect( - find.text(DateTime.now().toString().split(' ').first), - findsNWidgets(2), - ); - }); - testWidgets('Tap on DateTimeTile time', (tester) async { - final currentTime = DateTime.now(); - final futureTime = currentTime.add(const Duration(minutes: 30)); - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(switches, findsNWidgets(3)); - expect((tester.widgetList(switches).toList()[0] as Switch).value, true); - await tester.ensureVisible(switches.at(0)); - await tester.tap(switches.at(1)); - - await tester.pump(); - await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).last); - await tester.pump(); - - expect(find.byType(TimePickerDialog), findsOneWidget); - - await tester.tap(find.text('OK')); - await tester.pump(); - expect( - find.text(DateFormat.jm().format(currentTime)), - findsOneWidget, - ); - - expect( - find.text(DateFormat.jm().format(futureTime)), - findsOneWidget, - ); - }); - }); - - group("Tests for integration with view model and services", () { - late final CreateEventViewModel cachedViewModel = - getAndRegisterCreateEventModel(); - - // testWidgets("setup MockCreateEventViewModel", (tester) async { - // cachedViewModel = getAndRegisterCreateEventModel(); - // }); - - testWidgets("Check if AppBar buttons work", (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - expect(find.byType(CreateEventPage), findsOneWidget); - - await tester.tap(find.text("Add")); - await tester.pumpAndSettle(); - - await tester.tap(find.byIcon(Icons.close)); - await tester.pumpAndSettle(); - - // expect(find.byType(CreateEventPage), findsNothing); - }); - }); - - testWidgets( - "Check if data coming from view model show up correctly", - (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - }); - }, - ); - - testWidgets("Check if bottom sheet unticking works", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - - await tester.ensureVisible(find.byKey(const Key('inwell_cep2'))); - await tester.pump(); - - // await tester.tap(find.byKey(const Key('text_btn_ambs'))); - await tester.tap( - find.byKey( - const Key('inwell_cep2'), - ), - ); - await tester.pump(); - - await tester.pump(); - await tester.ensureVisible(find.byKey(const Key('text_btn_ambs1'))); - await tester.pumpAndSettle(); - - await tester.tap(find.byType(CheckboxListTile).first); - expect(cachedViewModel.memberCheckedMap['fakeUser1'], true); - await tester.pumpAndSettle(); - }); - - testWidgets( - "Check if deleting members and admins works", - (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //expect(find.text("p s"), findsOneWidget); - expect(find.text("r p"), findsOneWidget); - - //await tester.ensureVisible(find.text("p s")); - // await tester.pumpAndSettle(); - // await tester.tap(find.byIcon(Icons.cancel_rounded).at(0)); - // await tester.pumpAndSettle(const Duration(seconds: 1)); - - //expect(cachedViewModel.selectedAdmins, []); - expect(find.text("r p"), findsOneWidget); - - await tester.ensureVisible(find.text("r p")); - await tester.pumpAndSettle(); - await tester.tap(find.byIcon(Icons.cancel_rounded).at(0)); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - //expect(cachedViewModel.selectedAdmins, []); - expect(cachedViewModel.selectedMembers, []); - }); - }, - ); - }); - }); -} diff --git a/test/views/after_auth_screens/events/event_filter_bottomsheet_test.dart b/test/views/after_auth_screens/events/event_filter_bottomsheet_test.dart deleted file mode 100644 index bd75c3302..000000000 --- a/test/views/after_auth_screens/events/event_filter_bottomsheet_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/services/third_party_service/multi_media_pick_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -import 'package:talawa/widgets/custom_drawer.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockCallbackFunction extends Mock { - void call(); -} - -final setDateCallback = MockCallbackFunction(); -final setTimeCallback = MockCallbackFunction(); - -/// Creates Explore Event Screen. -/// -/// **params**: -/// * `model`: Home Screen Model -/// -/// **returns**: -/// * `Widget`: Returns Explore Screen Widget -Widget createExploreEventsScreen(MainScreenViewModel model) => MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - drawer: CustomDrawer( - homeModel: model, - ), - body: const ExploreEvents( - key: Key('ExploreEvents'), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); -void main() { - SizeConfig().test(); - testSetupLocator(); - locator.unregister(); - setUp(() { - registerServices(); - }); - tearDown(() { - unregisterServices(); - }); - group('testing filters bottomsheet', () { - testWidgets("Checking tap cross works", (tester) async { - await mockNetworkImages(() async { - locator.unregister(); - final model = ExploreEventsViewModel(); - locator.registerSingleton(model); - final homeModel = locator(); - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - await tester.tap(find.bySemanticsLabel('Filters')); - await tester.pumpAndSettle(); - final finder = find.byKey(const Key('close')); - expect(finder, findsOneWidget); - await tester.tap(finder); - await tester.pumpAndSettle(); - expect(find.bySemanticsLabel('Filters'), findsAtLeast(1)); - }); - }); - testWidgets("Testing if Filter button works", (tester) async { - await mockNetworkImages(() async { - locator.unregister(); - final model = ExploreEventsViewModel(); - locator.registerSingleton(model); - final homeModel = locator(); - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - await tester.tap(find.bySemanticsLabel('Filters')); - await tester.pumpAndSettle(); - await tester.pump(); - await tester.tap(find.byKey(const Key('Public Events'))); - await tester.pumpAndSettle(); - expect(model.chosenValue, 'Public Events'); - }); - }); - }); -} diff --git a/test/views/after_auth_screens/events/event_info_body_test.dart b/test/views/after_auth_screens/events/event_info_body_test.dart deleted file mode 100644 index b7b8b5bba..000000000 --- a/test/views/after_auth_screens/events/event_info_body_test.dart +++ /dev/null @@ -1,242 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_info_view_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_info_body.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Event getTestEvent({ - bool isPublic = false, - bool viewOnMap = true, - bool asAdmin = false, -}) { - return Event( - id: "1", - title: "test_event", - creator: User( - id: asAdmin ? "xzy1" : "acb1", - firstName: "ravidi", - lastName: "shaikh", - ), - isPublic: isPublic, - startDate: "00/00/0000", - endDate: "12/12/9999", - startTime: "00:00", - endTime: "24:00", - location: "iitbhu, varanasi", - description: "test_event_description", - admins: [ - User( - firstName: "ravidi_admin_one", - lastName: "shaikh_admin_one", - ), - User( - firstName: "ravidi_admin_two", - lastName: "shaikh_admin_two", - ), - ], - attendees: [ - Attendee( - id: "1", - firstName: "Test", - lastName: "User", - ), - ], - isRegisterable: true, - ); -} - -final exploreEventsViewModel = ExploreEventsViewModel(); -late EventInfoViewModel _eventInfoViewModel; - -Widget createEventInfoBody({ - bool isPublic = true, - bool viewOnMap = true, - bool asAdmin = false, -}) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return BaseView( - onModelReady: (model) { - model.initialize( - args: { - "event": getTestEvent( - isPublic: isPublic, - viewOnMap: viewOnMap, - asAdmin: asAdmin, - ), - "exploreEventViewModel": exploreEventsViewModel, - }, - ); - - _eventInfoViewModel = model; - }, - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const Scaffold( - body: CustomScrollView( - slivers: [ - EventInfoBody(), - ], - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - }, - ); -} - -void main() { - testSetupLocator(); - // locator().test(); - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group("Widget Tests for EventInfoBody", () { - testWidgets("Check if EventInfoBody shows up", (tester) async { - await tester.pumpWidget(createEventInfoBody()); - await tester.pumpAndSettle(); - - expect(find.byType(EventInfoBody), findsOneWidget); - expect(find.byType(SliverToBoxAdapter), findsOneWidget); - }); - - testWidgets("Check if all the text shows up correctly", (tester) async { - await tester.pumpWidget(createEventInfoBody()); - await tester.pumpAndSettle(); - - expect(find.text("test_event"), findsOneWidget); - expect(find.text("Created by: ravidi shaikh"), findsOneWidget); - expect(find.text("00/00/0000 - 12/12/9999"), findsOneWidget); - expect(find.text("00:00 - 24:00"), findsOneWidget); - expect(find.text("iitbhu, varanasi"), findsOneWidget); - expect(find.text("test_event_description"), findsOneWidget); - expect(find.text("ravidi_admin_one shaikh_admin_one"), findsOneWidget); - expect(find.text("Test User"), findsOneWidget); // Registrants - }); - - testWidgets( - "Check if all the children show up correctly", - (tester) async { - await tester.pumpWidget(createEventInfoBody()); - await tester.pumpAndSettle(); - }, - ); - - testWidgets("Check if all taps work", (tester) async { - await tester.pumpWidget(createEventInfoBody()); - await tester.pumpAndSettle(); - - // No way to test for now as onTap does nothing. - // Update this test accordingly in future. - - await tester.tap(find.byKey(const Key("Attendee0"))); - await tester.tap(find.byKey(const Key("Admins0"))); - - await tester.pumpAndSettle(); - }); - - testWidgets("Check if edit button appears for creator", (tester) async { - await tester.pumpWidget(createEventInfoBody(asAdmin: true)); - await tester.pumpAndSettle(); - - expect(find.byType(IconButton), findsOneWidget); - await tester.tap(find.byType(IconButton)); - // verify(navigationService.pushScreen("/editEventPage", - // arguments: getTestEvent()),); - }); - - testWidgets("Check if edit button doesn't appear for non creator", - (tester) async { - await tester.pumpWidget(createEventInfoBody(asAdmin: false)); - await tester.pumpAndSettle(); - - expect(find.byType(IconButton), findsNothing); - // verify(navigationService.pushScreen("/editEventPage", arguments: getTestEvent())); - }); - }); - - group("Check if conditional children show up", () { - testWidgets("Private event", (tester) async { - await tester.pumpWidget(createEventInfoBody(isPublic: false)); - await tester.pumpAndSettle(); - - expect(find.text("private"), findsOneWidget); - expect(find.byIcon(Icons.lock), findsOneWidget); - }); - - testWidgets("Public event", (tester) async { - await tester.pumpWidget(createEventInfoBody(isPublic: true)); - await tester.pumpAndSettle(); - - expect(find.text("public"), findsOneWidget); - expect(find.byIcon(Icons.lock_open), findsOneWidget); - }); - - testWidgets("Loading indicator", (tester) async { - // Don't show view on map - - await tester.pumpWidget(createEventInfoBody()); - await tester.pumpAndSettle(); - - // Fully loaded - expect( - find.byWidgetPredicate( - (widget) => - widget is SliverToBoxAdapter && - widget.child is Padding && - (widget.child! as Padding).child is Column && - ((widget.child! as Padding).child! as Column).children.last - is ListView, - ), - findsOneWidget, - ); - - // Model is loading - _eventInfoViewModel.setState(ViewState.busy); - await tester.pump(); - - expect( - find.byWidgetPredicate( - (widget) => - widget is SliverToBoxAdapter && - widget.child is Padding && - (widget.child! as Padding).child is Column && - ((widget.child! as Padding).child! as Column).children.last - is Padding, - ), - findsOneWidget, - ); - }); - }); -} diff --git a/test/views/after_auth_screens/feed/individual_post_test.dart b/test/views/after_auth_screens/feed/individual_post_test.dart deleted file mode 100644 index 19c8b6f2b..000000000 --- a/test/views/after_auth_screens/feed/individual_post_test.dart +++ /dev/null @@ -1,332 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/feed/individual_post.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_widget.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createIndividualPostViewWidget(Post post) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: IndividualPostView(post: post), - navigatorKey: navigationService.navigatorKey, - ); - }, - ); -} - -final LikedBy user = LikedBy(sId: "test_id"); - -final u1 = User( - id: '123', - firstName: 'Lakshay', - lastName: 'Gupta', - email: 'test@test.com', -); -final u2 = User( - id: '123', - firstName: 'Ankit', - lastName: 'Varshney', - email: 'test@test.com', -); -final List users = [u1, u2]; -List comments = [ - Comments(sId: 'comment1'), - Comments(sId: 'comment2'), - Comments(sId: 'comment3'), - Comments(sId: 'comment4'), - Comments(sId: 'comment5'), - Comments(sId: 'comment6'), -]; -final comment = Comment( - creator: User( - id: '123', - firstName: 'Ankit', - lastName: 'Varshney', - email: 'test@test.com', - ), - createdAt: '123456', - text: 'test text', - post: 'test post', - likeCount: 'test count', -); - -final LikedBy l1 = LikedBy(sId: 'test1'); -final LikedBy l2 = LikedBy(sId: 'test2'); -final List likeby = [l1, l2]; - -final comment1 = Comments(sId: 'comment1'); -final comment2 = Comments(sId: 'comment2'); -final comment3 = Comments(sId: 'comment3'); -final List comments1 = [comment1, comment2, comment3]; - -final myBirthday = DateTime.utc(2004, DateTime.june, 16, 5, 30, 0, 0, 0); -final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday, - description: 'test description', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments1, -); -Widget createLikedUserCircleAvatar(LikedBy user) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: likedUserCircleAvatar(user), - navigatorKey: navigationService.navigatorKey, - ); - }, - ); -} - -Widget createIndividualPageLikeSection() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: IndividualPageLikeSection( - usersLiked: [ - LikedBy(sId: 'test1'), - LikedBy(sId: 'test2'), - LikedBy(sId: 'test3'), - LikedBy(sId: 'test4'), - ], - ), - navigatorKey: navigationService.navigatorKey, - ); - }, - ); -} - -Widget createIndividualPostCommentSectionWidget() { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: BaseView( - onModelReady: (model) { - model.initialize(); - }, - builder: (context, model, child) { - return IndividualPostCommentSection( - comments: comments, - postID: 'test post id', - ); - }, - ), - ); -} - -Widget createCommentTemplateWidget(Comment comment) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: BaseView( - onModelReady: (model) { - model.initialize(); - }, - builder: (context, model, child) { - return CommentTemplate(comment: comment); - }, - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - - setUp(() { - registerServices(); - }); - - group("testing Individual Post View ", () { - testWidgets("Check if Send button is disabled", - (WidgetTester tester) async { - await tester.pumpWidget(createIndividualPostViewWidget(post)); - await tester.pumpAndSettle(); - - final textFieldFinder = find.byKey(const Key('indi_post_tf_key')); - final textButtonFinder = find.byKey(const Key('sendButton')); - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Clear the text field - await tester.enterText(textFieldFinder, ''); - await tester.pumpAndSettle(); - // The button should be disabled after clearing the text - expect(tester.widget(textButtonFinder).enabled, isFalse); - - expect(find.byType(NewsPost), findsOneWidget); - expect(find.byType(IndividualPageLikeSection), findsOneWidget); - expect(find.byType(IndividualPostCommentSection), findsOneWidget); - }); - testWidgets("Check if Send button is enabled and working", - (WidgetTester tester) async { - await tester.pumpWidget(createIndividualPostViewWidget(post)); - await tester.pumpAndSettle(); - - final textFieldFinder = find.byKey(const Key('indi_post_tf_key')); - final textButtonFinder = find.byKey(const Key('sendButton')); - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Clear the text field - await tester.enterText(textFieldFinder, ''); - await tester.pumpAndSettle(); - // The button should be disabled after clearing the text - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Enter non-empty text - await tester.enterText(textFieldFinder, 'Test Comment'); - await tester.pumpAndSettle(); - // The button should now be enabled - expect(tester.widget(textButtonFinder).enabled, isTrue); - - // Verify that the text field is cleared - expect(find.text('Test Comment'), findsOneWidget); - - // Tap the send button - await tester.tap(textButtonFinder); - await tester.pumpAndSettle(); - - expect(find.byType(NewsPost), findsOneWidget); - expect(find.byType(IndividualPageLikeSection), findsOneWidget); - expect(find.byType(IndividualPostCommentSection), findsOneWidget); - }); - testWidgets("Checking if state changes when text is cleared", - (WidgetTester tester) async { - await tester.pumpWidget(createIndividualPostViewWidget(post)); - await tester.pumpAndSettle(); - - final textFieldFinder = find.byKey(const Key('indi_post_tf_key')); - final textButtonFinder = find.byKey(const Key('sendButton')); - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Clear the text field - await tester.enterText(textFieldFinder, ''); - await tester.pumpAndSettle(); - // The button should be disabled after clearing the text - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Enter non-empty text - await tester.enterText(textFieldFinder, 'Test Comment'); - await tester.pumpAndSettle(); - // The button should now be enabled - expect(tester.widget(textButtonFinder).enabled, isTrue); - - // Verify that the text field is cleared - expect(find.text('Test Comment'), findsOneWidget); - - // Testing if state changes back - await tester.enterText(textFieldFinder, ''); - await tester.pumpAndSettle(); - expect(tester.widget(textButtonFinder).enabled, isFalse); - - // Tap the send button - await tester.tap(textButtonFinder); - await tester.pumpAndSettle(); - - expect(find.byType(NewsPost), findsOneWidget); - expect(find.byType(IndividualPageLikeSection), findsOneWidget); - expect(find.byType(IndividualPostCommentSection), findsOneWidget); - }); - }); - - group("Test for likedUserCircleAvatar", () { - testWidgets("checking if likedUserCircleAvatar widget correctly shows up", - (WidgetTester tester) async { - await tester.pumpWidget(createLikedUserCircleAvatar(user)); - await tester.pumpAndSettle(); - - expect(find.byType(CircleAvatar), findsOneWidget); - }); - }); - group("Test for IndividualPageLikeSection", () { - testWidgets( - "checking if IndividualPageLikeSection widget correctly shows up", - (WidgetTester tester) async { - await tester.pumpWidget(createIndividualPageLikeSection()); - await tester.pumpAndSettle(); - expect(find.text("Liked by"), findsOneWidget); - - expect(find.byType(Row), findsOneWidget); - expect( - find.byWidget(likedUserCircleAvatar(user)), - findsNWidgets(4), - ); - }); - }); - - group("Test for IndividualPostCommentSection", () { - testWidgets( - "checking if IndividualPostCommentSection widget correctly shows up", - (WidgetTester tester) async { - await tester.pumpWidget(createIndividualPostCommentSectionWidget()); - await tester.pumpAndSettle(); - - expect(find.text("Comments"), findsOneWidget); - }); - }); - group("Test for CommentTemplate", () { - testWidgets("checking the comment template widgets", - (WidgetTester tester) async { - await tester.pumpWidget(createCommentTemplateWidget(comment)); - await tester.pumpAndSettle(); - - expect(find.byType(Row), findsOneWidget); - expect(find.byType(CircleAvatar), findsOneWidget); - expect(find.byType(Column), findsOneWidget); - expect( - find.text( - "${comment.creator!.firstName!} ${comment.creator!.lastName!}", - ), - findsOneWidget, - ); - expect(find.text(comment.text!), findsOneWidget); - }); - }); -} diff --git a/test/views/after_auth_screens/feed/pinned_post_screen.dart b/test/views/after_auth_screens/feed/pinned_post_screen.dart deleted file mode 100644 index 0913743cd..000000000 --- a/test/views/after_auth_screens/feed/pinned_post_screen.dart +++ /dev/null @@ -1,144 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:file/local.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:get_it/get_it.dart'; -import 'package:mockito/mockito.dart'; -import 'package:network_image_mock/network_image_mock.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart'; -import 'package:talawa/views/base_view.dart'; -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -class MockCacheManager extends Mock implements DefaultCacheManager { - static const fileSystem = LocalFileSystem(); - - @override - Stream getImageFile( - String url, { - String? key, - Map? headers, - bool withProgress = true, - int? maxHeight, - int? maxWidth, - }) async* { - if (url == "wrong_url") { - throw Exception("File not found"); - } else { - yield FileInfo( - fileSystem.file(url), - FileSource.Cache, - DateTime(2050), - url, - ); - } - } -} - -Widget createApp() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const PinnedPostScreen( - post: { - 'title': 'Sample Title', - 'time': '23:00', - 'postId': 'postId', - 'imageUrl': 'imageUrl', - }, - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -} - -Future showPinnedPostScreen(WidgetTester tester) async { - await tester.pumpWidget(createApp()); - await tester.pumpAndSettle(); -} - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - registerServices(); - locator().test(); - }); - GetIt.instance.registerSingleton( - MockCacheManager(), - ); - - GetIt.instance.registerSingleton( - NavigationService(), - ); - - GetIt.instance.registerSingleton( - SizeConfig(), - ); - - tearDown(() { - unregisterServices(); - }); - - testWidgets('Check if Pinned Post Screen page shows up', (tester) async { - await showPinnedPostScreen(tester); - expect(find.byType(SafeArea), findsOneWidget); - }); - - group('Check if Pinned Post Screen page has -', () { - testWidgets('Title', (tester) async { - await showPinnedPostScreen(tester); - expect(find.text('Sample Title'), findsOneWidget); - }); - - testWidgets('Time', (tester) async { - await showPinnedPostScreen(tester); - expect(find.text('23:00hr'), findsOneWidget); - }); - }); - - // Check if cached network image is working - testWidgets('Check if CachedNetworkImage is working', (tester) async { - await mockNetworkImagesFor(() async { - await showPinnedPostScreen(tester); - expect(find.byType(CachedNetworkImage), findsOneWidget); - }); - }); - - testWidgets('Check if CachedNetworkImage shows CircularProgressIndicator', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: PinnedPostScreen( - post: { - 'title': 'Sample Title', - 'time': '23:00', - 'postId': 'postId', - 'imageUrl': 'wrong_url', - }, - cacheManager: GetIt.instance.get(), - ), - ), - ); - await tester.pump(); - expect(find.byType(CircularProgressIndicator), findsOneWidget); - }); -} diff --git a/test/views/after_auth_screens/join_org_after_auth_test/access_request_screen_test.dart b/test/views/after_auth_screens/join_org_after_auth_test/access_request_screen_test.dart deleted file mode 100644 index f061229e0..000000000 --- a/test/views/after_auth_screens/join_org_after_auth_test/access_request_screen_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/access_request_view_model.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/access_request_screen.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Widget accessRequestScreen() { - return BaseView( - onModelReady: (model) => model.initialise(fakeOrgInfo), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: SendAccessRequest(org: fakeOrgInfo), - navigatorKey: navigationService.navigatorKey, - ); - }, - ); -} - -void main() { - testSetupLocator(); - setUp(() => registerServices()); - tearDown(() => unregisterServices()); - group("SendRequestAccess Screen test", () { - testWidgets("SendRequestAccess screen is build correctly", - (WidgetTester tester) async { - await tester.pumpWidget(accessRequestScreen()); - await tester.pumpAndSettle(); - - //Verify that appbar is present with transparent background color - expect(find.byType(AppBar), findsOneWidget); - final AppBar appBar = tester.firstWidget(find.byType(AppBar)); - expect(appBar.backgroundColor, Colors.transparent); - - //Verify that the image is present - expect(find.byType(Image), findsOneWidget); - expect(find.text("You need access"), findsOneWidget); - expect( - find.text("Request access, or switch to an account with access"), - findsOneWidget, - ); - expect(find.byType(TextField), findsOneWidget); - //Verify that the send request button is present - expect(find.text("Request Access"), findsOneWidget); - - //Tap the "Request Access" button and trigger a frame - await tester.tap(find.text("Request Access")); - await tester.pump(); - }); - }); -} diff --git a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart b/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart deleted file mode 100644 index 448d301d8..000000000 --- a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart +++ /dev/null @@ -1,286 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/organization_search_list.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createJoinOrgAfterAuth({ - String orgId = "fake_id", -}) { - return BaseView( - onModelReady: (model) => model.initialise(orgId), - builder: (context, model, child) { - return MaterialApp( - navigatorKey: navigationService.navigatorKey, - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: JoinOrganisationAfterAuth( - orgId: orgId, - ), - ); - }, - ); -} - -void main() { - testSetupLocator(); - locator().test(); - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group("Tests for JoinOrganizationAfterAuth - widgets", () { - testWidgets('QR Scan Test', (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - ' ' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); - - await tester.pumpWidget( - createJoinOrgAfterAuth(), - ); - - await tester.pumpAndSettle(const Duration(seconds: 6)); - - await tester.tap(find.byIcon(Icons.qr_code_scanner)); - await tester.pumpAndSettle(); - - expect( - find.byWidgetPredicate( - (widget) => - widget is ClipRRect && - widget.child is Container && - (widget.child! as Container).child is Column, - ), - findsOneWidget, - ); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets('QR Scan Test when url != GraphqlConfig.orgURI', - (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - '1' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); - - await tester.pumpWidget( - createJoinOrgAfterAuth(), - ); - - await tester.pumpAndSettle(const Duration(seconds: 6)); - - await tester.tap(find.byIcon(Icons.qr_code_scanner)); - await tester.pumpAndSettle(); - - expect( - find.byWidgetPredicate( - (widget) => - widget is ClipRRect && - widget.child is Container && - (widget.child! as Container).child is Column, - ), - findsOneWidget, - ); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets('Test _onQRViewCreated when throwing exception', - (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - ' ' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); - - await tester.pumpWidget( - createJoinOrgAfterAuth(), - ); - when(controller.stopCamera()).thenThrow(Exception("exception")); - - await tester.pumpAndSettle(const Duration(seconds: 6)); - - await tester.tap(find.byIcon(Icons.qr_code_scanner)); - await tester.pumpAndSettle(); - - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); - }); - testWidgets( - "Check if JoinOrganizationsAfterAuth shows up", - (tester) async { - await tester.pumpWidget(createJoinOrgAfterAuth()); - await tester.pumpAndSettle(const Duration(seconds: 6)); - - expect(find.byType(JoinOrganisationAfterAuth), findsOneWidget); - }, - ); - - testWidgets( - "Check if children show up correctly", - (tester) async { - await tester.pumpWidget(createJoinOrgAfterAuth()); - await tester.pumpAndSettle(const Duration(seconds: 6)); - - expect( - find.byWidgetPredicate( - (widget) => widget is Scaffold && widget.body is Column, - ), - findsOneWidget, - ); - - // expect( - // find.byWidgetPredicate( - // (widget) => - // widget is Column && - // widget.children[0] is Padding && - // widget.children[1] is ColoredBox && - // widget.children[2] is Padding && - // widget.children[3] is Expanded && - // widget.children[4] is SizedBox && - // widget.children[5] is Column, - // ), - // findsOneWidget, - // ); - - // expect( - // find.byWidgetPredicate( - // (widget) => - // widget is Column && - // widget.children[0] is RaisedRoundedButton && - // (widget.children[0] as RaisedRoundedButton).buttonLabel == - // "Join selected organisation" && - // widget.children[1] is SizedBox, - // ), - // findsOneWidget, - // ); - }, - ); - }); - - group("Tests for JoinOrganizationAfterAuth - widgets", () { - testWidgets("Check if QR bottom model sheet shows up", (tester) async { - await tester.pumpWidget(createJoinOrgAfterAuth()); - await tester.pumpAndSettle(const Duration(seconds: 6)); - - await tester.tap(find.byIcon(Icons.qr_code_scanner)); - await tester.pumpAndSettle(); - - expect( - find.byWidgetPredicate( - (widget) => - widget is ClipRRect && - widget.child is Container && - (widget.child! as Container).child is Column, - ), - findsOneWidget, - ); - }); - - // If you happen to add more tests below this one, make sure to - // re-register SelectOrganizationViewModel in that test as it will - // be disposed once this test ends, or better, write any new tests - // before this one. - - /// Search is No-Longer is a feature, if it gets implemented in future use this test - /// Really good test to learn from so not deleting - testWidgets("Check if model related functions work", (tester) async { - final orgOne = OrgInfo( - name: "org_one", - creatorInfo: User( - firstName: "ravidi", - lastName: "shaikh", - ), - userRegistrationRequired: true, - ); - final orgTwo = OrgInfo( - name: "org_two", - creatorInfo: User( - firstName: "ravidi", - lastName: "shaikh", - ), - userRegistrationRequired: true, - ); - - final selectOrgInfoVM = locator.get(); - - await tester.pumpWidget(createJoinOrgAfterAuth()); - await tester.pumpAndSettle(const Duration(seconds: 6)); - - // This button comes from CupertinoSearchTextField - // await tester.tap(find.byType(CupertinoButton)); - // await tester.pumpAndSettle(const Duration(seconds: 6)); - - // Checking for text change - selectOrgInfoVM.setState(ViewState.busy); - selectOrgInfoVM.searchController.text = "tmmmext"; - await tester.pumpAndSettle(const Duration(seconds: 6)); - - // expect(find.text("tmmmext"), findsOneWidget); - - // Checking for Org selection - - expect(selectOrgInfoVM.organizations, []); - - selectOrgInfoVM.organizations = [ - orgOne, - orgTwo, - ]; - - selectOrgInfoVM.selectedOrganization = orgOne; - - selectOrgInfoVM.notifyListeners(); - await tester.pumpAndSettle(const Duration(seconds: 6)); - - selectOrgInfoVM.searching = true; - selectOrgInfoVM.notifyListeners(); - - expect(find.byType(OrganizationSearchList), findsNothing); - }); - }); -} diff --git a/test/views/after_auth_screens/org_info_screen_test.dart b/test/views/after_auth_screens/org_info_screen_test.dart deleted file mode 100644 index d10e7e4b7..000000000 --- a/test/views/after_auth_screens/org_info_screen_test.dart +++ /dev/null @@ -1,292 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:network_image_mock/network_image_mock.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/pre_auth_view_models/select_organization_view_model.dart'; -import 'package:talawa/views/after_auth_screens/org_info_screen.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -final OrgInfo mockOrgInfo = OrgInfo.fromJson( - { - '_id': '123', - 'image': 'image_url', - 'name': 'Org_Name', - 'description': 'aabbcc', - 'userRegistrationRequired': false, - 'creator': { - 'accessToken': 'abc', - 'refreshToken': 'abc', - '_id': '123', - 'firstName': 'Parag', - 'lastName': 'Gupta', - }, - 'members': [ - { - 'accessToken': 'abc', - 'refreshToken': 'abc', - '_id': '123', - 'firstName': 'Parag', - 'lastName': 'Gupta', - }, - ], - 'admins': [ - { - 'firstName': 'Parag', - 'lastName': '1', - }, - { - 'firstName': 'Parag', - 'lastName': '2', - }, - { - 'firstName': 'Parag', - 'lastName': '3', - } - ], - 'address': { - "city": "Delhi", - "countryCode": "IN", - "dependentLocality": "Some Dependent Locality", - "line1": "123 Random Street", - "line2": "Apartment 456", - "postalCode": "110001", - "sortingCode": "ABC-123", - "state": "Delhi", - }, - }, - memberRequest: false, -); - -final OrgInfo mockOrgInfo2 = OrgInfo.fromJson( - { - '_id': '1234', - 'image': null, - 'name': 'Org_Name', - 'description': 'aabbcc', - 'userRegistrationRequired': true, - 'creator': { - 'accessToken': 'abc', - 'refreshToken': 'abc', - '_id': '123', - 'firstName': 'Parag', - 'lastName': 'Gupta', - }, - 'members': [ - { - 'firstName': 'Paul', - 'lastName': '1', - }, - { - 'firstName': 'jon', - 'lastName': '1', - }, - { - 'firstName': 'sean', - 'lastName': '1', - }, - { - 'firstName': 'Jay', - 'lastName': '1', - }, - { - 'firstName': 'Chris', - 'lastName': '1', - }, - ], - 'admins': [ - { - 'firstName': 'Parag', - 'lastName': 'Gupta', - }, - ], - 'address': { - "city": "Delhi", - "countryCode": "IN", - "dependentLocality": "Some Dependent Locality", - "line1": "123 Random Street", - "line2": "Apartment 456", - "postalCode": "110001", - "sortingCode": "ABC-123", - "state": "Delhi", - }, - }, - memberRequest: false, -); - -Widget createOrgInfoScreen1() { - return MaterialApp( - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - home: OrganisationInfoScreen( - orgInfo: mockOrgInfo, - ), - navigatorKey: locator().navigatorKey, - ); -} - -Widget createOrgInfoScreen2() { - return MaterialApp( - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - home: OrganisationInfoScreen( - orgInfo: mockOrgInfo2, - ), - navigatorKey: locator().navigatorKey, - ); -} - -void main() { - testSetupLocator(); - SizeConfig().test(); - GraphqlConfig().test(); - setUp(() { - registerServices(); - }); - group('OrganisationInfoScreen Tests', () { - testWidgets('Leave button shows when organization is joined', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - userConfig.currentUser.joinedOrganizations!.add(mockOrgInfo); - - await tester.pumpWidget(createOrgInfoScreen1()); - await tester.pumpAndSettle(); - - expect(find.text('Leave'), findsOneWidget); - await tester.tap(find.text('Leave')); - await tester.pumpAndSettle(); - - expect(find.byIcon(Icons.arrow_back), findsOneWidget); - await tester.tap(find.byIcon(Icons.arrow_back)); - await tester.pumpAndSettle(); - }); - }); - testWidgets('Displays the correct organization info', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createOrgInfoScreen1()); - await tester.pumpAndSettle(); - - expect(find.text('Org_Name'), findsOneWidget); - expect(find.text('aabbcc'), findsOneWidget); - expect(find.text('Delhi, IN'), findsOneWidget); - expect(find.text('Public'), findsOneWidget); - expect(find.byIcon(Icons.lock_open), findsOneWidget); - }); - }); - testWidgets('for private organisation', (WidgetTester tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createOrgInfoScreen2()); - await tester.pumpAndSettle(); - - expect(find.text('Org_Name'), findsOneWidget); - expect(find.text('aabbcc'), findsOneWidget); - expect(find.text('Delhi, IN'), findsOneWidget); - expect(find.text('Private'), findsOneWidget); - expect(find.byIcon(Icons.lock), findsOneWidget); - }); - }); - - testWidgets('Join button shows when organization is not joined', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - final viewModel = SelectOrganizationViewModel(); - - await tester.pumpWidget(createOrgInfoScreen2()); - await tester.pumpAndSettle(); - - expect(find.text('Join'), findsOneWidget); - await tester.tap(find.byType(FloatingActionButton)); - await tester.pumpAndSettle(); - - verify(viewModel.selectOrg(mockOrgInfo)).called(1); - }); - }); - - testWidgets('Displays the default image when orgInfo.image is null', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createOrgInfoScreen2()); - await tester.pumpAndSettle(); - - expect(find.byType(Image), findsOneWidget); - expect(find.byKey(const Key('image_container')), findsOneWidget); - }); - }); - testWidgets('DropDown list for admins more than 2', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createOrgInfoScreen1()); - await tester.pumpAndSettle(); - - expect(find.text('Admins'), findsOneWidget); - expect(find.text('Parag 1'), findsOneWidget); - - expect(find.text('See all'), findsOneWidget); - await tester.tap(find.text('See all')); - await tester.pumpAndSettle(); - - expect(find.text('Parag 3'), findsOneWidget); - - expect(find.byKey(const Key('modalSheetbackBtn')), findsOneWidget); - await tester.tap(find.byKey(const Key('modalSheetbackBtn'))); - await tester.pumpAndSettle(); - }); - }); - testWidgets('DropDown list for members more than 4', - (WidgetTester tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createOrgInfoScreen2()); - await tester.pumpAndSettle(); - - expect(find.text('Members'), findsOneWidget); - expect(find.text('Paul 1'), findsOneWidget); - - expect(find.text('See all'), findsOneWidget); - await tester.tap(find.text('See all')); - await tester.pumpAndSettle(); - - expect(find.text('Chris 1'), findsOneWidget); - }); - }); - }); -} diff --git a/test/views/after_auth_screens/profile/profile_page_test.dart b/test/views/after_auth_screens/profile/profile_page_test.dart deleted file mode 100644 index 93d11d001..000000000 --- a/test/views/after_auth_screens/profile/profile_page_test.dart +++ /dev/null @@ -1,193 +0,0 @@ -import 'dart:io'; - -import 'package:contained_tab_bar_view/contained_tab_bar_view.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createProfilePage({required MainScreenViewModel mainScreenViewModel}) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: ProfilePage( - key: const Key('Profile Page'), - homeModel: mainScreenViewModel, - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - theme: TalawaTheme.darkTheme, - ); - }, - ); -} - -void main() async { - testSetupLocator(); - locator().test(); - final Directory dir = Directory('test/fixtures/coree'); - group('build', () { - setUpAll(() async { - registerServices(); - getAndRegisterAppTheme(); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - await Hive.openBox('pluginBox'); - }); - - tearDownAll(() async { - await Hive.close(); - Future safeDelete(String filePath) async { - final file = File(filePath); - if (await file.exists()) { - try { - await file.delete(); - } catch (e) { - print('Error deleting $filePath: $e'); - } - } - } - - await safeDelete('test/fixtures/coree/currentorg.hive'); - await safeDelete('test/fixtures/coree/currentorg.lock'); - await safeDelete('test/fixtures/coree/currentuser.hive'); - await safeDelete('test/fixtures/coree/currentuser.lock'); - await safeDelete('test/fixtures/coree/pluginbox.hive'); - }); - testWidgets('check if profilePage shows up and refreshIndicator work', - (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pumpAndSettle(); - expect(find.byType(RefreshIndicator), findsOneWidget); - await tester.drag( - find.byKey(const Key('profilepic')), - const Offset(0, 300), - ); - await tester.pumpAndSettle(); - }); - testWidgets('check if invitebutton work', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pump(); - await tester.tap(find.byKey(const Key('inviteicon'))); - await tester.pump(); - }); - testWidgets('check if left drawer works', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pumpAndSettle(); - await tester.tap(find.byIcon(Icons.menu)); - await tester.pumpAndSettle(); - }); - testWidgets('check if Donate button work', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pump(); - await tester.tap(find.text('Donate to the Community')); - await tester.pump(); - }); - - testWidgets('check if settings page is opening up', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pump(); - final settingsIcon = find.byKey(const Key('settingIcon')); - await tester.tap(settingsIcon); - verify(navigationService.navigatorKey); - }); - testWidgets('check if User Feed is present', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pump(); - - expect(find.byType(ContainedTabBarView), findsOneWidget); - expect(find.byKey(const Key("UserFeed")), findsOneWidget); - }); - testWidgets('check if User Event is present', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pump(); - - expect(find.byType(ContainedTabBarView), findsOneWidget); - await tester.tap(find.text('Events')); - await tester.pump(); - }); - testWidgets('Test donate bottom sheet', (tester) async { - await tester.pumpWidget( - createProfilePage( - mainScreenViewModel: locator(), - ), - ); - await tester.pumpAndSettle(); - - expect(find.byType(ContainedTabBarView), findsOneWidget); - final orgDonateBtn = find.text('Donate to the Community'); - expect(orgDonateBtn, findsOneWidget); - await tester.tap(orgDonateBtn); - await tester.pumpAndSettle(); - - final txtfield = find.byKey(const Key('custom_amt')); - await tester.enterText(txtfield, '25'); - await tester.pump(); - - final donateBtn = find.byKey(const Key('DONATE')); - await tester.ensureVisible(donateBtn); - await tester.pumpAndSettle(); - await tester.tap(donateBtn); - - final currencyBtn = find.byKey(const Key('currency_btn')); - await tester.tap(currencyBtn); - await tester.pumpAndSettle(); - }); - }); -} diff --git a/test/views/after_auth_screens/profile/user_event_test.dart b/test/views/after_auth_screens/profile/user_event_test.dart deleted file mode 100644 index c210b26eb..000000000 --- a/test/views/after_auth_screens/profile/user_event_test.dart +++ /dev/null @@ -1,177 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/profile/user_event.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_card.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -Widget userEventsScreen({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, - required bool isTest, -}) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - // return BaseView( - // onModelReady: (model) { - // model.initialize(likedBy0, 'test_post_id'); - // }, - // builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: const UserEvents( - key: Key('test_key'), - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: generateRoute, - ); - }, - ); - // }, - // ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - late MockExploreEventsViewModel mockViewModel; - setUp(() { - registerServices(); - mockViewModel = MockExploreEventsViewModel(); - locator.unregister(); - locator.registerSingleton(mockViewModel); - }); - tearDown(() { - unregisterServices(); - }); - group('tests for UserEvents Screen', () { - testWidgets('check if UserEvents Screen shows up', (tester) async { - when(mockViewModel.isBusy).thenReturn(true); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.events).thenReturn([]); - - await tester.pumpWidget(userEventsScreen(isTest: true)); - await tester.pump(); - final finder = find.byKey(const Key('test_key')); - expect(finder, findsOneWidget); - }); - testWidgets('check if CircularIndicator Shows up', (tester) async { - when(mockViewModel.isBusy).thenReturn(true); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.events).thenReturn([]); - - await tester.pumpWidget(userEventsScreen(isTest: false)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsOneWidget); - }); - testWidgets('check if No Events text shows up', (tester) async { - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.events).thenReturn([]); - - await tester.pumpWidget(userEventsScreen(isTest: true)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - expect( - find.text('You have no event in this organization'), - findsOneWidget, - ); - }); - testWidgets('check if text button shows up', (tester) async { - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.events).thenReturn([]); - - await tester.pumpWidget(userEventsScreen(isTest: true)); - await tester.pump(); - - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - expect( - find.text('Create your first event'), - findsOneWidget, - ); - await tester.tap(find.text('Create your first event')); - await tester.pumpAndSettle(); - }); - testWidgets('check if User Event screen shows up', (tester) async { - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.events).thenReturn([]); - - await tester.pumpWidget(userEventsScreen(isTest: true)); - await tester.pumpAndSettle(); - expect(find.byKey(const Key('test_key')), findsOneWidget); - }); - testWidgets('check if User Events shows up if not null', (tester) async { - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenAnswer((_) async {}); - when(mockViewModel.userEvents).thenReturn([ - Event( - id: 'a', - title: 'Sample Event', - description: 'This is a fake event description.', - location: 'City Park', - recurring: false, - allDay: false, - startDate: '2022-01-01', - endDate: '2022-01-02', - startTime: '12:00 PM', - endTime: '3:00 PM', - isPublic: true, - isRegistered: false, - isRegisterable: true, - creator: User(id: 'creator'), - organization: OrgInfo(), - admins: [ - User(id: 'admin'), - ], - attendees: [ - Attendee(id: 'attendee1'), - ], - ), - ]); - - await tester.pumpWidget(userEventsScreen(isTest: true)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - expect( - find.text('Create your first event'), - findsNothing, - ); - final finder1 = find.byType(SingleChildScrollView); - expect(finder1, findsOneWidget); - expect(find.byType(EventCard), findsOneWidget); - await tester.tap(find.byType(GestureDetector)); - await tester.pumpAndSettle(); - }); - }); -} diff --git a/test/views/after_auth_screens/profile/user_feed_test.dart b/test/views/after_auth_screens/profile/user_feed_test.dart deleted file mode 100644 index dc9ee4659..000000000 --- a/test/views/after_auth_screens/profile/user_feed_test.dart +++ /dev/null @@ -1,198 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/router.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/profile/user_feed.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; -import 'package:talawa/widgets/post_widget.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -Widget userFeedScreen({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, - required bool isTest, -}) { - return MaterialApp( - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: UserFeed( - forTest: isTest, - key: const Key('test_key'), - ), - ), - ); -} - -Widget userFeedScreen1({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, - required bool isTest, -}) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - // return BaseView( - // onModelReady: (model) { - // model.initialize(likedBy0, 'test_post_id'); - // }, - // builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: UserFeed( - forTest: isTest, - key: const Key('test_key'), - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: generateRoute, - ); - }, - ); - // }, - // ); -} - -final List likedBy0 = [ - LikedBy(sId: 'Test user 1'), - LikedBy(sId: 'Test user 2'), -]; - -final post = Post( - sId: "test_post_id", - creator: userConfig.currentUser, - likedBy: likedBy0, -); - -void main() { - SizeConfig().test(); - testSetupLocator(); - late MockOrganizationFeedViewModel mockViewModel; - - setUp(() { - registerServices(); - mockViewModel = MockOrganizationFeedViewModel(); - locator.unregister(); - locator.registerSingleton(mockViewModel); - }); - tearDown(() { - unregisterServices(); - }); - - TestWidgetsFlutterBinding.ensureInitialized(); - group('tests for User feed Screen', () { - testWidgets('check if UserFeedScreen shows up', (tester) async { - when(mockViewModel.isFetchingPosts).thenReturn(true); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - await tester.pumpWidget(userFeedScreen(isTest: true)); - await tester.pump(); - final finder = find.byKey(const Key('test_key')); - expect(finder, findsOneWidget); - }); - - testWidgets('check if CircularIndicator Shows up', (tester) async { - when(mockViewModel.isFetchingPosts).thenReturn(true); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - - await tester.pumpWidget(userFeedScreen(isTest: false)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsOneWidget); - }); - testWidgets('check if No posts text shows up', (tester) async { - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - - await tester.pumpWidget(userFeedScreen(isTest: true)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - expect( - find.text('You have no post in this organization'), - findsOneWidget, - ); - }); - testWidgets('check if text button shows up', (tester) async { - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - - await tester.pumpWidget(userFeedScreen(isTest: true)); - await tester.pump(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - expect( - find.text('Create your first post'), - findsOneWidget, - ); - await tester.tap(find.text('Create your first post')); - await tester.pumpAndSettle(); - }); - testWidgets('check if PostListWIdget shows up', (tester) async { - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.userPosts).thenReturn([ - Post( - sId: "test_post_id", - creator: userConfig.currentUser, - likedBy: likedBy0, - description: 'Testing', - comments: [Comments(sId: 'cmmnt1')], - createdAt: DateTime.now(), - organization: userConfig.currentOrg, - ), - ]); - when(mockViewModel.initialise()).thenReturn(null); - - await tester.pumpWidget(userFeedScreen1(isTest: true)); - await tester.pumpAndSettle(); - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsNothing); - final finder1 = find.byType(PostListWidget); - expect(finder1, findsOneWidget); - expect(find.byType(NewsPost), findsOneWidget); - }); - }); -} diff --git a/test/views/demo_screens/explore_events_demo_test.dart b/test/views/demo_screens/explore_events_demo_test.dart deleted file mode 100644 index 599982920..000000000 --- a/test/views/demo_screens/explore_events_demo_test.dart +++ /dev/null @@ -1,226 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_event_dialogue.dart'; -import 'package:talawa/views/demo_screens/explore_events_demo.dart'; -import 'package:talawa/widgets/custom_drawer.dart'; -import 'package:talawa/widgets/event_card.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -// class MockBuildContext extends Mock implements BuildContext {} - -Widget createExploreEventsScreen(MainScreenViewModel model) => MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - drawer: CustomDrawer( - homeModel: model, - ), - body: const DemoExploreEvents( - key: Key('ExploreEvents'), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - -void main() async { - SizeConfig().test(); - - final mockEvents = [ - Event( - id: 'event1', - admins: [User(id: 'admin1')], - creator: User(id: 'admin2'), - startTime: DateTime.now().day.toString(), - endTime: DateTime.now().day.toString(), - title: 'event title', - startDate: DateTime.now().day.toString(), - endDate: DateTime.now().day.toString(), - location: 'location', - description: 'description', - isPublic: true, - ), - ]; - - late ExploreEventsViewModel exploreEventsViewModel; - group('Test for DemoExploreEventsPage', () { - setUpAll(() { - registerServices(); - registerViewModels(); - exploreEventsViewModel = getAndRegisterExploreEventsViewModel(); - }); - tearDownAll(() { - unregisterServices(); - unregisterViewModels(); - }); - testWidgets('Test for menu button.', (tester) async { - final model = MainScreenViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final menuButton = find.byIcon(Icons.menu); - - await tester.tap(menuButton); - await tester.pumpAndSettle(); - - expect(find.byType(CustomDrawer), findsOneWidget); - }); - - testWidgets('Test for AddDate button.', (tester) async { - final model = MainScreenViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final addDateButton = find.textContaining('Add Date'); - - await tester.tap(addDateButton); - await tester.pumpAndSettle(); - - expect(find.byType(ExploreEventDialog), findsOneWidget); - }); - - testWidgets('Test for Calendar button', (tester) async { - final model = MainScreenViewModel(); - final mockModel = ExploreEventsViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final calendarBtn = find.byIcon(Icons.calendar_month); - - expect(calendarBtn, findsOneWidget); - - await tester.tap(calendarBtn); - await tester.pumpAndSettle(); - - verify( - navigationService.pushScreen( - Routes.calendar, - arguments: mockModel.events, - ), - ); - }); - - testWidgets('Test for floatingAction button', (tester) async { - final model = MainScreenViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final floatingBtn = find.byType(FloatingActionButton); - - expect(floatingBtn, findsOneWidget); - - await tester.tap(floatingBtn); - await tester.pumpAndSettle(); - - verify( - navigationService.pushScreen( - "/createEventPage", - ), - ); - }); - - testWidgets('Test for eventCard.', (tester) async { - final model = MainScreenViewModel(); - when(exploreEventsViewModel.events).thenAnswer((_) { - return mockEvents; - }); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final eventCard = find.byType(EventCard).first; - - expect(eventCard, findsOneWidget); - - await tester.tap(eventCard); - await tester.pumpAndSettle(); - - verify( - navigationService.navigatorKey, - ); - }); - - testWidgets('Test for dropDown button', (tester) async { - final model = MainScreenViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final dropDownBtn = find.byType(DropdownButton); - - await tester.tap(dropDownBtn); - await tester.pumpAndSettle(); - - final createEventsBtn = find.textContaining('Created Events'); - - expect(createEventsBtn, findsOneWidget); - - await tester.tap(createEventsBtn); - await tester.pumpAndSettle(); - }); - - testWidgets('Test for ExploreEvent dialog', (tester) async { - final model = MainScreenViewModel(); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final dropDownBtn = find.byType(DropdownButton); - - await tester.tap(dropDownBtn); - await tester.pumpAndSettle(); - - final createEventsBtn = find.textContaining('Created Events'); - - expect(createEventsBtn, findsOneWidget); - - await tester.tap(createEventsBtn); - await tester.pumpAndSettle(); - }); - - testWidgets('Test for layout when zero events', (tester) async { - final model = MainScreenViewModel(); - when(exploreEventsViewModel.events).thenReturn([]); - await tester.pumpWidget(createExploreEventsScreen(model)); - - await tester.pumpAndSettle(); - - final dropDownBtn = find.byType(DropdownButton); - - await tester.tap(dropDownBtn); - await tester.pumpAndSettle(); - - final createEventsBtn = find.textContaining('Created Events'); - - expect(createEventsBtn, findsOneWidget); - - await tester.tap(createEventsBtn); - await tester.pumpAndSettle(); - }); - }); -} diff --git a/test/views/demo_screens/organization_feed_demo_test.dart b/test/views/demo_screens/organization_feed_demo_test.dart deleted file mode 100644 index 0767d0bea..000000000 --- a/test/views/demo_screens/organization_feed_demo_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/main_screen.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -Widget createHomeScreen({required bool demoMode}) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: MainScreen( - key: const Key('MainScreen'), - mainScreenArgs: MainScreenArgs( - mainScreenIndex: 0, - fromSignUp: false, - toggleDemoMode: demoMode, - ), - ), - ); -} - -void main() async { - testSetupLocator(); - - setUp(() { - registerServices(); - locator().test(); - locator().test(); - }); - - group('Home Page tests', () { - testWidgets('Test for menu button.', (tester) async { - await tester.pumpWidget(createHomeScreen(demoMode: true)); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final menuButton = find.byIcon(Icons.menu); - - await tester.tap(menuButton); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key("Drawer")), findsOneWidget); - }); - }); -} diff --git a/test/views/demo_screens/profile_page_demo_test.dart b/test/views/demo_screens/profile_page_demo_test.dart deleted file mode 100644 index 7e9426c1b..000000000 --- a/test/views/demo_screens/profile_page_demo_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/main_screen.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -Widget createProfileScreen({required bool demoMode}) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: MainScreen( - key: const Key('MainScreen'), - mainScreenArgs: MainScreenArgs( - mainScreenIndex: 2, - fromSignUp: false, - toggleDemoMode: demoMode, - ), - ), - ); -} - -void main() async { - testSetupLocator(); - - group('Profile Page tests', () { - setUpAll(() { - registerServices(); - locator().test(); - locator().test(); - }); - testWidgets('Test for donate button.', (tester) async { - await tester.pumpWidget(createProfileScreen(demoMode: true)); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final donateButton = find.textContaining('Donate to the Community'); - - await tester.tap(donateButton); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key("Drawer")), findsOneWidget); - }); - - testWidgets('Test for menu button.', (tester) async { - await tester.pumpWidget(createProfileScreen(demoMode: true)); - - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final menuButton = find.byIcon(Icons.menu); - - await tester.tap(menuButton); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key("Drawer")), findsOneWidget); - }); - - testWidgets('check if settings page is opening up', (tester) async { - await tester.pumpWidget( - createProfileScreen( - demoMode: true, - ), - ); - await tester.pumpAndSettle(const Duration(seconds: 1)); - final settingsIcon = find.byKey(const Key('settingIcon')); - await tester.tap(settingsIcon); - verify(navigationService.pushScreen('/appSettingsPage')); - }); - }); -} diff --git a/test/views/helpers/test_locator.dart b/test/views/helpers/test_locator.dart deleted file mode 100644 index b5e770e58..000000000 --- a/test/views/helpers/test_locator.dart +++ /dev/null @@ -1,4 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// TODO Implement this library. diff --git a/test/views/main_screen_test.dart b/test/views/main_screen_test.dart deleted file mode 100644 index f9a5afc12..000000000 --- a/test/views/main_screen_test.dart +++ /dev/null @@ -1,272 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -// import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -// import 'package:talawa/views/after_auth_screens/add_post_page.dart'; -// import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -// import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; -// import 'package:talawa/views/after_auth_screens/profile/profile_page.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/views/main_screen.dart'; -// import 'package:talawa/widgets/custom_drawer.dart'; - -import '../helpers/test_helpers.dart'; -import '../helpers/test_locator.dart'; - -Widget createMainScreen({bool demoMode = true}) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, themeModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - theme: Provider.of(context, listen: true).isdarkTheme - ? TalawaTheme.darkTheme - : TalawaTheme.lightTheme, - home: Scaffold( - body: MainScreen( - mainScreenArgs: MainScreenArgs( - fromSignUp: false, - mainScreenIndex: 0, - toggleDemoMode: demoMode, - ), - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - }, - ); -} - -class MockMainScreenViewModel extends Mock implements MainScreenViewModel { - @override - int get currentPageIndex => 0; - - @override - List get pages => [const Test(key: Key('key'))]; - - @override - List get navBarItems => [ - const BottomNavigationBarItem(icon: Icon(Icons.abc), label: 'label1'), - const BottomNavigationBarItem(icon: Icon(Icons.abc), label: 'label2'), - ]; -} - -class Test extends StatelessWidget { - const Test({super.key}); - - @override - Widget build(BuildContext context) { - return const Placeholder(); - } -} - -void main() async { - testSetupLocator(); - registerServices(); - - TestWidgetsFlutterBinding.ensureInitialized(); - locator().test(); - locator().test(); - - final Directory dir = Directory('temporaryPath'); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - - await Hive.openBox('pluginBox'); - await Hive.openBox('url'); - - late GraphQLClient graphQLClient; - - setUp(() { - registerServices(); - locator().test(); - locator.unregister(); - locator - .registerFactory(() => MockMainScreenViewModel()); - - graphQLClient = locator(); - when( - graphQLClient.query( - QueryOptions( - document: gql(queries.getPluginsList()), - ), - ), - ).thenAnswer( - (realInvocation) async { - return QueryResult.internal( - source: QueryResultSource.network, - parserFn: (data) => {}, - data: { - "getPlugins": [], - }, - ); - }, - ); - }); - - tearDown(() { - unregisterServices(); - }); - - group("Test for main_screen.dart", () { - testWidgets('Test join org banner.', (tester) async { - await tester.pumpWidget(createMainScreen()); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final bannerFinder = find.byKey(const Key('banner')); - - await tester.tap(bannerFinder); - - verify(navigationService.pushScreen(Routes.setUrlScreen, arguments: '')); - }); - - testWidgets("Test if Join Org banner not visible.", (tester) async { - await tester.pumpWidget(createMainScreen(demoMode: false)); - await tester.pump(); - }); - // - // // Don't call pumpAndSettle as the BottomNavigationBar - // // of this widget builds itself repeatedly, causing an infinite - // // loop; making the test never stop - // - // // await tester.pumpAndSettle(); - // - // expect(find.byType(MainScreen), findsOneWidget); - // }); - // - // testWidgets("Check if all children shows up", (tester) async { - // // This stub shows its effect in the next test - // - // when( - // graphQLClient.query( - // QueryOptions( - // document: gql(queries.getPluginsList()), - // ), - // ), - // ).thenAnswer( - // (realInvocation) async { - // return QueryResult.internal( - // source: QueryResultSource.network, - // parserFn: (data) => {}, - // data: { - // "getPlugins": null, - // }, - // ); - // }, - // ); - // - // await tester.pumpWidget(createMainScreen()); - // await tester.pump(); - // - // expect( - // find.byWidgetPredicate( - // (widget) => - // widget is Scaffold && - // widget.drawer is CustomDrawer && - // widget.body is IndexedStack && - // widget.bottomNavigationBar is BottomNavigationBar, - // ), - // findsOneWidget, - // ); - // - // expect(find.byIcon(Icons.home), findsOneWidget); - // expect(find.byIcon(Icons.event_note), findsOneWidget); - // expect(find.byIcon(Icons.add_box), findsOneWidget); - // expect(find.byIcon(Icons.chat_outlined), findsOneWidget); - // expect(find.byIcon(Icons.account_circle), findsOneWidget); - // - // expect(find.byType(OrganizationFeed), findsOneWidget); - // expect(find.byType(ExploreEvents), findsOneWidget); - // expect(find.byType(AddPost), findsOneWidget); - // expect(find.byType(ProfilePage), findsOneWidget); - // }); - // - // testWidgets("Check if plugin loading works", (tester) async { - // mockNetworkImages(() async { - // await tester.pumpWidget(createMainScreen()); - // await tester.pump(); - // - // expect(find.byIcon(Icons.home), findsOneWidget); - // expect(find.byIcon(Icons.event_note), findsOneWidget); - // expect(find.byIcon(Icons.add_box), findsOneWidget); - // expect(find.byIcon(Icons.chat_outlined), findsOneWidget); - // expect(find.byIcon(Icons.account_circle), findsOneWidget); - // - // expect(find.byType(OrganizationFeed), findsOneWidget); - // expect(find.byType(ExploreEvents), findsOneWidget); - // expect(find.byType(AddPost), findsOneWidget); - // expect(find.byType(ProfilePage), findsOneWidget); - // - // // If MainScreen finds some plugins, it will add them dynamically - // - // // expect(find.byType(ChangeThemeTile), findsOneWidget); - // }); - // }); - // - // testWidgets("Check if changing pages works", (tester) async { - // mockNetworkImages(() async { - // await tester.pumpWidget(createMainScreen()); - // await tester.pump(); - // - // await tester.tap(find.byIcon(Icons.home)); - // await tester.pump(); - // expect(mainScreenViewModel.currentPageIndex, 0); - // - // await tester.tap(find.byIcon(Icons.event_note)); - // await tester.pump(); - // // expect(mainScreenViewModel.currentIndex, 1); - // - // await tester.tap(find.byIcon(Icons.add_box)); - // await tester.pump(); - // // expect(mainScreenViewModel.currentIndex, 2); - // - // await tester.tap(find.byIcon(Icons.chat_outlined)); - // await tester.pump(); - // // expect(mainScreenViewModel.currentIndex, 3); - // - // await tester.tap(find.byIcon(Icons.account_circle)); - // await tester.pump(); - // // expect(mainScreenViewModel.currentIndex, 4); - // }); - // }); - }); -} diff --git a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart deleted file mode 100644 index 9fb34de38..000000000 --- a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart +++ /dev/null @@ -1,330 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/constants/constants.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/language/language_model.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/settings_view_models/app_setting_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/views/after_auth_screens/app_settings/app_settings_page.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -/// MockBuildContext class helps to mock the BuildContext class. -class MockBuildContext extends Mock implements BuildContext {} - -/// MockCallbackFunction class helps to mock the callback function. -class MockCallbackFunction extends Mock { - /// call function helps to mock the call function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -/// 'createAppSettingScreen' is used to create the AppSettingPage widget in light mode. -/// -/// **params**: -/// * `themeMode`: Represents the theme mode of the widget. -/// -/// **returns**: -/// * `Widget`: Returns the AppSettingPage widget. -Widget createAppSettingScreen({ThemeMode themeMode = ThemeMode.light}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, themeModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: Provider.of(context, listen: true).isdarkTheme - ? TalawaTheme.darkTheme - : TalawaTheme.lightTheme, - home: const AppSettingsPage( - key: Key('AppSettingsPage'), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - }, - ); - -Future main() async { - testSetupLocator(); - TestWidgetsFlutterBinding.ensureInitialized(); - locator().test(); - SizeConfig().test(); - registerServices(); - - group('Setting Page Screen Widget Test in dark mode', () { - testWidgets("Testing if Settings Screen shows up", (tester) async { - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('AppSettingScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - - final backButton = find.byIcon(Icons.arrow_back); - - await tester.tap(backButton); - await tester.pumpAndSettle(); - - verify(navigationService.navigatorKey); - }); - testWidgets( - "Testing if Settings Screen shows up in dark mode with Theme selection tile", - (tester) async { - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('AppSettingScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final switchThemeTile = find.byKey(const Key('ThemeSwitch')); - expect(switchThemeTile, findsOneWidget); - final themeToggleButton = find.byKey(const Key('ToggleTheme')); - expect(themeToggleButton, findsOneWidget); - expect((tester.firstWidget(themeToggleButton) as Switch).value, true); - }); - testWidgets( - "Testing if Settings Screen shows up in dark mode with language selection tile", - (tester) async { - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('AppSettingScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final languageSwitchTile = find.byKey(const Key('LanguageTile')); - expect(languageSwitchTile, findsOneWidget); - final languageSelectionButton = find.byKey(const Key('LanguageSelector')); - expect(languageSelectionButton, findsOneWidget); - final Language userLanguage = languages.firstWhere( - (element) => - element.langCode == - Provider.of( - locator().navigatorKey.currentContext!, - listen: false, - ).appLocal.languageCode, - ); - expect( - ((tester.firstWidget(languageSelectionButton) as TextButton).child! - as Text) - .data, - userLanguage.langName, - ); - await tester.tap(languageSelectionButton); - await tester.pumpAndSettle(const Duration(seconds: 1)); - }); - testWidgets("Testing if theme changes from dark mode to light mode", - (tester) async { - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('AppSettingScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final switchThemeTile = find.byKey(const Key('ThemeSwitch')); - expect(switchThemeTile, findsOneWidget); - final themeToggleButton = find.byKey(const Key('ToggleTheme')); - expect(themeToggleButton, findsOneWidget); - expect((tester.firstWidget(themeToggleButton) as Switch).value, true); - await tester.tap(themeToggleButton); - await tester.pumpAndSettle(const Duration(seconds: 1)); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - testWidgets( - "Testing if theme changes from dark mode to light mode then again back to dark mode", - (tester) async { - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('AppSettingScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final switchThemeTile = find.byKey(const Key('ThemeSwitch')); - expect(switchThemeTile, findsOneWidget); - final themeToggleButton = find.byKey(const Key('ToggleTheme')); - expect(themeToggleButton, findsOneWidget); - expect((tester.firstWidget(themeToggleButton) as Switch).value, true); - await tester.tap(themeToggleButton); - await tester.pumpAndSettle(const Duration(seconds: 1)); - expect((tester.firstWidget(themeToggleButton) as Switch).value, false); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - await tester.tap(themeToggleButton); - await tester.pumpAndSettle(const Duration(seconds: 1)); - expect((tester.firstWidget(themeToggleButton) as Switch).value, true); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets('Test Edit Profile Tile is visible and works properly', - (tester) async { - when(userConfig.loggedIn).thenReturn(true); - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - expect(find.text('Profile'), findsOneWidget); - - final editProfile = find.textContaining('Edit Profile'); - await tester.tap(editProfile); - - verify(navigationService.navigatorKey); - }); - testWidgets('Test if help and support tiles are working', (tester) async { - when(userConfig.loggedIn).thenReturn(true); - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - final talawaDocs = find.textContaining('Talawa Docs'); - final talawaGitHub = find.textContaining('Talawa GitHub'); - - await tester.tap(talawaDocs); - await tester.tap(talawaGitHub); - }); - testWidgets('Test if footerTile is working.', (tester) async { - const userLoggedIn = true; - when(userConfig.loggedIn).thenAnswer((_) => userLoggedIn); - - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('Logout'))); - await tester.pumpAndSettle(); - - final logoutButton = find.textContaining('Logout').last; - await tester.tap(logoutButton); - - unregisterServices(); - registerServices(); - - const loggedIn = false; - when(userConfig.loggedIn).thenAnswer((_) => loggedIn); - - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - final joinOrgButton = find.textContaining('Join an Organisation'); - await tester.tap(joinOrgButton); - - verify(navigationService.navigatorKey); - }); - testWidgets('Test if Logout is unsuccessful.', (tester) async { - final model = AppSettingViewModel(); - when(model.logout()).thenThrow(Exception('Test error')); - - const userLoggedIn = true; - when(userConfig.loggedIn).thenAnswer((_) => userLoggedIn); - - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('Logout'))); - await tester.pumpAndSettle(); - - final logoutButton = find.textContaining('Logout').last; - await tester.tap(logoutButton); - }); - - testWidgets('Test if Logout is successful', (tester) async { - final model = AppSettingViewModel(); - when(model.logout()).thenAnswer((_) async => true); - - await tester - .pumpWidget(createAppSettingScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('Logout'))); - await tester.pumpAndSettle(); - - final logoutButton = find.textContaining('Logout').last; - await tester.tap(logoutButton); - - verify(navigationService.pop()); - verify( - navigationService.removeAllAndPush( - Routes.setUrlScreen, - Routes.splashScreen, - arguments: '', - ), - ); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/chat/direct_chats_test.dart b/test/widget_tests/after_auth_screens/chat/direct_chats_test.dart deleted file mode 100644 index 03a61ad19..000000000 --- a/test/widget_tests/after_auth_screens/chat/direct_chats_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; -import 'package:talawa/models/chats/chat_user.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart'; -import 'package:talawa/views/after_auth_screens/chat/direct_chats.dart'; - -import '../../../helpers/test_helpers.dart'; - -Widget createDirectChats() { - return const MaterialApp(home: Scaffold(body: DirectChats())); -} - -final model = locator(); -Widget createChatTile() { - return MaterialApp( - home: Scaffold( - body: ChatTile( - chat: ChatListTileDataModel( - [ - ChatUser( - firstName: 'test', - id: '1', - image: 'fakeHttp', - ), - ], - '1', - ), - model: model, - ), - ), - ); -} - -void main() { - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - }); - - group('Tests for direct chats', () { - testWidgets('Check whether DirectChats shows up', (tester) async { - await tester.pumpWidget(createDirectChats()); - await tester.pump(); - - expect(find.byType(DirectChats), findsOneWidget); - expect(find.byType(ChatTile), findsOneWidget); - }); - testWidgets('Check whether ChatTile shows up', (tester) async { - await tester.pumpWidget(createChatTile()); - await tester.pump(); - - expect(find.byType(ChatTile), findsOneWidget); - - await tester.tap(find.byType(ListTile)); - verify( - locator().pushScreen( - Routes.chatMessageScreen, - arguments: ['1', model], - ), - ); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/create_event_form_test.dart b/test/widget_tests/after_auth_screens/events/create_event_form_test.dart deleted file mode 100644 index a8ab9d116..000000000 --- a/test/widget_tests/after_auth_screens/events/create_event_form_test.dart +++ /dev/null @@ -1,164 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_form.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_page.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; - -var createEventViewModel = CreateEventViewModel(); - -// TextEditingController eventTitleTextController = TextEditingController(); -// createEventViewModel.eventTitleTextController = eventTitleTextController; - -Widget createCreateEventForm() { - final createEventViewModel = CreateEventViewModel(); - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold(body: CreateEventForm(model: createEventViewModel)), - ); -} - -Widget createEventScreen({ - ThemeMode themeMode = ThemeMode.light, - required ThemeData theme, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme, - home: const CreateEventPage( - key: Key('CreateEventScreen'), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - SizeConfig().test(); - locator.registerSingleton(NavigationService()); - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - }); - group('Testing create event form', () { - testWidgets("Test if create event form shows up", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createCreateEventForm()); - await tester.pump(); - expect(find.byType(TextFormField), findsNWidgets(3)); - expect( - find.descendant( - of: find.byType(Form), - matching: find.byType(TextFormField), - ), - findsNWidgets(3), - ); - }); - }); - - testWidgets("Test if create event key are working", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createCreateEventForm()); - await tester.pump(); - expect(find.byKey(const Key('create_event_form_tff1')), findsOneWidget); - expect(find.byKey(const Key('create_event_form_tff2')), findsOneWidget); - expect(find.byKey(const Key('create_event_form_tff3')), findsOneWidget); - }); - }); - testWidgets( - 'Test if form of 1st TextField is submitted on pressing enter on mobile keyboard.', - (tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createCreateEventForm()); - await tester.pump(); - - await tester.enterText( - find.byKey(const Key('create_event_form_tff1')), - 'fakeEventTitle', - ); - await tester.pump(); - await tester.testTextInput.receiveAction(TextInputAction.next); - await tester.pump(); - }); - }); - testWidgets( - 'Test if form of 2nd TextField is submitted on pressing enter on mobile keyboard.', - (tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createCreateEventForm()); - await tester.pump(); - - await tester.enterText( - find.byKey(const Key('create_event_form_tff2')), - 'fakeEventTitle', - ); - await tester.pump(); - await tester.testTextInput.receiveAction(TextInputAction.next); - await tester.pump(); - }); - }); - testWidgets( - 'Test if form of 3rd TextField is submitted on pressing enter on mobile keyboard.', - (tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createCreateEventForm()); - await tester.pump(); - - await tester.enterText( - find.byKey(const Key('create_event_form_tff3')), - 'fakeEventTitle', - ); - await tester.pump(); - await tester.testTextInput.receiveAction(TextInputAction.next); - await tester.pump(); - }); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/create_event_page_test.dart b/test/widget_tests/after_auth_screens/events/create_event_page_test.dart deleted file mode 100644 index c3a33cbf5..000000000 --- a/test/widget_tests/after_auth_screens/events/create_event_page_test.dart +++ /dev/null @@ -1,457 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_form.dart'; -import 'package:talawa/views/after_auth_screens/events/create_event_page.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_date_time_tile.dart'; -import 'package:talawa/widgets/member_name_tile.dart'; - -/// Creates an instance of CreateEventScreen with the given parameters. -/// -/// **params**: -/// * `themeMode`: ThemeMode of the app -/// * `theme`: ThemeData of the app -/// -/// **returns**: -/// * `Widget`: return the CreateEventScreen widget -Widget createEventScreen({ - ThemeMode themeMode = ThemeMode.light, - required ThemeData theme, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme, - home: const CreateEventPage( - key: Key('CreateEventScreen'), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - SizeConfig().test(); - setupLocator(); - graphqlConfig.test(); - group("Create Event Screen Widget Test in dark mode", () { - group('Check if the validator of the create_event_form is working', () { - testWidgets("Testing if text field validator are working", - (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final addBtn = find.descendant( - of: find.byType(AppBar), - matching: find.byType(TextButton), - ); - await tester.tap(addBtn); - }); - }); - - testWidgets("Testing if dark mode is applied", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme - ?.scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - }); - group("Create Event Screen Widget Test in light mode", () { - testWidgets("Testing if light mode is applied", (tester) async { - await tester.pumpWidget( - createEventScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme - ?.scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - }); - group('Create Event Screen Widget Test', () { - testWidgets("Testing if Create Event Screen shows up", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey(const Key('CreateEventScreen')); - expect(screenScaffoldWidget, findsOneWidget); - }); - - group("Testing app bar properties and contents", () { - testWidgets("Testing if app bar shows up", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - expect(appBar, findsOneWidget); - expect(appBarWidget.elevation, 1); - }); - testWidgets("Testing close button in app bar", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final closeBtn = find.descendant( - of: find.byType(AppBar), - matching: find.byType(GestureDetector), - ); - final closeIcon = find.descendant( - of: closeBtn.first, - matching: find.byIcon(Icons.close), - ); - expect(appBarWidget.leading, tester.firstWidget(closeBtn)); - expect( - (appBarWidget.leading as GestureDetector?)?.child, - tester.firstWidget(closeIcon), - ); - }); - testWidgets("Testing title in app bar", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final title = find.descendant( - of: find.byType(AppBar), - matching: find.byType(Text), - ); - expect(appBarWidget.title, tester.firstWidget(title)); - expect(appBarWidget.centerTitle, true); - expect( - (appBarWidget.title as Text?)?.data, - appLocalization!.strictTranslate('Add Event'), - ); - expect( - (appBarWidget.title as Text?)?.style!.fontFamily, - TalawaTheme.lightTheme.textTheme.titleLarge!.fontFamily, - ); - expect( - (appBarWidget.title as Text?)?.style!.fontSize, - 20, - ); - }); - testWidgets("Testing add button in app bar", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final addBtn = find.descendant( - of: find.byType(AppBar), - matching: find.byType(TextButton), - ); - await tester.tap(addBtn); - final addText = - find.descendant(of: addBtn, matching: find.byType(Text)); - expect(appBarWidget.actions?.length, 1); - expect(appBarWidget.actions?.first, tester.firstWidget(addBtn)); - expect( - (appBarWidget.actions?.first as TextButton?)?.child, - tester.firstWidget(addText), - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?)?.data, - appLocalization!.strictTranslate('Add'), - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?) - ?.style! - .fontSize, - 16, - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?) - ?.style! - .color, - TalawaTheme.lightTheme.colorScheme.secondary, - ); - }); - }); - - group("Testing body properties and contents", () { - testWidgets("Testing Add Image section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final imageIcon = find.descendant( - of: find.byType(Row), - matching: find.byIcon(Icons.image), - ); - final addImageBtn = find.descendant( - of: find.byType(Row), - matching: find.byType(TextButton), - ); - final addImageText = find.descendant( - of: addImageBtn.first, - matching: find.byType(Text), - ); - final imageShowWidget = find.byType(Image); - expect(imageIcon, findsOneWidget); - expect(addImageText, findsOneWidget); - expect( - (tester.widget(addImageText) as Text?)?.data, - appLocalization!.strictTranslate("Add Image"), - ); - expect( - (tester.widget(addImageText) as Text?)?.style!.fontSize, - 16, - ); - expect(imageShowWidget, findsNothing); - }); - testWidgets("Testing if Create Event Form widget shows", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final createEventForm = find.byType(CreateEventForm); - expect(createEventForm, findsOneWidget); - }); - testWidgets("Testing Select Start Date and Time section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final textDesc = find.text( - appLocalization!.strictTranslate('Select Start Date'), - ); - final dateTimeTiles = find.byType(DateTimeTile); - expect(textDesc, findsOneWidget); - expect(dateTimeTiles, findsNWidgets(2)); - - expect( - (tester.widget(textDesc) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Select End Date and Time section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final textDesc = find.text( - appLocalization!.strictTranslate('Select End Date'), - ); - final dateTimeTiles = find.byType(DateTimeTile); - expect(textDesc, findsOneWidget); - expect(dateTimeTiles, findsNWidgets(2)); - - expect( - (tester.widget(textDesc) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Does not repeat section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final restoreIcon = find.descendant( - of: find.byType(Row), - matching: find.byIcon(Icons.restore), - ); - final doesNotRepeatText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Does not repeat'), - ), - ); - expect(restoreIcon, findsOneWidget); - expect(doesNotRepeatText, findsOneWidget); - expect( - (tester.widget(doesNotRepeatText) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Keep public section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepPublicText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Public'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(keepPublicText, findsOneWidget); - expect(switches, findsNWidgets(3)); - expect( - (tester.widget(keepPublicText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.firstWidget(switches) as Switch).value, true); - await tester.ensureVisible(switches.first); - await tester.tap(switches.first); - await tester.pumpAndSettle(); - expect((tester.firstWidget(switches) as Switch).value, false); - }); - testWidgets("Testing Keep Registerable section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepRegisterableText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Registerable'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(keepRegisterableText, findsOneWidget); - expect(switches, findsNWidgets(3)); - expect( - (tester.widget(keepRegisterableText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.widgetList(switches).toList()[1] as Switch).value, true); - await tester.ensureVisible(switches.at(1)); - await tester.tap(switches.at(1)); - await tester.pumpAndSettle(); - expect( - (tester.widgetList(switches).toList()[1] as Switch).value, - false, - ); - }); - testWidgets("Testing Add Members section", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final addMembersText = find.descendant( - of: find.byType(Row), - matching: find.text("Add Members"), - ); - final addIcons = find.byIcon(Icons.add); - final memberNameTiles = find.byType(MemberNameTile); - expect(addMembersText, findsOneWidget); - expect(addIcons, findsNWidgets(1)); - expect( - (tester.widget(addMembersText) as Text?)?.style!.fontSize, - 16, - ); - expect(memberNameTiles, findsNothing); - await tester.ensureVisible(addMembersText.first); - await tester.tap(addMembersText.first); - await tester.pump(); - expect(find.byType(BottomSheet), findsOneWidget); - }); - testWidgets("Testing if cancel button in app bar works", (tester) async { - await tester.pumpWidget( - createEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final closeBtn = find.descendant( - of: appBar, - matching: find.byType(GestureDetector), - ); - await tester.tap(closeBtn.first); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - final createEventScreenPage = - find.byKey(const Key('CreateEventScreen')); - expect(createEventScreenPage, findsNothing); - }); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart b/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart deleted file mode 100644 index 821cad531..000000000 --- a/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart +++ /dev/null @@ -1,542 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// ignore_for_file: unused_import - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/database_mutation_functions.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_event_page.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_events_form.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_date_time_tile.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; - -Widget editEventScreen({ - ThemeMode themeMode = ThemeMode.light, - required ThemeData theme, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, langModel, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme, - home: EditEventPage( - key: const Key('EditEventScreen'), - event: Event( - id: '1', - admins: [], - startDate: DateFormat('yMd').format( - DateTime(2021, 1, 1), - ), - endDate: DateFormat('yMd').format( - DateTime(2022, 1, 1), - ), - startTime: DateFormat('h:mm a').format(DateTime(2021, 1, 1)), - endTime: DateFormat('h:mm a').format(DateTime(2022, 1, 1)), - isRegisterable: true, - isPublic: true, - isRegistered: true, - title: "Test Title", - description: "Description Title", - location: "Buea", - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - SizeConfig().test(); - setupLocator(); - graphqlConfig.test(); - - group("Edit Event Screen Widget Test in dark mode", () { - testWidgets("Testing if dark mode is applied", (tester) async { - await tester.pumpWidget( - editEventScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme - ?.scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if tapping on Done works", (tester) async { - getAndRegisterUserConfig(); - final service = getAndRegisterEventService(); - locator().init(); - - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.text('Done')); - await tester.pump(); - - verify( - (service as MockEventService) - .editEvent(eventId: '1', variables: anyNamed('variables')), - ); - }); - testWidgets('Tap on Add Image', (tester) async { - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.text('Add Image')); - await tester.pump(); - }); - testWidgets('Tap on DataTimeTile date', (tester) async { - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileDate')).first); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - - await tester.tap(find.text('31')); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - expect(find.text('2021-01-31'), findsOneWidget); - }); - testWidgets('Tap on DataTimeTile time', (tester) async { - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).first); - await tester.pump(); - - expect(find.byType(TimePickerDialog), findsOneWidget); - - final center = tester - .getCenter(find.byKey(const ValueKey('time-picker-dial'))); - await tester.tapAt(Offset(center.dx - 10, center.dy)); - await tester.pump(); - await tester.tapAt(Offset(center.dx, center.dy + 10)); - await tester.tap(find.text('OK')); - await tester.pump(); - - expect(find.text('9:30 AM'), findsOneWidget); - }); - testWidgets('Tap on DataTimeTile date for end', (tester) async { - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileDate')).last); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - - await tester.tap(find.text('31')); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - expect(find.text('2022-01-31'), findsOneWidget); - }); - testWidgets('Tap on DataTimeTile time for end', (tester) async { - await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).last); - await tester.pump(); - - expect(find.byType(TimePickerDialog), findsOneWidget); - - await tester.tap(find.text('PM')); - await tester.tap(find.text('OK')); - await tester.pump(); - - expect(find.text('12:00 PM'), findsOneWidget); - }); - }); - - group("Edit Event Screen Widget Test in light mode", () { - testWidgets("Testing if light mode is applied", (tester) async { - await tester.pumpWidget( - editEventScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme - ?.scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - }); - group('Edit Event Screen Widget Test', () { - testWidgets("Testing if Edit Event Screen shows up", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey(const Key('EditEventScreen')); - expect(screenScaffoldWidget, findsOneWidget); - }); - - group("Testing app bar properties and contents", () { - testWidgets("Testing if app bar shows up", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - expect(appBar, findsOneWidget); - expect(appBarWidget.elevation, 1); - }); - testWidgets("Testing close button in app bar", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final closeBtn = find.descendant( - of: find.byType(AppBar), - matching: find.byType(GestureDetector), - ); - final closeIcon = find.descendant( - of: closeBtn.first, - matching: find.byIcon(Icons.close), - ); - expect(appBarWidget.leading, tester.firstWidget(closeBtn)); - expect( - (appBarWidget.leading as GestureDetector?)?.child, - tester.firstWidget(closeIcon), - ); - }); - testWidgets("Testing title in app bar", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final title = find.descendant( - of: find.byType(AppBar), - matching: find.byType(Text), - ); - expect(appBarWidget.title, tester.firstWidget(title)); - expect(appBarWidget.centerTitle, true); - expect( - (appBarWidget.title as Text?)?.data, - 'Edit Event', - ); - expect( - (appBarWidget.title as Text?)?.style!.fontFamily, - TalawaTheme.lightTheme.textTheme.titleLarge!.fontFamily, - ); - expect( - (appBarWidget.title as Text?)?.style!.fontSize, - 20, - ); - }); - testWidgets("Testing done button in app bar", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final appBarWidget = tester.firstWidget(appBar) as AppBar; - final doneBtn = find.descendant( - of: find.byType(AppBar), - matching: find.byType(TextButton), - ); - final doneText = - find.descendant(of: doneBtn, matching: find.byType(Text)); - expect(appBarWidget.actions?.length, 1); - expect(appBarWidget.actions?.first, tester.firstWidget(doneBtn)); - expect( - (appBarWidget.actions?.first as TextButton?)?.child, - tester.firstWidget(doneText), - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?)?.data, - 'Done', - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?) - ?.style! - .fontSize, - 16, - ); - expect( - ((appBarWidget.actions?.first as TextButton?)?.child as Text?) - ?.style! - .color, - TalawaTheme.lightTheme.colorScheme.secondary, - ); - }); - }); - - group("Testing body properties and contents", () { - testWidgets("Testing Add Image section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final imageIcon = find.descendant( - of: find.byType(Row), - matching: find.byIcon(Icons.image), - ); - final addImageBtn = find.descendant( - of: find.byType(Row), - matching: find.byType(TextButton), - ); - final addImageText = find.descendant( - of: addImageBtn.first, - matching: find.byType(Text), - ); - final imageShowWidget = find.byType(Image); - expect(imageIcon, findsOneWidget); - expect(addImageText, findsOneWidget); - expect( - (tester.widget(addImageText) as Text?)?.data, - appLocalization!.strictTranslate("Add Image"), - ); - expect( - (tester.widget(addImageText) as Text?)?.style!.fontSize, - 16, - ); - expect(imageShowWidget, findsNothing); - }); - testWidgets("Testing if Edit Event Form widget shows", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final editEventForm = find.byType(EditEventForm); - expect(editEventForm, findsOneWidget); - }); - testWidgets("Testing Select Start Date and Time section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final textDesc = find.text( - appLocalization!.strictTranslate('Select Start Date and Time'), - ); - final dateTimeTiles = find.byType(DateTimeTile); - expect(textDesc, findsOneWidget); - expect(dateTimeTiles, findsNWidgets(2)); - expect( - (tester.firstWidget(dateTimeTiles) as DateTimeTile).date, - DateTime(2021, 1, 1).toString().split(' ')[0], - ); - expect( - (tester.firstWidget(dateTimeTiles) as DateTimeTile).time, - TimeOfDay.fromDateTime(DateTime(2021, 1, 1)).format( - navigationService.navigatorKey.currentContext!, - ), - ); - expect( - (tester.widget(textDesc) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Select End Date and Time section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final textDesc = find.text( - appLocalization!.strictTranslate('Select End Date and Time'), - ); - final dateTimeTiles = find.byType(DateTimeTile); - expect(textDesc, findsOneWidget); - expect(dateTimeTiles, findsNWidgets(2)); - expect( - (tester.widgetList(dateTimeTiles).toList()[1] as DateTimeTile).date, - DateTime(2022, 1, 1).toString().split(' ')[0], - ); - expect( - (tester.widgetList(dateTimeTiles).toList()[1] as DateTimeTile).time, - TimeOfDay.fromDateTime(DateTime(2022, 1, 1)).format( - navigationService.navigatorKey.currentContext!, - ), - ); - expect( - (tester.widgetList(dateTimeTiles).toList()[1] as DateTimeTile).time, - TimeOfDay.fromDateTime(DateTime(2022, 1, 1)).format( - navigationService.navigatorKey.currentContext!, - ), - ); - expect( - (tester.widget(textDesc) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Does not repeat section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final restoreIcon = find.descendant( - of: find.byType(Row), - matching: find.byIcon(Icons.restore), - ); - final doesNotRepeatText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Does not repeat'), - ), - ); - expect(restoreIcon, findsOneWidget); - expect(doesNotRepeatText, findsOneWidget); - expect( - (tester.widget(doesNotRepeatText) as Text?)?.style!.fontSize, - 16, - ); - }); - testWidgets("Testing Keep public section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepPublicText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Public'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - ); - expect(keepPublicText, findsOneWidget); - expect(switches, findsNWidgets(2)); - expect( - (tester.widget(keepPublicText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.firstWidget(switches) as Switch).value, true); - await tester.ensureVisible(switches.first); - await tester.tap(switches.first); - await tester.pumpAndSettle(); - expect((tester.firstWidget(switches) as Switch).value, false); - }); - testWidgets("Testing Keep Registerable section", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appLocalization = AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - ); - final keepRegisterableText = find.descendant( - of: find.byType(Row), - matching: find.text( - appLocalization!.strictTranslate('Keep Registerable'), - ), - ); - final switches = find.descendant( - of: find.byType(Row), - matching: find.byType(Switch), - skipOffstage: false, - ); - expect(keepRegisterableText, findsOneWidget); - expect(switches, findsNWidgets(2)); - expect( - (tester.widget(keepRegisterableText) as Text?)?.style!.fontSize, - 16, - ); - expect((tester.widgetList(switches).toList()[1] as Switch).value, true); - await tester.ensureVisible(switches.at(1)); - await tester.tap(switches.at(1)); - await tester.pumpAndSettle(); - expect( - (tester.widgetList(switches).toList()[1] as Switch).value, - false, - ); - }); - testWidgets("Testing if cancel button in app bar works", (tester) async { - await tester.pumpWidget( - editEventScreen( - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - final appBar = find.byType(AppBar); - final closeBtn = find.descendant( - of: appBar, - matching: find.byType(GestureDetector), - ); - await tester.tap(closeBtn.first); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - final createEventScreenPage = find.byKey(const Key('EditEventScreen')); - expect(createEventScreenPage, findsNothing); - }); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/edit_events_form_test.dart b/test/widget_tests/after_auth_screens/events/edit_events_form_test.dart deleted file mode 100644 index ea563160f..000000000 --- a/test/widget_tests/after_auth_screens/events/edit_events_form_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/edit_event_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/edit_events_form.dart'; - -import '../../../helpers/test_helpers.dart'; - -Widget createEditEventForm(EditEventViewModel model) => - MaterialApp(home: Scaffold(body: EditEventForm(model: model))); - -void main() { - SizeConfig().test(); - setUp(() { - registerServices(); - registerViewModels(); - }); - tearDown(() { - unregisterViewModels(); - }); - group('Test EditEventForm', () { - testWidgets('Test titleFocus', (tester) async { - final model = EditEventViewModel(); - - await tester.pumpWidget(createEditEventForm(model)); - - await tester.tap(find.byIcon(Icons.edit).first); - - expect(model.titleFocus.hasFocus, true); - }); - testWidgets('Test locationFocus', (tester) async { - final model = EditEventViewModel(); - - await tester.pumpWidget(createEditEventForm(model)); - - await tester.tap(find.byIcon(Icons.edit).at(1)); - - expect(model.locationFocus.hasFocus, true); - }); - testWidgets('Test descriptionFocus', (tester) async { - final model = EditEventViewModel(); - - await tester.pumpWidget(createEditEventForm(model)); - - await tester.tap(find.byIcon(Icons.edit).last); - - expect(model.descriptionFocus.hasFocus, true); - }); - testWidgets('Test descriptionFocus', (tester) async { - final model = EditEventViewModel(); - - await tester.pumpWidget(createEditEventForm(model)); - - expect(model.formKey.currentState!.validate(), false); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/event_calendar_test.dart b/test/widget_tests/after_auth_screens/events/event_calendar_test.dart deleted file mode 100644 index 77e87533d..000000000 --- a/test/widget_tests/after_auth_screens/events/event_calendar_test.dart +++ /dev/null @@ -1,185 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datepicker/datepicker.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/event_calendar_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_calendar.dart'; - -import '../../../helpers/test_helpers.dart'; - -Widget createEventCalendar() { - return MaterialApp( - navigatorKey: navigationService.navigatorKey, - home: EventCalendar([ - Event( - title: 'Test', - startDate: '07/14/2022', - startTime: '14:23:01', - endDate: '07/14/2022', - endTime: '21:23:01', - ), - ]), - ); -} - -Widget createEventCalender2() { - return MaterialApp( - navigatorKey: navigationService.navigatorKey, - home: EventCalendar([ - Event( - title: 'Test2', - startDate: '2022-07-14', - startTime: '14:23:01', - endDate: '2022-07-14', - endTime: '21:23:01', - ), - ]), - ); -} - -void main() { - setUp(() { - registerServices(); - }); - group("Test for _parseTime function", () { - test("Test parsing valid time string", () { - const timeString = "5:30 PM"; - final parsedTime = parseTime(timeString); - final expectedTime = DateFormat("h:mm a").parse(timeString); - expect(parsedTime, expectedTime); - }); - test("Test for invalid time string", () { - const timeString = "invalid String "; - - expect(() => parseTime(timeString), throwsException); - }); - test("Test parsing string in hms format", () { - const timeString = "12:12:12"; - - final parsedTime = parseTime(timeString); - final expectTime = DateFormat('Hms').parse(timeString); - - expect(expectTime, parsedTime); - }); - - group('Tests for EventCalendar', () { - setUp(() => locator.registerSingleton(EventCalendarViewModel())); - tearDown(() => locator.unregister()); - testWidgets('Testing if EventCalendar shows up', (tester) async { - await tester.pumpWidget(createEventCalendar()); - await tester.pump(); - - expect(find.byType(EventCalendar), findsOneWidget); - }); - testWidgets('Testing if tapping on date_range shows datePicker', - (tester) async { - await tester.pumpWidget(createEventCalendar()); - await tester.pump(); - - await tester.tap(find.byIcon(Icons.date_range)); - await tester.pumpAndSettle(); - - expect(find.byType(CalendarDatePicker), findsOneWidget); - - await tester.tap(find.text('16')); - await tester.tap(find.text('OK')); - await tester.pump(); - }); - - testWidgets('calendarViewSelection', (tester) async { - await tester.pumpWidget( - createEventCalendar(), - ); - - await tester.pump(); - - final popupButtonFinder = find.byType(PopupMenuButton); - - await tester.tap(popupButtonFinder); - await tester.pumpAndSettle(); - - await tester.tap(find.text("Day")); - await tester.pumpAndSettle(); - - await tester.tap(popupButtonFinder); - await tester.pumpAndSettle(); - - await tester.tap(find.text("Month")); - await tester.pumpAndSettle(); - - await tester.tap(popupButtonFinder); - await tester.pumpAndSettle(); - - await tester.tap(find.text("Schedule")); - await tester.pumpAndSettle(); - - await tester.tap(popupButtonFinder); - await tester.pumpAndSettle(); - - expect(find.text("Day"), findsOne); - expect(find.text("Month"), findsOne); - expect(find.text("Schedule"), findsOne); - }); - testWidgets('Testing if Event model parses dates correctly', - (tester) async { - await tester.pumpWidget(createEventCalendar()); - await tester.pump(); - - final eventCalendar = - tester.widget(find.byType(EventCalendar)); - final event = eventCalendar.eventList[0]; - - DateTime startDate; - DateTime endDate; - if (event.startDate!.contains('/')) { - startDate = DateFormat('MM/dd/yyyy').parse(event.startDate!); - } else { - startDate = DateFormat('yyyy-MM-dd').parse(event.startDate!); - } - if (event.endDate!.contains('/')) { - endDate = DateFormat('MM/dd/yyyy').parse(event.endDate!); - } else { - endDate = DateFormat('yyyy-MM-dd').parse(event.endDate!); - } - - expect(startDate, DateFormat('MM/dd/yyyy').parse('07/14/2022')); - expect(endDate, DateFormat('MM/dd/yyyy').parse('07/14/2022')); - }); - testWidgets("Testing if EventCalendar shows up", (tester) async { - await tester.pumpWidget(createEventCalender2()); - await tester.pump(); - - expect(find.byType(EventCalendar), findsOneWidget); - final eventCalendar = - tester.widget(find.byType(EventCalendar)); - final event = eventCalendar.eventList[0]; - - DateTime startDate; - DateTime endDate; - if (event.startDate!.contains('/')) { - startDate = DateFormat('MM/dd/yyyy').parse(event.startDate!); - } else { - startDate = DateFormat('yyyy-MM-dd').parse(event.startDate!); - } - if (event.endDate!.contains('/')) { - endDate = DateFormat('MM/dd/yyyy').parse(event.endDate!); - } else { - endDate = DateFormat('yyyy-MM-dd').parse(event.endDate!); - } - - expect(startDate, DateFormat('yyyy-MM-dd').parse('2022-07-14')); - expect(endDate, DateFormat('yyyy-MM-dd').parse('2022-07-14')); - }); - }); - test("dateRangePickerController getter", () async { - final EventCalendarViewModel model = EventCalendarViewModel(); - expect(model.dateRangePickerController, isA()); - expect(model.eventList, isA>()); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/event_info_page_test.dart b/test/widget_tests/after_auth_screens/events/event_info_page_test.dart deleted file mode 100644 index 054f21ce9..000000000 --- a/test/widget_tests/after_auth_screens/events/event_info_page_test.dart +++ /dev/null @@ -1,126 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_info_page.dart'; - -import '../../../helpers/test_helpers.dart'; - -/// Creates an instance of Event with the given parameters. -/// -/// **params**: -/// * `isPublic`: event is public or not -/// * `isCreator`: user is creator of the event or not -/// -/// **returns**: -/// * `Event`: return the Event instance -Event getEvent(bool isPublic, bool isCreator) { - return Event( - id: '1', - title: 'test', - startTime: '10000', - endTime: '20000', - location: 'ABC', - description: 'test', - creator: User( - id: isCreator ? "xzy1" : "abc1", - firstName: "Test", - lastName: "User", - email: "testuser@gmail.com", - refreshToken: "testtoken", - authToken: 'testtoken', - ), - startDate: '10000', - endDate: '20000', - admins: [ - User( - id: isCreator ? "xzy1" : "abc1", - firstName: "Test", - lastName: "User", - ), - ], - isPublic: isPublic, - organization: OrgInfo(id: 'XYZ'), - ); -} - -/// Creates an instance of EventInfoPage with the given parameters. -/// -/// **params**: -/// * `isPublic`: whether the event is public or not -/// * `isCreator`: whether the user is the creator of the event or not -/// -/// **returns**: -/// * `Widget`: return the EventInfoPage widget -Widget createEventInfoPage(bool isPublic, bool isCreator) { - return MaterialApp( - localizationsDelegates: [ - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - const AppLocalizationsDelegate(isTest: true), - ], - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - home: EventInfoPage( - args: { - 'event': getEvent(isPublic, isCreator), - 'exploreEventViewModel': ExploreEventsViewModel(), - }, - ), - ); -} - -void main() { - setUp(() { - SizeConfig().test(); - registerServices(); - registerViewModels(); - }); - tearDown(() { - unregisterViewModels(); - }); - group('Test EventInfoPage', () { - // testWidgets('Test Share button', (tester) async { - // mockNetworkImages(() async { - // await tester.pumpWidget(createEventInfoPage(true, true)); - // await tester.pumpAndSettle(); - - // final shareButton = find.byIcon(Icons.share); - // expect(shareButton, findsOneWidget); - - // await tester.tap(shareButton); - // await tester.pumpAndSettle(); - // }); - // }); - - testWidgets('Test FloatingActionButton', (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget(createEventInfoPage(true, true)); - await tester.pumpAndSettle(); - - expect(find.byType(FloatingActionButton), findsOneWidget); - - await tester.tap(find.byType(FloatingActionButton)); - }); - }); - - testWidgets('Test Delete FloatingActionButton', (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget(createEventInfoPage(true, false)); - await tester.pumpAndSettle(); - - expect(find.byType(FloatingActionButton), findsOneWidget); - - await tester.tap(find.byType(FloatingActionButton)); - }); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/explore_event_dialogue_test.dart b/test/widget_tests/after_auth_screens/events/explore_event_dialogue_test.dart deleted file mode 100644 index c286ff262..000000000 --- a/test/widget_tests/after_auth_screens/events/explore_event_dialogue_test.dart +++ /dev/null @@ -1,277 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_event_dialogue.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createExploreEventDialog() { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - home: Builder( - builder: (context) { - return Container( - child: TextButton( - key: const Key('TextButtonKey'), - onPressed: () { - showDialog( - context: context, - builder: (_) => const ExploreEventDialog( - key: Key('ExploreEventDialog'), - ), - ); - }, - child: const Text('EventDialog'), - ), - ); - }, - ), - ); -} - -void main() { - DateTime startDate = DateTime.now().toLocal(); - // DateTime _endDate = DateTime.now().add(const Duration(days: 1)).toLocal(); - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - Future prepareDatePicker( - WidgetTester tester, - Future Function(Future date) callback, - ) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - - await tester.tap(find.byKey(const Key('TextButtonKey'))); - final date = customDatePicker(initialDate: startDate); - await tester.pumpAndSettle(); - - final okButton = find.text('OK'); - - await tester.tap(okButton); - await tester.pumpAndSettle(); - - expect(find.text(startDate.toString().split(' ')[0]), findsOneWidget); - await tester.ensureVisible(find.byKey(const Key('StartDateSelector'))); - await tester.tap(find.byKey(const Key('StartDateSelector'))); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - callback(date); - } - - group('Tests for DatePicker', () { - testWidgets('Testing the OK button', (tester) async { - await prepareDatePicker(tester, (date) async { - expect(find.text('OK'), findsOneWidget); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - expect( - (await date).toString().split(' ')[0], - DateTime.now().toLocal().toString().split(' ')[0], - ); - - expect( - find.textContaining( - (await date).toLocal().toString().split(' ')[0], - ), - findsOneWidget, - ); - }); - }); - testWidgets('Testing the Cancel button', (tester) async { - await prepareDatePicker(tester, (date) async { - final cancelBtnFinder = find.text('Cancel').last; - expect(cancelBtnFinder, findsOneWidget); - await tester.tap(cancelBtnFinder); - await tester.pumpAndSettle(); - expect( - find.textContaining( - (await date).toLocal().toString().split(' ')[0], - ), - findsOneWidget, - ); - }); - }); - - testWidgets('Changing Date test', (tester) async { - await prepareDatePicker(tester, (val) async { - expect(find.text('OK'), findsOneWidget); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - - final date = customDatePicker(initialDate: startDate); - await tester.pumpAndSettle(); - - await tester.tap(find.text('10')); - await tester.pumpAndSettle(const Duration(seconds: 1)); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - expect( - (await date).toString().split(' ')[0], - DateTime(DateTime.now().year, DateTime.now().month, 10) - .toString() - .split(' ')[0], - ); - startDate = await date; - await tester.pumpAndSettle(); - expect(find.byKey(const Key('TextButtonKey')), findsOneWidget); - - expect( - startDate, - DateTime(DateTime.now().year, DateTime.now().month, 10), - ); - }); - }); - }); - - group('Tests for Explore Event Dialogue', () { - locator.registerSingleton(SizeConfig()); - - testWidgets('Tap on StartDateSelector', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - await tester.tap(find.byKey(const Key('StartDateSelector'))); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - - await tester.tap(find.text('16')); - await tester.tap(find.text('OK')); - await tester.pumpAndSettle(); - }); - testWidgets('Tap on EndDateSelector', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - await tester.tap(find.byKey(const Key('EndDateSelector'))); - await tester.pump(); - - expect(find.byType(DatePickerDialog), findsOneWidget); - - await tester.tap(find.text('16')); - await tester.tap(find.text('OK')); - await tester.pump(); - }); - - testWidgets('Testing Explore Event dialog layout', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - - expect(find.byType(TextButton), findsOneWidget); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - expect(find.byType(ExploreEventDialog), findsOneWidget); - - final startDateText = find.text('Start Date'); - expect(startDateText, findsOneWidget); - - final endDateText = find.text('End Date'); - expect(endDateText, findsOneWidget); - - final cancelButtonText = find.text('Cancel'); - expect(cancelButtonText, findsOneWidget); - - final doneButtonText = find.text('Done'); - expect(doneButtonText, findsOneWidget); - }); - - testWidgets('Test for Cancel button', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - expect(find.byType(ExploreEventDialog), findsOneWidget); - - final cancelButton = find.byKey(const Key('CancelButton')); - expect(cancelButton, findsOneWidget); - await tester.tap(cancelButton); - await tester.pumpAndSettle(); - }); - - testWidgets('Test for Done button', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - expect(find.byType(ExploreEventDialog), findsOneWidget); - - final doneButton = find.byKey(const Key('DoneButton')); - expect(doneButton, findsOneWidget); - }); - - testWidgets('Test for selecting Start Date', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - final startDateButton = find.byKey(const Key('StartDateSelector')); - expect(startDateButton, findsOneWidget); - }); - testWidgets('Test for selecting End Date', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - final endDateButton = find.byKey(const Key('EndDateSelector')); - expect(endDateButton, findsOneWidget); - }); - - testWidgets('Testing the Cancel button', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - // finding Cancel Button - final x = find.text('Cancel'); - expect(x, findsOneWidget); - - await tester.tap(x); - expect(find.byKey(const Key('TextButtonKey')), findsOneWidget); - }); - testWidgets('Testing the Done button', (tester) async { - await tester.pumpWidget(createExploreEventDialog()); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('TextButtonKey'))); - await tester.pump(); - - // finding Done Button - final x = find.text('Done'); - expect(x, findsOneWidget); - - await tester.tap(x); - expect(find.byKey(const Key('TextButtonKey')), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/events/explore_events_test.dart b/test/widget_tests/after_auth_screens/events/explore_events_test.dart deleted file mode 100644 index 2d37da6ce..000000000 --- a/test/widget_tests/after_auth_screens/events/explore_events_test.dart +++ /dev/null @@ -1,205 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/event_service.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_calendar.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_event_dialogue.dart'; -import 'package:talawa/views/after_auth_screens/events/explore_events.dart'; -import 'package:talawa/widgets/custom_drawer.dart'; -import 'package:talawa/widgets/event_card.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createExploreEventsScreen(MainScreenViewModel model) => MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - drawer: CustomDrawer( - homeModel: model, - ), - body: const ExploreEvents( - key: Key('ExploreEvents'), - ), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - -void main() { - SizeConfig().test(); - setUp(() { - registerServices(); - registerViewModels(); - }); - tearDown(() { - unregisterViewModels(); - }); - group("Test Explore Events Screen Widget:", () { - testWidgets("Testing if drawer opens up", (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pump(); - // find by icon menu - expect(find.byIcon(Icons.menu), findsOneWidget); - // tap on icon menu - await tester.tap(find.byIcon(Icons.menu)); - await tester.pump(); - - // expect the drawer to be open - expect(find.byType(CustomDrawer), findsOneWidget); - }); - }); - testWidgets("Testing if showSearch works", (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - expect(find.byIcon(Icons.search), findsOneWidget); - - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - expect(find.byIcon(Icons.clear), findsOneWidget); - expect(find.byIcon(Icons.arrow_back), findsOneWidget); - }); - }); - testWidgets("Testing if refresh works", (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - await tester.drag( - find.byKey(const Key('ExploreEvents')), - const Offset(0, 500), - ); - await tester.pumpAndSettle(); - - verify(locator().refreshEvents()).called(2); - }); - }); - testWidgets("Testing if tapping on add icon and EventCard works", - (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - await tester.tap(find.byIcon(Icons.add)); - await tester.pumpAndSettle(); - - verify(locator().pushScreen("/createEventPage")) - .called(1); - - await tester.tap(find.byType(EventCard)); - await tester.pumpAndSettle(); - - verify( - locator() - .pushScreen("/eventInfo", arguments: anyNamed('arguments')), - ).called(1); - }); - }); - testWidgets("Testing if drop down button works", (tester) async { - await mockNetworkImages(() async { - locator.unregister(); - - final model = ExploreEventsViewModel(); - locator.registerSingleton(model); - - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - await tester.tap(find.bySemanticsLabel('Filters')); - await tester.pumpAndSettle(); - await tester.pump(); - await tester.tap(find.byKey(const Key('Public Events'))); - await tester.pumpAndSettle(); - expect(model.chosenValue, 'Public Events'); - }); - }); - testWidgets("Testing if tapping on calendar works", (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - await tester.tap(find.text('Filter by Date')); - await tester.pump(); - - expect(find.byType(ExploreEventDialog), findsOneWidget); - }); - }); - testWidgets("Testing if tapping on calendar works", (tester) async { - await mockNetworkImages(() async { - locator.unregister(); - - final StreamController streamController = StreamController(); - final Stream stream = - streamController.stream.asBroadcastStream(); - - final service = MockEventService(); - when(service.eventStream).thenAnswer((invocation) => stream); - locator.registerSingleton(service); - - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - expect( - find.text("Looks like there aren't any events."), - findsOneWidget, - ); - }); - }); - testWidgets("Testing if tapping on Calendar button works", (tester) async { - await mockNetworkImages(() async { - final homeModel = locator(); - - await tester.pumpWidget(createExploreEventsScreen(homeModel)); - await tester.pumpAndSettle(); - - expect(find.byType(EventCalendar), findsNothing); - - await tester.tap( - find.byIcon( - Icons.calendar_month, - ), - ); - await tester.pumpAndSettle(); - }); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/feed/individual_post_test.dart b/test/widget_tests/after_auth_screens/feed/individual_post_test.dart deleted file mode 100644 index a70efc78e..000000000 --- a/test/widget_tests/after_auth_screens/feed/individual_post_test.dart +++ /dev/null @@ -1,427 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/after_auth_screens/feed/individual_post.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -final LikedBy user = LikedBy(sId: "test_id"); - -final u1 = User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', -); -final u2 = User( - id: '123', - firstName: 'Ayush', - lastName: 'Chaudhary', - email: 'test@test.com', -); -final List users = [u1, u2]; - -final LikedBy l1 = LikedBy(sId: 'test1'); -final LikedBy l2 = LikedBy(sId: 'test2'); -final List likeby = [l1, l2]; - -final comment1 = Comments(sId: 'comment1'); -final comment2 = Comments(sId: 'comment2'); -final comment3 = Comments(sId: 'comment3'); -final List comments1 = [comment1, comment2, comment3]; - -final myBirthday = DateTime.utc(2004, DateTime.june, 16, 5, 30, 0, 0, 0); -final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday, - description: 'test description', - imageUrl: 'https://image.com', - videoUrl: 'https://image.com', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments1, -); - -Widget createLikedUserCircleAvatarWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: likedUserCircleAvatar(user), - ), - ); -} - -final comment = Comment( - creator: User( - id: '123', - firstName: 'Ayush', - lastName: 'Chaudhary', - email: 'test@test.com', - ), - createdAt: '123456', - text: 'test text', - post: 'test post', - likeCount: 'test count', -); - -List comments = [ - Comments(sId: 'comment1'), - Comments(sId: 'comment2'), - Comments(sId: 'comment3'), - Comments(sId: 'comment4'), - Comments(sId: 'comment5'), - Comments(sId: 'comment6'), -]; - -Widget createCommentTemplateWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: CommentTemplate( - comment: comment, - ), - ), - ); -} - -Widget createIndividualPageLikeSectionWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: IndividualPageLikeSection( - usersLiked: [ - LikedBy(sId: 'test1'), - LikedBy(sId: 'test2'), - LikedBy(sId: 'test3'), - LikedBy(sId: 'test4'), - ], - ), - ), - ); -} - -Widget createIndividualPostCommentSectionWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: IndividualPostCommentSection( - comments: comments, - postID: 'test post id', - ), - ), - ); -} - -Widget createIndividualPostViewWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, - required Post post1, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: IndividualPostView( - post: post1, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - // locator.registerSingleton(LikeButtonViewModel()); - - setUp(() { - registerServices(); - }); - - group('Individualpostview tests', () { - // testWidgets("Check if the IndividualPostView shows up", - // (WidgetTester tester) async { - // await tester.runAsync(() async { - // ///making a sample data - // /// also wrote all the detail - // /// used in the individual post - // - // final commentJson1 = { - // 'creator': { - // '_id': '123', - // 'firstName': 'Ayush', - // 'lastName': 'Chaudhary', - // 'email': 'test@test.com', - // }, - // 'createdAt': '123456', - // 'text': 'test text', - // 'post': 'test post', - // 'likeCount': 'test count', - // }; - // final commentJson2 = { - // 'creator': { - // '_id': '123', - // 'firstName': 'John', - // 'lastName': 'Doe', - // 'email': 'test@test.com', - // }, - // 'createdAt': '123456', - // 'text': 'test text', - // 'post': 'test post', - // 'likeCount': 'test count', - // }; - // - // final commentsJson = [commentJson1, commentJson2]; - // - // ///returning a service response through mocking, - // ///this method was called in - // ///comment view model and was returning null - // ///until I made a mock response. - // - // when(commentsService.getCommentsForPost('PostID')) - // .thenAnswer((realInvocation) async { - // return commentsJson; - // }); - // - // /// using the mock post made before me - // - // final Post post = getPostMockModel(); - // - // ///returning mock reponse of post model when - // ///.likedby is called on the model - // - // when(post.likedBy).thenReturn([LikedBy(sId: "xzy1")]); - // - // await tester.pumpWidget(createIndividualPostViewWidget(post1: post)); - // await tester.pump(); - // - // /// checking if the individual post - // /// screen pops up - // - // expect(find.byType(Scaffold), findsNWidgets(2)); - // - // ///finding the text field via its ID - // - // final textfield = find.byKey(const Key('indi_post_tf_key')); - // - // /// check if the textfield shows up - // - // expect(textfield, findsOneWidget); - // - // ///finding the text field via its type - // - // final textbtn = find.byType(TextButton); - // - // ///check if btn exist - // - // expect(textbtn, findsOneWidget); - // - // ///checking if the onPressed of - // ///text button is working when tapped - // - // await tester.tap(textbtn); - // await tester.pump(); - // - // ///tapping the text field - // ///to check if it shows up - // - // await tester.tap(textfield); - // await tester.pump(); - // - // /// Checking if the submit button is working, - // /// when keyboard send action is called - // - // await tester.showKeyboard(textfield); - // - // /// keyboard action can be - // /// simulated using the - // /// testTextInput method - // - // await tester.testTextInput.receiveAction(TextInputAction.send); - // await tester.pump(); - // }); - // }); - }); - - group('Test for likedUserCircleAvatar', () { - testWidgets('Check if the likedUserCircleAvatar shows up', (tester) async { - await tester.pumpWidget(createLikedUserCircleAvatarWidget()); - await tester.pump(); - - final findStack = find.byType(Stack); - - expect(findStack, findsNWidgets(2)); - }); - }); - - group('Test for IndividualPageLikeSection', () { - testWidgets('Check if the IndividualPageLikeSection shows up', - (tester) async { - await tester.pumpWidget(createIndividualPageLikeSectionWidget()); - await tester.pump(); - - final findColumn = find.byType(Column); - - expect(findColumn, findsNWidgets(1)); - }); - - testWidgets( - 'Check if the likedUserCircleAvatar in IndividualPageLikeSection shows up', - (tester) async { - await tester.pumpWidget(createIndividualPageLikeSectionWidget()); - await tester.pump(); - - final findStack = find.byType(Stack); - - expect(findStack, findsNWidgets(5)); - }); - }); - - group('Test for CommentTemplate', () { - testWidgets('Check if the CommentTemplate shows up', (tester) async { - await tester.pumpWidget(createCommentTemplateWidget()); - await tester.pump(); - - final findStack = find.byType(Row); - - expect(findStack, findsNWidgets(1)); - }); - - testWidgets('Check if the name is displayed in CommentTemplate ', - (tester) async { - await tester.pumpWidget(createCommentTemplateWidget()); - await tester.pump(); - - final findStack = find.text('Ayush Chaudhary'); - - expect(findStack, findsNWidgets(1)); - }); - - testWidgets('Check if the comment text is displayed in CommentTemplate ', - (tester) async { - await tester.pumpWidget(createCommentTemplateWidget()); - await tester.pump(); - - final findStack = find.text('test text'); - - expect(findStack, findsNWidgets(1)); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart b/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart deleted file mode 100644 index 795cc445a..000000000 --- a/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart +++ /dev/null @@ -1,288 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/router.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/after_auth_screens/feed/organization_feed.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_helpers.mocks.dart'; -import '../../../helpers/test_locator.dart'; - -Widget createOrganizationFeedScreen({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, - required MainScreenViewModel homeModel, -}) { - return MaterialApp( - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: OrganizationFeed( - homeModel: homeModel, - key: const Key('test_key'), - ), - ), - ); -} - -// late OrganizationFeedViewModel _organizationFeedViewModel; - -Widget createOrganizationFeedScreen2({ - bool viewOnMap = true, - required MainScreenViewModel homeModel, -}) { - return BaseView( - onModelReady: (model) => model.initialize(), - // builder: (context, langModel, child) { - // return BaseView( - // onModelReady: (model) { - // model.initialise(); - // _organizationFeedViewModel = model; - // }, - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - key: MainScreenViewModel.scaffoldKey, - body: OrganizationFeed( - homeModel: homeModel, - key: const Key('test_key'), - forTest: true, - ), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: generateRoute, - ); - }, - // ); - // }, - ); -} - -final post = Post( - sId: "test_post_id", - creator: userConfig.currentUser, - likedBy: [], - description: 'Testing', - comments: [Comments(sId: 'cmmnt1')], - createdAt: DateTime.now(), - organization: userConfig.currentOrg, -); - -void main() { - SizeConfig().test(); - testSetupLocator(); - late MockOrganizationFeedViewModel mockViewModel; - - setUp(() { - registerServices(); - mockViewModel = MockOrganizationFeedViewModel(); - locator.unregister(); - locator.registerSingleton(mockViewModel); - }); - tearDown(() { - unregisterServices(); - }); - - TestWidgetsFlutterBinding.ensureInitialized(); - group('tests for Organizaiton feed Screen', () { - testWidgets('check if orgname is displayed shows up', (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(true); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen(homeModel: model)); - await tester.pump(); - - final finder = find.text('testOrg'); - expect(finder, findsOneWidget); - }); - testWidgets('check if side drawer shows up', (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(true); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen(homeModel: model)); - await tester.pump(); - - final finder = find.byIcon(Icons.menu); - - await tester.tap(finder); - await tester.pump(); - }); - testWidgets('check if Circular Indicator shows up when fetching posts', - (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(true); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.userPosts).thenReturn([]); - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen(homeModel: model)); - await tester.pump(); - - final finder = find.byType(CircularProgressIndicator); - expect(finder, findsOneWidget); - }); - testWidgets("check if the refresh indicator works fine", (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts) - .thenReturn([post, post, post, post, post, post]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - final model = locator(); - - await tester.pumpWidget(createOrganizationFeedScreen(homeModel: model)); - await tester.pump(); - - bool refreshed = false; - when(mockViewModel.fetchNewPosts()).thenAnswer((_) async { - refreshed = true; - }); - await tester.drag( - find.byType(RefreshIndicator), - const Offset(0, 400), - ); - await tester.pumpAndSettle(); - - expect(refreshed, true); - }); - testWidgets('check if pinned posts shows up if not empty', (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts).thenReturn([post]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen2(homeModel: model)); - await tester.pumpAndSettle(); - - final finder = find.byKey(const Key('pinnedPosts')); - expect(finder, findsOneWidget); - }); - testWidgets('check if posts shows up if not empty', (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts).thenReturn([post]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen2(homeModel: model)); - await tester.pumpAndSettle(); - - final finder = find.byType(PostListWidget); - expect(finder, findsOneWidget); - }); - testWidgets('check if no posts shows up then No posts text is there', - (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts).thenReturn([]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen2(homeModel: model)); - await tester.pumpAndSettle(); - - final finder = find.text('There are no posts in this organization'); - expect(finder, findsOneWidget); - }); - testWidgets( - 'check if no posts shows up then create post textButton is present', - (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts).thenReturn([]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen2(homeModel: model)); - await tester.pumpAndSettle(); - - final finder = find.text('Create your first post'); - expect(finder, findsOneWidget); - await tester.tap(finder); - await tester.pumpAndSettle(); - }); - testWidgets( - 'check if nextPage function is called when scrolled to the bottom edge', - (tester) async { - when(mockViewModel.currentOrgName).thenReturn('testOrg'); - when(mockViewModel.isFetchingPosts).thenReturn(false); - when(mockViewModel.isBusy).thenReturn(false); - when(mockViewModel.initialise()).thenReturn(null); - when(mockViewModel.posts) - .thenReturn([post, post, post, post, post, post]); - when(mockViewModel.pinnedPosts).thenReturn([post]); - bool nextPageCalled = false; - when(mockViewModel.nextPage()).thenAnswer((_) async { - nextPageCalled = true; - }); - - final model = locator(); - await tester.pumpWidget(createOrganizationFeedScreen(homeModel: model)); - await tester.pumpAndSettle(); - - await tester.drag( - find.byKey(const Key('listView')), - const Offset(0, 10), - ); - - await tester.drag( - find.byKey(const Key('listView')), - const Offset(10, 20), - ); - print(nextPageCalled); - // Verify that nextPage function is called - expect(nextPageCalled, true); - verify(mockViewModel.nextPage()).called(1); - verify(mockViewModel.previousPage()).called(1); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/feed/pinned_post_page_test.dart b/test/widget_tests/after_auth_screens/feed/pinned_post_page_test.dart deleted file mode 100644 index 4d0b3957a..000000000 --- a/test/widget_tests/after_auth_screens/feed/pinned_post_page_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_page.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; -import 'package:talawa/widgets/post_widget.dart'; -import 'package:visibility_detector/visibility_detector.dart'; - -import '../../../helpers/test_helpers.dart'; - -Widget createPinnedPostPage() { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - home: PinnedPostPage( - pinnedPosts: [ - Post( - sId: 'post1', - creator: User(firstName: 'firstName1'), - createdAt: DateTime.now(), - description: 'description1', - comments: [], - ), - ], - ), - ); -} - -void main() { - setUp(() { - registerServices(); - registerViewModels(); - }); - - group('Tests for pinned post page', () { - testWidgets('Check whether PinnedPostPage shows up', (tester) async { - VisibilityDetectorController.instance.updateInterval = Duration.zero; - - await tester.pumpWidget(createPinnedPostPage()); - await tester.pump(); - - expect(find.byType(PinnedPostPage), findsOneWidget); - expect(find.byType(PostListWidget), findsOneWidget); - expect(find.byType(NewsPost), findsOneWidget); - expect(find.textContaining('firstName1'), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart b/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart deleted file mode 100644 index cb4734321..000000000 --- a/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/pre_auth_screens/signup_details.dart'; - -import '../../../helpers/test_locator.dart'; - -Widget createApp() { - final Map postDetails = { - 'title': 'Debate over stocks bybacks.', - 'postId': 'agdjvfhsjaf', - 'imageUrl': - 'https://m.wsj.net/video/20200105/wsjglossarystockbuybackssplash/wsjglossarystockbuybackssplash_640x360.jpg', - 'time': '9', - }; - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: TextButton( - onPressed: () async { - final OrgInfo org = OrgInfo( - id: '2', - name: 'test org', - userRegistrationRequired: false, - creatorInfo: User(firstName: 'test', lastName: 'test'), - ); - print(org); - await navigationService.pushScreen( - '/pinnedpostscreen', - arguments: postDetails, - ); - }, - child: const Text('Ayush'), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); -} - -void main() { - SizeConfig().test(); - - testSetupLocator(); - - group('description', () { - testWidgets('Check if SignUp screen shows up', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(SignUpDetails), findsNothing); - - await tester.tap(find.textContaining('Ayush')); - await tester.pumpAndSettle(); - - // expect(find.byType(SignUpDetails), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/after_auth_screens/profile/edit_profile_page_test.dart b/test/widget_tests/after_auth_screens/profile/edit_profile_page_test.dart deleted file mode 100644 index f14ce1800..000000000 --- a/test/widget_tests/after_auth_screens/profile/edit_profile_page_test.dart +++ /dev/null @@ -1,478 +0,0 @@ -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/profile_view_models/edit_profile_view_model.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/after_auth_screens/profile/edit_profile_page.dart'; -import 'package:talawa/views/base_view.dart'; - -import '../../../helpers/test_helpers.dart'; -import '../../../helpers/test_locator.dart'; - -/// MockBuildContext class helps to mock the BuildContext class. -class MockBuildContext extends Mock implements BuildContext {} - -/// MockEditProfilePageViewModel class helps to mock the EditProfilePageViewModel class. -class MockEditProfilePageViewModel extends Mock - implements EditProfilePageViewModel {} - -/// MockCallbackFunction class helps to mock the callback function. -class MockCallbackFunction extends Mock { - /// call function helps to mock the call function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -/// 'createEditProfilePage' is used to create the EditProfilePage widget in light mode. -/// -/// **params**: -/// * `themeMode`: Represents the theme mode of the widget. -/// -/// **returns**: -/// * `Widget`: Returns the EditProfilePage widget. -Widget createEditProfilePage({ThemeMode themeMode = ThemeMode.light}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: themeMode == ThemeMode.light - ? TalawaTheme.lightTheme - : TalawaTheme.darkTheme, - home: const EditProfilePage(), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); -Future main() async { - TestWidgetsFlutterBinding.ensureInitialized(); - testSetupLocator(); - locator().test(); - locator().test(); - - final Directory dir = Directory('temporaryPath'); - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - await Hive.openBox('url'); - group('Edit Profile Screen Widget Test in light mode', () { - testWidgets("Testing if Edit Profile Screen shows up", (tester) async { - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.light)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - final appBarText = find.byKey( - const Key('ProfileText'), - ); - expect(appBarText, findsOneWidget); - }); - testWidgets("Testing if Edit Screen shows image when not exist in database", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.light)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - final imageWidgetWithPicture = find.byKey( - const Key('profilepic'), - ); - expect(imageWidgetWithPicture, findsOneWidget); - }); - }); - testWidgets( - "Testing if Edit Screen shows image when already exist in database", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - userConfig.updateUser( - User( - firstName: 'Test', - lastName: 'Test', - email: 'test@test.com', - image: 'https://via.placeholder.com/150', - ), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.light)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - final imageWidgetWithPicture = find.byKey( - const Key('profilepic'), - ); - expect(imageWidgetWithPicture, findsOneWidget); - }); - }); - testWidgets("Testing if image selection and removal works", (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.light)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - final imageAvatar = find.byKey( - const Key('AddRemoveImageButton'), - ); - expect(imageAvatar, findsOneWidget); - tester.tap(imageAvatar); - }); - }); - }); - group('Edit Profile Screen Widget Test in dark mode', () { - testWidgets("Testing if Edit Profile Screen shows up", (tester) async { - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester.pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final appBarText = find.byKey( - const Key('ProfileText'), - ); - expect(appBarText, findsOneWidget); - }); - const Key('profilepic'); - testWidgets( - "Testing if Edit Screen shows image when already exist in database", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - - userConfig.updateUser( - User( - firstName: 'Test', - lastName: 'Test', - email: 'test@test.com', - image: 'https://via.placeholder.com/150', - ), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final imageWidgetWithPicture = find.byKey( - const Key('profilepic'), - ); - expect(imageWidgetWithPicture, findsOneWidget); - }); - }); - testWidgets("Testing if modalSheet appears when changing profile picture", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - - userConfig.updateUser( - User( - firstName: 'Test', - lastName: 'Test', - email: 'test@test.com', - image: 'https://via.placeholder.com/150', - ), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - await tester.tap(find.byKey(const Key('AddRemoveImageButton'))); - await tester.pumpAndSettle(); - expect(find.text('Camera'), findsOneWidget); - expect(find.text('Gallery'), findsOneWidget); - expect(find.byIcon(Icons.camera_alt), findsOneWidget); - expect(find.byIcon(Icons.photo_library), findsOneWidget); - }); - }); - testWidgets("Testing if image selection from camera work fine", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - - userConfig.updateUser( - User( - firstName: 'Test', - lastName: 'Test', - email: 'test@test.com', - image: 'https://via.placeholder.com/150', - ), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - await tester.tap(find.byKey(const Key('AddRemoveImageButton'))); - await tester.pumpAndSettle(); - expect(find.text('Camera'), findsOneWidget); - expect(find.text('Gallery'), findsOneWidget); - expect(find.byIcon(Icons.camera_alt), findsOneWidget); - expect(find.byIcon(Icons.photo_library), findsOneWidget); - - await tester.ensureVisible(find.byIcon(Icons.camera_alt)); - await tester.tap(find.byIcon(Icons.camera_alt)); - }); - }); - testWidgets("Testing if image selection from gallery work fine", - (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - - userConfig.updateUser( - User( - firstName: 'Test', - lastName: 'Test', - email: 'test@test.com', - image: 'https://via.placeholder.com/150', - ), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - await tester.tap(find.byKey(const Key('AddRemoveImageButton'))); - await tester.pumpAndSettle(); - expect(find.text('Camera'), findsOneWidget); - expect(find.text('Gallery'), findsOneWidget); - expect(find.byIcon(Icons.camera_alt), findsOneWidget); - expect(find.byIcon(Icons.photo_library), findsOneWidget); - - await tester.ensureVisible(find.byIcon(Icons.photo_library)); - await tester.tap(find.byIcon(Icons.photo_library)); - }); - }); - testWidgets("Testing if image selection and removal works", (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final imageAvatar = find.byKey( - const Key('AddRemoveImageButton'), - ); - expect(imageAvatar, findsOneWidget); - tester.tap(imageAvatar); - }); - }); - testWidgets("Testing Update butoon", (tester) async { - await mockNetworkImages(() async { - userConfig.updateUser(User()); - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester - .pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('EditProfileScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - final updateButtonFinder = find.byKey(const Key('updatebtn')); - expect(updateButtonFinder, findsOneWidget); - await tester.tap(updateButtonFinder); - await tester.pumpAndSettle(); - }); - }); - }); - group('Testing image selection and removal in Edit Profile Screen', () { - setUp(() { - registerServices(); - //locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - testWidgets( - 'Testing image selection when user is selecting image from device', - (tester) async { - final notifyListenerCallback = MockCallbackFunction(); - final model = EditProfilePageViewModel() - ..addListener(notifyListenerCallback); - model.initialize(); - - // with camera true - final file = File('fakePath'); - when(multimediaPickerService.getPhotoFromGallery(camera: true)) - .thenAnswer((_) async { - return file; - }); - await model.selectImage(camera: true); - verify(multimediaPickerService.getPhotoFromGallery(camera: true)); - expect(model.imageFile, file); - verify(notifyListenerCallback()); - await tester.pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - expect(find.byKey(const Key('AddRemoveImageButton')), findsOneWidget); - await tester.tap(find.byKey(const Key('AddRemoveImageButton'))); - await tester.pumpAndSettle(); - await tester.tap(find.byIcon(Icons.camera_alt)); - await tester.pumpAndSettle(); - expect(model.imageFile, isNotNull); - }); - testWidgets('Testing if image removal work properly', (tester) async { - final notifyListenerCallback = MockCallbackFunction(); - final model = EditProfilePageViewModel() - ..addListener(notifyListenerCallback); - model.initialize(); - - // testing removeImage - model.removeImage(); - expect(model.imageFile, null); - verify(notifyListenerCallback()); - }); - - // Testing onPressed for firstName - testWidgets("Testing if firstName text field gets focus", (tester) async { - userConfig.updateUser( - User(firstName: 'Test', lastName: 'Test', email: 'test@test.com'), - ); - await tester.pumpWidget(createEditProfilePage(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('FirstNameTextField'))); - await tester.pumpAndSettle(); - - // Verify the focus - expect( - FocusScope.of(tester.element(find.byType(EditProfilePage))) - .focusedChild! - .hasPrimaryFocus, - true, - ); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/change_password_page_test.dart b/test/widget_tests/pre_auth_screens/change_password_page_test.dart deleted file mode 100644 index 7a6ad9f6b..000000000 --- a/test/widget_tests/pre_auth_screens/change_password_page_test.dart +++ /dev/null @@ -1,310 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/views/pre_auth_screens/change_password.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -import '../../helpers/test_locator.dart'; - -/// 'createChangePassScreen' is used to create the EditProfilePage widget in light mode. -/// -/// **params**: -/// * `themeMode`: Represents the theme mode of the widget. -/// -/// **returns**: -/// * `Widget`: Returns the ChangePass widget. -Widget createChangePassScreen({ThemeMode themeMode = ThemeMode.light}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: themeMode == ThemeMode.light - ? TalawaTheme.lightTheme - : TalawaTheme.darkTheme, - home: const ChangePass(key: Key('ChangePass')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - group('Change Password Screen Widget Test in light mode', () { - testWidgets("Testing if Change Password Screen shows up", (tester) async { - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.light)); - await tester.pumpAndSettle(); - final iconButton = find.byIcon(Icons.arrow_back); - - final screenScaffoldWidget = find.byKey( - const Key('ChangePassScreenScaffold'), - ); - expect(iconButton, findsOneWidget); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - testWidgets("Testing if custom rich text shows up", (tester) async { - //pushing recover screen - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey( - const Key('ChangePageText'), - ); - - //initializing the greeting text - final greeting = [ - { - 'text': - "${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("Hello")}, ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("User Name")} ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - { - 'text': - "${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("we've")} ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("got you covered")} ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - testWidgets("Testing the Password Input text form field", (tester) async { - //pushing change pass Screen - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - //initializing the pass input field widget Finder - final passInputFieldWidget = find.byKey(const Key('PassInputField')); - //initializing the confirm pass input field widget Finder - final passConfirmInputFieldWidget = - find.byKey(const Key('PassRepeatInputField')); - //initializing the text field suffix button widget Finder - final findChangePassButton = - find.byKey(const Key('ChangePasswordButton')); - //initializing the null pass Submission widget Finder - final nullPassSubmission = find.text('Password must not be left blank'); - //initializing the invalid password submission widget Finder - final invalidPassSubmission = find.text( - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - ); - //initializing the invalid password submission widget Finder - final misMatchPassSubmission = - find.text('Password does not match original'); - - //finding the pass input text field - expect(passInputFieldWidget, findsOneWidget); - //finding the confirm pass input text field - expect(passConfirmInputFieldWidget, findsOneWidget); - //finding the recover button - expect(findChangePassButton, findsOneWidget); - - //inputting a invalid pass in the field - await tester.enterText(passInputFieldWidget, 'nontext'); - //submitting the field with invalid input - await tester.ensureVisible(findChangePassButton); - await tester.tap(findChangePassButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidPassSubmission widget appears - expect(invalidPassSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(passInputFieldWidget, ''); - //submitting the field with null input - await tester.tap(findChangePassButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPassSubmission widget appears - expect(nullPassSubmission, findsOneWidget); - - //not matching confirm pass - await tester.enterText(passInputFieldWidget, 'Test@123'); - await tester.enterText(passConfirmInputFieldWidget, 'Test@12'); - //submitting the field with mismatch password input - await tester.tap(findChangePassButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPassSubmission widget appears - expect(misMatchPassSubmission, findsOneWidget); - }); - }); - group('Change Password Screen Widget Test in dark mode', () { - testWidgets("Testing if Change Password Screen shows up", (tester) async { - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - // finding scaffold is present - final screenScaffoldWidget = find.byKey( - const Key('ChangePassScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if custom rich text shows up", (tester) async { - //pushing recover screen - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey( - const Key('ChangePageText'), - ); - - //initializing the greeting text - final greeting = [ - { - 'text': - "${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("Hello")}, ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("User Name")} ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - { - 'text': - "${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("we've")} ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("got you covered")} ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - testWidgets("Testing the Password Input text form field", (tester) async { - //pushing change pass Screen - await tester - .pumpWidget(createChangePassScreen(themeMode: ThemeMode.dark)); - await tester.pumpAndSettle(); - - //initializing the pass input field widget Finder - final passInputFieldWidget = find.byKey(const Key('PassInputField')); - //initializing the confirm pass input field widget Finder - final passConfirmInputFieldWidget = - find.byKey(const Key('PassRepeatInputField')); - //initializing the text field suffix button widget Finder - final findRecoverButton = find.byKey(const Key('ChangePasswordButton')); - //initializing the null pass Submission widget Finder - final nullPassSubmission = find.text('Password must not be left blank'); - //initializing the invalid password submission widget Finder - final invalidPassSubmission = find.text( - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - ); - //initializing the invalid password submission widget Finder - final misMatchPassSubmission = - find.text('Password does not match original'); - - //finding the pass input text field - expect(passInputFieldWidget, findsOneWidget); - //finding the confirm pass input text field - expect(passConfirmInputFieldWidget, findsOneWidget); - //finding the recover button - expect(findRecoverButton, findsOneWidget); - - //inputting a invalid pass in the field - await tester.enterText(passInputFieldWidget, 'nontext'); - //submitting the field with invalid input - await tester.ensureVisible(findRecoverButton); - await tester.tap(findRecoverButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidPassSubmission widget appears - expect(invalidPassSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(passInputFieldWidget, ''); - //submitting the field with null input - await tester.tap(findRecoverButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPassSubmission widget appears - expect(nullPassSubmission, findsOneWidget); - - //not matching confirm pass - await tester.enterText(passInputFieldWidget, 'Test@123'); - await tester.enterText(passConfirmInputFieldWidget, 'Test@12'); - //submitting the field with mismatch password input - await tester.tap(findRecoverButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPassSubmission widget appears - expect(misMatchPassSubmission, findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/login_test.dart b/test/widget_tests/pre_auth_screens/login_test.dart deleted file mode 100644 index 75268cd74..000000000 --- a/test/widget_tests/pre_auth_screens/login_test.dart +++ /dev/null @@ -1,253 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -// import 'package:talawa/views/main_screen.dart'; -import 'package:talawa/views/pre_auth_screens/login.dart'; -import 'package:talawa/views/pre_auth_screens/recover.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createApp() { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: TextButton( - onPressed: () async { - await navigationService.pushScreen('/login'); - }, - child: const Text('ravidi'), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); -} - -Future showLoginScreen(WidgetTester tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - await tester.tap(find.textContaining('ravidi')); - await tester.pumpAndSettle(); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - group('Test for Login screen', () { - testWidgets('Check if Login screen shows up', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(Login), findsNothing); - - await tester.tap(find.textContaining('ravidi')); - await tester.pumpAndSettle(); - - expect(find.byType(Login), findsOneWidget); - }); - - testWidgets('Check if back button works', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(Login), findsNothing); - - await tester.tap(find.textContaining('ravidi')); - await tester.pumpAndSettle(); - - expect(find.byType(Login), findsOneWidget); - - await tester.tap( - find.descendant( - of: find.byType(AppBar), - matching: find.byType(IconButton), - ), - ); - await tester.pumpAndSettle(); - - expect(find.byType(Login), findsNothing); - }); - - testWidgets('Check if all widgets are present', (tester) async { - await showLoginScreen(tester); - - expect(find.byType(Scaffold), findsOneWidget); - expect(find.byType(AppBar), findsOneWidget); - expect(find.byType(SingleChildScrollView), findsOneWidget); - expect(find.byType(CustomRichText), findsOneWidget); - expect(find.byType(TextFormField), findsNWidgets(2)); - expect(find.byType(RaisedRoundedButton), findsOneWidget); - }); - - testWidgets('Check if all texts show up properly', (tester) async { - await showLoginScreen(tester); - - // expect(find.text("We're Glad you're Back "), findsOneWidget); - expect( - find.textContaining("Enter your registered Email"), - findsOneWidget, - ); - expect(find.textContaining("Enter your password"), findsOneWidget); - expect(find.textContaining("Forgot password"), findsOneWidget); - }); - - testWidgets("Testing the email Input text form field", (tester) async { - //pushing setUrlScreen - await showLoginScreen(tester); - - //initializing the email input field widget Finder - final emailInputFieldWidget = find.byKey(const Key('EmailInputField')); - //initializing the text field suffix button widget Finder - final findLoginButton = find.byKey(const Key('LoginButton')); - //initializing the nullEmailSubmission widget Finder - final nullEmailSubmission = find.text('Email must not be left blank'); - //initializing the invalidEmailSubmission widget Finder - final invalidEmailSubmission = - find.text('Please enter a valid Email Address'); - - //finding the email input text field - expect(emailInputFieldWidget, findsOneWidget); - //finding the login button - expect(findLoginButton, findsOneWidget); - - //inputting a non email text in the field - await tester.enterText(emailInputFieldWidget, 'non-url text'); - //submitting the field with non url input - await tester.ensureVisible(findLoginButton); - await tester.tap(findLoginButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidEmailSubmission widget appears - expect(invalidEmailSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(emailInputFieldWidget, ''); - //submitting the field with non url input - await tester.tap(findLoginButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullEmailSubmission widget appears - expect(nullEmailSubmission, findsOneWidget); - }); - - testWidgets("Testing the password Input text form field", (tester) async { - //pushing setUrlScreen - await showLoginScreen(tester); - - //initializing the password input field widget Finder - final passwordInputFieldWidget = - find.byKey(const Key('PasswordInputField')); - //initializing the pa Finder - final iconButton = find.byIcon(Icons.visibility_off); - //initializing the text field suffix button widget Finder - final findLoginButton = find.byKey(const Key('LoginButton')); - //initializing the nullPasswordSubmission widget Finder - final nullPasswordSubmission = - find.text('Password must not be left blank'); - //initializing the invalidPasswordSubmission widget Finder - final invalidPasswordSubmission = find.text( - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - ); - //initializing the spacePasswordSubmission widget Finder - final spacePasswordSubmission = - find.text('Password must not contain spaces'); - - //finding the password input text field - expect(passwordInputFieldWidget, findsOneWidget); - //finding the iconbutton - expect(iconButton, findsOneWidget); - //finding the login button - expect(findLoginButton, findsOneWidget); - - //inputting a invalid password text in the field - await tester.enterText(passwordInputFieldWidget, 'test'); - //submitting the field with invalid password input - await tester.ensureVisible(findLoginButton); - await tester.tap(findLoginButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidPasswordSubmission widget appears - expect(invalidPasswordSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(passwordInputFieldWidget, ''); - //submitting the field without input - await tester.tap(findLoginButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPasswordSubmission widget appears - expect(nullPasswordSubmission, findsOneWidget); - - //inputting a password with spaces in the field - await tester.enterText(passwordInputFieldWidget, 'testing spaces'); - //submitting the field with spaces input - await tester.tap(findLoginButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the spacePasswordSubmission widget appears - expect(spacePasswordSubmission, findsOneWidget); - - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - - // TODO: uncomment after implementing mock LoginViewModel - - // testWidgets('Check if Login button works', (tester) async { - // await showLoginScreen(tester); - - // await tester.enterText(find.byType(TextFormField).first, 'ravidi'); - // await tester.enterText(find.byType(TextFormField).last, 'shaikh'); - - // await tester.tap(find.textContaining('Login')); - // await tester.pumpAndSettle(); - - // expect(find.byType(MainScreen), findsNothing); - - // await tester.enterText(find.byType(TextFormField).first, 'ravidi@ravidi.ravidi'); - // await tester.enterText(find.byType(TextFormField).last, 'Shaikh@1234'); - - // await tester.tap(find.textContaining('Login')); - // await tester.pumpAndSettle(); - - // expect(find.byType(MainScreen), findsOneWidget); - // }); - - testWidgets('Check if login button works', (tester) async { - await showLoginScreen(tester); - - final loginButton = find.byKey(const Key('LoginButton')); - expect(loginButton, findsOneWidget); - - await tester.tap(loginButton); - await tester.pumpAndSettle(); - }); - testWidgets('Check if tip button works', (tester) async { - await showLoginScreen(tester); - - final tipButton = find.text('Tip'); - expect(tipButton, findsOneWidget); - - await tester.tap(tipButton); - await tester.pumpAndSettle(); - }); - - testWidgets('Check if Recover button works', (tester) async { - await showLoginScreen(tester); - - expect(find.byType(Recover), findsNothing); - - await tester.tap(find.textContaining('Forgot password')); - await tester.pumpAndSettle(); - - expect(find.byType(Recover), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/recover_page_test.dart b/test/widget_tests/pre_auth_screens/recover_page_test.dart deleted file mode 100644 index 7c3988a83..000000000 --- a/test/widget_tests/pre_auth_screens/recover_page_test.dart +++ /dev/null @@ -1,186 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/views/pre_auth_screens/recover.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createRecoverScreenLight({ThemeMode themeMode = ThemeMode.light}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.lightTheme, - home: const Recover(key: Key('Recover')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -Widget createRecoverScreenDark({ThemeMode themeMode = ThemeMode.dark}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.darkTheme, - home: const Recover(key: Key('Recover')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -void main() { - testSetupLocator(); - locator().test(); - locator().test(); - group('Select Language Screen Widget Test in light mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createRecoverScreenLight()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('RecoverScreenScaffold'), - ); - final iconButton = find.byIcon(Icons.arrow_back); - expect(screenScaffoldWidget, findsOneWidget); - expect(iconButton, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - }); - group('Select Language Screen Widget Test in dark mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createRecoverScreenDark()); - await tester.pumpAndSettle(); - // finding scaffold is present - final screenScaffoldWidget = find.byKey( - const Key('RecoverScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if custom rich text shows up", (tester) async { - //pushing recover screen - await tester.pumpWidget(createRecoverScreenDark()); - await tester.pumpAndSettle(); - - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey( - const Key('RecoverPageText'), - ); - - //initializing the greeting text - final greeting = [ - { - 'text': - "${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("Sit back relax, we'll")} ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': - '${AppLocalizations.of(navigationService.navigatorKey.currentContext!)!.translate("Recover")} ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - { - 'text': AppLocalizations.of( - navigationService.navigatorKey.currentContext!, - )! - .translate("your password"), - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - testWidgets("Testing the email Input text form field", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget(createRecoverScreenDark()); - await tester.pumpAndSettle(); - - //initializing the url input field widget Finder - final emailInputFieldWidget = find.byKey(const Key('EmailInputField')); - //initializing the text field suffix button widget Finder - final findRecoverButton = find.byKey(const Key('RecoverButton')); - //initializing the nullUrlSubmission widget Finder - final nullEmailSubmission = find.text('Email must not be left blank'); - //initializing the invalidUrlSubmission widget Finder - final invalidEmailSubmission = - find.text('Please enter a valid Email Address'); - - //finding the url input text field - expect(emailInputFieldWidget, findsOneWidget); - //finding the recover button - expect(findRecoverButton, findsOneWidget); - - //inputting a non email text in the field - await tester.enterText(emailInputFieldWidget, 'non-url text'); - //submitting the field with non url input - await tester.tap(findRecoverButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidUrlSubmission widget appears - expect(invalidEmailSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(emailInputFieldWidget, ''); - //submitting the field with non url input - await tester.tap(findRecoverButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullEmailSubmission widget appears - expect(nullEmailSubmission, findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/select_language_page_test.dart b/test/widget_tests/pre_auth_screens/select_language_page_test.dart deleted file mode 100644 index cafd870c4..000000000 --- a/test/widget_tests/pre_auth_screens/select_language_page_test.dart +++ /dev/null @@ -1,300 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; -import 'dart:math'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -// import 'package:path_provider/path_provider.dart' as path; -import 'package:talawa/constants/constants.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/views/pre_auth_screens/select_language.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createSelectLanguageScreenLight({ - ThemeMode themeMode = ThemeMode.light, -}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.lightTheme, - home: const SelectLanguage(key: Key('SelectLanguage')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -Widget createSelectLanguageScreenDark({ThemeMode themeMode = ThemeMode.dark}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - darkTheme: TalawaTheme.darkTheme, - home: const SelectLanguage(key: Key('SelectLanguage')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -Future main() async { - TestWidgetsFlutterBinding.ensureInitialized(); - //initializing Hive - const testMockStorage = 'test/fixtures/core'; - Hive - ..init(testMockStorage) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - //opening Hive Boxes - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - // await Hive.openBox('url'); - - testSetupLocator(); - locator().test(); - locator().test(); - - group('Select Language Screen Widget Test in light mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('SelectLanguageScreenScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if screen title shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('Select Language')); - expect(findAppNameWidget, findsOneWidget); - - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - TalawaTheme.lightTheme.textTheme.headlineSmall!.color, - ); - - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontFamily, - TalawaTheme.lightTheme.textTheme.headlineSmall!.fontFamily, - ); - - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - TalawaTheme.lightTheme.textTheme.headlineSmall!.fontSize, - ); - }); - //This will be added once we implement the search box - // testWidgets("Testing if search box shows up", (tester) async { - // await tester.pumpWidget(createSelectLanguageScreenLight()); - // await tester.pumpAndSettle(); - // final findAppNameWidget = find.byKey(const Key('SearchField')); - // expect(findAppNameWidget, findsOneWidget); - // }); - testWidgets("Testing if languages list shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('LanguagesList')); - expect(findAppNameWidget, findsOneWidget); - }); - testWidgets("Testing if all languages are shown", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('LanguageItem')); - expect(findAppNameWidget, findsNWidgets(languages.length)); - }); - testWidgets("Testing if only one language is selected", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('Selected')); - expect(findAppNameWidget, findsOneWidget); - }); - testWidgets("Testing unselected language items", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('NotSelected')); - expect(findAppNameWidget, findsNWidgets(languages.length - 1)); - }); - testWidgets("Testing to change language items", (tester) async { - final int randomNumber = Random().nextInt(languages.length); - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - - final findAppNameWidget = find.byKey(Key('LanguageItem$randomNumber')); - await tester.tap(findAppNameWidget); - await tester.pumpAndSettle(); - - expect( - (tester.firstWidget(findAppNameWidget) as Container).decoration, - BoxDecoration(color: const Color(0xFFC4C4C4).withOpacity(0.15)), - ); - }); - testWidgets("Testing to navigate to MainScreen", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - - final findAppNameWidget = find.byKey(const Key('NavigateToMainScreen')); - - await tester.tap(findAppNameWidget); - await tester.pumpAndSettle(const Duration(seconds: 3)); - - expect(findAppNameWidget, findsNothing); - }); - testWidgets("Testing to select and navigate button appears", - (tester) async { - await tester.pumpWidget(createSelectLanguageScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('SelectLangTextButton')); - expect(findAppNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - 18, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - const Color(0xFF008A37), - ); - }); - }); - group('Select Language Screen Widget Test in dark mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = - find.byKey(const Key('SelectLanguageScreenScaffold')); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .darkTheme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if screen title shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.text('Select Language'); - expect(findAppNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - TalawaTheme.darkTheme.textTheme.headlineSmall!.color, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontFamily, - TalawaTheme.darkTheme.textTheme.headlineSmall!.fontFamily, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - TalawaTheme.darkTheme.textTheme.headlineSmall!.fontSize, - ); - }); - // This is not needed now will be added when required - // testWidgets("Testing if search box shows up", (tester) async { - // await tester.pumpWidget(createSelectLanguageScreenDark()); - // await tester.pumpAndSettle(); - // final findAppNameWidget = find.byKey(const Key('SearchField')); - // expect(findAppNameWidget, findsOneWidget); - // }); - testWidgets("Testing if languages list shows up", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('LanguagesList')); - expect(findAppNameWidget, findsOneWidget); - }); - testWidgets("Testing if all languages are shown", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('LanguageItem')); - expect(findAppNameWidget, findsNWidgets(languages.length)); - }); - testWidgets("Testing if only one language is selected", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('Selected')); - expect(findAppNameWidget, findsOneWidget); - }); - testWidgets("Testing unselected language items", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('NotSelected')); - expect(findAppNameWidget, findsNWidgets(languages.length - 1)); - }); - testWidgets("Testing to change language items", (tester) async { - final int randomNumber = Random().nextInt(languages.length); - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - - final findAppNameWidget = find.byKey(Key('LanguageItem$randomNumber')); - await tester.tap(findAppNameWidget); - await tester.pumpAndSettle(); - - expect( - (tester.firstWidget(findAppNameWidget) as Container).decoration, - BoxDecoration(color: const Color(0xFFC4C4C4).withOpacity(0.15)), - ); - }); - testWidgets("Testing to select and navigate button appears", - (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('SelectLangTextButton')); - expect(findAppNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - 18, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - const Color(0xFF008A37), - ); - }); - testWidgets("Testing to navigate to url page", (tester) async { - await tester.pumpWidget(createSelectLanguageScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.byKey(const Key('NavigateToMainScreen')); - await tester.tap(findAppNameWidget); - await tester.pumpAndSettle(const Duration(seconds: 3)); - expect(findAppNameWidget, findsNothing); - }); - }); - File('test/fixtures/core/currentorg.hive').delete(); - File('test/fixtures/core/currentorg.lock').delete(); - File('test/fixtures/core/currentuser.hive').delete(); - File('test/fixtures/core/currentuser.lock').delete(); -} diff --git a/test/widget_tests/pre_auth_screens/select_organization_test.dart b/test/widget_tests/pre_auth_screens/select_organization_test.dart deleted file mode 100644 index f42b3ae69..000000000 --- a/test/widget_tests/pre_auth_screens/select_organization_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/utils/queries.dart'; -import 'package:talawa/views/pre_auth_screens/select_organization.dart'; - -import '../../helpers/test_helpers.dart'; - -void main() { - const Key selectOrgKey = Key("selectOrgKey"); - const String orgID = "-1"; - Widget createSelectOrgPage({String? customorgID}) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: SelectOrganization( - key: selectOrgKey, - selectedOrgId: customorgID ?? orgID, - ), - ); - } - - SizeConfig().test(); - - group("Select Organization Test", () { - setUp(() { - registerViewModels(); - registerServices(); - locator.registerFactory(() => Queries()); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - locator.unregister(); - }); - - testWidgets("Test if SelectOrganization Page is displayed ", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createSelectOrgPage()); - await tester.pump(); - final selectOrgFinder = find.byKey(selectOrgKey); - expect(selectOrgFinder, findsOneWidget); - }); - }); - - testWidgets("Test if back-arrow is present", (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createSelectOrgPage()); - await tester.pump(); - - final orgFinder = find.byKey(selectOrgKey); - final appBarFinder = - find.descendant(of: orgFinder, matching: find.byType(AppBar)); - expect(appBarFinder, findsOneWidget); - - // final appBarWidget = tester.firstWidget(appBarFinder) as AppBar; - - // expect( - // appBarWidget.leading, - // isA().having( - // (icon) => icon.icon, - // "icon", - // Icons.arrow_back, - // ), - // ); - }); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/set_url_page_test.dart b/test/widget_tests/pre_auth_screens/set_url_page_test.dart deleted file mode 100644 index fc9b6d16f..000000000 --- a/test/widget_tests/pre_auth_screens/set_url_page_test.dart +++ /dev/null @@ -1,843 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:provider/provider.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/graphql_config.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/pre_auth_screens/set_url.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -import '../../helpers/test_helpers.dart'; - -/// Returns the SetUrlScreen widget. -/// -/// **params**: -/// * `themeMode`: ThemeMode of the app. -/// * `theme`: ThemeData of the app. -/// -/// **returns**: -/// * `Widget`: SetUrlScreen widget. -Widget createSetUrlScreen({ - ThemeMode themeMode = ThemeMode.light, - ThemeData? theme, -}) => - MultiProvider( - providers: [ - ChangeNotifierProvider( - create: (_) => AppLanguage(isTest: true), - ), - ], - child: MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: theme ?? TalawaTheme.lightTheme, - darkTheme: TalawaTheme.darkTheme, - home: const SetUrl( - key: Key('SetUrl'), - uri: 'null', - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ), - ); - -Future main() async { - TestWidgetsFlutterBinding.ensureInitialized(); - const testMockStorage = 'test/fixtures/core'; - Hive - ..init(testMockStorage) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - //opening Hive Boxes - // await Hive.openBox('currentUser'); - // await Hive.openBox('currentOrg'); - await Hive.openBox('url'); - //setting up MVVM - setupLocator(); - //initializing test functions - locator().test(); - locator().test(); - setUp(() async { - registerServices(); - }); - - //Testing in light mode/normal mode - group('Select Language Screen Widget Test in light mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the screenScaffold Finder - final screenScaffoldWidget = - find.byKey(const Key('SetUrlScreenScaffold')); - - //finding the scaffold - expect(screenScaffoldWidget, findsOneWidget); - //testing scaffold color - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - - testWidgets("Testing if icon button shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the logo Finder - final iconButton = find.byIcon(Icons.qr_code_scanner); - - //finding the logo - expect(iconButton, findsOneWidget); - //testing logo size - expect( - (tester.firstWidget(iconButton) as Icon).semanticLabel, - 'Join Organisation with QR', - ); - - expect((tester.firstWidget(iconButton) as Icon).size, 30); - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - testWidgets("Testing if app logo shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the logo Finder - final logoWidget = find.byKey(const Key('LogoPainter')); - - //finding the logo - expect(logoWidget, findsOneWidget); - //testing logo size - expect( - (tester.firstWidget(logoWidget) as CustomPaint).size, - Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - ); - }); - - testWidgets("Testing if custom rich text shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey(const Key('UrlPageText')); - //initializing the greeting text - final greeting = [ - { - 'text': 'Join ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'and ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Collaborate ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'with your ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Organizations', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall! - .copyWith(fontSize: 24, color: const Color(0xFF4285F4)), - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - testWidgets("Testing the Url Input text form field", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the url input field widget Finder - final urlInputFieldWidget = find.byKey(const Key('UrlInputField')); - //initializing the text field suffix button widget Finder - final findVerifyButton = find.byKey(const Key('VerifyButton')); - //initializing the nullUrlSubmission widget Finder - final nullErrorUrlSubmission = find.text('Please verify URL first'); - //initializing the invalidUrlSubmission widget Finder - final invalidUrlSubmission = find.text('Enter a valid URL'); - - //finding the url input text field - expect(urlInputFieldWidget, findsOneWidget); - //finding the verify suffix button in text form field - expect(findVerifyButton, findsOneWidget); - - /*//submitting the field with null url - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullErrorUrlSubmission widget appears - expect(nullErrorUrlSubmission, findsOneWidget);*/ - - //inputting a non url text in the field - await tester.enterText(urlInputFieldWidget, 'non-url text'); - //submitting the field with non url input - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidUrlSubmission widget appears - expect(invalidUrlSubmission, findsOneWidget); - - //inputting an existing url text in the field - await tester.enterText( - urlInputFieldWidget, - 'https:///graphql', - ); - //submitting the field with a existing url - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing nullErrorUrlSubmission is not found - expect(nullErrorUrlSubmission, findsNothing); - //testing invalidUrlSubmission is not found - expect(invalidUrlSubmission, findsNothing); - }); - testWidgets("Testing change language button", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the change language widget Finder - final changeLanguageWidget = find.byKey(const Key('ChangeLanguage')); - //initializing the screen scaffold - final screenScaffoldWidget = - find.byKey(const Key('SelectLanguageScreenScaffold')); - //initializing the center offset of changeLanguageWidget - final offset = tester.getCenter(changeLanguageWidget); - //finding the change language widget appears - expect(changeLanguageWidget, findsOneWidget); - - //taping the change language button - await tester.tapAt(offset); - await tester.pumpAndSettle(); - //testing that the scaffold is no more visible - expect(screenScaffoldWidget, findsNothing); - await tester.tap(changeLanguageWidget, warnIfMissed: false); - await tester.pumpAndSettle(); - }); - testWidgets("Testing if login button works", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the login button Finder - final loginButtonWidget = find.byKey(const Key('LoginButton')); - - //finding the login button - expect(loginButtonWidget, findsOneWidget); - //testing the login button widget - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .backgroundColor, - TalawaTheme.lightTheme.colorScheme.tertiary, - ); - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .textColor, - TalawaTheme - .lightTheme.inputDecorationTheme.focusedBorder!.borderSide.color, - ); - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .buttonLabel, - 'Login', - ); - await tester.ensureVisible(loginButtonWidget); - await tester.tap(loginButtonWidget); - await tester.pumpAndSettle(); - }); - - testWidgets("Check navigation to Login page when Login button is pressed.", - (tester) async { - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pump(); - expect(find.byKey(const Key('SetUrlScreenScaffold')), findsOneWidget); - - await tester.enterText( - find.byKey(const Key('UrlInputField')), - 'https:///graphql', - ); - - final finder = find.byKey(const Key('LoginButton')); - await tester.ensureVisible(finder); - await tester.tap(finder); - await tester.pumpAndSettle(); - expect(find.byKey(const Key('UrlPageText')), findsOneWidget); - }); - testWidgets("Testing if signup button works", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the signup button Finder - final signupButtonWidget = find.byKey(const Key('SignUpButton')); - - //finding the signup button - expect(signupButtonWidget, findsOneWidget); - //testing the signup button widget - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .backgroundColor, - TalawaTheme - .lightTheme.inputDecorationTheme.focusedBorder!.borderSide.color, - ); - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .textColor, - TalawaTheme.lightTheme.colorScheme.secondaryContainer, - ); - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .buttonLabel, - 'Sign Up', - ); - await tester.tap(signupButtonWidget, warnIfMissed: false); - await tester.pumpAndSettle(); - }); - testWidgets( - "Testing onFieldSubmitted in TextFormField by simulating keyboard hits", - (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - final formFinder = find.ancestor( - of: find.byKey(const Key('UrlInputField')), - matching: find.byType(Form), - ); - final formWidget = tester.firstWidget(formFinder) as Form; - (formWidget.key! as GlobalKey).currentState!.save(); - - final textFinder = find.byKey(const Key('UrlInputField')); - await tester.tap(textFinder); - await tester.pump(); - await tester.showKeyboard(textFinder); - await tester.testTextInput.receiveAction(TextInputAction.done); - }); - testWidgets("Testing onTap in sign up button", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - final btnFinder = find.byKey(const Key('SignUpButton')); - - await tester.dragUntilVisible( - btnFinder.first, - find.byType(SingleChildScrollView).first, - const Offset(100, 0), - ); - await tester.tap(btnFinder.first); - await tester.pump(); - }); - testWidgets("Testing onTap in Change Language Gesture Detector", - (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - final gestureDetectorFinder = find.byKey(const Key('ChangeLanguage')); - - await tester.dragUntilVisible( - gestureDetectorFinder.first, - find.byType(SingleChildScrollView).first, - const Offset(100, 0), - ); - - final GlobalKey navigator = GlobalKey(); - - when(navigationService.navigatorKey).thenAnswer((_) => navigator); - when(navigationService.pop()).thenAnswer((_) async => 1); - - await tester.tap(gestureDetectorFinder.first); - await tester.pump(); - - verify(navigationService.pop()); - }); - }); - - //Testing in dark mode - group('Select Language Screen Widget Test in dark mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the screenScaffold Finder - final screenScaffoldWidget = - find.byKey(const Key('SetUrlScreenScaffold')); - - //finding the scaffold - expect(screenScaffoldWidget, findsOneWidget); - //testing scaffold color - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .darkTheme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - - testWidgets("Testing if icon button shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the logo Finder - final iconButton = find.byIcon(Icons.qr_code_scanner); - - //finding the logo - expect(iconButton, findsOneWidget); - //testing logo size - expect( - (tester.firstWidget(iconButton) as Icon).semanticLabel, - 'Join Organisation with QR', - ); - - expect((tester.firstWidget(iconButton) as Icon).size, 30); - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - testWidgets("Check if QR button works", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final iconButton = find.byIcon(Icons.qr_code_scanner); - - // tapping the qr button - await tester.tap(iconButton); - await tester.pumpAndSettle(); - - expect(find.byType(ClipRRect), findsOneWidget); - expect(find.byType(QRView), findsOneWidget); - }); - testWidgets("Testing if app logo shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the logo Finder - final logoWidget = find.byKey(const Key('LogoPainter')); - - //finding the logo - expect(logoWidget, findsOneWidget); - //testing logo size - expect( - (tester.firstWidget(logoWidget) as CustomPaint).size, - Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - ); - }); - testWidgets("Testing if custom rich text shows up", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey(const Key('UrlPageText')); - //initializing the greeting text - final greeting = [ - { - 'text': 'Join ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'and ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Collaborate ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24, fontWeight: FontWeight.w700), - }, - { - 'text': 'with your ', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': 'Organizations', - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall! - .copyWith(fontSize: 24, color: const Color(0xFF4285F4)), - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - testWidgets("Testing the Url Input text form field", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the url input field widget Finder - final urlInputFieldWidget = find.byKey(const Key('UrlInputField')); - //initializing the text field suffix button widget Finder - final findVerifyButton = find.byKey(const Key('VerifyButton')); - //initializing the nullUrlSubmission widget Finder - final nullErrorUrlSubmission = find.text('Please verify URL first'); - //initializing the invalidUrlSubmission widget Finder - final invalidUrlSubmission = find.text('Enter a valid URL'); - - //finding the url input text field - expect(urlInputFieldWidget, findsOneWidget); - //finding the verify suffix button in text form field - expect(findVerifyButton, findsOneWidget); - - /* //submitting the field with null url - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(); - //testing the nullErrorUrlSubmission widget appears - expect(nullErrorUrlSubmission, findsOneWidget);*/ - - //inputting a non url text in the field - await tester.enterText(urlInputFieldWidget, 'non-url text'); - //submitting the field with non url input - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(); - //testing the invalidUrlSubmission widget appears - expect(invalidUrlSubmission, findsOneWidget); - - //inputting an existing url text in the field - await tester.enterText( - urlInputFieldWidget, - 'https:///graphql', - ); - //submitting the field with a existing url - await tester.tap(findVerifyButton); - await tester.pumpAndSettle(); - //testing nullErrorUrlSubmission is not found - expect(nullErrorUrlSubmission, findsNothing); - //testing invalidUrlSubmission is not found - expect(invalidUrlSubmission, findsNothing); - }); - testWidgets("Testing change language button", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the change language widget Finder - final changeLanguageWidget = find.byKey(const Key('ChangeLanguage')); - //initializing the screen scaffold - final screenScaffoldWidget = - find.byKey(const Key('SelectLanguageScreenScaffold')); - //initializing the center offset of changeLanguageWidget - final offset = tester.getCenter(changeLanguageWidget); - //finding the change language widget appears - expect(changeLanguageWidget, findsOneWidget); - - //taping the change language button - await tester.tapAt(offset); - await tester.pumpAndSettle(); - //testing that the scaffold is no more visible - expect(screenScaffoldWidget, findsNothing); - await tester.tap(changeLanguageWidget, warnIfMissed: false); - await tester.pumpAndSettle(); - }); - testWidgets("Testing if login button works", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the login button Finder - final loginButtonWidget = find.byKey(const Key('LoginButton')); - - //finding the login button - expect(loginButtonWidget, findsOneWidget); - //testing the login button widget - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .backgroundColor, - TalawaTheme.darkTheme.colorScheme.tertiary, - ); - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .textColor, - TalawaTheme - .darkTheme.inputDecorationTheme.focusedBorder!.borderSide.color, - ); - expect( - (tester.firstWidget(loginButtonWidget) as RaisedRoundedButton) - .buttonLabel, - 'Login', - ); - - await tester.ensureVisible(loginButtonWidget); - await tester.tap(loginButtonWidget); - await tester.pumpAndSettle(); - }); - testWidgets("Testing if signup button works", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - //initializing the signup button Finder - final signupButtonWidget = find.byKey(const Key('SignUpButton')); - - //finding the signup button - expect(signupButtonWidget, findsOneWidget); - //testing the signup button widget - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .backgroundColor, - TalawaTheme - .darkTheme.inputDecorationTheme.focusedBorder!.borderSide.color, - ); - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .textColor, - TalawaTheme.darkTheme.colorScheme.secondaryContainer, - ); - expect( - (tester.firstWidget(signupButtonWidget) as RaisedRoundedButton) - .buttonLabel, - 'Sign Up', - ); - await tester.tap(signupButtonWidget, warnIfMissed: false); - await tester.pumpAndSettle(); - }); - testWidgets( - "Testing onFieldSubmitted in TextFormField by simulating keyboard hits", - (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final formFinder = find.ancestor( - of: find.byKey(const Key('UrlInputField')), - matching: find.byType(Form), - ); - final formWidget = tester.firstWidget(formFinder) as Form; - (formWidget.key! as GlobalKey).currentState!.save(); - - final textFinder = find.byKey(const Key('UrlInputField')); - await tester.tap(textFinder); - await tester.pump(); - await tester.showKeyboard(textFinder); - await tester.testTextInput.receiveAction(TextInputAction.done); - }); - testWidgets("Testing onTap in sign up button", (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final btnFinder = find.byKey(const Key('SignUpButton')); - - await tester.dragUntilVisible( - btnFinder.first, - find.byType(SingleChildScrollView).first, - const Offset(100, 0), - ); - await tester.tap(btnFinder.first); - await tester.pump(); - }); - testWidgets("Testing onTap in Change Language Gesture Detector", - (tester) async { - //pushing setUrlScreen - await tester.pumpWidget( - createSetUrlScreen( - themeMode: ThemeMode.dark, - theme: TalawaTheme.darkTheme, - ), - ); - await tester.pumpAndSettle(); - - final gestureDetectorFinder = find.byKey(const Key('ChangeLanguage')); - - await tester.dragUntilVisible( - gestureDetectorFinder.first, - find.byType(SingleChildScrollView).first, - const Offset(100, 0), - ); - - final GlobalKey navigator = GlobalKey(); - - when(navigationService.navigatorKey).thenAnswer((_) => navigator); - when(navigationService.pop()).thenAnswer((_) async => 1); - - await tester.tap(gestureDetectorFinder.first); - await tester.pump(); - - verify(navigationService.pop()); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/signup_details_test.dart b/test/widget_tests/pre_auth_screens/signup_details_test.dart deleted file mode 100644 index 032b4af28..000000000 --- a/test/widget_tests/pre_auth_screens/signup_details_test.dart +++ /dev/null @@ -1,278 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/pre_auth_screens/signup_details.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createApp() { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: TextButton( - onPressed: () async { - final OrgInfo org = OrgInfo( - id: '2', - name: 'test org', - userRegistrationRequired: false, - creatorInfo: User(firstName: 'test', lastName: 'test'), - ); - - await navigationService.pushScreen('/signupDetails', arguments: org); - }, - child: const Text('Ayush'), - ), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); -} - -Future showSignUpScreen(WidgetTester tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - await tester.tap(find.textContaining('Ayush')); - await tester.pumpAndSettle(); -} - -void main() { - SizeConfig().test(); - - testSetupLocator(); - - group('Test For SignUp Screen', () { - testWidgets('Check if SignUp screen shows up', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(SignUpDetails), findsNothing); - - await tester.tap(find.textContaining('Ayush')); - await tester.pumpAndSettle(); - - expect(find.byType(SignUpDetails), findsOneWidget); - }); - testWidgets('Check if arrow back works', (tester) async { - await tester.pumpWidget(createApp()); - await tester.pump(); - - expect(find.byType(SignUpDetails), findsNothing); - - await tester.tap(find.textContaining('Ayush')); - await tester.pumpAndSettle(); - - expect(find.byType(SignUpDetails), findsOneWidget); - - final finder = find.byIcon(Icons.arrow_back); - - await tester.tap(finder); - await tester.pump(); - - expect(find.text('Ayush'), findsOneWidget); - }); - - testWidgets("Testing if input field and signup button appear", - (tester) async { - await showSignUpScreen(tester); - - final firstNameInputFieldWidget = - find.byKey(const Key('FirstNameInputField')); - - final findSignUpButton = find.text('Next'); - expect(firstNameInputFieldWidget, findsOneWidget); - - expect(findSignUpButton, findsOneWidget); - }); -//.................................................................... - testWidgets('Testing validator for first name input form invalid', - (tester) async { - await showSignUpScreen(tester); - - final invalidFirstNameSubmission = find.text('Invalid Firstname'); - - final firstNameInputFieldWidget = - find.byKey(const Key('FirstNameInputField')); - - final findSignUpButton = find.text('Next'); - - await tester.enterText(firstNameInputFieldWidget, '<>'); - - await tester.dragUntilVisible( - findSignUpButton, - findSignUpButton, - const Offset(0, 50), - ); - - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 1000)); - - expect(invalidFirstNameSubmission, findsOneWidget); - }); - testWidgets('Testing validator for first name input form null', - (tester) async { - await showSignUpScreen(tester); - - final nullSubmission = find.text('Firstname must not be left blank.'); - - final firstNameInputFieldWidget = - find.byKey(const Key('FirstNameInputField')); - - final findSignUpButton = find.text('Next'); - - await tester.enterText(firstNameInputFieldWidget, ''); - - await tester.dragUntilVisible( - findSignUpButton, - findSignUpButton, - const Offset(0, 50), - ); - - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 1000)); - - expect(nullSubmission, findsOneWidget); - }); -//........................................................................... - - testWidgets('Testing validator for last name input form invalid', - (tester) async { - await showSignUpScreen(tester); - - final invalidLastNameSubmission = find.text('Invalid Lastname'); - - final lastNameInputFieldWidget = - find.byKey(const Key('LastNameInputField')); - - final findSignUpButton = find.text('Next'); - - await tester.enterText(lastNameInputFieldWidget, '<>'); - - await tester.dragUntilVisible( - findSignUpButton, - findSignUpButton, - const Offset(0, 50), - ); - - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 1000)); - - expect(invalidLastNameSubmission, findsOneWidget); - }); - testWidgets('Testing validator for last name input form null', - (tester) async { - await showSignUpScreen(tester); - - final nullSubmission = find.text('Lastname must not be left blank.'); - - final lastNameInputFieldWidget = - find.byKey(const Key('LastNameInputField')); - - final findSignUpButton = find.text('Next'); - - await tester.enterText(lastNameInputFieldWidget, ''); - - await tester.dragUntilVisible( - findSignUpButton, - findSignUpButton, - const Offset(0, 50), - ); - - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 1000)); - - expect(nullSubmission, findsOneWidget); - }); - }); - //...................................................................................... - testWidgets("Testing the password Input text form field", (tester) async { - //pushing setUrlScreen - await showSignUpScreen(tester); - - //initializing the password input field widget Finder - final passwordInputFieldWidget = find.byKey(const Key('signuppassword')); - //initializing the pa Finder - final iconButton = find.byIcon(Icons.visibility_off); - //initializing the text field suffix button widget Finder - final findSignUpButton = find.text('Next'); - //initializing the nullPasswordSubmission widget Finder - final nullPasswordSubmission = find.text('Password must not be left blank'); - //initializing the invalidPasswordSubmission widget Finder - final invalidPasswordSubmission = find.text( - 'Your password must be at least 8 characters long, contain at least one numeric, one uppercase and one lowercase letters and one special character (@,#,\$,etc.)', - ); - //initializing the spacePasswordSubmission widget Finder - final spacePasswordSubmission = - find.text('Password must not contain spaces'); - - await tester.dragUntilVisible( - findSignUpButton, - findSignUpButton, - const Offset(0, 50), - ); - //finding the password input text field - expect(passwordInputFieldWidget, findsOneWidget); - //finding the iconbutton - expect(iconButton, findsOneWidget); - //finding the login button - expect(findSignUpButton, findsOneWidget); - - //inputting a invalid password text in the field - await tester.enterText(passwordInputFieldWidget, 'test'); - //submitting the field with invalid password input - await tester.ensureVisible(findSignUpButton); - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the invalidPasswordSubmission widget appears - expect(invalidPasswordSubmission, findsOneWidget); - - //without inputting text in the field - await tester.enterText(passwordInputFieldWidget, ''); - //submitting the field without input - await tester.ensureVisible(findSignUpButton); - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the nullPasswordSubmission widget appears - expect(nullPasswordSubmission, findsOneWidget); - - //inputting a password with spaces in the field - await tester.enterText(passwordInputFieldWidget, 'testing spaces'); - //submitting the field with spaces input - await tester.ensureVisible(findSignUpButton); - await tester.tap(findSignUpButton); - await tester.pumpAndSettle(const Duration(milliseconds: 500)); - //testing the spacePasswordSubmission widget appears - expect(spacePasswordSubmission, findsOneWidget); - - await tester.tap(iconButton); - await tester.pumpAndSettle(); - }); - - testWidgets( - "Testing onFieldSubmitted in password TextFormField by simulating keyboard hits", - (tester) async { - await showSignUpScreen(tester); - // final formFinder = find.ancestor( - // of: find.byKey(const Key('signuppassword')), - // matching: find.byType(Form)); - // final formWidget = tester.firstWidget(formFinder) as Form; - // (formWidget.key! as GlobalKey).currentState!.save(); - - final textFinder = find.byKey(const Key('signuppassword')); - await tester.tap(textFinder); - await tester.pump(); - await tester.showKeyboard(textFinder); - await tester.testTextInput.receiveAction(TextInputAction.next); - }); -} diff --git a/test/widget_tests/pre_auth_screens/signup_progress_indicator_test.dart b/test/widget_tests/pre_auth_screens/signup_progress_indicator_test.dart deleted file mode 100644 index 3dab9721d..000000000 --- a/test/widget_tests/pre_auth_screens/signup_progress_indicator_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/signup_progress_indicator.dart'; -import 'package:timelines/timelines.dart'; - -Widget createSignupProgressIndicator() { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: SignupProgressIndicator( - key: const Key('pgIndicator'), - currentPageIndex: 1, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - group('Test for SignupProgressIndicator', () { - testWidgets('Check if SignupProgressIndicator widget shows up', - (tester) async { - await tester.pumpWidget(createSignupProgressIndicator()); - await tester.pump(); - - expect(find.byType(Timeline), findsOneWidget); - expect(find.byType(DotIndicator), findsNWidgets(3)); - }); - - testWidgets('Check dotindicator color', (tester) async { - await tester.pumpWidget(createSignupProgressIndicator()); - await tester.pump(); - - final dotIndicatorFinder = find.byType(DotIndicator); - final dotIndicator = tester.widgetList(dotIndicatorFinder); - - expect( - (dotIndicator.elementAt(0) as DotIndicator).color, - const Color(0xFF008A37), - ); - expect( - (dotIndicator.elementAt(1) as DotIndicator).color, - const Color(0xFF008A37), - ); - expect( - (dotIndicator.elementAt(2) as DotIndicator).color, - const Color(0xFF737373), - ); - }); - testWidgets('Check dotindicator icon', (tester) async { - await tester.pumpWidget(createSignupProgressIndicator()); - await tester.pump(); - - final dotIndicatorFinder = find.byType(DotIndicator); - final dotIndicator = tester.widgetList(dotIndicatorFinder); - - expect( - (dotIndicator.elementAt(0) as DotIndicator).child, - isA(), - ); - }); - }); -} diff --git a/test/widget_tests/pre_auth_screens/splash_screen_test.dart b/test/widget_tests/pre_auth_screens/splash_screen_test.dart deleted file mode 100644 index 855d49189..000000000 --- a/test/widget_tests/pre_auth_screens/splash_screen_test.dart +++ /dev/null @@ -1,321 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// ignore_for_file: unused_import - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/splash_screen.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:uni_links/uni_links.dart'; - -Widget createSplashScreenLight({ThemeMode themeMode = ThemeMode.light}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.lightTheme, - home: const SplashScreen( - key: Key('SplashScreen'), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -Widget createSplashScreenDark({ThemeMode themeMode = ThemeMode.dark}) => - BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - darkTheme: TalawaTheme.darkTheme, - home: const SplashScreen( - key: Key('SplashScreen'), - ), - navigatorKey: navigationService.navigatorKey, - onGenerateRoute: router.generateRoute, - ); - }, - ); - -Future main() async { - setupLocator(); - graphqlConfig.test(); - - group('Splash Screen Widget Test in light mode', () { - testWidgets("Testing if Splash Screen shows up", (tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = - find.byKey(const Key('SplashScreenScaffold')); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if app logo shows up", (tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - final logoWidget = find.byKey(const Key('LogoPainter')); - expect(logoWidget, findsOneWidget); - expect( - (tester.firstWidget(logoWidget) as CustomPaint).size, - Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - ); - }); - testWidgets("Testing if app name shows up", (tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.text('TALAWA'); - expect(findAppNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - TalawaTheme.lightTheme.textTheme.headlineMedium!.color, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontFamily, - TalawaTheme.lightTheme.textTheme.headlineMedium!.fontFamily, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - TalawaTheme.lightTheme.textTheme.headlineMedium!.fontSize, - ); - }); - testWidgets("Testing if provider text shows up", (tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - final findProviderTextWidget = find.text('from'); - expect(findProviderTextWidget, findsOneWidget); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.color, - TalawaTheme.lightTheme.textTheme.bodySmall!.color, - ); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.fontFamily, - TalawaTheme.lightTheme.textTheme.bodySmall!.fontFamily, - ); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.fontSize, - TalawaTheme.lightTheme.textTheme.bodySmall!.fontSize, - ); - }); - testWidgets("Testing if provider name shows up", (tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - final findProviderNameWidget = find.text('PALISADOES'); - expect(findProviderNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findProviderNameWidget) as Text).style!.color, - TalawaTheme.lightTheme.textTheme.titleSmall!.color, - ); - expect( - (tester.firstWidget(findProviderNameWidget) as Text).style!.fontFamily, - TalawaTheme.lightTheme.textTheme.titleSmall!.fontFamily, - ); - }); - }); - group('Splash Screen Widget Test in dark mode', () { - testWidgets("Testing if Splash Screen shows up", (tester) async { - await tester.pumpWidget(createSplashScreenDark()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = - find.byKey(const Key('SplashScreenScaffold')); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .darkTheme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - testWidgets("Testing if app logo shows up", (tester) async { - await tester.pumpWidget(createSplashScreenDark()); - await tester.pumpAndSettle(); - final logoWidget = find.byKey(const Key('LogoPainter')); - expect(logoWidget, findsOneWidget); - expect( - (tester.firstWidget(logoWidget) as CustomPaint).size, - Size( - SizeConfig.screenWidth! * 0.6, - SizeConfig.screenWidth! * 0.6, - ), - ); - }); - testWidgets("Testing if app name shows up", (tester) async { - await tester.pumpWidget(createSplashScreenDark()); - await tester.pumpAndSettle(); - final findAppNameWidget = find.text('TALAWA'); - expect(findAppNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.color, - TalawaTheme.darkTheme.textTheme.headlineMedium!.color, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontFamily, - TalawaTheme.darkTheme.textTheme.headlineMedium!.fontFamily, - ); - expect( - (tester.firstWidget(findAppNameWidget) as Text).style!.fontSize, - TalawaTheme.darkTheme.textTheme.headlineMedium!.fontSize, - ); - }); - testWidgets("Testing if provider text shows up", (tester) async { - await tester.pumpWidget(createSplashScreenDark()); - await tester.pumpAndSettle(); - final findProviderTextWidget = find.text('from'); - expect(findProviderTextWidget, findsOneWidget); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.color, - TalawaTheme.darkTheme.textTheme.bodySmall!.color, - ); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.fontFamily, - TalawaTheme.darkTheme.textTheme.bodySmall!.fontFamily, - ); - expect( - (tester.firstWidget(findProviderTextWidget) as Text).style!.fontSize, - TalawaTheme.darkTheme.textTheme.bodySmall!.fontSize, - ); - }); - testWidgets("Testing if provider name shows up", (tester) async { - await tester.pumpWidget(createSplashScreenDark()); - await tester.pumpAndSettle(); - final findProviderNameWidget = find.text('PALISADOES'); - expect(findProviderNameWidget, findsOneWidget); - expect( - (tester.firstWidget(findProviderNameWidget) as Text).style!.color, - TalawaTheme.darkTheme.textTheme.titleSmall!.color, - ); - expect( - (tester.firstWidget(findProviderNameWidget) as Text).style!.fontFamily, - TalawaTheme.darkTheme.textTheme.titleSmall!.fontFamily, - ); - }); - }); -} - -// Added the following test cases - -Future testWidgets1(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the uriLinkStream to emit a test URI - final testUri = Uri.parse("https://example.com"); - uriLinkStream.any(testUri as bool Function(Uri? element)); - - // Wait for the URI to be handled - await tester.pumpAndSettle(); - - // Verify that the latest URI is updated correctly - expect(find.text("Latest URI: $testUri"), findsOneWidget); -} - -Future testWidgets2(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the userConfig.userLoggedIn() to return true - when(userConfig.userLoggedIn()).thenAnswer((_) async => true); - - // Wait for the user log in to be handled - await tester.pumpAndSettle(); - - // Verify that the user log in is handled correctly - expect(find.text("User logged in"), findsOneWidget); -} - -Future testWidgets3(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the userConfig.userLoggedIn() to return true - when(userConfig.userLoggedIn()).thenAnswer((_) async => true); - - // Mock the uriLinkStream to emit a test URI - final testUri = Uri.parse("https://example.com"); - uriLinkStream.any(testUri as bool Function(Uri? element)); - - // Wait for the URI to be handled - await tester.pumpAndSettle(); - - // Verify that the user log in is not handled - expect(find.text("User logged in"), findsNothing); -} - -Future testWidgets4(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the userConfig.userLoggedIn() to return true - when(userConfig.userLoggedIn()).thenAnswer((_) async => true); - - // Wait for the user log in to be handled - await tester.pumpAndSettle(); - - // Verify that the user log in is handled correctly - expect(find.text("User logged in"), findsOneWidget); -} - -Future testWidgets5(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the userConfig.userLoggedIn() to return true - when(userConfig.userLoggedIn()).thenAnswer((_) async => true); - - // Mock the initial URI to be a test URI - final testUri = Uri.parse("https://example.com"); - when(getInitialUri()).thenAnswer((_) async => testUri); - - // Wait for the initial URI to be handled - await tester.pumpAndSettle(); - - // Verify that the user log in is not handled - expect(find.text("User logged in"), findsNothing); -} - -Future testWidgets6(WidgetTester tester) async { - await tester.pumpWidget(createSplashScreenLight()); - await tester.pumpAndSettle(); - - // Mock the userConfig.userLoggedIn() to return true - when(userConfig.userLoggedIn()).thenAnswer((_) async => true); - - // Wait for the user log in to be handled - await tester.pumpAndSettle(); - - // Verify that the user log in is handled correctly - expect(find.text("User logged in"), findsOneWidget); -} diff --git a/test/widget_tests/pre_auth_screens/waiting_page_test.dart b/test/widget_tests/pre_auth_screens/waiting_page_test.dart deleted file mode 100644 index 2d945e41c..000000000 --- a/test/widget_tests/pre_auth_screens/waiting_page_test.dart +++ /dev/null @@ -1,202 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -// import 'dart:io'; - -import 'package:flutter/material.dart'; -// import 'package:flutter/services.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -// import 'package:hive/hive.dart'; -// import 'package:path_provider/path_provider.dart' as path; -import 'package:talawa/constants/custom_theme.dart'; -// import 'package:talawa/models/organization/org_info.dart'; -// import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/views/pre_auth_screens/waiting_screen.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -Widget createWaitingScreenLight({ThemeMode themeMode = ThemeMode.light}) => - MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.lightTheme, - home: const WaitingPage(key: Key('WaitingPage')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - -Widget createWaitingScreenDark({ThemeMode themeMode = ThemeMode.dark}) => - MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - key: const Key('Root'), - themeMode: themeMode, - theme: TalawaTheme.darkTheme, - home: const WaitingPage(key: Key('WaitingPage')), - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - ); - -Future main() async { - TestWidgetsFlutterBinding.ensureInitialized(); - // const testMockStorage = './test/fixtures/core'; - // const channel = MethodChannel( - // 'plugins.flutter.io/path_provider', - // ); - // channel.setMockMethodCallHandler((MethodCall methodCall) async { - // return testMockStorage; - // }); //initializing Hive - // final Directory dir = await path.getApplicationDocumentsDirectory(); - // Hive - // ..init(dir.path) - // ..registerAdapter(UserAdapter()) - // ..registerAdapter(OrgInfoAdapter()); - // // opening Hive Boxes - // await Hive.openBox('currentUser'); - // await Hive.openBox('currentOrg'); - // await Hive.openBox('url'); - setUp(() { - registerServices(); - registerViewModels(); - locator().test(); - }); - tearDown(() { - unregisterServices(); - unregisterViewModels(); - }); - - group('Waiting Screen Widget Test in light mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createWaitingScreenLight()); - await tester.pumpAndSettle(); - final screenScaffoldWidget = find.byKey( - const Key('WaitingPageScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.lightTheme.scaffoldBackgroundColor, - ); - }); - }); - group('Waiting Screen Widget Test in dark mode', () { - testWidgets("Testing if Select Language Screen shows up", (tester) async { - await tester.pumpWidget(createWaitingScreenDark()); - await tester.pumpAndSettle(); - // finding scaffold is present - final screenScaffoldWidget = find.byKey( - const Key('WaitingPageScaffold'), - ); - expect(screenScaffoldWidget, findsOneWidget); - expect( - (tester.firstWidget(find.byKey(const Key('Root'))) as MaterialApp) - .theme! - .scaffoldBackgroundColor, - TalawaTheme.darkTheme.scaffoldBackgroundColor, - ); - }); - }); - group('Testing for greeting text', () { - testWidgets("Testing if greeting text shows up", (tester) async { - await tester.pumpWidget(createWaitingScreenLight()); - await tester.pumpAndSettle(); - //initializing the custom rich text widget Finder - final customRichTextWidget = find.byKey( - const Key('WaitingPageText'), - ); - - //initializing the greeting text - final greeting = [ - { - 'text': "Please wait", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - { - 'text': " Test ", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .titleLarge! - .copyWith(fontSize: 24), - }, - { - 'text': "for organisation(s) to accept your invitation.", - 'textStyle': Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall, - }, - ]; - - //finding the custom rich text widget - expect(customRichTextWidget, findsOneWidget); - - //testing greeting text - expect( - (tester.firstWidget(customRichTextWidget) as CustomRichText).words, - greeting, - ); - }); - }); - group('Testing for pending request list', () { - testWidgets("Testing pending membership request list", (tester) async { - await tester.pumpWidget(createWaitingScreenLight()); - await tester.pumpAndSettle(); - //initializing the custom rich text widget Finder - final pendingRequestList = find.byKey( - const Key('PendingRequestList'), - ); - //initializing the custom rich text widget Finder - final pendingItem = find.byKey( - const Key('WaitingJoin'), - ); - - //finding the custom rich text widget - expect(pendingRequestList, findsOneWidget); - - //testing greeting text - expect(pendingItem, findsNWidgets(2)); - await tester.tap(pendingRequestList); - await tester.pumpAndSettle(); - }); - }); - group('Testing for join org button', () { - testWidgets("Testing Join org button", (tester) async { - await tester.pumpWidget(createWaitingScreenLight()); - await tester.pumpAndSettle(); - //initializing the join org button widget Finder - final joinOrgButton = find.byKey( - const Key('JoinOrg'), - ); - - //finding the join org button widget - expect(joinOrgButton, findsOneWidget); - - //testing greeting text - final RaisedRoundedButton joinButton = - tester.firstWidget(joinOrgButton) as RaisedRoundedButton; - await tester.pump(const Duration(milliseconds: 100)); - expect(joinButton.buttonLabel, "Join Organisation"); - }); - }); -} diff --git a/test/widget_tests/widgets/custom_alert_dialog_test.dart b/test/widget_tests/widgets/custom_alert_dialog_test.dart deleted file mode 100644 index 754b15650..000000000 --- a/test/widget_tests/widgets/custom_alert_dialog_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; - -import '../../helpers/test_locator.dart'; - -bool success = false; -bool cancelled = false; - -void onSuccess() { - success = true; -} - -void onCancel() { - cancelled = true; -} - -Widget createCustomAlertDialog({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.pushDialog( - CustomAlertDialog( - success: onSuccess, - secondaryButtonTap: passSecondaryFunc ? onCancel : null, - dialogSubTitle: 'Yes Boi', - reverse: reverse, - ), - ); - }, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - group('Test for CustomAlertDialog', () { - testWidgets('Check if the AlertDialog shows up', (tester) async { - await tester.pumpWidget(createCustomAlertDialog()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(AlertDialog), findsOneWidget); - }); - - testWidgets('Check for the RaisedRoundedButtons', (tester) async { - await tester.pumpWidget(createCustomAlertDialog()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(RaisedRoundedButton), findsNWidgets(2)); - }); - - testWidgets('Check if the Confirm button works', (tester) async { - await tester.pumpWidget(createCustomAlertDialog()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - final buttonFinder = find.byType(RaisedRoundedButton); - - await tester.tap(buttonFinder.last); - await tester.pump(); - - expect(success, true); - }); - - testWidgets('Check if the Cancel button works (with secondary func)', - (tester) async { - await tester.pumpWidget(createCustomAlertDialog()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - final buttonFinder = find.byType(RaisedRoundedButton); - - await tester.tap(buttonFinder.first); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(AlertDialog), findsOneWidget); - }); - - testWidgets('Check if the Cancel button works (without secondary func)', - (tester) async { - await tester - .pumpWidget(createCustomAlertDialog(passSecondaryFunc: false)); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - final buttonFinder = find.byType(RaisedRoundedButton); - - await tester.tap(buttonFinder.first); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(AlertDialog), findsNothing); - }); - }); -} diff --git a/test/widget_tests/widgets/custom_avatar_test.dart b/test/widget_tests/widgets/custom_avatar_test.dart deleted file mode 100644 index 79419bf51..000000000 --- a/test/widget_tests/widgets/custom_avatar_test.dart +++ /dev/null @@ -1,330 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:shimmer/shimmer.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; - -/// main function. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - group('CustomAvatar', () { - testWidgets('renders correctly when image is not null', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: 'https://example.com/image.jpg', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - expect(find.byType(CachedNetworkImage), findsOneWidget); - }); - - testWidgets('renders correctly when image is null', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: true, - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - expect(find.text('A'), findsOneWidget); - }); - - testWidgets('renders correctly with default fontSize and maxRadius', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: true, - firstAlphabet: 'A', - ), - ), - ); - - final textFinder = find.text('A'); - final textWidget = tester.widget(textFinder); - expect(textWidget.style!.fontSize, 40); - - final circleAvatarFinder = find.byType(CircleAvatar); - final circleAvatarWidget = - tester.widget(circleAvatarFinder); - expect(circleAvatarWidget.maxRadius, 16); - }); - }); - - testWidgets( - 'CircularAvatar with error icon is shown when image fails to load', - (widgetTester) async { - await widgetTester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: ' ', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.errorWidget != null && - widget.errorWidget is Function && - widget.errorWidget!( - widgetTester.binding.rootElement!, - '', - Exception(), - ) is CircleAvatar && - (widget.errorWidget!( - widgetTester.binding.rootElement!, - '', - Exception(), - ) as CircleAvatar) - .child is Icon && - ((widget.errorWidget!( - widgetTester.binding.rootElement!, - '', - Exception(), - ) as CircleAvatar) - .child as Icon?) - ?.icon == - Icons.error, - ), - findsOneWidget, - ); - }); - testWidgets('renders correctly when image is null and checks for theme color', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: true, - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - final circleAvatarFinder = find.byType(CircleAvatar); - final circleAvatarWidget = tester.widget(circleAvatarFinder); - expect( - circleAvatarWidget.backgroundColor, - Theme.of(tester.element(circleAvatarFinder)) - .iconTheme - .color! - .withOpacity(0.2), - ); - }); - - testWidgets( - 'renders correctly when image is not null and checks for theme color', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: 'https://example.com/image.jpg', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - final cachedNetworkImageFinder = find.byType(CachedNetworkImage); - final cachedNetworkImageWidget = - tester.widget(cachedNetworkImageFinder); - expect(cachedNetworkImageWidget.imageUrl, 'https://example.com/image.jpg'); - }); - - testWidgets('renders placeholder correctly when image is loading', - (WidgetTester tester) async { - await tester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: 'https://example.com/image.jpg', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await tester.pump(Duration.zero); // Start loading image - - expect(find.byType(Shimmer), findsOneWidget); - }); - - testWidgets('CircleAvatar is shown when image fails to load', - (widgetTester) async { - await widgetTester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: ' ', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.errorWidget != null && - widget.errorWidget is Function && - widget.errorWidget!( - widgetTester.binding.rootElement!, - '', - Exception(), - ) is CircleAvatar, - ), - findsOneWidget, - ); - }); - testWidgets('CircleAvatar in image builder is shown', (widgetTester) async { - await widgetTester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: ' ', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.imageBuilder != null && - widget.imageBuilder is Function && - widget.imageBuilder!( - widgetTester.binding.rootElement!, - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ) is CircleAvatar, - ), - findsOneWidget, - ); - }); - - testWidgets('CircleAvatar in image builder is shown with correct image', - (widgetTester) async { - await widgetTester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: ' ', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.imageBuilder != null && - widget.imageBuilder is Function && - widget.imageBuilder!( - widgetTester.binding.rootElement!, - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ) is CircleAvatar && - (widget.imageBuilder!( - widgetTester.binding.rootElement!, - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ) as CircleAvatar) - .backgroundImage == - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ), - findsOneWidget, - ); - }); - - testWidgets('CircleAvatar in image builder is shown with correct theme', - (widgetTester) async { - await widgetTester.pumpWidget( - const MaterialApp( - home: CustomAvatar( - isImageNull: false, - imageUrl: ' ', - firstAlphabet: 'A', - fontSize: 40, - maxRadius: 16, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.imageBuilder != null && - widget.imageBuilder is Function && - widget.imageBuilder!( - widgetTester.binding.rootElement!, - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ) is CircleAvatar && - (widget.imageBuilder!( - widgetTester.binding.rootElement!, - const NetworkImage( - 'https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw', - ), - ) as CircleAvatar) - .backgroundColor == - Theme.of(widgetTester.binding.rootElement!) - .iconTheme - .color! - .withOpacity(0.2), - ), - findsOneWidget, - ); - }); -} diff --git a/test/widget_tests/widgets/custom_drawer_test.dart b/test/widget_tests/widgets/custom_drawer_test.dart deleted file mode 100644 index 08e6f9e11..000000000 --- a/test/widget_tests/widgets/custom_drawer_test.dart +++ /dev/null @@ -1,317 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:hive/hive.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/constants/routing_constants.dart'; -import 'package:talawa/models/mainscreen_navigation_args.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/graphql_config.dart'; -// import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/view_model/widgets_view_models/custom_drawer_view_model.dart'; -// import 'package:talawa/view_model/main_screen_view_model.dart'; -import 'package:talawa/views/main_screen.dart'; -import 'package:talawa/widgets/custom_alert_dialog.dart'; -// import 'package:talawa/widgets/custom_alert_dialog.dart'; -import '../../helpers/test_helpers.dart'; -// import '../../helpers/test_helpers.mocks.dart'; -import '../../helpers/test_locator.dart'; - -class MockBuildContext extends Mock implements BuildContext {} - -bool _switchOrgcalled = false; - -class MockCustomDrawerViewModel extends Mock implements CustomDrawerViewModel { - final _scrollController = ScrollController(); - @override - ScrollController get controller => _scrollController; - @override - List get switchAbleOrg { - print("hi"); - return [OrgInfo(id: 'test1', name: 'name')]; - } - - @override - OrgInfo get selectedOrg => OrgInfo(id: 'test1', name: 'name'); - @override - void switchOrg(OrgInfo orginfo) { - _switchOrgcalled = true; - } -} - -class MockScrollController extends Mock implements ScrollController { - @override - ScrollPosition get position => MockScrollPosition(); -} - -class MockScrollPosition extends Mock implements ScrollPosition {} - -Widget createHomePageScreen({required bool demoMode}) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: MainScreen( - key: const Key('MainScreen'), - mainScreenArgs: MainScreenArgs( - mainScreenIndex: 0, - fromSignUp: false, - toggleDemoMode: demoMode, - ), - ), - ); -} - -void main() async { - testSetupLocator(); - - setUp(() { - registerServices(); - locator().test(); - locator().test(); - }); - - final Directory dir = Directory('test/fixtures/core'); - - Hive - ..init(dir.path) - ..registerAdapter(UserAdapter()) - ..registerAdapter(OrgInfoAdapter()); - - await Hive.openBox('currentUser'); - await Hive.openBox('currentOrg'); - - await Hive.openBox('pluginBox'); - await Hive.openBox('url'); - - group('Exit Button', () { - testWidgets("Tapping Tests for Exit", (tester) async { - final customDrawerViewModel = CustomDrawerViewModel(); - - final Widget buildAlertDialog = MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: customDrawerViewModel.exitAlertDialog(), - ); - - await tester.pumpWidget(buildAlertDialog); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - final exitDialog = find.byKey(const Key("Exit?")); - await tester.tap(find.text('Exit')); - - expect(exitDialog, findsOneWidget); - }); - }); - - group('Test Organization action Buttons', () { - testWidgets('Test Join Organization Button when user not logged in.', - (tester) async { - await tester.pumpWidget(createHomePageScreen(demoMode: true)); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - // if user not logged in - when(userConfig.loggedIn).thenReturn(false); - - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key('Drawer')), findsOneWidget); - - final buttonFinder = find.byKey(MainScreenViewModel.keyDrawerJoinOrg); - - await tester.tap(buttonFinder); - await tester.pumpAndSettle(); - - when( - navigationService.popAndPushScreen( - Routes.setUrlScreen, - arguments: '', - ), - ).thenAnswer((_) async {}); - - verify( - navigationService.popAndPushScreen( - Routes.setUrlScreen, - arguments: '', - ), - ); - }); - - testWidgets('Test leave current Organization Button.', (tester) async { - await tester.pumpWidget(createHomePageScreen(demoMode: true)); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - // if user not logged in - when(userConfig.loggedIn).thenReturn(true); - - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key('Drawer')), findsOneWidget); - - final buttonFinder = find.byKey( - MainScreenViewModel.keyDrawerLeaveCurrentOrg, - ); - - final tmp = CustomAlertDialog( - key: const Key("Exit?"), - reverse: true, - dialogSubTitle: 'Are you sure you want to exit this organization?', - successText: 'Exit', - success: () { - //Exit org - }, - ); - - when( - navigationService.pushDialog(tmp), - ).thenAnswer((realInvocation) async {}); - - await tester.ensureVisible(buttonFinder); - await tester.pumpAndSettle(); - - await tester.tap(buttonFinder); - await tester.pumpAndSettle(); - - verifyNever(navigationService.pushDialog(tmp)).called(0); - // expect(find.text('Exit'), findsOneWidget); - }); - - testWidgets('Test Join Organization Button when user logged in.', - (tester) async { - await tester.pumpWidget(createHomePageScreen(demoMode: true)); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - // if user not logged in - when(userConfig.loggedIn).thenReturn(true); - - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - await tester.pumpAndSettle(); - - final buttonFinder = find.byKey(MainScreenViewModel.keyDrawerJoinOrg); - - await tester.tap(buttonFinder); - await tester.pumpAndSettle(); - - when( - navigationService.popAndPushScreen( - Routes.joinOrg, - arguments: '-1', - ), - ).thenAnswer((_) async {}); - - verify( - navigationService.popAndPushScreen( - Routes.joinOrg, - arguments: '-1', - ), - ); - }); - - testWidgets('Test Switch org list.', (tester) async { - await tester.pumpWidget(createHomePageScreen(demoMode: true)); - await tester.pumpAndSettle(const Duration(seconds: 1)); - - locator.unregister(); - - locator.registerSingleton( - MockCustomDrawerViewModel(), - ); - - // if user not logged in - when(userConfig.loggedIn).thenReturn(false); - - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - await tester.pumpAndSettle(); - - expect(find.byKey(const Key('Switching Org')), findsOneWidget); - - final buttonFinder = find.byKey(const Key('Org')); - - await tester.tap(buttonFinder); - - expect(_switchOrgcalled, true); - }); - }); - - group('Custom Drawer Test', () { - /*testWidgets("Widget Testing", (tester) async { - // pumping the Widget - await tester.pumpWidget(createHomePageScreen()); - await tester.pumpAndSettle(); - // Opening the Drawer so that it can be loaded in the widget tree and built() is called - await tester.dragFrom( - tester.getTopLeft(find.byType(MaterialApp)), const Offset(300, 0)); - await tester.pumpAndSettle(); - // getting the Finders for Code Coverage - expect(find.byKey(const ValueKey("Drawer")), findsOneWidget); - expect(find.byKey(const ValueKey("Custom Drawer")), findsOneWidget); - expect(find.text("Selected Organization"), findsOneWidget); - expect(find.text("Switch Organization"), findsOneWidget); - final listOfOrgs = find.byKey(const ValueKey("Switching Org")); - expect(listOfOrgs, findsOneWidget); - expect(find.byKey(MainScreenViewModel.keyDrawerCurOrg), findsOneWidget); - expect(find.byKey(MainScreenViewModel.keyDrawerSwitchableOrg), - findsOneWidget); - expect(find.byType(UserAccountsDrawerHeader), findsOneWidget); - expect(find.text("Join new Organization"), findsOneWidget); - expect(find.text("Leave Current Organization"), findsOneWidget); - final fromPalisadoes = find.byKey(const ValueKey("From Palisadoes")); - expect(fromPalisadoes, findsOneWidget); - }); - testWidgets("Tapping Tests for Org", (tester) async { - await tester.pumpWidget(createHomePageScreen()); - await tester.pumpAndSettle(); - // Opening the Drawer so that it can be loaded in the widget tree and built() is called - await tester.dragFrom( - tester.getTopLeft(find.byType(MaterialApp)), const Offset(300, 0)); - await tester.pumpAndSettle(); - final orgs = find.byKey(const ValueKey("Org")); - // Atleast One Org should be there - // ignore: invalid_use_of_protected_member - expect(orgs.allCandidates.isEmpty, false); - await tester.tap(orgs.first); - // Was not required but done for code Coverage - // Sized - final sizedbox = find.byKey(const ValueKey("Sized Box Drawer")); - // ignore: invalid_use_of_protected_member - expect(sizedbox.allCandidates.isEmpty, false); - }); - testWidgets("Tapping Tests for Join", (tester) async { - await tester.pumpWidget(createHomePageScreen()); - await tester.pumpAndSettle(); - tester.binding.window.physicalSizeTestValue = const Size(800, 4000); - MainScreenViewModel.scaffoldKey.currentState?.openDrawer(); - await tester.pumpAndSettle(); - final joinOrg = find.byKey(MainScreenViewModel.keyDrawerJoinOrg); - await tester.tap(joinOrg); - // await tester.pumpAndSettle(); - });*/ - }); - - tearDown(() { - unregisterServices(); - }); -} diff --git a/test/widget_tests/widgets/custom_list_tile_test.dart b/test/widget_tests/widgets/custom_list_tile_test.dart deleted file mode 100644 index dfc781cf8..000000000 --- a/test/widget_tests/widgets/custom_list_tile_test.dart +++ /dev/null @@ -1,384 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/options/options.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/organization/org_info_address.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/custom_list_tile.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -TileType _tileType = TileType.org; -OrgInfo _orgInfo = OrgInfo(); -const Key _key = Key('CustomListTileKey'); -int _index = 0; -Options _option = Options( - icon: const Icon(Icons.add), - title: 'Test', - subtitle: 'Just a test', -); -bool _showIcon = false; -User _userInfo = User(); - -// ignore: prefer_function_declarations_over_variables -dynamic Function(OrgInfo)? _onTapOrgInfo = (OrgInfo orgInfo) => true; - -// ignore: prefer_function_declarations_over_variables -void Function()? _onTapOption = () => {}; - -// ignore: prefer_function_declarations_over_variables -dynamic Function()? _onTapUserInfo = () => {}; - -Widget _createCustomListTile() { - return MaterialApp( - navigatorKey: navigationService.navigatorKey, - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: CustomListTile( - key: _key, - index: _index, - type: _tileType, - option: _option, - showIcon: _showIcon, - onTapOrgInfo: _onTapOrgInfo, - onTapOption: _onTapOption, - userInfo: _userInfo, - orgInfo: _orgInfo, - onTapUserInfo: _onTapUserInfo, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - setUp(() async { - _tileType = TileType.org; - _orgInfo = OrgInfo(); - _index = 0; - _option = Options( - icon: const Icon(Icons.add), - title: 'Test', - subtitle: 'Just a test', - ); - _showIcon = false; - _onTapOrgInfo = (OrgInfo orgInfo) => true; - - _userInfo = User(); - _onTapOption = () => {}; - _onTapUserInfo = () => {}; - registerServices(); - }); - tearDown(() { - unregisterServices(); - }); - group('Custom list tile test', () { - testWidgets("Test type is org ", (WidgetTester tester) async { - bool executed = false; - _orgInfo = OrgInfo( - name: 'Test Name', - userRegistrationRequired: false, - creatorInfo: User( - firstName: 'Test firstname', - lastName: 'Test lastname', - ), - address: Address( - city: 'Test City', - countryCode: 'TC', - ), - ); - _onTapOrgInfo = (OrgInfo orgInfo) { - executed = true; - }; - _tileType = TileType.org; - await tester.pumpWidget(_createCustomListTile()); - await tester.pumpAndSettle(); - - // test to see if custom list tile widget shows up - expect(find.byKey(_key), findsOneWidget); - - // test to see if onTap of Inkwell works - await tester.tap(find.byType(InkWell)); - await tester.pump(); - expect(executed, true); - - // test to check that there is no icon - expect(find.byIcon(Icons.add), findsNothing); - - // Testing Rich Text for org name and address shows up - final orgName = find.byKey(const Key('OrgNamewithOrgAddress')); - - expect(orgName, findsOneWidget); - - // Test for icon when is public is true - expect(find.byIcon(Icons.lock_open), findsOneWidget); - - final iconFinder = find.descendant( - of: find.byType(Expanded).at(1), - matching: find.byType(Icon), - ); - final iconWidget = tester.firstWidget(iconFinder) as Icon; - - expect(iconWidget.color, const Color(0xFF34AD64)); - - // Test for sized box when showIcon is false - final sizedBoxFinder = find - .descendant( - of: find.byType(Expanded).at(1), - matching: find.byType(SizedBox), - ) - .at(0); - expect(sizedBoxFinder, findsOneWidget); - }); - - testWidgets("Test for orgs when is Public is false ", - (WidgetTester tester) async { - _orgInfo = OrgInfo( - name: 'Test Name', - userRegistrationRequired: true, - creatorInfo: User( - firstName: 'Test firstname', - lastName: 'Test lastname', - ), - ); - _tileType = TileType.org; - - await tester.pumpWidget(_createCustomListTile()); - await tester.pumpAndSettle(); - - // Test for is public display - expect( - find.text( - AppLocalizations.of(navigationService.navigatorKey.currentContext!)! - .strictTranslate('Private'), - ), - findsNothing, - ); - - // Test for icon when is public is false - expect(find.byIcon(Icons.lock), findsOneWidget); - - final iconFinder = find.descendant( - of: find.byType(Expanded).at(1), - matching: find.byType(Icon), - ); - final iconWidget = tester.firstWidget(iconFinder) as Icon; - - expect(iconWidget.color, const Color(0xffFABC57)); - }); - - testWidgets("Test when type is user ", (WidgetTester tester) async { - bool executed = false; - _tileType = TileType.user; - _userInfo = User( - firstName: 'Test firstname', - lastName: 'Test lastname', - ); - _onTapUserInfo = () => {executed = true}; - await tester.pumpWidget(_createCustomListTile()); - await tester.pumpAndSettle(); - - // test to see if custom list tile widget shows up - expect(find.byKey(_key), findsOneWidget); - - // test to see if onTap of Inkwell works - await tester.tap(find.byType(InkWell)); - await tester.pump(); - expect(executed, true); - - // test to check that there is a custom avatar - // expect(find.byType(CustomAvatar), findsOneWidget); - - // test to check that there is no icon - expect(find.byIcon(Icons.add), findsNothing); - - // test the properties passed to CustomAvatar - // final customAvatarFinder = find.byType(CustomAvatar); - // final customAvatarWidget = - // tester.firstWidget(customAvatarFinder) as CustomAvatar; - // expect(customAvatarWidget.isImageNull, true); - // expect(customAvatarWidget.imageUrl, null); - // expect(customAvatarWidget.firstAlphabet, 'T'); - - // Testing Text for that contains user's name - final userNameFinder = find - .descendant( - of: find.byType(Expanded).at(0), - matching: find.byType(Text), - ) - .first; - - final userNameWidget = tester.firstWidget(userNameFinder) as Text; - - expect(userNameWidget.data, 'Test firstname Test lastname'); - // expect( - // userNameWidget.style, - // Theme.of(navigationService.navigatorKey.currentContext!) - // .textTheme - // .titleLarge, - // ); - - // Testing SizedBox for users fallback for creater info - // final userSizedBoxFallback = find - // .descendant( - // of: find.byType(Expanded).at(0), - // matching: find.byType(SizedBox), - // ) - // .first; - - // expect(userSizedBoxFallback, findsOneWidget); - - // Testing SizedBox for users fallback for userRegistrationRequired info - // final userSizedBoxFallback1 = find - // .descendant( - // of: find.byType(Expanded).at(1), - // matching: find.byType(SizedBox), - // ) - // .first; - // - // expect(userSizedBoxFallback1, findsOneWidget); - }); - testWidgets("Test when type is option", (WidgetTester tester) async { - bool executed = false; - _tileType = TileType.option; - _onTapOption = () => executed = true; - await tester.pumpWidget(_createCustomListTile()); - await tester.pumpAndSettle(); - - // test to see if custom list tile widget shows up - expect(find.byKey(_key), findsOneWidget); - - // test to see if onTap of Inkwell works - await tester.ensureVisible(find.byType(InkWell)); - await tester.tap(find.byType(InkWell)); - await tester.pump(); - expect(executed, true); - - // test to check that there is no custom avatar - expect(find.byType(CustomAvatar), findsNothing); - - // test to check that there is an icon - // expect(find.byIcon(Icons.add), findsOneWidget); - - // Testing Text that contains option's title - final optionTitleFinder = find - .descendant( - of: find.byType(Expanded).at(0), - matching: find.byType(Text), - ) - .first; - - final optionTitleWidget = tester.firstWidget(optionTitleFinder) as Text; - - expect(optionTitleWidget.data, 'Test'); - expect( - optionTitleWidget.style, - Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .bodyMedium - ?.copyWith(fontSize: 18, color: Colors.black), - ); - - // Testing Text that contains option's subtitle - final optionSubtitleFinder = find - .descendant( - of: find.byType(Expanded).at(0), - matching: find.byType(Text), - ) - .at(0); - - final optionSubtitleWidget = - tester.firstWidget(optionSubtitleFinder) as Text; - - expect(optionSubtitleWidget.data, 'Test'); - expect( - optionSubtitleWidget.style, - Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .bodyMedium - ?.copyWith( - color: Colors.black, - fontSize: 18, - ), - ); - - // Testing SizedBox for option when trailing icon button is null (fallback for creater info) - final optionSizedBoxFallback = find - .descendant( - of: find.byType(Expanded).at(1), - matching: find.byType(SizedBox), - ) - .first; - - expect(optionSizedBoxFallback, findsOneWidget); - }); - testWidgets("Test when option trailing icon button is not null", - (WidgetTester tester) async { - _tileType = TileType.option; - _option = Options( - icon: const Icon(Icons.add), - title: 'Test', - subtitle: 'Just a test', - trailingIconButton: IconButton( - icon: const Icon(Icons.send), - onPressed: () {}, - ), - ); - await tester.pumpWidget(_createCustomListTile()); - await tester.pumpAndSettle(); - - // Testing TextStyle that contains option's title - final optionTitleFinder = find - .descendant( - of: find.byType(Expanded).at(0), - matching: find.byType(Text), - ) - .first; - - final optionTitleWidget = tester.firstWidget(optionTitleFinder) as Text; - - expect( - optionTitleWidget.style, - Theme.of(navigationService.navigatorKey.currentContext!) - .textTheme - .headlineSmall! - .copyWith(fontSize: 18, color: Colors.black), - ); - - // Testing TextStyle that contains option's subtitle - // final optionSubtitleFinder = find - // .descendant( - // of: find.byType(Expanded).at(0), - // matching: find.byType(Text), - // ) - // .at(0); - - // final optionSubtitleWidget = - // tester.firstWidget(optionSubtitleFinder) as Text; - - // expect( - // optionSubtitleWidget.style, - // Theme.of(navigationService.navigatorKey.currentContext!) - // .textTheme - // .titleLarge?.copyWith(fontSize: 18, color: Colors.black,), - // ); - - // Test for checking if trailing icon button is shown - expect(find.byIcon(Icons.send), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/widgets/custom_progress_dialog_test.dart b/test/widget_tests/widgets/custom_progress_dialog_test.dart deleted file mode 100644 index fe337fb3f..000000000 --- a/test/widget_tests/widgets/custom_progress_dialog_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/custom_progress_dialog.dart'; - -import '../../helpers/test_helpers.dart'; - -Widget createCustomProgressDialog() { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - home: const Scaffold( - body: SingleChildScrollView( - child: CustomProgressDialog( - key: Key('testing'), - ), - ), - ), - ); -} - -void main() { - SizeConfig().test(); - - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() async { - unregisterViewModels(); - unregisterServices(); - }); - group('Test for CustomProgressDialog', () { - testWidgets( - 'Check if CustomProgressDialog widget shows up when connection available', - (tester) async { - // Setup connectivity for connection available - when(connectivity.checkConnectivity()) - .thenAnswer((_) async => ConnectivityResult.wifi); - - // Build the widget - await tester.pumpWidget(createCustomProgressDialog()); - await tester.pump(); - await tester.pump(); - - expect(find.byType(CupertinoActivityIndicator), findsOneWidget); - }); - testWidgets( - 'Check if CustomProgressDialog widget shows up when no connection', - (tester) async { - // Register navigation service - locator.unregister(); - locator.registerSingleton(NavigationService()); - - // Setup connectivity for connection not available - when(connectivity.checkConnectivity()) - .thenAnswer((_) async => ConnectivityResult.none); - - // Build the widget - await tester.pumpWidget(createCustomProgressDialog()); - await tester.pump(); - - expect(find.byType(Column), findsOneWidget); - expect(find.text("No Internet!"), findsOneWidget); - - // CustomProgressDialog should pop - await tester.pumpAndSettle(const Duration(seconds: 2)); - expect(find.byType(CustomProgressDialog), findsNothing); - }); - }); -} diff --git a/test/widget_tests/widgets/date_time_picker_test.dart b/test/widget_tests/widgets/date_time_picker_test.dart deleted file mode 100644 index 584e7b855..000000000 --- a/test/widget_tests/widgets/date_time_picker_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/widgets/date_time_picker.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -final chooseDate = DateTime(2020, 04, 03); -final cancelDate = DateTime(2017, 11, 16); -late DateTime testDate; - -const chooseTime = TimeOfDay(hour: 10, minute: 10); -const cancelTime = TimeOfDay(hour: 5, minute: 5); -late TimeOfDay testTime; - -Widget dateTimePicker({required dynamic checkProp, bool isTimeType = false}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - home: Scaffold( - body: Center( - child: ElevatedButton( - onPressed: () async { - if (isTimeType) { - testTime = - await customTimePicker(initialTime: checkProp as TimeOfDay); - } else { - testDate = - await customDatePicker(initialDate: checkProp as DateTime); - } - }, - child: const Text('Open'), - ), - ), - ), - ); -} - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - registerServices(); - - group('TimePicker tests', () { - testWidgets('Check if time picker shows up', (tester) async { - await tester.pumpWidget( - dateTimePicker(checkProp: TimeOfDay.now(), isTimeType: true), - ); - - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TimePickerDialog), findsOneWidget); - }); - - testWidgets('Check if selecting a time works', (tester) async { - await tester - .pumpWidget(dateTimePicker(checkProp: chooseTime, isTimeType: true)); - - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - await tester.tap(find.textContaining('OK')); - - expect(testTime, chooseTime); - }); - - testWidgets('Check if cancelling the time picker works', (tester) async { - await tester - .pumpWidget(dateTimePicker(checkProp: cancelTime, isTimeType: true)); - await tester.ensureVisible(find.text('Open')); - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - await tester.tap(find.textContaining('Cancel')); - - expect(testTime, cancelTime); - }); - }); - - group('DatePicker tests', () { - testWidgets('Check if date picker shows up', (tester) async { - await tester.pumpWidget(dateTimePicker(checkProp: DateTime.now())); - - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(DatePickerDialog), findsOneWidget); - }); - - testWidgets('Check if selecting a date works', (tester) async { - await tester.pumpWidget(dateTimePicker(checkProp: chooseDate)); - - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - await tester.tap(find.textContaining('OK')); - - expect(testDate, chooseDate); - }); - - testWidgets('Check if cancelling the date picker works', (tester) async { - await tester.pumpWidget(dateTimePicker(checkProp: cancelDate)); - - await tester.tap(find.text('Open')); - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - await tester.tap(find.textContaining('Cancel')); - - expect(testDate, cancelDate); - }); - }); -} diff --git a/test/widget_tests/widgets/event_card_test.dart b/test/widget_tests/widgets/event_card_test.dart deleted file mode 100644 index 202d20e18..000000000 --- a/test/widget_tests/widgets/event_card_test.dart +++ /dev/null @@ -1,198 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/models/events/event_model.dart'; -import 'package:talawa/models/user/user_info.dart'; - -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/event_card.dart'; - -import '../../helpers/test_locator.dart'; - -Event getEvent({bool? isRegistered, bool isPublic = false}) { - return Event( - title: "Testing", - location: "PyasePyasePyasePyasePyasePyase", - description: "Testing for the Event Card Widget", - startDate: "13 Dec", - endDate: "13 Dec", - startTime: "07:10PM", - endTime: "08:15PM", - isPublic: isPublic, - isRegistered: isRegistered, - attendees: [Attendee(id: "attendee1")], - creator: User(id: "ravidi"), - ); -} - -Widget createCustomEventCard( - Event event, { - bool isSearchItem = false, - String? eventTitleHighlightedText, -}) { - return MaterialApp( - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: EventCard( - key: const Key('event_card'), - event: event, - isSearchItem: isSearchItem, - eventTitleHighlightedText: eventTitleHighlightedText, - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - - TestWidgetsFlutterBinding.ensureInitialized(); - - group("Test for EventCard widget", () { - testWidgets('Check if Event Card shows up', (tester) async { - mockNetworkImages(() async { - expect(find.byType(EventCard), findsNothing); - - await tester.pumpWidget(createCustomEventCard(getEvent())); - await tester.pump(); - - expect(find.byType(EventCard), findsOneWidget); - }); - }); - - testWidgets('Check for child(ren)', (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget(createCustomEventCard(getEvent())); - await tester.pump(); - - expect( - find.descendant( - of: find.byType(EventCard), - matching: find.descendant( - of: find.byType(Padding), - matching: find.byType(Stack), - ), - ), - findsOneWidget, - ); - - expect( - find.descendant( - of: find.byType(Stack), - matching: find.byType(Card), - ), - findsOneWidget, - ); - - expect( - find.descendant( - of: find.byType(Stack), - matching: find.byType(Positioned), - ), - findsOneWidget, - ); - }); - }); - - testWidgets('Check for conditional widgets - false', (tester) async { - mockNetworkImages(() async { - const eventTitleHighlightedText = "ravidi"; - const eventTitle = "Testing"; - - await tester.pumpWidget( - createCustomEventCard( - getEvent(), - isSearchItem: false, - eventTitleHighlightedText: eventTitleHighlightedText, - ), - ); - await tester.pump(); - - expect( - find.descendant( - of: find.byType(Positioned), - matching: find.byType(DecoratedBox), - ), - findsNothing, - ); - expect(find.text("Registered"), findsNothing); - - expect( - find.text(eventTitleHighlightedText, findRichText: true), - findsNothing, - ); - expect(find.text(eventTitle), findsOneWidget); - expect(find.text('public'), findsNothing); - expect(find.text('private'), findsOneWidget); - }); - }); - - testWidgets('Check for conditional widgets - true', (tester) async { - mockNetworkImages(() async { - const eventTitleHighlightedText = "ravidi"; - const eventTitle = "Testing"; - - await tester.pumpWidget( - createCustomEventCard( - getEvent(isRegistered: true, isPublic: true), - isSearchItem: true, - eventTitleHighlightedText: eventTitleHighlightedText, - ), - ); - await tester.pump(); - - expect( - find.descendant( - of: find.byType(Positioned), - matching: find.byType(DecoratedBox), - ), - findsOneWidget, - ); - expect(find.text("Registered"), findsOneWidget); - - expect( - find.text(eventTitleHighlightedText, findRichText: true), - findsOneWidget, - ); - expect(find.text(eventTitle), findsNothing); - expect(find.text('public'), findsOneWidget); - expect(find.text('private'), findsNothing); - }); - }); - - testWidgets('Check for texts', (tester) async { - mockNetworkImages(() async { - await tester.pumpWidget(createCustomEventCard(getEvent())); - await tester.pump(); - - expect(find.text("13 Dec - 13 Dec"), findsOneWidget); // duration date - expect(find.text("07:10PM - 08:15PM"), findsOneWidget); // duration time - expect( - find.text("PyasePyasePyasePyase"), - findsOneWidget, - ); // trimmed location - expect( - find.text("Testing for the Event Card Widget"), - findsOneWidget, - ); // event description - expect(find.text("1"), findsOneWidget); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/event_date_time_tile_test.dart b/test/widget_tests/widgets/event_date_time_tile_test.dart deleted file mode 100644 index 4fb0c6e0d..000000000 --- a/test/widget_tests/widgets/event_date_time_tile_test.dart +++ /dev/null @@ -1,170 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/widgets/event_date_time_tile.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -/// Instance of callback function. -class MockCallbackFunction extends Mock { - /// Callback function. - /// - /// **params**: - /// None - /// - /// **returns**: - /// None - void call(); -} - -/// A callback function to set date. -final setDateCallback = MockCallbackFunction(); - -/// A callback function to set time. -final setTimeCallback = MockCallbackFunction(); - -/// Creates a widget for testing. -/// -/// **params**: -/// None -/// -/// **returns**: -/// * `Widget`: Returns mocked Material App Widget -Widget createWidget() { - return MaterialApp( - home: Scaffold( - body: DateTimeTile( - isAllDay: false, - date: "fakeDate", - time: "fakeTime", - setDate: setDateCallback, - setTime: setTimeCallback, - ), - ), - ); -} - -void main() { - testSetupLocator(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Tests for DateTimeTile widget', () { - testWidgets('Checking if the widget shows up', (tester) async { - await tester.pumpWidget(createWidget()); - expect(find.byType(Container), findsWidgets); - }); - - testWidgets("Checking padding", (tester) async { - await tester.pumpWidget(createWidget()); - - final paddingFinder = find.byType(Padding); - final padding = tester.firstWidget(paddingFinder); - - expect(paddingFinder, findsOneWidget); - expect( - (padding as Padding).padding, - EdgeInsets.symmetric(horizontal: SizeConfig.screenWidth! * 0.083), - ); - }); - - testWidgets("Checking tap Inkwell for setDate", (tester) async { - await tester.pumpWidget(createWidget()); - - final inkwellFinder = find.byType(InkWell).first; - - await tester.tap(inkwellFinder); - await tester.pump(); - - expect(inkwellFinder, findsOneWidget); - - verify(setDateCallback()); - }); - - testWidgets("Checking tap Inkwell for setTime", (tester) async { - await tester.pumpWidget(createWidget()); - - final inkwellFinder = find.byType(InkWell).last; - - await tester.tap(inkwellFinder); - await tester.pump(); - - expect(inkwellFinder, findsOneWidget); - - verify(setTimeCallback()); - }); - - testWidgets("Testing the icons", (tester) async { - await tester.pumpWidget(createWidget()); - - final iconFinder = find.byType(Icon); - final icon = tester.firstWidget(iconFinder); - - expect( - (icon as Icon).color, - const Color(0xff524F4F), - ); - expect( - icon.size, - 19, - ); - expect( - icon.icon, - Icons.calendar_today, - ); - - final iconFinder2 = find.byType(Icon).last; - final icon2 = tester.firstWidget(iconFinder2); - - expect( - (icon2 as Icon).color, - const Color(0xff524F4F), - ); - expect( - icon2.size, - 19, - ); - expect( - icon2.icon, - Icons.schedule, - ); - }); - - testWidgets("Testing text widgets", (tester) async { - await tester.pumpWidget(createWidget()); - final textFinder = find.byType(Text).first; - final text = tester.firstWidget(textFinder); - - expect( - (text as Text).data, - "fakeDate", - ); - expect( - text.style, - const TextStyle(fontSize: 16), - ); - - final textFinder2 = find.byType(Text).last; - final text2 = tester.firstWidget(textFinder2); - - expect( - (text2 as Text).data, - "fakeTime", - ); - expect( - text2.style, - const TextStyle(fontSize: 16), - ); - }); - }); -} diff --git a/test/widget_tests/widgets/event_search_delegate_test.dart b/test/widget_tests/widgets/event_search_delegate_test.dart deleted file mode 100644 index 3e35fd0c2..000000000 --- a/test/widget_tests/widgets/event_search_delegate_test.dart +++ /dev/null @@ -1,191 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:network_image_mock/network_image_mock.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart'; -import 'package:talawa/views/after_auth_screens/events/event_info_page.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/event_card.dart'; -import 'package:talawa/widgets/event_search_delegate.dart'; - -import '../../helpers/test_helpers.dart'; - -Widget createEventSearch() { - return MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - home: Scaffold( - body: BaseView( - onModelReady: (model) => model.initialise(), - builder: (context, model, child) { - return IconButton( - onPressed: () { - showSearch( - context: context, - delegate: EventSearch( - eventList: model.events, - exploreEventsViewModel: model, - ), - ); - }, - icon: const Icon(Icons.search), - ); - }, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - }); - - group('Test for EventSearch Delegate', () { - testWidgets('Check if EventSearch shows up', (tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - expect(find.byIcon(Icons.arrow_back), findsOneWidget); - expect(find.byIcon(Icons.clear), findsOneWidget); - expect(find.byType(TextField), findsOneWidget); - expect(find.byType(EventCard), findsOneWidget); - }); - }); - testWidgets('Check if back button works fine', (tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - final x = find.descendant( - of: find.byType(AppBar), - matching: find.byType(IconButton), - ); - await tester.tap(x.first); - await tester.pumpAndSettle(); - - expect(find.byIcon(Icons.arrow_back), findsNothing); - }); - }); - - testWidgets('Check if typing in textfield works', (tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - final textfield = find.byType(TextField); - await tester.enterText(textfield, 'te'); - await tester.pumpAndSettle(); - - expect(find.byType(EventCard), findsOneWidget); - - await tester.enterText(textfield, 'teste'); - await tester.pumpAndSettle(); - - expect(find.byType(EventCard), findsNothing); - }); - }); - - testWidgets('Check if buildResult works', (tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - final textfield = find.byType(TextField); - await tester.enterText(textfield, 'te'); - await tester.pumpAndSettle(); - - await tester.showKeyboard(textfield); - await tester.pump(); - - await tester.testTextInput.receiveAction(TextInputAction.send); - await tester.pump(); - - expect(find.byType(EventCard), findsOneWidget); - - await tester.enterText(textfield, 'teste'); - await tester.pumpAndSettle(); - - expect(find.byType(EventCard), findsNothing); - }); - }); - testWidgets('Check if clear button works fine', (tester) async { - mockNetworkImagesFor(() async { - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - final x = find.descendant( - of: find.byType(AppBar), - matching: find.byType(IconButton), - ); - - final textfield = find.byType(TextField); - await tester.enterText(textfield, 'test'); - await tester.pumpAndSettle(); - - await tester.tap(x.last); - await tester.pumpAndSettle(); - final textWidget = tester.firstWidget(textfield); - expect((textWidget as TextField).controller!.text, ''); - - await tester.tap(x.last); - await tester.pumpAndSettle(); - expect(find.byIcon(Icons.clear), findsNothing); - }); - }); - - testWidgets('Check if tapping on event card works', (tester) async { - mockNetworkImagesFor(() async { - locator.unregister(); - locator.registerSingleton(NavigationService()); - - await tester.pumpWidget(createEventSearch()); - await tester.pump(); - await tester.tap(find.byIcon(Icons.search)); - await tester.pumpAndSettle(); - - final textfield = find.byType(TextField); - await tester.enterText(textfield, 'te'); - await tester.pumpAndSettle(); - - final eventCardFinder = find.byType(EventCard); - await tester.tap(eventCardFinder); - await tester.pumpAndSettle(); - - expect(find.byType(EventInfoPage), findsOneWidget); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/from_palisadoes_test.dart b/test/widget_tests/widgets/from_palisadoes_test.dart deleted file mode 100644 index dc3f9efa2..000000000 --- a/test/widget_tests/widgets/from_palisadoes_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/from_palisadoes.dart'; - -Widget createFromPalisadoes() { - return const MaterialApp( - localizationsDelegates: [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: FromPalisadoes(), - ), - ); -} - -void main() { - SizeConfig().test(); - group('Test for FromPalisadoes', () { - testWidgets('Check if FromPalisadoes widget shows up', (tester) async { - await tester.pumpWidget(createFromPalisadoes()); - await tester.pump(); - - expect(find.byType(Column), findsOneWidget); - }); - - testWidgets('Check if from Palisadoes text shows up', (tester) async { - await tester.pumpWidget(createFromPalisadoes()); - await tester.pump(); - - expect(find.byType(Text), findsNWidgets(2)); - expect(find.textContaining('from'), findsOneWidget); - expect(find.textContaining('PALISADOES'), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/widgets/lang_switch_test.dart b/test/widget_tests/widgets/lang_switch_test.dart deleted file mode 100644 index 02b6be38f..000000000 --- a/test/widget_tests/widgets/lang_switch_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/router.dart' as router; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/views/pre_auth_screens/select_language.dart'; -import 'package:talawa/widgets/lang_switch.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createLanguageTile() { - return BaseView( - onModelReady: (appLanguageModel) => appLanguageModel.initialize(), - builder: (_, __, ___) => MaterialApp( - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - navigatorKey: locator().navigatorKey, - onGenerateRoute: router.generateRoute, - home: const Scaffold( - body: LanguageTile(), - ), - ), - ); -} - -void main() { - testSetupLocator(); - sizeConfig.test(); - group('Test for LanguageTile', () { - testWidgets('Check if LanguageTile widget shows up', (tester) async { - await tester.pumpWidget(createLanguageTile()); - await tester.pump(); - - expect(find.byType(ListTile), findsOneWidget); - expect(find.byType(TextButton), findsOneWidget); - }); - - testWidgets('Tapping on TextButton pushes SelectLanguage widget', - (tester) async { - await tester.pumpWidget(createLanguageTile()); - await tester.pump(); - - await tester.tap(find.byType(TextButton)); - await tester.pumpAndSettle(); - - expect(find.byType(SelectLanguage), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/widgets/member_name_tile_test.dart b/test/widget_tests/widgets/member_name_tile_test.dart deleted file mode 100644 index 21691f147..000000000 --- a/test/widget_tests/widgets/member_name_tile_test.dart +++ /dev/null @@ -1,157 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:network_image_mock/network_image_mock.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/widgets/member_name_tile.dart'; - -bool isDeleted = false; - -void onDelete() { - isDeleted = true; -} - -Widget createMemberNameTile({String? userImage}) { - return MaterialApp( - theme: TalawaTheme.darkTheme, - home: Material( - child: MemberNameTile( - userName: 'ravidev', - userImage: userImage, - onDelete: onDelete, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - - group('Tests for MemberNameTile widget', () { - testWidgets('Checking if the widget shows up', (tester) async { - await tester.pumpWidget(createMemberNameTile()); - - expect(find.byType(Padding), findsWidgets); - }); - - testWidgets('Checking for the child Container', (tester) async { - await tester.pumpWidget(createMemberNameTile()); - - final containerFinder = find.byType(Container).first; - final container = tester.firstWidget(find.byType(Container)); - - expect(containerFinder, findsOneWidget); - - expect( - (container as Container).decoration, - BoxDecoration( - borderRadius: BorderRadius.circular(SizeConfig.screenHeight! * 0.02), - color: TalawaTheme.darkTheme.colorScheme.primaryContainer, - ), - ); - }); - - testWidgets('Checking for the Row', (tester) async { - await tester.pumpWidget(createMemberNameTile()); - - final rowFinder = find.byType(Row); - final row = tester.firstWidget(rowFinder); - - expect(rowFinder, findsOneWidget); - - expect((row as Row).mainAxisAlignment, MainAxisAlignment.spaceBetween); - expect(row.crossAxisAlignment, CrossAxisAlignment.center); - - expect(row.children[0], isA()); - expect(row.children[1], isA()); - expect(row.children[2], isA()); - }); - - testWidgets('Checking for CircleAvatar (without image)', (tester) async { - await tester.pumpWidget(createMemberNameTile()); - - final circleAvatarFinder = find.byType(CircleAvatar); - final circleAvatar = tester.firstWidget(circleAvatarFinder); - expect(circleAvatarFinder, findsOneWidget); - - expect( - (circleAvatar as CircleAvatar).radius, - SizeConfig.screenHeight! * 0.0201, - ); - expect( - circleAvatar.backgroundColor, - TalawaTheme.darkTheme.colorScheme.secondary, - ); - expect( - circleAvatar.child, - isA().having( - (text) => text.style, - 'Checking text style', - const TextStyle(color: Colors.white), - ), - ); - - expect(find.textContaining('R'), findsOneWidget); - }); - - testWidgets('Checking for CircleAvatar (with image)', (tester) async { - const String userImage = 'https://www.example.org/non-existent.png'; - - // Mock NetworkImages for CircularAvatar - await mockNetworkImagesFor( - () => tester.pumpWidget( - createMemberNameTile(userImage: userImage), - ), - ); - - final circleAvatarFinder = find.byType(CircleAvatar); - final circleAvatar = tester.firstWidget(circleAvatarFinder); - - expect(circleAvatarFinder, findsOneWidget); - - expect( - (circleAvatar as CircleAvatar).radius, - SizeConfig.screenHeight! * 0.0201, - ); - expect( - circleAvatar.backgroundImage, - const NetworkImage(userImage), - ); - expect( - circleAvatar.backgroundColor, - null, - ); - expect( - circleAvatar.child, - null, - ); - - expect(find.textContaining('R'), findsNWidgets(0)); - }); - - testWidgets('Checking for the cancel button', (tester) async { - await tester.pumpWidget(createMemberNameTile()); - - final iconButtonFinder = find.byType(IconButton); - final iconButton = tester.firstWidget(iconButtonFinder); - - expect(iconButtonFinder, findsOneWidget); - - expect((iconButton as IconButton).padding, EdgeInsets.zero); - expect( - iconButton.icon, - isA() - .having((icon) => icon.color, 'color', const Color(0xff524F4F)) - .having((icon) => icon.size, 'size', 19), - ); - - expect(isDeleted, false); - await tester.tap(iconButtonFinder); - await tester.pump(); - expect(isDeleted, true); - }); - }); -} diff --git a/test/widget_tests/widgets/pinned_carousel_widget_test.dart b/test/widget_tests/widgets/pinned_carousel_widget_test.dart deleted file mode 100644 index 2b68f2d43..000000000 --- a/test/widget_tests/widgets/pinned_carousel_widget_test.dart +++ /dev/null @@ -1,152 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/pinned_carousel_widget.dart'; - -import '../../helpers/test_locator.dart'; - -List pinnedPosts = [ - Post(sId: 'ravidi', creator: User(), description: 'henlo_boi_'), - Post(sId: 'ravidi', creator: User(), description: 'henlo_boi_' * 10), -]; - -Widget createPinnedCarouselWidget() { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: PinnedPostCarousel( - pinnedPosts: pinnedPosts, - navigateToPinnedPostPage: () { - navigationService.pushDialog( - const AlertDialog(), - ); - }, - navigateToIndividualPostPage: - () {}, // Since it's not used in the widget file anywhere, so no way of testing it. - ), - ), - ); -} - -void main() { - testSetupLocator(); - SizeConfig().test(); - group('Test for PinnedPostCarousel', () { - testWidgets('Check if the widget shows up', (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pump(); - - expect(find.byType(PinnedPostCarousel), findsOneWidget); - }); - - testWidgets('Check for inner children', (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pump(); - - expect( - find.byType(Row), - findsNWidgets(2), - ); // 1 from CustomCarouselScroller - expect( - find.byType(Expanded), - findsNWidgets(7), - ); // 4 from CustomCarouselScroller - expect(find.byType(GestureDetector), findsNWidgets(2)); - }); - - testWidgets('Check if texts show up', (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pump(); - - expect(find.textContaining("See all Pinned news"), findsOneWidget); - expect(find.textContaining("henlo_boi_"), findsOneWidget); - - // TODO: uncomment when page view gets implemented - - // await tester.scrollUntilVisible(find.byType(PageView), 10); // Future reference - // await tester.pump(const Duration(seconds: 1)); // Future reference - // expect(find.textContaining("${'henlo_boi_' * 9}..."), findsOneWidget); // Future reference - }); - - testWidgets('Check if navigating to pinned post works', (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pump(); - - expect(find.byType(AlertDialog), findsNothing); - - await tester.tap(find.byType(GestureDetector).last); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(AlertDialog), findsOneWidget); - }); - - testWidgets('Testing for different lengths of description Strings', - (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pumpAndSettle(); - }); - testWidgets('PageView onPageChanged test', (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pumpAndSettle(); - final customCarouselScroller = find.byType(CustomCarouselScroller); - final CustomCarouselScrollerState customCarouselScrollerState = - tester.state(customCarouselScroller); - expect( - pinnedPosts[customCarouselScrollerState.pindex].description!.length, - lessThanOrEqualTo(90), - ); - customCarouselScrollerState.controller.jumpToPage(1); - expect(customCarouselScrollerState.pindex, 1); - expect( - pinnedPosts[customCarouselScrollerState.pindex].description!.length, - greaterThan(90), - ); - }); - - testWidgets('Test the text displayed based on length of description', - (tester) async { - await tester.pumpWidget(createPinnedCarouselWidget()); - await tester.pumpAndSettle(); - final customCarouselScroller = find.byType(CustomCarouselScroller); - final CustomCarouselScrollerState customCarouselScrollerState = - tester.state(customCarouselScroller); - int currentPage = customCarouselScrollerState.pindex; - - expect(find.text(pinnedPosts[currentPage].description!), findsOneWidget); - customCarouselScrollerState.controller.jumpToPage(1); - await tester.pump(); - currentPage = customCarouselScrollerState.pindex; - expect( - find.text( - '${pinnedPosts[currentPage].description!.substring(0, 90)}...', - ), - findsOneWidget, - ); - }); - }); -} diff --git a/test/widget_tests/widgets/pinned_post_test.dart b/test/widget_tests/widgets/pinned_post_test.dart deleted file mode 100644 index 51a1533bf..000000000 --- a/test/widget_tests/widgets/pinned_post_test.dart +++ /dev/null @@ -1,244 +0,0 @@ -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/views/after_auth_screens/feed/pinned_post_screen.dart'; -import 'package:talawa/widgets/pinned_post.dart'; -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -/// List of pinned posts. -/// -///This file contains demo data for pinned posts. It contains a list of type Map and sample data. -const pinnedPostsDemoData = [ - { - "_id": "1", - "text": "church meeting", - "createdAt": "2023-03-15T15:28:52.122Z", - "imageUrl": - "https://imgs.search.brave.com/OHazbRf4oO5wuydAbr6061fUGuEw-rlDB1SuXWnJgTo/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9pLnBp/bmltZy5jb20vb3Jp/Z2luYWxzLzZiLzIy/L2JhLzZiMjJiYTg2/Yzk3NjBiMzQ4YjNh/NTMzOGFjMzI4ZmJm/LmpwZw", - "creator": { - "firstName": "Rutvik", - "lastName": "Chandla", - "id": "asdasdasd", - }, - "likedBy": [ - {"firstName": "User", "lastName": "1", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "2", "id": "asdasdasdas"}, - {"firstName": "User", "lastName": "3", "id": "asdasdasdas"}, - ], - "comments": [ - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - { - "text": "This is the posted comment", - "creator": {"firstName": "User", "lastName": "4", "id": "asdasdasdas"}, - }, - ], - }, -]; - -///List of pinned post. -List _pinnedPosts = - pinnedPostsDemoData.map((e) => Post.fromJson(e)).toList(); - -/// getter for pinned post. -/// -/// **params**: - -List get pinnedPosts { - return _pinnedPosts; -} - -/// main function. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - testSetupLocator(); - locator().test(); - setUp(() { - registerServices(); - locator().test(); - }); - tearDown(() { - unregisterServices(); - }); - - testWidgets('If container is coming on calling pinnedwidget', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - expect(find.byKey(const Key('hello')), findsOneWidget); - }); - - testWidgets('Text widget is present when there are pinned posts', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - expect(find.byType(Text), findsWidgets); - }); - - testWidgets('Text widget displays the correct text', (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - expect(find.text('church meeting'), findsOneWidget); - }); - - testWidgets('Tapping on a post triggers navigation', (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - - await widgetTester.tap(find.byType(GestureDetector)); - await widgetTester.pumpAndSettle(); - expect(find.byType(PinnedPost), findsNothing); - expect(find.byType(PinnedPostScreen), findsOneWidget); - }); - - testWidgets('Container comes if list is empty', (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost(pinnedPost: [], model: mainScreenViewModel), - ), - ); - await widgetTester.pump(); - expect(find.byKey(const Key('hi')), findsOneWidget); - }); - testWidgets('Error widget is displayed when image fails to load', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => widget is CachedNetworkImage && widget.errorWidget != null, - ), - findsOneWidget, - ); - }); - - testWidgets('CircularProgressIndicator is shown when image fails to load', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.errorWidget != null && - widget.errorWidget is Function && - widget.errorWidget!( - widgetTester.binding.rootElement!, - '', - Exception(), - ) is SizedBox, - ), - findsOneWidget, - ); - }); - testWidgets('CachedNetworkImage displays correct image', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - - expect( - find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.imageUrl == pinnedPosts[0].imageUrl, - ), - findsOneWidget, - ); - }); - - testWidgets('CachedNetworkImage displays correct image', - (widgetTester) async { - await widgetTester.pumpWidget( - MaterialApp( - home: PinnedPost( - pinnedPost: pinnedPosts, - model: mainScreenViewModel, - ), - ), - ); - await widgetTester.pump(const Duration(seconds: 5)); - - final imageWidget = find.byWidgetPredicate( - (widget) => - widget is CachedNetworkImage && - widget.imageUrl == pinnedPosts[0].imageUrl, - ); - - expect(imageWidget, findsOneWidget); - }); -} diff --git a/test/widget_tests/widgets/post_container_test.dart b/test/widget_tests/widgets/post_container_test.dart deleted file mode 100644 index af78704cc..000000000 --- a/test/widget_tests/widgets/post_container_test.dart +++ /dev/null @@ -1,155 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail_image_network/mocktail_image_network.dart'; -import 'package:talawa/widgets/post_container.dart'; - -/// main function. -/// -/// **params**: -/// None -/// -/// **returns**: -/// None -void main() { - group('PostContainer Widget Tests', () { - testWidgets('PostContainer should be built without crashing', - (WidgetTester tester) async { - await tester.runAsync(() async { - await mockNetworkImages(() async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ); - }); - - expect(find.byType(PostContainer), findsOneWidget); - }); - }); - testWidgets( - 'PostContainer should display an image when photoUrl is provided', - (tester) async { - await mockNetworkImages( - () async => tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ), - ); - - expect(find.byType(Image), findsOneWidget); - }); - - testWidgets( - 'PostContainer should not display an image when photoUrl is null', - (tester) async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer(photoUrl: null), - ), - ); - expect(find.byType(Image), findsNothing); - expect(find.byType(Container), findsOneWidget); - }); - - testWidgets( - 'initState should be called and variables should be initialized correctly', - (WidgetTester tester) async { - await tester.runAsync(() async { - await mockNetworkImages(() async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ); - }); - final postContainerState = - tester.state(find.byType(PostContainer)); - expect(postContainerState.startedPlaying, isFalse); - expect(postContainerState.inView, isTrue); - expect(find.byType(PostContainer), findsOneWidget); - }); - }); - - testWidgets( - 'PageController should be disposed when widget is removed from tree', - (WidgetTester tester) async { - await tester.runAsync(() async { - await mockNetworkImages(() async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ); - }); - final postContainerState = - tester.state(find.byType(PostContainer)); - final pageController = postContainerState.controller; - - await tester.pumpWidget( - MaterialApp(home: Container()), - ); - - try { - pageController.position; - fail('Should throw AssertionError'); - } catch (e) { - expect(e, isInstanceOf()); - } - }); - }); - - testWidgets('PostContainer should change inView to true when visible', - (WidgetTester tester) async { - await tester.runAsync(() async { - await mockNetworkImages(() async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ); - }); - - final postContainerState = - tester.state(find.byType(PostContainer)); - expect(postContainerState.inView, isTrue); - }); - }); - - testWidgets('PostContainer should change inView to false when not visible', - (WidgetTester tester) async { - await tester.runAsync(() async { - await mockNetworkImages(() async { - await tester.pumpWidget( - const MaterialApp( - home: PostContainer( - photoUrl: - 'https://www.fcbarcelona.com/fcbarcelona/photo/2022/08/02/ae5252d1-b79b-4950-9e34-6e67fac09bb0/LeoMessi20092010_pic_fcb-arsenal62.jpg', - ), - ), - ); - }); - - final postContainerState = - tester.state(find.byType(PostContainer)); - postContainerState.inView = false; - expect(postContainerState.inView, isFalse); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/post_detailed_page_test.dart b/test/widget_tests/widgets/post_detailed_page_test.dart deleted file mode 100644 index 772298d02..000000000 --- a/test/widget_tests/widgets/post_detailed_page_test.dart +++ /dev/null @@ -1,238 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/post_detailed_page.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -const longString = - 'iloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamiloveicecreamil888890'; -const shortString = 'I love ice-cream'; -const tagString = 'I love ice-cream #icecream'; -const multiTagString = 'I love ice-cream #icec#ream'; -Widget createDescriptionTextWidgetWithShortText() { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const Scaffold( - body: DescriptionTextWidget( - text: shortString, - ), - ), - ); -} - -Widget createDescriptionTextWidgetWithLongText() { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const Scaffold( - body: DescriptionTextWidget( - text: longString, - ), - ), - ); -} - -Widget createDescriptionTextWidgetWithTag() { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const Scaffold( - body: DescriptionTextWidget( - text: tagString, - ), - ), - ); -} - -Widget createDescriptionTextWidgetWithMultiTag() { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const Scaffold( - body: DescriptionTextWidget( - text: multiTagString, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - locator.registerSingleton(NavigationService()); - - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - }); - group('Description Widget test', () { - testWidgets( - "Test if Description text Widget is displayed with text less than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithShortText()); - await tester.pump(); - expect(find.byType(DescriptionTextWidget), findsOneWidget); - }); - }); - testWidgets( - "Test if Description text Widget is displayed with text more than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithLongText()); - await tester.pump(); - expect(find.byType(DescriptionTextWidget), findsOneWidget); - }); - }); - testWidgets( - "Test if Description text Widget is displayed with text more than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithTag()); - await tester.pump(); - expect(find.byType(DescriptionTextWidget), findsOneWidget); - }); - }); - testWidgets( - "Test if Description text Widget is displayed with text more than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithMultiTag()); - await tester.pump(); - expect(find.byType(DescriptionTextWidget), findsOneWidget); - }); - }); - testWidgets("Test if 1 text Widget is displayed with text less than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithShortText()); - await tester.pump(); - expect(find.byType(Text), findsNWidgets(1)); - }); - }); - - testWidgets("Test if 2 text Widget is displayed with text more than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithLongText()); - await tester.pump(); - expect(find.byType(Text), findsNWidgets(2)); - }); - }); - - testWidgets( - "Test if text Widget display content properly with text more than 150", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithLongText()); - await tester.pump(); - expect(find.text('${longString.substring(0, 150)}...'), findsOneWidget); - }); - }); - - testWidgets("Test if show more button is working", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithLongText()); - await tester.pump(); - final showLessMore = find.byType(InkWell); - await tester.tap(showLessMore); - await tester.pump(); - //showing more - expect(find.text(longString), findsOneWidget); - }); - }); - testWidgets("Test if show less button is working", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createDescriptionTextWidgetWithLongText()); - await tester.pump(); - final showLessMore = find.byType(InkWell); - await tester.tap(showLessMore); - await tester.pump(); - - await tester.tap(showLessMore); - await tester.pump(); - //showing less - expect(find.text('${longString.substring(0, 150)}...'), findsOneWidget); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/post_list_widget_test.dart b/test/widget_tests/widgets/post_list_widget_test.dart deleted file mode 100644 index 2097168c6..000000000 --- a/test/widget_tests/widgets/post_list_widget_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/widgets/post_list_widget.dart'; - -import '../../helpers/test_helpers.dart'; - -void main() { - const Key postListKey = Key("postListKey"); - - Widget createPostListWidget(List postlist) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: Scaffold( - body: PostListWidget( - posts: postlist, - key: postListKey, - ), - ), - ); - } - - group("Post List Widget Test-", () { - setUp(() { - registerServices(); - locator.registerFactory(() => LikeButtonViewModel()); - }); - - tearDown(() { - unregisterServices(); - locator.unregister(); - }); - - testWidgets("Test if PostList Widget is displayed ", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createPostListWidget([])); - await tester.pump(); - final postListFinder = find.byKey(postListKey); - expect(postListFinder, findsOneWidget); - }); - }); - - testWidgets("Test if PostList Widget is not scrollable", - (WidgetTester tester) async { - final mockPost1 = getPostMockModel(description: "MockPost1"); - final mockPost2 = getPostMockModel(description: "MockPost2"); - - final List postList = [mockPost1, mockPost2]; - //Extremely large screen to test if scrolling takes place - - // ignore: deprecated_member_use - tester.binding.window.physicalSizeTestValue = const Size(100000, 100000); - await tester.runAsync(() async { - await tester.pumpWidget(createPostListWidget(postList)); - await tester.pump(); - //Attempt to scroll - - // await tester.drag(find.byType(ListView), const Offset(0, -800)); - // await tester.pump(); - // First post in list should still be visible as scrolling is disabled - expect(find.text(mockPost1.description!), findsOneWidget); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/post_modal_test.dart b/test/widget_tests/widgets/post_modal_test.dart deleted file mode 100644 index 0ee90eb12..000000000 --- a/test/widget_tests/widgets/post_modal_test.dart +++ /dev/null @@ -1,202 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/models/comment/comment_model.dart'; -import 'package:talawa/models/organization/org_info.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/models/user/user_info.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/lang_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/post_modal.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -//Mock classes -class MockFunction extends Mock { - void call(Post post); -} - -class MockNavigationService extends Mock implements NavigationService {} - -//test data -final MockFunction mockDeletePost = MockFunction(); -final LikedBy user = LikedBy(sId: "test_id"); - -//fake user data -final u1 = User( - id: '123', - firstName: 'Lakshay', - lastName: 'Gupta', - email: 'test@test.com', -); -final u2 = User( - id: '123', - firstName: 'Ankit', - lastName: 'Varshney', - email: 'test@test.com', -); -final List users = [u1, u2]; - -List comments = [ - Comments(sId: 'comment1'), - Comments(sId: 'comment2'), - Comments(sId: 'comment3'), - Comments(sId: 'comment4'), - Comments(sId: 'comment5'), - Comments(sId: 'comment6'), -]; - -//fake comment data -final comment = Comment( - creator: User( - id: '123', - firstName: 'Ankit', - lastName: 'Varshney', - email: 'test@test.com', - ), - createdAt: '123456', - text: 'test text', - post: 'test post', - likeCount: 'test count', -); - -final LikedBy l1 = LikedBy(sId: 'test1'); -final LikedBy l2 = LikedBy(sId: 'test2'); -final List likeby = [l1, l2]; - -final comment1 = Comments(sId: 'comment1'); -final comment2 = Comments(sId: 'comment2'); -final comment3 = Comments(sId: 'comment3'); -final List comments1 = [comment1, comment2, comment3]; - -final myBirthday = DateTime.utc(2004, DateTime.june, 16, 5, 30, 0, 0, 0); - -//fake post data -final post = Post( - creator: User( - id: '123', - firstName: 'John', - lastName: 'Doe', - email: 'test@test.com', - ), - sId: "sid", - createdAt: myBirthday, - description: 'test description', - organization: OrgInfo(admins: users), - likedBy: likeby, - comments: comments1, -); - -Widget createPostBottomModal() { - return BaseView( - onModelReady: (model) => model.initialize(), - builder: (context, model, child) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: const [ - AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: PostBottomModal( - post: post, - deletePost: mockDeletePost, - ), - navigatorKey: navigationService.navigatorKey, - ); - }, - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - - setUp(() { - registerServices(); - }); - - tearDown(() => unregisterServices()); - - group('PostBottomModalTest -', () { - testWidgets('has a post widget', (tester) async { - await tester.pumpWidget(createPostBottomModal()); - await tester.pumpAndSettle(); - - // Verify the existence of PostBottomModal widget and reportPost button - expect(find.byType(PostBottomModal), findsOneWidget); - expect(find.byKey(const Key('reportPost')), findsOneWidget); - - // Tap the reportPost button and verify the behavior - await tester.tap(find.byKey(const Key('reportPost'))); - await tester.pumpAndSettle(); - - verify( - navigationService.showTalawaErrorSnackBar( - 'Your Report has been sent to the Admin', - MessageType.info, - ), - ).called(1); - }); - - testWidgets('Testing the delete Post button', (tester) async { - await tester.pumpWidget(createPostBottomModal()); - await tester.pumpAndSettle(); - - // Verify the existence of delete Post button - expect(find.byIcon(Icons.delete), findsOneWidget); - expect(find.byKey(const Key('deletePost')), findsOneWidget); - - // Tap the delete Post button and verify the behavior - await tester.tap(find.byKey(const Key('deletePost'))); - await tester.pumpAndSettle(); - - verify(mockDeletePost.call(post)).called(1); - - // Verify the presence of AlertDialog and its elements - expect(find.byType(AlertDialog), findsOneWidget); - expect(find.byKey(const Key('alert_dialog_yes_btn')), findsOneWidget); - expect(find.text('The post was deleted'), findsOneWidget); - - // Tap the yes button in AlertDialog and verify the behavior - await tester.tap(find.byKey(const Key('alert_dialog_yes_btn'))); - await tester.pumpAndSettle(); - - verify( - navigationService.showTalawaErrorSnackBar( - 'Post was deleted if you had the rights!', - MessageType.info, - ), - ).called(1); - }); - - testWidgets("Testing no button of alertDialogBox", (tester) async { - await tester.pumpWidget(createPostBottomModal()); - await tester.pumpAndSettle(); - - // Tap the delete Post button and verify the behavior - expect(find.byKey(const Key('deletePost')), findsOneWidget); - await tester.tap(find.byKey(const Key('deletePost'))); - await tester.pumpAndSettle(); - - verify(mockDeletePost.call(post)).called(1); - - // Verify the presence of AlertDialog and its no button - expect(find.byType(AlertDialog), findsOneWidget); - expect(find.byKey(const Key('alert_dialog_no_btn')), findsOneWidget); - - // Tap the no button in AlertDialog and verify the behavior - await tester.tap(find.byKey(const Key('alert_dialog_no_btn'))); - await tester.pumpAndSettle(); - - // Verify that AlertDialog is dismissed - expect(find.byType(AlertDialog), findsNothing); - }); - }); -} diff --git a/test/widget_tests/widgets/post_widget_test.dart b/test/widget_tests/widgets/post_widget_test.dart deleted file mode 100644 index 5064449a9..000000000 --- a/test/widget_tests/widgets/post_widget_test.dart +++ /dev/null @@ -1,435 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:network_image_mock/network_image_mock.dart'; -import 'package:talawa/constants/custom_theme.dart'; -import 'package:talawa/locator.dart'; -import 'package:talawa/models/post/post_model.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/widgets_view_models/like_button_view_model.dart'; -import 'package:talawa/views/base_view.dart'; -import 'package:talawa/widgets/custom_avatar.dart'; -import 'package:talawa/widgets/multi_reaction.dart'; -import 'package:talawa/widgets/post_container.dart'; -import 'package:talawa/widgets/post_detailed_page.dart'; -import 'package:talawa/widgets/post_modal.dart'; -import 'package:talawa/widgets/post_widget.dart'; -// import 'package:talawa/widgets/video_widget.dart'; -// import 'package:visibility_detector/visibility_detector.dart'; - -import '../../helpers/test_helpers.dart'; - -/// Key for NewsPost widget. -const Key newsPostKey = Key("newsPostKey"); - -/// Key for PostContainer widget. -const Key postContainerKey = Key("postContainerKey"); - -/// [createNewsPostWidget] is a method that returns a NewsPost widget. -/// -/// **params**: -/// * `function`: Function(Post)? - function to be called when the post comment is clicked. -/// * `post`: Post object containing all the data related to the post. -/// -/// **returns**: -/// * `Widget`: NewsPost widget. -Widget createNewsPostWidget([Function(Post)? function, Post? post]) { - return MaterialApp( - locale: const Locale('en'), - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - themeMode: ThemeMode.light, - theme: TalawaTheme.lightTheme, - home: Scaffold( - body: NewsPost( - key: newsPostKey, - post: post ?? getPostMockModel(), - function: function, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - locator.registerSingleton(NavigationService()); - - setUp(() { - registerServices(); - registerViewModels(); - }); - - tearDown(() { - unregisterViewModels(); - unregisterServices(); - }); - - group('Testing News Post Widget - ', () { - testWidgets("Test if News Post Widget is displayed ", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - expect(postFinder, findsOneWidget); - }); - }); - - group('Post Widget Test functionality-', () { - testWidgets("Test if like button changes colour if liked", - (WidgetTester tester) async { - await tester.runAsync(() async { - final Post post = getPostMockModel(); - when(post.likedBy).thenReturn([LikedBy(sId: "xzy1")]); - await tester.pumpWidget( - createNewsPostWidget( - null, - post, - ), - ); - await tester.pump(); - - final postFinder = find.byKey(newsPostKey); - final columnFinder = - find.descendant(of: postFinder, matching: find.byType(Column)); - final column2Finder = columnFinder.at(2); - final secondColumnWidget = - tester.firstWidget(column2Finder) as Column; - print(secondColumnWidget); - - // final thirdPaddingWidget = secondColumnWidget.children[2] as Padding; - // - // final first3GestureDetectorFinder = find.descendant( - // of: find.byWidget(thirdPaddingWidget), - // matching: find.byType(GestureDetector), - // ); - // final first3GestureDetectorWidget = tester - // .firstWidget(first3GestureDetectorFinder) as GestureDetector; - - // expect( - // (first3GestureDetectorWidget.child! as Icon).color, - // TalawaTheme.lightTheme.colorScheme.secondary, - // ); - }); - }); - - testWidgets("test onTap of GestureDetector's", (tester) async { - await tester.runAsync(() async { - int clicked = 0; - await tester - .pumpWidget(createNewsPostWidget((Post post) => clicked++)); - await tester.pump(); - - await tester.tap(find.byKey(const Key('commentButton'))); - await tester.pump(); - expect(clicked, 1); - - await tester.tap(find.byType(GestureDetector).last); - await tester.pump(); - expect(clicked, 2); - }); - }); - }); - - group("Post Widget Test is all Widgets exist-", () { - testWidgets("Test if Column exists", (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final firstColumnFinder = find - .descendant(of: postFinder, matching: find.byType(Column)) - .first; - - //Test if 3 Columns exists - expect(firstColumnFinder, findsOneWidget); - - final firstColumnWidget = - tester.firstWidget(firstColumnFinder) as Column; - - // Test if first column has cross axis alignment of start - expect( - firstColumnWidget.crossAxisAlignment, - CrossAxisAlignment.start, - ); - - // Testing if all direct children of column are there - expect(firstColumnWidget.children[0], isA()); - expect(firstColumnWidget.children[1], isA()); - // expect(firstColumnWidget.children[2], isA()); - expect( - firstColumnWidget.children[2], - isA>(), - ); - }); - }); - testWidgets('Test Props of List Tile', (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = find - .descendant(of: postFinder, matching: find.byType(Column)) - .first; - - final listTileFinder = find.descendant( - of: columnFinder, - matching: find.byType(ListTile), - ); - - // Tests if List Tile is a child of the first Column - expect(listTileFinder, findsOneWidget); - - final listTileWidget = tester.firstWidget(listTileFinder) as ListTile; - - // Tests if leading of list tile is custom avatar - expect(listTileWidget.leading.runtimeType, CustomAvatar); - - final customAvatarFinder = find.descendant( - of: listTileFinder.first, - matching: find.byType(CustomAvatar), - ); - - // Tests if Custom Avatar is a descendant of list tile - expect(customAvatarFinder, findsOneWidget); - - final customAvatarWidget = - tester.firstWidget(customAvatarFinder) as CustomAvatar; - - // Testing props of Custom Avatar Widget - expect(customAvatarWidget.isImageNull, true); - expect(customAvatarWidget.imageUrl, ' /null'); - expect(customAvatarWidget.fontSize, 20); - expect(customAvatarWidget.firstAlphabet, 'T'); - - // Tests if leading of list tile is custom avatar - expect(listTileWidget.title.runtimeType, Text); - - final textsOfListTileFinder = find.descendant( - of: listTileFinder.first, - matching: find.byType(Text), - ); - - // Testing if 3 Text Widget are children of list tile - // expect(textsOfListTileFinder, findsNWidgets(3)); - - final titleListTileFinder = textsOfListTileFinder.at(1); - final titleListTileWidget = - tester.firstWidget(titleListTileFinder) as Text; - - // Testing properties of title Text Widget of list tile - expect(titleListTileWidget.data, "TestName null"); - expect(titleListTileWidget.style!.fontSize, 16); - expect(titleListTileWidget.style!.fontWeight, FontWeight.w400); - - final subtitleListTileFinder = textsOfListTileFinder.at(1); - final subtitleListTileWidget = - tester.firstWidget(subtitleListTileFinder) as Text; - - // Testing properties of title Text Widget of list tile - expect(subtitleListTileWidget.data, "TestName null"); - }); - }); - testWidgets("Test props of DescriptionTextWidget", - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = find - .descendant(of: postFinder, matching: find.byType(Column)) - .first; - final descriptionTextWidgetFinder = find.descendant( - of: columnFinder, - matching: find.byType(DescriptionTextWidget), - ); - - // Testing if DescriptionTextWidget shows - expect(descriptionTextWidgetFinder, findsOneWidget); - - final descriptionTextWidget = - tester.firstWidget(descriptionTextWidgetFinder) - as DescriptionTextWidget; - - // Testing if the text description is correct - expect(descriptionTextWidget.text, "TestDescription"); - }); - }); - - testWidgets("Test props of Base view", (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = - find.descendant(of: postFinder, matching: find.byType(Column)); - - final baseViewWidget = (tester.firstWidget(columnFinder) as Column) - .children[2] as BaseView; - - // Testing if the text description is correct - expect(baseViewWidget.onModelReady, isNotNull); - expect(baseViewWidget.builder, isNotNull); - final column2Finder = columnFinder.at(2); - expect(column2Finder, findsOneWidget); - - final secondColumnWidget = - tester.firstWidget(column2Finder) as Column; - print(secondColumnWidget); - }); - }); - - group('Test props of children for baseview', () { - testWidgets( - 'Test MultiReactButton presence and onReactionChanged property in NewsPostWidget', - (WidgetTester tester) async { - await tester.runAsync(() async { - // Variable to check if onReactionChanged is called - bool reactionChangedCalled = false; - - // Build the NewsPostWidget containing the MultiReactButton - await tester.pumpWidget( - MultiReactButton( - toggle: () { - // Set the flag when onReactionChanged is called - reactionChangedCalled = true; - }, - ), - ); - - // Find the MultiReactButton widget within the NewsPostWidget - final multiReactButtonFinder = find.byType(MultiReactButton); - - // Ensure the MultiReactButton widget is present in the widget tree - expect(multiReactButtonFinder, findsOneWidget); - - // Simulate a reaction change on the MultiReactButton - await tester.tap( - multiReactButtonFinder, - ); // Replace with your actual tap action - await tester.pump(); - - // Ensure that onReactionChanged callback was triggered - expect(reactionChangedCalled, true); - }); - }); - testWidgets('Test props first padding widget', - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = - find.descendant(of: postFinder, matching: find.byType(Column)); - final column2Finder = columnFinder.at(2); - final secondColumnWidget = - tester.firstWidget(column2Finder) as Column; - final firstPaddingWidget = - secondColumnWidget.children[0] as Padding; - - final firstGestureDetectorFinder = find.descendant( - of: find.byWidget(firstPaddingWidget), - matching: find.byType(GestureDetector), - ); - print(firstGestureDetectorFinder); - - final secondGestureDetectorFinder = find.descendant( - of: find.byWidget(firstPaddingWidget), - matching: find.byType(GestureDetector), - ); - print(secondGestureDetectorFinder); - }); - }); - - testWidgets('Test props second padding widget', - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = - find.descendant(of: postFinder, matching: find.byType(Column)); - final column2Finder = columnFinder.at(2); - final secondColumnWidget = - tester.firstWidget(column2Finder) as Column; - final secondPaddingWidget = - secondColumnWidget.children[1] as Padding; - print(secondPaddingWidget); - }); - }); - - testWidgets('Test props third padding widget', - (WidgetTester tester) async { - await tester.runAsync(() async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - final postFinder = find.byKey(newsPostKey); - final columnFinder = - find.descendant(of: postFinder, matching: find.byType(Column)); - final column2Finder = columnFinder.at(2); - final secondColumnWidget = - tester.firstWidget(column2Finder) as Column; - print(secondColumnWidget); - }); - }); - - testWidgets('Test if report button opens modal bottom sheet', - (WidgetTester tester) async { - await tester.pumpWidget(createNewsPostWidget()); - await tester.pump(); - - final reportButtonFinder = find.byKey(const Key('reportButton')); - expect(reportButtonFinder, findsOneWidget); - - await tester.tap(reportButtonFinder); - await tester.pumpAndSettle(); - - final modalBottomSheetFinder = - find.byKey(const Key('reportPost')).first; - expect(modalBottomSheetFinder, findsOneWidget); - - final postBottomModalFinder = find.byType(PostBottomModal); - expect(postBottomModalFinder, findsOneWidget); - }); - - testWidgets("Test post image", (tester) async { - await tester.runAsync(() async { - await mockNetworkImagesFor(() async { - final Post post = getPostMockModel(); - when(post.imageUrl).thenReturn( - "testImageUrl", - ); - - await tester.pumpWidget( - createNewsPostWidget( - null, - post, - ), - ); - - await tester.pumpAndSettle(); - - final postParentContainer = - find.byKey(const Key('postParentContainer')); - expect(postParentContainer, findsOneWidget); - final postContainer = find - .descendant( - of: postParentContainer, - matching: find.byType(PostContainer), - ) - .first; - - expect(postContainer, findsOneWidget); - }); - }); - }); - }); - }); - }); -} diff --git a/test/widget_tests/widgets/raised_round_edge_button_test.dart b/test/widget_tests/widgets/raised_round_edge_button_test.dart deleted file mode 100644 index 563d093ec..000000000 --- a/test/widget_tests/widgets/raised_round_edge_button_test.dart +++ /dev/null @@ -1,156 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/widgets/raised_round_edge_button.dart'; - -const backgroundColor = Colors.black; -const foregroundColor = Colors.white; -const key = Key('ravidi'); -const buttonLabel = 'm_button'; - -int count = 0; - -void onTap() { - count++; -} - -Widget createRaisedRoundButton({ - double? width, - double? height, - bool showArrow = false, -}) { - return MaterialApp( - home: Scaffold( - body: RaisedRoundedButton( - key: key, - backgroundColor: backgroundColor, - textColor: foregroundColor, - buttonLabel: buttonLabel, - onTap: onTap, - width: width, - height: height, - showArrow: showArrow, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - group('Test for RaisedRoundButton widget', () { - testWidgets('Check if the widget shows up', (tester) async { - await tester.pumpWidget(createRaisedRoundButton()); - await tester.pump(); - - expect(find.byKey(key), findsOneWidget); - }); - - testWidgets('Check if tapping works', (tester) async { - await tester.pumpWidget(createRaisedRoundButton()); - await tester.pump(); - - expect(count, 0); - await tester.tap(find.byType(GestureDetector)); - expect(count, 1); - }); - - testWidgets('Check for size (without providing size)', (tester) async { - await tester.pumpWidget(createRaisedRoundButton()); - await tester.pump(); - - final containerFinder = find.byType(Container); - final container = tester.firstWidget(containerFinder); - - expect(containerFinder, findsOneWidget); - - expect( - (container as Container).constraints, - BoxConstraints( - minWidth: SizeConfig.screenWidth! * 0.94, - maxWidth: SizeConfig.screenWidth! * 0.94, - minHeight: SizeConfig.screenHeight! * 0.07, - maxHeight: SizeConfig.screenHeight! * 0.07, - ), - ); - }); - - testWidgets('Check for size (providing size)', (tester) async { - await tester.pumpWidget(createRaisedRoundButton(width: 100, height: 100)); - await tester.pump(); - - final containerFinder = find.byType(Container); - final container = tester.firstWidget(containerFinder); - - expect(containerFinder, findsOneWidget); - - expect( - (container as Container).constraints, - const BoxConstraints( - minWidth: 100, - maxWidth: 100, - minHeight: 100, - maxHeight: 100, - ), - ); - }); - - testWidgets('Check for inner widget (show arrow)', (tester) async { - await tester.pumpWidget(createRaisedRoundButton(showArrow: true)); - await tester.pump(); - - expect(find.byType(Row), findsOneWidget); - expect(find.byType(Expanded), findsNWidgets(3)); - - final iconFinder = find.byType(Icon); - expect(iconFinder, findsNWidgets(2)); - - final iconOne = tester.widgetList(iconFinder).first; - final iconTwo = tester.widgetList(iconFinder).last; - - expect( - iconOne, - isA() - .having( - (icon) => icon.icon, - 'icon', - Icons.arrow_forward, - ) - .having( - (icon) => icon.color, - 'color', - Colors.transparent, - ), - ); - - expect( - iconTwo, - isA() - .having( - (icon) => icon.icon, - 'icon', - Icons.arrow_forward, - ) - .having( - (icon) => icon.color, - 'color', - foregroundColor, - ), - ); - - expect(find.byType(Text), findsOneWidget); - expect(find.textContaining(buttonLabel), findsOneWidget); - }); - - testWidgets("Check for inner widget (don't show arrow)", (tester) async { - await tester.pumpWidget(createRaisedRoundButton()); - await tester.pump(); - - expect(find.byType(Row), findsNothing); - expect(find.textContaining(buttonLabel), findsOneWidget); - expect(find.byType(Text), findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/widgets/recurrence_dialog_test.dart b/test/widget_tests/widgets/recurrence_dialog_test.dart deleted file mode 100644 index 6909cf2bc..000000000 --- a/test/widget_tests/widgets/recurrence_dialog_test.dart +++ /dev/null @@ -1,257 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:intl/intl.dart'; -import 'package:talawa/constants/recurrence_values.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart'; -import 'package:talawa/widgets/recurrence_dialog.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -void main() { - group('ShowRecurrenceDialog', () { - TestWidgetsFlutterBinding.ensureInitialized(); - testSetupLocator(); - locator().test(); - late CreateEventViewModel model; - - setUp(() { - locator().test(); - registerServices(); - model = CreateEventViewModel(); - model.initialize(); - }); - - tearDown(() => unregisterServices()); - - testWidgets('shows correct initial values', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - expect(find.text('Does not repeat'), findsOneWidget); - expect(find.text('Daily'), findsOneWidget); - expect( - find.text( - RecurrenceUtils.getRecurrenceRuleText( - Frequency.weekly, - {RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1]}, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ), - ), - findsOneWidget, - ); - expect( - find.text( - RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - null, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ), - ), - findsOneWidget, - ); - expect( - find.text( - RecurrenceUtils.getRecurrenceRuleText( - Frequency.yearly, - null, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ), - ), - findsOneWidget, - ); - expect( - find.text( - 'Monday to Friday ${model.recurrenceEndDate != null ? "until ${DateFormat('MMMM d, y').format(model.recurrenceEndDate!)}" : ""}', - ), - findsOneWidget, - ); - expect(find.text('Custom...'), findsOneWidget); - }); - - testWidgets('shows correct initial values for last weekday occurrence', - (tester) async { - model.recurrenceStartDate = DateTime(2023, 02, 28); - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - expect( - find.text( - RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - {'TUESDAY'}, - model.interval, - model.count, - -1, - model.recurrenceStartDate, - model.recurrenceEndDate, - ), - ), - findsOneWidget, - ); - }); - - testWidgets('updates model when Does not repeat is selected', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - await tester.tap(find.text('Does not repeat')); - await tester.pump(); - - expect(model.isRecurring, false); - expect(model.recurrenceLabel, 'Does not repeat'); - expect(model.frequency, Frequency.weekly); - expect(model.weekDays, { - days[DateTime.now().weekday - 1], - }); - expect(model.weekDayOccurenceInMonth, null); - }); - - testWidgets('updates model when Daily is selected', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - await tester.tap(find.text('Daily')); - await tester.pump(); - - expect(model.isRecurring, true); - expect(model.recurrenceLabel, 'Daily'); - expect(model.frequency, Frequency.daily); - }); - - testWidgets('updates model when Weekly is selected', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - final label = RecurrenceUtils.getRecurrenceRuleText( - Frequency.weekly, - {RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1]}, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ); - await tester.tap(find.text(label)); - await tester.pump(); - - expect(model.isRecurring, true); - expect(model.recurrenceLabel, label); - expect(model.frequency, Frequency.weekly); - expect( - model.weekDays, - { - RecurrenceUtils.weekDays[model.recurrenceStartDate.weekday - 1] - .toUpperCase(), - }, - ); - }); - - testWidgets('updates model when Monthly is selected', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - final label = RecurrenceUtils.getRecurrenceRuleText( - Frequency.monthly, - null, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ); - - await tester.tap(find.text(label)); - await tester.pump(); - - expect(model.isRecurring, true); - expect(model.recurrenceLabel, label); - expect(model.frequency, Frequency.monthly); - }); - - testWidgets('updates model when Yearly is selected', (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - final label = RecurrenceUtils.getRecurrenceRuleText( - Frequency.yearly, - null, - model.interval, - model.count, - model.weekDayOccurenceInMonth, - model.recurrenceStartDate, - model.recurrenceEndDate, - ); - - await tester.tap(find.text(label)); - await tester.pump(); - - expect(model.isRecurring, true); - expect(model.recurrenceLabel, label); - expect(model.frequency, Frequency.yearly); - }); - - testWidgets('updates model when Monday to Friday is selected', - (tester) async { - await tester.pumpWidget( - MaterialApp( - home: ShowRecurrenceDialog(model: model), - ), - ); - - final label = - 'Monday to Friday ${model.recurrenceEndDate != null ? "until ${DateFormat('MMMM d, y').format(model.recurrenceEndDate!)}" : ""}'; - - await tester.tap(find.text(label)); - await tester.pump(); - - expect(model.isRecurring, true); - expect(model.recurrenceLabel, label); - expect(model.frequency, Frequency.weekly); - expect( - model.weekDays, - { - 'MONDAY', - 'TUESDAY', - 'WEDNESDAY', - 'THURSDAY', - 'FRIDAY', - }, - ); - }); - }); -} diff --git a/test/widget_tests/widgets/rich_text_test.dart b/test/widget_tests/widgets/rich_text_test.dart deleted file mode 100644 index 428dcc5a0..000000000 --- a/test/widget_tests/widgets/rich_text_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/rich_text.dart'; - -const List> words = [ - { - 'text': 'Hello', - 'textStyle': TextStyle(color: Colors.red, fontSize: 20), - }, - { - 'text': 'Hello', - 'textStyle': TextStyle(color: Colors.black, fontSize: 10), - }, - { - 'text': 'Hello', - 'textStyle': TextStyle(color: Colors.black, fontSize: 10), - } -]; - -Widget createCustomRichText(String locale) { - return MaterialApp( - locale: Locale(locale), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: const CustomRichText(key: Key('richText'), words: words), - ); -} - -void main() { - group('Tests for CustomRichText widget', () { - testWidgets('Check if CustomRichText shows up', (tester) async { - await tester.pumpWidget(createCustomRichText('en')); - await tester.pump(); - - expect(find.byType(RichText), findsOneWidget); - }); - - testWidgets('Check for TextSpan(s) (en)', (tester) async { - await tester.pumpWidget(createCustomRichText('en')); - await tester.pump(); - - // Since TextSpan isn't a widget, only way to check if it worked correctly - // is by looking at the text - expect( - (tester.firstWidget(find.byType(RichText)) as RichText) - .text - .toPlainText(), - 'Hello Hello Hello ', - ); - }); - - testWidgets('Check for individual TextSpan(s) (en)', (tester) async { - await tester.pumpWidget(createCustomRichText('en')); - await tester.pump(); - - // First - expect( - (tester.firstWidget(find.byType(RichText)) as RichText).text.style, - isA() - .having((style) => style.color, 'Color', Colors.red) - .having((style) => style.fontSize, 'Font size', 20.0), - ); - - // Second - expect( - ((tester.firstWidget(find.byType(RichText)) as RichText).text - as TextSpan) - .children![0] - .style, - isA() - .having((style) => style.color, 'Color', Colors.black) - .having((style) => style.fontSize, 'Font size', 10.0), - ); - }); - }); -} diff --git a/test/widget_tests/widgets/talawa_error_dialog_test.dart b/test/widget_tests/widgets/talawa_error_dialog_test.dart deleted file mode 100644 index bcbe81e68..000000000 --- a/test/widget_tests/widgets/talawa_error_dialog_test.dart +++ /dev/null @@ -1,351 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_svg/svg.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/talawa_error_dialog.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createTalawaErrorWidget1({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorDialog( - "Test Error", - MessageType.error, - ); - }, - ), - ), - ); -} - -Widget createTalawaErrorWidget2({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorDialog( - "Test Error", - MessageType.warning, - ); - }, - ), - ), - ); -} - -Widget createTalawaErrorWidget3({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorDialog( - "Test Error", - MessageType.info, - ); - }, - ), - ), - ); -} - -Widget createTalawaErrorWidget4({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorDialog( - "Test Error", - MessageType.random, - ); - }, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - group('Test for TalawaErrorWidget', () { - testWidgets('Check if the Error Widget shows up(error)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget1()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - }); - testWidgets('Check if the Error Widget shows up(random)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget4()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - }); - testWidgets('Check if the Error title shows up(error)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget1()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.text('Error'); - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the Error Widget text shows up(error)', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget1()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.text('Test Error'); - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the Error Widget icon shows up(error)', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget1()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.byType(SvgPicture); - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the close Button is working', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget1()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - await tester.tap(find.textContaining('Dismiss')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsNothing); - }); - testWidgets('Check if the Error text shows up(warning)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - }); - testWidgets('Check if the Error text shows up(warning)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.text('Warning'); - expect(finder, findsOneWidget); - }); - testWidgets('Check if the Error Widget text shows up(warning)', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.text('Test Error'); - expect(finder, findsOneWidget); - }); - testWidgets('Check if the Error Widget icon shows up(warning)', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.byType(SvgPicture); - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the close Button is working', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - await tester.tap(find.textContaining('Dismiss')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsNothing); - }); - testWidgets('Check if the Error Widget shows up (info)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - }); - testWidgets('Check if the Error Widget shows up (info)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - final finder = find.text('Information'); - expect(finder, findsOneWidget); - }); - testWidgets('Check if the Error Widget shows up (info)', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.text('Test Error'); - - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the Error Widget icon shows up (info)', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsOneWidget); - - final finder = find.byType(SvgPicture); - expect(finder, findsOneWidget); - }); - - testWidgets('Check if the close Button is working', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - await tester.tap(find.textContaining('Close')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorDialog), findsNothing); - }); - }); -} diff --git a/test/widget_tests/widgets/talawa_error_snackbar_test.dart b/test/widget_tests/widgets/talawa_error_snackbar_test.dart deleted file mode 100644 index 7469fe712..000000000 --- a/test/widget_tests/widgets/talawa_error_snackbar_test.dart +++ /dev/null @@ -1,243 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:talawa/enums/enums.dart'; -import 'package:talawa/services/navigation_service.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/widgets/talawa_error_snackbar.dart'; - -import '../../helpers/test_locator.dart'; - -Widget createTalawaErrorWidget({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - "Test Error", - MessageType.warning, - ); - }, - ), - ), - ); -} - -Widget createTalawaErrorWidget2({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - "Test Error", - MessageType.error, - ); - }, - ), - ), - ); -} - -Widget createTalawaErrorWidget3({ - bool reverse = false, - String? dialogTitle, - bool passSecondaryFunc = true, -}) { - return MaterialApp( - navigatorKey: locator().navigatorKey, - navigatorObservers: [], - locale: const Locale('en'), - supportedLocales: [ - const Locale('en', 'US'), - const Locale('es', 'ES'), - const Locale('fr', 'FR'), - const Locale('hi', 'IN'), - const Locale('zh', 'CN'), - const Locale('de', 'DE'), - const Locale('ja', 'JP'), - const Locale('pt', 'PT'), - ], - localizationsDelegates: [ - const AppLocalizationsDelegate(isTest: true), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - home: Scaffold( - body: TextButton( - child: const Text('Open'), - onPressed: () { - navigationService.showTalawaErrorSnackBar( - "Test Error", - MessageType.info, - ); - }, - ), - ), - ); -} - -void main() { - SizeConfig().test(); - testSetupLocator(); - group('Test for TalawaErrorWidget', () { - testWidgets('Check if the Snackbar shows up in warning form', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - }); - testWidgets('Check if the Snackbar shows up in error form', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - }); - testWidgets('Check if the Snackbar shows up in info form', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - }); - testWidgets("Check if the Snackbar's text shows up in warning form", - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final errorMesgFinder = find.text('Test Error'); - - expect(errorMesgFinder, findsOneWidget); - }); - testWidgets('Check if the Snackbar"s text shows up in error form', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final errorMesgFinder = find.text('Test Error'); - - expect(errorMesgFinder, findsOneWidget); - }); - testWidgets('Check if the Snackbar"s text shows up in info form', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final errorMesgFinder = find.text('Test Error'); - - expect(errorMesgFinder, findsOneWidget); - }); - - testWidgets('Check if the Snackbar icon shows up in info form', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget3()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final iconFinder = find.byIcon(Icons.info_outline); - - expect(iconFinder, findsOneWidget); - }); - - testWidgets('Check if the Snackbar shows up in error form', (tester) async { - await tester.pumpWidget(createTalawaErrorWidget2()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final iconFinder = find.byIcon(Icons.error); - - expect(iconFinder, findsOneWidget); - }); - testWidgets('Check if the Snackbar shows up in warning form', - (tester) async { - await tester.pumpWidget(createTalawaErrorWidget()); - await tester.pump(); - await tester.tap(find.textContaining('Open')); - await tester.pump(const Duration(seconds: 1)); - - expect(find.byType(TalawaErrorSnackBar), findsOneWidget); - - final iconFinder = find.byIcon(Icons.error); - - expect(iconFinder, findsOneWidget); - }); - }); -} diff --git a/test/widget_tests/widgets/theme_switch_test.dart b/test/widget_tests/widgets/theme_switch_test.dart deleted file mode 100644 index 0da53d784..000000000 --- a/test/widget_tests/widgets/theme_switch_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// ignore_for_file: talawa_api_doc -// ignore_for_file: talawa_good_doc_comments - -import 'package:flutter/material.dart'; -import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/mockito.dart'; -import 'package:provider/provider.dart'; -import 'package:talawa/services/size_config.dart'; -import 'package:talawa/utils/app_localization.dart'; -import 'package:talawa/view_model/theme_view_model.dart'; -import 'package:talawa/widgets/theme_switch.dart'; - -import '../../helpers/test_helpers.dart'; -import '../../helpers/test_locator.dart'; - -Widget createApp() { - return const MaterialApp( - home: Scaffold( - body: ChangeThemeTile(), - ), - ); -} - -class LocalizationsInj extends StatelessWidget { - const LocalizationsInj({super.key, required this.child}); - final Widget child; - - @override - Widget build(BuildContext context) { - return MaterialApp( - localizationsDelegates: const [ - AppLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: const [ - Locale('en', ''), - ], - home: child, - ); - } -} - -void main() { - testSetupLocator(); - locator().test(); - - setUp(() { - registerServices(); - locator().test(); - }); - - tearDown(() { - unregisterServices(); - }); - - group('Tests for theme_switch widget', () { - testWidgets("Testing the widget", (tester) async { - final mockAppTheme = getAndRegisterAppTheme(); - - when(mockAppTheme.isdarkTheme).thenReturn(true); - - await tester.pumpWidget( - ChangeNotifierProvider.value( - value: mockAppTheme, - child: const LocalizationsInj( - child: Scaffold( - body: ChangeThemeTile(), - ), - ), - ), - ); - await tester.pumpAndSettle(); - expect(find.byType(ListTile), findsOneWidget); - expect(find.byType(Text), findsOneWidget); - - final listTileFinder = find.byType(ListTile).first; - final listTile = tester.firstWidget(listTileFinder); - expect( - (listTile as ListTile).contentPadding, - const EdgeInsets.fromLTRB(3.6, 0.0, 3.6, 0.0), - ); - expect((listTile.trailing! as Switch).autofocus, true); - expect((listTile.trailing! as Switch).value, true); - - final switchWidget = listTile.trailing! as Switch; - switchWidget.onChanged!.call(true); - verify(mockAppTheme.switchTheme(isOn: true)); - }); - }); -}