Skip to content

Instantly share code, notes, and snippets.

@hydroweaver
Created May 26, 2020 07:32
Show Gist options
  • Save hydroweaver/9a95047c222b3f8952aea9e333f03a98 to your computer and use it in GitHub Desktop.
Save hydroweaver/9a95047c222b3f8952aea9e333f03a98 to your computer and use it in GitHub Desktop.
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