mtiziano / drop_cap_text Goto Github PK
View Code? Open in Web Editor NEWThis Flutter plugin aims to achive drop cap in text capitalization.
License: MIT License
This Flutter plugin aims to achive drop cap in text capitalization.
License: MIT License
Is there a date for a NullSafety release planed?
How do I make the DropCap on the right? thanks..
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.
But it is working fine only on Firefox browser on Ubuntu.
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
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
There is no attribute for defining max number of lines and overflows tyle for text
Hi, could you make dropcap text selectable in the next update.
Thanks in advance.
It's been a while now, when is our lovely package update coming?
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(),
)
),
);
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.
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.
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), ), ), ) ], ), ); } }
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.:
Any suggestions on how I might accomplish this?
Allow to specify font for the drop cap separate from the main text
Stylistic and calligraphic fonts are often used for the dropcap but not for the main text.
First line is duplicated ( means repeating ) if there are multiple lines of text with image.
I checked this in version 1.0.1 it's working fine. From 1.0.2 this issue is happening.
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:
As you see there is an extra line at the bottom of DropCapText. Can anyone say how to remove it?
A real lifesaver, thanks!!!
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:
Hi, hope you are doing well, when are you releasing dropcaptext update.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.