flutter_custom_form_component 0.0.2
flutter_custom_form_component: ^0.0.2 copied to clipboard
Custom UI components for creating form pages. It will provide much more widgets for supporting common form, i.e. MoneyFieldWidget, BankAccountNumberFieldWidget, and so on. Kindly trying the existing w [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_custom_form_component/widget/field/date/224/ddmmyyyy.dart';
import 'package:flutter_custom_form_component/widget/field/date/224/mmddyyyy.dart';
import 'package:flutter_custom_form_component/widget/page.dart';
void main() {
runApp(const AppWidget());
}
class AppWidget extends StatelessWidget {
const AppWidget({Key? key}) : super(key: key);
@override
Widget build(final BuildContext context) => MaterialApp(
home: const OnePageWidget(),
theme: ThemeData(fontFamily: 'Circular Std'));
}
class OnePageWidget extends StatelessWidget {
const OnePageWidget({Key? key}) : super(key: key);
@override
Widget build(final BuildContext context) => page(Column(children: [
SizedBox(
child: DdMmYyyyFieldWidget(
hint: 'DD / MM / YYYY', // Optional. It has default value.
isValid: true, // Optional. For your own validation logic.
onChanged: (final int? year, final int? month, final int? day) {
// You can get the values here.
},
separator: ' / ', // Optional. It has default value.
),
height: 52.0, // Wrap the height.
),
const SizedBox(height: 20.0),
SizedBox(
child: MmDdYyyyFieldWidget(
hint: 'MM / DD / YYYY', // Optional. It has default value.
isValid: true, // Optional. For your own validation logic.
onChanged: (final int? year, final int? month, final int? day) {
// You can get the values here.
},
separator: ' / ', // Optional. It has default value.
),
height: 52.0,
)
]));
}