uk_custom_widget 1.0.2 copy "uk_custom_widget: ^1.0.2" to clipboard
uk_custom_widget: ^1.0.2 copied to clipboard

A new Flutter Custom packages project.

My Custom Widget #

A Flutter package that provides some customizable widgets.

Widgets #

Custom Checkbox #

Importing the CustomCheckbox widget: #

import 'package:uk_custom_widget/uk_custom_checkbox.dart';

Use the CustomCheckbox widget in your app: #

CustomCheckbox(
  value: isChecked,
  onChanged: (val) {
    setState(() {
      isChecked = val;
    });
  },
)

Properties #

Props Description Default Type
value This is used for give the radio button a value Required Boolean
activeColor This is the selected checkbox color Blue Colors
size This is the checkbox size 24.0 Double
borderRadius This is the border radius for checkbox 4 BorderRadius

Method #

Props Description
onChanged This callback function is used when you click on Checkbox. It returns boolean value

Custom RadioButton #

Importing the CustomRadioButton widget: #

import 'package:uk_custom_widget/uk_custom_radio_button.dart';

Use the CustomRadioButton widget in your app: #

    String selectedValue = 'option1';

    CustomRadioButton<String>(
      value: 'option1',
      groupValue: selectedValue,
      activeColor: Colors.red,
      onChanged: (val) {
        setState(() {
          selectedValue = val;
        });
      },
      label: 'Option 1',
      labelStyle: const TextStyle(
        color: Color.fromARGB(255, 26, 25, 25),
        fontSize: 20,
      ),
    ),

Properties #

Props Description Default Type
value This is used for give the radio button a value Required Generic
groupValue This is the selected value of the radio button. Required Generic
activeColor This is the selected radio button color Blue Colors
label This is the label for the radio button Required string
labelStyle This is the label style for the radio button Optional TextStyle

Method #

Props Description
onChanged This callback function is used when you click on RadioButton. It returns selected value
3
likes
0
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter Custom packages project.

License

unknown (license)

Dependencies

flutter

More

Packages that depend on uk_custom_widget