-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
125 changed files
with
5,087 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
build/ | ||
|
||
# Android related | ||
**/android/**/gradle-wrapper.jar | ||
**/android/.gradle | ||
**/android/captures/ | ||
**/android/gradlew | ||
**/android/gradlew.bat | ||
**/android/local.properties | ||
**/android/**/GeneratedPluginRegistrant.java | ||
|
||
# iOS/XCode related | ||
**/ios/**/*.mode1v3 | ||
**/ios/**/*.mode2v3 | ||
**/ios/**/*.moved-aside | ||
**/ios/**/*.pbxuser | ||
**/ios/**/*.perspectivev3 | ||
**/ios/**/*sync/ | ||
**/ios/**/.sconsign.dblite | ||
**/ios/**/.tags* | ||
**/ios/**/.vagrant/ | ||
**/ios/**/DerivedData/ | ||
**/ios/**/Icon? | ||
**/ios/**/Pods/ | ||
**/ios/**/.symlinks/ | ||
**/ios/**/profile | ||
**/ios/**/xcuserdata | ||
**/ios/.generated/ | ||
**/ios/Flutter/App.framework | ||
**/ios/Flutter/Flutter.framework | ||
**/ios/Flutter/Flutter.podspec | ||
**/ios/Flutter/Generated.xcconfig | ||
**/ios/Flutter/app.flx | ||
**/ios/Flutter/app.zip | ||
**/ios/Flutter/flutter_assets/ | ||
**/ios/Flutter/flutter_export_environment.sh | ||
**/ios/ServiceDefinitions.json | ||
**/ios/Runner/GeneratedPluginRegistrant.* | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: 5f21edf8b66e31a39133177319414395cc5b5f48 | ||
channel: stable | ||
|
||
project_type: package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## [0.0.1] | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# TimelineTile | ||
|
||
A package to help build customisable timelines in Flutter. | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
A Timeline consists in a group of TimelineTiles. To build a tile you can simply use: | ||
|
||
```dart | ||
TimelineTile() | ||
``` | ||
|
||
This will build a default tile that aligns to the left, with a `height` of 100: | ||
|
||
[img 1] | ||
|
||
There are 4 types of alignment. | ||
- `TimelineAlign.left` | ||
- `TimelineAlign.right` | ||
- `TimelineAlign.center` | ||
- `TimelineAlign.manual` | ||
|
||
The `left` and `right` alignment allows a child in their opposite sides. On the other hand, both `center` and `manual` allows children on both sides. For example, one tile widh alignment to the center: | ||
|
||
```dart | ||
TimelineTile( | ||
alignment: TimelineAlign.center, | ||
rightChild: Container( | ||
constraints: const BoxConstraints( | ||
minHeight: 120, | ||
), | ||
color: Colors.lightGreenAccent, | ||
), | ||
leftChild: Container( | ||
color: Colors.amberAccent, | ||
), | ||
); | ||
``` | ||
|
||
When providing children to the tile the height will be as minimum as possible, so you can control it with a height constraint (at least minHeight). This way the tile knows how to size it properly. | ||
|
||
[img 2] | ||
|
||
### Manual aligning the idicator | ||
|
||
With TimelineAlign.manual you can provide the lineX, which allows you to specify a value from 0.0 to 1.0, that represents a widht percentage. For example, aligning at 30% of the widht: | ||
|
||
```dart | ||
TimelineTile( | ||
alignment: TimelineAlign.manual, | ||
lineX: 0.3, | ||
rightChild: Container( | ||
constraints: const BoxConstraints( | ||
minHeight: 120, | ||
), | ||
color: Colors.lightGreenAccent, | ||
), | ||
leftChild: Container( | ||
color: Colors.amberAccent, | ||
), | ||
); | ||
``` | ||
|
||
[img3] | ||
|
||
### Is it the first or the last? | ||
|
||
You can decide if a tile is the first os the last in a timeline. This way you control whether a top or bottom line must be rendered. | ||
|
||
[img] | ||
|
||
[See the implementation here] | ||
|
||
### Start to make a timeline | ||
|
||
You can finally start to combine some tiles to make a Timeline. The flag `hasIndicator` can control whether an indicator should or shouldn't be rendered. | ||
|
||
[img4] | ||
|
||
[See the implementation here] | ||
|
||
### Customize the indicator as you wish | ||
|
||
The default indicator is a circle, and you can customize it as you wish. With `IndicatorStyle` you can change the color, the Y position based on values from 0.0 to 1.0 or give it a padding. You must explicitly provide its width though. | ||
|
||
[img] | ||
|
||
[See the implementation here] | ||
|
||
### Give an icon to the indicator | ||
|
||
With `IconStyle` you can provide an Icon to be rendered inside the default indicator. | ||
|
||
[img] | ||
|
||
[See the implementation here] | ||
|
||
### Or provide your custom indicator | ||
|
||
With the indicator parameter you can customize the tile with your own indicator. However, you must control its size through both width and height parameters. | ||
|
||
[img] | ||
|
||
[See the implementation here] | ||
|
||
### Customize the tile's line | ||
|
||
With `LineStyle` you can customize both topLine and bottomLine. | ||
|
||
[img] | ||
|
||
[See the implementation here] | ||
|
||
### Connect tiles with TimelineDivider | ||
|
||
The `TimelineDivider` widget allows you to connect tiles that are aligned in different X axis, when combined with `TimelineAlign.manual`. | ||
|
||
[img] | ||
|
||
[See the implementation here] |
Oops, something went wrong.