Skip to content

Commit

Permalink
Merge pull request #4 from guchengxi1994/main
Browse files Browse the repository at this point in the history
feat
  • Loading branch information
guchengxi1994 authored Dec 18, 2024
2 parents abe6f25 + d6fc3bf commit cd63a55
Show file tree
Hide file tree
Showing 23 changed files with 789 additions and 529 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/flutter_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
with:
flutter-version: 3.24.5

- name: Bump build number
run: |
flutter pub global activate cider
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $GITHUB_ENV

- name: "Web Build 🔧"
run: |
cd example/
Expand All @@ -26,4 +33,12 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: ./example/build/web
folder: ./example/build/web

- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to Pub.dev

# 流程触发时机,create当有标签tag创建时触发,如 v1.0.0。当然也可以选择别的触发时机,如 push,release 等
on: create
# push:
# branches:
# - master

jobs:
publishing:
runs-on: ubuntu-latest
steps:
# 拉取仓库代码
- name: "Checkout"
uses: actions/checkout@v3
# 发布插件
- name: Dart and Flutter Package Publisher
uses: k-paxian/dart-package-publisher@master
with:
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
suppressBuildRunner: true
flutter: true
skipTests: true
force: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ migrate_working_dir/
**/doc/api/
.dart_tool/
build/

/example/pubspec.lock
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.0.1+1
* Fix and new features.

## 0.0.1

* TODO: Describe initial release.
* initial release.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
final controller = BoardController(
initialState:
BoardState<BaseNode, Edge>(data: BaseNode.fake(), edges: []));
BoardState<BaseNode, Edge>(data: BaseNode.fake(), edges: {}));
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
Expand Down
260 changes: 0 additions & 260 deletions example/pubspec.lock

This file was deleted.

5 changes: 3 additions & 2 deletions lib/flow_compose.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
library;

export 'src/board.dart';
export 'src/fishbone.dart';
export 'src/base_node.dart';
export 'src/nodes/base_node.dart';
export 'src/controller.dart';
export 'src/state.dart';
19 changes: 19 additions & 0 deletions lib/src/annotation.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class NotReady {
final String info;

const NotReady({this.info = "This feature is not ready yet!"});
}

enum FeaturesType {
boardDrag,
boardScaleChange,
nodeDrag,
nodeDelete,
all,
}

class Features {
final List<FeaturesType> features;

const Features({required this.features});
}
Loading

0 comments on commit cd63a55

Please sign in to comment.