inline_calender 2.1.0 copy "inline_calender: ^2.1.0" to clipboard
inline_calender: ^2.1.0 copied to clipboard

discontinuedreplaced by: inline_calendar

An inline calender package inspired by outlook app with Jalali/Shamsi calender support.

inline_calendar #

An inline calendar flutter package inspired by outlook app. It also supports Jalali/Shamsi calendar.

Uses theme and locale of context to localize and change color of widgets.

Usage #

Add the module to your project pubspec.yaml then install it using ``flutter packages get`

...
dependencies:
 ...
 inline_calender: ^2.1.0
...

Example:

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  InlineCalenderModel _controller;
  DateTime _pickedDate = DateTime.now();
  Map<DateTime, Color> _coloredDates = {
    DateTime.now().add(Duration(days: 2)): Colors.blue,
    DateTime.now().subtract(Duration(days: 7)): Colors.red,
  };

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            _controller.selectedDate =
                _controller.selectedDate.add(Duration(days: 1));
          },
          child: Text('Add a Day'),
        ),
        appBar: AppBar(
          title: Text('Inline Calender'),
          bottom: InlineCalender(
            controller: _controller,
            locale: Locale('en_US'),
            isShamsi: false,
            height: 100,
            maxWeeks: 12,
            middleWeekday: DateTime.now().weekday,
          ),
        ),
      ),
    );
  }

  @override
  void initState() {
    _controller = InlineCalenderModel(
      defaultSelectedDate: _pickedDate,
      onChange: (DateTime date) => print(date),
    );
    _controller.coloredDates = _coloredDates;
    super.initState();
  }

  @override
  void dispose() {
    print('dispose');
    _controller.dispose();
    super.dispose();
  }
}
6
likes
40
pub points
0%
popularity

Publisher

unverified uploader

An inline calender package inspired by outlook app with Jalali/Shamsi calender support.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

carousel_extended, flutter, intl, provider, shamsi_date

More

Packages that depend on inline_calender