Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #141 from 2rabs/feature/devide_top_and_schedule
Browse files Browse the repository at this point in the history
♻️ トップページとスケジュールページを分離
  • Loading branch information
tatsutakein authored Mar 18, 2023
2 parents 2dd439e + a0b1c47 commit b0602c1
Show file tree
Hide file tree
Showing 155 changed files with 5,230 additions and 97 deletions.
5 changes: 5 additions & 0 deletions apps/frontend/lib/src/settings/router_settings.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:core_network/core_network.dart';
import 'package:feature_auth/feature_auth.dart';
import 'package:feature_schedule/feature_schedule.dart';
import 'package:feature_settings/feature_settings.dart';
import 'package:feature_top/feature_top.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -32,6 +33,10 @@ final routerProvider = Provider<GoRouter>(
path: '/settings',
builder: (context, state) => const SettingsScreen(),
),
GoRoute(
path: '/schedule',
builder: (context, state) => const SchedulePage(),
),
// 引数付きの場合は以下のように作成する
// GoRoute(
// path: '/example/:something',
Expand Down
19 changes: 13 additions & 6 deletions apps/frontend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ packages:
relative: true
source: path
version: "0.1.0"
feature_schedule:
dependency: "direct main"
description:
path: "../../packages/feature/schedule"
relative: true
source: path
version: "0.0.1"
feature_settings:
dependency: "direct main"
description:
Expand Down Expand Up @@ -292,10 +299,10 @@ packages:
dependency: transitive
description:
name: flutter_riverpod
sha256: "46a27b7a11dc13738054093076f2dc65692ddcd463979b15092accf5681aea20"
sha256: b3c3a8a9714b7f88dd2a41e1efbc47f76d620b06ab427c62ae7bc82298cd7dbb
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -438,10 +445,10 @@ packages:
dependency: "direct main"
description:
name: hooks_riverpod
sha256: a596bcb1eaf48eae6da1ce8b9e60ec9538ef7d15725e941c3626f29dfcc01d96
sha256: "7e673817a7db4d6403a079882485affd3156d79c06209389353d0977d513f905"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.2"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -678,10 +685,10 @@ packages:
dependency: transitive
description:
name: riverpod
sha256: "59a48de9c757aa61aa28e9fd625ffb360d43b6b54606f12536622c55be9e8c4b"
sha256: b0fbf7927333c5c318f7e2c22c8b4fd2542ba294de0373e80ecdb34e0dcd8dc4
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.3.2"
rxdart:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions apps/frontend/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ dependencies:
path: ../../packages/feature/auth
feature_settings:
path: ../../packages/feature/settings
feature_schedule:
path: ../../packages/feature/schedule

cupertino_icons: ^1.0.2
flutter_dotenv: ^5.0.2
Expand Down
2 changes: 1 addition & 1 deletion packages/core/data/lib/src/member/member_repository.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:core_model/core_model.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

final memberRepositoryProvider = FutureProvider.autoDispose<MemberRepository>(
final memberRepositoryProvider = Provider.autoDispose<MemberRepository>(
(ref) => throw UnimplementedError(),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:core_network/core_network.dart';

final offlineFirstMemberRepositoryProvider =
memberRepositoryProvider.overrideWith(
(ref) async => OfflineFirstMemberRepository(
memberApi: await ref.watch(memberApiProvider.future),
(ref) => OfflineFirstMemberRepository(
memberApi: ref.watch(memberApiProvider),
),
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import 'package:core_data/core_data.dart';
import 'package:core_model/core_model.dart';
import 'package:core_network/core_network.dart';

final offlineFirstParticipationRepositoryProvider =
participationRepositoryProvider.overrideWith(
(ref) async => OfflineFirstParticipationRepository(
participationApi: await ref.watch(participationApiProvider.future),
(ref) => OfflineFirstParticipationRepository(
participationApi: ref.watch(participationApiProvider),
),
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';

final participationRepositoryProvider =
FutureProvider.autoDispose<ParticipationRepository>(
Provider.autoDispose<ParticipationRepository>(
(ref) => throw UnimplementedError(),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:core_network/core_network.dart';

final offlineFirstScheduleRepositoryProvider =
scheduleRepositoryProvider.overrideWith(
(ref) async => OfflineFirstScheduleRepository(
api: await ref.watch(scheduleApiProvider.future),
(ref) => OfflineFirstScheduleRepository(
api: ref.watch(scheduleApiProvider),
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:core_model/core_model.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

final scheduleRepositoryProvider =
FutureProvider.autoDispose<ScheduleRepository>(
Provider.autoDispose<ScheduleRepository>(
(ref) => throw UnimplementedError(),
);

Expand Down
10 changes: 4 additions & 6 deletions packages/core/domain/lib/src/participate_use_case.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import 'package:core_data/core_data.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

final participateUseCaseProvider =
FutureProvider.autoDispose<ParticipateUseCase>(
(ref) async => ParticipateUseCase(
memberRepository: await ref.watch(memberRepositoryProvider.future),
participationRepository:
await ref.watch(participationRepositoryProvider.future),
final participateUseCaseProvider = Provider.autoDispose<ParticipateUseCase>(
(ref) => ParticipateUseCase(
memberRepository: ref.watch(memberRepositoryProvider),
participationRepository: ref.watch(participationRepositoryProvider),
),
);

Expand Down
2 changes: 1 addition & 1 deletion packages/core/network/lib/src/member/member_api.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:core_network/src/member/model/network_member.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

final memberApiProvider = FutureProvider.autoDispose<MemberApi>(
final memberApiProvider = Provider.autoDispose<MemberApi>(
(ref) => throw UnimplementedError(),
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:hooks_riverpod/hooks_riverpod.dart';

final participationApiProvider = FutureProvider.autoDispose<ParticipationApi>(
final participationApiProvider = Provider.autoDispose<ParticipationApi>(
(ref) => throw UnimplementedError(),
);

Expand Down
2 changes: 1 addition & 1 deletion packages/core/network/lib/src/schedule/schedule_api.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:core_network/src/schedule/model/network_schedule.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

final scheduleApiProvider = FutureProvider.autoDispose<ScheduleApi>(
final scheduleApiProvider = Provider.autoDispose<ScheduleApi>(
(ref) => throw UnimplementedError(),
);

Expand Down
30 changes: 30 additions & 0 deletions packages/feature/schedule/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# 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
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.packages
build/
27 changes: 27 additions & 0 deletions packages/feature/schedule/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.

version:
revision: 12cb4eb7a009f52b347b62ade7cb4854b926af72
channel: stable

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 12cb4eb7a009f52b347b62ade7cb4854b926af72
base_revision: 12cb4eb7a009f52b347b62ade7cb4854b926af72

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
3 changes: 3 additions & 0 deletions packages/feature/schedule/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.0.1

* TODO: Describe initial release.
1 change: 1 addition & 0 deletions packages/feature/schedule/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Add your license here.
18 changes: 18 additions & 0 deletions packages/feature/schedule/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# feature_schedule

A new Flutter plugin project.

## Getting Started

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.

For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

The plugin project was generated without specifying the `--platforms` flag, no platforms are currently supported.
To add platforms, run `flutter create -t plugin --platforms <platforms> .` in this directory.
You can also find a detailed instruction on how to add platforms in the `pubspec.yaml` at https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
4 changes: 4 additions & 0 deletions packages/feature/schedule/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
44 changes: 44 additions & 0 deletions packages/feature/schedule/example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# 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/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
16 changes: 16 additions & 0 deletions packages/feature/schedule/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# feature_schedule_example

Demonstrates how to use the feature_schedule plugin.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
4 changes: 4 additions & 0 deletions packages/feature/schedule/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:flutter_lints/flutter.yaml

linter:
rules:
13 changes: 13 additions & 0 deletions packages/feature/schedule/example/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
Loading

0 comments on commit b0602c1

Please sign in to comment.