Skip to content

Instantly share code, notes, and snippets.

View hydroweaver's full-sized avatar

Karan hydroweaver

  • India
View GitHub Profile
CheckboxListTile(
value: toggle,
onChanged: (bool){
setState(() {
if(!bool){
toggle = false;
}
else{
toggle = true;
}
bool toggle = false;
CheckboxListTile(
value: true,
onChanged: null,
key: Key(item),
title: _strikeThrough(todoText: item, todoToggle: false),
)
CheckboxListTile(
value: false,
onChanged: null,
key: Key(item),
title: _strikeThrough(todoText: item, todoToggle: false),
)
class _strikeThrough extends StatelessWidget{
bool todoToggle;
String todoText;
_strikeThrough({this.todoToggle, this.todoText}) : super();
Widget _strikewidget(){
if(todoToggle==false){
return Text(
todoText,
@hydroweaver
hydroweaver / checkboxListTilewithText.dart
Last active May 24, 2020 06:40
Text Widget Code lying inside the CheckBoxListTile
CheckboxListTile(
value: false,
onChanged: null,
key: Key(value),
title:
Text(
value,
key: Key(value),
style: TextStyle(
fontSize: 22.0
for(final value in items)
Text(
value,
key: Key(value),
style: TextStyle(
fontSize: 22.0
),
)
Text(
value,
key: Key(value),
style: TextStyle(
fontSize: 22.0
),
)
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title: "Todo App with Re-orderable Lists & Swipe Cards",
home: App(),
));
}
List<String> items = ["Item 1 - I will stick to the new position!", "Item 2 - I will stick to the new position!", "Item 3 - I will stick to the new position!"];
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title: "Todo App with Re-orderable Lists & Swipe Cards",
home: App(),
));
}
List<String> items = ["Item 1 - I will stick to the new position!", "Item 2 - I will stick to the new position!", "Item 3 - I will stick to the new position!"];