Skip to content

Commit a9c04ae

Browse files
committed
feat: update app versioning and attribution
1 parent 9b01e8c commit a9c04ae

7 files changed

Lines changed: 36 additions & 4 deletions

File tree

lib/src/screens/location_map_screen.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ class _LocationMapScreenState extends State<LocationMapScreen> {
194194
radiusKm: _settings.radiusKm.toDouble(),
195195
),
196196
),
197+
RichAttributionWidget(
198+
alignment: AttributionAlignment.bottomLeft,
199+
attributions: [
200+
TextSourceAttribution(
201+
'OpenStreetMap contributors',
202+
onTap: () => launchUrl(Uri.parse('https://openstreetmap.org/copyright')),
203+
),
204+
],
205+
),
197206
MarkerLayer(
198207
markers: [
199208
Marker(

lib/src/screens/menu/about_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import 'package:flutter/material.dart';
2+
import 'package:peerchat_secure/src/utils/app_version.dart';
23
import 'package:peerchat_secure/src/utils/google_fonts.dart';
34
import 'package:url_launcher/url_launcher.dart';
45
import '../../theme.dart';
56

67
class AboutScreen extends StatelessWidget {
78
const AboutScreen({super.key});
89

9-
static const String _appVersion = '1.0.1';
10+
static const String _appVersion = AppVersion.version;
1011
static const String _baseUrl = 'https://peerchat.mathi.live';
1112
static const String _changelogUrl = '$_baseUrl/changelog';
1213
static const String _tosUrl = '$_baseUrl/tos';

lib/src/screens/menu/menu_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:peerchat_secure/src/utils/app_version.dart';
23
import 'package:peerchat_secure/src/utils/google_fonts.dart';
34
import '../../theme.dart';
45
import 'about_screen.dart';
@@ -75,7 +76,7 @@ class MenuScreen extends StatelessWidget {
7576
),
7677
),
7778
Text(
78-
'Version 1.0.1 (Secure Mesh)',
79+
AppVersion.displayVersion,
7980
style: GoogleFonts.inter(
8081
fontSize: 12,
8182
color: Colors.white.withValues(alpha: 0.8),

lib/src/utils/app_version.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class AppVersion {
2+
/// The current version of the application.
3+
///
4+
/// This should be kept in sync with the version in pubspec.yaml.
5+
static const String version = '1.1.0';
6+
7+
/// The build name/codename for this release.
8+
static const String codename = 'Secure Mesh';
9+
10+
/// Returns the formatted version string for display.
11+
static String get displayVersion => 'Version $version ($codename)';
12+
}

others/sys_architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PeerChat - System Architecture (Current)
22

3-
Last updated: February 25, 2026
3+
Last updated: May 11, 2026
44
Source of truth: current implementation in lib/src/** and Android host glue.
55

66
This document uses the original style: plain text and ASCII flow diagrams.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: peerchat_secure
22
description: A privacy-first P2P chat (MVP Flutter scaffold)
33
publish_to: 'none'
4-
version: 1.0.1+1
4+
version: 1.1.0+1
55

66
environment:
77
sdk: '>=3.3.0 <4.0.0'

tools/build_release.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ $pubspec = Get-Content "pubspec.yaml" -Raw
88
if ($pubspec -match "version:\s*([0-9.]+)") {
99
$version = $Matches[1]
1010
Write-Host "Detected version: $version" -ForegroundColor Green
11+
12+
# Sync version to Dart utility
13+
$versionFile = "lib/src/utils/app_version.dart"
14+
if (Test-Path $versionFile) {
15+
$content = Get-Content $versionFile -Raw
16+
$newContent = $content -replace "static const String version = '.*';", "static const String version = '$version';"
17+
$newContent | Set-Content $versionFile -NoNewline
18+
Write-Host "Synced version to $versionFile" -ForegroundColor Green
19+
}
1120
} else {
1221
Write-Host "Could not detect version from pubspec.yaml. Using 'unknown'." -ForegroundColor Yellow
1322
$version = "unknown"

0 commit comments

Comments
 (0)