From 14ce822df422b3923b82fe37f013cfbaad920504 Mon Sep 17 00:00:00 2001 From: flyou Date: Fri, 26 Oct 2018 16:34:53 +0800 Subject: [PATCH] update readme --- lib/CircleProgressBar.dart | 2 +- lib/CircleProgressBarTest.dart | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CircleProgressBar.dart b/lib/CircleProgressBar.dart index 20be555..f90b856 100644 --- a/lib/CircleProgressBar.dart +++ b/lib/CircleProgressBar.dart @@ -98,7 +98,7 @@ class CircleProgressBarState extends State size: Size(widget.size, widget.size), child: Center( child: Text( - "${widget.textPercent ? "$percent%" : "${_doubleAnimation.value.round()}/${widget.maxNumber.round()}"}", + "${_doubleAnimation.value.round() == widget.maxNumber ? "完成" : "${widget.textPercent ? "$percent%" : "${_doubleAnimation.value.round()}/${widget.maxNumber.round()}"}"}", style: widget.textStyle == null ? TextStyle(color: Colors.black, fontSize: 20) : widget.textStyle), diff --git a/lib/CircleProgressBarTest.dart b/lib/CircleProgressBarTest.dart index 74d8dfc..fafb4af 100644 --- a/lib/CircleProgressBarTest.dart +++ b/lib/CircleProgressBarTest.dart @@ -17,18 +17,18 @@ import 'package:flutter/material.dart'; void main() { runApp(new MaterialApp( - home: AdCounterViewTestDemo(), + home: CircleProgressBarDemo(), )); } -class AdCounterViewTestDemo extends StatefulWidget { +class CircleProgressBarDemo extends StatefulWidget { @override State createState() { - return AdCounterViewTestDemoState(); + return CircleProgressBarDemoState(); } } -class AdCounterViewTestDemoState extends State { +class CircleProgressBarDemoState extends State { @override Widget build(BuildContext context) { return Scaffold(