Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix numbers size #3

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:math';

import 'package:animated_digit/animated_digit.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.1.1"
version: "2.2.0"
async:
dependency: transitive
description:
Expand Down
3 changes: 1 addition & 2 deletions lib/src/animated_digit_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:ui' as ui;

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

Expand Down Expand Up @@ -664,7 +663,7 @@ class _AnimatedSingleWidgetState extends State<_AnimatedSingleWidget> {
if (widget.singleDigitData?.size != null) {
return valueSize = widget.singleDigitData!.size!;
}
return valueSize = _getTextSize(isNumber ? "0" : currentValue);
return valueSize = _getTextSize(currentValue);
}

/// 获取 [text] 的 Size
Expand Down