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

Horizontal and vertical date picker in Flutter, with the ability to change the scroll and card direction in any combination

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:smoothdatepicker/smoothdatepicker.dart';


void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Smooth Date Picker Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  // reference to our single class that manages the database
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color.fromRGBO(63, 136, 197, 1),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[

          Text(time.toString()),

          SDatePicker(
            scrollDirection: Axis.horizontal,
            cardDirection: Axis.horizontal,
            mainColor: Colors.blue,
            secondColor: Colors.yellow,
            onSelectionChanged: (selectedDate){
              setState(() {
                time = selectedDate;
              });
            },

          ),
        ],
      ),
    );
  }
}

DateTime time = DateTime.now();
10
likes
40
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

Horizontal and vertical date picker in Flutter, with the ability to change the scroll and card direction in any combination

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, vibration

More

Packages that depend on smoothdatepicker