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

feat: Added support for snackbar #103

Merged
merged 4 commits into from
Jan 16, 2025
Merged

Conversation

ishanvaghani
Copy link
Contributor

Description

Added support for snackbar
Added documentation
Created category file for Mirai Actions

Related Issues

Closes #102

Screenshots

XRecorder_20250113_01.mp4

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

# Conflicts:
#	examples/mirai_gallery/assets/json/home_screen.json

scaffoldMessenger.showSnackBar(
SnackBar(
content: Mirai.fromJson(model.content, context) ?? SizedBox(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change the SizedBox to SizedBox.shrink()

Copy link
Member

Choose a reason for hiding this comment

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

I feel this one was not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should i revert it back?

Copy link
Member

Choose a reason for hiding this comment

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

Nope, it's fine. Just give me some time to review your PR. Sorry, I got super busy.

@@ -0,0 +1,55 @@
# SnackBar

Mirai snakBar allows you to show the Flutter SnackBar using JSON.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix this typo?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch, @vinothvino42 !!

@ishanvaghani
Copy link
Contributor Author

Resolved PR comments

Copy link
Member

@divyanshub024 divyanshub024 left a comment

Choose a reason for hiding this comment

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

Thanks for such a great PR @ishanvaghani !! Everything looks great, just a few typos.

part 'mirai_beveled_rectangle_border.g.dart';

@freezed
class MiralBeveledRectangleBorder with _$MiralBeveledRectangleBorder {
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

part 'mirai_circle_border.g.dart';

@freezed
class MiralCircleBorder with _$MiralCircleBorder {
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

part 'mirai_continous_rectangle_border.g.dart';

@freezed
class MiralContinousRectangleBorder with _$MiralContinousRectangleBorder {
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

part 'mirai_rounded_rectangle_border.g.dart';

@freezed
class MiralRoundedRactangleBorder with _$MiralRoundedRactangleBorder {
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

}

@freezed
class MiralShapeBorder with _$MiralShapeBorder {
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

| margin | `MiraiEdgeInsets` | Empty space to surround the snack bar. |
| padding | `MiraiEdgeInsets` | The amount of padding to apply to the snack bar's content and optional action. |
| width | `double` | The width of the snack bar. |
| shape | `MiralShapeBorder` | The shape of the snack bar. |
Copy link
Member

Choose a reason for hiding this comment

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

Typo here. It should be Mirai, not Miral.

@ishanvaghani
Copy link
Contributor Author

Done with changes

Copy link
Member

@divyanshub024 divyanshub024 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @ishanvaghani 🎉

@divyanshub024 divyanshub024 merged commit 5b6a275 into BuildMirai:dev Jan 16, 2025
3 checks passed
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.

feat: Add support for showing snackbar
3 participants