mini_calendar 0.3.3 mini_calendar: ^0.3.3 copied to clipboard
Date component developed with Flutter, plans to support display, swipe left and right, add date mark, radio, display week, etc.
import 'package:example/calendar_customize.dart';
import 'package:example/calendar_view.dart';
import 'package:example/month_page_view_demo.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@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> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (ctx) => CalendarViewPage())),
child: Text('年历'),
),
RaisedButton(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (ctx) => MonthPageViewDemo())),
child: Text('日历'),
),
RaisedButton(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (ctx) => CalendarCustomizePage())),
child: Text('自定义'),
),
],
),
),
);
}
}