Giter VIP home page Giter VIP logo

gsform's People

Contributors

ahmadazarnia avatar farhadprz avatar mohammadbarati avatar ritagroup avatar saeeddastras avatar vahidesparham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gsform's Issues

Settings to make all Checkboxes required

When using the parameter required on GSField.checkList, it will only enforce one check mark to be checked. Is there an option to request that all are checked?

GSField.checkList(
          required: true,
          items: [
            ...
          ],
          callBack: (CheckDataModel value) {},
        ),

The best case would be if there is a required parameter on CheckDataModel, so i can set each Checkbox that should be required.

Wrap text of CheckDataModel

When using long texts in GSField.checkList widget, it will cause

A RenderFlex overflowed by x pixels on the right.

Simply wrapping and making the checkbox field bigger would be awesome. Otherwise longer texts such as Term agreements cannot be displayed on the mobile version.

on change property for form fields

my code is largely based on the example

late GSForm form;
...

child: form = GSForm.singleSection(
  ...

I use riverpod for state management. Everytime I use the built in flutter showSearch(). My form is reset.

I would like to capture the form's field's values as they are updated to save their state and restore them once the showSearch() is returned

Can't build sample

I am getting an error during build:

/C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/persian_datetime_picker-2.5.0/lib/src/pdate_picker_deprecated.dart:268:33: Error: The getter 'accentTextTheme' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('/C:/tools/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'accentTextTheme'.
          itemStyle = themeData.accentTextTheme.bodyText1;

it seems that there is issue in dependence, but how to solve it?

[Help] Return value of GSField.spinner

I am trying to get the value of the spinner widget. Unfortunately, I will only get the Instance of 'SpinnerDataModel' in my json.

GSField.spinner(
          title: 'What do you want to contact us about?',
          hint: 'Select a reason',
          tag: 'feedbackType',
          required: true,
          weight: 12,
          items: FeedbackType.values // this is a normal enum
              .map((e) => SpinnerDataModel(
                    data: e.name, // I am guessing this is used to transfer the data?
                    name: e.name.capitalizeFirstOfEach,
                    id: 1,
                  ))
              .toList(),
        ),

Maybe I am using the widget wrongly, but as I can not use the value parameter I don't really know why I am only getting the instance of the class....Any help is appreciated.

Error: Either zero or 2 or more [DropdownMenuItem]s

hello i am using GSFORM dropdownlist
i get this error when using 2 GSField.spinner

Either zero or 2 or more [DropdownMenuItem]s were detected with the same value
'package:flutter/src/material/dropdown.dart':
dropdown.dart:1
Failed assertion: line 890 pos 15: 'items == null || items.isEmpty || value == null ||
items.where((DropdownMenuItem item) {
return item.value == value;
}).length == 1'

email validation error

GSField.email(
                    tag: 'email',
                    title: getTranslated('login_hint', context)!,
                    weight: 12,
                    required: true,
                    maxLength: 100,
                    prefixWidget:const Icon(FontAwesomeIcons.envelope,size: 15,),
                    errorMessage:  getTranslated('invalid_email', context)!,
                  ),

whatever I type, even if I type my email account, the validation always returns an error.

image Screenshot 2024-04-11 at 20 35 17

GSField.imagePicker Crashes

Hi there,

When using GSField.imagePicker my app crashes after I press either the 'Camera' or the 'Gallery' button on the bottom sheet that pops up. Implementation is below:

GSField.imagePicker(tag: 'image_upload', iconWidget: const Icon(Icons.camera_alt_outlined))

Do I need to request permissions or something like that before this will work? The exception I get is

════════ Exception caught by image resource service ════════════════════════════
Exception: Invalid image data

How to change font's size of title?

Hi there,

i can't find any change font size method in documentation.

May i know how to change font's size of title?
Example i want increase the font size "Amount"?

GSField.price(
tag: 'product_amount',
title: 'Amount',
weight: 12,
hint: '20000',
required: true,
currencyName: "$",
errorMessage: 'Please enter an amount',
)

DatePicker Date vanishes on a refresh

When I save a form the form is pre-rendered with the saved valued. (The reason for this is that the object used to initialise the form is a stream object. So a change to the object and a change to the entire form ) For the date picker field, it goes blank and if you select the field the picker gives an error stating "Field 'gregorianInitialDate' has not been initialized" .

GSField.datePicker( tag: "surveyExpiry", title: "Survey Expiry", initialDate: toGSDate(vessel?.surveyExpiry), calendarType: GSCalendarType.gregorian,),

`GSDate toGSDate(DateTime? value) {
value ??= DateTime.now();

return GSDate(year: value!.year, month: value!.month, day: value!.day);

}`

comment: the attributes (initialDate, availableFrom, availableTo) should be initialised in GSDatePickerField not _GSDatePickerFieldState. This change would allow the values to be changed dynamically.

[Feature Request] Advanced Text input (Scrollable and multiline)

First of all, I love this package! It's way better than all the other packages that can be found on fluttergems.dev.
One thing that I am missing though is to better input text. Right now I can only use textPlain' or text`, but both widgets can only write in one line, which makes it very hard to write longer texts.

I am looking for support, where the long text can be scrolled vertically and the text box resizes to a certain max height.
In the best case, there will be support for both web and mobile, while the web has this little arrow in the right bottom corner to resize the textbox (like often seen in web boxes or also on GitHub).

GSField.textPlain(
          ...
          weight: 12,
          maxLength: 500,
          maxLine: 30, // As we can only use one line this parameter is currently not useful at all
          showCounter: true,
        ),

Although this package is already superior, this might be a major update!

Web support

Great plugin, but unfortunately without web support. Have to move on to another plugin, as the app is expanding to cross-platform :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.