├── .github
└── workflows
│ └── main_action.yml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── coverage
├── html
│ ├── amber.png
│ ├── cmd_line
│ ├── emerald.png
│ ├── gcov.css
│ ├── glass.png
│ ├── index-sort-f.html
│ ├── index-sort-l.html
│ ├── index.html
│ ├── lib
│ │ ├── lib
│ │ │ ├── helper.dart.func-c.html
│ │ │ ├── helper.dart.func.html
│ │ │ ├── helper.dart.gcov.html
│ │ │ ├── index-sort-f.html
│ │ │ ├── index-sort-l.html
│ │ │ └── index.html
│ │ └── rules
│ │ │ └── lib
│ │ │ └── rules
│ │ │ ├── alpha_numeric.dart.func-c.html
│ │ │ ├── alpha_numeric.dart.func.html
│ │ │ ├── alpha_numeric.dart.gcov.html
│ │ │ ├── between.dart.func-c.html
│ │ │ ├── between.dart.func.html
│ │ │ ├── between.dart.gcov.html
│ │ │ ├── double.dart.func-c.html
│ │ │ ├── double.dart.func.html
│ │ │ ├── double.dart.gcov.html
│ │ │ ├── email.dart.func-c.html
│ │ │ ├── email.dart.func.html
│ │ │ ├── email.dart.gcov.html
│ │ │ ├── ends_with.dart.func-c.html
│ │ │ ├── ends_with.dart.func.html
│ │ │ ├── ends_with.dart.gcov.html
│ │ │ ├── gt.dart.func-c.html
│ │ │ ├── gt.dart.func.html
│ │ │ ├── gt.dart.gcov.html
│ │ │ ├── gte.dart.func-c.html
│ │ │ ├── gte.dart.func.html
│ │ │ ├── gte.dart.gcov.html
│ │ │ ├── in.dart.func-c.html
│ │ │ ├── in.dart.func.html
│ │ │ ├── in.dart.gcov.html
│ │ │ ├── index-sort-f.html
│ │ │ ├── index-sort-l.html
│ │ │ ├── index.html
│ │ │ ├── integer.dart.func-c.html
│ │ │ ├── integer.dart.func.html
│ │ │ ├── integer.dart.gcov.html
│ │ │ ├── ip.dart.func-c.html
│ │ │ ├── ip.dart.func.html
│ │ │ ├── ip.dart.gcov.html
│ │ │ ├── lowercase.dart.func-c.html
│ │ │ ├── lowercase.dart.func.html
│ │ │ ├── lowercase.dart.gcov.html
│ │ │ ├── lt.dart.func-c.html
│ │ │ ├── lt.dart.func.html
│ │ │ ├── lt.dart.gcov.html
│ │ │ ├── lte.dart.func-c.html
│ │ │ ├── lte.dart.func.html
│ │ │ ├── lte.dart.gcov.html
│ │ │ ├── max.dart.func-c.html
│ │ │ ├── max.dart.func.html
│ │ │ ├── max.dart.gcov.html
│ │ │ ├── min.dart.func-c.html
│ │ │ ├── min.dart.func.html
│ │ │ ├── min.dart.gcov.html
│ │ │ ├── not_in.dart.func-c.html
│ │ │ ├── not_in.dart.func.html
│ │ │ ├── not_in.dart.gcov.html
│ │ │ ├── numeric.dart.func-c.html
│ │ │ ├── numeric.dart.func.html
│ │ │ ├── numeric.dart.gcov.html
│ │ │ ├── regex.dart.func-c.html
│ │ │ ├── regex.dart.func.html
│ │ │ ├── regex.dart.gcov.html
│ │ │ ├── required.dart.func-c.html
│ │ │ ├── required.dart.func.html
│ │ │ ├── required.dart.gcov.html
│ │ │ ├── rule_protocol.dart.func-c.html
│ │ │ ├── rule_protocol.dart.func.html
│ │ │ ├── rule_protocol.dart.gcov.html
│ │ │ ├── same.dart.func-c.html
│ │ │ ├── same.dart.func.html
│ │ │ ├── same.dart.gcov.html
│ │ │ ├── starts_with.dart.func-c.html
│ │ │ ├── starts_with.dart.func.html
│ │ │ ├── starts_with.dart.gcov.html
│ │ │ ├── uppercase.dart.func-c.html
│ │ │ ├── uppercase.dart.func.html
│ │ │ ├── uppercase.dart.gcov.html
│ │ │ ├── url.dart.func-c.html
│ │ │ ├── url.dart.func.html
│ │ │ └── url.dart.gcov.html
│ ├── ruby.png
│ ├── snow.png
│ └── updown.png
└── lcov.info
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
├── test
│ └── widget_test.dart
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── forward_emails.txt
├── lib
├── constants
│ └── strings.dart
├── extensions
│ ├── extensions.dart
│ ├── list_extension.dart
│ ├── string_extension.dart
│ └── type_alias.dart
├── flutter_laravel_form_validation.dart
├── helper.dart
├── laravel_validation_rules.dart
├── rules
│ ├── alpha_numeric.dart
│ ├── between.dart
│ ├── double.dart
│ ├── email.dart
│ ├── ends_with.dart
│ ├── gt.dart
│ ├── gte.dart
│ ├── in.dart
│ ├── integer.dart
│ ├── ip.dart
│ ├── lowercase.dart
│ ├── lt.dart
│ ├── lte.dart
│ ├── max.dart
│ ├── min.dart
│ ├── not_in.dart
│ ├── numeric.dart
│ ├── regex.dart
│ ├── required.dart
│ ├── rule_protocol.dart
│ ├── rules.dart
│ ├── same.dart
│ ├── starts_with.dart
│ ├── uppercase.dart
│ └── url.dart
└── validator.dart
├── pubspec.yaml
└── test
└── validator_test.dart
/.github/workflows/main_action.yml:
--------------------------------------------------------------------------------
1 | # This workflow uses actions that are not certified by GitHub.
2 | # They are provided by a third-party and are governed by
3 | # separate terms of service, privacy policy, and support
4 | # documentation.
5 |
6 | name: Initiate package test
7 |
8 | on:
9 | push:
10 | branches: [ "main" ]
11 | pull_request:
12 | branches: [ "main" ]
13 |
14 | env:
15 | EMAILS_FILE: ./forward_emails.txt
16 |
17 | jobs:
18 | run_test :
19 | runs-on: ubuntu-latest
20 |
21 | steps:
22 | - uses: actions/checkout@v3
23 | - uses: actions/setup-java@v2
24 | with:
25 | distribution: 'zulu'
26 | java-version: '11'
27 | - uses: subosito/flutter-action@v2
28 | with:
29 | flutter-version: '3.0.5'
30 |
31 | - name: Install dependencies
32 | run: flutter pub get
33 |
34 | - name: Run tests
35 | id: test_output
36 | run: flutter test
37 |
38 | - name: Upload coverage reports to Codecov
39 | uses: codecov/codecov-action@v3
40 | env:
41 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42 |
43 | # - name: Publish to pub.dev
44 | # run: flutter pub publish
45 |
46 | - name: Get forward emails
47 | id: get_emails
48 | run: echo "::set-output name=emails::$(cat "${{ env.EMAILS_FILE }}")"
49 |
50 | - name: Send mail to succesful test
51 | uses: dawidd6/action-send-mail@v3
52 | with:
53 | server_address: smtp.gmail.com
54 | server_port: 465
55 | username: ${{secrets.EMAIL_USERNAME}}
56 | password: ${{secrets.EMAIL_PASSWORD}}
57 | subject: Successfully tested and published the package
58 | to: ${{steps.get_emails.outputs.emails}}
59 | from: Qazeem Qudus Abiodun (Package Author)
60 | # Optional plain body:
61 | body: |
62 |
63 |
Test Successful and Package uploaded successfuly
64 | Successfully uploaded and tested the package. Thanks Love
65 | Successfully tested
66 | You can check the update from Here
67 | here is the output of the test ${{steps.test_output.outputs}}
68 | Regards Love
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25 | /pubspec.lock
26 | **/doc/api/
27 | .dart_tool/
28 | .packages
29 | build/
30 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 7e9793dee1b85a243edd0e06cb1658e98b077561
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.0.4
2 |
3 | * Updated FLValidator Class
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Abiodun Qazeem
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
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
5 |
--------------------------------------------------------------------------------
/coverage/html/amber.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/amber.png
--------------------------------------------------------------------------------
/coverage/html/cmd_line:
--------------------------------------------------------------------------------
1 | genhtml coverage/lcov.info -o coverage/html
2 |
--------------------------------------------------------------------------------
/coverage/html/emerald.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/emerald.png
--------------------------------------------------------------------------------
/coverage/html/glass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/glass.png
--------------------------------------------------------------------------------
/coverage/html/lib/lib/helper.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/lib/helper.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/lib/helper.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/lib/helper.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/double.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/double.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/double.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/double.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/email.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/email.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/email.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/email.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/gt.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/gt.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/gt.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/gt.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/gte.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/gte.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/gte.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/gte.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/in.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/in.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/in.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/in.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/ip.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/ip.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/ip.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/ip.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/lt.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/lt.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/lt.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/lt.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/lte.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/lte.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/lte.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/lte.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/max.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/max.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/max.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/max.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/min.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/min.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/min.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/min.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/not_in.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/not_in.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/regex.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/regex.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/regex.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/regex.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/same.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/same.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/same.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/same.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/url.dart.func-c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/url.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/lib/rules/lib/rules/url.dart.func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | LCOV - lcov.info - lib/rules/lib/rules/url.dart - functions
8 |
9 |
10 |
11 |
12 |
13 |
14 | LCOV - code coverage report
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Function Name
60 |
61 | Hit count
62 |
63 |
64 |
65 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/coverage/html/ruby.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/ruby.png
--------------------------------------------------------------------------------
/coverage/html/snow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/snow.png
--------------------------------------------------------------------------------
/coverage/html/updown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/coverage/html/updown.png
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 7e9793dee1b85a243edd0e06cb1658e98b077561
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 |
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_1_8
33 | targetCompatibility JavaVersion.VERSION_1_8
34 | }
35 |
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | defaultConfig {
45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46 | applicationId "com.example.example"
47 | minSdkVersion flutter.minSdkVersion
48 | targetSdkVersion flutter.targetSdkVersion
49 | versionCode flutterVersionCode.toInteger()
50 | versionName flutterVersionName
51 | }
52 |
53 | buildTypes {
54 | release {
55 | // TODO: Add your own signing config for the release build.
56 | // Signing with the debug keys for now, so `flutter run --release` works.
57 | signingConfig signingConfigs.debug
58 | }
59 | }
60 | }
61 |
62 | flutter {
63 | source '../..'
64 | }
65 |
66 | dependencies {
67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
68 | }
69 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:example/main.dart';
12 |
13 | void main() {
14 | group("Test for widget", () {
15 | late Finder usernameField;
16 | late Finder emailField;
17 | late Finder fullNameField;
18 | late Finder submitBtn;
19 |
20 | setUp(() {
21 | usernameField = find.byKey(const Key("username"));
22 | fullNameField = find.byKey(const Key("fullname"));
23 | emailField = find.byKey(const Key("email"));
24 | submitBtn = find.byType(ElevatedButton);
25 | });
26 |
27 | testWidgets('Test for required rule', (WidgetTester tester) async {
28 | await tester.pumpWidget(const MyApp());
29 |
30 | expect(usernameField, findsOneWidget);
31 | expect(fullNameField, findsOneWidget);
32 | expect(emailField, findsOneWidget);
33 | expect(submitBtn, findsOneWidget);
34 |
35 | await tester.enterText(usernameField, "");
36 | await tester.enterText(emailField, "");
37 | await tester.enterText(fullNameField, "");
38 | await tester.tap(submitBtn);
39 | await tester.pump();
40 |
41 | expect(find.text('This field is required'), findsNWidgets(3));
42 | });
43 | });
44 | }
45 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/example/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(example LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "example")
5 |
6 | cmake_policy(SET CMP0063 NEW)
7 |
8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
9 |
10 | # Configure build options.
11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
12 | if(IS_MULTICONFIG)
13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
14 | CACHE STRING "" FORCE)
15 | else()
16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
17 | set(CMAKE_BUILD_TYPE "Debug" CACHE
18 | STRING "Flutter build mode" FORCE)
19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
20 | "Debug" "Profile" "Release")
21 | endif()
22 | endif()
23 |
24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
28 |
29 | # Use Unicode for all projects.
30 | add_definitions(-DUNICODE -D_UNICODE)
31 |
32 | # Compilation settings that should be applied to most targets.
33 | function(APPLY_STANDARD_SETTINGS TARGET)
34 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
36 | target_compile_options(${TARGET} PRIVATE /EHsc)
37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
39 | endfunction()
40 |
41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
42 |
43 | # Flutter library and tool build rules.
44 | add_subdirectory(${FLUTTER_MANAGED_DIR})
45 |
46 | # Application build
47 | add_subdirectory("runner")
48 |
49 | # Generated plugin build rules, which manage building the plugins and adding
50 | # them to the application.
51 | include(flutter/generated_plugins.cmake)
52 |
53 |
54 | # === Installation ===
55 | # Support files are copied into place next to the executable, so that it can
56 | # run in place. This is done instead of making a separate bundle (as on Linux)
57 | # so that building and running from within Visual Studio will work.
58 | set(BUILD_BUNDLE_DIR "$")
59 | # Make the "install" step default, as it's required to run.
60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
63 | endif()
64 |
65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
67 |
68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
69 | COMPONENT Runtime)
70 |
71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
72 | COMPONENT Runtime)
73 |
74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
75 | COMPONENT Runtime)
76 |
77 | if(PLUGIN_BUNDLED_LIBRARIES)
78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
80 | COMPONENT Runtime)
81 | endif()
82 |
83 | # Fully re-copy the assets directory on each build to avoid having stale files
84 | # from a previous install.
85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
86 | install(CODE "
87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
88 | " COMPONENT Runtime)
89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
91 |
92 | # Install the AOT library on non-Debug builds only.
93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
94 | CONFIGURATIONS Profile;Release
95 | COMPONENT Runtime)
96 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | add_executable(${BINARY_NAME} WIN32
5 | "flutter_window.cpp"
6 | "main.cpp"
7 | "utils.cpp"
8 | "win32_window.cpp"
9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
10 | "Runner.rc"
11 | "runner.exe.manifest"
12 | )
13 | apply_standard_settings(${BINARY_NAME})
14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
17 | add_dependencies(${BINARY_NAME} flutter_assemble)
18 |
--------------------------------------------------------------------------------
/example/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #ifdef FLUTTER_BUILD_NUMBER
64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0
67 | #endif
68 |
69 | #ifdef FLUTTER_BUILD_NAME
70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "example" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "example" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "example.exe" "\0"
98 | VALUE "ProductName", "example" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 | return true;
30 | }
31 |
32 | void FlutterWindow::OnDestroy() {
33 | if (flutter_controller_) {
34 | flutter_controller_ = nullptr;
35 | }
36 |
37 | Win32Window::OnDestroy();
38 | }
39 |
40 | LRESULT
41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
42 | WPARAM const wparam,
43 | LPARAM const lparam) noexcept {
44 | // Give Flutter, including plugins, an opportunity to handle window messages.
45 | if (flutter_controller_) {
46 | std::optional result =
47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
48 | lparam);
49 | if (result) {
50 | return *result;
51 | }
52 | }
53 |
54 | switch (message) {
55 | case WM_FONTCHANGE:
56 | flutter_controller_->engine()->ReloadSystemFonts();
57 | break;
58 | }
59 |
60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
61 | }
62 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.CreateAndShow(L"example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abiodundotdev/flutter_laravel_form_validation/a6b125b9910e7de530865ce2df59ddd900c4d51a/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | if (target_length == 0) {
52 | return std::string();
53 | }
54 | std::string utf8_string;
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/example/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates and shows a win32 window with |title| and position and size using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size to will treat the width height passed in to this function
35 | // as logical pixels and scale to appropriate for the default monitor. Returns
36 | // true if the window was created successfully.
37 | bool CreateAndShow(const std::wstring& title,
38 | const Point& origin,
39 | const Size& size);
40 |
41 | // Release OS resources associated with window.
42 | void Destroy();
43 |
44 | // Inserts |content| into the window tree.
45 | void SetChildContent(HWND content);
46 |
47 | // Returns the backing Window handle to enable clients to set icon and other
48 | // window properties. Returns nullptr if the window has been destroyed.
49 | HWND GetHandle();
50 |
51 | // If true, closing this window will quit the application.
52 | void SetQuitOnClose(bool quit_on_close);
53 |
54 | // Return a RECT representing the bounds of the current client area.
55 | RECT GetClientArea();
56 |
57 | protected:
58 | // Processes and route salient window messages for mouse handling,
59 | // size change and DPI. Delegates handling of these to member overloads that
60 | // inheriting classes can handle.
61 | virtual LRESULT MessageHandler(HWND window,
62 | UINT const message,
63 | WPARAM const wparam,
64 | LPARAM const lparam) noexcept;
65 |
66 | // Called when CreateAndShow is called, allowing subclass window-related
67 | // setup. Subclasses should return false if setup fails.
68 | virtual bool OnCreate();
69 |
70 | // Called when Destroy is called.
71 | virtual void OnDestroy();
72 |
73 | private:
74 | friend class WindowClassRegistrar;
75 |
76 | // OS callback called by message pump. Handles the WM_NCCREATE message which
77 | // is passed when the non-client area is being created and enables automatic
78 | // non-client DPI scaling so that the non-client area automatically
79 | // responsponds to changes in DPI. All other messages are handled by
80 | // MessageHandler.
81 | static LRESULT CALLBACK WndProc(HWND const window,
82 | UINT const message,
83 | WPARAM const wparam,
84 | LPARAM const lparam) noexcept;
85 |
86 | // Retrieves a class instance pointer for |window|
87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
88 |
89 | bool quit_on_close_ = false;
90 |
91 | // window handle for top level window.
92 | HWND window_handle_ = nullptr;
93 |
94 | // window handle for hosted content.
95 | HWND child_content_ = nullptr;
96 | };
97 |
98 | #endif // RUNNER_WIN32_WINDOW_H_
99 |
--------------------------------------------------------------------------------
/forward_emails.txt:
--------------------------------------------------------------------------------
1 | qudusqazeem@gmail.com,abiodundotdev@gmail.com
--------------------------------------------------------------------------------
/lib/constants/strings.dart:
--------------------------------------------------------------------------------
1 | class ValidatorStrings {
2 | static String required = "This field is required";
3 | static String min = "This field is should be at least extra characters";
4 | static String same = "This field is is not the same as extra";
5 | static String max = "This field is cannot be more than extra characters";
6 | static String endsWith = "This field must end with extra";
7 | static String lowercase = "This field must all be lowercase";
8 | static String uppercase = "This field must all be uppercase";
9 | static String startsWith = "This field must start with extra";
10 | static String contain = "This field must contains one of your words";
11 | static String email = "This field must be a valid email";
12 | static String numeric = "This field must be a valid number";
13 | static String integer = "This field must be integer";
14 | static String double = "This field must be double";
15 | static String alphaNum = "This field must contains only letters and numbers";
16 | static String between = "This field must be between extra";
17 | static String contains = "This field must contains one of your worlds";
18 | static String haveAlpha = "This field must have alpha in it";
19 | static String ip = "This field must be a valid IP";
20 | static String inRes = "This field must be in [extra]";
21 | static String notIn = "This field must be not be in extra";
22 | static String lt = "This field must be less than extra";
23 | static String gt = "This field must be less than extra";
24 | static String lte = "This field must be less than or equal to extra";
25 | static String gte = "This field must be greater than or equal to extra";
26 | static String url = "This field must be a valid url";
27 | static String regex = "This field is not valid";
28 | }
29 |
--------------------------------------------------------------------------------
/lib/extensions/extensions.dart:
--------------------------------------------------------------------------------
1 | export 'type_alias.dart';
2 | export 'list_extension.dart';
3 | export 'string_extension.dart';
4 |
--------------------------------------------------------------------------------
/lib/extensions/list_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/validator.dart';
2 |
3 | import 'type_alias.dart';
4 |
5 | extension FormtryValidateList on List {
6 | ///Validation rules in a list with label or custom messages
7 | ValidatorX validate({
8 | Map? customMessages,
9 | String? attribute,
10 | }) {
11 | assert(isNotEmpty, "validate cannot be called on an empty string");
12 | return Valiadator()
13 | .make(this, attribute: attribute, customMessages: customMessages);
14 | }
15 |
16 | ///Validation rules in a list, short form without label or custom messages
17 | ValidatorX get v {
18 | assert(isNotEmpty, "validate cannot be called on an empty string");
19 | return Valiadator().make(this);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/extensions/string_extension.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/validator.dart';
2 |
3 | import 'type_alias.dart';
4 |
5 | extension FormtryValidateString on String {
6 | ///Validation rules in a string with label or custom messages
7 | ValidatorX validate({
8 | Map? customMessages,
9 | String? attribute,
10 | }) {
11 | assert(
12 | split("|").isNotEmpty, "validate cannot be called on an empty string");
13 | return Valiadator()
14 | .make(split("|"), attribute: attribute, customMessages: customMessages);
15 | }
16 |
17 | ///Validation rules in a string, short form without label or custom messages
18 | ValidatorX get v {
19 | assert(isNotEmpty, "validate cannot be called on an empty string");
20 | return Valiadator().make(split("|"));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/extensions/type_alias.dart:
--------------------------------------------------------------------------------
1 | typedef ValidatorX = String? Function(String?)?;
2 |
--------------------------------------------------------------------------------
/lib/flutter_laravel_form_validation.dart:
--------------------------------------------------------------------------------
1 | export 'extensions/extensions.dart';
2 | export 'laravel_validation_rules.dart';
3 |
--------------------------------------------------------------------------------
/lib/helper.dart:
--------------------------------------------------------------------------------
1 | String buildMessage(String message, String? attribute, [String? extra]) {
2 | if (attribute != null) {
3 | return message.replaceAll("field", attribute.toLowerCase());
4 | }
5 | if (extra != null) {
6 | return message.replaceAll("extra", extra.toLowerCase());
7 | }
8 | if (attribute != null && extra != null) {
9 | return message
10 | .replaceAll("field", attribute.toLowerCase())
11 | .replaceAll("extra", extra);
12 | }
13 | return message;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/laravel_validation_rules.dart:
--------------------------------------------------------------------------------
1 | ///Class to access the validation rules, this can be used as [FLValidator.rule]
2 | ///Or the rule string can be used in a List sesperated with a coma as in [required,same:man].v or in a string and seperated with | character as in 'required|same:man'.v
3 | ///List of supported rules can be seen on https://pub.dev/packages/flutter_laravel_form_validation#rules
4 | class FLValidator {
5 | FLValidator._();
6 | //Implict
7 | ///Ensure a form field value is required
8 | static String required = "required";
9 |
10 | //Numeric
11 | ///Ensure a form field value is numeric
12 | static String numeric = "numeric";
13 |
14 | ///Ensure a form field value is an integer
15 | static String interger = "integer";
16 |
17 | ///Ensure a form field value is a double
18 | static String double = "double";
19 |
20 | //Size.
21 |
22 | ///Ensure a form field value is between min,max
23 | static String between(num min, num max) => "between:$min,$max";
24 |
25 | ///Ensure a form field value length has a [min] value specified
26 | static String min(num length) => "min:$length";
27 |
28 | ///Ensure a form field value length has a [max] value specified
29 | static String max(num length) => "max:$length";
30 |
31 | ///Ensure a form field value is numeric and greater than [number]
32 | static String gt(num number) => "gt:$number";
33 |
34 | ///Ensure a form field value is numeric and is greater than or equal [number]
35 | static String gte(num number) => "gte:$number";
36 |
37 | ///Ensure a form field value is numeric and lesser than [number]
38 | static String lt(num number) => "lt:$number";
39 |
40 | ///Ensure a form field value is numeric and is lesser than or equal [number]
41 |
42 | static String lte(num number) => "lte:$number";
43 |
44 | //String
45 | ///Ensure a form field value starts with [pattern]
46 | static String startsWith(dynamic pattern) => "starts_with:$pattern";
47 |
48 | ///Ensure a form field value ends with [pattern]
49 | static String endsWith(dynamic pattern) => "ends_with:$pattern";
50 |
51 | ///Ensure a form field value is same as [other]
52 | static String same(dynamic other) => "same:$other";
53 |
54 | ///Ensure a form field value is lowercase
55 | static String lowercase = "lowercase";
56 |
57 | ///Ensure a form field value is lowercase
58 | static String uppercase = "uppercase";
59 |
60 | //Others
61 | ///Ensure a form field value is alpha numeric
62 | static String alphaNumeric = "alpha_num";
63 |
64 | ///Ensure a form field value is an email
65 | static String email = "email";
66 |
67 | ///Ensure a form field value is an ip address
68 | static String ip = "ip";
69 |
70 | ///Ensure a form field value is a url
71 | static String url = "url";
72 |
73 | ///Ensure a form field value contains the list of [items]
74 | static String inItems(List items) =>
75 | "in:${items.toString().replaceAll(RegExp(r'[\]\[]'), "")}";
76 |
77 | ///Ensure a form field value does not in contain the list of [items]
78 | static String notInItems(List items) =>
79 | "not_in:${items.toString().replaceAll(RegExp(r'[\]\[]'), "")}";
80 | static String regEx(String pattern) => "regex:$pattern";
81 |
82 | // //custom
83 | // static String custom(String? Function(String) tryValidate){
84 |
85 | // }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/rules/alpha_numeric.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class AlphaNumeric implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | AlphaNumeric({
11 | required this.value,
12 | this.attribute,
13 | this.customMessage,
14 | });
15 | @override
16 | String? tryValidate() {
17 | RegExp exp = RegExp(r"^[a-zA-Z0-9]+$");
18 | if (!exp.hasMatch(value)) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.alphaNum, attribute);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/between.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Between implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | Between(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedValue = num.tryParse(value);
20 | if (parsedValue == null) return "Not a valid number";
21 | final splitedExtra = extra.split(",");
22 | final min = int.parse(splitedExtra[0]);
23 | final max = int.parse(splitedExtra[1]);
24 | if (!((parsedValue >= min) && (parsedValue >= max))) {
25 | if (customMessage == null) {
26 | return buildMessage(ValidatorStrings.between, attribute, extra);
27 | }
28 | return customMessage;
29 | }
30 | return null;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/rules/double.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | ///For number validation
6 | class Double implements RuleProtocol {
7 | @override
8 | final String value;
9 | final String? attribute;
10 | final String? customMessage;
11 | Double({required this.value, this.attribute, this.customMessage});
12 | @override
13 | String? tryValidate() {
14 | final parsedValue = double.tryParse(value);
15 | if (parsedValue == null) {
16 | if (customMessage == null) {
17 | return buildMessage(ValidatorStrings.double, attribute);
18 | }
19 | return customMessage;
20 | }
21 | return null;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/rules/email.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Email implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | Email({
11 | required this.value,
12 | this.attribute,
13 | this.customMessage,
14 | });
15 | @override
16 | String? tryValidate() {
17 | RegExp exp = RegExp(
18 | r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$",
19 | caseSensitive: false);
20 | if (!exp.hasMatch(value)) {
21 | if (customMessage == null) {
22 | return buildMessage(ValidatorStrings.email, attribute);
23 | }
24 | return customMessage;
25 | }
26 | return null;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/rules/ends_with.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class EndsWith implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | EndsWith(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | if (!value.endsWith(extra)) {
20 | if (customMessage == null) {
21 | return buildMessage(ValidatorStrings.endsWith, attribute, extra);
22 | }
23 | return customMessage;
24 | }
25 | return null;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/rules/gt.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class GreaterThan implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | GreaterThan(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedValue = num.tryParse(value);
20 | final parsedExtra = num.tryParse(extra);
21 | if (parsedValue == null || parsedExtra == null) return "Not a valid number";
22 | if (!(parsedValue > parsedExtra)) {
23 | if (customMessage == null) {
24 | return buildMessage(ValidatorStrings.gt, attribute, extra);
25 | }
26 | return customMessage;
27 | }
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/rules/gte.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class GreaterThanOrEqual implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | GreaterThanOrEqual(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedValue = num.tryParse(value);
20 | final parsedExtra = num.tryParse(extra);
21 | if (parsedValue == null || parsedExtra == null) return "Not a valid number";
22 | if (!(parsedValue >= parsedExtra)) {
23 | if (customMessage == null) {
24 | return buildMessage(ValidatorStrings.gte, attribute, extra);
25 | }
26 | return customMessage;
27 | }
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/rules/in.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class In implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | In(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | assert(extra.isNotEmpty, "Values to check from is required");
20 | final extraToList = extra.split(",");
21 | if (!extraToList.contains(value)) {
22 | if (customMessage == null) {
23 | return buildMessage(ValidatorStrings.inRes, attribute, extra);
24 | }
25 | return customMessage;
26 | }
27 | return null;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/rules/integer.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | ///For number validation
6 | class Integer implements RuleProtocol {
7 | @override
8 | final String value;
9 | final String? attribute;
10 | final String? customMessage;
11 | Integer({required this.value, this.attribute, this.customMessage});
12 | @override
13 | String? tryValidate() {
14 | final parsedValue = double.tryParse(value);
15 | if (parsedValue == null) {
16 | if (customMessage == null) {
17 | return buildMessage(ValidatorStrings.integer, attribute);
18 | }
19 | return customMessage;
20 | }
21 | return null;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/rules/ip.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class IpAddress implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 |
11 | IpAddress({required this.value, this.attribute, this.customMessage});
12 | @override
13 | String? tryValidate() {
14 | RegExp exp = RegExp(
15 | r"^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$",
16 | caseSensitive: false,
17 | multiLine: false);
18 | if (!exp.hasMatch(value)) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.ip, attribute);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/lowercase.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class LowerCase implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | LowerCase({
11 | required this.value,
12 | this.attribute,
13 | this.customMessage,
14 | });
15 |
16 | @override
17 | String? tryValidate() {
18 | if (value.toLowerCase() != value) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.lowercase, attribute);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/lt.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class LessThan implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | LessThan(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedValue = num.tryParse(value);
20 | final parsedExtra = num.tryParse(extra);
21 | if (parsedValue == null || parsedExtra == null) return "Not a valid number";
22 | if (!(parsedValue < parsedExtra)) {
23 | if (customMessage == null) {
24 | return buildMessage(ValidatorStrings.lt, attribute, extra);
25 | }
26 | return customMessage;
27 | }
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/rules/lte.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class LessThanOrEqual implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | LessThanOrEqual(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedValue = num.tryParse(value);
20 | final parsedExtra = num.tryParse(extra);
21 | if (parsedValue == null || parsedExtra == null) return "Not a valid number";
22 | if (!(parsedValue <= parsedExtra)) {
23 | if (customMessage == null) {
24 | return buildMessage(ValidatorStrings.lte, attribute, extra);
25 | }
26 | return customMessage;
27 | }
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/rules/max.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Max implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | Max(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedExtra = num.tryParse(extra);
20 | if (parsedExtra == null) return "Max value not a valid number";
21 | if (value.length > parsedExtra) {
22 | if (customMessage == null) {
23 | return buildMessage(ValidatorStrings.max, attribute, extra);
24 | }
25 | return customMessage;
26 | }
27 | return null;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/rules/min.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Min implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | Min(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | final parsedExtra = num.tryParse(extra);
20 | if (parsedExtra == null) return "Max value not a valid number";
21 | if (value.length < parsedExtra) {
22 | if (customMessage == null) {
23 | return buildMessage(ValidatorStrings.min, attribute);
24 | }
25 | return customMessage;
26 | }
27 | return null;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/rules/not_in.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class NotIn implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | NotIn(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 |
17 | @override
18 | String? tryValidate() {
19 | assert(extra.isNotEmpty, "Values to check from is required");
20 | final extraToList = extra.split(",");
21 | if (extraToList.contains(value)) {
22 | if (customMessage == null) {
23 | return buildMessage(ValidatorStrings.notIn, attribute);
24 | }
25 | return customMessage;
26 | }
27 | return null;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/rules/numeric.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | ///For number validation
6 | class Numeric implements RuleProtocol {
7 | @override
8 | final String value;
9 | final String? attribute;
10 | final String? customMessage;
11 | Numeric({required this.value, this.attribute, this.customMessage});
12 | @override
13 | String? tryValidate() {
14 | final parsedValue = num.tryParse(value);
15 | if (parsedValue == null) {
16 | if (customMessage == null) {
17 | return buildMessage(ValidatorStrings.numeric, attribute);
18 | }
19 | return customMessage;
20 | }
21 | return null;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/rules/regex.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class RegEx implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | RegEx(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 | @override
17 | String? tryValidate() {
18 | RegExp exp = RegExp(extra);
19 | if (!exp.hasMatch(value)) {
20 | if (customMessage == null) {
21 | return buildMessage(ValidatorStrings.regex, attribute, extra);
22 | }
23 | return customMessage;
24 | }
25 | return null;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/rules/required.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Required implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | Required({required this.value, this.attribute, this.customMessage});
11 | @override
12 | String? tryValidate() {
13 | if (value.isEmpty) {
14 | if (customMessage == null) {
15 | return buildMessage(ValidatorStrings.required, attribute);
16 | }
17 | return customMessage;
18 | }
19 | return null;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/rules/rule_protocol.dart:
--------------------------------------------------------------------------------
1 | abstract class RuleProtocol {
2 | final String value;
3 | RuleProtocol({required this.value});
4 |
5 | ///Validates the form field value
6 | String? tryValidate();
7 | }
8 |
--------------------------------------------------------------------------------
/lib/rules/rules.dart:
--------------------------------------------------------------------------------
1 | export 'alpha_numeric.dart';
2 | export 'between.dart';
3 | export 'double.dart';
4 | export 'email.dart';
5 | export 'ends_with.dart';
6 | export 'gt.dart';
7 | export 'gte.dart';
8 | export 'in.dart';
9 | export 'integer.dart';
10 | export 'ip.dart';
11 | export 'lowercase.dart';
12 | export 'lt.dart';
13 | export 'lte.dart';
14 | export 'max.dart';
15 | export 'min.dart';
16 | export 'not_in.dart';
17 | export 'numeric.dart';
18 | export 'regex.dart';
19 | export 'required.dart';
20 | export 'rule_protocol.dart';
21 | export 'same.dart';
22 | export 'starts_with.dart';
23 | export 'uppercase.dart';
24 | export 'url.dart';
25 |
--------------------------------------------------------------------------------
/lib/rules/same.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class Same implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | Same(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 | @override
17 | String? tryValidate() {
18 | if (value != extra) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.same, attribute, extra);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/starts_with.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class StartsWith implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | final String extra;
11 | StartsWith(
12 | {required this.value,
13 | this.attribute,
14 | this.customMessage,
15 | required this.extra});
16 | @override
17 | String? tryValidate() {
18 | if (!value.startsWith(extra)) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.startsWith, attribute, extra);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/uppercase.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class UpperCase implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | UpperCase({
11 | required this.value,
12 | this.attribute,
13 | this.customMessage,
14 | });
15 |
16 | @override
17 | String? tryValidate() {
18 | if (value.toUpperCase() != value) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.uppercase, attribute);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/rules/url.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_laravel_form_validation/constants/strings.dart';
2 | import 'package:flutter_laravel_form_validation/helper.dart';
3 | import 'package:flutter_laravel_form_validation/rules/rule_protocol.dart';
4 |
5 | class URL implements RuleProtocol {
6 | @override
7 | final String value;
8 | final String? attribute;
9 | final String? customMessage;
10 | URL({
11 | required this.value,
12 | this.attribute,
13 | this.customMessage,
14 | });
15 | @override
16 | String? tryValidate() {
17 | RegExp exp = RegExp(r"^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}$");
18 | if (!exp.hasMatch(value)) {
19 | if (customMessage == null) {
20 | return buildMessage(ValidatorStrings.url, attribute);
21 | }
22 | return customMessage;
23 | }
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_laravel_form_validation
2 | description: A simplified dart extension based flutter form validation . Inspired by Laravel Validation.
3 | version: 1.0.4
4 | homepage: https://github.com/abiodundotdev/flutter_laravel_form_validation
5 |
6 | environment:
7 | sdk: ">=2.16.1 <3.0.0"
8 | flutter: ">=1.17.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 | flutter_lints: ^1.0.0
--------------------------------------------------------------------------------