Skip to content

Commit ac97b5e

Browse files
authored
Merge pull request #44 from davquar/fix-summary
Fix and update summary section
2 parents 0c4d264 + d25b6e0 commit ac97b5e

File tree

7 files changed

+30
-11
lines changed

7 files changed

+30
-11
lines changed

.github/workflows/code_check.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: subosito/flutter-action@v2
1616
with:
1717
channel: 'stable'
18+
flutter-version-file: 'pubspec.yaml'
1819
- run: flutter --version
1920

2021
- name: Install dependencies

lib/l10n/app_en.arb

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111
"@pageViews": {
1212
"description": "Page views card title and label"
1313
},
14-
"uniques": "Uniques",
15-
"@uniques": {
16-
"description": "Uniques"
14+
"visitors": "Visitors",
15+
"@visitors": {
16+
"description": "Unique visitors"
17+
},
18+
"visits": "Visits",
19+
"@visitors": {
20+
"description": "Unique sessions"
1721
},
1822
"bounces": "Bounces",
1923
"@bounces": {

lib/models/api/stats.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import 'package:halfdot/models/api/common.dart';
22

33
class StatsResponse implements ApiModel {
4-
StatsResponse(this.pageViews, this.uniques, this.bounces, this.totalTime);
4+
StatsResponse(
5+
this.pageViews, this.visits, this.visitors, this.bounces, this.totalTime);
56

67
StatsResponse.fromJson(Map<String, dynamic> json)
78
: pageViews = json['pageviews']['value'],
8-
uniques = json['uniques']['value'],
9+
visits = json['visits']['value'],
10+
visitors = json['visitors']['value'],
911
bounces = json['bounces']['value'],
1012
totalTime = json['totaltime']['value'];
1113

1214
final int pageViews;
13-
final int uniques;
15+
final int visits;
16+
final int visitors;
1417
final int bounces;
1518
final int totalTime;
1619
}

lib/screens/settings.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SettingsPage extends StatefulWidget {
1717
class _SettingsPageState extends State<SettingsPage> {
1818
Storage storage = Storage.instance;
1919

20-
static const String _apiVersion = '2.7.0';
20+
static const String _apiVersion = '2.11.3';
2121
static const String _repoUrl = 'https://github.com/davquar/halfdot';
2222
static const String _license = 'MIT';
2323
static const String _licenseUrl =

lib/screens/website_statistics.dart

+12-2
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,22 @@ class _WebsiteStatisticsPageState extends State<WebsiteStatisticsPage> {
117117
),
118118
Column(children: <Widget>[
119119
Text(
120-
snapshot.data!.uniques.toString(),
120+
snapshot.data!.visits.toString(),
121121
style: Theme.of(context)
122122
.textTheme
123123
.titleLarge,
124124
),
125-
Text(AppLocalizations.of(context)!.uniques),
125+
Text(AppLocalizations.of(context)!.visits),
126+
]),
127+
Column(children: <Widget>[
128+
Text(
129+
snapshot.data!.visitors.toString(),
130+
style: Theme.of(context)
131+
.textTheme
132+
.titleLarge,
133+
),
134+
Text(
135+
AppLocalizations.of(context)!.visitors),
126136
]),
127137
Column(
128138
children: <Widget>[

pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -572,4 +572,4 @@ packages:
572572
version: "3.1.2"
573573
sdks:
574574
dart: ">=3.1.0 <=3.1.2"
575-
flutter: ">=3.13.0"
575+
flutter: ">=3.13.3"

pubspec.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1818
# In Windows, build-name is used as the major, minor, and patch parts
1919
# of the product and file versions while build-number is used as the build suffix.
20-
version: 2.1.1+7
20+
version: 2.1.2+8
2121

2222
environment:
2323
sdk: '>=3.0.0 <=3.1.2'
24+
flutter: '3.13.3'
2425

2526
# Dependencies specify other packages that your package needs in order to work.
2627
# To automatically upgrade your package dependencies to the latest versions

0 commit comments

Comments
 (0)