-
Notifications
You must be signed in to change notification settings - Fork 157
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
TextDecoration.lineThrough bug #17
Comments
Can you share a reproducible example? I tried with the following demo code, and it seems to work as expected for me. import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData.light(),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'Flutter Demo Home Page',
style: GoogleFonts.biryani(fontWeight: FontWeight.w900, fontStyle: FontStyle.italic),
),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
style: GoogleFonts.tomorrow().copyWith(decoration: TextDecoration.lineThrough),
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
),
);
}
}
|
Ah ok, I was able to reproduce the bug as you defined it above. It's oddly specific. It only occurs for this font (as far as I've found), and it only occurs on android devices. And when you download the exact same |
Any update? |
This seems to be a bug in the I've filed flutter/flutter#49239 to the flutter/flutter repo, hopefully this will get resolved there. |
TextDecoration.lineThrough
showing the line at the bottom of the text. It used to be (using assets font) at the center. I switched back to the assets font and it's working perfectly.The text was updated successfully, but these errors were encountered: