Skip to content

Commit b2c4f39

Browse files
Merge pull request #95 from rootstrap/enhancement/example_module_refactor
Example module refactor
2 parents 14e30a1 + 34b856b commit b2c4f39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+583
-62
lines changed

.idea/flutter-base.iml

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Dart_SDK.xml

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/lib/main/init.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import 'package:app/main/app.dart';
12
import 'package:common/init.dart';
23
import 'package:domain/init.dart';
4+
import 'package:example_domain/init.dart';
35
import 'package:flutter/material.dart';
4-
import 'package:app/main/app.dart';
56
import 'package:get_it/get_it.dart';
67
import 'package:url_strategy/url_strategy.dart';
78

@@ -17,4 +18,5 @@ final getIt = GetIt.instance;
1718
Future<void> initialize() async {
1819
await CommonInit.initialize(getIt);
1920
await DomainInit.initialize(getIt);
21+
await ExampleDomainInit.initialize(getIt);
2022
}

app/lib/presentation/ui/pages/home/home_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'package:app/main/init.dart';
2-
import 'package:domain/services/ProductService.dart';
32
import 'package:flutter/widgets.dart';
43
import 'package:app/presentation/ui/pages/home/home_view.dart';
54
import 'package:flutter_bloc/flutter_bloc.dart';
5+
import 'package:example_domain/services/ProductService.dart';
66

77
class HomePage extends StatelessWidget {
88
ProductService get _productsService => getIt<ProductService>();

app/lib/presentation/ui/pages/home/home_view.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import 'package:app/main/init.dart';
22
import 'package:common/core/failure/failure.dart';
33
import 'package:common/core/resource.dart';
4-
import 'package:domain/models/product.dart';
4+
import 'package:example_domain/models/product.dart';
55
import 'package:domain/services/AuthService.dart';
6+
import 'package:example_presentation/ui/product/products_list_widget.dart';
7+
import 'package:example_presentation/ui/product/products_loading.dart';
68
import 'package:flutter/material.dart';
7-
import 'package:domain/bloc/auth/auth_cubit.dart';
8-
import 'package:domain/bloc/get_products/get_products_cubit.dart';
9+
import 'package:example_domain/bloc/get_products/get_products_cubit.dart';
910
import 'package:app/presentation/ui/custom/app_theme_switch.dart';
1011
import 'package:app/presentation/ui/custom/failure_widget.dart';
11-
import 'package:app/presentation/ui/pages/home/widget/products_list_widget.dart';
12-
import 'package:app/presentation/ui/pages/home/widget/products_loading.dart';
12+
1313
import 'package:flutter_bloc/flutter_bloc.dart';
1414

1515
class HomeView extends StatelessWidget {

app/pubspec.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ dependencies:
4545
path: ../modules/domain
4646
common:
4747
path: ../modules/common
48+
example_domain:
49+
path: ../example/example_domain
50+
example_presentation:
51+
path: ../example/example_presentation
52+
4853
http: ^0.13.6
4954
melos: ^3.4.0
5055
dev: ^1.0.0

example/example_data/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
build/

example/example_data/.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "300451adae589accbece3490f4396f10bdf15e6e"
8+
channel: "stable"
9+
10+
project_type: package

example/example_data/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1
2+
3+
* TODO: Describe initial release.

example/example_data/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: Add your license here.

0 commit comments

Comments
 (0)