Skip to content

Commit

Permalink
Refactoring and new version
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielTavernini committed Sep 16, 2020
1 parent 7908268 commit 71a0aa2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
18 changes: 18 additions & 0 deletions lib/counter.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'dart:io';

import 'package:flutter/widgets.dart';
import 'package:intl/intl.dart';

class Counter extends AnimatedWidget {
Counter({Key key, this.animation, this.textStyle}) : super(key: key, listenable: animation);
final Animation<int> animation;
final TextStyle textStyle;

@override
build(BuildContext context) {
return new Text(
new NumberFormat.decimalPattern(Platform.localeName).format(animation.value),
style: textStyle,
);
}
}
17 changes: 2 additions & 15 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:io';
import 'package:covid19stats/chartsData.dart';
import 'package:covid19stats/counter.dart';
import 'package:covid19stats/countryData.dart';
import 'package:covid19stats/selectCountry.dart';
import 'package:covid19stats/parser.dart';
Expand Down Expand Up @@ -735,18 +736,4 @@ class _MyHomePageState extends State<MyHomePage> with TickerProviderStateMixin {
],
);
}
}

class Counter extends AnimatedWidget {
Counter({Key key, this.animation, this.textStyle}) : super(key: key, listenable: animation);
final Animation<int> animation;
final TextStyle textStyle;

@override
build(BuildContext context) {
return new Text(
new NumberFormat.decimalPattern(Platform.localeName).format(animation.value),
style: textStyle,
);
}
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A mobile app developed with Flutter to view Covid19 statistics.
# 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: 2.0.2+9
version: 2.0.2+10

environment:
sdk: ">=2.2.2 <3.0.0"
Expand Down
Binary file modified repo_files/app-release.apk
Binary file not shown.

0 comments on commit 71a0aa2

Please sign in to comment.