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

chore: bump dependencies #72

Merged
merged 14 commits into from
Aug 23, 2024
25 changes: 25 additions & 0 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: example

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
semantic_pull_request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
working_directory: example
runs_on: macos-latest
min_coverage: 0
13 changes: 11 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ jobs:
modified_files_only: false

build:
strategy:
matrix:
flutter-version:
# The version of Flutter to use should use the minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- "3.24.0"
- "3.x"
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 3.13.3
flutter_version: ${{ matrix.flutter-version }}
package_get_excludes: example
runs_on: macos-latest

pana_score:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
include: package:very_good_analysis/analysis_options.6.0.0.yaml
2 changes: 1 addition & 1 deletion example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.3.1.0.yaml
include: package:very_good_analysis/analysis_options.6.0.0.yaml
linter:
rules:
public_member_api_docs: false
12 changes: 7 additions & 5 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ publish_to: none
version: 1.0.0+1

environment:
sdk: ">=2.17.0 <3.0.0"
sdk: ^3.5.0

dependencies:
bloc: ^8.0.3
equatable: ^2.0.3
bloc: ^8.1.4
equatable: ^2.0.5
flutter:
sdk: flutter
flutter_bloc: ^8.0.1
flutter_bloc: ^8.1.6
very_good_infinite_list:
path: ../

dev_dependencies:
very_good_analysis: ^3.1.0
flutter_test:
sdk: flutter
very_good_analysis: ^6.0.0

flutter:
uses-material-design: true
8 changes: 8 additions & 0 deletions example/test/main_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:example/main.dart' as example;
import 'package:flutter_test/flutter_test.dart';

void main() {
test('main returns as expected', () {
expect(example.main, returnsNormally);
});
}
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: very_good_infinite_list
description: >-
A library for easily displaying paginated data, created by Very Good Ventures.
Great for activity feeds, news feeds, and more.
version: 0.7.1
version: 0.7.1
repository: https://github.com/VeryGoodOpenSource/very_good_infinite_list
issue_tracker: https://github.com/VeryGoodOpenSource/very_good_infinite_list/issues
homepage: https://github.com/VeryGoodOpenSource/very_good_infinite_list
documentation: https://github.com/VeryGoodOpenSource/very_good_infinite_list
topics: [flutter, list-view, scroll, widgets]

environment:
sdk: ">=2.18.0 <4.0.0"
flutter: ">=3.0.0"
sdk: ^3.5.0
flutter: ^3.24.0

dependencies:
flutter:
Expand All @@ -20,4 +20,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0
Binary file modified test/goldens/successful_horizontal_scroll/after_scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/successful_horizontal_scroll/before_scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/successful_vertical_scroll/after_scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/successful_vertical_scroll/before_scroll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions test/infinite_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extension on WidgetTester {
await pumpWidget(
MaterialApp(
home: Scaffold(
appBar: AppBar(),
backgroundColor: Colors.transparent,
body: widget,
),
),
Expand Down Expand Up @@ -141,16 +141,21 @@ void main() {
(tester) async {
const itemCount = 50;
var itemBuilderCalls = 0;
const itemSize = Size.square(10);

await tester.pumpApp(
InfiniteList(
itemCount: itemCount,
hasReachedMax: true,
onFetchData: emptyCallback,
itemBuilder: (_, i) {
itemBuilderCalls++;
return Text('$i');
},
SizedBox(
width: itemSize.width * itemCount,
height: itemSize.height * itemCount,
child: InfiniteList(
itemCount: itemCount,
hasReachedMax: true,
onFetchData: emptyCallback,
itemBuilder: (_, i) {
itemBuilderCalls++;
return SizedBox.fromSize(size: itemSize);
},
),
),
);

Expand Down
11 changes: 6 additions & 5 deletions test/sliver_infinite_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ extension on WidgetTester {
Future<void> pumpSlivers(
List<Widget> slivers, {
double? cacheExtent,
double height = 500,
}) async {
await pumpWidget(
MaterialApp(
home: Scaffold(
body: SizedBox(
height: 500,
height: height,
child: CustomScrollView(
cacheExtent: cacheExtent,
slivers: slivers,
Expand All @@ -30,9 +31,11 @@ void main() {
testWidgets('on mount', (tester) async {
var itemCount = 0;
var onFetchDataCalls = 0;
const itemSize = Size.square(10);

await tester.pumpSlivers(
cacheExtent: 0,
height: itemSize.height * 3,
[
StatefulBuilder(
builder: (context, setState) {
Expand All @@ -41,13 +44,11 @@ void main() {
debounceDuration: Duration.zero,
onFetchData: () {
setState(() {
itemCount += 8;
itemCount += 1;
onFetchDataCalls++;
});
},
itemBuilder: (_, i) => SizedBox(
child: Text('$i'),
),
itemBuilder: (_, i) => SizedBox.fromSize(size: itemSize),
);
},
),
Expand Down