1640512545
IForm
is part of the Flutter SDK that allows you to create a form with a list of supported form components such as Input Text
, Drop Down
and more with validation feature provided for form validation. IForm
is built on top of NUIForm
and it act as the decoder before passing the readable form configuration to NUIForm
.
Validation Rules - Programmers can configure the validation for each form component such as the min/max length as well as the string expression of a form field.
Customizable - The form is fully customizable from the arrangement and alignment of the form components to the colors of the borders and text.
As IForm
is mainly to decode the form configuration JSON and process them into a readable set of form configuration for NUIForm
, programmer can initialize the form with IFRenderEngineBuilder
.
IFRenderEngine renderer = IFRenderEngineBuilder()
.boyJson(yourJson)
.textStyle(yourCustomizedTextStyle)
.build();
Once you successfully parse the JSON to the IFRenderEngine
, you can render the NUIForm
through the renderForm()
method with a set of optional listeners such as textChangeListener
, buttonClickListener
and itemSelectListener
.
final form = renderer.renderForm(
textChangeListener: (id, value, form){
//TODO: text of a form component has changed
},
buttonClickListener: (id, clickType, form){
//TODO: a button component has been clicked
},
itemSelectListener: (id, selection, selected, form){
//TODO an item has been selected from drop down or check box
}
);
With the NUIForm
instance in place, you can now render the form as a widget by passing the form
to a NUIFormContent
widget.
return Container(
child: NUIFormContent(form: form)
);
NUIForm
ComponentsThe list of supported NUIForm
components can be found from http://dev.g-i.com.my/istudio/docs/dynamic-form/components/. Sample of a complete json can be found from http://dev.g-i.com.my/istudio/docs/dynamic-form/sample-json/.
NUIForm
Method | Remark |
---|---|
fillInValues() | Fill in values for the components in the form |
validate() | Validate the form either quietly (without showing the error in UI) or normal validate |
updateItem() | Update any form component such as visibility or any other properties |
Programmers can fill in values into the form. As each form component's unique is the inpId
, filling in values require the programmer to specify which form component to be updated.
form.fillInValues({
"edtCountry": NUIFormValue(
inpId: "edtCountry",
value: NUIFromSelection(
value: "Malaysia"
)
),
"edtState": NUIFormValue(
inpId: "edtState",
value: NUIFormSelection(
value: "Selangor"
)
)
});
Part of the configuration for the form is to have a validation rule for each of the form component, to configure whether the component is compulsory, or is there a length limitation on the form component. Once these validation rules are configured, calling the validate()
from NUIForm
will validate the form based on these validations and return a result of success if all the validations are successful or failed if one of the validation failed.
final validated = form.validate();
Programmers can update any of the form component after the form is rendered, such as changing the title of an input text or any other properties of the form component based on the component type. Below is an example of updating a NUIFTextItem
component.
final updateItem = form.updateItem<NUIFTextItem>("edtCountry", (item){
item.hint = "What are you from?";
item.helperText = "Please fill this in";
});
NUIForm
//Defining your form styles
NUIFTextStyle myFontStyle(BuildContext context) => NUIFTextStyle(
labelStyle: getFont(context, size: 16, color: accentBright, isBold: false),
helperStyle: getFont(context, size: 12, color: accentBright, isBold: false),
errorHelperStyle: getFont(context, size: 12, color: formErrorRed, isBold: false),
border: OutlineInputBorder(borderSide: BorderSide(color: getColor(context, textGray), width: 1)),
focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: getColor(context, accentBright), width: 2)),
errorBorder: OutlineInputBorder(borderSide: BorderSide(color: getColor(context, formErrorRed), width: 1)),
errorFocusedBorder: OutlineInputBorder(borderSide: BorderSide(color: getColor(context, formErrorRed), width: 2)),
design: NUIFTextDesign.BORDER,
dense: true,
cursor: NUIFTextCursor(color: getColor(context, accentBright), cursorWidth: 2),
textStyle: getFont(context, size: 16, color: textDarkGray, isBold: false),
hintStyle: getFont(context, size: 16, singleColor: getColor(context, textLightGray), isBold: false),
);
//Using the form as your widget
class YourFormContent extends StatefulWidget {
@override
_YourFormContentState createState() => _YourFormContentState();
}
class _YourFormContentState extends State<YourFormContent> {
NUIForm form;
@override
void initState(){
super.initState();
//Always initialize your form in initState() and not in the build() method as you do not want your form to get refreshed everytime the widget is rebuilt
form = NUIForm(
allButtonClickListener: (inpId, clickType, form){
},
allTextChangeListener: (inpId, value, form){
},
allItemSelectListener: (inpId, selection, selected, form){
},
item: NUIFColumnItem(inpId: "lytMyProfile", divider: 20, items: [
NUIFTextItem(
controller: TextEditingController(text: ""),
inpId: "edtName",
label: getString('formProfileNameLabel'),
maskedInputType: NUIFTextInputType.NAME,
minLength: 5,
style: myFontStyle(context),
),
NUIFTextItem(
controller: TextEditingController(text: ""),
inpId: "edtDateofBirth",
hint: "Date of birth",
label: getString('formProfileDateofBirthLabel'),
style: myFontStyle(context),
validateOnChange: true,
maskedInputType: NUIFTextInputType.DATE,
suffixIcon:
Icon(Icons.event_note, color: getColor(context, accentBright)),
),
NUIFDropdownItem(
inpId: "spnGender",
selections: [GenderSelection("Male"), GenderSelection("Female")],
label: "Gender",
style: myFontStyle(context),
),
])
);
}
void extractFormValues(){
Map<String, NUIFormValue> values = form.extractValues();
final name = values["edtName"].value.value; //This is your name input from the form
}
@override
Widget build(BuildContext context) {
return Container(
child: NUIFormContent(
form: form,
),
);
}
}
NUIForm
from a JSON
configurationA sample of JSON form configuration would be like below. The properties of the form component are configured in the JSON configuration itself such as the id, caption and more.
{
"jsLogic": "",
"inputVerticalSpacing": 10,
"inputs": [
{
"inpId": "txtAft",
"caption": "Aft (m)",
"compulsory": true,
"show": true,
"validateErrMsg": "Please enter a Aft value",
"layout": 2,
"intLayout": null,
"preferredWidth": null,
"type": "IngSinglelineText",
"inputAllowType" : 1005,
"inputAllowRegularExpression": "any",
"rightSpacing": 10,
"topSpacing": null
},
{
"inpId": "txtFore",
"caption": "Fore (m)",
"compulsory": true,
"show": true,
"validateErrMsg": "Please enter a Fore value",
"layout": 2,
"intLayout": null,
"preferredWidth": null,
"type": "IngSinglelineText",
"inputAllowType" : 1005,
"inputAllowRegularExpression": "any",
"rightSpacing": 10,
"topSpacing": null
},
{
"inpId": "txtTrim",
"caption": "Trim (m)",
"compulsory": true,
"show": true,
"readOnly": true,
"validateErrMsg": "Please enter a Trim value",
"layout": 2,
"intLayout": null,
"preferredWidth": null,
"type": "IngSinglelineText",
"inputAllowType" : 1005,
"inputAllowRegularExpression": "any",
"rightSpacing": 10,
"topSpacing": null
},
{
"inpId": "txtDate",
"caption": "Date",
"compulsory": true,
"show": true,
"validateErrMsg": "Please enter a Date value",
"layout": 3,
"intLayout": null,
"preferredWidth": null,
"type": "IngDatePicker",
"dateTimeDisplayFormat": "dd MMM yyyy",
"rightSpacing": null,
"topSpacing": null
}
]
}
After you have configured your form in the JSON, you can then later decode the JSON configuration into a NUIForm
instance using the IFRenderEngineBuilder
.
class YourFormContent extends StatefulWidget {
@override
_YourFormContentState createState() => _YourFormContentState();
}
class _YourFormContentState extends State<YourFormContent> {
NUIForm form;
IFRenderEngine renderer;
@override
void initState(){
super.initState();
renderer = IFRenderEngineBuilder()
.bodyJson(yourJSONConfig)
.textStyle(myFontStyle(context))
.build();
form = renderer.renderForm(
buttonClickListener: (inpId, clickType, form){
},
textChangeListener: (inpId, value, form){
},
itemSelectListener: (inpId, selection, selected, form){
}
);
}
void extractFormValues(){
Map<String, NUIFormValue> values = form.extractValues();
final aftValue = values["txtAft"].value.value; //This is your name input from the form
}
@override
Widget build(BuildContext context) {
return Container(
child: NUIFormContent(
form: form,
),
);
}
}
Run this command:
With Flutter:
$ flutter pub add nui_form
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
nui_form: ^0.0.85
Alternatively, your editor might support or flutter pub get
. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:nui_form/component/nuif_button.dart';
import 'package:nui_form/component/nuif_checkbox.dart';
import 'package:nui_form/component/nuif_checkgroup.dart';
import 'package:nui_form/component/nuif_column.dart';
import 'package:nui_form/component/nuif_custom.dart';
import 'package:nui_form/component/nuif_dropdown.dart';
import 'package:nui_form/component/nuif_list.dart';
import 'package:nui_form/component/nuif_radio.dart';
import 'package:nui_form/component/nuif_row.dart';
import 'package:nui_form/component/nuif_text.dart';
import 'package:nui_form/model/nuif_models.dart';
import 'package:nui_form/nuif_form.dart';
import 'package:nui_form/nuif_form_component.dart';
Download Details:
Author:
Source Code: https://pub.dev/packages/nui_form
1597014000
Flutter Google cross-platform UI framework has released a new version 1.20 stable.
Flutter is Google’s UI framework to make apps for Android, iOS, Web, Windows, Mac, Linux, and Fuchsia OS. Since the last 2 years, the flutter Framework has already achieved popularity among mobile developers to develop Android and iOS apps. In the last few releases, Flutter also added the support of making web applications and desktop applications.
Last month they introduced the support of the Linux desktop app that can be distributed through Canonical Snap Store(Snapcraft), this enables the developers to publish there Linux desktop app for their users and publish on Snap Store. If you want to learn how to Publish Flutter Desktop app in Snap Store that here is the tutorial.
Flutter 1.20 Framework is built on Google’s made Dart programming language that is a cross-platform language providing native performance, new UI widgets, and other more features for the developer usage.
Here are the few key points of this release:
In this release, they have got multiple performance improvements in the Dart language itself. A new improvement is to reduce the app size in the release versions of the app. Another performance improvement is to reduce junk in the display of app animation by using the warm-up phase.
If your app is junk information during the first run then the Skia Shading Language shader provides for pre-compilation as part of your app’s build. This can speed it up by more than 2x.
Added a better support of mouse cursors for web and desktop flutter app,. Now many widgets will show cursor on top of them or you can specify the type of supported cursor you want.
Autofill was already supported in native applications now its been added to the Flutter SDK. Now prefilled information stored by your OS can be used for autofill in the application. This feature will be available soon on the flutter web.
A new widget for interaction
InteractiveViewer
is a new widget design for common interactions in your app like pan, zoom drag and drop for resizing the widget. Informations on this you can check more on this API documentation where you can try this widget on the DartPad. In this release, drag-drop has more features added like you can know precisely where the drop happened and get the position.
In this new release, there are many pre-existing widgets that were updated to match the latest material guidelines, these updates include better interaction with Slider
and RangeSlider
, DatePicker
with support for date range and time picker with the new style.
pubspec.yaml
formatOther than these widget updates there is some update within the project also like in pubspec.yaml
file format. If you are a flutter plugin publisher then your old pubspec.yaml
is no longer supported to publish a plugin as the older format does not specify for which platform plugin you are making. All existing plugin will continue to work with flutter apps but you should make a plugin update as soon as possible.
Visual Studio code flutter extension got an update in this release. You get a preview of new features where you can analyze that Dev tools in your coding workspace. Enable this feature in your vs code by _dart.previewEmbeddedDevTools_
setting. Dart DevTools menu you can choose your favorite page embed on your code workspace.
The updated the Dev tools comes with the network page that enables network profiling. You can track the timings and other information like status and content type of your** network calls** within your app. You can also monitor gRPC traffic.
Pigeon is a command-line tool that will generate types of safe platform channels without adding additional dependencies. With this instead of manually matching method strings on platform channel and serializing arguments, you can invoke native class and pass nonprimitive data objects by directly calling the Dart
method.
There is still a long list of updates in the new version of Flutter 1.2 that we cannot cover in this blog. You can get more details you can visit the official site to know more. Also, you can subscribe to the Navoki newsletter to get updates on these features and upcoming new updates and lessons. In upcoming new versions, we might see more new features and improvements.
You can get more free Flutter tutorials you can follow these courses:
#dart #developers #flutter #app developed #dart devtools in visual studio code #firebase local emulator suite in flutter #flutter autofill #flutter date picker #flutter desktop linux app build and publish on snapcraft store #flutter pigeon #flutter range slider #flutter slider #flutter time picker #flutter tutorial #flutter widget #google flutter #linux #navoki #pubspec format #setup flutter desktop on windows
1598396940
Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking** Android and iOS** applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).
Flutter was officially released in December 2018. Since then, it has gone a much stronger flutter community.
There has been much increase in flutter developers, flutter packages, youtube tutorials, blogs, flutter examples apps, official and private events, and more. Flutter is now on top software repos based and trending on GitHub.
What is Flutter? this question comes to many new developer’s mind.
Flutter means flying wings quickly, and lightly but obviously, this doesn’t apply in our SDK.
So Flutter was one of the companies that were acquired by **Google **for around $40 million. That company was based on providing gesture detection and recognition from a standard webcam. But later when the Flutter was going to release in alpha version for developer it’s name was Sky, but since Google already owned Flutter name, so they rename it to Flutter.
Flutter is used in many startup companies nowadays, and even some MNCs are also adopting Flutter as a mobile development framework. Many top famous companies are using their apps in Flutter. Some of them here are
and many more other apps. Mobile development companies also adopted Flutter as a service for their clients. Even I was one of them who developed flutter apps as a freelancer and later as an IT company for mobile apps.
#dart #flutter #uncategorized #flutter framework #flutter jobs #flutter language #flutter meaning #flutter meaning in hindi #google flutter #how does flutter work #what is flutter
1640672627
https://youtu.be/-tHUmjIkGJ4
Flutter Hotel Booking UI - Book your Stay At A New Hotel With Flutter - Ep1
#flutter #fluttertravelapp #hotelbookingui #flutter ui design
In this video, I'm going to show you how to make a Cool Hotel Booking App using Flutter and visual studio code.
In this tutorial, you will learn how to create a Splash Screen and Introduction Screen, how to implement a SmoothPageIndicator in Flutter.
🚀 Nice, clean and modern Hotel Booking #App #UI made in #Flutter
⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub.
► Social Media
GitHub: https://github.com/Punithraaj
LinkedIn: https://www.linkedin.com/in/roaring-r...
Twitter: https://twitter.com/roaringraaj
Facebook: https://www.facebook.com/flutterdartacademy
I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub!
⭐️ Thanks for watching the video and for more updates don't forget to click on the notification.⭐️Please comment your suggestion for my improvement. ⭐️Remember to like, subscribe, share this video, and star the repo on Github :)Hope you enjoyed this video! If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj
#flutter riverpod #flutter travel app #appointment app flutter #morioh
1644991965
Flutter Hotel Booking UI - Book your Stay At A New Hotel - Ep3
In this video, I'm going to show you how to make a Cool Hotel Booking App using Flutter from scratch.
In this Episode , you will learn how to create a Custom Navigation Bar for Navigating between Screen.
🚀 Nice, clean and modern Hotel Booking #App #UI made in #Flutter
⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub.
Starter Project : https://github.com/Punithraaj/Flutter_Hotel_Booking_UI/tree/Episode-2
► Timestamps
0:00 Intro
0:15 Custom Bottom Navigation Screen
07:26 Tab Button
► Social Media
GitHub: https://github.com/Punithraaj/Flutter_Hotel_Booking_UI
LinkedIn: https://www.linkedin.com/in/roaring-r...
Twitter: https://twitter.com/roaringraaj
Facebook: https://www.facebook.com/flutterdartacademy
► Previous Episode : https://youtu.be/A0QdZPpMBb0
► Playlist: https://www.youtube.com/playlist?list=PL6vcAuTKAaYdboy1OOxnMekOEuRzHUvR6
RESOURCES
Complete Hotel Booking App UI Design Tutorial: https://youtube.com/playlist?list=PL6vcAuTKAaYdboy1OOxnMekOEuRzHUvR6
Complete Tik Tok Clone App Tutorial: https://youtube.com/playlist?list=PL6vcAuTKAaYe_9KQRsxTsFFSx78g1OluK
Complete Online Books Store Flutter UI Tutorial: https://youtube.com/playlist?list=PL6vcAuTKAaYdRkc_jt08x23plwGAYiGTU
Flutter UI Tutorial: https://youtube.com/playlist?list=PL6vcAuTKAaYeKyXAwzB9JnuR5l0dOlNRh
Flutter Integration Tutorial: https://youtube.com/playlist?list=PL6vcAuTKAaYdpG5qfCjSEgugvvhqFemes
I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub!
⭐️ Thanks for watching the video and for more updates don't forget to click on the notification.
⭐️Please comment your suggestion for my improvement.
⭐️Remember to like, subscribe, share this video, and star the repo on Github :)
Hope you enjoyed this video!
If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj
LIKE & SHARE & ACTIVATE THE BELL Thanks For Watching :-)
https://youtu.be/cCion2y7hNE
#appointment app flutter #flutter #fluttertravelapp #hotelbookingui #flutter ui design #book your stay at a new hotel app #hotel booking app flutter #flutter travel ui tutorial #morioh #flutter
1642514982
Flutter Hotel Booking UI - Book your Stay At A New Hotel - Ep3
In this video, I'm going to show you how to make a Cool Hotel Booking App using Flutter from scratch.
In this Episode , you will learn how to create a Custom Navigation Bar for Navigating between Screen.
🚀 Nice, clean and modern Hotel Booking #App #UI made in #Flutter
⚠️ IMPORTANT: If you want to learn, I strongly advise you to watch the video at a slow speed and try to follow the code and understand what is done, without having to copy the code, and then download it from GitHub.
Starter Project : https://github.com/Punithraaj/Flutter_Hotel_Booking_UI/tree/Episode-2
► Timestamps
0:00 Intro
0:15 Custom Bottom Navigation Screen
07:26 Tab Button
► Social Media
GitHub: https://github.com/Punithraaj/Flutter_Hotel_Booking_UI
LinkedIn: https://www.linkedin.com/in/roaring-r...
Twitter: https://twitter.com/roaringraaj
Facebook: https://www.facebook.com/flutterdartacademy
► Previous Episode : https://youtu.be/A0QdZPpMBb0
► Playlist: https://www.youtube.com/playlist?list=PL6vcAuTKAaYdboy1OOxnMekOEuRzHUvR6
I hope you liked it, and don't forget to like,comment, subscribe, share this video with your friends, and star the repository on GitHub!
⭐️ Thanks for watching the video and for more updates don't forget to click on the notification. ⭐️Please comment your suggestion for my improvement. ⭐️Remember to like, subscribe, share this video, and star the repo on Github :)
Hope you enjoyed this video!If you loved it, you can Buy me a coffee : https://www.buymeacoffee.com/roaringraaj
#morioh #flutter travel app #appointment app flutter #flutter #fluttertravelapp #hotelbookingui #flutter ui design #book your stay at a new hotel app #hotel booking app flutter #flutter travel ui tutorial