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

EmbeddedTweetView text size is too big #50

Closed
elcolie opened this issue Aug 29, 2020 · 4 comments
Closed

EmbeddedTweetView text size is too big #50

elcolie opened this issue Aug 29, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@elcolie
Copy link

elcolie commented Aug 29, 2020

Describe the bug
EmbeddedTweetView does not wrap text properly

To Reproduce

import 'package:flutter/material.dart';
import 'package:tweet_ui/models/api/tweet.dart';
import 'package:tweet_ui/models/api/user.dart';
import 'package:tweet_ui/tweet_ui.dart';

class TweetWidget extends StatefulWidget {
  @override
  _TweetWidgetState createState() => _TweetWidgetState();
}

class _TweetWidgetState extends State<TweetWidget> {
  @override
  Widget build(BuildContext context) {
    final user = User(
        id: 121,
        name: "Marshal Sarit",
        screenName: "King Prayed",
        verified: true,
        profileImageUrlHttps:
            "https://d1ab2zufs7bob.cloudfront.net/media/avatars/avatar_GlDoZ0w.jpg");
    final tweet = Tweet(
      createdAt: "Wed Oct 10 20:19:24 +0000 2018",
      id: 1050118621198921728,
      idStr: "1050118621198921728",
      text:
          "To make room for more expression, we will now count all emojis as equal—including those with gender‍‍‍ ‍‍and skin t… https://t.co/MkGjXf9aXm",
      favoriteCount: 22,
      user: user,
    );
    return Column(children: [
      TweetView.fromTweet(tweet),
      CompactTweetView.fromTweet(tweet),
      EmbeddedTweetView.fromTweet(tweet),
    ]);
  }
}

Expected behavior
Time of 3rd TweetView must be wrapped in the single screen NOT too big like this

Screenshots
Screenshot_1598721370

Smartphone (please complete the following information):

  • Device: Emulator Nexus 6 API 3 0,
  • OS: Android 10.0+
  • Version tweet_ui: ^2.2.0+3

Additional context
OSX: 10.15.6

@elcolie elcolie added the bug Something isn't working label Aug 29, 2020
@elcolie
Copy link
Author

elcolie commented Aug 29, 2020

With given example in the repository I don't see any error like this

@kawa89 kawa89 self-assigned this Sep 1, 2020
@kawa89
Copy link
Collaborator

kawa89 commented Sep 1, 2020

I'm on sick leave now, but will check it ASAP :)

@kawa89
Copy link
Collaborator

kawa89 commented Sep 18, 2020

Will have a look at this on September 25th.

kawa89 pushed a commit that referenced this issue Oct 9, 2020
@kawa89
Copy link
Collaborator

kawa89 commented Oct 9, 2020

You miss a Scaffold widget in your widget tree.
Change the

return Column(children: [
      TweetView.fromTweet(tweet),
      CompactTweetView.fromTweet(tweet),
      EmbeddedTweetView.fromTweet(tweet),
    ]);

to

    return Scaffold(
      body: Column(
        children: [
          TweetView.fromTweet(tweet),
          CompactTweetView.fromTweet(tweet),
          EmbeddedTweetView.fromTweet(tweet),
        ],
      ),

I will commit this example to the repo. Look for an EmbeddedTweetView text size is too big\nGithub #50 button in the bug page screen in the example app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants