custom radio group list
flutter package to create list of radio button, by providing a list of objects it can be a string list or list of map.
features
- radio list can be generated using a string list
- radio list can be generated using list of any map object.
- selected item(string/object) can be marked checked
- list can be marked disabled so that user cannot change its value.
- scroll direction can be set to horizontal as well as vertical
- textsize and textcolor can be customized
getting started
in the pubspec.yaml
of your flutter project, add the following dependency:
custom_radio_group_list: ^1.0.0
import it to each file you use it in:
import 'package:custom_radio_group_list/custom_radio_group_list.dart';
usage
example 1
this example is very basic which uses list of string
radiogroup(
radiolist: sampleliststring,
selecteditem: 1,
onchanged: (value) {
print(‘value : ${value}’);
},
disabled: true)
example 2
this example shows use of map object list to display radio group list.
radiogroup(
radiolistobject: samplelist,
textparametername: 'data',
selecteditem: 1,
onchanged: (value) {
print('value : ${value}');
} )
sample
please download repository from
https://github.com/ashokv1337/custom_radio_group_list
go to example folder and see the sample implementation.
additional information
feel free to report any issue and feature.
Comments are closed.