Skip to content

Commit c1534cd

Browse files
committed
Add tests
1 parent a75b591 commit c1534cd

File tree

77 files changed

+689
-1
lines changed

Some content is hidden

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

77 files changed

+689
-1
lines changed

example/lib/override_form_builder_localizations_en.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:form_builder_validators/form_builder_validators.dart';
55
/// Created by ipcjs on 2022/10/31.
66
class OverrideFormBuilderLocalizationsEn
77
extends FormBuilderLocalizationsImplEn {
8+
/// Constructor for the override class.
89
OverrideFormBuilderLocalizationsEn();
910

1011
static const LocalizationsDelegate<FormBuilderLocalizationsImpl> delegate =

lib/localization/l10n.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import 'package:flutter_localizations/flutter_localizations.dart';
77
import 'intl/messages.dart';
88
import 'intl/messages_en.dart';
99

10-
/// The actual `Localizations` class is [FormBuilderLocalizationsImpl], this class exists only for forward compatibility purposes...
10+
/// The actual `Localizations` class is [FormBuilderLocalizationsImpl],
11+
/// this class exists only for forward compatibility purposes...
1112
class FormBuilderLocalizations {
1213
FormBuilderLocalizations._();
1314

15+
/// The [FormBuilderLocalizationsImpl] instance for the current context.
1416
static FormBuilderLocalizationsImpl of(BuildContext context) {
1517
return Localizations.of<FormBuilderLocalizationsImpl>(
1618
context,
@@ -19,9 +21,13 @@ class FormBuilderLocalizations {
1921
_default;
2022
}
2123

24+
/// The [FormBuilderLocalizationsImpl] instance delegate.
2225
static const LocalizationsDelegate<FormBuilderLocalizationsImpl> delegate =
2326
FormBuilderLocalizationsDelegate();
2427

28+
/// The [GlobalMaterialLocalizations.delegate],
29+
/// [GlobalCupertinoLocalizations.delegate], and
30+
/// [GlobalWidgetsLocalizations.delegate] delegates.
2531
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
2632
<LocalizationsDelegate<dynamic>>[
2733
delegate,
@@ -30,21 +36,27 @@ class FormBuilderLocalizations {
3036
GlobalWidgetsLocalizations.delegate,
3137
];
3238

39+
/// The supported locales.
3340
static const List<Locale> supportedLocales =
3441
FormBuilderLocalizationsImpl.supportedLocales;
3542

3643
static final FormBuilderLocalizationsImplEn _default =
3744
FormBuilderLocalizationsImplEn();
45+
3846
static FormBuilderLocalizationsImpl? _current;
3947

48+
/// Set the current [FormBuilderLocalizationsImpl] instance.
4049
static void setCurrentInstance(FormBuilderLocalizationsImpl? current) =>
4150
_current = current;
4251

52+
/// The current [FormBuilderLocalizationsImpl] instance.
4353
static FormBuilderLocalizationsImpl get current => _current ?? _default;
4454
}
4555

56+
/// The actual `Localizations` class is [FormBuilderLocalizationsImpl],
4657
class FormBuilderLocalizationsDelegate
4758
extends LocalizationsDelegate<FormBuilderLocalizationsImpl> {
59+
/// Constructor for the delegate class.
4860
const FormBuilderLocalizationsDelegate();
4961

5062
@override
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'package:faker_dart/faker_dart.dart';
2+
import 'package:flutter_test/flutter_test.dart';
3+
import 'package:form_builder_validators/form_builder_validators.dart';
4+
5+
void main() {
6+
final Faker faker = Faker.instance;
7+
final String customErrorMessage = faker.lorem.sentence();
8+
group('Email -', () {});
9+
}

0 commit comments

Comments
 (0)