GithubHelp home page GithubHelp logo

mtiziano / drop_cap_text Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 20.0 52 KB

This Flutter plugin aims to achive drop cap in text capitalization.

License: MIT License

Java 3.27% Objective-C 3.01% Dart 93.72%

drop_cap_text's People

Contributors

mileusna avatar mtiziano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drop_cap_text's Issues

How to remove extra padding from bottom of cap text?

We would like this to wrap more tightly around the drop cap, so line 3 should wrap here.
image

Is there a setting for this that I'm missing? It seems like there is some built in bottom padding, no matter what I set my lineheight or cap padding to.

No Text on the bottom of image

Hi all,

Hope you are doing well and safe. I used your flutter package drop_cap_text for Flutter Web, iOS and Android. However I don’t know why the text no completed shown only on Web page on iPhone Safari and Chrome.

image

But it is working fine only on Firefox browser on Ubuntu.

image

What’s wrong on my code? Please see my code for this page.

DropCapText( menuController.preachersMessagetext.value, dropCapPosition: DropCapPosition.end, textAlign: TextAlign.justify, style: TextStyle( fontFamily: 'NotoSans', fontSize: 22, // default is 16, color: dark, // default is Colors.black, fontWeight: FontWeight.bold), dropCap: DropCap( width: MediaQuery.of(context).size.width / 4, height: MediaQuery.of(context).size.width / 3, child: ClipOval( child: Image.asset( preachersPhoto, fit: BoxFit.cover, width: MediaQuery.of(context).size.width / 6, height: MediaQuery.of(context).size.width / 6, ), ), ), )

Thanks

Patrick Lee

error in textTheme.bodyText1?.color

I get an error on the line below:
color: Theme.of(context).textTheme.bodyText1?.color ?? Colors.black,

I copied the class into my folder and corrected

Selectable

Hi, could you make dropcap text selectable in the next update.
Thanks in advance.

DropCapText does not change color when using dark theme

All text in the drop cap widget does not change in color when dark theme is used instead it decrease the light brightness and cover it with some dark shade. The text remains black with white background. Could you add a property to DropCapText widget to make it selectable. Thanks.
Below is an image.
Screenshot_20200408_230527

Issue with simple dialog

Hello, i really like your package but i am getting an error. It is inside a simple dialog, it used to be working and then something changed and it no longer is.

LayoutBuilder does not support returning intrinsic dimensions.

                         return DropCapText(
				widget.notification.subtitle,
				dropCapPadding: EdgeInsets.fromLTRB(0, 10, 10, 10),
				textAlign: TextAlign.justify,
				style: TextStyle(
					// fontSize: 22,
					// fontWeight: FontWeight.w700
					// color: Colors.green,
				),
				dropCap: DropCap(
					width: 75,
					height: 75,
					child: CachedNetworkImage(
						imageUrl: _imageUrl(),
					)
				),
			);

Allow us to pass RichText instead of a String

Hey there!
This package of yours is the closest thing I've found to putting an image inline with the text, however, it would be awesome if we could use RichText instead of a simple string.

I believe it is possible to do so as the TextSpan you're using inside the code accepts TextSpans as its children, but I'm not sure.

text align issue with very short text

using Custom DropCap Widget: Image right + justification sample code

DropCapText(
    loremIpsumText,
    dropCapPosition: DropCapPosition.end,
    textAlign: TextAlign.justify,
    dropCap: DropCap(
    width: 100,
    height: 100,
    child: Image.network(
    	'https://www.codemate.com/wp-content/uploads/2017/09/flutter-logo.png')
    ),
),

If loremIpsumText too short ,less than one line width,text align will failure.

top letter is chooped when droptext is used inside slivers

Not sure the reason why, every where else on my app the droptext widget renders fine, but its chopped inside slivers. here is sample code;

class Playground extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: CustomScrollView( slivers: <Widget>[ SliverToBoxAdapter( child: Padding( padding: const EdgeInsets.all(50.0), child: DropCapText( 'Random', style: TextStyle(fontSize: 24), dropCapStyle: TextStyle(fontSize: 60), dropCapPadding: EdgeInsets.only(top: 5.0, right: 5.0), ), ), ) ], ), ); } }

Different textstyles next to an image

First of, thanks for the great plugin!

The plugin almost accomplishes what I try to do. Except for one thing. I'd like to have an inline image, with text next to it. But this text consists out of a header and out of a body. And the header should have a different font-size. E.g.:

image

Any suggestions on how I might accomplish this?

DropCapText adds extra line at the bottom

This is my code:

     DropCapText(
      "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam id rhoncus urna." ?? "",
      style: TextStyle(fontSize: 16, color: Colors.black87, height: 1.1),
      dropCapPadding: EdgeInsets.only(right: Constants.PADDING),
      maxLines: 30,
      forceNoDescent: true,
      dropCap: DropCap(
          width: 36,
          height: 36,
          child: Icon(
            Icons.handshake_outlined, size: 36,
            color: Colors.black87,
          ),
      )
    ),
    Container(
      color: Colors.orange,
      height: 12,
      child: Row(),
    ),

And this is the result:

Screenshot from 2022-12-15 12-11-37

As you see there is an extra line at the bottom of DropCapText. Can anyone say how to remove it?

Line is repeated when wrapping a widget

error

My code:

  body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20),
        child: DropCapText(
          kSummary,
          dropCapPosition: DropCapPosition.end,
          dropCap: DropCap(
            child: Padding(
              padding: const EdgeInsets.fromLTRB(8, 0, 0, 8),
              child: Image.asset('assets/images/221469_489668.jpg', alignment: Alignment.topRight),
            ), 
            width: 210, 
            height: 220,
          ),
          style: GoogleFonts.specialElite(
            height: 1.5,
            wordSpacing: 2.5,
          ),
        ),
      ),

More info:

  • drop_cap_text v1.1.3
  • Flutter 2.2.3
  • Dart 2.13.4
  • Emulator: Android Pixel 4

DropCapText

Hi, hope you are doing well, when are you releasing dropcaptext update.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.