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

Add ErrorBuilder #17

Merged
merged 2 commits into from
May 22, 2023
Merged

Add ErrorBuilder #17

merged 2 commits into from
May 22, 2023

Conversation

lionnner
Copy link
Contributor

No description provided.

Comment on lines 39 to 42
if (_jsonViewTheme.errorBuilder != null) {
return _jsonViewTheme.errorBuilder!(context, jsonObj);
}
return const Text('error');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do it more simply using a ternary expression

return _jsonViewTheme.errorBuilder?.call(context, jsonObj) ?? const Text('error');

Comment on lines 2 to 3
import 'package:flutter_json_view/src/theme/json_view_theme.dart';
import 'package:flutter_json_view/src/widgets/widgets.dart';
import '../../theme/json_view_theme.dart';
import '../../widgets/widgets.dart';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move back full path imports

@Frezyx
Copy link
Owner

Frezyx commented May 22, 2023

Hello @lionnner !
Thank you for this contribution. I make small review.
Please make changes and we will merge it

@lionnner lionnner requested a review from Frezyx May 22, 2023 06:10
@Frezyx
Copy link
Owner

Frezyx commented May 22, 2023

@lionnner Thanks a lot ❤️ !

@Frezyx Frezyx merged commit 9807aac into Frezyx:main May 22, 2023
@Frezyx Frezyx linked an issue Jun 4, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ErrorWidget
2 participants