vk_custom_widgets 1.1.0
vk_custom_widgets: ^1.1.0 copied to clipboard
A package containing most used custom widgets like - custom elevated buttons, password text form fields etc.
vk_custom_widgets #
A lightweight Flutter package providing reusable custom widgets with clean APIs and best practices.
Features #
- VkElevatedButton - Customizable elevated button with clean API
- VkTextFormField - Enhanced text input field
- VkPasswordFormField - Password input with visibility toggle
- VkRadioButtonGroup - Type-safe, customizable radio button group
- Clean, stateless implementations
- Material design compliant
- Ready for extension and theming
Installation #
Add this to your pubspec.yaml:
dependencies:
vk_custom_widgets: ^1.1.0
Then run:
flutter pub get
Usage #
import 'package:vk_custom_widgets/vk_custom_widgets.dart';
VkElevatedButton(
label: 'Submit',
onPressed: () {
// Handle button press
},
);
VkPasswordFormField(
label: 'Password',
controller: _passwordController,
);
VkTextFormField(
label: 'Name',
controller: _nameController
);
// Radio Button Group
VkRadioButtonGroup<int>(
items: const [
VkRadioItem(value: 1, label: 'Option 1'),
VkRadioItem(value: 2, label: 'Option 2'),
VkRadioItem(value: 3, label: 'Option 3'),
],
groupValue: selectedValue,
onChanged: (value) {
setState(() => selectedValue = value);
},
);
// Customized Radio Button Group
VkRadioButtonGroup<String>(
items: const [
VkRadioItem(value: 'small', label: 'Small'),
VkRadioItem(value: 'medium', label: 'Medium'),
VkRadioItem(value: 'large', label: 'Large'),
],
groupValue: selectedSize,
onChanged: (value) => setState(() => selectedSize = value),
backgroundColor: Colors.blue.shade50,
fillColor: Colors.blue,
labelStyle: TextStyle(color: Colors.blue.shade900, fontWeight: FontWeight.w500),
borderRadius: 12,
padding: EdgeInsets.all(16),
);