scrolling_calendar 0.1.0 copy "scrolling_calendar: ^0.1.0" to clipboard
scrolling_calendar: ^0.1.0 copied to clipboard

outdatedDart 1 only

A new flutter package project.

example/lib/main.dart

import 'dart:math';

import 'package:flutter/material.dart';
import 'package:scrolling_calendar/scrolling_calendar.dart';

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

class MyApp extends StatelessWidget {
  static final Random random = new Random();

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(primarySwatch: Colors.blue, accentColor: Colors.red),
      initialRoute: '/',
      routes: {
        '/': (BuildContext context) => new Scaffold(
            body: new ScrollingCalendar(
                firstDayOfWeek: DateTime.monday,
                onDateTapped: (DateTime date) => showDialog(
                    context: context,
                    builder: (BuildContext context) => new AlertDialog(
                      content: new Text("You tapped $date"),
                    )),
                selectedDate: new DateTime(2018, 2, 20),
                colorMarkers: (DateTime date) => <Color>[]
                  ..addAll(random.nextBool() ? <Color>[] : <Color>[Colors.red])
                  ..addAll(random.nextBool() ? <Color>[] : <Color>[Colors.blue])
                  ..addAll(
                      random.nextBool() ? <Color>[] : <Color>[Colors.green])))
      },
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter package project.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, intl, meta, platform_aware

More

Packages that depend on scrolling_calendar