minor fix
This commit is contained in:
parent
f328a7ae7a
commit
123f1c6a79
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:aves/theme/durations.dart';
|
import 'package:aves/theme/durations.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
@ -100,7 +102,10 @@ class _ReportOverlayState<T> extends State<ReportOverlay<T>> with SingleTickerPr
|
||||||
child: StreamBuilder<T>(
|
child: StreamBuilder<T>(
|
||||||
stream: opStream,
|
stream: opStream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
final percent = processed.length.toDouble() / widget.itemCount;
|
final processedCount = processed.length.toDouble();
|
||||||
|
final total = widget.itemCount;
|
||||||
|
assert(processedCount <= total);
|
||||||
|
final percent = min(1.0, processedCount / total);
|
||||||
return FadeTransition(
|
return FadeTransition(
|
||||||
opacity: _animation,
|
opacity: _animation,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
Loading…
Reference in a new issue