Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md example with the new ClassNames and import #99

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ Checkout a small example [here](./example/) and a full application built [here](

```dart
import 'package:flutter_clean_architecture/flutter_clean_architecture.dart';
class CounterPage extends View {
class CounterPage extends CleanView {
@override
// Dependencies can be injected here
State<StatefulWidget> createState() => CounterState();
}

class CounterState extends ViewState<CounterPage, CounterController> {
class CounterState extends CleanViewState<CounterPage, CounterController> {
CounterState() : super(CounterController());

@override
Expand Down Expand Up @@ -251,7 +251,7 @@ For example:

```dart
import 'package:flutter_clean_architecture/flutter_clean_architecture.dart';
class CounterPage extends View {
class CounterPage extends CleanView {
@override
// Dependencies can be injected here
State<StatefulWidget> createState() => CounterState();
Expand Down Expand Up @@ -405,9 +405,10 @@ class CounterController extends Controller {

#### Presenter
```dart
import 'package:flutter_clean_architecture/flutter_clean_architecture.dart';
import 'package:flutter_clean_architecture/flutter_clean_architecture.dart'
as clean;

class LoginPresenter() {
class LoginPresenter extends clean.Presenter {

Function loginOnComplete; // alternatively `void loginOnComplete();`
Function loginOnError;
Expand All @@ -430,7 +431,7 @@ class LoginPresenter() {
}

/// The [Observer] used to observe the `Stream` of the [LoginUseCase]
class _LoginUseCaseObserver implements Observer<void> {
class _LoginUseCaseObserver extends clean.Observer<void>{

// The above presenter
// This is not optimal, but it is a workaround due to dart limitations. Dart does
Expand Down
Loading