Created
May 26, 2020 07:32
-
-
Save hydroweaver/9a95047c222b3f8952aea9e333f03a98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _strikeThrough extends StatelessWidget{ | |
bool todoToggle; | |
String todoText; | |
_strikeThrough({this.todoToggle, this.todoText}) : super(); | |
Widget _strikewidget(){ | |
if(todoToggle==false){ | |
return Text( | |
todoText, | |
style: TextStyle( | |
fontSize: 22.0 | |
), | |
); | |
} | |
else{ | |
return Text( | |
todoText, | |
style: TextStyle( | |
fontSize: 22.0, | |
decoration: TextDecoration.lineThrough, | |
color: Colors.redAccent, | |
fontStyle: FontStyle.italic | |
), | |
); | |
} | |
} | |
@override | |
Widget build(BuildContext context) { | |
return _strikewidget(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment