Skip to content

Commit

Permalink
🚨 Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Jul 19, 2023
1 parent 1857af7 commit d48cae9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
9 changes: 9 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include: package:/flutter_lints/flutter.yaml

analyzer:
exclude:
- lib/l10n/gen/*.dart

linter:
rules:
use_build_context_synchronously: false
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
4 changes: 2 additions & 2 deletions example/lib/customs/pickers/directory_file_asset_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class FileAssetPickerBuilder
final double topPadding =
MediaQuery.of(context).padding.top + kToolbarHeight;

Widget _sliverGrid(BuildContext ctx, List<File> assets) {
Widget sliverGrid(BuildContext ctx, List<File> assets) {
return SliverGrid(
delegate: SliverChildBuilderDelegate(
(_, int index) => Builder(
Expand Down Expand Up @@ -686,7 +686,7 @@ class FileAssetPickerBuilder
MediaQuery.of(context).padding.top + kToolbarHeight,
),
),
_sliverGrid(_, assets),
sliverGrid(_, assets),
// Ignore the gap when the [anchor] is not equal to 1.
if (isAppleOS && anchor == 1)
SliverToBoxAdapter(
Expand Down
4 changes: 2 additions & 2 deletions example/lib/customs/pickers/insta_asset_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class _InstaAssetPickerState extends State<InstaAssetPicker> {
Widget _selectedAssetWidget(int index) {
final AssetEntity asset = entities.elementAt(index);

Future<void> _onTap() async {
Future<void> onTap() async {
final List<AssetEntity>? result = await AssetPickerViewer.pushToViewer(
context,
currentIndex: index,
Expand All @@ -192,7 +192,7 @@ class _InstaAssetPickerState extends State<InstaAssetPicker> {
}

return GestureDetector(
onTap: isDisplayingDetail ? _onTap : null,
onTap: isDisplayingDetail ? onTap : null,
child: RepaintBoundary(
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/customs/pickers/multi_tabs_assets_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class _MultiTabAssetPickerState extends State<MultiTabAssetPicker> {
Widget _selectedAssetWidget(int index) {
final AssetEntity asset = entities.elementAt(index);

Future<void> _onTap() async {
Future<void> onTap() async {
final List<AssetEntity>? result = await AssetPickerViewer.pushToViewer(
context,
currentIndex: index,
Expand All @@ -178,7 +178,7 @@ class _MultiTabAssetPickerState extends State<MultiTabAssetPicker> {
}

return GestureDetector(
onTap: isDisplayingDetail ? _onTap : null,
onTap: isDisplayingDetail ? onTap : null,
child: RepaintBoundary(
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
Expand Down
4 changes: 4 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ dependencies:
path: ../
wechat_camera_picker: ^3.6.0

extended_image: ^8.0.0
package_info_plus: ^4.0.0
path: ^1.8.0
path_provider: ^2.0.15
provider: ^6.0.2

dev_dependencies:
flutter_lints: any

flutter:
uses-material-design: true
assets:
Expand Down

0 comments on commit d48cae9

Please sign in to comment.