calendar_views 0.5.2 copy "calendar_views: ^0.5.2" to clipboard
calendar_views: ^0.5.2 copied to clipboard

Collection of customisable calendar related widgets for Flutter.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'days_page_view_example.dart';
import 'day_view_example.dart';
import 'month_page_view_example.dart';
import 'month_view_example.dart';

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

/// Screen for picking different examples of this library.
///
/// Examples:
/// * [DayView example](day_view_example.dart)
/// * [DaysPageView example](days_page_view_example.dart)
/// * [MonthPageView example](month_page_view_example.dart)
/// * [MonthView example](month_view_example.dart)
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: "calendar_views example",
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text("calendar_views example"),
        ),
        body: new Builder(builder: (BuildContext context) {
          return new ListView(
            children: <Widget>[
              new ListTile(
                title: new Text("Day View"),
                subtitle: new Text("DayView Example"),
                onTap: () {
                  _showWidgetInFullScreenDialog(
                    context,
                    new DayViewExample(),
                  );
                },
              ),
              new Divider(height: 0.0),
              new ListTile(
                title: new Text("Days Page View"),
                subtitle: new Text("DaysPageView Example"),
                onTap: () {
                  _showWidgetInFullScreenDialog(
                    context,
                    new DaysPageViewExample(),
                  );
                },
              ),
              new Divider(height: 0.0),
              new ListTile(
                title: new Text("Month Page View"),
                subtitle: new Text("MonthPageView Example"),
                onTap: () {
                  _showWidgetInFullScreenDialog(
                    context,
                    new MonthPageViewExample(),
                  );
                },
              ),
              new Divider(height: 0.0),
              new ListTile(
                title: new Text("Month View"),
                subtitle: new Text("MonthView Example"),
                onTap: () {
                  _showWidgetInFullScreenDialog(
                    context,
                    new MonthViewExample(),
                  );
                },
              ),
              new Divider(height: 0.0),
            ],
          );
        }),
      ),
    );
  }

  void _showWidgetInFullScreenDialog(BuildContext context, Widget widget) {
    Navigator.of(context).push(
      new MaterialPageRoute(
        fullscreenDialog: true,
        builder: (BuildContext context) {
          return widget;
        },
      ),
    );
  }
}
33
likes
40
pub points
65%
popularity

Publisher

unverified uploader

Collection of customisable calendar related widgets for Flutter.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, meta, quiver

More

Packages that depend on calendar_views