-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f11aca
commit e45da76
Showing
5 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
bricks/destination/__brick__/{{name.snakeCase()}}/{{name.snakeCase()}}_screen_intent.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import 'package:flutter_template/presentation/entity/intent/intent.dart'; | ||
|
||
sealed class {{name.pascalCase()}}ScreenIntent implements BaseIntent { | ||
sealed class {{name.pascalCase()}}ScreenIntent extends BaseIntent { | ||
const {{name.pascalCase()}}ScreenIntent(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_template/presentation/entity/intent/intent.dart'; | ||
|
||
sealed class ThemeIntent implements BaseIntent { | ||
sealed class ThemeIntent extends BaseIntent { | ||
const ThemeIntent(); | ||
} | ||
|
||
class SetThemeModeThemeIntent extends ThemeIntent { | ||
final ThemeMode mode; | ||
|
||
const SetThemeModeThemeIntent({required this.mode}); | ||
|
||
@override | ||
List<Object?> get props => [mode]; | ||
} | ||
|
||
class SetIsDynamicThemeIntent extends ThemeIntent { | ||
final bool isDynamic; | ||
|
||
const SetIsDynamicThemeIntent({required this.isDynamic}); | ||
|
||
@override | ||
List<Object?> get props => [isDynamic]; | ||
} |
5 changes: 4 additions & 1 deletion
5
lib/presentation/destinations/weather/home/home_screen_intent.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import 'package:flutter_template/presentation/entity/intent/intent.dart'; | ||
|
||
sealed class HomeScreenIntent implements BaseIntent { | ||
sealed class HomeScreenIntent extends BaseIntent { | ||
const HomeScreenIntent(); | ||
} | ||
|
||
class SearchHomeScreenIntent extends HomeScreenIntent { | ||
const SearchHomeScreenIntent(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} |
11 changes: 10 additions & 1 deletion
11
lib/presentation/destinations/weather/search/search_screen_intent.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
import 'package:flutter_template/presentation/entity/intent/intent.dart'; | ||
import 'package:flutter_template/presentation/entity/weather/ui_city.dart'; | ||
|
||
sealed class SearchScreenIntent implements BaseIntent { | ||
sealed class SearchScreenIntent extends BaseIntent { | ||
const SearchScreenIntent(); | ||
} | ||
|
||
class BackSearchScreenIntent extends SearchScreenIntent { | ||
const BackSearchScreenIntent(); | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class SearchSearchScreenIntent extends SearchScreenIntent { | ||
final String searchTerm; | ||
|
||
const SearchSearchScreenIntent({required this.searchTerm}); | ||
|
||
@override | ||
List<Object?> get props => [searchTerm]; | ||
} | ||
|
||
class ToggleFavoriteSearchScreenIntent extends SearchScreenIntent { | ||
final UICity city; | ||
|
||
const ToggleFavoriteSearchScreenIntent({required this.city}); | ||
|
||
@override | ||
List<Object?> get props => [city]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
interface class BaseIntent {} | ||
import 'package:equatable/equatable.dart'; | ||
|
||
abstract class BaseIntent extends Equatable { | ||
const BaseIntent(); | ||
} |