Flutter Month Picker

Flutter month picker package lets you to choose month and year only and implement in your app.

Installation

  1. Add the latest verstion of package to your pubspec.yaml
dependencies:
  flutter_month_picker: ^0.0.1
  1. Run
    flutter pub get
  1. Import the package and use it in your Flutter app.
import 'package:flutter_month_picker/flutter_month_picker.dart';

Example


class FlutterMonthPicker extends StatelessWidget {
  const FlutterMonthPicker({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: TextButton(
          onPressed: () async {
            final date = await showMonthPicker(
              context: context,
              initialDate: DateTime.now(),
              firstDate: DateTime(2000),
              lastDate: DateTime(2050),
            );
            log(date.toString());
          },
          child: const Text('Open Month Picker'),
        ),
      ),
    );
  }
}

Next Goals

  • More customization like: size, color, textstyles, localizaton, platform.
  • Implentation of lcoalization.
  • Cross-platform (Android and IOS) UI.