-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make input mutable, add gallery project
- Loading branch information
Showing
70 changed files
with
1,552 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"dart.flutterSdkPath": ".fvm/flutter_sdk", | ||
"dart.lineLength": 120, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,80 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
<a href="https://github.com/netglade"> | ||
<img alt="netglade" height='120px' src="https://raw.githubusercontent.com/netglade/auto_mappr/main/packages/auto_mappr/doc/badge_dark.png"> | ||
</a> | ||
|
||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
Developed with 💚 by [netglade][netglade_link] | ||
|
||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
[![ci][ci_badge]][ci_badge_link] | ||
[![glade_forms][glade_forms_pub_badge]][glade_forms_pub_badge_link] | ||
[![license: MIT][license_badge]][license_badge_link] | ||
[![style: netglade analysis][style_badge]][style_badge_link] | ||
[![Discord][discord_badge]][discord_badge_link] | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
--- | ||
|
||
## Features | ||
A universal way to define form validators with support of translations. | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
- [👀 What is this?](#-what-is-this) | ||
- [Why should I use it?](#why-should-i-use-it) | ||
- [🚀 Getting started](#-getting-started) | ||
- [Mutable or immutable model](#mutable-or-immutable-model) | ||
- [Quickstart example](#quickstart-example) | ||
- [Existing validators](#existing-validators) | ||
- [Creating own reusable ValidatorPart](#creating-own-reusable-validatorpart) | ||
- [Adding translation support](#adding-translation-support) | ||
- [Debugging validators](#debugging-validators) | ||
- [👏 Contributing](#-contributing) | ||
|
||
## Getting started | ||
## 👀 What is this? | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
Glade forms offer unified way to define reusable | ||
and fluent API to define Form fields input's validators with support of translation on top of that. | ||
|
||
## Usage | ||
### Why should I use it? | ||
|
||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
|
||
## 🚀 Getting started | ||
|
||
Quicstart example: | ||
|
||
```dart | ||
const like = 'sample'; | ||
``` | ||
|
||
## Additional information | ||
### Mutable or immutable model | ||
|
||
|
||
### Quickstart example | ||
|
||
TBD | ||
|
||
### Existing validators | ||
|
||
|
||
### Creating own reusable ValidatorPart | ||
|
||
### Adding translation support | ||
|
||
|
||
### Debugging validators | ||
|
||
|
||
|
||
|
||
|
||
## 👏 Contributing | ||
|
||
Your contributions are always welcome! Feel free to open pull request. | ||
|
||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. | ||
[netglade_link]: https://netglade.com/en | ||
[ci_badge]: https://github.com/netglade/glade_forms/actions/workflows/ci.yaml/badge.svg | ||
[ci_badge_link]: https://github.com/netglade/glade_forms/actions | ||
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg | ||
[license_badge_link]: https://opensource.org/licenses/MIT | ||
[style_badge]: https://img.shields.io/badge/style-netglade_analysis-26D07C.svg | ||
[style_badge_link]: https://pub.dev/packages/netglade_analysis | ||
[glade_forms_pub_badge]: https://img.shields.io/pub/v/glade_forms.svg | ||
[glade_forms_pub_badge_link]: https://pub.dartlang.org/packages/glade_forms | ||
[discord_badge]: https://img.shields.io/discord/1091460081054400532.svg?logo=discord&color=blue | ||
[discord_badge_link]: https://discord.gg/sJfBBuDZy4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ageRestriction": { | ||
"under18": "Musí vám být alespoň 18 let pro vstup", | ||
"ageFormat": "Věk musí být číslo" | ||
}, | ||
"empty": "Povinná hodnota" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ageRestriction": { | ||
"under18": "You must be at least 18 years old for entry", | ||
"ageFormat": "Age has to be number" | ||
}, | ||
"empty": "You must fill in value" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Uncomment this line to define a global platform for your project | ||
# platform :ios, '11.0' | ||
|
||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
def flutter_root | ||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
unless File.exist?(generated_xcode_build_settings_path) | ||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
end | ||
|
||
File.foreach(generated_xcode_build_settings_path) do |line| | ||
matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
return matches[1].strip if matches | ||
end | ||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_ios_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_ios_build_settings(target) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
examples/gallery/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>Example</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>example</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>$(FLUTTER_BUILD_NAME)</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(FLUTTER_BUILD_NUMBER)</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UILaunchStoryboardName</key> | ||
<string>LaunchScreen</string> | ||
<key>UIMainStoryboardFile</key> | ||
<string>Main</string> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UIViewControllerBasedStatusBarAppearance</key> | ||
<false/> | ||
<key>CADisableMinimumFrameDurationOnPhone</key> | ||
<true/> | ||
<key>UIApplicationSupportsIndirectInputEvents</key> | ||
<true/> | ||
</dict> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>Example</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>example</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>$(FLUTTER_BUILD_NAME)</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(FLUTTER_BUILD_NUMBER)</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UILaunchStoryboardName</key> | ||
<string>LaunchScreen</string> | ||
<key>UIMainStoryboardFile</key> | ||
<string>Main</string> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UIViewControllerBasedStatusBarAppearance</key> | ||
<false/> | ||
<key>CADisableMinimumFrameDurationOnPhone</key> | ||
<true/> | ||
<key>UIApplicationSupportsIndirectInputEvents</key> | ||
<true/> | ||
<key>CFBundleLocalizations</key> | ||
<array> | ||
<string>en</string> | ||
<string>cs</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart | ||
|
||
abstract class LocaleKeys { | ||
static const ageRestriction_under18 = 'ageRestriction.under18'; | ||
static const ageRestriction_ageFormat = 'ageRestriction.ageFormat'; | ||
static const empty = 'empty'; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart | ||
|
||
// ignore_for_file: prefer_single_quotes | ||
|
||
import 'dart:ui'; | ||
|
||
import 'package:easy_localization/easy_localization.dart' show AssetLoader; | ||
|
||
class CodegenLoader extends AssetLoader{ | ||
const CodegenLoader(); | ||
|
||
@override | ||
Future<Map<String, dynamic>?> load(String path, Locale locale) { | ||
return Future.value(mapLocales[locale.toString()]); | ||
} | ||
|
||
static const Map<String,dynamic> cs_CZ = { | ||
"ageRestriction": { | ||
"under18": "Musí vám být alespoň 18 let pro vstup", | ||
"ageFormat": "Věk musí být číslo" | ||
}, | ||
"empty": "Povinná hodnota" | ||
}; | ||
static const Map<String,dynamic> en_US = { | ||
"ageRestriction": { | ||
"under18": "You must be at least 18 years old for entry", | ||
"ageFormat": "Age has to be number" | ||
}, | ||
"empty": "You must fill in value" | ||
}; | ||
static const Map<String, Map<String,dynamic>> mapLocales = {"cs_CZ": cs_CZ, "en_US": en_US}; | ||
} |
Oops, something went wrong.