ifgyong 4 years ago
parent fe04f186db
commit 5dccd93949

@ -8,7 +8,8 @@
<component name="ChangeListManager">
<list default="true" id="18463f0e-cf10-4ee2-975b-376476396e12" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/main.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/main.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />

@ -58,6 +58,9 @@ Now in your Dart code, you can use:
import 'package:flutter_custom_calendar/flutter_custom_calendar.dart';
```
### 动画演示
![](./img.gif)
### [查看API](https://github.com/ifgyong/flutter_custom_calendar/blob/master/API.md)
### [查看一个例子 如何使用](https://github.com/ifgyong/flutter_custom_calendar/blob/master/example/lib/main.dart)

@ -106,11 +106,30 @@ class _MyHomePageState extends State<MyHomePage> {
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Wrap(
body: CupertinoScrollbar(
child: CustomScrollView(
slivers: <Widget>[
_topButtons(),
SliverToBoxAdapter(
child: calendar,
),
SliverToBoxAdapter(
child: Container(
child: Text(
' $_selectDate ',
style: TextStyle(color: Theme.of(context).focusColor),
),
),
)
],
),
),
);
}
Widget _topButtons() {
return SliverToBoxAdapter(
child: Wrap(
direction: Axis.vertical,
crossAxisAlignment: WrapCrossAlignment.start,
children: <Widget>[
@ -165,16 +184,6 @@ class _MyHomePageState extends State<MyHomePage> {
)
],
),
calendar,
Expanded(
child: Text(
' $_selectDate ',
style: TextStyle(color: Theme.of(context).focusColor),
),
)
],
),
),
);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 KiB

@ -1,22 +1,24 @@
name: flutter_custom_calendar
description: A new Flutter Calendar package.
version: 0.0.1
author: xiaodong <450468291@qq.com>
homepage: https://github.com/LXD312569496/flutter_custom_calendar
description: A calendar control of flutter that supports three selection modes。
version: 1.0.4
homepage: http://www.fgyong.cn
author: fgyong
repository: https://github.com/ifgyong/flutter_custom_calendar
issue_tracker: https://github.com/ifgyong/flutter_custom_calendar/issues
environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
provider: ^4.0.4
provider: ^4.1.3
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:

Loading…
Cancel
Save