flutter_custom_form_component 0.0.4 copy "flutter_custom_form_component: ^0.0.4" to clipboard
flutter_custom_form_component: ^0.0.4 copied to clipboard

discontinued
outdated

Bank card number field, Date field, Money field

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_custom_form_component/widget/field/bankcardnumber/bankcardnumber.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/field/date/422/yyyyddmm.dart';
import 'package:flutter_custom_form_component/widget/field/date/422/yyyymmdd.dart';
import 'package:flutter_custom_form_component/widget/field/money/money.dart';
import 'package:flutter_custom_form_component/widget/page.dart';

/// Main example.
void main() {
  runApp(const AppWidget());
}

/// Main app widget.
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'));
}

/// Main page widget.
class OnePageWidget extends StatelessWidget {
  const OnePageWidget({Key? key}) : super(key: key);

  @override
  Widget build(final BuildContext context) => page(Column(children: [
        SizedBox(
          child: MmDdYyyyFieldWidget(

              /// Optional. It has default value.
              hint: 'MM / DD / YYYY',

              /// Optional. For your own validation logic.
              isValid: true,
              onChanged: (final int? year, final int? month, final int? day) {
                /// You can get the values here.
              },

              /// Optional. It has default value.
              separator: ' / '),

          /// Wrap the height.
          height: 52.0,
        ),
        const SizedBox(height: 20.0),
        SizedBox(
          child: DdMmYyyyFieldWidget(

              /// Optional. It has default value.
              hint: 'DD / MM / YYYY',

              /// Optional. For your own validation logic.
              isValid: true,
              onChanged: (final int? year, final int? month, final int? day) {
                /// You can get the values here.
              },

              /// Optional. It has default value.
              separator: ' / '),

          /// Wrap the height.
          height: 52.0,
        ),
        const SizedBox(height: 20.0),
        SizedBox(
          child: YyyyMmDdFieldWidget(

              /// Optional. It has default value.
              hint: 'YYYY / MM / DD',

              /// Optional. For your own validation logic.
              isValid: true,
              onChanged: (final int? year, final int? month, final int? day) {
                /// You can get the values here.
              },

              /// Optional. It has default value.
              separator: ' / '),

          /// Wrap the height.
          height: 52.0,
        ),
        const SizedBox(height: 20.0),
        SizedBox(
          child: YyyyDdMmFieldWidget(

              /// Optional. It has default value.
              hint: 'YYYY / DD / MM',

              /// Optional. For your own validation logic.
              isValid: true,
              onChanged: (final int? year, final int? month, final int? day) {
                /// You can get the values here.
              },

              /// Optional. It has default value.
              separator: ' / '),

          /// Wrap the height.
          height: 52.0,
        ),
        const SizedBox(height: 20.0),
        SizedBox(
          child: MoneyFieldWidget(

              /// Optional
              hint: '\$ 0.0',

              /// Optional
              isUsingPeriodInThousand: true,
              onChanged: (final double? value) {
                /// You can get the values here.
              },

              /// Optional
              symbol: '\$ '),

          /// Wrap the height.
          height: 52.0,
        ),
        const SizedBox(height: 20.0),
        SizedBox(
          child: BankCardNumberFieldWidget(

              /// Optional
              hint: '0000 - 0000 - 0000 - 0000',

              /// Optional
              onChanged: (final String value) {
                /// You can get the values here.
              },

              /// Optional
              separator: ' - '),

          /// Wrap the height.
          height: 52.0,
        )
      ]));
}
1
likes
0
pub points
50%
popularity

Publisher

verified publisherhendrickprasdito.com

Bank card number field, Date field, Money field

Homepage

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on flutter_custom_form_component