Fix /0 in pool page if empty account

This commit is contained in:
Hanh 2022-12-16 07:24:51 +08:00
parent 3d171a1fc4
commit 74b8c942fe
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ flutter pub run flutter_launcher_icons:main
#flutter pub run flutter_app_name
#flutter pub run change_app_package_name:main me.hanh.ywallet
flutter pub run build_runner build
flutter pub run flutter_native_splash:create
#flutter pub run flutter_native_splash:create
(cd packages/warp_api_ffi; flutter pub get; flutter pub run build_runner build)

View File

@ -47,7 +47,7 @@ class HorizontalBarChart extends StatelessWidget {
final i = e.key;
final color = palette[i];
final v = NumberFormat.compact().format(values[i]);
final flex = max((values[i] / sum * 100).round(), 1);
final flex = sum != 0 ? max((values[i] / sum * 100).round(), 1) : 1;
return Flexible(child: Container(child:
Center(child: Text(v, textAlign: TextAlign.center, style: TextStyle(color: Colors.white))),
color: color, height: height), flex: flex);

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.2.17+325
version: 1.2.17+327
environment:
sdk: ">=2.12.0 <3.0.0"