Т
// returns the generated id
Future<int> addTodo(TodosCompanion entry) {
return into(todos).insert(entry);
}
Size: a a a
Т
// returns the generated id
Future<int> addTodo(TodosCompanion entry) {
return into(todos).insert(entry);
}
Т
Т
KK
KK
🅵
🅵
ValueNotifier
ValueListenableBuilder
InheritedNotifier
🅵
Т
Stream<double> percStreamer(Duration interval) async*{
while(true){
await Future.delayed(interval);
percentage=0;oxideInfo.forEach((element) {percentage+=element.num; });
yield percentage;
}
}
percStream=percStreamer(Duration(seconds: 1));
Т
KK
🅵
Stream<double> percStreamer(Duration interval) async*{
while(true){
await Future.delayed(interval);
percentage=0;oxideInfo.forEach((element) {percentage+=element.num; });
yield percentage;
}
}
percStream=percStreamer(Duration(seconds: 1));
void main() => percStreamer(const Duration(seconds: 1)).take(5).forEach(print);
final List<double> oxideInfo = <double>[1, 3, 5, 6];
Stream<double> percStreamer(Duration interval) =>
Stream<void>.periodic(interval)
.map<double>((_) =>
oxideInfo.fold<double>(
0, (percentage, element) => percentage + element),
);
🅵
🅵
Т
Т
Т
🅵
🅵
Т