Skip to content

Commit 070bcb5

Browse files
committed
Initial Release
0 parents  commit 070bcb5

File tree

137 files changed

+5086
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+5086
-0
lines changed

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
.packages
30+
build/

.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 135454af32477f815a7525073027a3ff9eff1bfd
8+
channel: stable
9+
10+
project_type: package

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## 1.0.0
2+
3+
**Initial Release**
4+
5+
Features:
6+
- Simulate how your app looks to people with color vision deficiency.
7+
- Visualize different kinds and degrees of color blindness.

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023, Maximilian Fischer
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
> Colour (color) blindness (colour vision deficiency, or CVD) affects approximately 1 in 12 men (8%) and 1 in 200 women. In the UK there are approximately 3 million colour blind people (about 4.5% of the entire population), most of whom are male. Worldwide, there are estimated to be about 300 million people with colour blindness, almost the same number of people as the entire population of the USA! [Source](https://www.colourblindawareness.org/colour-blindness/)
2+
3+
So, developers should make sure CVD doesn't limit users from using their apps.
4+
5+
This package helps developers with normal color vision visualize CVD's effect. Or, in other words, simulate how your app looks to people with color vision deficiency.
6+
7+
## Features
8+
9+
- Simulate how your app looks to people with color vision deficiency.
10+
- Visualize different kinds and degrees of color blindness.
11+
12+
## Getting started
13+
14+
```
15+
$ flutter pub add cvd_simulator
16+
```
17+
18+
## Usage
19+
20+
Just wrap your target (entire App or single Widget) with a `CVDSimulator`
21+
and provide the desired `CVDSimulation`.
22+
You probably want to use a `MachadoCVDSimulation`.
23+
24+
```dart
25+
Widget build(BuildContext context) {
26+
return CVDSimulator(
27+
simulation: MachadoCVDSimulation.protanopia,
28+
child: Image.network(
29+
"https://upload.wikimedia.org/wikipedia/commons/e/e0/Ishihara_9.png",
30+
height: 300,
31+
),
32+
);
33+
}
34+
```
35+
36+
## Additional information
37+
38+
Currently, this package does not support simulating cone monochromacy or rod monochromacy.
39+
40+
Additionally, no CVD simulation can accurately visualize how your app looks to people with color vision deficiency since many factors vary, and each CVD case is different. Even the screen calibration might vary. The question is more like this: Is the simulation good enough?
41+
42+
For a rule of thumb, try using your newly developed app with each of the severity 1 `MachadoCVDSimulation`s applied (`MachadoCVDSimulation.protanopia`, `MachadoCVDSimulation.deuteranopia` and `MachadoCVDSimulation.tritanopia`).
43+
If you can use your app comfortably while each of these filters is applied, your app is probably usable for most people with CVD.
44+
45+
Providing different color schemes might also help.

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
# Additional information about this file can be found at
4+
# https://dart.dev/guides/language/analysis-options

example/.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

example/.metadata

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: 135454af32477f815a7525073027a3ff9eff1bfd
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
17+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
18+
- platform: android
19+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
20+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
21+
- platform: ios
22+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
23+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
24+
- platform: linux
25+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
26+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
27+
- platform: macos
28+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
29+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
30+
- platform: web
31+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
32+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
33+
- platform: windows
34+
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
35+
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# example
2+
3+
An example for the cvd_simulator package.

example/analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

0 commit comments

Comments
 (0)