Skip to content

Instantly share code, notes, and snippets.

@chooyan-eng
Last active February 16, 2022 09:53
Show Gist options
  • Select an option

  • Save chooyan-eng/ae5d5aaf2b128cadeef3fad3123c0e9f to your computer and use it in GitHub Desktop.

Select an option

Save chooyan-eng/ae5d5aaf2b128cadeef3fad3123c0e9f to your computer and use it in GitHub Desktop.
Handson memo

パッケージ、アプリプロジェクトをそれぞれ作成

flutter create -t package calendar_logic
flutter create -t package calendar_widget
flutter create flutter_calendar

GitHubリポジトリ作成

同名のGitHubリポジトリをpublicで作成

一旦コミット&PUSH

calendar_logic を開く

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:chooyan-eng/calendar_logic.git
git push -u origin main

calendar_logicをインポート

flutter_calendar を開く

pubspec.yaml に以下を追加

  calendar_logic:
    git:
      url: https://github.com/chooyan-eng/calendar_logic.git

カウンターアプリの61行目を以下に変更

_counter = Calculator().addOne(_counter);

実行して動作確認

実行ボタン押すだけ

calendarロジックの修正

// TODO

calendarロジックを使ったUIの作成

// TODO

calendarロジックを使ったWidgetを calendar_widget に移植

// TODO

calendar_widget を flutter_calendar にインポート

// TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment