Skip to content

Commit ececc01

Browse files
form_builder_phone_field update (#1040)
* feat: Update example - Web support - Update dependencies - Fix localizations from form_builder_validators * chore: Add fvm config * build: Update dependencies * docs: Add warning message to readme * Update .gitignore * Delete fvm_config.json * fix(phone_field): resolve example ios * chore(phone_field): improvements to docs * chore(phone_field): resolved static analysis Co-authored-by: Danvick Miller <[email protected]>
1 parent c212e7a commit ececc01

File tree

19 files changed

+216
-18
lines changed

19 files changed

+216
-18
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ Unlike flutter_form_builder package which depends purely on Flutter provided inp
4949

5050
[[View Documentation][extra_fields_docs]] [[View Source][extra_fields_code]]
5151

52+
### form_builder_phone_field
53+
> [![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)
54+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/danvick/flutter_form_builder/Form%20Builder%20Phone%20Field?logo=github&style=for-the-badge)](https://github.com/danvick/flutter_form_builder/actions/workflows/form_builder_validators.yaml)
55+
[![Codecov](https://img.shields.io/codecov/c/github/danvick/flutter_form_builder?logo=codecov&style=for-the-badge)](https://codecov.io/gh/danvick/flutter_form_builder/)
56+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/danvick/flutter_form_builder?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/danvick/flutter_form_builder)
57+
[![GitHub](https://img.shields.io/github/license/danvick/flutter_form_builder?logo=open+source+initiative&style=for-the-badge)](https://github.com/danvick/flutter_form_builder/blob/master/LICENSE)
58+
59+
Phone input field for flutter_form_builder package
60+
61+
[[View Documentation][phone_field_docs]] [[View Source][phone_field_code]]
62+
5263
### form_builder_validators
5364
> [![Pub Version](https://img.shields.io/pub/v/form_builder_validators?logo=flutter&style=for-the-badge)](https://pub.dev/packages/form_builder_validators)
5465
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/danvick/flutter_form_builder/Form%20Builder%20Validators?logo=github&style=for-the-badge)](https://github.com/danvick/flutter_form_builder/actions/workflows/form_builder_validators.yaml)
@@ -93,6 +104,10 @@ Made with [contributors-img](https://contributors-img.firebaseapp.com).
93104

94105
[extra_fields_docs]: https://github.com/danvick/flutter_form_builder/blob/master/packages/form_builder_extra_fields/README.md
95106

107+
[phone_field_code]: https://github.com/danvick/flutter_form_builder/tree/master/packages/form_builder_phone_field
108+
109+
[phone_field_docs]: https://github.com/danvick/flutter_form_builder/tree/master/packages/form_builder_phone_field/README.md
110+
96111
[validators_code]: https://github.com/danvick/flutter_form_builder/tree/master/packages/form_builder_validators
97112

98113
[validators_docs]: https://github.com/danvick/flutter_form_builder/blob/master/packages/form_builder_validators/README.md

packages/form_builder_phone_field/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
.fvm/
1112

1213
# IntelliJ related
1314
*.iml

packages/form_builder_phone_field/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# packages.form_builder_phone_field
1+
# Form Builder Phone Field
22

33
Phone input field for [flutter_form_builder](https://pub.dev/packages/flutter_form_builder) package
44

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

packages/form_builder_phone_field/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>8.0</string>
24+
<string>9.0</string>
2525
</dict>
2626
</plist>

packages/form_builder_phone_field/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -156,7 +156,7 @@
156156
97C146E61CF9000F007C117D /* Project object */ = {
157157
isa = PBXProject;
158158
attributes = {
159-
LastUpgradeCheck = 1020;
159+
LastUpgradeCheck = 1300;
160160
ORGANIZATIONNAME = "";
161161
TargetAttributes = {
162162
97C146ED1CF9000F007C117D = {

packages/form_builder_phone_field/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/form_builder_phone_field/example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
4446
</dict>
4547
</plist>

packages/form_builder_phone_field/example/lib/main.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:flutter_form_builder/flutter_form_builder.dart';
33
import 'package:form_builder_phone_field/form_builder_phone_field.dart';
44
import 'package:form_builder_validators/form_builder_validators.dart';
5+
import 'package:flutter_localizations/flutter_localizations.dart';
56

67
void main() {
78
runApp(const MyApp());
@@ -14,6 +15,15 @@ class MyApp extends StatelessWidget {
1415
Widget build(BuildContext context) {
1516
return MaterialApp(
1617
title: 'Flutter Demo',
18+
// Locale config required by form_builder_validators
19+
// https://github.com/danvick/flutter_form_builder/blob/master/packages/form_builder_validators/example/lib/main.dart
20+
supportedLocales: [...FormBuilderLocalizations.delegate.supportedLocales],
21+
localizationsDelegates: const [
22+
GlobalMaterialLocalizations.delegate,
23+
GlobalWidgetsLocalizations.delegate,
24+
GlobalCupertinoLocalizations.delegate,
25+
FormBuilderLocalizations.delegate,
26+
],
1727
theme: ThemeData(
1828
primarySwatch: Colors.blue,
1929
visualDensity: VisualDensity.adaptivePlatformDensity,
@@ -48,8 +58,8 @@ class MyHomePage extends StatelessWidget {
4858
// onChanged: _onChanged,
4959
priorityListByIsoCode: const ['KE'],
5060
validator: FormBuilderValidators.compose([
51-
FormBuilderValidators.numeric(context),
52-
FormBuilderValidators.required(context),
61+
FormBuilderValidators.numeric(),
62+
FormBuilderValidators.required(),
5363
]),
5464
),
5565
const SizedBox(height: 15),
@@ -63,8 +73,8 @@ class MyHomePage extends StatelessWidget {
6373
// onChanged: _onChanged,
6474
priorityListByIsoCode: const ['US'],
6575
validator: FormBuilderValidators.compose([
66-
FormBuilderValidators.numeric(context),
67-
FormBuilderValidators.required(context),
76+
FormBuilderValidators.numeric(),
77+
FormBuilderValidators.required(),
6878
]),
6979
),
7080
const SizedBox(height: 15),

packages/form_builder_phone_field/example/pubspec.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
13-
flutter_form_builder: ^7.1.0
12+
flutter_form_builder: 7.1.1
13+
flutter_localizations:
14+
sdk: flutter
1415
form_builder_phone_field:
1516
path: ../
16-
form_builder_validators: ^7.4.0
17+
form_builder_validators: ^8.1.1
1718

1819
dev_dependencies:
19-
flutter_lints: ^1.0.4
20+
flutter_lints: ^2.0.1
2021
flutter_test:
2122
sdk: flutter
2223

0 commit comments

Comments
 (0)