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: Add support for the Divider widget #20

Merged

Conversation

bhattkrutij
Copy link
Contributor

@bhattkrutij bhattkrutij commented Jan 2, 2025

Description

This PR introduces support for the Divider widget. It adds a new feature that allows the use of customizable dividers in the UI, including options for thickness, height, and color.This feature is useful for creating styled dividers in a server-driven UI, allowing dynamic customization based on JSON input.

Key changes:

  • Added a Divider widget with customizable properties (thickness, height, color).

Related Issues

Closes #15

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

@divyanshub024
Copy link
Member

Hey @bhattkrutij!!

Analyze and format checks are failing. Can you please check.

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.

Thank you for this PR 🚀
Please check my suggested changes.

pubspec.yaml Outdated
Comment on lines 8 to 10
build_runner: ^2.4.14
dependencies:
mirai: ^0.7.2
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to add these dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@divyanshub024 without it given error. to code.removed.

Comment on lines +3 to +4
part 'mirai_divider.freezed.dart'; // Auto-generated Freezed file
part 'mirai_divider.g.dart'; // Auto-generated JSON serialization file
Copy link
Member

Choose a reason for hiding this comment

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

These 2 generated files are missing. We need to include them as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@divyanshub024 added this.

@@ -77,3 +77,4 @@ export 'package:mirai/src/parsers/mirai_text_form_field/mirai_text_form_field.da
export 'package:mirai/src/parsers/mirai_text_style/mirai_text_style.dart';
export 'package:mirai/src/parsers/mirai_theme/mirai_theme.dart';
export 'package:mirai/src/parsers/mirai_wrap/mirai_wrap.dart';
export 'package:mirai/src/parsers/mirai_divider/mirai_divider.dart';
Copy link
Member

Choose a reason for hiding this comment

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

Please sort the imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@divyanshub024 .Thanks for the guidance. i have pushed code with changes.
Thank you.

Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mirai ❌ Failed (Inspect) Jan 3, 2025 2:53pm

@bhattkrutij
Copy link
Contributor Author

@bhattkrutij Some checks are failing. https://github.com/BuildMirai/mirai/actions/runs/12599505507/job/35117092695?pr=20 https://github.com/BuildMirai/mirai/actions/runs/12599505507/job/35117091802?pr=20 Can you please check?

I had run below commands
dart analyze
dart fix --apply
then i get Analyzing mirai... 0.8s
No issues found!
while running melos run analyze i got this message zsh: command not found: melos
could you please help with this?.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for buildmirai failed.

Name Link
🔨 Latest commit 2479fb6
🔍 Latest deploy log https://app.netlify.com/sites/buildmirai/deploys/67780c6171580200080f7959

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.

Great work @bhattkrutij 💯 🎉

@divyanshub024 divyanshub024 merged commit 76bf324 into BuildMirai:dev Jan 3, 2025
3 of 7 checks passed
@bhattkrutij
Copy link
Contributor Author

thank you @divyanshub024 for giving me chance to work on this.looking forward to contribute more.

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 the Divider widget.
2 participants