Skip to content

Commit

Permalink
Merge pull request #3825 from rrousselGit/sync-dev
Browse files Browse the repository at this point in the history
Sync dev with master
  • Loading branch information
rrousselGit authored Nov 3, 2024
2 parents ff77de7 + b2432b0 commit d499f35
Show file tree
Hide file tree
Showing 468 changed files with 4,683 additions and 5,284 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.*.dart linguist-generated=true
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
strategy:
matrix:
channel:
# Waiting for WidgetStateProperty to be stable
# - stable
- stable
- master
package_path:
- examples/counter
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/riverpod_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
channel:
- master
- stable
package_path:
- packages/riverpod_analyzer_utils
- packages/riverpod_analyzer_utils_tests
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You do not need to spend a lot of time making that issue. The important is:
Making an issue is important to discuss what needs to be done.
You wouldn't want to spend tens of hours working on something, only to
have your PR rejected because we disagree on the direction taken.
An discussion may slow down the work initially, but it can save you from a lot
A discussion may slow down the work initially, but it can save you from a lot
of frustration.

## Documentation work
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Long story short:

```dart
@riverpod
Future<String> boredSuggestion(BoredSuggestionRef ref) async {
Future<String> boredSuggestion(Ref ref) async {
final response = await http.get(
Uri.https('boredapi.com', '/api/activity'),
);
Expand Down
4 changes: 2 additions & 2 deletions examples/counter/lib/main.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/counter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:

dev_dependencies:
build_runner: ^2.3.3
custom_lint: ^0.6.5
custom_lint: ^0.7.0
flutter_test:
sdk: flutter
freezed: ^2.3.2
Expand Down
2 changes: 1 addition & 1 deletion examples/marvel/lib/src/marvel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MarvelRepository {
}) : _getCurrentTimestamp = getCurrentTimestamp ??
(() => DateTime.now().millisecondsSinceEpoch);

final Ref<MarvelRepository> ref;
final Ref ref;
final int Function() _getCurrentTimestamp;
final _characterCache = <String, Character>{};

Expand Down
9 changes: 4 additions & 5 deletions examples/marvel/lib/src/widgets/search_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';

import '../screens/home.dart';

const _height = 300.0;

class _SearchTheme {
const _SearchTheme({
required this.width,
// ignore: unused_element, blocked by https://github.com/dart-lang/linter/issues/3232
this.height = 300,
required this.searchDecoration,
required this.iconPadding,
required this.searchMargin,
});

final double width;
final double height;
final BoxDecoration searchDecoration;
final EdgeInsets iconPadding;
final EdgeInsets searchMargin;
Expand Down Expand Up @@ -187,7 +186,7 @@ class _SearchHintContainer extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
constraints: BoxConstraints(
maxHeight: theme.height,
maxHeight: _height,
),
margin: theme.searchMargin,
child: Material(
Expand All @@ -196,7 +195,7 @@ class _SearchHintContainer extends StatelessWidget {
clipBehavior: Clip.hardEdge,
child: OverflowBox(
alignment: Alignment.topLeft,
maxHeight: theme.height,
maxHeight: _height,
maxWidth: 300,
child: child,
),
Expand Down
2 changes: 1 addition & 1 deletion examples/marvel/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:

dev_dependencies:
build_runner: ^2.0.0
custom_lint: ^0.6.5
custom_lint: ^0.7.0
flutter_test:
sdk: flutter
freezed: ^2.1.0
Expand Down
8 changes: 4 additions & 4 deletions examples/pub/lib/detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'search.dart';

part 'detail.g.dart';

extension CancelTokenX on Ref<Object?> {
extension CancelTokenX on Ref {
CancelToken cancelToken() {
final cancelToken = CancelToken();
onDispose(cancelToken.cancel);
Expand All @@ -23,7 +23,7 @@ extension CancelTokenX on Ref<Object?> {

@riverpod
Future<Package> fetchPackageDetails(
FetchPackageDetailsRef ref, {
Ref ref, {
required String packageName,
}) async {
final cancelToken = ref.cancelToken();
Expand All @@ -34,7 +34,7 @@ Future<Package> fetchPackageDetails(
}

@riverpod
Future<List<String>> likedPackages(LikedPackagesRef ref) async {
Future<List<String>> likedPackages(Ref ref) async {
final cancelToken = ref.cancelToken();

return ref
Expand All @@ -43,7 +43,7 @@ Future<List<String>> likedPackages(LikedPackagesRef ref) async {
}

@riverpod
PubRepository pubRepository(PubRepositoryRef ref) => PubRepository();
PubRepository pubRepository(Ref ref) => PubRepository();

/// A provider that fetches the likes count, popularity score and pub points
/// for a given package.
Expand Down
56 changes: 22 additions & 34 deletions examples/pub/lib/detail.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/pub/lib/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const searchPageSize = 10;

@riverpod
Future<List<Package>> fetchPackages(
FetchPackagesRef ref, {
Ref ref, {
required int page,
String search = '',
}) async {
Expand Down
Loading

0 comments on commit d499f35

Please sign in to comment.