simple_calendar_flutter 0.0.1
simple_calendar_flutter: ^0.0.1 copied to clipboard

This is a package to have a simple calendar

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:simple_calendar_flutter/simple_calendar.dart';
import 'package:simple_calendar_flutter/core/models/simple-header-calendar.model.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            SimpleCalendar(
              showDays: true,
//              showOutsideDays: ,
              headerStyle: SimpleHeaderCalendarStyle(),
              ctx: context,
              onSelectDate: (DateTime date, List events) {
                print(date);
              },
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
70
pub points
0%
popularity

This is a package to have a simple calendar

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on simple_calendar_flutter