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

Commit

Permalink
docs(terminal): Diagram done
Browse files Browse the repository at this point in the history
Thanks to dcdg ( dart class diagram generato ) package , we create diagram with dart pub global run dcdg -b mermaid
Don't need either package anymore thanks to data_state

Linked #42
  • Loading branch information
MansourWolou committed Dec 19, 2023
1 parent 1b7790a commit 12c93a3
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 32 deletions.
149 changes: 149 additions & 0 deletions terminal/diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
```mermaid
classDiagram
class UseCase
<<abstract>> UseCase
UseCase : +call()* dynamic
class Status
<<enumeration>> Status
Status : +index int
Status : +values$ List~Status~
Status : +paymentPending$ Status
Status o-- Status
Status : +inProgress$ Status
Status o-- Status
Status : +over$ Status
Status o-- Status
Status : +refused$ Status
Status o-- Status
Status : +success$ Status
Status o-- Status
Status : +aborted$ Status
Status o-- Status
Status : +error$ Status
Status o-- Status
Enum <|.. Status
class DataState
DataState : +data T?
DataState : +error Object?
DataState : +state Status
DataState o-- Status
DataState : +dataValue T
class Success
DataState <|-- Success
class Error
DataState <|-- Error
class Pending
DataState <|-- Pending
class Status
<<enumeration>> Status
Status : +index int
Status : +values$ List~Status~
Status : +success$ Status
Status o-- Status
Status : +error$ Status
Status o-- Status
Status : +pending$ Status
Status o-- Status
Enum <|.. Status
class ProductRepositoryImpl
ProductRepositoryImpl : +getProduct() dynamic
ProductRepositoryImpl : +makeOrder() dynamic
ProductRepository <|.. ProductRepositoryImpl
class Order
Order : +totalPrice int
Order : +productList List~Product~
Order : +props List~Object?~
Equatable <|-- Order
class Product
Product : +name String
Product : +price int
Product : +stock int
Product : +props List~Object?~
Equatable <|-- Product
class ProductRepository
<<abstract>> ProductRepository
ProductRepository : +getProduct()* dynamic
ProductRepository : +makeOrder()* dynamic
class GetProduct
GetProduct : +productRepository ProductRepository
GetProduct o-- ProductRepository
GetProduct : +call() dynamic
UseCase <|.. GetProduct
class MakeOrder
MakeOrder : +productRepository ProductRepository
MakeOrder o-- ProductRepository
MakeOrder : +call() dynamic
UseCase <|.. MakeOrder
class Check
Check : +amount int
Check : +checkNumber int
Check : +props List~Object?~
Check : +stringify bool?
Equatable <|.. Check
class NpcPay
NpcPay : +expire DateTime
NpcPay : +cardNumber int
NpcPay : +props List~Object?~
Equatable <|-- NpcPay
class TransactionRepository
<<abstract>> TransactionRepository
TransactionRepository : +postTransaction()* dynamic
TransactionRepository : +getTransactionStatus()* dynamic
class GetNpcData
GetNpcData : +props List~Object?~
GetNpcData : +stringify bool?
GetNpcData : +call() dynamic
Equatable <|.. GetNpcData
UseCase <|.. GetNpcData
class Proceed
Proceed : +props List~Object?~
Proceed : +stringify bool?
Proceed : +call() dynamic
Equatable <|.. Proceed
UseCase <|.. Proceed
class GetStatus
GetStatus : +props List~Object?~
GetStatus : +stringify bool?
GetStatus : +call() dynamic
Equatable <|.. GetStatus
UseCase <|.. GetStatus
class GetCheckData
GetCheckData : +call() dynamic
UseCase <|.. GetCheckData
class CheckScan
CheckScan : +build() Widget
StatelessWidget <|-- CheckScan
class MyApp
MyApp : +build() Widget
StatelessWidget <|-- MyApp
class MyHomePage
MyHomePage : +title String
MyHomePage : +createState() State<MyHomePage>
StatefulWidget <|-- MyHomePage
class _MyHomePageState
_MyHomePageState : +build() Widget
State <|-- _MyHomePageState
```
Binary file removed terminal/lib/features/transaction/image.png
Binary file not shown.
19 changes: 0 additions & 19 deletions terminal/lib/features/transaction/transaction.md

This file was deleted.

8 changes: 0 additions & 8 deletions terminal/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
either_dart:
dependency: "direct main"
description:
name: either_dart
sha256: "0b57f6a9410ce0ba2cc340220109f545bf4bad1b06b242219f0af11ab9e84f0e"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
equatable:
dependency: "direct main"
description:
Expand Down
7 changes: 2 additions & 5 deletions terminal/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: terminal
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
Expand All @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: '>=3.0.6 <4.0.0'
sdk: ">=3.0.6 <4.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand All @@ -31,13 +31,11 @@ dependencies:
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
equatable: ^2.0.5
get_it: ^7.6.4
either_dart: ^1.0.0
flutter_zxing: ^1.5.0

dev_dependencies:
Expand All @@ -56,7 +54,6 @@ dev_dependencies:

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down

0 comments on commit 12c93a3

Please sign in to comment.