sked 0.0.1-dev.1 sked: ^0.0.1-dev.1 copied to clipboard
Calendar utility that gives you access to multiple calendars.
import 'package:flutter/material.dart';
import 'package:sked/sked.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'sked',
home: MyHomePage(title: 'sked Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
backgroundColor: Colors.redAccent,
),
body: Center(
child: VerticalDateRangePicker(
firstDate: DateTime.now(),
lastDate: DateTime(DateTime.now().year + 10),
highLightColor: Colors.redAccent,
onEndDateChanged: (date) {},
selectedColor: Colors.redAccent,
onStartDateChanged: (date) {},
splashColor: Colors.redAccent,
presentDayStrokeColor: Colors.black,
selectedTextStyle: const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
),
dayTextStyle: const TextStyle(
color: Colors.black,
),
initialDateRange: DateTimeRange(
start: DateTime.now(),
end: DateTime.now().add(
const Duration(days: 3),
),
),
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}