Skip to content

Commit f828810

Browse files
chore: Initial commit
1 parent 7304a99 commit f828810

File tree

89 files changed

+2858
-0
lines changed

Some content is hidden

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

89 files changed

+2858
-0
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: "\U0001F41B Bug"
3+
about: Something is crashing or not working as intended
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Environment
11+
12+
**Package version:**
13+
14+
<details>
15+
<summary>Flutter doctor</summary>
16+
17+
<!-- Paste the output of running `flutter doctor -v` below inside ``` and ``` -->
18+
```
19+
```
20+
21+
</details>
22+
23+
<details>
24+
<summary>Code sample</summary>
25+
26+
<!--
27+
Please create a minimal reproducible sample that shows the problem
28+
and attach it below between the lines with the backticks.
29+
30+
You can use a example code or Flutter sample app
31+
32+
Without this we will unlikely be able to progress on the issue, and because of that
33+
we regretfully will have to close it.
34+
-->
35+
36+
```dart
37+
```
38+
39+
</details>
40+
41+
## Description
42+
43+
**Expected behavior:**
44+
45+
**Current behavior:**
46+
47+
## Steps to reproduce
48+
49+
1. This
50+
2. Than that
51+
3. Then
52+
53+
## Images <!-- if available, else delete -->
54+
55+
## Stacktrace/Logcat <!-- if available, else delete -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: "\U0001F4C3 Documentation"
3+
about: You want to report something that is wrong or missing from the documentation
4+
title: ''
5+
labels: documentation
6+
assignees: ''
7+
8+
---
9+
10+
### Describe the change you would like to see
11+
<!-- A clear and concise description of the bug or documentation you feel is missing.
12+
For example: The Technical Reference does not include information about the FormBuilderFilterChip widget. -->
13+
14+
### How would the suggested change make the documentation more useful?
15+
<!-- Provide context for how the requested change would make the docs easier to use and improve your ability to develop successful applications with this packages.
16+
For example: It's hard to know a method exists or understand its use when you have to search through the code base to learn about it. Properly documenting it in the Technical Reference makes it easier for me to know what the flutter_fom_builder is (and is not capable of). -->
17+
18+
### Additional context
19+
<!-- Add any other context about your feedback here.
20+
For example: I am reading the docs directly from GitHub, so it's harder for me to find information on a particular method if it's not included in the documentation. -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: "\U0001F680 Feature request"
3+
about: Suggest new feature or request for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Environment
11+
12+
**Package version:**
13+
14+
## Description
15+
16+
**What you'd like to happen:**
17+
18+
**Alternatives you've considered:** <!-- if available, else delete -->
19+
20+
**Images:** <!-- if available, else delete -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: "\U0001F914 Questions and help"
3+
about: You have a question or need help using this package
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
## Describe your question
11+
<!-- A clear and concise description of your question or help wanted.
12+
For example: How can I add a datetime field? -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Connection with issue(s)
2+
3+
<!-- If this pull request close some issue, use this reference to close it automatically -->
4+
Close #???
5+
6+
<!-- Optional: other issues or pull requests related to this, but merging should not close it -->
7+
Connected to #???
8+
9+
## Solution description
10+
11+
## Screenshots or Videos
12+
13+
<!-- Optional: to clearly demonstrate the feature or fix to help with testing and reviews -->
14+
15+
## To Do
16+
17+
- [ ] Read [contributing guide](https://github.com/flutter-form-builder-ecosystem/form_builder_phone_field/blob/main/CONTRIBUTING.md)
18+
- [ ] Check the original issue to confirm it is fully satisfied
19+
- [ ] Add solution description to help guide reviewers
20+
- [ ] Add unit test to verify new or fixed behaviour
21+
- [ ] If apply, add documentation to code properties and package readme

.github/workflows/base.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Base
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- '*'
8+
9+
pull_request:
10+
branches: [main]
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: macos-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
channel: [stable, beta]
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Check broken links
26+
uses: JustinBeckwith/linkinator-action@v1
27+
with:
28+
paths: "**/*.md"
29+
30+
- name: Flutter action
31+
uses: subosito/flutter-action@v2
32+
with:
33+
channel: ${{ matrix.channel }}
34+
35+
- name: Install dependencies
36+
run: flutter pub get
37+
- name: Format code
38+
run: flutter format --dry-run --set-exit-if-changed .
39+
- name: Analyze static code
40+
run: flutter analyze
41+
- name: Run tests
42+
run: flutter test
43+
- name: Check publish warnings
44+
run: dart pub publish --dry-run
45+
- name: Build example
46+
run: |
47+
cd example
48+
flutter build appbundle --debug
49+
flutter build ios --debug --no-codesign
50+
51+
- name: Upload coverage to Codecov
52+
if: ${{ matrix.channel == 'stable' }}
53+
uses: codecov/codecov-action@v3
54+
with:
55+
files: coverage/lcov.info
56+
flags: unittests
57+
name: form_builder_phone_field
58+
59+
deployment:
60+
if: ${{ github.ref_type == 'tag' }}
61+
needs: build
62+
name: Deploy package
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- name: Configure enviroment
67+
uses: actions/checkout@v3
68+
- name: Download flutter
69+
uses: subosito/flutter-action@v2
70+
with:
71+
channel: 'stable'
72+
- name: Setup pub credentials
73+
shell: bash
74+
env:
75+
PUB_DEV_PUBLISH_ACCESS_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
76+
PUB_DEV_PUBLISH_REFRESH_TOKEN: ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
77+
run: |
78+
sh ./tools/pub_login.sh
79+
- name: Publish package
80+
run: |
81+
pushd packages/form_builder_phone_field
82+
dart pub publish -v -f

.gitignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
.fvm/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
build/
33+
34+
# Android related
35+
**/android/**/gradle-wrapper.jar
36+
**/android/.gradle
37+
**/android/captures/
38+
**/android/gradlew
39+
**/android/gradlew.bat
40+
**/android/local.properties
41+
**/android/**/GeneratedPluginRegistrant.java
42+
43+
# iOS/XCode related
44+
**/ios/**/*.mode1v3
45+
**/ios/**/*.mode2v3
46+
**/ios/**/*.moved-aside
47+
**/ios/**/*.pbxuser
48+
**/ios/**/*.perspectivev3
49+
**/ios/**/*sync/
50+
**/ios/**/.sconsign.dblite
51+
**/ios/**/.tags*
52+
**/ios/**/.vagrant/
53+
**/ios/**/DerivedData/
54+
**/ios/**/Icon?
55+
**/ios/**/Pods/
56+
**/ios/**/.symlinks/
57+
**/ios/**/profile
58+
**/ios/**/xcuserdata
59+
**/ios/.generated/
60+
**/ios/Flutter/App.framework
61+
**/ios/Flutter/Flutter.framework
62+
**/ios/Flutter/Flutter.podspec
63+
**/ios/Flutter/Generated.xcconfig
64+
**/ios/Flutter/app.flx
65+
**/ios/Flutter/app.zip
66+
**/ios/Flutter/flutter_assets/
67+
**/ios/Flutter/flutter_export_environment.sh
68+
**/ios/ServiceDefinitions.json
69+
**/ios/Runner/GeneratedPluginRegistrant.*
70+
71+
# Exceptions to above rules.
72+
!**/ios/**/default.mode1v3
73+
!**/ios/**/default.mode2v3
74+
!**/ios/**/default.pbxuser
75+
!**/ios/**/default.perspectivev3

.metadata

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

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## [1.1.0] - 23-Jun-2022
2+
* Added property iconSelector
3+
4+
## [1.0.0] - 15-Jun-2022
5+
* Added web support
6+
7+
## [1.0.0-beta.0] - 07-Sep-2021
8+
* Compatibility with `flutter_form_builder` ^7.*
9+
10+
## [0.3.0] - 07-Sep-2021
11+
* Compatibility with `flutter_form_builder` ^6.*
12+
* **BREAKING CHANGES:** Upgrade to `phone_number` v0.12.0
13+
14+
## [0.2.0] - 18-Mar-2021
15+
* Flutter 2 compatibility
16+
17+
## [0.1.0] - 30-Dec-2020
18+
* Initial release.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Form Builder Phone Field
2+
3+
[![Pub Version](https://img.shields.io/pub/v/form_builder_phone_field?logo=flutter&style=for-the-badge)](https://pub.dev/packages/form_builder_phone_field)
4+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/flutter-form-builder-ecosystem/flutter_form_phone_field/Base?logo=github&style=for-the-badge)](https://github.com/flutter-form-builder-ecosystem/flutter_form_phone_field/actions/workflows/base.yaml)
5+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/flutter_form_phone_field?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/flutter_form_phone_field)
6+
[![Codecov](https://img.shields.io/codecov/c/github/flutter-form-builder-ecosystem/flutter_form_phone_field?logo=codecov&style=for-the-badge)](https://codecov.io/gh/flutter-form-builder-ecosystem/flutter_form_phone_field/)
7+
8+
International phone number field for [FlutterFormBuilder](https://pub.dev/packages/flutter_form_builder) package
9+
10+
# Usage
11+
12+
```dart
13+
FormBuilderPhoneField(
14+
name: 'phone_number',
15+
decoration: const InputDecoration(
16+
labelText: 'Phone Number',
17+
hintText: 'Hint',
18+
),
19+
priorityListByIsoCode: ['KE'],
20+
validator: FormBuilderValidators.compose([
21+
FormBuilderValidators.required(context),
22+
]),
23+
),
24+
```
25+
26+
## Credits
27+
28+
**Contributors**
29+
30+
<a href="https://github.com/flutter-form-builder-ecosystem/form_builder_phone_field/graphs/contributors">
31+
<img src="https://contrib.rocks/image?repo=flutter-form-builder-ecosystem/form_builder_phone_field" />
32+
</a>
33+
34+
Made with [contrib.rocks](https://contrib.rocks).

0 commit comments

Comments
 (0)