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

Credit Card UI changes #122

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Credit Card UI changes #122

merged 1 commit into from
Jan 16, 2023

Conversation

faiyaz-shaikh
Copy link
Contributor

Credit Card Example UI changes

@faiyaz-shaikh faiyaz-shaikh force-pushed the feature/example_ui_update branch from c317882 to 1229dc3 Compare December 19, 2022 13:41
const SizedBox(
height: 10,
),
const SizedBox(height: 10),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 16),

Choose a reason for hiding this comment

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

Give horizontal padding here and remove padding from line number 326, I guess it will reflect same as expected.

Copy link

Choose a reason for hiding this comment

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

Please make changes

@@ -280,13 +280,16 @@ class _CreditCardWidgetState extends State<CreditCardWidget>
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (widget.bankName != null && widget.bankName!.isNotEmpty)

Choose a reason for hiding this comment

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

Suggestion : We can make extension for checking null and not empty at same time . Like this,

extension NullableStringExtension on String? {

bool get isNullOrEmpty => this == null || (this?.isEmpty ?? false);

bool get isNotNullAndNotEmpty => this != null && (this?.isNotEmpty ?? false);
}

Copy link

Choose a reason for hiding this comment

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

Please make changes

@faiyaz-shaikh faiyaz-shaikh force-pushed the feature/example_ui_update branch 4 times, most recently from 14e1f83 to f728dc4 Compare January 13, 2023 13:02
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: defaultTextStyle,
if (widget.bankName?.isNotEmpty == true)

Choose a reason for hiding this comment

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

You can pass directly condition without comparing it. And nullable variable troubling then add default value false

child: Padding(
padding: const EdgeInsets.only(right: 16, top: 16),
child: Text(
widget.bankName!,

Choose a reason for hiding this comment

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

Null check

@faiyaz-shaikh faiyaz-shaikh force-pushed the feature/example_ui_update branch from f728dc4 to b49442a Compare January 16, 2023 05:36
@ShwetaChauhan18 ShwetaChauhan18 merged commit eb09954 into master Jan 16, 2023
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.

4 participants